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
/* | |
* Simple hash map using javascript objects and an ordered array. | |
* Repeated elements are not allowed. | |
* | |
* @param sort_method By default is ASC order, but you can specified whatever you want. | |
* | |
* The public methods are: | |
* -set | |
* -get | |
* -del |
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 function_after_ajax = []; | |
function fetchData() { | |
$.ajax({ | |
url: url, | |
method: 'GET/POST', | |
dataType: 'json', | |
data:params, | |
success: onDataReceived | |
}); | |
function onDataReceived() { |
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
players = ('0','X') | |
turn = 0 | |
exit = False | |
board = {0:'-', 1:'-',2:'-', 3:'-', 4:'-',5:'-',6:'-', 7:'-',8:'-'} | |
win_combinatios= [[0,1,2], \ | |
[3,4,5], \ | |
[6,7,8], \ | |
[0,3,6], \ | |
[1,4,7], \ | |
[2,5,8], \ |
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 isAndroid = Ti.Platform.osname == 'android'; | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
var indicator = Titanium.UI.createActivityIndicator({ | |
bottom:10, | |
height:50, | |
width:10, | |
message:"Cargando..." | |
}); |
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
// 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 | |
// |
NewerOlder