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
<activity | |
android:name=".DangerousActivity" | |
android:label="@string/app_name" | |
android:permission="course.labs.permissions.DANGEROUS_ACTIVITY_PERM" > | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
<intent-filter> |
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
02-05 16:33:31.974: I/Lab-Fragments(2565): Entered onItemSelected(0) | |
02-05 16:33:32.324: I/Lab-Fragments(2565): Entered updateFeedDisplay() | |
02-05 16:33:34.614: I/Lab-Fragments(2565): Entered onActivityCreated() | |
02-05 16:33:36.454: I/Lab-Fragments(2565): Entered onItemSelected(1) | |
02-05 16:33:36.454: I/Lab-Fragments(2565): Entered updateFeedDisplay() | |
02-05 16:33:39.074: I/Lab-Fragments(2565): Entered onActivityCreated() | |
02-05 16:33:40.404: I/Lab-Fragments(2565): Entered onItemSelected(2) | |
02-05 16:33:40.404: I/Lab-Fragments(2565): Entered updateFeedDisplay() |
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
Bundle b = new Bundle(); | |
b.setString("name", name); | |
b.setInt("someInt", someInt); | |
Message m = new Message(); | |
m.setData(b); |
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
03-01 10:54:44.479: E/AndroidRuntime(1656): java.lang.RuntimeException: Unable to pause activity {course.labs.notificationslab/course.labs.notificationslab.MainActivity}: java.lang.IllegalArgumentException: Receiver not registered: null | |
03-01 10:54:44.479: E/AndroidRuntime(1656): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2838) | |
03-01 10:54:44.479: E/AndroidRuntime(1656): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2794) | |
03-01 10:54:44.479: E/AndroidRuntime(1656): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2772) | |
03-01 10:54:44.479: E/AndroidRuntime(1656): at android.app.ActivityThread.access$800(ActivityThread.java:130) | |
03-01 10:54:44.479: E/AndroidRuntime(1656): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212) | |
03-01 10:54:44.479: E/AndroidRuntime(1656): at android.os.Handler.dispatchMessage(Handler.java:99) | |
03-01 10:54:44.479: E/AndroidRuntime(1656): at android.os.Looper.loop(Looper.java:137) | |
03-01 |
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
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); | |
GoogleMapOptions options = new GoogleMapOptions() | |
.mapType(GoogleMap.MAP_TYPE_SATELLITE); | |
SupportMapFragment mapFragment = SupportMapFragment | |
.newInstance(options); | |
GoogleMap map = mapFragment.getMap(); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" > | |
<Button | |
android:id="@+id/next_button" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_centerHorizontal="true" |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
apply plugin: 'java' | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.9.+' |
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
@Override | |
public void onResume() { | |
super.onResume(); | |
// restore default header state | |
CheckedTextView headerCheck = (CheckedTextView) this.headerView | |
.findViewById(R.id.checkmark); | |
headerCheck.setChecked(false); | |
boolean[] newSelection = new boolean[this.adapter.getCount()]; |
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
fibd n m = sum $ fibd' !! (n-1) | |
where fibd' = [[fibd'' i j | i <- [0..m]] | j <- [0..n]] | |
-- `fibd'' i j` is the number of rabbits which are `i` months old after `j` months since the first generation | |
fibd'' 0 0 = 1 | |
fibd'' _ 0 = 0 | |
fibd'' 0 j = sum . tail $ fibd' !! (j-1) | |
fibd'' i j = fibd' !! (j-1) !! (i-1) | |
main = do | |
print $ fibd n m |
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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="codeguru.thecubeserver.app.ChatFragment"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:text="@string/hello_blank_fragment"/> |
OlderNewer