This file contains hidden or 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
| # Application global object | |
| apps = apps or {} | |
| # Entry point | |
| do -> | |
| # Window | |
| win1 = require("win1").init(apps); | |
| # Tab | |
| tab = Ti.UI.createTab | |
| icon: "KS_nav_ui.png" |
This file contains hidden or 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 () { | |
| var win = Ti.UI.createWindow({ | |
| title: "Window", | |
| backgroundColor: "#FFFFFF" | |
| }), | |
| tableView = Ti.UI.createTableView({ | |
| data: [] | |
| }), | |
| http = Ti.Network.createHTTPClient(); | |
| win.add(tableView); |
This file contains hidden or 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
| do (Ti) -> | |
| # Load CommonJS modules | |
| pocket = require("pocket").Pocket | |
| consumerKey: "" # PLEASE GET CONSUMER KEY at http://getpocket.com/developer/ | |
| accessTokenKey: Ti.App.Properties.getString "pocketAccessTokenKey", "" | |
| pocketUserName: Ti.App.Properties.getString "pocketUserName", "" | |
| # Build user interface component | |
| win = Ti.UI.createWindow | |
| backgroundColor: "#FFFFFF" |
This file contains hidden or 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
| def p1(*args, **kwargs) | |
| print args | |
| print "\n" | |
| print kwargs | |
| end | |
| p1 | |
| #=> [] | |
| #=> {} |
This file contains hidden or 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 fs = require("fs"); | |
| var path = require("path"); | |
| var util = require("util"); | |
| var styl = require("stylus"); | |
| var wrench = require("wrench"); | |
| function compileTSS(root, view) { | |
| var data = fs.readFileSync(path.join(root, view), "utf8"), | |
| tss; | |
| styl.render(data, function (err, css) { |
This file contains hidden or 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
| /*jslint devel: true */ | |
| /*global Titanium, require */ | |
| (function (Ti, require) { | |
| "use strict"; | |
| // モジュール | |
| var style = require("style"), | |
| lib = require("lib"), | |
| // UI コンポーネント | |
| win = Ti.UI.createWindow(style.win), | |
| thisHeadlineLabel = Ti.UI.createLabel(style.headlineLabel), |
This file contains hidden or 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
| /*jslint devel:true */ | |
| /*global window, exports */ | |
| (function (root) { | |
| "use strict"; | |
| // Prototype extension | |
| if (!Array.prototype.removeAt) { | |
| Array.prototype.removeAt = function (idx) { | |
| if (typeof idx !== "number") { | |
| throw new TypeError("removeAt argument is required Integer"); |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # | |
| # Appcelerator Titanium Module Packager | |
| # | |
| # | |
| import os | |
| import subprocess | |
| import sys | |
| import glob | |
| import string |
This file contains hidden or 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
| /*jslint devel:true */ | |
| /*global Titanium */ | |
| (function (Ti) { | |
| "use strict"; | |
| var tabGroup, tab, win, sview; | |
| tabGroup = Ti.UI.createTabGroup(); | |
| win = Ti.UI.createWindow({ | |
| backgroundColor: "#FFFFFF", | |
| title: "Photo Gallery", | |
| tabBarHidden: true |
This file contains hidden or 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 core, Model, model; | |
| core = Object.create(Backbone.Events); | |
| Model = Backbone.Model.extend(); | |
| model = new Model(); | |
| core.listenTo(model, 'myEvent', function () { | |
| console.log('Hello, World'); | |
| }); |