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 nwebkit = require('node-webkit'); | |
nwebkit.init({ | |
'url' : 'index.html', | |
'width' : 800, | |
'height' : 600 | |
}); |
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 nwebkit = require('node-webkit'), | |
http = require('http'); | |
var server = http.createServer(function(request, response) { | |
response.writeHead(200, { 'Content-Type': 'text/plain'}); | |
response.end('Hello'); | |
}).listen(3000, '127.0.0.1'); | |
nwebkit.init({ | |
'url' : 'views/index.html', |
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
public void AddStore(IDocumentStore store) | |
{ | |
var documentStore = store as DocumentStore; | |
if (documentStore == null) | |
return; | |
if (documentStore.WasDisposed) | |
return; | |
object _; |
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 () { | |
// some code | |
})(); |
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
if (true) { | |
var x = 1; | |
} | |
console.log(x); // Prints 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
(function() { | |
var x = 1; | |
})(); | |
console.log(x); // throws "x" is not defined |
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
// helpers.js | |
function add(x,y) { | |
return x + y; | |
} | |
// page.js | |
console.log(add(1,1)); // prints 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
// helpers.js | |
(function() { | |
function add(x,y) { | |
return x + y; | |
} | |
})(); | |
// page.js | |
console.log(add(1,1)); // throws add is not defined |
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
// helpers.js | |
(function() { | |
function add(x,y) { | |
return x + y; | |
} | |
})(); | |
// page.js | |
(function() { | |
console.log(add(1,1)); // throws add is not defined |
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
// helpers.js | |
(function() { | |
WinJS.Namespace.define("MyApp.Functions", { | |
add: function (x,y) { | |
return x + y; | |
} | |
}); | |
})(); | |
// page.js |