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 SubclassActivity extends MainActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
View textView = findViewById(R.id.button1); | |
textView.setOnClickListener(new OnClickListener() { | |
@Override |
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 codeguru.exercise; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import com.google.zxing.client.android.CaptureActivity; | |
public class MainActivity extends Activity { |
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
java.lang.NullPointerException | |
at bbct.android.common.activity.test.BaseballCardListWithDataTest.testSelectionAfterSaveInstanceState(BaseballCardListWithDataTest.java:462) | |
at java.lang.reflect.Method.invokeNative(Native Method) | |
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) | |
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) | |
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) | |
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190) | |
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175) | |
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555) | |
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584) |
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
Log.d(TAG, "null activity"); | |
this.setActivity(null); | |
Log.d(TAG, "change orientation"); | |
this.activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); | |
Log.d(TAG, "restart activity"); | |
this.activity = this.getActivity(); | |
Log.d(TAG, "assertions"); | |
lv = ((ListActivity) this.activity).getListView(); |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 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
1|Topps|1991|278|10000|1|Alex Fernandez|White Sox|Pitcher | |
2|Topps|1974|175|10000|1|Bob Stanley|Red Sox|Pitcher | |
3|Topps|1985|201|10000|1|Vince Coleman|Cardinals|Pitcher | |
4|TMG|1993|5|10000|1|Ken Griffey Jr.|All-Star|Pitcher | |
5|Upper Deck|1993|18|10000|1|Dave Hollins|Phillies|Pitcher | |
6|Upper Deck|1990|189|10000|1|Tom Browning|Reds|Pitcher | |
7|Topps|1982|121|10000|1|Ed Lynch|Mets|Pitcher |
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
java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission | |
at android.os.Parcel.readException(Parcel.java:1425) | |
at android.os.Parcel.readException(Parcel.java:1379) | |
at android.hardware.input.IInputManager$Stub$Proxy.injectInputEvent(IInputManager.java:356) | |
at android.hardware.input.InputManager.injectInputEvent(InputManager.java:619) | |
at android.app.Instrumentation.sendKeySync(Instrumentation.java:886) | |
at android.app.Instrumentation.sendStringSync(Instrumentation.java:848) | |
at bbct.android.common.test.BBCTTestUtil.sendKeysToCurrFieldCardDetails(BBCTTestUtil.java:296) | |
at bbct.android.common.test.BBCTTestUtil.sendKeysToCardDetails(BBCTTestUtil.java:225) | |
at bbct.android.common.test.BBCTTestUtil.sendKeysToCardDetails(BBCTTestUtil.java:204) |
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
set = do | |
char '{' | |
result <- list | |
char '}' | |
return result | |
list = sepBy1 cell (char ',') | |
cell = many (noneOf ",}") | |
parseSet :: String -> Either ParseError [String] |
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 codeguru.connect4; | |
import com.badlogic.gdx.graphics.OrthographicCamera; | |
import com.badlogic.gdx.ApplicationListener; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL10; | |
import com.badlogic.gdx.graphics.glutils.ShapeRenderer; | |
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType; |
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
sfTicket = [ticket for ticket in sfTickets if ticket['summary'] == issue['title']][0] | |
pprint(sfTicket['custom_fields']['_milestone']) | |
updateData = {'title' : issue['title']} | |
updateData['milestone'] = milestoneNumbers[sfTicket['custom_fields']['_milestone']] |
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
milestoneNumbers = {} | |
for state in ['open', 'closed']: | |
print("***" + state) | |
stateJSON = {'state' : state} | |
print(json.dumps(stateJSON)) | |
response = requests.get( | |
'https://api.github.com/repos/' + username + '/' + repo + '/milestones', | |
data=json.dumps(stateJSON), | |
auth=(username, password)) |