Skip to content

Instantly share code, notes, and snippets.

[ERROR] Error loading: http://av.vimeo.com/62775/077/47509302.mp4?token=1314875606_5906d25ae0e3fb9705a5421dc41c00d6, Error: Error Domain=WebKitErrorDomain Code=204 "Plug-in handled load" UserInfo=0xaa2b900 {NSErrorFailingURLStringKey=http://av.vimeo.com/62775/077/47509302.mp4?token=1314875606_5906d25ae0e3fb9705a5421dc41c00d6, WebKitErrorMIMETypeKey=video/mp4, NSErrorFailingURLKey=http://av.vimeo.com/62775/077/47509302.mp4?token=1314875606_5906d25ae0e3fb9705a5421dc41c00d6, NSLocalizedDescription=Plug-in handled load}
@stereoket
stereoket / app.js
Created November 28, 2011 17:25
SQLite Version Test Titanium app
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
@stereoket
stereoket / app.js
Created November 28, 2011 17:28
SQLite Basic Test App
// OPEN / INSTALL DATABASE -- SAFE
var db = Ti.Database.install('/mydata/dynamicdata.sqlite', 'dynamicdata');
// RESULT SET OBJECT
var rs = db.execute('select * from tbl1');
alert('Rows in table:' + rs.rowCount);
while(rs.isValidRow()){
Ti.API.info(rs.field(0) + ':' + rs.field(1));
rs.next();
}
rs.close();
@stereoket
stereoket / app.js
Created November 28, 2011 18:12
SQLite Basic TRANSACTION Test App
// OPEN / INSTALL DATABASE -- SAFE
var db = Ti.Database.install('/mydata/dynamicdata.sqlite', 'dynamicdata');
// RESULT SET OBJECT
var rs = db.execute('select * from tbl1');
alert('Rows in table:' + rs.rowCount);
while(rs.isValidRow()){
Ti.API.info(rs.field(0) + ':' + rs.field(1));
rs.next();
}
rs.close();
@stereoket
stereoket / app.js
Created November 29, 2011 08:34
Barcamp Titanium Demo
var win = Ti.UI.createWindow({
backgroundColor:'white',
modal: true,
title:'BarCamp London #bcl9'
});
var anno = Ti.Map.createAnnotation({
latitude:51.528069,
pincolor:Titanium.Map.ANNOTATION_GREEN,
longitude:-0.102707,
@stereoket
stereoket / int.js
Created February 1, 2012 11:38
Integer label
var bigNumber = 324;
var label = Ti.UI.createLabel({
text: bigNumber,
left: 0,
height: 40,
font: {fontWeight: 'normal', fontSize: 22},
color: '#fff',
textAlign: 'center',
right: 0,
zIndex: 0
@stereoket
stereoket / app.js
Created February 14, 2012 14:56
Funny Faces Boydlee ch8 code
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#fff');
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title: 'Funny Faces',
backgroundColor: '#fff'
});
@stereoket
stereoket / app.js
Created March 26, 2012 17:39 — forked from aaronksaunders/app.js
Cocoafish + Appcelerator iOS Module Example Code - Login with Twitter, Create Account From Twitter
//
// blog.clearlyinnovative.com
// Aaron K. Saunders
// Clearly Innovative Inc
//
// @see https://github.com/aaronksaunders/Appcelerator-Cocoafish-Native-Module
//
var cocoafishMgr = require('com.ci.cocoafish');
Ti.API.info("module is => " + cocoafishMgr);
@stereoket
stereoket / push_notifications.js
Created March 27, 2012 00:30 — forked from yagitoshiro/push_notifications.js
apple push notification sample (Titanium Mobile)
//////////////////////push_notifications.js///////////////////////
var apns = function(){
var pref = require('preferences').preferences;
Titanium.Network.registerForPushNotifications({
types: [
Titanium.Network.NOTIFICATION_TYPE_BADGE,
Titanium.Network.NOTIFICATION_TYPE_ALERT
],
success:function(e)
@stereoket
stereoket / InfiniteScrollingTableView.js
Created April 10, 2012 22:52 — forked from dawsontoth/InfiniteScrollingTableView.js
Infinite loading table view for iOS and Android.
/**
* We're going to create an infinite loading table view. Whenever you get close to the bottom, we'll load more rows.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Create our UI elements.
*/
var table = Ti.UI.createTableView({ top: 0, right: 0, bottom: 0, left: 0 });