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 org.test; | |
import org.junit.Test; | |
import javax.tools.*; | |
import java.io.ByteArrayOutputStream; | |
import java.lang.reflect.InvocationTargetException; | |
import java.net.URI; | |
import java.util.*; |
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 class Tester extends SuperClass { | |
private SuperCaller superCaller = new SuperCaller(); | |
private Delegate delegate = new Delegate(superCaller); | |
public static void main(String[] args){ | |
Tester tester = new Tester(); | |
tester.runMe(); | |
} |
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 class AnnotationProcessorOutputAssertion { | |
public @interface Target {} | |
public interface TestTarget { | |
String get(); | |
} | |
@Test | |
public void testCompileAnnotationProcessorOutput() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { |
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
Synconrized(Scopes.class): | |
public class Scopes { | |
public static <T> T getObject(ScopeSource source, Class<T> clazz, ScopedBuilder<T> builder){ | |
T result = source.getScopedObject(clazz); | |
if(result == null){ | |
synchronized (Scopes.class){ | |
result = source.getScopedObject(clazz); | |
if(result == null){ |
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 org.cs500.homework3 | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.util.*; | |
import static junit.framework.Assert.assertFalse; | |
import static junit.framework.Assert.assertTrue; |
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
@EventName | |
public void callMe(String value1, String value2, Object anothervalue){ | |
//value1 == "hello" | |
//value2 == "world" | |
//anotherValue = something else | |
} | |
or | |
@EventName |
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
//static way (dont want to do this) | |
public class SlideshowActivity extends Activity{ | |
public static void start(ArrayList<String> images, Song song, Uri videoUri, Context ctx){ | |
Intent intent = new Intent(ctx, SlideshowActivity.class); | |
intent.putExtra(EXTRA_IMAGE_FILE_NAMES, images); | |
intent.putExtra(EXTRA_SELECTED_SONG, song); | |
intent.putExtra(EXTRA_VIDEO_URI, videoUri); | |
ctx.startActivity(intent); | |
} |
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
#!/bin/bash | |
unset PATH; | |
# $1 = path to backup | |
# $2 = name of backup folder | |
# ------------- system commands used by this script -------------------- | |
ID=/usr/bin/id; | |
ECHO=/bin/echo; |
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 class Parcels { | |
public static final String PARCELS_NAME = "Parcels"; | |
public static final String PARCELS_REPOSITORY_NAME = "Transfuse$Parcels"; | |
public static final String PARCELS_PACKAGE = "org.androidtransfuse"; | |
private static final ParcelRepository PARCELS; | |
static{ | |
ParcelRepository parcelsCreation; |
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 class Parcels { | |
public static final String PARCELS_NAME = "Parcels"; | |
public static final String PARCELS_REPOSITORY_NAME = "Transfuse$Parcels"; | |
public static final String PARCELS_PACKAGE = "org.androidtransfuse"; | |
private static ParcelRepository PARCELS; | |
public static void initialise(ClassLoader classLoader){ | |
loadParcels(classLoader); |
OlderNewer