code
stringlengths
2
1.05M
var express = require('express'); var app = express(); var server = require('http').Server(app); var io = require('socket.io')(server); var connections = 0; var https = require('https') const ctrlUsuario = require('.././controllers/usuarios'); app.get('/hello', function(req,res){ res.status(200).send("Hola mundo")...
"use strict"; const chai = require( "chai" ); const helpers = require( "./helpers" ); const pass = require( "pegjs" ).compiler.passes.generate.generateBytecode; chai.use( helpers ); const expect = chai.expect; describe( "compiler pass |generateBytecode|", function () { function bytecodeDetails( bytecode ) { ...
import fluxApp from 'fluxapp'; export default fluxApp.registerStore('login', { actions: { onLogin: 'session.login' }, onLogin() { this.setState({ loggedIn: true }); }, getInitialState() { return { loggedIn: false }; }, });
#!/usr/bin/env node exports.process = function(args){ var path = require('path'), fs = require('fs'); var from = path.join(path.dirname(fs.realpathSync(__filename)), '../demo/index.html'); console.log(from); require("../lib/template").execute( { from : from, ...
(function (root, factory) { var name = 'MagnificentControl'; if (typeof define === 'function' && define.amd) { define(['jquery', './mag-analytics', 'jquery-bridget'], function ($, MagnificentAnalytics) { return (root[name] = factory($, MagnificentAnalytics)); }); } else if (typeof exports === 'obj...
'use strict'; var path = require('path'); var fs = require('fs-extra'); var sh = require('shelljs'); var util = require('util'); var chokidar = require('chokidar'); var minimatch = require('minimatch'); // framework var framework = function(emitter, config, logger) { var log = logger.create('framework:lasso'); ...
/** * Created by joy on 2015/6/14. */ var React = require('react/addons'); var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup; var TodoList = React.createClass({ getInitialState: function() { return {items: ['hello', 'world', 'click', 'me']}; }, handleAdd: function() { var newI...
/* * Moonshine - a Lua virtual machine. * * Email: moonshine@gamesys.co.uk * http://moonshinejs.org * * Copyright (c) 2013-2015 Gamesys Limited. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "S...
"use strict"; let datafire = require('datafire'); let openapi = require('./openapi.json'); module.exports = datafire.Integration.fromOpenAPI(openapi, "azure_arm_powerbiembedded");
"use strict"; var helpers = require("../../helpers/helpers"); exports["Pacific/Rarotonga"] = { "guess:by:offset" : helpers.makeTestGuess("Pacific/Rarotonga", { offset: true, expect: "Pacific/Honolulu" }), "guess:by:abbr" : helpers.makeTestGuess("Pacific/Rarotonga", { abbr: true, expect: "Pacific/Honolulu" }), "...
'use strict'; // FUNCTIONS // var pow = Math.pow; // PARTIAL // /** * FUNCTION: partial( alpha, beta ) * Partially applies shape parameter `alpha` and rate parameter `beta` and returns a function for evaluating the moment-generating function (MGF) for a gamma distribution. * * @param {Number} alpha - shape paramet...
import moment from 'moment'; import 'moment/locale/fr'; import 'moment-timezone'; moment.locale('fr'); export const dayMonthYear = (timestamp, timezone) => ( !timezone ? moment(timestamp).format('Do MMMM YYYY') : moment(timestamp).tz(timezone).format('Do MMMM YYYY') ); export const dayMonthYearAtTime = (timest...
/*! * Module : taste-express-api * Function : 学习express-api的用法 * Project : node-taste * License : Copyright © 2017 Shanghai Zhenhua Heavy Industries Co., Ltd. All rights reserved * Author : Create by Colin Wu on 2017/6/8 */ var express = require('express') var app = express() var admin = express() var rout...
import Ember from 'ember'; import { module, test } from 'qunit'; import ConfigProxyObject from 'ember-beam/utils/config-proxy'; let registry, container; module('Utils / Config-proxy', { beforeEach: function() { registry = new Ember.Registry(); container = registry.container(); }, afterEach: function(...
'use strict'; var S = require('string'); var os = require('os'); var exec = require('child_process').exec; var p4options = require('./p4options'); var ztagRegex = /^\.\.\.\s+(\w+)\s+(.+)/; // build a list of options/arguments for the p4 command function optionBuilder(options) { options = options || {}; var resul...
import createError from 'http-errors'; // inject:route-imports import userRoute from '../../api/user'; import thingRoute from '../../api/thing'; import authRoute from '../../auth'; export default app => { // inject:route-usage app.use('/api/users', userRoute); app.use('/api/things', thingRoute); app.use('/a...
const babel = require('rollup-plugin-babel'); const argv = require('yargs').argv; module.exports = (config) => { // Example set of browsers to run on Sauce Labs // Check out https://saucelabs.com/platforms for all browser/platform combos var customLaunchers = { sl_edge: { base: 'SauceLabs', brows...
var %(name)s = (function(globals,undefined){ var jsbuild = (function(){ var cache = {}; function Module(){ this.exports = null; this.fileName = null; this.id = null; this.workingDir = null; this.wrapper = null; }; Module.prototype.call = function(){ this.exports...
var CLog = require('./node-syncognite-util.js'); var XE = require('../node-syncognite.js'); // https://www.npmjs.com/package/twitter var TW = require('twitter'); // https://github.com/thisandagain/sentiment var Sentiment = require('sentiment'); var sentiment = new Sentiment(); function twitterSetEntity(entity, proper...
"use strict"; exports.__esModule = true; exports["default"] = void 0; var _jsxRuntime = require("react/jsx-runtime"); //import PropTypes from "prop-types"; var _isArr = Array.isArray, S_ROOT_DIV = { color: '#f44336', padding: '5px 0 0 10px' }, S_NUMBER = { display: 'inline-block', width: 22, height...
version https://git-lfs.github.com/spec/v1 oid sha256:d661d17c0e533b3c7fd29e3b4d6715f58688f8122556a5a118a296f50f5fc581 size 5829
var config = require('../config/config.js'); var express = require('express'); module.exports = require('express').Router() ;
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. /// <reference path="ms-appx://WinJS.2.1/js/WinJS.js" /> (function (global) { global.WinJS = global.WinJS || {}; WinJS.Utilities =...
import React from 'react'; import styles from './Footer.scss'; const Footer = () => ( <div className={styles.Footer}> <div className={styles.Footer__container}>Footer</div> </div> ); export default Footer;
var table; $(document).ready(function() { table = $("#grid"); get_dados_grid(); $('#grid tbody').on( 'click', 'tr', function () { if ( $(this).hasClass('active') ) { limpar_selecao_grid(); } else { table.find('tr.active').removeClass('active'); $(this).addClass('active'); var id = table.find('tr...
/* eslint-env mocha */ 'use strict' const assert = require('assert') const Scalar = require('..').Scalar describe(Scalar.name, () => { it('can be constructed with a value', () => { class Name extends Scalar {} const name = new Name('Bobby') assert.equal(name.value, 'Bobby') }) it('can be constructe...
var runSequence = require( 'run-sequence' ); /** * Gulp task to build the app for production * @param {object} config Global configuration * @return {function} Function task */ module.exports = function ( config ) { return function ( cb ) { runSequence( 'clean', 'browserify', 'postcss', cb ); ...
app.directive('fcText', function(utils) { return { restrict: 'AEC', templateUrl: 'dist/components/form-elements/text/text.html', scope: { label: '=', model: '=', mode: '=?' }, link: function(scope, element, attrs, controller) { ...
function solve() { // TODO }
/*** * * Symphony web publishing system * * Copyright 2004–2006 Twenty One Degrees Pty. Ltd. * * @version 1.7 * @licence https://github.com/symphonycms/symphony-1.7/blob/master/LICENCE * ***/ // Class Framework var Class = { create: function() { var instance = this.identify && this.identify.apply(this, ar...
// ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS /* * @license jqGrid 4.4.5 - jQuery Grid * Copyright (c) 2008, Tony Tomov, tony@trirand.com * Dual licensed under the MIT and GPL licenses * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl-2.0.html * Date: 20...
(function(app) { var TEMPLATE_PATH = 'elementTypes/'; app.ElementType = ElementType; /** * @constructor * @param {Object} data */ function ElementType(data) { /** * @type {String} */ this.id = data.id; /** * @type {String} */ this.name = data.name; /** ...
(function (arguman) { arguman.utils = { adder: function (a, b) { return a + b } }; arguman.KeyboardManager = Class.extend({ currentElement: null, init: function (options) { $.extend(this, options); this.$el = $(this.el); this....
import { h3, h } from "../h3.js"; import octicon from "../services/octicon.js"; export default (actions) => { return h( "div.action-bar.form-actions.p-2", actions.map((a, index) => h( `button.btn.btn-${a.primary ? "primary" : "invisible"}${ a.classList && a.classList.length > 0 && "."...
/* global describe, it, require */ 'use strict'; // MODULES // var // Expectation library: chai = require( 'chai' ), // Check whether an element is a finite number isFiniteNumber = require( 'validate.io-finite' ), // Module to be tested: cdf = require( './../lib/deepset.js' ); // VARIABLES // var expect = c...
#!/usr/bin/env node 'use strict'; var path = require('path'); var EOL = require('os').EOL; var format = require('util').format; var spawn = require('child_process').spawn; var npmlog = require('npmlog'); var glob = require('glob').sync; var onetime = require('onetime'); var objectAssign = require('object-assign'); var ...
import DOM from './DOM' import PropTypes from 'prop-types' import React, { Component } from 'react' import styled from 'styled-components' export default class App extends Component { static propTypes = { name: PropTypes.string.isRequired, description: PropTypes.string.isRequired, templates: PropTypes.ob...
(function (root, factory) {if (typeof define === 'function' && define.amd) {define(['exports', 'echarts'], factory);} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {factory(exports, require('echarts'));} else {factory({}, root.echarts);}}(this, function (exports, echarts) {var log = func...
(function( root, factory ) { // Set up appropriately for the environment. // Start with AMD. if ( typeof define === 'function' && define.amd ) { define( [ 'handlebars', 'string/markdown' ], function( Handlebars ) { f...
var rippleTypeAttr = 'data-event'; /** * @param {!Event|!Touch} event * @return {Node} */ function getHolderWithRippleJsClass(event) { var holder = /** @type {!Node} */ (event.target); var childNodesLength = holder.childNodes.length; if (holder.localName !== 'button' || !childNodesLength) { return holde...
/* * DAlert jQueryPlugin * dalert.alert("Making the Alert Box much simpler, yet fancy"); * Version: 1.1.0 * Author: Dilusha Gonagala (andrewdex) * Dependencies : Jquery 1.6 + , Jquery UI 1.6 + Jquery UI CSS Framework * Info & API : http://andrewdex.github.io/dalert/ * Contribute : http://www.github.com/andrewdex...
/** * @module file-lips */ "use strict"; var assert = require('assert'); var implementor = require('../../implementor.js'); var Listener = require('./Listener'); var Implementation = implementor.createImplementation(addListener, removeListener); /** * file-lips specific addListener function * * @param {object...
// Generated by CoffeeScript 1.6.3 (function() { 'use strict'; angular.module('ParsePartyApp.services').factory('_', function(jsBridge) { jsBridge.then(function(jsBridge) { jsBridge.send('thing ' + JSON.stringify(window._) + ' ' + JSON.stringify(_)); }); return window._; }); }).call(this);
(function () { 'use strict'; /** * @ngdoc service * @name $mdTabInkRipple * @module material.core * * @description * Provides ripple effects for md-tabs. See $mdInkRipple service for all possible configuration options. * * @param {object=} scope Scope within the current ...
/** * Created by ryan.king on 9/30/2015. */ (function() { angular.module('notely.login') .service('loginService', loginService); loginService['$inject'] = ['$http', 'constants'] function loginService($http, constants) { this.login = function(user) { return $http.post(constants...
// generated on 2016-10-05 using generator-webapp 2.2.0 const gulp = require('gulp'); const gulpLoadPlugins = require('gulp-load-plugins'); const browserSync = require('browser-sync'); const del = require('del'); const wiredep = require('wiredep').stream; const runSequence = require('run-sequence'); const $ = gulpLoad...
require([ 'backbone', 'master/team/router/router' ], function(Backbone, RouterMaster) { new RouterMaster(); Backbone.history.start(); // if (!location.hash) { // Backbone.history.navigate('//', { // replace: true // }); // } });
// - -------------------------------------------------------------------- - // var fs = require("fs"); var db = require("bauer-db"); var cwd = __dirname; var log = fs.createWriteStream(cwd + "/db-error.txt",{ flags: "a+" }); var server = new db.cls.Server(); server.listen(); server.on("listening",function() { var...
var isOrgApp = function (owner) { return (/@herokumanager\.com$/.test(owner)); }; module.exports.isOrgApp = isOrgApp; var isValidEmail = function (email) { return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$...
/** * Creates a new instance of Widget. * * @class Widgets allow you to add HTML elements on top of the game canvas without blocking input to the game. Each widget is a free-floating div element that can have any HTML content added to it. * @param {string} html Initial HTML content for the widget. * @param {n...
export const GET_ITEMS_BY_SET_ID = { "results": [ { "item": { "number": 1, "name": "official logo 1/2", "grouping": "intro", "setId": 1 }, "friendsInNeed": [], "friendsWithSwap": [] }, { "item": { "number...
import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { fillIn, triggerEvent, render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; module('Integration | Component | credit-card-input', function(hooks) { setupRenderingTest(hooks); test('Visa fo...
import React from 'react' import Lucky from './Lucky' import PropTypes from 'prop-types' import ReactCssTransitionGroup from 'react-addons-css-transition-group' import './LuckyList.css' export default function LuckyList({ objList, handleLuckyDelete }, { titles }) { const luckyList = objList && objList.map((v) => { ...
(function () { 'use strict'; angular.module('splash', ['ngMaterial', 'ngRoute']) .config(['$routeProvider', function ($routeProvider) { $routeProvider.when('/', { templateUrl: 'src/splash/view/splash.html', controller: 'SplashController' }); }]); })();
/** * This file contains the slides deck route callback and other routing functions. */ var Promise = require('bluebird'), fileSystem = Promise.promisifyAll(require('fs-extra')), url = require('url'), cheerio = require('cheerio'); module.exports = function() { var deckRoute = function(req, res, slides...
import { each, map, filter, contains } from './util' import syntax from './syntax' let SYNTAX = syntax() const openRE = /^<([^ \/!]+?)( [^>]+)*?>/ const closeRE = /^<\/(?:[^ \/]+?)(?: [^>]+)*?>/ const commentRE = /^<!--(.+?)-->/ const attrRE = /([^= ]+)(?:=("[^"]*"|'[^']*'|[^"'\s>]*))?/g function openTok...
module.exports = function(grunt){ grunt.initConfig({ seed: { /*src: ['static/poli_0.csv', 'static/poli_1.csv', 'static/poli_2.csv', 'static/poli_3.csv', 'static/poli_4.csv', 'static/poli_5.csv', 'static/poli_6.csv', 'static/poli_7.csv', 'static/poli_8.csv', 's...
String.prototype.hashCode = function(){ var hash = 0, i, char; if (this.length == 0) return hash; for (i = 0, l = this.length; i < l; i++) { char = this.charCodeAt(i); hash = ((hash<<5)-hash)+char; hash |= 0; // Convert to 32bit integer } return hash; }; Array.prototype.dif...
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex...
/** * Mongoose connection */ import mongoose from 'mongoose'; import bluebird from 'bluebird'; import { databaseUrl, databaseOptions } from '../config'; /** * Make bluebird default mongoose promises library not using MongoDB driver */ mongoose.Promise = bluebird; const mongooseConn = mongoo...
/* An abstract class for the "basic" views, as well as month view. Renders one or more rows of day cells. ----------------------------------------------------------------------------------------------------------------------*/ // It is a manager for a DayGrid subcomponent, which does most of the heavy lifting. // It i...
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("sjcl")); else if(typeof define === 'function' && define.amd) define(["sjcl"], factory); else if(typeof exports === 'object') exports["keymakerToolbox"] = f...
import { vector } from '../vector'; export const vectorLib = { tearDown() { // nothing to do yet }, setUp() { const v1 = vector.create(10, 5); // Adding const v2 = vector.create(1, 2); const v3 = v1.add(v2); // Subtracting const v4 = v3.subtract(v2); // Multiplication const v5...
/** * modelFactory makes working with RESTful APIs in AngularJS easy * @version v0.2.4 - 2015-02-17 * @link https://github.com/swimlane/model-factory * @author Austin McDaniel <amcdaniel2@gmail.com> * @license MIT License, http://www.opensource.org/licenses/MIT */ (function() { /* global angular:false */ 'use s...
export default function sidebarDirective(){ var directive = { link: link, template: require('./sidebar.html'), restrict: 'EA', scope: {} }; return directive; function link(scope, element, attrs) { scope.openLeftMenu = function(){ $mdSidenav('left').to...
var spawn = require('child_process').spawn; var carrier = require('carrier'); var _ = require('lodash'); var defaultOptions = { command: /^win/.test(process.platform) ? 'casperjs.bat' : 'casperjs', script: __dirname + '/../../lib/bootstrap.js', spooky_lib: __dirname + '/../../', transport: 'stdio' }; ...
import React, { Component, PropTypes } from 'react' import classNames from 'classnames' import styles from './button.scss' export default class Button extends Component { constructor (props) { super(props) this.handleClick = this.handleClick.bind(this) } static propTypes = { name:...
/* eslint-disable promise/always-return */ import { runQuery } from "schema/v1/test/utils" describe("HomePageFairsModule", () => { it("works", () => { const runningFairs = [ { mobile_image: null, id: "artissima-2017", default_profile_id: "artissima-2017", start_at: "2017-11-...
/** * Created by marco on 10/01/2015. */ module.exports={ options: { compress: { drop_console: true }, sourceMap: true, stripbanners: true, banner: '<%= banner.compact %>', mangle: { except: ['cssr'] } }, dist: { src: ...
// If you have python installed // run the following command from the root // of the project: // python -m SimpleHTTPServer // and navigate to localhost:8000 // It won't work locally because of CORS restrictions // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS // for more // Create XMLHttp...
navigator.serviceWorker.register('/serviceWorker.js', {scope: '/foo/'})
/*********************************************************************** A JavaScript tokenizer / parser / beautifier / compressor. https://github.com/mishoo/UglifyJS -------------------------------- (C) --------------------------------- Author: Mihai Bazon <...
(function(global) { var addEvent = null; if ( document.addEventListener ) { addEvent = function(element, eventName, callback) { return element.addEventListener( eventName, callback, false ); }; } else if ( document.attachEvent ) { addEvent = function(element, event...
'use strict'; // Karma configuration // Generated on Sat Oct 05 2013 22:00:14 GMT+0700 (ICT) module.exports = function(config) { config.set({ // base path, that will be used to resolve files and exclude basePath: '../../', // frameworks to use frameworks: ['jasmine'], ...
let foo; function funkyFunc(str) { console.log(str); } function testFunc() { console.log('over here'); } export const __test__ = { test1: funkyFunc, test2: testFunc }; export default funkyFunc;
import mdIcon from './mdIcon.vue'; import mdIconTheme from './mdIcon.theme'; export default function install(Vue) { Vue.component('md-icon', Vue.extend(mdIcon)); Vue.material.styles.push(mdIconTheme); }
/*---------------------------- EVENT: DELEGATE -----------------------------*/ (function(plugin) { var BUTTON_TYPES = { 'image': 1, 'reset': 1, 'submit': 1 }, REAL_EVENT_TYPE = { 'delegate:blur': 'blur', 'delegate:focus': 'focus' }, CHANGEABLE_ELEMENTS = { 'INPUT': 1, 'SELECT': 1, 'TEXTAREA':...
import Ember from 'ember'; import DS from 'ember-data'; const { Transform } = DS; const { $ } = Ember; export default Transform.extend({ deserialize(value) { if (!$.isPlainObject(value)) { return {}; } else { return value; } }, serialize(value) { if (!$.isPlainObject(value)) { ...
import React from 'react'; import { RouteHandler } from 'react-router'; class Main extends React.Component { } ; export default Main;
'use strict' var peacock = require('..') function wrapped(s) { return [ '<div class="highlight"><pre>' , s , '</pre></div>' ].join('\n') } function run(t, cases, opts) { Object.keys(cases).forEach(function(k) { var vals = cases[k] var code = vals[0] var high = vals[1] t.equals(pe...
/* Base Controller */ "use strict"; var q = require('q'); var $ = require('jquery'); var PageManager = require('slyn-page-manager'); var controller = function(backboneView, model) { this.backboneView = backboneView || null; this.modelClass = model || null; this.view = null; this.model = null; ...
/** * Ce fichier contient les actions que l'utilisateur * peut effectuer dans l'application. * En l'occurence ici on est sur les features d'account. */ import AppDispatcher from '../dispatchers/AppDispatcher'; import bankConstants from '../constants/constants'; const BankActions = { /** * Action de base, per...
var fs = require( 'fs' ) var File = require( './' ) module.exports = function open( flags, mode, callback ) { var self = this if( arguments.length === 2 ) { callback = mode mode = void 0 } else if( arguments.length === 1 ) { callback = flags flags = self.flags } if( typeof callback === 'fu...
/** * Created by garusis on 22/06/17. */ var Ship = require("./Ship"); var Bullet = require("./Bullet"); var serverParts = require("../server-parts"); var settings = require("../settings"); var io = serverParts.io; var targets = []; function findCollisionBody(bodyA) { return targets.find(function (bodyB) { ...
import { render } from '@ember/test-helpers'; import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; module('Helper: ResponsiveImageResolve', function (hooks) { setupRenderingTest(hooks); test('works without size', async function (asse...
$(document).ready(function () { $.fn.select24entity = function (options) { var $s24 = $(this), cache = []; var baseParam = { ajax: { transport: function (params, success, failure) { // is caching enabled? if ($s24.data('ajax--cache')) { var key = params.data.q, c...
var _ = require('..'); function add(x, y) { return x + y; } function bytwo(x) { return x * 2; } exports['compose two simple functions'] = function (test) { var fn = _.compose(bytwo, add); test.ok(fn); test.ok(typeof fn == 'function'); test.equal(fn(2, 3), 10); };
var Dictionary = require("@kaoscript/runtime").Dictionary; module.exports = function() { function foo() { return (() => { const d = new Dictionary(); d.x = 1; d.y = 2; return d; })(); } let {x, y} = foo(); console.log(x, y); };
App.Views.Header = Backbone.View.extend({ template: JST['app/templates/header.html'], events: { 'click .logout': '_logout', 'click .login': '_login' }, initialize: function(){ var self = this; this.auth = new FirebaseSimpleLogin(App.FirebaseRef, function(error, user){ if (error) console....
darjeelingApp.directive('scrollIf', function () { return function (scope, element, attributes) { scope.$watch(attributes.scrollIf, function(value) { if (value) { document.getElementById("main-content").scrollTop = element[0].offsetTop - 15; } }); } }); da...
'use strict'; var xtend = require('xtend') , runnel = require('runnel') , dockops = require('dockops') function inspect(obj, depth) { console.error(require('util').inspect(obj, false, depth || 5, true)); } function run(containers, opts, imageNames, cb) { var tasks = imageNames .map(function (imageName...
import React from 'react'; import styled from '@emotion/styled'; import { lengths } from 'netlify-cms-ui-default'; import ViewStyleControl from './ViewStyleControl'; import SortControl from './SortControl'; import FilterControl from './FilterControl'; import GroupControl from './GroupControl'; const CollectionControl...
const mongoose = require('mongoose'); const PublisherSchema = new mongoose.Schema({ name: { type: String, required: true, minlength: 2, maxlength: 256 }, createdBy: String, createdAt: { type: Date, default: Date.now }, updatedAt: Date, deletedAt: Date }); PublisherSchema.virtual(...
(function(){ var data, $window, $container, $menu, $modal, calcContainerSize; data = [ { image: 'img/steve.jpg', title: 'Steve', content: 'A man who lives in a block world.' }, { image: 'img/steve.jpg', title: 'Another Steve', content: 'Well, Steve again.' }, { ...
angular.module('oto').controller('LoginCtrl', ['$rootScope', '$scope', '$location', '$window', 'Auth', function($rootScope, $scope, $location, $window, Auth) { $scope.loginFormState = { loginError: false }; $scope.rememberme = true; $scope.login = function() { Auth.login({ username:...
'use strict'; /** * @ngdoc function * @name nodersApp.controller:PartnersCtrl * @description * # PartnersCtrl * Controller of the nodersApp */ angular.module('nodersApp') .controller('PartnersCtrl', ['$scope', '$http', function($scope, $http) { $http.get('http://api.noders.com/api/partners') ...
import EnvUtil from '../EnvUtil' import Encoder from '../Encoder' import md5 from './Hash/md5' import nodeCrypto from 'crypto' const meta = { name: 'hash', title: 'Hash function', category: 'Modern cryptography', type: 'encoder' } const algorithms = [ { name: 'md5', label: 'MD5', blockSize: 64,...
/** * 字符串处理 * @type {exports} */ var fs = require('fs') ; var path = require('path') ; var StringUtils = {}; //异步的实现 StringUtils.mkdir = function(dirpath, mode, callback) { if(arguments.length === 2) { callback = mode; mode = 0777; } console.log("dirpath:"+dirpath) ; fs.exists(dirpath,...
/* DESCRIPTION: Get a random number between 0 and max (default 100) AUTHOR: Cristian Baldi COMMANDS: !roll [max] EXAMPLE: You: !roll Bot: 4 */ var Util = require('./../src/Util'); var roll = function(){ MAX_DEFAULT = 100; this.properties = { ...
exports.urlToFielName = function(url) { var urlParts = url.split("#"); var pageName = urlParts[1] ? urlParts[1] : "index"; if (pageName[pageName.length - 1] === '/') { pageName = pageName.substr(0, pageName.length - 1); } pageName = pageName == 'index' ? pageName : '.' + pageName; var path = pageName + '.html';...