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
var fs = require("fs"); | |
var system = require('system'); | |
var page = require("webpage").create(); | |
var destinationFolder = system.args[1]; | |
var iconSource = system.args[2]; | |
var splashSource = system.args[3]; | |
function generate(url, w, h, fn, callback) { |
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
var min = -5; | |
var max = 10; | |
var dataset = []; | |
for (var i = 0; i < 60; i++) { | |
var newNumber = Math.random() * (max-min) + min; | |
dataset.push(newNumber); | |
} |
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 RGBAtoRGB(r, g, b, a, r2,g2,b2){ | |
var r3 = Math.round(((1 - a) * r2) + (a * r)) | |
var g3 = Math.round(((1 - a) * g2) + (a * g)) | |
var b3 = Math.round(((1 - a) * b2) + (a * b)) | |
return "rgb("+r3+","+g3+","+b3+")"; | |
} | |
$("#result").html(RGBAtoRGB(225,110,0,0.5,255,255,255)); | |
|
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
#ifdef CORDOVA_FRAMEWORK | |
#import <Cordova/CDVViewController.h> | |
#else | |
#import "CDVViewController.h" | |
#endif | |
@interface MainViewController : CDVViewController | |
@property (nonatomic, readwrite, retain) UIImageView *splashView; |
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
if (document.location.protocol == "file:") { | |
// file protocol indicates phonegap | |
document.addEventListener("deviceready", | |
function() { $(initInternal);} | |
, false); | |
} | |
else { | |
// no phonegap, start initialisation immediately | |
$(initInternal); | |
} |
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
.ui-dialog-background { | |
opacity: 0.5; | |
display: block !important; | |
-webkit-transition: opacity 0.5s ease-in; | |
} | |
.ui-dialog-background.pop.in { | |
opacity: 1; | |
-webkit-transition: opacity 0.5s ease-in; | |
} |