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 ChallengeLoader extends EventDispatcher { | |
public function loadWordSound( wordSoundUrl:String, onSuccess:Function, | |
onError:Function ):void { | |
var loadingProcessData:LoadingProcessData = new LoadingProcessData( onSuccess, | |
onError ); | |
var loadingEventProcessor:Function = FunctionUtils.curry( | |
onCompleteResourceLoad, loadingProcessData ); | |
var wordSound:Sound = new Sound(); |
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.text.*; | |
class CrashThread extends Thread { | |
public static final long BYTES_IN_MEGABYTE = 1024 * 1024; | |
public static void main(String[] a) throws Throwable { | |
try { | |
System.out.println("Maximum possible heap size is " + Runtime.getRuntime().max Memory() / BYTES_IN_MEGABYTE); | |
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.*; | |
class ForBug { | |
public static void main( String[] a ) { | |
int m = Integer.MAX_VALUE; | |
for ( int n = 1; n <= m; n++ ) { | |
System.out.println( "Step " + n ); | |
} | |
} |
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
... | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>generate-resources</phase> | |
<goals> | |
<goal>run</goal> | |
</goals> |
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' |
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
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
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
<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
public String getUnreadMessages() { | |
List<Message> messages = service.getMessage().getUnreadMessage(); | |
String result = convert( messages ); | |
markMessagesUpdated( messages ); | |
return result; | |
} |
OlderNewer