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 win = Ti.UI.createWindow({backgroundColor: '#FFFFFF', tabBarHidden:true, title: '素敵な右側'}); | |
var detailNav = Ti.UI.iOS.createNavigationWindow({window:win}); | |
var masterWindow = Ti.UI.createWindow({backgroundColor:'#FFFFFF', tabBarHidden:true, title:'ナイス左側'}); | |
var rows = []; | |
for( var i = 0; i < 5; i++ ){ | |
rows.push(Ti.UI.createTableViewRow({ | |
title: "title " + (i+1), | |
hasChild: true | |
})); |
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
#app/models/concerns/loopback.rb | |
module Loopback | |
extend ActiveSupport::Concern | |
included do | |
class << self | |
def element_path(id, prefix_options = {}, query_options = nil) | |
prefix_options, query_options = split_options(prefix_options) if query_options.nil? | |
"#{prefix(prefix_options)}/#{id}#{query_string(query_options)}" | |
end |
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
if(Ti.Platform.osname == 'android'){ | |
var MapModule = require('ti.map'); | |
var rc = MapModule.isGooglePlayServicesAvailable(); | |
if(rc != MapModule.SUCCESS){ | |
var dialog = Ti.UI.createAlertDialog({ | |
title: 'ご利用の前に', | |
message: '本アプリを快適にご利用頂くために必要なアプリがあります。インストールしますか?', | |
buttonNames: ['インストールする', '今回はキャンセルする'] | |
}); | |
dialog.addEventListener('click', function(e){ |
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
# '60s | |
1960 Joan Baez | |
1961 Judy Collins | |
1962 Peter, Paul and Mary | |
1962 Sylvie Vartan | |
1963 Elis Regina |
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
private double deg2rad(double deg) { | |
return (deg * Math.PI / 180.0); | |
} | |
private double rad2deg(double rad) { | |
return (rad * 180.0 / Math.PI); | |
} | |
@Kroll.method | |
public Double calcDistance(double lat1, double lon1, double lat2, double lon2, String unit){ | |
double theta = lon1 - lon2; |
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
0 CoreFoundation 0x0234457c __exceptionPreprocess + 156 | |
1 libobjc.A.dylib 0x02498313 objc_exception_throw + 44 | |
2 CoreFoundation 0x0233a1bc -[__NSArrayI objectAtIndex:] + 236 | |
3 MyApp 0x0010719b -[InnerScrollView viewForZoomingInScrollView:] + 66 | |
4 UIKit 0x008c75a0 -[UIScrollView _getDelegateZoomView] + 117 | |
5 UIKit 0x008c9d75 -[UIScrollView _centerContentIfNecessary] + 36 | |
6 UIKit 0x008c8aea -[UIScrollView layoutSubviews] + 72 | |
7 QuartzCore 0x019e8c6a -[CALayer layoutSublayers] + 181 | |
8 QuartzCore 0x019eafec CALayerLayoutIfNeeded + 220 | |
9 QuartzCore 0x01990400 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310 |
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
// Before proceeding, you must create sqlite database "test.db" in Resources directory. | |
Ti.Database.install('test.db', 'tests'), | |
function insert(data){ | |
var sql = "INSERT INTO samples (id, title, sample) VALUES (?, ?, ?)"; | |
try{ | |
this.db.execute(sql, data.id, data.title, data.sample); | |
}catch(e){ | |
Ti.API.info('insert error:' + sql); | |
} |
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
//app.js | |
(function() { | |
var person, syrup; | |
syrup = require('syrup'); | |
syrup.include('/model/entity'); | |
syrup.include('/model/person'); | |
person = new MYAPP.Model.Person('Coffee syrup'); | |
person.sayHello(); | |
}).call(this); |
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
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 |
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
// Global Background Color | |
Ti.UI.setBackgroundColor("#000000"); | |
// Namespace | |
var APP = {}; | |
// Running | |
(function () { | |
// Window | |
var win = Ti.UI.createWindow({ |
OlderNewer