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
| for (StackTraceElement ste : Thread.currentThread().getStackTrace()) { | |
| System.out.println(ste); | |
| } |
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
| var a = document.getElementsByTagName("iframe")[0]; | |
| var b = (a.contentWindow || a.contentDocument); | |
| function doClick(){ | |
| b.document.getElementsByClassName("thechosenone")[0].click(); | |
| setTimeout(doClick, 1000); | |
| }; | |
| doClick(); |
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
| /* package whatever; // don't place package name! */ | |
| // http://www.programcreek.com/2013/01/when-and-how-a-java-class-is-loaded-and-initialized/ | |
| // http://www.programcreek.com/2011/10/java-class-instance-initializers/ | |
| // https://ideone.com/6mkS8l | |
| import java.util.*; | |
| import java.lang.*; | |
| import java.io.*; | |
| /* Name of the class has to be "Main" only if the class is public. */ |
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 doy(x){ | |
| return function(){ | |
| console.log("start " + x); | |
| //sleep(2); | |
| console.log("end " + x); | |
| } | |
| } | |
| doy("1")(); |
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
| fuser -k -n tcp 8090 -9 | |
| rm server.pid -rf | |
| ./play clean |
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
| import java.util.Random; | |
| public class RandomLong { | |
| private static Random r = new Random(); | |
| private long randomSeed; | |
| private long otherValue; | |
| public RandomLong(long value) { | |
| randomSeed = r.nextLong(); | |
| otherValue = value + randomSeed; |
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
| import java.util.*; | |
| import java.lang.*; | |
| import java.io.*; | |
| class TestStaticVariablePriority | |
| { | |
| public static void main (String[] args) throws java.lang.Exception | |
| { | |
| // System.out.println("a " + A.a); |
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.lang.OutOfMemoryError: Java heap space | |
| at java.lang.ClassLoader.findLoadedClass0(Native Method) | |
| at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:1093) | |
| at play.classloading.ApplicationClassloader.loadClass(ApplicationClassloader.java:75) | |
| at java.lang.ClassLoader.loadClass(ClassLoader.java:358) | |
| at play.classloading.ApplicationClasses.getAssignableClasses(ApplicationClasses.java:71) | |
| at play.classloading.ApplicationClassloader.getAssignableClasses(ApplicationClassloader.java:459) | |
| at play.data.binding.Binder.internalDirectBind(Binder.java:569) | |
| at play.data.binding.Binder.directBind(Binder.java:542) | |
| at play.data.binding.Binder.directBind(Binder.java:526) |
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
| var now = new Date(); | |
| var nowStamp = now.getTime(); | |
| var aDay = 24*60*60*1000; | |
| for (var start = 1449414000000; start <now; start = start+aDay) { | |
| var str = "" + new Date(start); | |
| var end = start + aDay; | |
| var t1 = db.TutorialStart.distinct("uuid", {"createdAt":{$gte:start, $lt:end}}).length; | |
| str = str + "," + t1; | |
| for (var i =2; i<=15; i++){ | |
| var ti = db.UserTutorial.distinct("memId", {step:i,"createdAt":{$gte:start, $lt:end}}).length; |
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
| {a:"1,2,3afdsafasfd"} |
OlderNewer