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 | |
set -e | |
platforms=(phonegap phonegap-qt weinre mobile-spec phonegap-docs phonegap-mac phonegap-bada phonegap-wp7 phonegap-webos phonegap-blackberry-webworks phonegap-iphone phonegap-symbian.wrt phonegap-android) | |
for i in ${!platforms[*]} | |
do | |
# clone down the repo | |
git clone "[email protected]:phonegap/${platforms[$i]}.git" |
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 | |
set -e | |
news=(phonegap callback-qt callback-weinre callback-test callback-docs callback-mac callback-bada callback-windows-phone callback-webos callback-blackberry) | |
olds=(phonegap phonegap-qt weinre mobile-spec phonegap-docs phonegap-mac phonegap-bada phonegap-wp7 phonegap-webos phonegap-blackberry-webworks) | |
for i in ${!olds[*]} | |
do | |
# clone down the old repo | |
git clone "http://github.com/phonegap/${olds[$i]}" |
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
function Cache() { } | |
Cache.prototype.getCachedPathForURI = function(uri, success, fail) { | |
return PhoneGap.execAsync(function(args) { | |
success(uri, args.file); | |
}, function(args) { | |
fail(uri, args.message); | |
}, 'com.example.URLCache', 'getCachedPathForURI', [uri, 'FOO']); | |
}; |
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
package com.example; | |
import java.io.BufferedInputStream; | |
import java.io.DataInputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.MalformedURLException; | |
import java.net.URL; |
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
/** | |
* Creates an event object. | |
* @class ChannelChannel class is used for attaching | |
* event handlers to JavaScript objects. | |
* <pre class="code"> | |
* function handleEvent(eventArgs) { | |
* // Do something with the event arguments... | |
* } | |
* | |
* var onItemSelected = new Channel(); |
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
package com.example; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
public class JavaSparseArray implements Iterable<SparseArrayTuple>, Iterator<SparseArrayTuple> { | |
private int[][] Avalue; | |
private int[][] Aindex; | |
private int columnCount; | |
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
" \t\r\n" == 0 |
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
[] == false; // true | |
"" == false; // true | |
null == false; // false, that's more like it |