code stringlengths 2 1.05M |
|---|
staticCache(resolve(filePath), {
prefix: pf,
gzip: true,
maxAge: cache && isProd ? 60 * 60 * 24 * 30 : 0
});
|
var expect = require('chai').expect;
var mocha = require('mocha');
var SheknowsStrategy = require('../lib/strategy');
describe('sheknows-passport strategy', function () {
describe('constructed', function () {
var subject = new SheknowsStrategy({
clientID: 'ABC123',
clientSecret: 'ke... |
import fs from 'fs';
import path from 'path';
import recast from '@gerhobbelt/recast';
import { transformSync } from '@babel/core';
import '@babel/parser';
import assert$1 from 'assert';
import XRegExp from '@gerhobbelt/xregexp';
import JSON5 from '@gerhobbelt/json5';
// Return TRUE if `src` starts with `searchString`... |
// promises/a+ suite.
const promisesAplusTests = require("promises-aplus-tests");
const Promise = require("../promise.js");
// needed for aplus
process.on("unhandledRejection", (e, v) => {});
describe("Promises/A+ Tests", function () {
require("promises-aplus-tests").mocha({
resolved(v) { return Promise.res... |
version https://git-lfs.github.com/spec/v1
oid sha256:ad8098078ed8ad16cea85df9c279ac99ddbbf8d4bbcfab5a4ece55d26d872cc3
size 981493
|
/**
* translate ast to js function code
*/
'use strict';
var util = require('./runtime').util;
var compilerTools = require('./compiler/tools');
var pushToArray = compilerTools.pushToArray;
var wrapByDoubleQuote = compilerTools.wrapByDoubleQuote;
// codeTemplates --------------------------- start
var TMP_DECLARATION... |
/*eslint-env node, mocha*/
/**
* @author lattmann / https://github.com/lattmann
* @author pmeijer / https://github.com/pmeijer
*/
describe('storage storageclasses editorstorage', function () {
'use strict';
var testFixture = require('../../../_globals.js'),
NodeStorage = testFixture.requirejs('commo... |
Given three linked lists, say a, b and c, find one node from each list such that the sum of the values of the nodes is equal to a given number.
For example, if the three linked lists are 12->6->29, 23->5->8 and 90->20->59, and the given number is 101, the output should be tripel “6 5 90″.In the following solutions, si... |
var webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
entry: {
main: './src/client/main.js',
admin: './src/client/admin.js',
vend... |
/*
* virtual-dom hook for drawing to the canvas element.
*/
class CanvasHook {
constructor(peaks, offset, bits, color) {
this.peaks = peaks;
// http://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element
this.offset = offset;
this.color = color;
this.bits = bits;
}
static draw... |
var app = angular.module('js');
app.factory('PlatformSvc', function(conf) {
return {
host: undefined,
isKiso: function() { return !!this.host && (this.host.indexOf('kiso') !== -1 || this.host.indexOf('projects-jd.bz') !== -1 ); },
isJugendsommer: function() { return ... |
console.log("Hi Girl Coder, please make sure you join our community at meetup.com/GirlCode. Boys are welcome too!");
$(document).ready(function() {
$('.social-button, .social-button-footer').mouseenter(function() {
$(this).effect( 'bounce', { times: 1 }, 'slow');
});
});
// slow scroll to content
$(document).rea... |
DS.LSSerializer = DS.JSONSerializer.extend({
addBelongsTo: function(data, record, key, association) {
data[key] = record.get(key + '.id');
},
addHasMany: function(data, record, key, association) {
data[key] = record.get(key).map(function(record) {
return record.get('id');
});
},
// extrac... |
(function (exports) {
'use strict';
//import webeid from './vendor/web-eid/web-eid.js';
//TODO configure rollup so, that import works
function guid() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '... |
define(function(require) {
'use strict';
const _ = require('underscore');
const tools = require('oroui/js/tools');
const AbstractConditionContainerView =
require('oroquerydesigner/js/app/views/condition-builder/abstract-condition-container-view');
const template = require('tpl-loader!oroque... |
'use strict'
const path = require('path')
const { execFileSync } = require('child_process')
const ss2jsonBin = path.join(__dirname, '..', 'ss2json')
/* global describe, test, expect */
describe('bin/ss2json', () => {
test('The current version is displayed', () => {
const packageJson = require(path.join(__dirnam... |
/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = merge
/**
* Module variables.
* @private
*/
var hasOwnProperty = Object.prototype.hasOwnProperty
/**
* Merge the pr... |
import React from 'react';
import List from './List';
import Message from './Message';
import emitter from '../emitter';
import reqwest from 'reqwest';
import { getMedia } from '../utils';
let msg = {
start: {
headerMsg: '朋友您好!~~',
iconColor: 'black',
icon: 'help',
bodyMsg: '输入你想找的关键词按下回车即可搜索!'
},
... |
import { mount } from '@vue/test-utils';
import makeStore from '../../../test/utils/makeStore';
import RearrangeChannelsPage from '../RearrangeChannelsPage';
RearrangeChannelsPage.methods.postNewOrder = () => Promise.resolve();
RearrangeChannelsPage.methods.fetchChannels = () => {
return Promise.resolve([
{ id: ... |
// 转译特殊字符
var escapeUserInput = function(str){
return (str+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
};
|
// hexSize is the radius of a hex
// hexSquish is 0 - 1. 1 is a perfect hex
Hx = {
// width and height of one hex
hexDimensions: function(hexSize, hexSquish) {
check(hexSize, Number);
check(hexSquish, Number);
return {
width: hexSize * 2,
height: hexSize * (Math.sqrt(3) / 2 * hexSquish) * 2
}
},
/... |
'use strict';
angular.module('homeMovieCollectionApp')
.controller('MoviesCtrl', function (Modal, Movie, $scope) {
var vm = this;
Movie.findAll().then(function (movies) {
vm.movies = movies;
});
Movie.bindAll({}, $scope, 'vm.movies');
vm.newMovieTitle = '';
vm.editedMovie = null;
... |
var parens_regexp = /^\s*\((.*)$/
module.exports = add_parens
function add_parens(types) {
types.push(create_parens)
}
function create_parens(parts, change) {
if(!(parts = parts.match(parens_regexp))) {
return
}
var body = parts[1]
, count = 1
for(var i = 0, l = body.length; i < l; ++i) {
if(... |
var jwtUtil = require(__app.__utils.jwt);
//var codeMapping = require(__app.__filters.codeMapping);
/***
* jwt filter for handle login
* @param op
* @param req
* @param res
*/
module.exports = function(op, req, res) {
var o = op || {};
var jwt = req.cookies[jwt_name];
var jwtObj = jwtUtil.jwtVerify(... |
/*
The webpack-dev-server is a little Node.js Express server, which uses the webpack-dev-middleware to serve a webpack bundle.
Use webpack with a development server that provides live reloading.
It uses webpack-dev-middleware under the hood, which provides fast in-memory access to the webpack assets.
The test ut... |
import { Template } from 'meteor/templating'
import { Meteor } from 'meteor/meteor'
import { moment } from 'meteor/momentjs:moment'
import { StructureTitle } from '/imports/client/defaultStructures'
import './inicio.html'
Template.inicio.onRendered(() => {
if (window.location.hash) {
document.getElementById(wind... |
/**************************************************************
* Copyright (c) Stéphane Bégaudeau
*
* This source code is licensed under the MIT license found in
* the LICENSE file in the root directory of this source tree.
***************************************************************/
import { assign, Machine ... |
import ReactDOM from 'react-dom';
import React from 'react';
import configureStore from './redux/configureStore';
import { Provider } from 'react-redux';
import { syncHistoryWithStore } from 'react-router-redux';
import { hashHistory } from 'react-router';
import routes from './routes';
import DevTools from './redux/De... |
/* eslint-env jasmine, mocha */
import htmlContent from '../../lib/html-content';
describe('dom: childNodes', () => {
function runTests (type) {
describe(`${type}: `, () => {
let div;
let elem;
let fragment;
let host;
let root;
let slot;
const numbers = [0, 1, 2, 3];
... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2017 GochoMugo <mugo@forfuture.co.ke>
* Copyright (c) 2017 Forfuture LLC <we@forfuture.co.ke>
*/
// built-in modules
const assert = require("assert");
const EventEmitter = require("events");
// own modules
const mau = require("../../..");
const Form = require("../.... |
/* @flow */
import type VueRouter from '../index'
import { History } from './base'
import { getLocation } from './html5'
import { cleanPath } from '../util/path'
export class HashHistory extends History {
constructor (router: VueRouter, base: ?string, fallback: boolean) {
super(router, base)
// ... |
/* @flow */
import type { WebpackConfig } from '../../types';
const webpack = require('webpack');
const path = require('path');
const clone = require('clone');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.export... |
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unl... |
import StormBox from '../components/StormBox';
import {trigger, on} from '../util/events';
import {ENTER, SPACE, ESC, SHIFT, TAB, ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT} from '../util/keys';
const ignoredKeysOnSearch = [
ENTER,
ARROW_DOWN,
ARROW_UP,
ARROW_LEFT,
ARROW_RIGHT,
SHIFT,
TA... |
var expressWinston = require("express-winston");
var logging = require("../lib/logging");
var config = require("../lib/config")
var winstonMiddleware = expressWinston.logger({
"transports": [logging.consoleLogger, logging.fileLogger],
"meta": config.debug.toLowerCase() === 'true' ? true : false,
"msg": "{{... |
// React uses these shapes to validate data the components get.
var shapes = {
tree: {
key: React.PropTypes.string.isRequired,
name: React.PropTypes.string.isRequired,
image: React.PropTypes.string.isRequired,
layout: React.PropTypes.shape({
width: React.PropTypes.number.... |
/**
* Copyright (c) 2014,Egret-Labs.org
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this li... |
var UpdateRetrySettingsSkillRequest_Skills = {
"retrySettings": {
"loadNonFresh": true,
"finalizeWhenExhausted": true,
"maximumAttempts": 0,
"minimumRetryMinutes": 0,
"maximumNumberOfHandledCalls": 0,
"restrictedCallingMinutes": 0,
"restrictedCallingMaxAttempts": 0,
"generalSt... |
import { connect } from "react-redux";
import MainContent from "../components/MainContent";
import { setLayout } from "../actions";
import { getWebcastIds } from "../selectors";
const mapStateToProps = (state) => ({
webcasts: getWebcastIds(state),
hashtagSidebarVisible: state.visibility.hashtagSidebar,
chatSideb... |
/*! jCarousel - v0.3.0-beta.5 - 2013-04-12
* http://sorgalla.com/jcarousel
* Copyright (c) 2013 Jan Sorgalla; Licensed MIT */
(function($) {
'use strict';
$.jCarousel.plugin('jcarouselPagination', {
_options: {
perPage: null,
item: function(page) {
return '<a hre... |
/*
* 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.4.3.10: CreateOwnDataProperty no longer valid to use
// https://bugs.ecmascript.org/show_bug.cgi?id=1883
l... |
/*!
* Jade - utils
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Convert interpolation in the given string to JavaScript.
*
* @param {String} str
* @return {String}
* @api private
*/
var interpolate = exports.interpolate = function(str){
return str.replac... |
import {
default as React,
Component,
PropTypes,
} from "react";
import {
default as propTypesElementOfType,
} from "react-prop-types-element-of-type";
import {
default as canUseDOM,
} from "can-use-dom";
import {
default as warning,
} from "warning";
import {
GoogleMapLoader,
GoogleMap,
} from "../... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ioc = require("..");
const chai = require("chai");
let should = chai.should();
describe('Ioc', function () {
describe('create ioc', function () {
it('should crate empty Ioc', function () {
let injector = ioc.creat... |
/*
* grunt-texturepacker
* https://github.com/saschagehlich/grunt-texturepacker
*
* Copyright (c) 2014 Sascha Gehlich
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
... |
// This will be replaced
|
'use strict';
require('ui.router');
require('../logger/logger.module');
require('angular')
.module('blocks.exception', ['blocks.logger', 'ui.router'])
.factory('exception', require('./exception'))
.provider('exceptionHandler', require('./exception-handler.provider'))
.config(require('./exception-handler.confi... |
import React from 'react'
import { Form, TextArea } from 'shengnian-ui-react'
const TextAreaExampleTextArea = () => (
<Form>
<TextArea placeholder='Tell us more' />
</Form>
)
export default TextAreaExampleTextArea
|
module.exports = function(grunt) {
grunt.initConfig({
wiredep: {
app: {
src: 'index.html'
}
}
});
grunt.loadNpmTasks('grunt-wiredep');
grunt.registerTask('default', ['wiredep']);
}
|
// flow-typed signature: 1dff23447d5e18f5ac2b05aaec7cfb74
// flow-typed version: a453e98ea2/rimraf_v2.x.x/flow_>=v0.25.0
declare module 'rimraf' {
declare type Options = {
maxBusyTries?: number,
emfileWait?: number,
glob?: boolean,
disableGlob?: boolean,
};
declare type Callback = (err: ?Error, ... |
/**
* @author mrdoob / http://mrdoob.com/
*/
import JSZip from 'jszip'
import { Menubar } from "./Menubar"
Menubar.File = function ( editor ) {
var container = new UI.Panel();
container.setClass( 'menu' );
var title = new UI.Panel();
title.setClass( 'title' );
title.setTextContent( 'File' );
container.add( t... |
/**
Write me...
Straight-up stolen from `Handlebars.registerHelper('outlet', ...);`
@method outlet
@for Ember.Handlebars.helpers
@param {String} property the property on the controller that holds the view for this outlet
*/
Handlebars.registerHelper('animated-outlet', function(property, options) {
var o... |
/*!
* multirest
* Copyright(c) 2016 Richard Nemec
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
const debug = require('debug')('multirest');
const request = require('supertest-as-promised');
const Bluebird = require('bluebird');
/**
* Module exports.
* @public
*/
module.exports = ... |
'use strict';
require('node-jsx').install();
var http = require('http');
var path = require('path');
var Hapi = require('hapi');
var Joi = require('joi');
var Boom = require('boom');
var union = require('lodash.union');
var conf = require('./lib/conf');
var auth = require('./lib/auth/auth');
var schema = require('./li... |
const DrawCard = require('../../drawcard.js');
class TatteredMissive extends DrawCard {
setupCardAbilities(ability) {
this.action({
title: 'Search top 5 cards',
condition: context => context.player.conflictDeck.size() > 0,
cost: ability.costs.bowParent(),
eff... |
'use strict';
angular.module('jsDispatchApp')
.factory('Modal', function ($rootScope, $modal) {
/**
* Opens a modal
* @param {Object} scope - an object to be merged with modal's scope
* @param {String} modalClass - (optional) class(es) to be applied to the modal
* @return {Object} ... |
(function(){
var app = angular.module('weatherApp');
var weatherSvc = function($http){
var getCurrentWeather = function(city){
// this returns the promise from the $http.get() request so it is now thennable
return $http.get('http://api.openweathermap.org/data/2.5/weather?q=' + city + '&units... |
var levelup = require('levelup');
var r = require("restify");
var db = levelup("store")
function put(req, res, next) {
var body = JSON.parse(req.body)
var key = body.key
var val = body.value
db.put(key, val, function(err) {
if (err) {console.log(err)}
res.send(JSON.stringify(req.body) + ' inserted');
... |
var structtesting__1__1internal__1__1__static__assert__type__eq__helper__3__01__t__00__01__t__01__4_8js =
[
[ "structtesting_1_1internal_1_1_static_assert_type_eq_helper_3_01_t_00_01_t_01_4", "structtesting__1__1internal__1__1__static__assert__type__eq__helper__3__01__t__00__01__t__01__4_8js.html#ac6183e42c33fb45b4... |
'use strict';
/* jasmine specs for controllers go here */
describe('The controller', function(){
var scope = {};
var ctrl = undefined;
beforeEach(module('contactApp.controllers'));
beforeEach(module('contactApp'));
describe('contactlistCtrl', function(){
beforeEach(inject(function... |
var express = require('express');
var app = express();
// 设置模板引擎
app.set('view engine', 'ejs');
app.get('/', function (req, res) {
res.render('form');
});
app.post('/', function (req, res) {
// 将数据添加进入数据库
res.send('成功');
});
app.listen(3000, function () {
console.log('监听端口号: 3000');
});
|
'use strict';
import React from 'react';
class Rippler extends React.Component {
style;
constructor(props) {
super(props);
}
render() {
this.style = ({ top : this.props.y-50,
left : this.props.x-50})
return (
<div>
<div className={this.props.t_w_classes}>
... |
app.run(function($rootScope) {
$rootScope.user = {
settings: {
tts: {
enabled: true,
countdown: true,
voice: 0
}
}
};
$rootScope.timers = [
/*
{
id: String // Unique ID of this timer (used for URL slug)
title: String // Human friendly name of the timer profile
description: String ... |
import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux'
import { reducer as formReducer } from 'redux-form'
import {
hasErrorReducer,
hasResultsReducer,
isLoadingReducer
} from './statekeys'
import contactReducer from './contact'
const rootReducer = combineReducers({
isLoad... |
define(["Pilot", "Ship", "ShipBase", "Team"], function(Pilot, Ship, ShipBase, Team)
{
"use strict";
function PilotSkillRestriction(pilotSkill)
{
InputValidator.validateNotNull("pilotSkill", pilotSkill);
return (
{
name: "Pilot Skill above \"" + pilotSkill + "\".",
passes: ... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({"esri/widgets/Search/nls/Search":{widgetLabel:"\u0391\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7",searchButtonTitle:"\u0391\u03bd\u03b1\u03b6\u03ae\u0... |
(function($){
$(function(){
var BIN_TOTAL = 128;
//HEX_TOTAL = BIN_TOTAL/4,
//CHAR_ASCII_START = 64;
var $mask = $('#mask'),
$range = $('.range'),
$ip = $('input[name=ip]');
var $minIp = $('.subnet-min'),
$maxIp = $('.subnet-max');
var binToHex = function (bin) {
var hex = '';
var binA... |
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy... |
import parseToRgb from '../parseToRgb'
describe('parseToRgb', () => {
it('should parse a hex color representation', () => {
expect(parseToRgb('#Ff43AE')).toEqual({
blue: 174,
green: 67,
red: 255,
})
})
it('should parse an 8-digit hex color representation', () => {
expect(parseToRgb... |
function analogize(exposure,gamma,glow,radius) {
gl.analogize = gl.analogize || new Shader(null,'\
\
uniform sampler2D texture;\
uniform sampler2D glow_texture;\
varying vec2 texCoord;\
uniform float Glow; \
uniform float Exposure;\
uniform float Gamma;\
void main(void){\
... |
var Gpio = require('onoff').Gpio;
var led = new Gpio(17, 'out');
function exit() {
led.unexport();
process.exit();
}
led.writeSync(0);
process.on('SIGINT', exit);
|
/*!
* micromatch <https://github.com/jonschlinkert/micromatch>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var utils = require('./utils');
var Glob = require('./glob');
/**
* Expose `expand`
*/
module.exports = expand;
/**
* Expand a glob pattern to resol... |
var Colors = require("../util/Colors");
var objects = ["path", "cubes", "mountains", "background"];
var controls, _socket, _peer;
var selectedObject = 0;
var defaults = [10,10,15,25];
function MobileColorSelecter (socket, peer) {
_socket = socket;
_peer = peer;
controls = createControls(Colors.presets);
$("#contai... |
var DirectiveContainer = (function(container) {
container = container || document.body;
var nextInstanceID = 0;
var lookup = {};
var instances = {};
var events = {};
var watchers = [];
function watchPulse(fn) {
watchers.push(fn);
return function deregister() {
var index = watchers[fn];
... |
var apiKey = 'AIzaSyBIQzcxjrs9f-jv4iMB8-pGZatxqgRrcz4';
var gapiAuthInfo = {
client_id: '1020312901975-rqme2cmcjidsv6cq93o7fo8npqm617v7.apps.googleusercontent.com',
scope: 'https://www.googleapis.com/auth/gmail.modify',
immediate: false
}
function gapiAuth() {
console.log('Authorizing...');
gapi.auth... |
'use strict';
var should = require('should'),
request = require('supertest'),
path = require('path'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Cierreturno = mongoose.model('Cierreturno'),
express = require(path.resolve('./config/lib/express'));
/**
* Globals
*/
var app, agent, cred... |
import {mutationWithClientMutationId, cursorForObjectInConnection, fromGlobalId} from 'graphql-relay';
import {GraphQLNonNull, GraphQLString, GraphQLInt} from 'graphql';
import {updateUser, getUsers, tmpUser} from '../loaders/UserLoader';
import {userEdge} from '../connection/UserConnection';
import ViewerType from '..... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import App from './app'
AppRegistry.registerComponent('CustomLibraryPicker', () => App); |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'justify', 'ko', {
block: '양쪽 맞춤',
center: '가운데 정렬',
left: '왼쪽 정렬',
right: '오른쪽 정렬'
} );
|
var Utils = require('./utils')
var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)
var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)
var G15_BCH = Utils.getBCHDigit(G15)
/**
* Returns format information with relative error correction bits
*
* The format inform... |
//The Character window (CSheet).
var WeaponSlot : Transform; //This is where the Weapons are going to go (be parented too). In my case it's the "Melee" gameobject.
var HelmetSlot : Transform;
private var ArmorSlot : Item[]; //This is the built in Array that stores the Items equipped. You can change this to static if y... |
import React, { Component } from 'react'
import Processing from './Processing'
import ErrorPage from './ErrorPage'
import hello from 'hellojs/dist/hello.all.js'
import Graph from './Graph'
export class MyContacts extends Component {
constructor(props) {
super(props)
this.state = {
sta... |
require('babel-register')({
presets: ['env']
});
require('jsdom-global/register');
const _ = require('../../utils.js').default;
module.exports = {
makeElementFocusable(test) {
document.body.innerHTML = '<div></div>';
const element = document.querySelector('div');
// ------------... |
'use strict'
var path = require('path');
var express = require('express');
var fs = require('fs');
var bodyParser = require('body-parser');
var session = require('express-session');
var cookieParser = require('cookie-parser');
var mongoose = require('mongoose');
var app = express();
var port = 3030;
var publicDir = ... |
/**
* @author alteredq / http://alteredqualia.com/
*/
THREE.CrosseyedEffect = function ( renderer ) {
var _width, _height;
var _cameraL = new THREE.PerspectiveCamera();
_cameraL.target = new THREE.Vector3();
var _cameraR = new THREE.PerspectiveCamera();
_cameraR.target = new THREE.Vector3();
var SCREEN_WID... |
/* jshint node: true */
'use strict';
module.exports = {
name: require('./package').name
};
|
import Database, {Query} from "../../lib/database.js";
const databaseConfig = require("../../../database.json").testing;
const userFixtures = require("../fixtures/users.json");
describe(".select(...columnNames)", () => {
let database,
columnNames,
tableName,
fixtures;
beforeEach(done => {
d... |
$(document).ready(function () {
// 导航栏激活
$('.dropdown').mouseover(function() {
$(this).children('.dropdown-menu').css('display', 'block');
$(this).siblings().children('.dropdown-menu').css('display', 'none');
});
$('.dropdown').mouseout(function() {
$(this).children('.dropdown-menu').css('display', 'none')... |
function ConsoleLog(message)
{
console.log(">> " + message + "\n\n");
document.getElementById("console").innerHTML = ">> " + message + "<br /><br />" + document.getElementById("console").innerHTML;
}
|
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import h from '../h';
import userVM from '../vms/user-vm';
import ownerMessageContent from './owner-message-content';
import modalBox from './modal-box';
import UserFollowBtn from './user-follow-btn';
const userCard = {
oninit:... |
var acorn = require("acorn/dist/acorn")
var walk = require("acorn/dist/walk")
var parseType = require("./parsetype")
function strip(lines) {
for (var head, i = 1; i < lines.length; i++) {
var line = lines[i], lineHead = line.match(/^[\s\*]*/)[0]
if (lineHead != line) {
if (head == null) {
head... |
describe('Templates test suite', function () {
var Templates = HotSausage.Templates;
Templates.extend(function (Templates, _Templates_HS) {
});
it('should be added to HS', function () {
expect(Templates.isModule()).toBe(true);
});
describe('When Templates is loaded', function () {
var Clone = Templat... |
describe('Heading component', () => {
it('Should render a Heading component.', () => {
});
}); |
/**
* Role repository
*/
'use strict';
var locator = require('node-service-locator');
var q = require('q');
var moment = require('moment-timezone');
var BaseRepository = locator.get('base-repository');
var BaseModel = locator.get('base-model');
var RoleModel = locator.get('role-model');
/**
* Role repository
*
... |
module.exports = {
id: "arm",
name: "TR2 Arm",
warning: "Made-to-order: Orders take 4-8 weeks to ship",
imgs: ["/img/slate-tr2-9"],
basePrice: 1999,
config: [{
name: "shipping",
label: "Shipping",
default: 1,
items: [{
id: 0,
label: "Local Pickup - Springfield, MO",
price: ... |
var fs = require('fs');
var mqtt = require('mqtt');
var index = require('./index.js');
var client = mqtt.connect('mqtt://test.mosquitto.org');
var topic = "/CBA/015/n80Freezer";
client.on('connect', function () {
console.log(">>> Connected to MQTT hub");
console.log(">>> Subscribed to "+ topic);
client.subscrib... |
var gulp = require('gulp');
var concat = require('gulp-concat');
var minify = require('gulp-minify');
// Concatenate js files
var scripts = [
'ng-oauth-2.js',
'./providers/*.js'
];
gulp.task('build', ['concatenate', 'minify']);
gulp.task('concatenate', function() {
return gulp.src(scripts)
.pipe... |
/* global require, describe, it */
'use strict';
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Module to be tested:
isUint8ClampedArray = require( './../lib' );
// VARIABLES //
var expect = chai.expect,
assert = chai.assert;
// TESTS //
describe( 'validate.io-uint8array-clamped', f... |
'use strict';
var path = require('path');
var config = require('config');
var express = require('./lib');
var mongoose = require(path.resolve('./depends/mongoose'));
mongoose.connect(function (err, db) {
if (err) { throw err; }
var app = express.init();
// Start the app by listening on <port>
var por... |
NewTicket.widgets = {
layoutBox1: ["wm.Layout", {"horizontalAlign":"left","verticalAlign":"top"}, {}]
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.