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 { Component } from '@angular/core'; | |
import { Platform } from 'ionic-angular'; | |
import { StatusBar } from '@ionic-native/status-bar'; | |
import { SplashScreen } from '@ionic-native/splash-screen'; | |
import {Observable} from 'rxjs/Rx'; | |
import { Subject } from "rxjs/Rx"; | |
import { HomePage } from '../pages/home/home'; | |
@Component({ | |
templateUrl: 'app.html' |
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
angular.module('MyModule', []) | |
// DB wrapper | |
.factory('rsDb', function($q, DB_DEFINITION) { | |
var self = this; | |
self.db = null; | |
self.init = function() { | |
self.db = window.openDatabase(DB_DEFINITION.name, '1.0', 'database', -1); | |
var promises = []; |
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
/*global L, LocalFileSystem, RhinoLib, async, FileTransfer, Connection */ | |
var cacheMode = { | |
PRE_CACHE: 0x1, | |
CACHE_IN_BOUNDS: 0x2, | |
CACHE_OUTSIDE_BOUNDS: 0x4 | |
}; | |
L.TileLayer.CachedTiles = L.TileLayer.extend({ |
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 setObjectOptions = function(element, args){ | |
var targetObj = allObjects[element]; | |
for (var prop in args) { | |
// important check that this is objects own property | |
// not from prototype prop inherited | |
if(args.hasOwnProperty(prop)){ | |
targetObj[prop] = args[prop]; | |
} | |
} |
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 sys | |
import os | |
import time | |
import io | |
import scipy.misc | |
import pprint | |
from PIL import Image | |
from skimage import data | |
from skimage.io import imread |
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 http = require('http'); | |
var fs = require('fs'); | |
http.createServer(function(request,response){ | |
response.writeHead(200); | |
var destinationFile = fs.createWriteStream(fileName); | |
request.pipe(destinationFile); | |
var fileSize = request.headers['content-length']; |
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
//This doesn't work. The test can't find the service | |
angular.module('RhinoLib').service('sqLite', function( $q ) { | |
this.initPromise = null; | |
this.oDb = null; | |
} | |
//This works perfectly. I just renoved the $q parameter for the service | |
angular.module('RhinoLib').service('sqLite', function() { |
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
_loadTile: function (tile, tilePoint) { | |
//try{ | |
var that = this; | |
tile._layer = this; | |
tile.onload = this._tileOnLoad; | |
tile.onerror = this._tileOnError; | |
tilePoint.z = this._getZoomForUrl(); |
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
ModFormCommon.PhotoSuccess = function (imageURI) { | |
var fsSuccess = function (fileEntry) { | |
//alert("got image file entry: " + fileEntry.fullPath); | |
var gotFileSystem = function (fileSystem) { | |
fileSystem.root.getDirectory( | |
ModPhoto.FileStore, | |
{ create: true }, |
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
if (typeof navigator.notification === 'undefined') { | |
navigator.notification = { | |
confirm: function (message, confirmCallback, title, buttonLabels) { | |
setTimeout(function (){ | |
if (window.confirm(message)) { | |
confirmCallback(1); | |
} | |
else { | |
confirmCallback(2); |
NewerOlder