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 Result<T> getSync() { | |
T ret; | |
try { | |
try { | |
try { | |
ret = m_Loader.doLoad(); | |
return Result.success(ret); | |
} catch (NoResultException e) { | |
if (m_Loader.getChainLoader() == null) | |
throw new UnsupportedOperationException("If there is no chained loader, doLoad() must return a result."); |
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 Foo { | |
private Handler mHandler; | |
private Runnable mJob; | |
private BroadcastReceiver mBR1 = new BroadcastReceiver() { | |
public Object mUnreachable; | |
@Override | |
public void onReceive(Intent i) { | |
Object goesAway = new Object(); |
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
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T06:51:42-07:00) | |
Maven home: /usr/local/Cellar/maven/3.2.2/libexec | |
Java version: 1.6.0_65, vendor: Apple Inc. | |
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home | |
Default locale: en_US, platform encoding: MacRoman | |
OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac" | |
[INFO] Error stacktraces are turned on. | |
[DEBUG] Reading global settings from /usr/local/Cellar/maven/3.2.2/libexec/conf/settings.xml | |
[DEBUG] Reading user settings from /Users/sarbs/.m2/settings.xml | |
[DEBUG] Using local repository at /Users/sarbs/.m2/repository |
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
@Provides | |
Noodile provideNoodile(@Named("fooClaster") Claster foo, @Named("barClaster") Claster bar) { | |
... | |
} | |
// need to duplicate this function for fooClaster and barClaster? or can i specify that a fooClaster uses this with @Named("foo") Jeebus? | |
@Provides | |
Claster provideJeebus(Jeebus j) { | |
Claster c = new Claster(j); | |
// do a bunch of setup logic that doesn't change between Jeebi |
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 MapActivity { | |
private GoogleMap mMap; | |
private MapFragment mFragment; | |
public void onCreate(...) { | |
mFragment = MapFragment.newInstance(parameters); | |
// set other stuff up | |
} |
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 FooFragment { | |
public interface IFooFragment { | |
void onMapReady(GoogleMap map); | |
} | |
somewhereLaterInCode() { | |
((IFooFragment)getActivity()).onMapReady(myMap); | |
} | |
} |
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
09-10 00:46:57.210 19553-19566/sarbs.com.tinker I/Tinker﹕ Running test... | |
09-10 00:47:25.250 19553-19566/sarbs.com.tinker I/Tinker﹕ Full loop with branching took 27535510 µs. | |
09-10 00:48:57.268 19553-19566/sarbs.com.tinker I/Tinker﹕ Full loop with virtmethod took 91837723 µs. |
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
$ for f in $(ls); do echo $$f; done | |
98204f | |
98204f | |
98204f | |
98204f | |
98204f | |
98204f | |
98204f | |
98204f | |
98204f |
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
V/SetupWizard( 2835): BaseActivity.onPause() com.google.android.setupwizard.SimMissingActivity | |
V/SetupWizard( 2835): BaseActivity.onCreate(null) com.google.android.setupwizard.WifiSettingsActivity | |
D/SetupWizard( 2835): BaseActivity.onCreate() mIsFirstRun=true mIsSecondaryUser=false | |
D/AndroidRuntime( 2835): Shutting down VM | |
W/dalvikvm( 2835): threadid=1: thread exiting with uncaught exception (group=0x415e6db8) | |
E/AndroidRuntime( 2835): FATAL EXCEPTION: main | |
E/AndroidRuntime( 2835): Process: com.google.android.setupwizard, PID: 2835 | |
E/AndroidRuntime( 2835): java.lang.NoSuchMethodError: android.net.wifi.IWifiManager.setWifiEnabled | |
E/AndroidRuntime( 2835): at com.google.android.setupwizard.BaseActivity.tryEnablingWifi(BaseActivity.java:1526) | |
E/AndroidRuntime( 2835): at com.google.android.setupwizard.WifiSettingsActivity.launchWifiSettingsPanel(WifiSettingsActivity.java:103) |
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 com.sarbs.tinker; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; |