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 following result from Parse.com query is great, has createdAt which is exactly what I want. Only thing is I want to cache this result on the device. If I JSON.stringify it, all I get is the attributes. | |
( | |
{ | |
"_dirty" = { | |
}; | |
"_escapedAttributes" = { | |
}; | |
"_handleSetOp" = "<KrollCallback: 0xff4b850>"; | |
"_hashedJSON" = { | |
}; |
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 sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
var UrbanAirship = require('ti.urbanairship'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
UrbanAirship.options = { | |
APP_STORE_OR_AD_HOC_BUILD: false, | |
PRODUCTION_APP_KEY: 'xxxx', | |
PRODUCTION_APP_SECRET: 'xxxx', |
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
// console dump of sample returned object | |
I/TiAPI ( 244): (kroll$4: app://app.js) [797,3312] Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): weatherData => Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): forecastInfo => Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): city => 'Bydgoszcz, Kuyavian-Pomeranian Voivodeship', |
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
// Path menu for Titanium | |
// Tony Lukasavage - @tonylukasavage | |
// | |
// Notes: | |
// - Transforms must be declared outside the animation to | |
// work on Android. (http://jira.appcelerator.org/browse/TIMOB-5796) | |
// There MUST be more than 1 icon or the math breaks | |
var DEFAULTS = { | |
ICON_IMAGE: '/images/star.png', |
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
<html> | |
<head xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<title>Cocoafish test</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://sdk.cocoafish.com/js/cocoafish-1.1.min.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
var sdk = new Cocoafish('API'); // app key | |
var data = { |
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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<link href="bootstrap/css/bootstrap.css" rel="stylesheet"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>New Appcelerator Cloud Services Project</title> | |
<script type="text/javascript"> | |
function onBodyLoad() { |
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 sex = (male == 1) ? 'male' : 'female'; | |
var data = { | |
email: email.value, | |
first_name: global.user_names[0], | |
last_name: global.user_names[1], | |
password: password.value, | |
password_confirmation: password.value, | |
custom_fields: '{ "dob": "'+ dob.value +'", "sex": "'+ sex +'" }' // REMOVE THIS LINE IT ALL WORKS... HAVE HAD MULTIPLE PEDRMEATATIONS, SO THIS WAY MAY NOT BE THE ONLY CAUSE OF THIS NOT WORKING, JUST THE LAST ONE I TRIED. | |
}; | |
sdk.sendRequest('users/create.json', 'POST', data, false, callback); |
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
(FILE LOCATION iphone/Classes/PlausibleDatabase/PLSqliteDatabase.h) | |
/* | |
* Copyright (c) 2008 Plausible Labs Cooperative, Inc. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
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 file located in /Library/Application Support/Titanium/mobilesdk/osx/{version_number} | |
// add the following methods to GeolocationModule.mm | |
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region | |
{ | |
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:NUMBOOL(YES),@"success",[NSDictionary dictionaryWithObjectsAndKeys:NUMDOUBLE(region.center.latitude),@"lat",NUMDOUBLE(region.center.longitude),@"lng",NUMDOUBLE(region.radius),@"radius",region.identifier,@"identifier",nil],@"region",nil]; | |
if ([self _hasListeners:@"enteredRegion"]) | |
{ | |
[self fireEvent:@"enteredRegion" withObject:event]; |
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
(function() { | |
HeritageApp.ui.createMapListWindow = function () { | |
var mapListWindow = Titanium.UI.createWindow({ | |
id: 'mapListWindow', | |
title: 'Heritage', | |
backgroundColor: '#efece9', | |
barImage: HeritageApp.ui.barImage, | |
navBarHidden: false, | |
fullscreen: false | |
}); |