code stringlengths 2 1.05M |
|---|
var templates = []
var icons = {
"application/vnd.ms-excel" : "fa-file-excel-o",
"text/plain" : "fa-file-text-o",
"image/gif" : "fa-file-image-o",
"image/png" : "fa-file-image-o",
"application/pdf" : "fa-file-pdf-o",
"application/x-zip-compressed" : "fa-file-archive-o",
"application/x-gzip" ... |
/* Mastermind */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(['backbone', 'underscore', 'backbone.radio'], function (Backbone, _) {
return (root.Mastermind = root.Mm = factory(root, Backbone, _));
});
} else if (typeof exports !== 'undefined') {
var Backb... |
/**
* dirPagination - AngularJS module for paginating (almost) anything.
*
*
* Credits =======
*
* Daniel Tabuenca:
* https://groups.google.com/d/msg/angular/an9QpzqIYiM/r8v-3W1X5vcJ for the idea
* on how to dynamically invoke the ng-repeat directive.
*
* I borrowed a couple of lines and a few attribute n... |
$(function(){
var attach = function($fileInput, policy_url, el){
$fileInput.fileupload({
paramName: 'file',
autoUpload: true,
dataType: 'xml',
add: function(e, data){
$(el).attr('class', 's3direct progress-active')
$.ajax({
url: policy_url,
ty... |
import ObjectProxy from '@ember/object/proxy';
import { computed } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import fixProto from 'ember-light-table/utils/fix-proto';
/**
* @module Table
* @extends Ember.ObjectProxy
* @class Row
*/
export default class Row extends ObjectProxy.extend(... |
'use strict';
/* Controllers */
angular.module('myApp.controllers', ['myApp.services', 'restangular'])
.controller('myController', [
"$scope", "$filter", "cardRes", "balRes", "Restangular",
function($scope, $filter, cardRes, balRes, resty) {
var Restangular = resty.all('api');
var newCard = {... |
/*
Module dependencies.
*/
var Stack = require('digger-stack');
var Mongo = require('digger-mongo');
var Static = require('digger-static');
var Mailgun = require('digger-mailgun');
module.exports = function(config){
config = config || {};
var mongo_hostname = config.MONGO_ADDR || process.env.MONGO_PORT_27017_TC... |
/*!
* js-comments <https://github.com/jonschlinkert/js-comments>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
/**
* Module dependencies.
*/
var fs = require('fs');
var path = require('path');
var relative = require('relative');
var union = require('arr-union'... |
function setup(){
createCanvas(innerWidth, innerHeight);
}
function draw(){
background('lightblue');
if(dist(mouseX, mouseY, width/2, height/2) > 50){
fill('red')
} else {
fill('green');
}
ellipse(width/2, height/2, 100, 100);
}
|
/*********************************************
* skel/MoSyncApp/LocalFiles/js/yloader.js
* YeAPF 0.8.48-103 built on 2016-05-24 18:54 (-3 DST)
* Copyright (C) 2004-2016 Esteban Daniel Dortta - dortta@yahoo.com
* 2016-03-07 13:46:13 (-3 DST)
* First Version (C) 2014 - esteban daniel dortta - dortta@yahoo.com
... |
var express = require('express');
var app = express();
var port = 4000;
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res) {
res.sendFile(__dirname + '/public/index.html');
});
app.listen(port, function(req, res) {
console.log("Listening to: " + port);
}); |
const path = require('path');
const fs = require("fs");
const copy = require('fs-extra').copySync;
const Handlebars = require('handlebars');
const j = require('jscodeshift');
const transform = require('./transform');
const ora = require('ora');
const chalk = require('chalk');
let spinner;
module.exports = function a... |
var app = require('./app')
, repl = require('repl')
, context = repl.start('blog> ').context
context.app = app
context.db = app.db
|
define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
'use strict';
var dom = require("../../lib/dom");
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
background-color: #F7F7F7;\
color: black;\
box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55)... |
#!/usr/bin/env node
const user = {
name: '王顶',
age: 41,
qq: '408542507'
};
const log = console.log;
// 三种占位符
log('name: %s', user.name); // 字符串类型
log('age: %d', user.age); // 整数类型
log('JSON: %j', user); // 对象类型
log('qq: %s', user.qq); // 输出方式一:占位符输出
log('qq:', user.qq); // 输出方式二... |
import { errorHandler } from './error';
import { headerSet } from '../util/httpHeaders';
import * as util from '../util/requestUrlUtil';
let path = '';
let base = '';
const cType = 'application/json'
let cj = {};
var friends = [];
const groupHandler = (req, res) => {
base = util.getBaseUrl(req)
let href = uti... |
"use strict";
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { v... |
const models = require('../../models/models.js');
const uuid = require('uuid');
const config_service = require('../../lib/configService.js');
const config = config_service.get_config();
const debug = require('debug')('idm:api-authenticate');
const user_api_controller = require('../../controllers/api/users.js');
const ... |
'use strict';
const Ftp = require('ftp');
class FtpClient {
constructor(options) {
this.options = options;
}
connect() {
this.ftp = new Ftp();
return new Promise((resolve, reject) => {
let ready = false;
this.ftp.on('ready', () => {
ready = true;
resolve();
});
... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.DriverDOM = {}));
}(this, (function (exports) {
var didWarnInvalidHydration = false... |
var Layer = require('../')
var Rec2 = require('rec2')
var tape = require('tape')
tape('layer1 gets the right tiles', function (t) {
var l = new Layer({scale: 1})
var mapBounds = new Rec2().set(0, 0)
mapBounds.bound.set(1000, 1000)
console.log(l.tileRange(mapBounds))
t.deepEqual(l.minTile.toJSON(), {x:0, y:0}... |
angular.module('app')
.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function ( $stateProvider, $urlRouterProvider, $locationProvider ) {
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('/');
$stateProvider
.state('map', {
url: '/',
controller:'MapControll... |
// Action types
export const REQUEST_MAKE = 'REQUEST_MAKE';
export const REQUEST_FAILED = 'REQUEST_FAILED';
export const REQUEST_COMPLETED = 'REQUEST_COMPLETED';
// Other variables
export const REQUEST_STATUS = {
LOADING: 'LOADING',
FAILED: 'FAILED',
SUCCESS: 'SUCCESS'
};
// Action creators
export function requ... |
import { runCallbacksAsync } from 'meteor/vulcan:core';
import escapeStringRegexp from 'escape-string-regexp';
import { Picker } from 'meteor/meteorhacks:picker';
import Posts from '../collection.js';
Picker.route('/out', ({ query}, req, res, next) => {
if(query.url){ // for some reason, query.url doesn't need to be... |
var fs = require('fs');
var sysPath = require('path');
var colors = require('colors');
var mkdirp = require('mkdirp');
var artTemplate = require('art-template');
var childProcess = require('child_process');
var marked = require('marked');
var glob = require('glob');
var fse = require('fs-extra');
var parsers = require... |
import React, { Component } from 'react';
import Canvas from './helpers/canvas';
import { SetDefaultCanvas, SetCanvasText, ResetCanvas, SetCanvasBorder, LoadImg } from './helpers/helpers';
import { PongInstructions, SnakeInstructions } from './helpers/instructions';
import GameHome from './game-home';
import Retro... |
//! moment.js locale configuration
//! locale : Central Atlas Tamazight [tzm]
//! author : Abdel Said : https://github.com/abdelsaid
import moment from '../moment';
export default moment.defineLocale('tzm', {
months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
... |
/*
Commands to try:
node example.js --version
node example.js -v
node example.js dir
node example.js dir -l
node example.js --spawn [ ls -l ]
node example.js -s [ ls -l ]
node example.js --execute [ ls -l ]
node example.js -e [ ls -l ]
node example.js "something" --rebuild_command
node example.js "something" -r
... |
const path = require('path');
const config = require('../../../shared/config');
function servePreview(req, res, next) {
if (req.path === '/') {
const templatePath = path.resolve(config.get('paths').adminViews, 'preview.html');
return res.sendFile(templatePath);
}
next();
}
module.exports ... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
require('redux');
require('./turn-order-fc38e264.js');
require('immer');
require('./reducer-d0b6edbb.js');
require('./initialize-a9a217ca.js');
require('./base-4e44970d.js');
var master = require('./master-468d9986.js');
exports.Master = ... |
/* eslint-env mocha */
var P = require('autoresolve')
var path = require('path')
var fs = require('fs')
var rock = require(P('lib/rock'))
var testutil = require('testutil')
var nock = require('nock')
require('terst')
var TEST_DIR = null
var TMPL = 'Hi, @@author@@ is going to build:\n@@project-name@@.'
var TMPL_E = 'H... |
/*! Buefy v0.9.17 | MIT License | github.com/buefy/buefy */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.Toast = {}));
}(thi... |
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { useThemeVariants } from '@material-ui/styles';
import with... |
// Sample Event
// { "Filter": { "Name": "tag:TerminationGroup", "Values": [ "KILL_ME" ] } }
// Be shure to have an EC2 instance with tag "TerminationGroup" and value "KILL_ME"
// http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html#terminateInstances-property
var AWS = require('aws-sdk');
AWS.config.apiVer... |
var Class = require('./Class')
var map = require('./map')
var toArray = require('./toArray')
var isArray = require('std/isArray')
var URL = Class(function() {
this._extractionRegex = new RegExp([
'^', // start at the beginning of the string
'((\\w+:)?//)?', // match a possible protocol, like http://, ftp://, or ... |
import{borders,compose,display,flexbox,grid,palette,positions,shadows,sizing,spacing,typography,css}from"@material-ui/system";import styled from"../styles/styled";const styleFunction=css(compose(borders,display,flexbox,grid,positions,palette,shadows,sizing,spacing,typography)),Box=styled("div")(styleFunction,{name:"Mui... |
requireCore('user');
require(__rootdir + '/data-modules/anime');
require(__rootdir + '/data-modules/book');
require(__rootdir + '/data-modules/game');
requireCore('auth');
var mongoose = require('mongoose');
var config = require('./../config.json');
var testDataHelper = require('./testData-helper.js');
var expect = re... |
Ext.define('sisprod.model.ChemicalTreatmentModel', {
extend: 'Ext.data.Model',
require:[
'Ext.data.Model'
],
fields:[
{name: 'idChemicalTreatment', type: 'int', visible: false},
{name: 'chemicalTreatmentDate', type: 'date', visible: true, dateFormat: 'Y-m-d'},
{name: 'wel... |
var gulp = require('gulp');
require('require-dir')('./tasks');
gulp.task('assets', ['bower', 'tpl', 'jade', 'stylus', 'js']);
gulp.task('watch', ['assets'], function () {
gulp.watch(['./client/app/tpl/**/*.jade'], ['tpl']);
gulp.watch(['./client/app/jade/**/*.jade'], ['jade']);
gulp.watch(['./client/app/styl/**/*... |
'use strict';
var statisticController = require('../controllers/statisticController');
var apiConfig = require('../config/api.config.json');
var timestamp = require('../../config/timestamp.helper');
var that = {};
var run = function() {
for (var prop in apiConfig.statistics) {
if (!apiConfig.statistics.hasOwnPr... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwn... |
define([
'underscore',
'backbone',
'orotranslation/js/translator',
'oroui/js/mediator',
'oroui/js/tools',
'backbone-bootstrap-modal'
], function(_, Backbone, __, mediator, tools) {
'use strict';
var Modal;
var $ = Backbone.$;
/**
* Implementation of Bootstrap Modal
* ... |
/**
* Broadcast updates to client when the model changes
*/
'use strict';
var fs = require('fs');
var app = require('../../app');
var logger = require('log4js').getLogger('mediaSocket');
exports.client = function(socket) {
socket.on('start', function(data) {
onStart(socket, data);
});
socket.o... |
/**
*
* @param {Object} obj
* @returns {Array} of the values on the object
*/
Object.values = function (obj) {
var vals = [];
for( var key in obj ) {
if ( obj.hasOwnProperty(key) ) {
vals.push(obj[key]);
}
}
return vals;
}; |
/*
* Database schema.
* On this example we have the following schema on mongo:
* {"userId":"userIdValue",
* answers:[
* {"idUser":1111,"testNo":1,"answerNo":2,"answerValue":"answer1"},
* {"idUser":1111,"testNo":1,"answerNo":2,"answerValue":"answer1"}
* ]}
*/
var mongoose = require('mongoose');
var Schema = mo... |
define(['react','underscore'], function(React,_) {
var LazyLoadImg=React.createClass({displayName: "LazyLoadImg",
componentDidUpdate: function() {
console.log("algoCambio");
},
render:function(){
return React.createElement("img", {src: this.props.img, alt: this.props.alt})
}
});
var FeedN... |
function strchr (haystack, needle, bool) {
// From: http://phpjs.org/functions
// + original by: Philip Peterson
// - depends on: strstr
// * example 1: strchr('Kevin van Zonneveld', 'van');
// * returns 1: 'van Zonneveld'
// * example 2: strchr('Kevin van Zonneveld', 'van', true);
// * ... |
const path = require('path')
const { IgnorePlugin } = require('webpack');
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
module.exports = {
mode: 'production',
entry: './src/index.ts',
target: 'node',
node: {
global: true,
__filename: false,
__dirname: false,
},
plugins... |
function changeSize1(){
var d = document.getElementsByClassName('triangle1');
d[0].style.width = '700px';
d[0].style.height = '100px';
}
function reset1(){
document.getElementsByClassName('triangle1')[0].style.width = '600px';
document.getElementsByClassName('triangle1')[0].style.height = '100px';... |
'use strict'
module.exports = function SharedFlat (sequelize, DataTypes) {
let SharedFlat = sequelize.define('SharedFlat', {
name: DataTypes.STRING,
address: DataTypes.STRING
})
return SharedFlat
}
|
'use strict';
var _ReactInstrumentation = require('react/lib/ReactInstrumentation');
var _ReactInstrumentation2 = _interopRequireDefault(_ReactInstrumentation);
var _ReactDOMUnknownPropertyHook = require('react/lib/ReactDOMUnknownPropertyHook');
var _ReactDOMUnknownPropertyHook2 = _interopRequireDefault(_ReactDOMUn... |
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{8450:[666,18,702,35,702],8453:[676,14,855,47,808],8458:[441,219,738,30,678],8459:[687,15,997,53,991],8461:[653,0,732,17,767],8462:[668,11,513,45,483],8464:[675,15,897,26,888],8466:[687,15,946,33,931],8469:[653,0,727,25,755],8470:[668... |
const utils = require("../utils.js");
var sqlite3 = require("sqlite3");
exports.run = (client, message, config, sconfig, args) => {
if (utils.isDM(message)) {
return "Sorry " + message.author.username +", you have to be in a Discord Server to run this command.";
}
if (utils.isRaidCoordinator(message... |
/*!
* Native JavaScript for Bootstrap - Carousel v4.1.0alpha1 (https://thednp.github.io/bootstrap.native/)
* Copyright 2015-2022 © dnp_theme
* Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== '... |
/** @license React vundefined
* react.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !... |
"use strict";
var _extends = require("@babel/runtime/helpers/extends"), react = require("@emotion/react"), _taggedTemplateLiteral = require("@babel/runtime/helpers/taggedTemplateLiteral"), _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"), AutosizeInput = require("react-input-autosiz... |
/**
* vee-validate v3.1.0
* (c) 2019 Abdelrahman Awad
* @license MIT
*/
/**
* Some Alpha Regex helpers.
* https://github.com/chriso/validator.js/blob/master/src/lib/alpha.js
*/
var alpha = {
en: /^[A-Z]*$/i,
cs: /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,
da: /^[A-ZÆØÅ]*$/i,
de: /^[A-ZÄÖÜß]*$/i,
... |
/*!
* chartjs-plugin-datalabels v2.0.0
* https://chartjs-plugin-datalabels.netlify.app
* (c) 2017-2021 chartjs-plugin-datalabels contributors
* Released under the MIT license
*/
import { isNullOrUndef, merge, toFont, resolve, toPadding, valueOrDefault, callback, isObject, each } from 'chart.js/helpers';
import { d... |
/*!
* DevExpress Gantt (dx-gantt)
* Version: 3.1.27
* Build date: Fri Oct 29 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof ex... |
"use strict";
var attachComments = require("./attachComments");
var convertComments = require("./convertComments");
var toTokens = require("./toTokens");
var toAST = require("./toAST");
module.exports = function(ast, traverse, tt, code) {
// remove EOF token, eslint doesn't use this for anything and it interferes
... |
// @flow
const foo: $TEMPORARY$object<{| x?: number, y: number |}> = { y: 0 };
const bar: $TEMPORARY$object<{| [string]: number |}> = {foo: 3};
|
<<<<<<< HEAD
const Discord = require("discord.js");
exports.run = (client, message, args) => {
if (!message.mentions.users.first()) return message.edit('Failed to blocked a bitch, check your codes.');
message.mentions.users.first().block().then(() => {
message.edit("Bitch has bee blocked!");
})
};
=======
co... |
import React from 'react';
import set from 'lodash/set';
import has from 'lodash/has';
import controlTypes from '../../../../CustomMetadataForm/controlTypes';
import renderConstraintForm from './renderConstraintForm';
import getPropKeys from './getPropKeys';
import getControlType from './getControlType';
import Row fro... |
/* */
require("../../modules/es7.reflect.has-own-metadata");
module.exports = require("../../modules/_core").Reflect.hasOwnMetadata;
|
define(["foo"], function (_foo) {
"use strict";
(0, _foo.named)();
});
|
'use strict';
let request = require('superagent-bluebird-promise');
var xchange = function (base, currencies, options) {
if (!Array.isArray(currencies) || currencies.length == 0)
return Promise.reject(new Error('currencies must not be empty'));
let pairs = currencies
.map(c => '"' + base + c ... |
/*
* File: app/model/modTipoTransmision.js
*
* This file was generated by Sencha Architect version 4.1.2.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 5.1.x library, under independent license.
* License of Sencha Architect does not include license for Ext JS 5.1.x. For mor... |
var WebSqlDB = function(successCallback, errorCallback) {
this.initializeDatabase = function(successCallback, errorCallback) {
// This here refers to this instance of the webSqlDb
var self = this;
// Open/create the database
this.db = window.openDatabase("ToDoDB", "1.0", "Todo Dem... |
/**
* 401 (Unauthorized) Response
*
* Similar to 403 Forbidden.
* Specifically for use when authentication is possible but has failed or not yet been provided.
* Error code response for missing or invalid authentication token.
*/
module.exports = function (data, code, message, root) {
// TODO: make transform c... |
'use strict';
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var precss = require('precss');
var autoprefixer = require('autoprefixer');
module.exports = {
entry: {
bundle: __dirname + '/public/index.js',
shimsbundle: __dirname + '/public/shims.js'
},
output: {
path: __dir... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } }... |
jest.mock('pkginfo', () => () => ({ version: '1.0.0' }));
const parseArgs = require('../src/parseArgs');
describe('parseArgs', () => {
it('should have correct defaults', () => {
expect(parseArgs(['node', 'micro-analytics'])).toMatchSnapshot();
});
it('should throw on non existing adapter', () => {
expec... |
//>>built
define(["../_base"],function(c){var a=c.constants,b={"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"abstract":1,assert:1,"const":1,"byte":1,"for":1,"final":1,"finally":1,"implements":1,"import":1,"extends":1,"long":1,"throw":1,"instanceof":2,"static":1,"protected":1,"boolean":1,"interfa... |
{
"name": "kiwappQRCode.js",
"url": "https://github.com/kiwapp/kiwappQRCode.git"
}
|
var menuWidth = 260;
function showDynamicModal(heading, content) {
var m = $('#dynamicModal');
m.find('h4').text(heading);
m.find('pre').text(content);
m.openModal({ in_duration: 200 });
}
$('.details-container').click(function(evt) {
var t = $(evt.target);
if (t.is('.showStatusMessage') ... |
const FilesLoader = Jymfony.Component.Validator.Mapping.Loader.FilesLoader;
const YamlFileLoader = Jymfony.Component.Validator.Mapping.Loader.YamlFileLoader;
/**
* Loads validation metadata from a list of YAML files.
*
* @see FilesLoader
*
* @memberOf Jymfony.Component.Validator.Mapping.Loader
*/
export default ... |
describe('dev-theme', function() {
beforeEach(function() {
browser().navigateTo(mainUrl);
});
it('should have bs3 theme classes', function() {
var s = '[ng-controller="DevTheme"] ';
var a = s + 'a#e-attrs ';
// click on body
element(a).click();
expect(element(a).css('display')).toBe('no... |
var core = module.exports = { version: '2.6.2' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
var update = require("react/lib/update");
function DB(initialData) {
this.data = initialData || {};
}
module.exports = DB;
DB.prototype.get = function(id, createDefaultData) {
var d = this.data["_" + id];
if(!d) {
return this.data["_" + id] = createDefaultData;
}
return d;
};
DB.prototype.update = function(i... |
'use strict';
// Product Model
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ProductSchema = new Schema({
code: {
type: String,
required: true,
trim: true
},
name : String,
description : String,
tokens : Number,
created_at: Date,
updated_at: Date,
});
ProductSchema.... |
/* Estonian initialisation for the jQuery UI date picker plugin. */
/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
(function (factory) {
// AMD. Register as an anonymous module.
module.exports = factory(require('../datepicker'));;
}(function (datepicker) {
datepicker.regional['et'] = {
... |
var snare = require('../');
var d = snare();
return function (t) {
return d(t % (1/2));
};
|
'use strict';
/**
* @ngdoc function
* @name googleLogin.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the googleMain
*/
angular.module('googleLogin')
.controller('MainCtrl', ['$location', '$scope', 'AuthenticationService', 'SafeApply',
function (location, scope, authenticationService, saf... |
'use strict';
module.exports = function (grunt) {
var _ = require('lodash');
var fs = require('fs');
var defaultConfig = require('./default-config.js');
var localConfig;
var stat;
try {
stat = fs.statSync('./local-config.js');
} catch(e) {
localConfig = {};
}
if (stat) {
try {
... |
$.lc.setRequestedOrientation(0);
$.cacheImg('porker', 'img/cards4.png');
var pai = {
cards : [],
backcard : NormalPorker.back,
mycards : [],
position : 0,
isdizhu : false,
me : $.lc.self(), //自己参数
left : $.lc.getBackward(), //左侧玩家
right : $.lc.getForward(),
shangjiachupai : [],
zijichupai : [],
mycardindex ... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z" />
, 'ViewHeadlineOutlined');
|
// Your @RESOURCE@ with some dummy attributes..
@APP@.@CRESOURCE@ = Ember.Object.extend({
stringAttr : '',
referenceAttr : null,
integerAttr: 0,
booleanAttr: false,
clone : function(target) {
this.set('stringAttr',target.stringAttr);
this.set('referenceAttr',target.referenceAttr);
... |
'use strict';
import gulp from 'gulp';
import plugins from 'gulp-load-plugins';
import yargs from 'yargs';
import fs from 'fs';
import panini from 'panini';
import yaml from 'js-yaml';
import async from 'async';
import path from 'path';
// Load all Gulp plugin... |
/*
Logfella
Copyright (c) 2015 - 2019 Cédric Ronvel
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to u... |
/*jshint -W106*/
'use strict';
var MongoClient = require('mongodb').MongoClient;
MongoClient.connect('mongodb://localhost:27017/weather', function (err, db) {
if (err) {
throw err;
}
db.collection('data')
.find({})
.sort([
['State', 1],
['Temperature', -1]
])
.toArray(function (e... |
#!/usr/local/bin/node
var fs = require('fs');
var util = require('util');
// Default config values
var rc = require('rc')('fh-amqp-js', {
maxReconnectAttempts: 10
});
var fhamqpjs = require('./lib/amqpjs.js');
function usage() {
console.log("Usage: fh-amqp-js pub <exchange> <topic> <message> --clusterNodes=[<amqp-... |
/*!
* jQuery Form Plugin
* version: 2.86 (08-OCT-2011)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
; (function ($) ... |
import mq from 'mithril-query';
import m from 'mithril';
import subscriptionStatusIcon from '../../src/c/subscription-status-icon';
import dashboardSubscriptionCard from '../../src/c/dashboard-subscription-card';
import moment from 'moment';
describe('ShowDateFromSubscriptionTransition', () => {
let $subscription,... |
//! moment-timezone.js
//! version : 0.4.1
//! author : Tim Wood
//! license : MIT
//! github.com/moment/moment-timezone
(function (root, factory) {
"use strict";
/*global define*/
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof... |
/**
* Created by uzysjung on 15. 7. 9..
*/
var Tvconfig = {
register: require('tv'),
options: {
authenticateEndpoint:'simple',
} //authentication using hapi-auth-basic
};
module.exports = function(server) {
return new Promise(function(resolve,reject) {
server.register(Tvconfig, function(err... |
angular.module('pager', ['ui.router', 'ui.bootstrap', 'angular-loading-bar', 'LocalStorageModule', , 'ngAnimate', 'ngFacebook'])
.config(function($stateProvider, $urlRouterProvider, $locationProvider, $facebookProvider, localStorageServiceProvider) {
// Setup Facebook API
$facebookProvider.setAppId('14295374940157... |
import baseInRange from './_baseInRange';
import toNumber from './toNumber';
/**
* Checks if `n` is between `start` and up to, but not including, `end`. If
* `end` is not specified, it's set to `start` with `start` then set to `0`.
* If `start` is greater than `end` the params are swapped to support
* negative ran... |
import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import {
createShorthandFactory,
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
import Button from '../../elements/Button'
/**
* A modal can contain a... |
/**
* Module requirements.
*/
var path = require('path');
/**
* Initialize directory stack with current working directory.
*/
var dirs = [process.cwd()];
Object.defineProperties(process, {
/**
* Pushes a directory on to the stack and changes the current working
* directory to the pushed directory. Altern... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.