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
POST https://www.example.com/api/v1/login | |
{"username":"chuck@example.com", "passoword":"Kronos"} | |
{"user_id": 1234, "auth_token":"Y2h1Y2tAZXhhbXBsZS5jb20="} | |
GET https://www.example.com/api/v1/profile/1234567 | |
{"name":"Chuck Greb", "avatar":"http://www.example.com/images/dh3d67kfb.jpg", "email":"chuck@example.com"} |
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
function drawChart() { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'Topping'); | |
data.addColumn('number', 'Slices'); | |
data.addRows([ | |
['Mushrooms', %d], | |
['Onions', %d], | |
['Olives', %d], | |
['Pepperoni', %d] | |
]); |
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
private void loadChart() { | |
int mushrooms = Integer.parseInt(mushroomsField.getText().toString()); | |
int onions = Integer.parseInt(onionsField.getText().toString()); | |
int olives = Integer.parseInt(olivesField.getText().toString()); | |
int pepperoni = Integer.parseInt(pepperoniField.getText().toString()); | |
String content = null; | |
try { | |
AssetManager assetManager = getAssets(); | |
InputStream in = assetManager.open("hello-pizza-chart.html"); |
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.example; | |
import com.example.shadows.ShadowCrashlytics; | |
import org.junit.runners.model.InitializationError; | |
import org.robolectric.RobolectricTestRunner; | |
import org.robolectric.bytecode.ClassInfo; | |
import org.robolectric.bytecode.Setup; | |
import org.robolectric.bytecode.ShadowMap; |
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.example.shadows; | |
import android.content.Context; | |
import com.crashlytics.android.Crashlytics; | |
import org.robolectric.annotation.Implementation; | |
import org.robolectric.annotation.Implements; | |
/** |
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
04-30 16:09:46.174 22042-22049/com.mapzen E/dalvikvm﹕ Break split failed | |
04-30 16:09:46.174 22042-22049/com.mapzen E/dalvikvm﹕ VM aborting | |
04-30 16:09:46.174 22042-22049/com.mapzen A/libc﹕ Fatal signal 6 (SIGABRT) at 0x0000561a (code=-6), thread 22049 (Compiler) | |
04-30 16:09:46.234 172-172/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
04-30 16:09:46.234 172-172/? I/DEBUG﹕ Build fingerprint: 'google/occam/mako:4.4.2/KOT49H/937116:user/release-keys' | |
04-30 16:09:46.234 172-172/? I/DEBUG﹕ Revision: '11' | |
04-30 16:09:46.234 172-172/? I/DEBUG﹕ pid: 22042, tid: 22049, name: Compiler >>> com.mapzen <<< | |
04-30 16:09:46.234 172-172/? I/DEBUG﹕ signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- | |
04-30 16:09:46.354 172-172/? I/DEBUG﹕ r0 00000000 r1 00005621 r2 00000006 r3 00000000 | |
04-30 16:09:46.354 172-172/? I/DEBUG﹕ r4 00000006 r5 00000000 r6 00005621 r7 0000010c |
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
<com.mapbox.mapboxsdk.views.MapView | |
android:id="@+id/mapview" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
mapbox:mapid="Your MapBox mapid" /> |
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
MapView mapView = new MapView(this, "examples.map-vyofok3q"); | |
this.setContentView(mapView); |
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
<org.oscim.android.MapView | |
android:id="@+id/map" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> |
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
private void onLocationClientConnected() { | |
Location lastLocation = locationClient.getLastLocation(); | |
if (lastLocation != null) { | |
// do stuff | |
} | |
LocationRequest locationRequest = LocationRequest.create(); | |
locationRequest.setInterval(5000); | |
locationClient.requestLocationUpdates(locationRequest, | |
new LocationListener() { | |
@Override public void onLocationChanged(Location location) { |