Skip to content

Commit

Permalink
Merge pull request doublechaintech#20 from doublechaintech/peer-to-pe…
Browse files Browse the repository at this point in the history
…ar-chain

Change to newest version
  • Loading branch information
philipgreat authored Sep 9, 2021
2 parents 786dccc + 2b91916 commit 4dccdca
Show file tree
Hide file tree
Showing 4,952 changed files with 365,236 additions and 322,447 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file modified .DS_Store
Binary file not shown.
265 changes: 144 additions & 121 deletions bizcore/.classpath

Large diffs are not rendered by default.

66 changes: 38 additions & 28 deletions bizcore/.gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
# maven ignore
target/
bin/
out/
*.war
*.nar
*.ear
*.zip
*.tar
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
build/*
bin/*
output/*
lib/*
WEB-INF/lib/*
.history
.gradle
classes/*
.vscode/sftp.json
# eclipse ignore
.settings/
.project
.classpath
.metadata/
classes/
work/
WEB_INF/conf/
WEB_INF/lib

# idea ignore
.idea/
*.ipr
*.iml
*.iws

# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp

# system ignore
.DS_Store
Thumbs.db

# gradle ignore
gradle/
.gradle/
build/
gradlew.bat
gradlew
out/
15 changes: 0 additions & 15 deletions bizcore/.settings/org.eclipse.buildship.core.prefs

This file was deleted.

7 changes: 6 additions & 1 deletion bizcore/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
Expand All @@ -25,6 +25,11 @@ org.eclipse.jdt.core.compiler.source=1.8











Expand Down
47 changes: 47 additions & 0 deletions bizcore/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

=======
# skynet-common-app-framework
Common App Framework, a replacement of modern app

## 支持返回一个blob类型, 一个返回图片的例子

```
public BlobObject helloImage2(int width, int height, String note) throws IOException {
BlobObject blob = new BlobObject();
int internalWidth = outOfThen(width,10,1400,600);
int internalHeight = outOfThen(height,10,1400,400);
BufferedImage off_Image =
new BufferedImage(internalWidth, internalHeight,
BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = off_Image.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
Font f = new Font("Monospaced", Font.BOLD, 14);
g2.setFont(f);
String text=String.format("%s(%dX%d)", note,internalWidth,internalHeight);
g2.drawString(text,1,15);
//WritableRaster raster = bufferedImage .getRaster();
//DataBufferByte data = (DataBufferByte) raster.getDataBuffer();
Shape shape = new Rectangle2D.Double(1, 1,
internalWidth-2,
internalHeight-2);
g2.draw(shape);
shape = new Line2D.Double(0, 0, internalWidth, internalHeight);
g2.draw(shape);
shape = new Line2D.Double(internalWidth, 0, 0, internalHeight);
g2.draw(shape);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(off_Image, "png", bos);
blob.setData(bos.toByteArray());
blob.setMimeType(BlobObject.TYPE_PNG);
//BlobObject.TYPE_XLSX
return blob;
}
```
27 changes: 27 additions & 0 deletions bizcore/String_Object$Map.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<%@page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page contentType="text/html; charset=UTF-8"%>
<style>
.message{
font-size:20px;
}
.name {
background-color: lightblue;
}
.value {
word-break: break-all;
}
</style>

<div class="message">
Map:<ul>
<table>

<c:forEach var="entry" items="${result}" varStatus="status">
<tr>
<td class="name"><c:out value="${entry.key}"/></td><td class="value"><c:out value="${entry.value}"/></td>
</tr>
</c:forEach>
</table>
</ul>
</div>
Binary file removed bizcore/WEB-INF/.DS_Store
Binary file not shown.
120 changes: 0 additions & 120 deletions bizcore/WEB-INF/.classpath

This file was deleted.

4 changes: 3 additions & 1 deletion bizcore/WEB-INF/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/classes/
classes/
*.sql

32 changes: 0 additions & 32 deletions bizcore/WEB-INF/.project

This file was deleted.

12 changes: 0 additions & 12 deletions bizcore/WEB-INF/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ public Map<String, Object> testoss() {
return testossByHome(userHome);
}

// replaceAll()方法使用的是pattern, userHome中会出现特殊ID,例如$SU000001, 所以换成 replace, 目前的配置 replace 可以正常工作
public Map<String, Object> testossByHome(String userHome) {
// String roleSessionName = userContext.communityUserId();
String ossPolicy = config.getPolicy();
String userPolicy = ossPolicy.replaceAll("BUCKET_ID", config.getOssBucket()).replaceAll("USER_HOME", userHome);
String userPolicy = ossPolicy.replace("BUCKET_ID", config.getOssBucket()).replace("USER_HOME", userHome);

// 此处必须为 HTTPS
ProtocolType protocolType = ProtocolType.HTTPS;
Expand Down
Loading

0 comments on commit 4dccdca

Please sign in to comment.