code stringlengths 2 1.05M |
|---|
module.exports = require('../dist/server/timeModule')
|
var session = require('../webdriver/driver-session');
var LEVELS = {
info: 1,
warning: 2,
error: 3
};
exports = module.exports = {
/**
* @description Stores the logs of the current test step
*/
logs: [],
/**
* @name _add
* @param {Object} log: the log object; it may contain the following pr... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
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 ("va... |
var browserSync = require('browser-sync');
var bSyncOptions = require('../config/options').browserSync;
module.exports = function () {
'use strict';
return browserSync({
proxy: bSyncOptions.proxy
});
};
|
/**
* All CSS properties ordered by categories taken from http://www.w3schools.com/cssref/.
*/
$.fn.cssalias("add", "color", ['color', 'opacity']);
$.fn.cssalias("add", "background", [
'background', 'background-attachment', 'background-color', 'background-image', 'background-position',
'background-repeat', 'bac... |
import Promise from 'bluebird'
export default function () {
if (__DEVELOPMENT__) {
require('../extensions_dev.js')
require('../extensions_dev.css')
return Promise.resolve()
}
return new Promise((resolve, reject) => {
require.ensure([], function (require) {
require('../extensions.js')
... |
'use strict';
describe('Controller: CurrentCtrl', function () {
// load the controller's module
beforeEach(module('GetYourWeather'));
var CurrentCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
CurrentC... |
"use strict";
/**
* Enables the wrapper to be iterable.
*
* @name Symbol.iterator
* @memberOf _
* @since 4.0.0
* @category Seq
* @returns {Object} Returns the wrapper object.
* @example
*
* var wrapped = _([1, 2]);
*
* wrapped[Symbol.iterator]() === wrapped;
* // => true
*
* Array.from(wrapped);
* // =... |
exports.config = {
baseUrl: 'http://127.0.0.1:8080/',
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
framework: 'jasmine',
suites: {
app: 'test/e2e/app.spec.js',
atm: 'test/e2e/atm/atm.spec.js'
},
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['show-fps-counter=true']... |
var groups = []
// Save attempts to POST or PUT to /groups/
function save(idx){
var targets = []
$.each($("#targetsTable").DataTable().rows().data(), function(i, target){
targets.push({
first_name : target[0],
last_name: target[1],
email: target[2],
posit... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
addEfectoTecnica(new EfectoTecnica(
KI_EFECTO_HABILIDAD_PARADA,
"",
EFECTO_DEFENSIVO,
[
new NivelEfectoTecnica("+10",2,4,5,1,2,4,1),
new NivelEfectoTecnica("+25",3,5,5,1,2,4,1),
new NivelEfectoTecnica("+40",4,6,10,2,4,7,1),
new NivelEfectoTecnica("+50",5,8,15,3,6,11,1),
... |
'use strict';
const Router = require('koa-router');
const koabody = require('koa-body')();
let router = new Router();
router.get('/apis', koabody, async (ctx, next) => {
await next()
})
router.post('/apis', koabody, async (ctx, next) => {
await next()
})
module.exports = router; |
'use strict';
const gulp = require('gulp');
const babel = require('gulp-babel');
const webpack = require('webpack');
gulp.task('dist', function (callback) {
webpack(require('./webpack.config'), function (err, stats) {
if (err) {
console.error(err);
} else {
console.log('[webpack]', stats.toStri... |
import { call, put } from 'redux-saga/effects';
import { browserHistory } from 'react-router';
import ApiComments from '../api/comments';
export function* commentsAddComment(action) {
try {
console.log("saga -- add comment");
const comments = yield call(ApiComments.addComment, action);
yiel... |
$(document).ready(function () {
$(window).trigger('hashchange')
$('#nzb_pause_button').click(function () {
var clickItem = $(this);
clickItem.button('loading');
$.ajax({
url: WEBDIR + 'sabnzbd/TogglePause?mode='+queueToggleStatusAction,
dataType: 'json',
... |
/*
* gore-core-builder
* https://github.com/groves/grunt-plugin-test
*
* Copyright (c) 2015 Timothy Groves
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.j... |
import React from "react";
import { Link } from "@curi/react-dom";
import {
TitledPlainSection,
HashSection,
Paragraph,
CodeBlock,
Note,
IJS
} from "../../components/guide/common";
let meta = {
title: "New Responses"
};
let handlerMeta = {
title: "Response Handlers",
hash: "response-handlers"
};
l... |
/**
* Created by Кира on 15.08.2017.
*/
var ajaxUrl = "/user/bookings/";
var datatableApi;
function updateUserBookingsTable() {
$.get(ajaxUrl, updateUserTableByData);
}
function deactivateUserBooking(chkbox, id) {
var enabled = chkbox.is(":checked");
$.ajax({
url: ajaxUrl + "deactivate" + "?i... |
'use strict';
// Setting up route
angular.module('search').config(['$stateProvider',
function($stateProvider) {
// project state routing
$stateProvider.
state('project', {
url: '/project',
templateUrl: 'modules/search/views/search.client.view.html'
}).
state('sidesearch', {
u... |
var browserSync = require('browser-sync');
var reload = browserSync.reload;
module.exports = function(gulp, options, $) {
gulp.task('watch', function() {
if (options.browserSync) browserSync(options.browserSync);
gulp.watch(options.files.scss, ['default']);
gulp.watch(options.files.sv... |
var nodes = {};
// Compute the distinct nodes from the links.
links.forEach(function(link) {
link.source = nodes[link.source] || (nodes[link.source] = {name: link.source, color: link.circle});
link.target = nodes[link.target] || (nodes[link.target] = {name: link.target, color: link.circle});
});
var width = 800,
he... |
var Type = require("@kaoscript/runtime").Type;
module.exports = function() {
class Foobar {
constructor() {
this.__ks_init();
this.__ks_cons(arguments);
}
__ks_init() {
}
__ks_cons(args) {
if(args.length !== 0) {
throw new SyntaxError("Wrong number of arguments");
}
}
}
function foobar(x)... |
import AutocompleteSelect from '../edit';
const keyResolver = key => Promise.resolve(`Label for ${key}`);
const querySearcher = query => {
const data = [
{
key: 'NY',
label: 'New York'
},
{
key: 'PAR',
label: 'Paris'
},
{
... |
/* eslint no-undef: 0, no-unused-expressions: 0, filenames/filenames: 0,
no-magic-numbers: 0, camelcase: 0 */
"use strict";
var chai = require("chai");
var expect = chai.expect;
var amendNodeConfig = require("../lib/amend_node_config");
describe("amendNodeConfig", function () {
it("should look for node config", f... |
/**
* Created by invader on 06.07.16.
*/
import React from 'react'
import s from './features.pcss'
import {Grid, Row, Col} from 'react-flexgrid'
import 'react-flexgrid/lib/flexgrid.css'
import MdMoneyOff from 'react-icons/lib/md/money-off'
import MdiPhone from 'react-icons/lib/md/phone-iphone'
import MdComputer fr... |
(function(){
angular
.module('users')
.controller('onboardController', [
'workflowService', 'userService', '$mdSidenav', '$mdBottomSheet', '$log', '$q', '$scope', '$mdToast',
OnboardController
]);
/**
* Main Controller for the Angular Material Starter App
* @param $s... |
angular.module('modalTest',['ui.bootstrap','dialogs.main','pascalprecht.translate','dialogs.default-translations'])
.controller('dialogServiceTest',function($scope,$rootScope,$timeout,$translate,dialogs){
//-- Variables --//
$scope.lang = 'en-US';
$scope.language = 'English';
var _progress = 33;
$s... |
// Aliyun OSS support
// Copyright: GhostChina.com
var _ = require('lodash'),
express = require('express'),
fs = require('fs-extra'),
path = require('path'),
util = require('util'),
utils = require('../utils'),
Promise = require('bluebird'),
config = require('..... |
version https://git-lfs.github.com/spec/v1
oid sha256:f4c97227732feb7fd73d760a918d93da387b188394073755107a828888853cf9
size 87122
|
version https://git-lfs.github.com/spec/v1
oid sha256:8b741c4c4cf06aeca2b61c7b618ecf56c420bda6a61885e0aadc4fe37898cd2b
size 7954
|
angular.module('ify.date').filter('millisecondsToDate', function($filter)
{
return function millisecondsToDate(input, format)
{
var date = new Date(input);
if(format !== undefined)
{
var dateFilter = $filter('date');
date = dateFilter(date, format);
}
... |
import { botMessageSchema, webhookMessageSchema } from './constants/embedschema';
function traverseObject(object, path) {
let result = object;
for (const fragment of path) {
if (fragment[fragment.length - 1] === ']') {
// simple ~assumption~
const indexStart = fragment.lastIndexOf('[');
con... |
"use strict";
var alamid = require("alamid"),
app = alamid.app,
jQuery = alamid.util.jQuery;
jQuery(document).ready(function onDomReady() {
app.start();
}); |
/**
* Created by harry on 16/6/5.
*/
(function () {
'use strict';
angular.module('BlurAdmin.cms.wechat', [
'BlurAdmin.cms.wechat.keyword',
])
.config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
.state('wechat', {
... |
// FunctionHelper
// -------
function FunctionHelper(client) {
this.client = client;
}
FunctionHelper.prototype.now = function (precision) {
if (typeof precision === 'number') {
return this.client.raw(`CURRENT_TIMESTAMP(${precision})`);
}
return this.client.raw('CURRENT_TIMESTAMP');
};
module.exports = Fu... |
/**
* Basic Ad support plugin for video.js.
*
* Common code to support ad integrations.
*/
(function(window, videojs, undefined) {
'use strict';
var
VIDEO_EVENTS = videojs.getComponent('Html5').Events,
/**
* If ads are not playing, pauses the player at the next available
* opportunity. Has no effect if... |
import { Category } from '../../../stories/storiesHierarchy';
export const storySettings = {
category: Category.COMPONENTS,
storyName: 'Modal',
dataHook: 'storybook-modal',
};
export const testStories = {
modalBackgroundScroll: 'Prevent modal background scroll',
a11yTabInsideModal: 'A11Y - Allow tab navigat... |
var Mocha = require('mocha'),
fs = require('fs'),
path = require('path');
var requirejs = require('requirejs');
requirejs.config({
paths: {
'stacktrace': '../../../node_modules/stacktrace-js/dist/stacktrace.min'
}
});
// Instantiate a Mocha instance.
var mocha = new Mocha();
v... |
var app = angular.module('app', ['ui.router', 'swipe', 'snapscroll', 'oc.lazyLoad', 'facebook' , 'ui.bootstrap', 'slick', 'infinite-scroll']);
app
.config(['$stateProvider', '$ocLazyLoadProvider', 'FacebookProvider', '$urlRouterProvider', function($stateProvider, $ocLazyLoadProvider, FacebookProvider, $urlRouterProvide... |
export default class Validator {
constructor(data, config) {
this.data = data;
this.config = config;
}
isFilled() {
let result = true;
for (let item in this.data) {
const checker = this.config[item];
const field = this.data[item];
... |
import Icon from '../components/Icon.vue'
Icon.register({
backspace: {
width: 640,
height: 512,
paths: [
{
d: 'M576 64c35.3 0 64 28.7 64 64v256c0 35.3-28.7 64-64 64h-370.8c-17 0-33.3-6.8-45.3-18.8l-150.6-150.6c-12.5-12.5-12.5-32.8 0-45.3l150.6-150.6c11.6-11.6 27.6-18.8 45.2-18.8h0 370.7zM49... |
define("model", ["backbone"], function(Backbone) {
"use strict";
return Backbone.Model.extend({
clone: function() {
var Constructor = this.constructor;
return new Constructor(this.application, this.type, this.attributes);
}
});
});
|
module.exports = async function (context, commands) {
context.log.info('In pretask!!!');
await commands.navigate('https://www.sitespeed.io/');
context.taskData.loadedSitespeed = true;
};
|
(function(_, Backbone) {
_.extend(Backbone.Model.prototype, {
get: function(key) {
return _.reduce(key.split('.'), function(attr, key) {
if (attr instanceof Backbone.Model)
return attr.attributes[key];
return attr[key];
}, this.att... |
/*global Tautologistics:true, HtmlBuilder: true */
'use strict';
quail.components.htmlSource = {
getHtml: function getHtml(callback) {
var that = this;
if (typeof quail.options.htmlSource !== 'undefined' && quail.options.htmlSource) {
callback(quail.options.htmlSource, that.parseHtml(quail.options.htm... |
suite('rb/resources/models/DraftReview', function() {
let model;
let parentObject;
beforeEach(function() {
parentObject = new RB.BaseResource({
links: {
reviews: {
href: '/api/foos/'
},
},
});
model = new R... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
d: "M10 8.64v6.72L15.27 12z",
opacity: ".3"
}), h("path", {
d: "M8 19l11-7L8 5v14zm2-10.36L15.27 12 10 15.36V8.64z"
})), 'PlayArrowTwoTone'); |
var environment = (function(){
function setEnv(){
var env = "prod"; //test;// or dev //prod
return env;
}
return{
getEnv : setEnv
}
})() |
// help: http://webpack.github.io/docs/configuration.html
// help: https://webpack.github.io/docs/webpack-dev-server.html#webpack-dev-server-cli
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
const package_ = JSON.pa... |
'use strict';
var _reactDom = require('react-dom');
var _testUtils = require('react-dom/test-utils');
var _testUtils2 = _interopRequireDefault(_testUtils);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _Element = require('../components/Element.js');
var _Element2 = _interopRequ... |
/**
* Created by Samuel Schmid on 24.02.14.
*
* Represents all documented resources of Restapiexpress
*
* contains
* - an array of Doc (docs)
* - a map of Name/Doc (docMap)
* - apidescription
* - an array of version (versions)
*
* @type {Docs}
*/
module.exports = Docs;
if (typeof String.prototype.endsWith ... |
console.log("warn me");
|
import LocalStorage from './LocalStorage';
let singleton = Symbol('singleton');
let singletonEnforcer = Symbol('singletonEnforcer');
export default class Utils {
constructor(enforcer) {
if(enforcer != singletonEnforcer) {
throw new Error('Cannot construct singleton');
}
}
sta... |
'use strict';
var assert = require('assert');
var fs = require('fs');
var Extractor = require('..').Extractor;
var testExtract = require('./utils').testExtract;
describe('Extract', function () {
it('Extracts strings from views', function () {
var files = [
'test/fixtures/single.html'
]... |
/**
* Problem: https://leetcode.com/problems/largest-divisible-subset/description/
*/
/**
* @param {number[]} nums
* @return {number[]}
*/
var largestDivisibleSubset = function(nums) {
if (!nums.length) return [];
nums.sort(function (a, b) {
return a > b ? 1 : -1;
});
var maxLength = 0, dp = {};
nu... |
(function() {
const a= document.querySelector("#demo");
const b= document.querySelector("#n");
const c= document.querySelector("#u");
let iceCream = {flavor: "chocolate"};
a.innerText = JSON.stringify(iceCream);
//underscore js
const no = _.clone(iceCream);
c.innerText = JSON.stringify(no);
//normal js
const n... |
import Finds from 'src/controllers/finds/Finds'
import Orders from 'src/controllers/orders/Orders'
import Sells from 'src/controllers/sells/Sells'
import Mines from 'src/controllers/mines/Mines'
import MinesInfo from 'src/controllers/mines/info/MinesInfo'
import MinesRing from 'src/controllers/mines/ring/MinesRing'
... |
/**
* Created by garusis on 16/10/16.
*/
;!(function (module) {
OrderFactory.$inject = ['MockStorage'];
function OrderFactory(Mock) {
function OrderService() {
}
return Mock.buildEssentialService(OrderService);
}
module.factory('Order', OrderFactory);
})(angular.module('pizd... |
console.info("%cHello, thanks for visiting my site; please check back often -Harry","background-color:#00fa12;border-radius:10px;padding:5px;font-size:10px;");
console.info("%c您好","background-color:yellow;");
|
'use strict';
var Q = require('q');
var fs = require('fs');
var path = require('path');
var child = require('child_process');
var getConfigRecursive = require('libamd/getConfigRecursive');
var mixin = require('mout/object/deepMixIn');
var escapeRegExp = require('mout/string/escapeRegExp');
var findup = require('./f... |
import React, {
Text,
View,
ListView,
TextInput,
Dimensions,
Animated,
Platform,
PixelRatio,
Component,
} from 'react-native';
import Message from './Message';
import GiftedSpinner from 'react-native-gifted-spinner';
import moment from 'moment';
import {setLocale} from './Locale';
import deepEqual fr... |
'use strict';
var UserService = function (userServiceConfig, mongoMonk, logger) {
this.getAllUsers = function(){
logger.info('UserService.getAllUsers');
var users = mongoMonk.db.get('users');
return users.find({},{limit:20});
};
};
module.exports = UserService; |
export default {
name: 'ctTableFooter',
render(h) {
const sums = []
this.columns.forEach((column, index) => {
if (index === 0) {
sums[index] = this.sumText
return
}
const values = this.store.states.data.map(item => Number(item[column.property]))
const precisions = []... |
'use strict';
/**
* @ngdoc overview
* @name feedsApp
* @description
* #
*
* Main module of the feeds application.
*/
angular
.module('feedsApp', ['ngMaterial','ngSanitize']); |
//Wait for the page to load
window.onload = function (e) {
//Creating a row column and a button
var row = document.createElement(`div`);
row.classList.add('row');
var col = document.createElement(`div`);
col.classList.add("col-xs-12");
var button = document.createElement('button');
button.c... |
// jshint node:true
//jshint esversion:6
require('dotenv').config({silent:true});
const express = require('express'),
app = express(),
port = process.env.PORT || 8080,
mongoose = require('mongoose'),
passport = require('passport'),
session = require('express-session'),
cookieParser = require('cookie-parser'... |
/*
* Author: CM
*/
(function(global) {
/**
* @callback PromiseThrottled
* @param {*} any number of optional params
* @return {Promise}
*/
/**
* @param {PromiseThrottled} fn
* @param {Object|null} [options]
* @param {Boolean} options.cancelLeading Whether to cancel the previous promise if i... |
'use strict';
module.exports = function(arg) {
var target;
if (typeof arg === 'string') {
target = {
name : arg,
email: arg
};
} else if (typeof arg === 'object' && ! Array.isArray(arg)) {
target = arg;
if ( ! target.email) throw new Error('dont have email field');
target.n... |
"use strict";
var Insert = require('./commands').Insert
, Update = require('./commands').Update
, Remove = require('./commands').Remove
, Query = require('../connection/commands').Query
, copy = require('../connection/utils').copy
, KillCursor = require('../connection/commands').KillCursor
, GetMor... |
import urlEncodeData from './urlEncodeData';
describe('urlEncodeData', () => {
it('should encode object', () => {
const result = urlEncodeData({
prop: 1,
deep: {
email: 'email@email',
},
});
expect(result).toBe('prop=1&deep=%5Bobject%20Object%5D');
});
});
|
angular.module('gb.home')
.controller('PeriodSelectorController',
['$scope','ThisWeekPeriodSelection',function($scope,ThisWeekPeriodSelection) {
$scope.nextWeek = function() {
ThisWeekPeriodSelection.nextWeek();
};
$scope.prevWeek = function() {
ThisWeekPeriodSelection.prevWeek();
};
}]... |
/**
* Plugin comments
*/
(function($, undefined){
var MyPlugin = function(element, options){
/*
* *************************** Variables ***************************
*/
var defaults = {
defaultValue : '2'
}; //default options
/*
* *************************** Plugin Functions *****************... |
const Liquid = require('..')
describe('Range', function () {
it('can be converted to array', function () {
expect(new Liquid.Range(0, 1).toArray()).to.deep.equal([0])
expect(new Liquid.Range(0, 2).toArray()).to.deep.equal([0, 1])
return expect(new Liquid.Range(1, 2).toArray()).to.deep.equal([1])
})
... |
module.exports = CollectionElement;
var ElementCollection = require('./ElementCollection.js');
var ModelValue = require('./ModelValue.js');
function CollectionElement(collection, func){
var ec = new ElementCollection();
ec.collection = collection;
ec.itemFunction = func;
ec.SubPub = collection.SubPub.newGroup();
... |
var i = -1; // current questions
var answered = false;
shuffle(questions);
// Shuffles array
function shuffle(o){
for(var j, x, i = o.length; i > 0; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x){};
return o;
}
function submitAnswer() {
if (answered)
loadNex... |
System.register(['i18next', './utils'], function (_export) {
'use strict';
var i18n, assignObjectToKeys, I18N;
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; ... |
/// <reference path="jquery-2.1.1.js" />
/// <reference path="chrome-api-vsdoc.js" />
|
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... |
vars.default_marks['rect'] = function(scope) {
var this_params = {};
this_params.type = 'rect';
this_params.rendering = 'svg';
this_params.radius = 5;
this_params.enter = function(selection, params, vars, mark_id) {
selection.each(function(d, i) {
var mark_params = utils.mark_params(params, var... |
'use strict';
angular.module('mergeincomingShowAllModal',[
'ngToast','bathwaterApp.services', 'bootstrapLightbox'
]); |
import { parseTag } from './tag.js';
export function parseTags(text) {
const tags = [];
let depth = 0;
let str = '';
// `\b\c` -> `b\c\`
// `a\b\c` -> `b\c\`
const transText = text.split('\\').slice(1).concat('').join('\\');
for (let i = 0; i < transText.length; i++) {
const x = transText[i];
if ... |
import Dispatcher from './Dispatcher';
class Actions {
_dispatch(actionKey, payload) {
Dispatcher.handleAction(actionKey, payload);
}
}
export default Actions;
|
(function (ns) {
var common = require("../../base/common.js"),
Shade = require("./../../interfaces.js"),
Types = Shade.TYPES,
Kinds = Shade.OBJECT_KINDS,
SpaceType = Shade.SpaceType,
VectorType = Shade.VectorType;
var walk = require('estraverse');
var Syntax = walk.S... |
'use strict';
var db = require('../../databases').neo4j;
var Relationship = module.exports = function Relationship(_node) {
this._node = _node;
}
// public instance properties:
Object.defineProperty(Relationship.prototype, 'id', {
get: function () { return this._node.id; }
});
// public instance methods:
Re... |
const argv = require('yargs').argv
const webpack = require('webpack')
const cssnano = require('cssnano')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const project = require('./project.config')
const debug = require('debug')('app:config:webpac... |
'use strict';
/* Controllers */
angular.module('myApp.controllers', [])
.controller('mainController', function($scope, $location, $http, $window, $route) {
$scope.getItems = function() {
$scope.items = {};
$http.get("../api/item/read.php?table=prints").
success(function(d... |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
import {Provider} from 'react-redux';
import {createStore} from 'redux';
import rootReducer from './Redux';
... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
errorHandler = require('../errors'),
mongoose = require('mongoose'),
passport = require('passport'),
User = mongoose.model('User');
/**
* Update user details
*/
exports.update = function(req, res) {
// Init Variables
va... |
{
return {
url: "/bar",
method: "post"
};
}
|
const merge = require('webpack-merge');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const TerserJSPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const common =... |
var mongoose = require('mongoose');
var HintSchema = require('./hint');
var TriviaSchema = new mongoose.Schema({
title: {type: String, unique: true, required: true},
hints: [HintSchema],
username: {type:String, required:true},
user_id: {type:String, required:true},
triviaDate: {type:Date, r... |
db.books.find( { } ).forEach( function( doc ) { db.books.update( doc , { $set : { authors : [ Math.ceil( Math.random()*82) , Math.ceil( Math.random()*82) ] } } ) } )
|
var express = require("express");
var os = require("os");
var fs = require("fs");
var path = require("path");
var url = require("url");
var engines = require("consolidate");
var _ = require("lodash");
var shlog = require(global.C.BASE_DIR + "/lib/shlog.js");
var sh = require(global.C.BASE_DIR + "/lib/shutil.js");
var ... |
angular.module('weightLossService', [])
.constant('USER_ID', '0b13e52d-b058-32fb-8507-10dec634a07c') //@todo temporary!
.factory('weightLossService', function (apiService, USER_ID) {
// Private methods, namespaced for code clarity
var privateMethods = {
userId: null,
... |
// Base16 Pico
// Scheme: PICO-8 (http://www.lexaloffle.com/pico-8.php)
var color_scheme = {
'base00': '#000000',
'base01': '#1d2b53',
'base02': '#7e2553',
'base03': '#008751',
'base04': '#ab5236',
'base05': '#5f574f',
'base06': '#c2c3c7',
'base07': '#fff... |
// Regular expression that matches all symbols with the `Join_Control` property as per Unicode v5.0.0:
/[\u200C\u200D]/; |
import * as React from 'react';
import { expect } from 'chai';
import { useFakeTimers, spy } from 'sinon';
import { act, createClientRender, describeConformanceV5, screen } from 'test/utils';
import { ThemeProvider, createTheme } from '@material-ui/core/styles';
import Drawer, { drawerClasses as classes } from '@materi... |
// Import React
import React from "react";
// Import Spectacle Core tags
import {
Appear,
BlockQuote,
Cite,
Code,
Deck,
Heading,
Image,
ListItem,
List,
Quote,
S,
Slide,
Text
} from "spectacle";
import CodeSlide from "spectacle-code-slide";
// Import image preloader util
import preloader from... |
/**
* @author mrdoob / http://mrdoob.com/
*/
Object.defineProperties( THREE.Box2.prototype, {
empty: {
value: function () {
console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
return this.isEmpty();
}
},
isIntersectionBox: {
value: function ( box ) {
console.warn( 'THREE.Box2: .... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.