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 render(final String json){ | |
try{ | |
JSONObject jsonObj = new JSONObject(json); | |
Iterator<?> keys = jsonObj.keys(); | |
while(keys.hasNext()){ | |
String key = (String)keys.next(); | |
if(key.equalsIgnoreCase("inCurrencies")){ | |
//TODO |
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 render(final String json){ | |
try{ | |
JSONObject jsonObj = new JSONObject(json); | |
Iterator<?> keys = jsonObj.keys(); | |
while(keys.hasNext()){ | |
final String key = (String)keys.next(); | |
final String value = jsonObj.getString(key); | |
this.runOnUiThread(new Runnable() { |
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.sample; | |
import com.calatrava.CalatravaPage; | |
import com.calatrava.shell.WebViewActivity; | |
import android.os.Bundle; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
import android.view.View; |
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
lineReader = require 'line-reader' | |
words = {} | |
abbreviation = ['a', 'b', 'c'] | |
wordsForLetter = (thusFar, index) -> | |
letter = abbreviation[index] | |
for word in words[letter] | |
thusFar[index] = word | |
if index == abbreviation.length-1 |
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
{ | |
"animals": [{ | |
"id": "169853e4-882c-4a22-b86f-aa9671fed670", | |
"name": "Moose", | |
"color": "brown" | |
}, { | |
"id": "d29ab6ce-a15f-41b2-987c-ca40221dcb92", | |
"name": "Fish", | |
"color": "yellow" | |
}] |
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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
worker_rlimit_nofile 8192; | |
events { | |
worker_connections 4096; | |
} | |
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
create table deps_saved_ddl | |
( | |
deps_id serial primary key, | |
deps_view_schema varchar(255), | |
deps_view_name varchar(255), | |
deps_ddl_to_run text | |
); | |
create or replace function deps_save_and_drop_dependencies(p_view_schema varchar, p_view_name varchar) returns void as | |
$$ |
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
var dbOpen = require('./database.js'); | |
var async = require('async'); | |
var tmp = require('tmp'); | |
var fs = require('fs-extra'); | |
var sqlite = require('sqlite3').verbose(); | |
var tmpobj = tmp.fileSync(); //use a new, empty, temporary file | |
var sqliteDb = new sqlite.Database(tmpobj.name); | |
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 "AppDelegate.h" | |
#import "Sync.h" | |
@interface AppDelegate () | |
@end | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
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
function(next){ | |
sqliteDb.run("create table campgrounds (id integer, name text, latitude real, longitude real, rating real, address text, city text, state text, zip_code text)", next); | |
}, | |
function(next){ | |
sqliteDb.run("create table campground_photos (id integer, photo_url text, campground_id integer)", next); | |
}, | |
function(next){ | |
sqliteDb.run("create table campground_reviews (id integer, headline text, body text, rating text, campground_id integer)", next); | |
}, |