Skip to content

Instantly share code, notes, and snippets.

Jason Whitehorn jwhitehorn

Block or report user

Report or block jwhitehorn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View btle.c
#include <stdio.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <util/delay.h>
#define PIN_CE 1 //Output
#define PIN_nCS 2 //Output
View conversion_form.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android=""
android:orientation="vertical" >
View gist:8964220
@CalatravaPage(name = "conversionForm")
public class ConversionForm extends WebViewActivity
View gist:8964230
@CalatravaPage(name = "conversionForm")
public class ConversionForm extends com.calatrava.bridge.RegisteredActivity
View gist:8964245
public String getFieldValue(String field){
return "";
public void render(final String json){
View gist:8964780
public void onCreate(Bundle savedInstanceState) {
View gist:8964793
- (id)valueForField:(NSString *)field
if ([field isEqualToString:@"in_currency"]) {
return [[_inCurrencyData objectAtIndex:[inCurrencyPicker selectedRowInComponent:0]] objectForKey:@"code"];
} else if ([field isEqualToString:@"out_currency"]) {
return [[_outCurrencyData objectAtIndex:[outCurrencyPicker selectedRowInComponent:0]] objectForKey:@"code"];
} else if ([field isEqualToString:@"in_amount"]) {
return [inAmount text];
return nil;
View gist:8964802
public String getFieldValue(String field){
return "USD";
}else if(field.equalsIgnoreCase("out_currency")){
return "AUD";
}else if(field.equalsIgnoreCase("in_amount")){
return ((EditText) findViewById(;
View gist:8964808
public void convert(View v) {
this.triggerEvent("convert", new String[] {});
View gist:8964813
- (void)render:(NSDictionary *)jsViewObject
for (NSString *key in jsViewObject)
id value = [jsViewObject objectForKey:key];
if ([key isEqualToString:@"inCurrencies"]) {
[self renderCurrencyPicker:inCurrencyPicker usingData:value to:_inCurrencyData];
} else if ([key isEqualToString:@"outCurrencies"]) {
[self renderCurrencyPicker:outCurrencyPicker usingData:value to:_outCurrencyData];
} else if ([key isEqualToString:@"in_amount"]) {
You can’t perform that action at this time.