code
stringlengths
2
1.05M
/** * RuleController * * @description :: Server-side logic for managing rules * @help :: See http://links.sailsjs.org/docs/controllers */ module.exports = { };
/* * Copyright (c) 2012-2016 André Bargull * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms. * * <https://github.com/anba/es6draft> */ const { assertSame } = Assert; // 15.1.2.1: Lexical declarations should always get into a new declarative environment // https://bugs.ecmascript...
'use strict'; module.exports = function concat(grunt) { // Load task grunt.loadNpmTasks('grunt-contrib-concat'); return { options: { banner: '<%= banner %>\n<%= jqueryCheck %>', stripBanners: false }, dist: { src: [ 'js/offcanvas.js' ], dest: 'dist/js/<%= pkg.name %>.js' } }; }
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des...
require('source-map-support').install(); var assert = require('chai').assert; var sinon = require('sinon'); var AuctionSniper = require('../src/AuctionSniper'); var SNIPER_ID = 'sniper'; const ITEM_ID = 'item-5347'; describe('auction sniper', () => { let mockListener; let mockAuction; let sniper; let priceSource;...
/*global describe, it*/ "use strict"; var fs = require("fs"), should = require("should"); require("mocha"); delete require.cache[require.resolve("../")]; var gutil = require("gulp-util"), includer = require("../"); describe("gulp-includer", function () { var expectedFile = new gutil.File({ path: "test/expect...
module.exports = [[1, 2, 3, 4, 5, 6, 7]];
module.exports = Cmds.addCommand({ cmds: [";channels"], requires: { guild: true, loud: false }, desc: "Get all guild channels", args: "", example: "", /////////////////////////////////////////////////////////////////////////////////////////// func: (cmd, args, msgOb...
export { default } from './GithubLink';
(function ($, window, document) { 'use strict'; var cssTransitionSupport = function () { var s = document.body || document.documentElement; s = s.style; if (s.WebkitTransition === '') { return '-webkit-'; } if (s.MozTransition === '') { return '-m...
import angular from 'angular'; import 'angular-route'; import '../style/app.css'; global.jQuery = require('jquery'); require('bootstrap-loader'); var jsonUrl = "/json/" var jsonName = "esp-" var app = angular.module("JsonRecordApp", ["ngRoute"]); app.config(function($routeProvider, $locationProvider){ $routeProv...
var filterGitSha = require('./filterGitSha.js'); var expect = require('chai').expect; describe('filterGitSha', function () { var actual; var expected; describe('smoke tests', function () { it('should exist', function () { // Expected an assignment or function call and instead saw an ex...
var FIREBASE_URL = 'https://sketch-gallery-test.firebaseio.com'; var Stream = require('stream').Transform; module.exports = function(method, path, data, auth, callback) { var http = require(FIREBASE_URL.split('://')[0]); var options = { host: FIREBASE_URL.split('://')[1], method: method, path: path + ...
/** * Object.keys polyfill * https://gist.github.com/atk/1034464 */ Object.keys=Object.keys||function(o,k,r){r=[];for(k in o)r.hasOwnProperty.call(o,k)&&r.push(k);return r} /** * Array.prototype.find polyfill * https://github.com/paulmillr/Array.prototype.find */ Array.prototype.find||function(){var a=function(a...
var path = require('path') var webpack = require('webpack') module.exports = { entry: './src/main.js', output: { path: path.resolve(__dirname, './dist'), publicPath: '/dist/', filename: 'bundle.js' }, module: { rules: [ { test: /\.vue$/, loader: 'vue-loader', optio...
/** * Created by albertin on 07/06/14. */ var canadianDollar = 0.91; function roundTwoDecimals(amount){ return Math.round(amount * 100) / 100; } exports.canadianToUS = function(canadian){ return roundTwoDecimals(canadian * canadianDollar); }; exports.USToCanadian = function(us){ return roundTwoDecimals(us...
if (typeof exports != "undefined") { var driver = require("./driver.js"); var test = driver.test, testFail = driver.testFail, testAssert = driver.testAssert, misMatch = driver.misMatch; var acorn = require(".."); } //----------------------------------------------------------------------------- // Async Function...
// Use λ for the placeholder window.λ = function delta() { this.version = "1"; }; λ.rebind_caf = function() { $('.caf').each(function() { if (typeof $._data($(this)[0], "events") === "undefined") { $(this).on('click', function(e) { e.preventDefault(); λ[$(this).attr('data-func')](this); ...
'use strict'; require('babel/register')({ ignore: false, only: new RegExp('^' + __dirname.replace(/[\[\]\/{}()*+?.\\^$|-]/g, "\\$&")) }); module.exports = require('./one.js');
/** * First Common Ancestor * * Design an algorithm and write code to find the first common ancestor of two nodes in a binary search tree. * Avoid storing additional nodes in a data structure. * * NOTE: This is not necessarily a binary search tree * */ const Graph = require('../../../collections/Graph'); // A...
angular.module('myList',[]) .controller('ListController',function($http){ var list = this; list.data = []; list.getData = function(){ $http({ method: 'GET', url: 'http://api-nivesh2.c9users.io/api/v1/fetch' }).then(function successCallback(response){ ...
! function(window, angular, undefined) { var defaultMapSettings = { center: { lat: 12.94206, lng: 77.62229 }, zoom: 8 }, setMarkerFunc = undefined; function setMarkerCurryFunc(placesMap) { if (placesMap) { var map = placesMap; } return funct...
// All code points in the `Cf` category as per Unicode v3.2.0: [ 0x6DD, 0x70F, 0x180E, 0x200C, 0x200D, 0x200E, 0x200F, 0x202A, 0x202B, 0x202C, 0x202D, 0x202E, 0x2060, 0x2061, 0x2062, 0x2063, 0x206A, 0x206B, 0x206C, 0x206D, 0x206E, 0x206F, 0xFEFF, 0xFFF9, 0xFFFA, 0xFFFB, 0x1D173, 0x1D174, 0x...
'use strict'; /* eslint-disable prefer-const */ /*! * Collection * https://github.com/kobezzza/Collection * * Released under the MIT license * https://github.com/kobezzza/Collection/blob/master/LICENSE */ import $C from '../core'; import { GLOBAL } from './env'; Object.assign($C, { ready: false, cache: { ...
/* eslint-disable es/no-bigint -- safe */ if (typeof BigInt == 'function') QUnit.test('BigInt.range', assert => { const { range } = BigInt; const { from } = Array; assert.isFunction(range); assert.name(range, 'range'); assert.arity(range, 3); assert.looksNative(range); assert.nonEnumerable(BigInt, 'range'...
import { createClient } from 'restify'; import { contains } from 'ramda'; import { log } from './logger'; import sharp from 'sharp'; /** @ignore */ const IMAGE_MIMES = [ 'image/gif', 'image/jpeg', 'image/png', 'image/svg+xml', ]; /** * Formats an image buffer as instructed by options param * * _If the opti...
/** # perambulate #### Simple parameter validation * Author: Baz O'Mahony <the.ewok#gmail.com> * Date: 08/20/2014 * License: MIT **/ var isArray = require('util').isArray; module.exports = function perambulate(for_validation) { var current_parameter = {}; var is_valid = false; //It had better validate ...
var protoclass = require("protoclass"); /** */ function Fragment(children) { this.children = children; } /** */ module.exports = protoclass(Fragment, { /** */ initialize: function(template) { if (this.children.length === 1) return this.children[0].initialize(template); var frag = template.docum...
window.$('#responseOnce').append('Script loaded<br>');
const PlotCard = require('../../plotcard.js'); class FavorsFromTheCrown extends PlotCard { setupCardAbilities() { this.reaction({ when: { //Don't see any advantage in bestow-boosting your opponent's cards, so limiting this to own controlled cards onCardEntersPlay...
import {defineValidator} from './../definition'; import {InvalidTypeError} from './../errors'; import extractName from './../../classes/extract-name'; export default defineValidator( (value) => { if (typeof value !== 'function') { throw new InvalidTypeError(`value ${extractName(value)} must be instance of ...
'use strict'; define([ 'angular', 'modules/utils/Utils', 'modules/promotion/services/PromotionService', 'modules/promotion/services/PromotionProductService', 'modules/promotion/services/PromotionDrawService', 'modules/promotion/services/PromotionRulesService', 'modules/promotion/controllers/PromotionLis...
/** * Created by Josh on 12/3/15. */ //file for implementing frequencies across distances in texts //such as around a specific position, what is the most common word? function getMaxOfArray(numArray) { return Math.max.apply(null, numArray); } function getMinofArray(numArray) { return Math.min.apply(null, nu...
/** * 评论详情 * @author jackieLin <dashi_lin@163.com> */ 'use strict'; import React, { Component, PropTypes} from 'react'; import { StyleSheet, Image, Text, View } from 'react-native'; import v2exStyle from '../styles/v2ex'; import TimeAgo from './timeAgo'; const articleListStyles = StyleSheet.create(v2exStyl...
// my-custom-environment const http = require('http') const getPort = require('get-port') const seleniumServer = require('selenium-standalone') const NodeEnvironment = require('jest-environment-node') const { BROWSER_NAME: browserName = 'chrome', SKIP_LOCAL_SELENIUM_SERVER, } = process.env const newTabPg = ` <!DO...
import { List, Repeat } from 'immutable'; /** * Template for semantic Relations, defining the roles (i.e. semantic function and weights) in the default order. */ export default class RelationTemplate { /** * @constructor * @param {AssociateRole} leadingAssociate - first associate's role/weight * @param {?Asso...
/** * Created by timfulmer on 7/26/15. */ var passport = require('passport'), BasicStrategy = require('passport-http').BasicStrategy, BearerStrategy = require('passport-http-bearer').Strategy, Promise=require('bluebird'); function initialize(options){ options=options || {}; function initializePromise(resol...
var configUnitsForFaculty = function () { var facultyID = $("#faculty-id").val(); var facultyItem = $('option[value=' + facultyID + ']'); var left = facultyItem.attr('data-left'); var right = facultyItem.attr('data-right'); var unitSelected = false; $(".unit-option-item").each(function (index, ...
'use strict'; //Sidemenus service used to communicate Sidemenus REST endpoints angular.module('sidemenus').factory('Sidemenus', ['$http', function($http){ /* Private functions */ //Here the proviates functions /* Public functions */ return...
/* global document */ function toArray(xs) { return Array.prototype.slice.call(xs); } function filterToc() { var f = filterElement.bind(null, nameFilter.value, ''); funcs.forEach(f); } function filterElement(nameFilter, categoryFilter, elem) { var name = elem.getAttribute('data-name'); var catego...
var rf = require("fs"), readline = require("readline"), rs = rf.ReadStream("datatt.json"); rl = readline.createInterface({'input':rs,'output':{}}); var i = 0; rl.on('line',function(line){ console.log("********::"); //console.log(i++ + ': '+ line.trim()); var arr = line.split("|"); ...
/** * Created by ms on 1/25/2017. */
// // NOTES: // // - The service initialization is asynchronous, so there's a race condition. // RPC.Calculator may not be ready when CalcCntl.add/subtract are called // - This can be solved a few ways, but I didn't want to complicate the example // with that, as it depends on how your app is actually setup...
import infoAddon from "@storybook/addon-info"; import { setAddon, storiesOf } from "@storybook/react"; import { action } from "@storybook/addon-actions"; import { withInfo } from "@storybook/addon-info"; import React from "react"; import styled, { ThemeProvider } from "styled-components"; import Switch from "binary-ui...
/****** * * EditArea * Developped by Christophe Dolivet * Released under LGPL, Apache and BSD licenses (use the one you want) * ******/ function EditArea(){ var t=this; t.error= false; // to know if load is interrrupt t.inlinePopup= [{popup_id: "area_search_replace", icon_id: "search"}, ...
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { Platform, StyleSheet, TextInput } from 'react-native'; import { connect } from 'react-redux'; import config from '../../config'; import { searchSongs } from '../../redux/songs'; import { navigatorPropTypes } from '../../helpers...
var d3_time = require('d3-time'), d3_timeF = require('d3-time-format'), d3_numberF = require('d3-format'), numberF = d3_numberF, // defaults to EN-US timeF = d3_timeF; // defaults to EN-US function numberLocale(l) { var f = d3_numberF.localeFormat(l); if (f == null) throw Error('Unrecognized lo...
'use strict'; angular.module('hackshareApp') .config(function ($stateProvider) { $stateProvider .state('hack', { url: '/hacks/:hackId', templateUrl: 'app/hacks/hack/hack.html', controller: 'HackCtrl' }); });
//star rating export default function(cell, onRendered, success, cancel, editorParams){ var self = this, element = cell.getElement(), value = cell.getValue(), maxStars = element.getElementsByTagName("svg").length || 5, size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttrib...
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import throttle from 'lodash.throttle'; import ReactMarkedEditor, { Replacer } from '../../src/'; export default class App extends Component { constructor(props) { super(props); this.handleMarkdownChange = this.handleMarkdownChange.bind(t...
// ========================================================================== // Project: Welcome Strings // Copyright: ©2010 Apple Inc. // ========================================================================== /*globals Welcome */ // Place strings you want to localize here. In your app, use the key and // loca...
import React, {Component} from 'react'; import { Form, Icon, Input, Button } from 'antd'; const FormItem = Form.Item; import Animate from './animate'; import './login.css'; import { Http } from '../utils/http'; import {connect} from "react-redux"; import { login, setTags } from '../actions/index'; class NormalLogi...
'use strict'; /*! * V4Fire Client Core * https://github.com/V4Fire/Client * * Released under the MIT license * https://github.com/V4Fire/Client/blob/master/LICENSE */ require('config'); const {plainDesignSystem} = include('build/stylus/ds/test/scheme/plain'), {fullThemed} = include('build/stylus/ds/test/sche...
require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];retu...
const should = require("should"); const { assert } = require("node-opcua-assert"); const { Benchmarker } = require("node-opcua-benchmarker"); const { removeDecoration } = require("node-opcua-debug"); const { coerceNodeId, resolveNodeId, makeNodeId, NodeIdType, NodeId, sameNodeId } = require("....
_gaq.push(['_trackPageview']); // If awaiting activation var waiting = true; // If trusted exit, for exit confirmation var trustedExit = false; // Used to fade out subtitles after calculated duration var subtitleVanishTimer = false; var subtitleVanishBaseMillis; var subtitleVanishExtraMillisPerChar; // Holder objec...
const gulp = require('gulp') const sass = require('gulp-sass') gulp.task('sass', function () { return gulp.src('./app/styles/index.scss') .pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError)) .pipe(gulp.dest('./app/dist')) }) gulp.task('sass:watch', function () { gulp.watch('./app/**/*.scs...
/* @flow */ ;(function (root) { "use strict"; let color_names = { "black": "#000000", "silver": "#c0c0c0", "gray": "#808080", "white": "#ffffff", "maroon": "#800000", "red": "#ff0000", "purple": "#800080", "fuchsia": "#ff00ff", "green": "#...
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), yuidoc: { compile: { name: '<%= pkg.name %>', description: '<%= pkg.description %>', version: '<%= pkg.version %>', ...
(function() { var storage = window.Cookie; var model = window.model; Object.assign(model, { init: function(callback) { var data = storage.getItem(model.TOKEN); try { if (data) model.data = JSON.parse(data); } catch (e) { console.error(e); } if (callback) c...
angular.module("flowApi", ['ui.router', 'ui.bootstrap.collapse', 'ui.bootstrap.pagination', 'uib/template/pagination/pagination.html']); angular.module('flowApi').config(['$stateProvider', function($stateProvider){ $stateProvider .state('releases',{ url: '/releases', abstract: true, template: "<section...
const authenticationErrors = [ 'Token invalid', 'Token missing', 'Username or password incorrect', ] export default (error) => authenticationErrors.includes(error.message) === true
//window._ = require('lodash'); /** * We'll load jQuery and the Bootstrap jQuery plugin which provides support * for JavaScript based Bootstrap features such as modals and tabs. This * code may be modified to fit the specific needs of your application. */ try { window.$ = window.jQuery = require('jquery'); ...
const { getToken } = require('../utils'); const models = require('../models'); /** * Since this service provides public API, * we allow user who is also not authenticated. * For the admin routes, we add this policy/middleware */ module.exports = async (ctx, next) => { const token = getToken(ctx); if (!token)...
export { default } from 'ember-materialize/components/em-phone-input';
'use strict'; const ServerGame = require('./ServerGame'); const Room = require('./Room'); const debug = require('debug'); const log = debug('game:server/server'); function Lobby ({ config }) { const rooms = new Map(); const clients = new Map(); function startGame (room) { room.startGame(); }...
//= require jquery_ujs var Responses = (function($){ var bindClicks = function(module) { $('.btn-show').on('click', function(){ var id = $(this).data('id'), content = $(this).data('content'); module.showResponse(id, content); return false; }); } function Module(baseUrl) { ...
const isPlainObject = require('lodash.isplainobject'); const { inherits } = require('./util'); const Collection = require('./collection'); function List(...args) { if (!(this instanceof List)) { throw new Error('Cannot call List() without new'); } Collection.apply(this, args); const [initialData] = args;...
//= require ./ecm/core/application
var React = require('react') var Link = require('react-router').Link var MainContainer = require('./MainContainer') var Home = React.createClass({ render () { return ( <MainContainer> <img src='../fist_image.png' style={{height: 150, weight: 150}} /> <h1>Github Battle</...
// client.spec.js describe('Sockly', function() { beforeEach(function() { sockly = new Sockly(); }) it('should have an instantiation', function() { expect(sockly).toBeDefined(); }); it('should have a connect method', function() { expect(sockly.connect).toBeDefined(); }); it('should have a send meth...
define(['exports'], function (exports) { 'use strict'; var frag = function (...children) { const documentFragment = document.createDocumentFragment(); for (let child of children) { if (typeof child === 'string') { documentFragment.appendChild(document.createTextNode(child)); } ...
import React from 'react'; import { Link } from 'react-router'; import { createFragmentContainer, graphql, } from 'react-relay/compat'; import NoteViewer from '../Note/NoteViewer'; class LessonListComponent extends React.Component { render() { const baseUrl = this.props.baseUrl; return ( <...
'use strict'; // Utilities: var _ = require('lodash'); var Promise = require('bluebird'); // Module: var Core = require('../Core'); // Dependencies: var camelcase = require('change-case').camel; var pascalcase = require('change-case').pascal; require('../Components/Notifier/NotifierService'); require('../Services/Va...
import registerGettextHelpers from 'django-ember-gettext/lib/main'; export default { name: 'register-django-gettext-helpers', initialize: function() { registerGettextHelpers(); } }
'use strict' const Transform = require('stream').Transform const StringDecoder = require('string_decoder').StringDecoder class WordFilter extends Transform { constructor(isWordChar, isWordEnd) { super({ readableObjectMode: true }) if (typeof isWordEnd !== 'function') { isWordEnd = () => false } ...
'use strict'; var azure = require('azure-storage'); var pg = require('pg'); var request = require('request'); var parseString = require('xml2js').parseString; var conString = 'postgres://' + process.env.POSTGRES + '/postgres'; var retryOperations = new azure.ExponentialRetryPolicyFilter(); var blobSvc = azure.createBlo...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
import {ConnectionManager, ContentDirectory} from '../services'; export default class MediaServer { constructor(player) { this.player = player; this.connectionManager = new ConnectionManager(player); this.contentDirectory = new ContentDirectory(player); } }
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. // Simple single page application framework // Author: andrew @ terrainformatica.com (function($,window){ window.pageHandlers = {}; var currentPage; // show the ...
import { Prism } from 'global'; import React from 'react'; import PropTypes from 'prop-types'; export class Code extends React.Component { componentDidMount() { this.highlight(); } componentDidUpdate() { this.highlight(); } highlight() { if (typeof Prism !== 'undefined') { Prism.highlight...
/** * Printdata component to wrap all printdata specified stuff together. This component is divided to following logical components: * * Controllers * Models * * All of these are wrapped to 'frontend.production.printdata' angular module. */ (function() { 'use strict'; // Define frontend.production.printda...
version https://git-lfs.github.com/spec/v1 oid sha256:f80970c8d813a430aa8dcf69cbf9390003f0ae722ce11063876fbd1163dfaad7 size 29464
"use strict"; var config = require('./config.json'), async = require('async'), crypto = require('crypto'), Db = require('mongodb').Db, Server = require('mongodb').Server, ObjectID = require('mongodb').ObjectID; async.waterfall([ function openDb(callback) { var db = new Db( ...
var loaderUtil = require('loader-utils'); var filewalker = require('filewalker'); var async = require('async'); var fs = require('fs'); var pathUtil = require('path'); module.exports = function(source, map) { var self = this; if(typeof self.options.staticSiteLoader === 'undefined') { self.emitError('You must d...
var mongoose = require('mongoose'); mongoose.set('debug', true); //Mongo var uristring = process.env.MONGOLAB_URI || process.env.MONGOHQ_URL || 'mongodb://localhost/dances'; mongoose.connect(uristring, function (err) { if (err) { console.log ('ERROR connecting to: ' + uristring + '. ' + err); } else { c...
// http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/jkflipflop.html#c3 var NoR = require('../lib/NoR.js') var NAND = NoR(function(a, b, q){ q( !( a() && b() ) ) }, function(){ this.q.isOutput = true // dont trigger execution if q changes }) var NAND3 = NoR(function(a, b, c, q){ q( !( a() && b() && c() ) ) ...
const { ArgumentError } = require('rest-facade'); const Auth0RestClient = require('../Auth0RestClient'); const RetryRestClient = require('../RetryRestClient'); /** * Auth0 Grants Manager. * * See {@link https://auth0.com/docs/api/v2#!/Grants Grants} */ class GrantsManager { /** * @param {object} options ...
(function($) { "use strict"; //----------------------------------------// // Variable //----------------------------------------// var variable = { width : 0, height : 0, selector : '.item-point', styleSelector : 'circle', animationSelector : '', ...
#!/usr/bin/env node 'use strict' // Vendor includes const chalk = require('chalk'); const fs = require('fs'); const yargs = require('yargs'); const path = require('path'); const HTMLtoJSX = require('htmltojsx'); const jsdom = require('jsdom-no-contextify'); // Language files const content = require('./lang/en'); //...
module.exports = { "Layouts.Main.welcomeMessage": "Welcome to the M+ Collections Spelunker!", }
// Returns the data tables: // get global database object var db = require('../../../database/pgp_db'); var pgp = db.$config.pgp; // Defining the query function: function dbtables (req, res, next) { var tableparam = !!req.query.table; if (tableparam) { var queryTable = { queryTable: 'ndb.' + String(req.quer...
const parentMixin = { mounted() { if (this.value >= 0) { this.currentIndex = this.value } }, methods: { updateIndex() { if (this.$children && this.$children.length) { this.childLength = this.$children.length let children = this.$children for (let i = 0; i < children...
describe('Deck JS Menu', function() { var $d = $(document); var dsc = defaults.selectors.container; beforeEach(function() { loadFixtures('standard.html'); if (Modernizr.history) { history.replaceState({}, "", "#") } else { window.location.hash = '#'; } $.deck('.sli...
/** * Created by chriscai on 2014/10/14. */ var MongoClient = require('mongodb').MongoClient, connect = require('connect'); var log4js = require('log4js'), logger = log4js.getLogger(); var fs = require("fs"); var path = require("path"); var cacheTotal = require('../service/cacheTotal'); var cacheCount = ...
#!/usr/local/bin/node var fs = require("fs"); var args = process.argv.slice(2); fs.writeFileSync("_drafts/" + args[0] + ".md", fs.readFileSync("_drafts/draft-skeleton.md"));
var test = require("tape"), Sandal = require('../sandal.js'); test('Resolve transient factory with singleton dependencies twice', function (t) { var sandal = new Sandal(); var i = 0; var factory1 = function (factory2) { i++; return '' + i + factory2; }; var j = 0; var factory2 = function ...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// Writen by Mr.Lu /** * Routes */ var User = require("./user"); var Blog = require("./blog"); var Comment = require("./comment"); var Setting = require("./setting"); module.exports = function(app) { app.get("/", function(req, res) { res.redirect("/home"); }); app.get("/settings", Setting.settingPage); ap...
const crypto = require('crypto'); const { render, redirect } = require('@kelpjs/next/response'); const Application = require('../models/application'); const Authorization = require('../models/authorization'); class App { async index() { const apps = await Application.findAll(); return render('app...