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
| PS C:\nodecode\temp> node debug .\temp.js | |
| < debugger listening on port 5858 | |
| connecting... ok | |
| debug> c | |
| < node.js:201 | |
| < throw e; // process.nextTick error, or 'error' event on first tick | |
| < ^ | |
| < bar | |
| program terminated | |
| debug> |
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 Module = require("module"); | |
| function asyncrequire(name, callback) { | |
| fs.readFile(name, "utf8", handleFileRead); | |
| function handleFileRead(err, file) { | |
| if (err) { | |
| return callback(err); | |
| } | |
| var m = new Module(name, { |
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 http = require('http'), | |
| url = require('url'); | |
| var server = http.createServer(onRequest) | |
| server.listen(8888); | |
| function onRequest(request, response) { | |
| var parsedUrl = url.parse(request.url, true), | |
| urlToExpand = parsedUrl.query.url; |
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
| typedef struct { | |
| double* matrix; | |
| double* left_edge; | |
| double* right_edge; | |
| int dim; | |
| double precision; | |
| int rank; | |
| int nproc; | |
| int* change_flags; | |
| } RELAX_DATA; |
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
| // https://github.com/Raynos/pd | |
| var pd = typeof window === "undefined" ? require("pd") : window.pd; | |
| var klass = (function() { | |
| // meta data name | |
| var meta = pd.Name(); | |
| return klass; | |
| function klass(parent, child) { |
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
| /* | |
| @emit 'controller.home' req req - Controller event is emitted whenever a request | |
| comes in that matches the home route | |
| @on 'server.express' - Listen on the server express event as to attach | |
| the home route to the app. | |
| */ | |
| module.exports = { | |
| attach: function attach() { | |
| this.mediator.on('server.express', this.attachRoutes); | |
| }, |
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
| module.exports = { | |
| attach: function attach() { | |
| this.mediator.on("server.express", this.setVariables); | |
| this.mediator.on("server.express", this.addMiddleware); | |
| }, | |
| detach: function detach() { | |
| this.mediator.removeListener('server.express', this.setVariables); | |
| this.mediator.removeListener('server.express', this.addMiddleware); | |
| }, | |
| destroy: function destroy() { |
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 fs = require("fs"), | |
| path = require("path"); | |
| /* | |
| @on 'moduleLoader.load' path - loader listens on the module loading command | |
| This will load all the js files in the folder (or the file path) as | |
| ncore modules | |
| @on 'moduleLoader.autoload' path - same as load except it automatically | |
| attaches the module to the core | |
| @emit 'moduleLoader.loaded' module uri - every time a module is loaded |
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
| Publishing documentation to github... | |
| Switched to branch 'gh-pages' | |
| ! rm: cannot remove `node_modules/express' | |
| ! : Is a directory | |
| ! rm: cannot remove `node_modules/groc/node_modules/glob/build/.wafpickle-7': Permission denied | |
| rm: cannot remove `node_modules/groc/node_modules/glob/build/Release/deps/fnmatch/fnmatch_2.o': Permission denied | |
| rm: cannot remove `node_modules/groc/node_modules/glob/build/Release/deps/fnmatch/fnmatch_5.o': Permission denied | |
| ! rm: cannot remove `node_modules/groc/node_modules/glob/build/Release/deps/glob/glob_1.o': Permission denied | |
| rm: cannot remove `node_modules/groc/node_modules/glob/build/Release/deps/glob/glob_4.o': Permission denied | |
| rm: cannot remove `node_modules/groc/node_modules/glob/build/Release/glob.node': Permission denied |
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
| // NodeList | |
| toArray(foos).forEach(function (el) { | |
| el.style.color = 'red' | |
| }); | |
| // NodeSet | |
| foos.style.color = 'red'; |