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
tijasmine Unit Test Demo | |
* Have a working project | |
- Note that i created a utils.js file in the lib folder with my business logic methods | |
e.g. | |
exports.concatName = function(a,b) { | |
return a.substring(0,1).concat(b); | |
} |
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
Example of implementing search history synced across a user's multiple devices (like google maps) | |
See blog post here: | |
http://www.appcelerator.com/blog/2014/08/implementing-recent-history-in-your-appcelerator-apps/ | |
Excerpt from Blog: | |
Implementing Recent Search History in your Appcelerator apps |
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
{ | |
"routes": [ { | |
"path": "/", | |
"callback": "application#index" | |
}, { | |
"path": "/getData", | |
"method": "post", | |
"callback": "services#getData" | |
} ], | |
"filters": [ { |
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 Cloud = require('ti.cloud'); | |
function createUserACS(u,p,o){ | |
Ti.API.info("ACS: createUserACS(), u = "+u+", p="+p); | |
if(Titanium.Network.networkType == Titanium.Network.NETWORK_NONE){ | |
alert("No Network. Please try again later."); | |
return; | |
} | |
//Alloy.Globals.waitCursorStart(); |
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
<!DOCTYPE HTML> | |
<!--html manifest="cache.manifest"--> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Highstock Example</title> | |
<script src="jquery.min.js"></script> | |
<script src="highcharts.js"></script> | |
<script src="exporting.js"></script> |
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
// The contents of this file will be executed before any of | |
// your view controllers are ever executed, including the index. | |
// You have access to all functionality on the `Alloy` namespace. | |
// | |
// This is a great place to do any initialization for your app | |
// or create any global variables/functions that you'd like to | |
// make available throughout your app. You can easily make things | |
// accessible globally by attaching them to the `Alloy.Globals` | |
// object. For example: | |
// |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 Arrow = require('arrow'), | |
server = new Arrow(); | |
var Timers = require('./timers'); | |
// lifecycle examples | |
server.on('starting', function(){ | |
server.logger.debug('server is starting!'); | |
}); | |
server.on('started', 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
var Arrow = require('arrow'); | |
var ACS = require('acs-node'); | |
ACS.init(<ACS Key>); | |
var Alert = Arrow.API.extend({ | |
group: 'iotapis', | |
path: '/api/alert', | |
method: 'GET', | |
description: 'this is an api that shows how to implement an API', |
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 Arrow = require("arrow"); | |
var Model = Arrow.Model.reduce("appc.salesforce/Account","AccountDetail",{ | |
"fields": { | |
"Name": { | |
"type": "string", | |
"description": "Account Name", | |
"readonly": false, | |
"maxlength": 255, | |
"required": true, |
OlderNewer