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/ |
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
| 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
| 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
| 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
| final Random r = new SecureRandom(); | |
| byte[] salt = new byte[32]; | |
| r.nextBytes(salt); | |
| String encodedSalt = Base64.encodeBase64String(salt); |
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
| JAVA_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512M -Djava.awt.headless=true" |
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 archetype:create-from-project | |
| cd target/generated-sources/archetype/ | |
| mvn install | |
| mvn archetype:generate -DarchetypeCatalog=local | |
| <distributionManagement> | |
| <repository> | |
| <id>209-release</id> | |
| <name>209-release</name> | |
| <url>http://192.168.163.209/nexus/content/repositories/releases/</url> | |
| </repository> |
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
| $.datepicker.formatDate('yy-mm-dd', new Date()) |
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 DeCasteljauBezier(points, density, step){ | |
| //if (points.length < 3) return null; | |
| console.time('bezier'); | |
| var ps = points.map(function(p){ | |
| return { | |
| x: p.x, | |
| y: p.y | |
| }; | |
| }), | |
| results = [], |
OlderNewer