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
# Template rendering in JS | |
# Combines John Resig's simple js templates with Sproutcore's content binding concept. | |
# Define your templates in the templates array (or rewrite it to work however you like!) | |
# | |
# To render a template to an html string, call: | |
# render('example', dataObject) | |
# OR | |
# render('example', arrayOfDataObjects) | |
# OR if you have template that isn't bound to a data object: | |
# render('static_example') |
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
Hi | |
I hope this helps you all get started with phonegap and sqlite in your | |
application | |
Dean-O | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> |
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
#!/bin/bash | |
## uploading to google | |
## rev: 22 Aug 2012 16:07 | |
det=`date +%F` | |
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1" | |
username="[email protected]" | |
password="password" | |
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE |
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
authRouteProvider.$inject = ['$routeProvider']; | |
function authRouteProvider ($routeProvider) { | |
/** | |
* Creates a controller bound to the route, or wraps the controller in param | |
* so the authentication check is run before the original controller is executed | |
* @param currentController | |
* @return {Function} The wrapper controller | |
*/ | |
function redirectCtrlFactory (currentController) { | |
_ctrl.$inject = ['currentUser__', 'userRole__', '$location']; |
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
/* | |
I wasn't happy with PhoneGap's Storage API and made it cleaner (in my eyes anyway) | |
Example: | |
db.query("someTable", ['id', 'column1', 'column2'], false, function(tx, results){ .. }); | |
db.query("someTable", ['*'], {'column1':'val', 'column2':'val'}, function(tx, results){ .. }); | |
db.save("someTable", IterableObject, function(){ ... }); | |
Doing more testing and validation later, but getting it out there now. :) | |
*/ |
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
Services.factory("LawnchairFactory", function($window, $log, $parse) { | |
return function(name, config) { | |
var collection = {}; | |
var array = []; | |
var isArray = config && config.isArray; | |
var idGetter = $parse((config && config.entryKey) ? config.entryKey : "id"); | |
var transformSave = (config && config.transformSave) ? config.transformSave : angular.identity; | |
var transformLoad = (config && config.transformLoad) ? config.transformLoad : angular.identity; | |
function getEntryId(entry){ |
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
function WSTestCtrl($scope, ws) { | |
$scope.method = 'ping' | |
$scope.params = '[]' | |
$scope.reply = 'None yet.' | |
$scope.reply_class = 'info' | |
$scope.go = function(){ | |
ws.call($scope.method, JSON.parse($scope.params)).then(function(d){ | |
$scope.reply = JSON.stringify(d) |
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
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
$scope.$on('authLoaded', function() { | |
$scope.isExpert($scope.main.serieId); | |
$scope.isMember($scope.main.serieId); | |
}); | |
$scope.loadAuth = function() { | |
Auth.load().success(function(data) { | |
$scope.main.user = data.user; | |
$scope.$broadcast("authLoaded"); |
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
// this is snipped inside the angular controller, which got geo positions after loading data from a REST source ... | |
for (var i=0; i<list.length; i++) | |
{ | |
var opts = {"title": list[i].title}; | |
var marker={}; | |
if (list[i].latitude && list[i].longitude ) | |
{ | |
// this is not a google marker, just save pos/title in an object | |
marker = {lat: list[i].latitude, | |
lon: list[i].longitude, |
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
In this document, I outline the tasks required for storing and | |
presenting the Ethereum block chain and Web-based Ethereum Đapps in | |
ipfs. Currently, ipfs is very good at locating and delivering content | |
using a global, consistent address space and it has a very well designed | |
and implemented http gateway. However, Ethereum's use cases require | |
additional capabilities that ipfs currently does not provide. | |
Redundancy and persistency |
OlderNewer