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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example" > | |
<application | |
<!-- other Activities goes here --> | |
<activity | |
android:name=".ProxyActivity" | |
android:label="Some nice label" | |
android:noHistory="true" | |
android:theme="@android:style/Theme.NoDisplay"> | |
<intent-filter> |
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 trimString(s) { | |
var l=0, r=s.length -1; | |
while(l < s.length && s[l] == ' ') l++; | |
while(r > l && s[r] == ' ') r-=1; | |
return s.substring(l, r+1); | |
} | |
function compareObjects(o1, o2) { | |
var k = ''; | |
for(k in o1) if(o1[k] != o2[k]) return false; |
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
Create a file in your lib folder, like **rootproject**/lib/routes.map.js | |
load the module in your file and initialize with the data: | |
var jsonCoordinates = { | |
'destination': dest.latitude + ',' + dest.longitude, | |
'origin': origin.latitude + ',' + origin.longitude, | |
}; | |
var routes = require("routes.map")(jsonCoordinates, mapview); |
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 app = require('express').createServer() | |
var io = require('socket.io').listen(app); | |
var fs = require('fs'); | |
app.listen(8008); | |
// routing | |
app.get('/', function (req, res) { | |
res.sendfile(__dirname + '/chat.html'); | |
}); |