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 class Throwable implements Serializable { | |
//... | |
public Throwable() { | |
fillInStackTrace(); | |
} | |
//... |
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
PIDS=`ps auxh | awk '{print $2}'`; for pid in $PIDS; do mem=`pmap -d $pid | tail -n 1 | awk '{print $4}'`; echo "$pid $mem"; done |
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
#!/bin/bash | |
JAVA_PROCESS_ID=$1 | |
LABEL=$2 | |
if [[ -z "$JAVA_PROCESS_ID" ]] | |
then | |
echo >&2 "No Java process specified" | |
exit 1 | |
fi |
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
git checkout -b experiment |
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 getUnreadMessages() { | |
List<Message> messages = service.getMessage().getUnreadMessage(); | |
String result = convert( messages ); | |
markMessagesUpdated( messages ); | |
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
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | |
<property name="nullValue" value="null"/> | |
<property name="ignoreResourceNotFound" value="true"/> | |
<property name="locations"> | |
<list> | |
<value>classpath:/application.properties | |
<value>classpath:/application-#{ systemEnvironment[ 'SUPER_APP_ENV' ] }.properties | |
</list> | |
</property> | |
</bean> |
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
GWT.runAsync( new RunAsyncCallback() { | |
public void onFailure( Throwable caught ) { | |
Window.alert( "Code download failed" ); | |
} | |
public void onSuccess() { | |
Window.alert( "Hello, async callback" ); | |
} | |
} ); |
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.Date; | |
public interface DateService { | |
Date getCurrentTime(); | |
} |
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 class ServiceFactoryImpl_Buggy<T extends Service> { | |
protected Map<String, T> serviceMap = new HashMap<String, T>(); | |
public T getService( String name ) { | |
T result = serviceMap.get( name ); | |
if ( null == result ) { | |
synchronized ( this ) { | |
result = createService( name ); | |
serviceMap.put( name, 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
dn: cn=schema | |
changetype: modify | |
add: objectClasses | |
objectClasses: ( 1.3.6.1.4.1.26037.1.999.2000 | |
NAME ( 'blogger' ) | |
DESC 'Someone who has a blog' | |
SUP inetOrgPerson | |
STRUCTURAL | |
MAY blog | |
X-ORIGIN 'OpenDS Directory Server' |