This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public String parse(String jsonLine) { | |
| JsonElement jelement = new JsonParser().parse(jsonLine); | |
| JsonObject jobject = jelement.getAsJsonObject(); | |
| jobject = jobject.getAsJsonObject("data"); | |
| JsonArray jarray = jobject.getAsJsonArray("translations"); | |
| jobject = jarray.get(0).getAsJsonObject(); | |
| String result = jobject.get("translatedText").toString(); | |
| return result; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function base64ArrayBuffer(arrayBuffer) { | |
| var base64 = '' | |
| var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
| var bytes = new Uint8Array(arrayBuffer) | |
| var byteLength = bytes.byteLength | |
| var byteRemainder = byteLength % 3 | |
| var mainLength = byteLength - byteRemainder | |
| var a, b, c, d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Throwable ex = new Throwable(); | |
| StackTraceElement[] stackElements = ex.getStackTrace(); | |
| if (stackElements != null) { | |
| for (int i = stackElements.length - 1; i >= 0; i--) { | |
| System.out.print(stackElements[i].getClassName() + "\t"); | |
| System.out.print(stackElements[i].getMethodName() + "\t"); | |
| System.out.print(stackElements[i].getFileName() + "\t"); | |
| System.out.println(stackElements[i].getLineNumber()); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn install:install-file -DgroupId=com.bea.xml -DartifactId=jsr173-ri -Dversion=1.0 -Dpackaging=jar -Dfile=[path to file] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging | |
| =jar -Dfile=c:\ojdbc6.jar -DrepositoryId=209-release -Durl=http://192.168.163.209/nexus/content/repositories/releases/ |
NewerOlder