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
qrScanButton.addEventListener("click", function(e) { | |
var intent = Ti.Android.createIntent({ | |
action: "com.google.zxing.client.android.SCAN" | |
}); | |
intent.putExtra("SCAN_MODE", "QR_SCAN_MODE"); | |
var activity = Ti.Android.currentActivity; | |
activity.startActivityForResult(intent, function(e) { | |
if (e.resultCode == Ti.Android.RESULT_OK) { | |
var contents = e.intent.getStringExtra("SCAN_RESULT"); | |
var format = e.intent.getStringExtra("SCAN_RESULT_FORMAT"); |
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
Ti.include('overrideTabs.js'); | |
/* | |
This is a typical new project -- a tab group with three tabs. | |
*/ | |
var tabGroup = Ti.UI.createTabGroup(); | |
/* | |
Tab 1. |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
Nicolas Grekas - nicolas.grekas, gmail.com
17 June 2011 - Last updated on 3 sept. 2011
Not updated any more on this gist. See:
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:'white', | |
layout:'vertical' | |
}); | |
win.add(Ti.UI.createLabel({ | |
top:10, | |
text:'Hello World', | |
color:'black', | |
height:'auto', |
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
# Some useful Unicode entities | |
# Non-Breaking Space | |
snippet nbs | |
| |
# ← | |
snippet left | |
← | |
# → | |
snippet right | |
→ |
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
// implement like this: | |
var window = Ti.UI.createWindow({ | |
backgroundColor:'#fff' | |
}); | |
// draw the gridlines first so your other elements stack on top of them | |
// without requiring you to set the z-index property of each | |
var grid = require('gridlines'); | |
grid.drawgrid(10,window); |
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
bootstrap-tooltip.js | |
bootstrap-popover.js | |
bootstrap-alert.js | |
bootstrap-button.js | |
bootstrap-carousel.js | |
bootstrap-collapse.js | |
bootstrap-dropdown.js | |
bootstrap-modal.js | |
bootstrap-scrollspy.js | |
bootstrap-tab.js |
OlderNewer