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
/** | |
* starts google maps w/ lat lon | |
*/ | |
public static void showOnMap(Context c, double lat, double lng, String name) { | |
String geoUri = "geo:"+lat+","+lng+"?q="+lat+","+lng+"("+name+")"; | |
Uri geo = Uri.parse(geoUri); | |
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.setData(geo); | |
intent.setClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity"); | |
if (intent.resolveActivity(c.getPackageManager()) != null) { |
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
for f in *.tif; do convert $f $(basename $f .tif).png;done |
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
for f in *.png; do convert $f -resize 400x210 $(basename $f .png).png;done |
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>=16) { // this is only for Jelly Bean and up | |
LinearLayout container = (LinearLayout) getView().findViewById(R.id.container); | |
LayoutTransition transition = container.getLayoutTransition(); | |
transition.enableTransitionType(LayoutTransition.CHANGING); | |
} |
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.whateverpackage.util; | |
import java.io.UnsupportedEncodingException; | |
import java.net.URISyntaxException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; |
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
import java.io.UnsupportedEncodingException; | |
import java.util.Map; | |
import org.simpleframework.xml.Serializer; | |
import org.simpleframework.xml.core.Persister; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; |
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
#!/usr/bin/python | |
from xml.dom.minidom import parse | |
dom1 = parse("AndroidManifest.xml") | |
oldVersion = dom1.documentElement.getAttribute("android:versionName") | |
oldVersionCode = dom1.documentElement.getAttribute("android:versionCode") | |
versionNumbers = oldVersion.split('.') | |
versionNumbers[-1] = unicode(int(versionNumbers[-1]) + 1) | |
dom1.documentElement.setAttribute("android:versionName", u'.'.join(versionNumbers)) |
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
^(?!.*(dalvik)).*$ |
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
/** | |
* Copyright 2013 Ognyan Bankov | |
* modified by Michal Ursiny for purposes of Fuerte Eshop adding headers and body support | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.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
String url = "http://www.example.com"; | |
Intent i = new Intent(Intent.ACTION_VIEW); | |
i.setData(Uri.parse(url)); | |
startActivity(i); |
OlderNewer