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
<html> | |
<head> | |
<script type="text/javascript"> | |
function loadXMLDoc() | |
{ | |
var xmlhttp; | |
if (window.XMLHttpRequest) | |
{// code for IE7+, Firefox, Chrome, Opera, Safari | |
xmlhttp=new XMLHttpRequest(); | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<title>easyXDM</title> | |
<script type="text/javascript" src="easyXDM.debug.js"> | |
</script> | |
<script type="text/javascript"> | |
/** | |
* Request the use of the JSON object | |
*/ |
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 xhr = new XMLHttpRequest(); | |
var item; | |
function setItem(aitem) { | |
item = aitem; | |
} | |
function abort() { | |
xhr.abort(); | |
} |
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 restify = require('restify'); | |
var options = { | |
name : "MyAwesomeJSONServiceServer" | |
} | |
var server = restify.createServer(options); | |
server.get('/data', function(req, res, next){ | |
// number of data rows |
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
echo 'if you want to install it locally' | |
npm install restify | |
echo 'if you want to install it globally (system wide)' | |
npm install restify -g |
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
HTTP/1.1 200 OK | |
Access-Control-Allow-Origin: * | |
Access-Control-Allow-Headers: Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version | |
Access-Control-Expose-Headers: X-Api-Version, X-Request-Id, X-Response-Time | |
Server: MyAwesomeJSONServiceServer | |
X-Request-Id: 3f8729cc-bc40-4896-8454-0754c16473ed | |
Access-Control-Allow-Methods: GET | |
Connection: close | |
Content-Length: 1141 | |
Content-MD5: p9MyAlAkxjMtOyCBDaaEuQ== |
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
curl -i 'localhost:8000/data?numberOfRows=10' |
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
node server.js |
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 dummyParams = { | |
os: 'harmattan', | |
qt: '4_7_4', | |
token: '', | |
projectId: 'ef34fef6-6e03-452f-9700-c6ffdd3b059e', | |
userToken: 'PXyW25Do0uHn17E3E3BezoWxnp', | |
orderId : 'validOrderId', // set by server | |
app : { | |
name : "Campur Sari", | |
publisher : "CampurSari Inc", |
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
~/MyDocs/Downloads $ dpkg -i ./notification-engine0-env-selector_1.0.1-_armel.deb | |
perl: warning: Setting locale failed. | |
perl: warning: Please check that your locale settings: | |
LANGUAGE = (unset), | |
LC_ALL = (unset), | |
LC_CTYPE = "UTF-8", | |
LANG = "en_US" | |
are supported and installed on your system. | |
perl: warning: Falling back to the standard locale ("C"). | |
dpkg: requested operation requires superuser privilege |