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
I/APP (25083): I 06/06/2012 17:48:17:774 000061fb Undefined| Handlers have completed. | |
I/APP (25083): I 06/06/2012 17:48:17:778 000061fb RhodesApplication| New UiState: MainActivityCreated | |
I/APP (25083): I 06/06/2012 17:48:17:779 000061fb RhodesActivity| onStart | |
I/APP (25083): I 06/06/2012 17:48:17:780 000061fb Undefined| Handlers have completed. | |
I/APP (25083): I 06/06/2012 17:48:17:780 000061fb RhodesApplication| New UiState: MainActivityStarted | |
I/APP (25083): I 06/06/2012 17:48:17:780 000061fb RhodesActivity| onResume | |
I/APP (25083): I 06/06/2012 17:48:17:790 000061fb RhodesService| onCreate | |
I/APP (25083): I 06/06/2012 17:48:17:792 000061fb LocalFileProvider| Revoke URI permissions: content:///com.rhomobile.cmnavigomobile | |
I/APP (25083): I 06/06/2012 17:48:17:793 000061fb Rhodes| Loading... |
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
String response = null; | |
HttpClient httpclient = null; | |
try { | |
HttpGet httpget = new HttpGet(url.toURI()); | |
httpclient = new DefaultHttpClient(); | |
HttpResponse httpResponse = httpclient.execute(httpget); | |
final int statusCode = httpResponse.getStatusLine().getStatusCode(); | |
if (statusCode != HttpStatus.SC_OK) { | |
throw new Exception("Got HTTP " + statusCode |
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
background: -webkit-radial-gradient(center, ellipse cover, #4786B3 0%,#2E5673 100%); /* twitter colors */ | |
/* cross-browser */ | |
background: #4786B3; /* for non-css3 browsers */ | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4786B3', endColorstr='#2E5673'); /* for IE */ | |
background: -webkit-gradient(linear, left top, left bottom, from(#4786B3), to(#2E5673)); /* for webkit browsers */ | |
background: -moz-linear-gradient(top, #4786B3, #2E5673); /* for firefox 3.6+ */ | |
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
/* Works better with a black toolbar */ | |
-webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, .25); /* web-kit browsers */ | |
-moz-box-shadow: 0 2px 3px rgba(0, 0, 0, .25); /* Firefox 3.5+ */ | |
box-shadow: 0 2px 3px rgba(0, 0, 0, .25); /* others */ |
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
/* | |
* Crockford's Supplant method with support to string, numbers and booleans | |
* | |
* var myObj = { name: "John Doe", age: 27 } | |
* console.log("Hi my name is {name} and I am {age} years old.".supplant(myObj)); | |
* | |
* // Output: Hi my name is John Doe and I am 27 years old. | |
*/ | |
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
map = function() { | |
var datetime = this._id.getTimestamp(); | |
var created_at_minute = new Date(datetime.getFullYear(), | |
datetime.getMonth(), | |
datetime.getDate(), | |
datetime.getHours(), | |
datetime.getMinutes()); | |
emit(created_at_minute, {count: 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
var distance = function(lat1, lon1, lat2, lon2){ | |
var R = 6371e3; // metres | |
var φ1 = lat1 * Math.PI / 180; | |
var φ2 = lat2 * Math.PI / 180; | |
var Δφ = (lat2-lat1)* Math.PI / 180; | |
var Δλ = (lon2-lon1)* Math.PI / 180; | |
var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) + | |
Math.cos(φ1) * Math.cos(φ2) * | |
Math.sin(Δλ/2) * Math.sin(Δλ/2); |
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
const componentToHex = c => { | |
const hex = c.toString(16) | |
return hex.length === 1 ? '0' + hex : hex | |
} | |
const rgbToHex = (r, g, b) => '#' + [r, g, b].map(componentToHex).join('') | |
const hexToRgb = hex => hex.substring(1).match(/.{2}/g).map(x => parseInt(x, 16)) |
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
/** | |
* SimilarityUtils Library | |
* Compares two strings and based on the Sørensen–Dice coefficient it calculates the % of similarity between both strings. | |
* | |
* Usage: | |
* SimilarityUtils.compare("string","stringg").toFixed(2); | |
***/ | |
var SimilarityUtils = { | |
/** |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T | |
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NHMCAwIDAgMUYwIDAg | |
MAAQAYACgAbSFA0VFlVOU0lDQ4ADgAXSGA0ZGldOUy5kYXRhTxEbGAAAGxhhcHBsAhAA |
OlderNewer