A graph which depicts historical and predicted data. Predicted data is represented by a dashed line, with a shaded area to indicate the error range.
This file contains hidden or 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.util.List; | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.BaseAdapter; | |
| /** | |
| * Adapter that is backed by an in memory List. |
This file contains hidden or 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
| /** | |
| * Generates a ddl statement to create a table and executes it | |
| * | |
| * @param db | |
| * @param tablename | |
| * @param columnToType - a mapping of column names to their SQL types in the table | |
| */ | |
| private void createTable(SQLiteDatabase db, String tablename, Map<String,String> columnToType){ | |
| StringBuilder builder = new StringBuilder(); | |
| builder.append("CREATE TABLE " + tablename +" ("); |
This file contains hidden or 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 com.couchbase.android.CouchbaseMobile; | |
| import com.couchbase.android.ICouchbaseDelegate; | |
| import android.app.Activity; | |
| import android.content.ServiceConnection; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.widget.Toast; | |
| public class Main extends Activity { |
This file contains hidden or 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.j256.ormlite.android; | |
| import java.sql.SQLException; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.database.CursorWrapper; | |
| import android.view.View; | |
| import android.widget.ResourceCursorAdapter; |
This file contains hidden or 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
| #from module ConnectionHandling | |
| def establish_connection(spec = ENV["DATABASE_URL"]) | |
| resolver = ConnectionAdapters::ConnectionSpecification::Resolver.new spec, configurations | |
| spec = resolver.spec | |
| unless respond_to?(spec.adapter_method) | |
| raise AdapterNotFound, "database configuration specifies nonexistent #{spec.config[:adapter]} adapter" | |
| end |
This file contains hidden or 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.File; | |
| import java.io.FileNotFoundException; | |
| import java.util.Arrays; | |
| import java.util.Scanner; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; | |
| /* | |
| * To change this template, choose Tools | Templates |
This file contains hidden or 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 ogr2ogr | |
| import string | |
| import sys | |
| def main(): | |
| #note: main is expecting sys.argv, where the first argument is the script name | |
| #so, the argument indices in the array need to be offset by 1 | |
| ogr2ogr.main(["","-f", "KML", "out.kml", "data/san_andres_y_providencia_administrative.shp"]) |
This file contains hidden or 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
| gem 'pg' | |
| group :development do | |
| gem 'ruby-debug' | |
| end | |
| gem 'rake', '~> 0.8.7' | |
| gem 'devise' | |
| gem 'oa-oauth', :require => 'omniauth/oauth' | |
| gem 'omniauth' | |
| gem 'haml' | |
| gem 'dynamic_form' |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Animated Sparkline using SVG Path and d3.js</title> | |
| <script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
| <style> | |
| /* tell the SVG path to be a thin blue line without any area fill */ | |
| path { | |
| stroke: steelblue; | |
| stroke-width: 1; | |
| fill: none; |
OlderNewer