This file contains 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
Groovyc: java.lang.RuntimeException: No suitable ClassLoader found for grab | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) | |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) | |
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) | |
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) | |
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) | |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) | |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) | |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190) |
This file contains 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
C:\usr\java\jdk1.7.0_45\bin\java -Dtools.jar=C:\usr\java\jdk1.7.0_45\lib\tools.jar "-Dgroovy.home=C:\Program Files (x86)\Groovy\Groovy-2.2.1" "-Dgroovy.starter.conf=C:\Program Files (x86)\Groovy\Groovy-2.2.1\conf\groovy-starter.conf" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\groovy-2.2.1.jar;.;C:\Users\azusa\IdeaProjects\untitled3\out\production\untitled3;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\abeilleformbuilder-3.0.jar;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\ant-1.9.2.jar;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\ant-antlr-1.9.2.jar;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\ant-junit-1.9.2.jar;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\ant-launcher-1.9.2.jar;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\antlr-2.7.7.jar;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\asm-4.1.jar;C:\Program Files (x86)\Groovy\Groovy-2.2.1\lib\asm-analys |
This file contains 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
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.6' ) | |
import groovyx.net.http.* | |
import static groovyx.net.http.ContentType.* | |
import static groovyx.net.http.Method.* | |
def http = new HTTPBuilder( 'http://ajax.googleapis.com' ) | |
// perform a GET request, expecting JSON response data | |
http.request( GET, JSON ) { | |
uri.path = '/ajax/services/search/web' |
This file contains 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 basic | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import io.gatling.jdbc.Predef._ | |
import io.gatling.http.Headers.Names._ | |
import scala.concurrent.duration._ | |
import bootstrap._ | |
import assertions._ | |
This file contains 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
private void writeObject(java.io.ObjectOutputStream s) | |
throws IOException | |
{ | |
// Write out the threshold, loadfactor, and any hidden stuff | |
s.defaultWriteObject(); | |
// Write out number of buckets | |
if (table==EMPTY_TABLE) { | |
s.writeInt(roundUpToPowerOf2(threshold)); | |
} else { |
This file contains 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 jp.fieldnotes.gist; | |
import java.io.PrintWriter; | |
import java.io.StringWriter; | |
public class WriteException { | |
public static String toString(Throwable t) { | |
StringWriter sw = new StringWriter(); | |
try (PrintWriter pw = new PrintWriter(sw)) { |
This file contains 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.Collection; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.Set; | |
/** | |
* スレッドセーフな{@link HashMap}です。 |
This file contains 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
p=`ps aux |grep tomcat |grep web |grep java |awk '{print $2}'`; jstat -gcutil -h10 $p 30000 | awk '{print strftime("%H:%M:%S"), $0}' |
This file contains 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
-- カンマ前置き派 | |
SELECT name | |
, title | |
FROM precures p | |
WHERE p.color = 'yellow' | |
AND p.title = 'smile_precure' | |
ORDER BY name | |
-- カンマ後ろ置き派 | |
SELECT name, |
This file contains 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 static void initHttpsURLConnection() throws Exception { | |
HostnameVerifier hv = new HostnameVerifier() { | |
@Override | |
public boolean verify(String arg0, SSLSession arg1) { | |
return true; | |
} | |
}; | |
HttpsURLConnection.setDefaultHostnameVerifier(hv); |