I hereby claim:
- I am dannyroa on github.
- I am dannyroa (https://keybase.io/dannyroa) on keybase.
- I have a public key whose fingerprint is C228 DA08 572C ED3A C4EE A34B 5F14 20AD B36E B3CE
To claim this, I am signing this object:
import android.content.res.Resources | |
import androidx.annotation.PluralsRes | |
import androidx.annotation.StringRes | |
// from https://hannesdorfmann.com/abstraction-text-resource/ | |
sealed class TextResource { | |
companion object { | |
// Just needed for static method factory so that we can keep concrete implementations file private | |
fun fromText(text: String): TextResource = SimpleTextResource(text) |
[{"name" : "Washington, DC", | |
"country" : "USA"}, | |
{"name" : "Berlin", | |
"country" : "Germany"}, | |
{"name" : "Frankfurt", | |
"country" : "Germany"}, | |
{"name" : "London", | |
"country" : "United Kingdom"}, | |
{"name" : "Shanghai", | |
"country" : "China"}, |
I hereby claim:
To claim this, I am signing this object:
@app.route('/hello/') | |
@app.route('/hello/<name>') | |
def hello(name=None): | |
if not name: | |
return "Please type a name" | |
#open shelve | |
filename = 'names.db' | |
d = shelve.open(filename) |
E/AndroidRuntime(21307): java.lang.RuntimeException: Unable to start activity ComponentInfo{uk.co.senab.actionbarpulltorefresh.sample/uk.co.senab.actionbarpulltorefresh.sample.ListViewActivity}: java.lang.RuntimeException: Unknown animation name: LinearLayout | |
E/AndroidRuntime(21307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) | |
E/AndroidRuntime(21307): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) | |
E/AndroidRuntime(21307): at android.app.ActivityThread.access$600(ActivityThread.java:141) | |
E/AndroidRuntime(21307): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) | |
E/AndroidRuntime(21307): at android.os.Handler.dispatchMessage(Handler.java:99) | |
E/AndroidRuntime(21307): at android.os.Looper.loop(Looper.java:137) | |
E/AndroidRuntime(21307): at android.app.ActivityThread.main(ActivityThread.java:5041) |
def get_access_token(request): | |
token = request.GET.get('token', None) | |
if not token: | |
return HttpResponse('error') | |
users = GlassUser.Query.all().eq(token=token) |
import android.app.Activity; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.os.Environment; | |
import android.provider.MediaStore; | |
import android.util.Log; |
def get_val(): | |
words = { 1 : 'one', 2 : 'two', 3 : 'three', 4 : 'four', 5 : 'five', 6 : 'six', 7 : 'seven' | |
, 8 : 'eight', 9 : 'nine', 10 : 'ten', 11 : 'eleven', 12 : 'twelve', 13 : 'thirteen' | |
, 14 : 'fourteen', 15 : 'fifteen', 16 : 'sixteen', 17 : 'seventeen', 18 : 'eighteen' | |
, 19 : 'nineteen', 20 : 'twenty', 30 : 'thirty', 40 : 'forty', 50 : 'fifty', 60 : 'sixty' | |
, 70 : 'seventy', 80 : 'eighty', 90 : 'ninety', 100 : 'hundred', 1000 : 'thousand' } |
# Sorting a List using Mergesort in Python | |
# 2011-05-16 | |
def mergeSort(toSort): | |
if len(toSort) <= 1: | |
return toSort | |
mIndex = len(toSort) / 2 | |
left = mergeSort(toSort[:mIndex]) | |
right = mergeSort(toSort[mIndex:]) |
class FacebookBackend: | |
""" | |
Authenticates against django.contrib.auth.models.User. | |
""" | |
@ staticmethod | |
def authenticate(request): | |
if 'access_token' in request.session: |