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
Statistical profiling result from /Users/rfeng/Demos/mssql-benchmark/v8-node-11.log, (114854 ticks, 208 unaccounted, 0 excluded). | |
[Unknown]: | |
ticks total nonlib name | |
208 0.2% | |
[Shared libraries]: | |
ticks total nonlib name | |
39 0.0% 0.0% /usr/lib/system/libsystem_pthread.dylib | |
33 0.0% 0.0% /usr/lib/system/libsystem_c.dylib |
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 X() { | |
} | |
Object.defineProperty(X.prototype, '__data', | |
{enumerable: false, configurable: true, writable: true, value: {x: 0}}); | |
var x1 = new X(); | |
console.log(Object.keys(x1)); | |
console.log(x1.__data); | |
x1.__data = {x: 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 loopback = require('loopback'); | |
var path = require('path'); | |
var app = module.exports = loopback(); | |
var started = new Date(); | |
/* | |
* 1. Configure LoopBack models and datasources | |
* | |
* Read more at http://apidocs.strongloop.com/loopback#appbootoptions | |
*/ |
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
module.exports = { | |
/** | |
* Declares a new hook to which you can add pres and posts | |
* @param {String} name of the function | |
* @param {Function} the method | |
* @param {Function} the error handler callback | |
*/ | |
hook: function (name, fn, errorCb) { | |
if (arguments.length === 1 && typeof name === 'object') { | |
for (var k in name) { // `name` is a hash of hookName->hookFn |
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 loopback = require('loopback'); | |
var path = require('path'); | |
var app = module.exports = loopback(); | |
app.set('restApiRoot', '/api'); | |
var ds = loopback.createDataSource('soap', | |
{ | |
connector: require('../index'), |
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
module.exports = function(Store) = { | |
/** | |
* Creates list of users with given input array | |
* @param {User} body List of user object | |
* @callback {Function} callback Callback function | |
* @param {Error|String} err Error object | |
* @param {Object} result Result object | |
*/ | |
function createUsersWithListInput(body, callback) { |
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
module.exports = function(SwaggerModel) = { | |
/** | |
* Find pet by ID | |
* @param {integer} petId ID of pet that needs to be fetched | |
* @callback {Function} callback Callback function | |
* @param {Error|String} err Error object | |
* @param {Pet} result Result object | |
*/ | |
function getPetById(petId, callback) { |
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
{"swagger": 2.0, "info": { | |
"description": "This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters", | |
"version": "1.0.0", | |
"title": "Swagger Sample App", | |
"termsOfService": "http://helloreverb.com/terms/", | |
"contact": { | |
"name": "apiteam@wordnik.com" | |
}, | |
"license": { | |
"name": "Apache 2.0", |
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('../app'); | |
// Admin users | |
var adminUsers = require('../config/users.json').admins; | |
app.models.role.findOrCreate({where: {name: 'admin'}}, {name: 'admin'}, | |
function (err, role) { | |
if (err) { | |
return console.error(err); | |
} |
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
{ | |
"initial": { | |
"favicon": { | |
}, | |
"compress": { | |
"params": { | |
} | |
} | |
}, |
OlderNewer