(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
var win = Titanium.UI.createWindow({ | |
title : 'test' | |
}); | |
var view1 = Ti.UI.createView({ | |
backgroundColor:'red' | |
}); | |
var l1 = Ti.UI.createLabel({ | |
text:'View 1', | |
color:'#fff', |
save_button.addEventListener('click', ()-> | |
if Ti.Filesystem.isExternalStoragePresent | |
save_image = Ti.Filesystem.getFile(path).read() | |
new_path = Titanium.Filesystem.externalStorageDirectory + Date.now().toString() + ".png" | |
f = Ti.Filesystem.getFile(new_path) | |
result = f.write(save_image) | |
unless result | |
return null |
Alloy.Globals.settings = {}; // Create Empty Object. | |
/* Settings Getter - Can also just access Alloy.Globals.settings[key] */ | |
Alloy.Globals.settings.get = function(key) { | |
return Alloy.Globals.settings[key] || null; | |
} | |
/* Settings Saver */ | |
Alloy.Globals.settings.set = function(key,value) { | |
var settings = Alloy.createCollection('settings'); |
$.index.open(); | |
function doClick(e) { | |
Ti.API.info(JSON.stringify(e)); | |
} | |
var library = Alloy.Collections.book; | |
library.fetch(); | |
Ti.API.info(JSON.stringify(library)); |
Alloy.Globals.transformFunction = function(model) { | |
// code for your transform function | |
} |
// add all items to collection | |
Alloy.Collections.Fugitive.reset([{ | |
"name" : "Jeff Haynie" | |
}, { | |
"name" : "Nolan Wright" | |
}, { | |
"name" : "Don Thorp" | |
}, { | |
"name" : "Marshall Culpepper" | |
}, { |
$.child_window.open(); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
window.onload = function() { | |
var startPos; | |
var startPosLat; | |
var startPosLong; | |
var distance; | |
if (navigator.geolocation) { | |
startPosLat = 44.95716993150707; | |
startPosLong = -93.28439280496818; |
# use Windows repair disc to run Startup Repair | |
# update grub config file for EFI system | |
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg # Fedora | |
sudo update-grub # Ubuntu | |
# if grub doesn't find Windows Boot Manager | |
# find EFI partition (could be on sdb, sdc, etc if you have more than one hard drive) | |
gdisk -l /dev/sda | |