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
4 + 3 | |
4.0 - 3 | |
5 / 3 | |
4 and 5 |
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
AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); | |
asyncHttpClient.prepareGet("http://hsasolutions.cloudapp.net/OptiCompraWS/OptiC/B/Opticompra.asmx/EntregaPrecios?pIdMuni=0&id_prod=339&pos_lat=0&pos_lon=0&Login_app=0&Password_app=0&pVers=0&pRadio=0").execute(new AsyncCompletionHandler(){ | |
@Override | |
public Response onCompleted(Response response) throws Exception{ | |
// Do something with the Response | |
// ... ` | |
return response; | |
} |
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 onConfigurationChanged(Configuration newConfig) { | |
super.onConfigurationChanged(newConfig); | |
if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { | |
setContentView(R.layout.activity_splash); | |
} | |
else if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { | |
setContentView(R.layout.activity_splash); |
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
static NSString *identifier = @"RoutePinAnnotation"; | |
MKPinAnnotationView* pinView = [[MKPinAnnotationView alloc] | |
initWithAnnotation:annotation reuseIdentifier:identifier] ; | |
pinView.animatesDrop=YES; | |
pinView.canShowCallout=YES; | |
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; | |
[rightButton setTitle:annotation.title forState:UIControlStateNormal]; | |
[rightButton addTarget:self |
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
### Keybase proof | |
I hereby claim: | |
* I am ajamaica on github. | |
* I am ajamaica (https://keybase.io/ajamaica) on keybase. | |
* I have a public key whose fingerprint is 837F 8E4A E1F3 EE73 C607 5CDE 2457 0258 D560 8A08 | |
To claim this, I am signing this object: |
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
HTTPAsync().execute("http://www.copalive.com/api/json/match/live/"); | |
private class HTTPAsync extends AsyncTask<String, Void, String> { | |
InputStream is = null; | |
String json = ""; | |
@Override | |
protected String doInBackground(String... urls) { | |
// Making HTTP 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
def gql_json_parser(query_obj): | |
result = [] | |
for entry in query_obj: | |
result.append(dict([(p, unescape(unicode(getattr(entry, p)))) for p in entry.properties()])) | |
return result |
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 mx.com.estrategiatec.TDU.Adapters; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
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 mx.com.estrategiatec.TDU; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.graphics.PixelFormat; | |
import android.os.Bundle; | |
import android.preference.PreferenceManager; |
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
UIInterpolatingMotionEffect *mx = [[UIInterpolatingMotionEffect alloc] | |
initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; | |
mx.maximumRelativeValue = @-39.0; | |
mx.minimumRelativeValue = @39.0; | |
UIInterpolatingMotionEffect *mx2 = [[UIInterpolatingMotionEffect alloc] | |
initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; | |
mx2.maximumRelativeValue = @-39.0; | |
mx2.minimumRelativeValue = @39.0; | |