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 | |
echo copying sqlite db file named $2 from package $1 to folder /sdcard/tempDB | |
adb shell "run-as $1 chmod 777 /data/data/$1/databases/$2" | |
adb shell "mkdir -p /sdcard/tempDB" | |
adb shell "cp -r /data/data/$1/databases/$2 /sdcard/tempDB/." |
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.arjunalabs.readcommit.utils; | |
import java.lang.reflect.Type; | |
import retrofit.converter.ConversionException; | |
import retrofit.converter.Converter; | |
import retrofit.mime.TypedInput; | |
import retrofit.mime.TypedOutput; | |
/** |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>NSHighResolutionCapable</key> | |
<true/> | |
</dict> | |
</plist> |
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
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); | |
getWindow().setStatusBarColor(getResources().getColor(R.color.some_color)); | |
} |
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
TextPaint tp = new TextPaint(); | |
tp.setTypeface(robotoLight); | |
tp.setColor(Color.WHITE); | |
tp.setTextSize(titleTextSize); | |
tp.setAntiAlias(true); | |
// split line | |
StaticLayout staticLayout = new StaticLayout(titleText, tp, | |
canvas.getWidth(), Layout.Alignment.ALIGN_CENTER, 1, 0, false); | |
int yPos = (height / 2) - (staticLayout.getHeight() / 2); |
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 kulinr | |
import ( | |
"net/http" | |
"encoding/json" | |
"strconv" | |
) | |
type Spot struct { | |
Spot_id string `json:"spot_id"` |
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 fotokecil | |
import ( | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"github.com/kurrik/oauth1a" | |
"io" | |
"log" | |
"net/http" |
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
final int nFirst = listView.getFirstVisiblePosition(); | |
final int nLast = listView.getLastVisiblePosition(); | |
for (int position = nFirst; position <= nLast; ++position) { | |
View itemView = listView.getChildAt(position - nFirst); | |
// modified here | |
} |
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
<resources> | |
<dimen name="text_xsmall">8sp</dimen> | |
<dimen name="text_smaller">10sp</dimen> | |
<dimen name="text_small">12sp</dimen> | |
<dimen name="text_medium">14sp</dimen> | |
<dimen name="text_large">16sp</dimen> | |
<dimen name="text_larger">18sp</dimen> | |
<dimen name="text_xlarge">20sp</dimen> | |
<dimen name="text_xxlarge">22sp</dimen> |
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=$1 | |
db_name=$2 | |
adb shell "run-as $package cat databases/$db_name > /sdcard/$db_name" | |
adb pull /sdcard/$db_name | |
open $db_name |