code stringlengths 2 1.05M |
|---|
jquery_script.onload = function() {
jQuery("li.listitem a").each(function() {
WeBuilderExtract("php_funclist.js", this.href);
});
} |
/**
* Created by Administrator on 2016/4/30.
*/
var canvas;
var stage;
var img = new Image;
var sprite;
window.onload = function(){
canvas = document.getElementById("canvas");
stage = new createjs.Stage(canvas);
stage.addEventListener("stagemousedown",clickCanvas);
stage.addEventListener("stagemouse... |
!function(){
var isFunction = function(obj){
return typeof obj === "function";
};
var polyfill = {
create:function(proto){
if (arguments.length > 1) {
throw new Error('Object.create implementation only accepts the first parameter.');
}
function F() {}
F.prototype = proto;
return new... |
// StyleDocco documentation user interface elements
// ==================================================================
// Dropdowns and search.
(function() {
'use strict';
/*global searchIndex:false*/
// Helper functions. Using `Array.prototype` to make them work on NodeLists.
var inArray = function(arr, ... |
var ParseDomain, exports;
ParseDomain = require('./parseDomain');
exports = module.exports = function() {};
module.exports.tldUrl = 'http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1';
Object.defineProperty(module.exports, 'parse', {
enumerable: false,
configurable: false,
... |
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:user/expenses/index', 'Unit | Route | user/expenses/index', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function(assert) {
let route = this.subject();
assert.ok(route);
});
|
#!/usr/bin/env node
var RSVP = require('rsvp');
var spawn = require('child_process').spawn;
var chalk = require('chalk');
var packages = require('../lib/packages');
var runInSequence = require('../lib/runInSequence');
function shouldPrint(inputString) {
var skipStrings = [
"*** WARNING: Method userSpaceScaleF... |
// Meteor
import { Mongo } from 'meteor/mongo';
import React from 'react';
class StatsCollection extends Mongo.Collection {
// insert(profile, callback) {
// }
// remove(selector, callback) {
// }
}
export const Stats = new StatsCollection('Stats');
// Deny all client-side updates since we will be using meth... |
function f([x, y]) {
var [a, [, c]] = x;
try {
throw [a, c];
} catch (d) {
console.log(d);
}
}
function g({ x, y: z }) {
var { [x]: w } = z;
return w;
}
|
export const delay = 1000; |
ListingOtherUnmappingHandler = Class.create(ActionHandler, {
// ---------------------------------------
options: {},
setOptions: function(options)
{
this.options = Object.extend(this.options, options);
return this;
},
// ---------------------------------------
... |
import MobileDetect from 'mobile-detect'
/**
* Detect if is the samsung stock browser that is running the page
* @example js
* import isSamsumgBrowser from 'coffeekraken-sugar/js/utils/is/samsungBrowser'
* if (isSamsumgBrowser()) {
* // do something
* }
*
* @author Olivier Bossel <olivier.bossel@gmail.... |
import controller from './content.controller';
import template from './content.html';
export default {
controller,
template
};
|
/**
* Valence Chat
*
* Created By: Jeff Avis
*/
var SERVER_PORT = 3434;
var D2L = require('valence'),
express = require('express'),
request = require('superagent'),
sessions = require('client-sessions'),
socketIO = require('socket.io'),
http = require('http'),
config = require('./config.js... |
var readlineSync = require('readline-sync');
var util = require('util');
var mainProgram = function () {
var first = readlineSync.question('First?');
first = parseInt(first);
//console.log('typeof first = ' + typeof first);
var second = readlineSync.question('Second?');
second = parseInt(second);
var b... |
notesApp.controller('notesController',
['$scope', '$state', '$firebaseObject',
function($scope, $state, $firebaseObject) {
$scope.title = $state.params.title;
var user = $state.params.user;
var ref = new Firebase("https://simple-notes.firebaseio.com/" + user + "/" + $scope.title);
var syncObject = $firebaseObje... |
import { WeElement, define, h } from 'omi'
define('my-about', class extends WeElement {
render() {
return <div >About</div>
}
})
|
const gulp = require('gulp');
const zip = require('gulp-zip');
const rename = require('gulp-rename');
const packageJson = require('../package.json');
const generateAddonXml = require('./generate-addon-xml.js');
const { src, dest, series, parallel } = gulp;
const packageName = `${packageJson.name}-v${packageJson.versi... |
LoansController = BusinessUnitController.extend({
// a place to put your subscriptions
// this.subscribe('items');
// // add the subscription to the waitlist
// this.subscribe('item', this.params._id).wait();
subscriptions: function() {
},
// Subscriptions or other things we want to "wait... |
export default () => {
if (!window.location.search) window.scrollTo(0, 0)
}
|
module.exports = {
lib: {
entryFile: 'public_api.ts',
},
};
|
/* Just copy and paste this snippet into your code */
module.exports = function(event, done) {
var angelList = Hoist.connector('<key>');
angelList.get('/startups/6702')
.then(function (startup) {
return Hoist.event.raise('startup:found', startup);
})
.then(done);
}; |
#!/usr/bin/env node
var hogan = require('hogan.js')
, fs = require('fs')
, prod = process.argv[2] == 'production'
, title = 'Redu Bootstrap'
var layout, pages
// compile layout template
layout = fs.readFileSync(__dirname + '/../templates/layout.mustache', 'utf-8')
layout = hogan.compile(layout, { sectionTag... |
angular.module('thirdi.system').controller('IndexController', ['$scope', 'Global', function ($scope, Global) {
$scope.global = Global;
}]); |
import { Record, List } from 'immutable';
import ShoppingCartItem from 'models/shopping-cart-item';
const Parent = Record({
items: List(),
});
class ShoppingCart extends Parent {
getItems() {
return this.get('items');
}
setItems(items) {
return this.set('items', items);
}
addItem(product, selec... |
/**
*
* @author sarkiroka on 2017.07.01.
*/
var ONLY_NUMBERS = /^-?[0-9]+$/;
var FLOAT = /^-?[0-9]*\.[0-9]+$/;
var SCIENTIFIC = /^-?(?:[0-9]|[0-9]?\.[0-9]+)e[0-9]+$/i;
module.exports = function (number) {
var retValue = false;
if (typeof number == 'number') {
retValue = true;
} else if (typeof number == 'string... |
import React from 'react';
import styled from 'styled-components';
import {Link, HomeCard, Video,HomeStadistics} from 'components';
import {Grid, Row, Col} from 'react-flexbox-grid';
import RaisedButton from 'material-ui/RaisedButton';
import {size, palette} from 'styled-theme';
const CarouselPreview = require('react-r... |
'use strict';
var chai = require('chai');
var expect = chai.expect;
var fav = {}; fav.type = require('..');
var isInteger = fav.type.isInteger;
describe('fav.type.isInteger', function() {
it('Should return true when value is an integer', function() {
expect(isInteger(0)).to.equal(true);
expect(isInteger(1... |
var AP = 'ap';
var CHAIN = 'chain';
var MAP = 'map';
var OF = 'of';
var FANTASY_LAND_SLASH = 'fantasy-land/';
var FANTASY_LAND_SLASH_OF = FANTASY_LAND_SLASH + OF;
var FANTASY_LAND_SLASH_MAP = FANTASY_LAND_SLASH + MAP;
var FANTASY_LAND_SLASH_AP = FANTASY_LAND_SLASH + AP;
var FANTASY_LAND_SLASH_CHAIN = FANTASY_LAND_SLAS... |
function parseEffect(text) {
var param = text
.toLowerCase()
.trim()
.split(/\s*;\s*/);
if (param[0] === 'banner') {
return {
name: param[0],
delay: param[1] * 1 || 0,
leftToRight: param[2] * 1 || 0,
fadeAwayWidth: param[3] * 1 || 0,
};
}
if (/^scroll\s/.test(param[0]... |
//LocalKnowledge.js
var localKnowledgeIndexes = [];
var localKnowledgeData = [];
var currentItemsToDisplay = [];
var completelyLoadedCallback;
function initLocalKnowledge(callback)
{
completelyLoadedCallback = callback;
$.getJSON("data/data.json", function(data) {
localKnowledgeIndexes = d... |
var mongoose = require('mongoose');
var Database = function(address, dbName, port, username, password) {
this._address = address;
this._dbName = dbName;
this._port = port;
this._username = username;
this._password = password;
this._createConnection();
};
Database.prototype = {
_address: null,
_dbNam... |
import { EventDispatcher } from './EventDispatcher.js';
import { Face3 } from './Face3.js';
import { Matrix3 } from '../math/Matrix3.js';
import { Sphere } from '../math/Sphere.js';
import { Box3 } from '../math/Box3.js';
import { Vector3 } from '../math/Vector3.js';
import { Matrix4 } from '../math/Matrix4.js';
import... |
// # Ghost Configuration
// Setup your Ghost install for various environments
// Documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and m... |
/**
* aviso.js - v0.1.10
* Copyright (c) 2015 Kiva Microfunds
*
* Licensed under the MIT license.
* https://github.com/kiva/aviso/blob/master/license.txt
*/
(function ($, global) {
'use strict';
/**
* Exposed function wrapper for the Aviso constructor & aviso.show()
*
* @param messa... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _functionalCurry = require('../functional/curry');
var either = (0, _functionalCurry.curry)(function (fn1, fn2) {
return function () {
return fn1.apply(undefined, arguments) || fn2.apply(undefined, arguments);
};
});
exports.e... |
import {settings} from './settings';
let _lines = {};
class Line {
constructor(dot1, dot2) {
this.dot1 = dot1;
this.dot2 = dot2;
this.boxes = [];
this.drawn = false;
}
draw(ctx) {
let coords1 = this.dot1.coords();
let coords2 = this.dot2.coords();
... |
(function() {
'use strict';
angular
.module('orders')
.controller('CartController', CartController);
CartController.$inject = ['$window', '$scope','OrdersService','$location','$state', '$http'];
function CartController($window, $scope, OrdersService, $location, $state, $http) {
var vm = this;
... |
/**
* Created by syrel on 14.05.17.
*/
import Sparql from '../Sparql'
import LClass from './LClass'
import LBNode from './LBNode'
import _ from 'underscore'
const ALL_CLASSES_QUERY = `
SELECT DISTINCT ?type
WHERE {
?a ?property ?type.
FILTER (?property in (<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>)... |
'use strict';
const ConfigValidator = require('./config-validator');
const NotImplementedError = require('./not-implemented-error');
describe('ConfigValidator', () => {
describe('#isConfigValid', () => {
it('should throw an error if the class is not extended', () => {
expect(ConfigValidator.validateConfi... |
var common_8h =
[
[ "DataConverter", "union_data_converter.html", "union_data_converter" ],
[ "COMPILED_DATA_TIME", "common_8h.html#a4c681fec0533353b247257c82546f7cd", null ],
[ "EN_DEBUG_INTERFACE", "common_8h.html#a5d95e93610ec76137962e82eebebd723", null ],
[ "ERROR", "common_8h.html#a8fe83ac76edc595f... |
import React from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { Form, Input, Button, message, Card } from 'antd';
import md5 from 'md5';
import Header from './../../components/Header';
... |
const Discord = require('discord.js');
const fs = require('fs');
const path = require('path');
const request = require('request');
const async = require('async');
const URL = require('url');
const bot = new Discord.Client();
// Paths
const modulesPath = path.join(__dirname, 'modules');
const localPath = path.join(__di... |
version https://git-lfs.github.com/spec/v1
oid sha256:d138e8f64a78e356f1a117f5d3946c52d5819343816528dc12efcc47c6190243
size 321708
|
importScripts('./prettier/standalone.js');
function prettify({ content, type }) {
let parser;
switch (type) {
case 'js':
parser = 'babylon';
importScripts('./prettier/parser-babylon.js')
break;
case 'json':
parser = 'json';
importScripts('./prettier/parser-babylon.js')
break;
case 'css':
ca... |
document.body.style.backgroundImage = 'url(' + uki.theme.imageSrc('body') + ')';
var ContactsRender = {
template: uki.theme.template('contacts-render'),
render: function(data, rect, i) {
return uki.extend(this.template, [undefined, uki.theme.imageSrc('unknown'), undefined, data[0] || data[1]]).join('');... |
import mongoose from 'mongoose';
import mongoosePaginate from 'mongoose-paginate';
import deepPopulate from 'mongoose-deep-populate';
import objectTransformation from '../helpers/standard-transformation';
const Schema = mongoose.Schema;
const ObjectId = Schema.ObjectId;
const threadSchema = new Schema({
title: {
... |
/**
* __ __ _ _ _ _
* \ \ / / (_) | | | | |
* \ \ /\ / / __ _| |_| |__ _ __ ___| |_
* \ \/ \/ / '__| | __| '_ \ | '_ \ / _ \ __|
* \ /\ /| | | | |_| | | |_| | | | __/ |_
* \/ \/ |_| |_|\__|_| |_(_)_| |_|\___|\__|
*
* @author Kevi... |
const config = require('../config.json');
const axios = require('axios');
const Promise = require('bluebird');
const appID = config.oxDictAppID;
const appKey = config.oxDictAppKey;
exports = {
defWord: (word) => {
}
};
|
import React from 'react';
class Summary extends React.Component{
render(){
return (
<section className="info">
<p className="title">{this.props.title}</p>
<p className="sub_title">{this.props.sub_title}</p>
<div className="condition">
<p className="ge... |
// BERT-JS
// Copyright (c) 2009 Rusty Klophaus (@rklophaus)
// Contributions by Ben Browning (@bbrowning)
// See MIT-LICENSE for licensing information.
// BERT-JS is a Javascript implementation of Binary Erlang Term Serialization.
// - http://github.com/rklophaus/BERT-JS
//
// References:
// - http://www.erlang-fact... |
import rpc from '../rpc';
export function init () {
rpc.emit('init');
}
|
(function() {
"use strict";
jQuery.sap.require("sap.ui.ipw.ViewApp.util.Formatter");
jQuery.sap.require("sap.m.MessageBox");
sap.ui.core.mvc.Controller.extend("sap.ui.ipw.ViewApp.view.Login", {
onInit: function() {
this._oView = this.getView();
this._oView.setModel(new sap.ui.model.json.JSONM... |
/**
* Graphology Assertions Unit Tests
* =================================
*/
var assert = require('assert');
var Graph = require('graphology');
var lib = require('./index.js');
var haveSameNodes = lib.haveSameNodes;
var haveSameNodesDeep = lib.haveSameNodesDeep;
var areSameGraphs = lib.areSameGraphs;
var areSameGr... |
(function (define) {
define(function () {
'use strict';
var buster = require('buster'),
fail = buster.assertions.fail,
assert = buster.assertions.assert,
refute = buster.assertions.refute,
runner = require('./cpuRunner'),
types = runner.t... |
// ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
// portions copyright @2009 Apple Inc.
// License: Licensed under MIT license (see license.js)
// ================... |
var path = require('path');
var webpack = require('webpack');
var autoprefixer = require('autoprefixer');
var precss = require('precss');
module.exports = {
entry: ['webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000',
'./client/router.jsx'],
output: {
//path: path.join(__dirname, '/publ... |
(function($) {
// 计算时间差
function timeDiff(time){
var diffdate = new Date().getTime() - time*1000;
var days = Math.floor(diffdate/(24*3600*1000));
var leave1 = diffdate%(24*3600*1000);
var hours = Math.floor(leave1/(3600*1000));
var leave2 = leave1%(3600*1000);
... |
require.ensure([], function(require) {
require("./121.async.js");
require("./243.async.js");
require("./487.async.js");
require("./974.async.js");
});
module.exports = 975; |
var Resource = require('resorcery').resource;
var _ = require('underscore');
// the root resource at /
exports.handler = new Resource({
GET : function(req, res){
this.repr({ _links : this.uri.links()});
}
});
|
/**
* Created by florianpeters on 10.10.14.
*/
|
import Path from 'path';
process.setMaxListeners(0);
require('../../setup/globals');
const {
requireAll,
} = requireF('core/services/CommonServices');
requireAll(Path.join(rootPath, 'core/services/definitions/**/*.js'));
eventEmitter.emit('Startup');
export default async () => {
const BootServer = requireF('c... |
/* ────────╮
│ cordial🍋 Macro toolkit: Composite tasks
╰─────────┴─────────────────────────────────────────────────────────────────── */
import path from 'path'
import gulp from 'gulp'
import createTaskGroup from '../classes/task-group'
export default function macros(session_, api_) {
return (config_ = {}) => {
... |
'use strict';
const PI = Math.PI;
const RAD_PER_DEG = PI / 180;
const DOUBLE_PI = PI * 2;
const HALF_PI = PI / 2;
const QUARTER_PI = PI / 4;
const TWO_THIRDS_PI = PI * 2 / 3;
/**
* @namespace Chart.helpers.canvas
*/
/**
* Returns the aligned pixel value to avoid anti-aliasing blur
* @param {Chart} chart - The cha... |
"use strict"
var DrillException = require("./DrillException.js")
/**
* This exception can only be raised while parsing drill code
* and thus only from within the "Kernel.prototype.run" method
*/
class DrillRuntimeException extends DrillException {}
module.exports = DrillRuntimeException |
import chai from 'chai';
import { replaceParam } from '../../src/index';
chai.expect();
const expect = chai.expect;
describe('replaceParam()', () => {
it('should be a function', () => {
expect(replaceParam).to.be.a('function');
});
if (this && this === this.window) {
it('should default to using the c... |
var $ = require('../../../config/node_modules/jquery');
/* Dynamic Styling ------------------ */
// Links
$('.field-style a').each(function() {
var $this = $(this);
$this.attr(
'style',
$this
.next('pre')
.children('code')
.text... |
/*
- will take care of any string where str.length === num.
newStr = str.slice(0 , num);
- will take care of any string where str.length > num.
newStr = str.slice(0 , num - dots.length) + dots;
- will take care of any string where num <= 3
newStr = str.slice(0 , num) + dots;
*/
function truncateString(str, num)... |
/*
* Webpack development server configuration
*
* This file is set up for serving the webpack-dev-server, which will watch for changes and recompile as required if
* the subfolder /webpack-dev-server/ is visited. Visiting the root will not automatically reload.
*/
'use strict';
var webpack = require('webpack');
m... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.11.1-master-eacca5e
*/
!function(t,n,i){"use strict";n.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$animate","$rootElement","$window","$log","$$rAF","$document",function(t,n,i,... |
(function(define) {'use strict';
define(function(require) {
// inverseCDF.js
// takes a getMode function, updateLeft, and updateRight
// The resulting function will call getMode with whatever arguments are
// passed to it. getMode returns the object with val = mode, prob =
// corresponding probability.
... |
/**
* @module gmf.controllers.AbstractDesktopController
*/
import gmfControllersAbstractAppController from 'gmf/controllers/AbstractAppController.js';
import gmfContextualdataModule from 'gmf/contextualdata/module.js';
import gmfDrawingModule from 'gmf/drawing/module.js';
import gmfEditingModule from 'gmf/editing/mod... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _moment = require('moment');
var _moment2 = _interopRequireDefault(_moment);
require('moment/locale/zh-cn.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_moment2.default.locale... |
import React from 'react';
import PropTypes from 'prop-types';
export default class Commit extends React.Component {
static propTypes = {
project: PropTypes.object.isRequired,
commit: PropTypes.object.isRequired
};
render () {
const commitUrl = `https://github.com/${this.props.project.repo}/commit/$... |
describe('Unit testing wizard directives', function() {
var $compile,
$rootScope,
$controller,
scope;
// Load the ionic.wizard module, which contains the directive
beforeEach(module('ionic'));
beforeEach(module('ionic.wizard'));
// Store references to $rootScope and $compil... |
(function (window, document, history, undefined) {
// Aliases for query selector functions.
var $ = document.querySelector.bind(document)
var $$ = document.querySelectorAll.bind(document)
// Specify a function to execute when the DOM is fully loaded.
function ready (cb) {
if (document.attachEvent ? docu... |
import Ember from 'ember';
import Config from 'ember-simple-auth-components/configuration';
import Notifyable from "ember-ui-helpers/mixins/notifyable";
const {$,get,Controller} = Ember;
export default Controller.extend(Notifyable,{
actions:{
resetPassword(){
let host = Config.host;
$.post(`${host}/... |
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { createLogger } from 'redux-logger';
import promise from '../../src/index';
const defaultState = {
images: [],
};
const reducer = (state = defaultState, action) => {
if (action.payload && action.payload.image) {
con... |
(function () {
'use strict';
angular
.module('projects.admin.routes')
.config(routeConfig);
routeConfig.$inject = ['$stateProvider'];
function routeConfig($stateProvider) {
$stateProvider
.state('admin.projects', {
abstract: true,
url: '/projects',
template: '<ui-vi... |
require.ensure([], function(require) {
require("./122.async.js");
require("./245.async.js");
require("./490.async.js");
require("./979.async.js");
});
module.exports = 980; |
// imports
import { Model, Schema } from 'model-json-js'
import { parse } from '../util'
// "private" properties
const URL = Symbol('Actor URL template')
export const MODEL = Symbol('Model schema')
/**
* <p>Class that implements a basic Actor instance in the <a href="https://en.wikipedia.org/wiki/Actor_model">Actor... |
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var gutil = require('gulp-util');
var sourceHeader =
"/*\n" +
" * This file is part of legalese.js 0.1.0." +
" *\n" +
" * Copyright (c) 2014 Flávio Lisbôa\n" +
" *\n" +
" * This software may be modified and distributed under the terms\n" +
" * of the MIT ... |
/**
* user.js
*
* Copyright (C) 2013 by Florian Holzapfel
*
* 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 use, copy... |
// View logic and helper functions for the main view
var dirtySettings = {
following: {
dirty: true,
endpoint: '/feed'
},
subreddits: {
dirty: true,
endpoint: '/subreddits'
},
settings: {
dirty: true,
endpoint: '/settings'
}
};
// Name of users that are being follo... |
// A taskfile should export an object with a 'settings' key and a 'tasks' key
module.exports = {
settings: {
// Enter information from the Google Developer Console here
clientId: 'yourappid.apps.googleusercontent.com',
clientSecret: 'yourclientsecret',
redirectUri: 'urn:ietf:wg:oauth:2.0:oob',
// ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SKILL = {
"title": "Skills",
"content": "I have experties on various web technologies.",
"tags": [
"Svn",
"Git",
"JIRA",
"PHP",
"MongoDb",
"MySQL"
],
"skills": [
... |
'use strict';
module.exports = [
'$q',
'$log',
'$http',
'authService',
function($q, $log, $http, authService) {
$log.debug('Child Service');
let service = {};
service.children = [];
service.createChild = (child) => {
$log.debug('service.createChild');
return authService.getToken... |
/* global require, __dirname */
module.exports = function() {
'use strict';
var path = require( 'path' ),
project = {};
project.paths = {
config: 'config/',
assets: 'assets/',
dist: 'dist/',
css: 'css/',
cssSrc: 'assets/theme/scss/',
cssVend: 'assets/theme/scss/vendor/',
... |
'use strict';
/**
* @const
* @type {number}
*/
var HEIGHT = 300;
/**
* @const
* @type {number}
*/
var WIDTH = 700;
/**
* ID уровней.
* @enum {number}
*/
var Level = {
'INTRO': 0,
'MOVE_LEFT': 1,
'MOVE_RIGHT': 2,
'LEVITATE': 3,
'HIT_THE_MARK': 4
};
/**
* Порядок прохождения уровней.
* @type {Arr... |
"use strict";
var AbstractToken = require('../tokens/AbstractToken');
var TokenTypes = require('../constants/TokenTypes');
class KeywordToken extends AbstractToken {
constructor(
name
) {
super();
this.name = name;
}
getType() {
return TokenTypes.KEYWORD;
}
toString() {
return `KEYW... |
var http = require('http');
var url = require('url');
var data;
function handleGetRequest(request, response)
{
response.writeHead(200, {'Content-Type' : "application/json"});
data = url.parse(request.url, true);
response.end(JSON.stringify(data.query));
}
console.log('listening on localhost:8124');
http.createSe... |
var start = Date.now();
db.test.find({ "$or" : [ { "sparse_110" : {"$exists" : true} },
{ "sparse_119" : {"$exists" : true} } ] },
["sparse_110", "sparse_119"]).forEach(function() {});
var end = Date.now() - start;
end;
|
var test = require('tape')
var each = require('each-async')
var db = require('memdb')()
var profiles = require('../model')(db)
test('create a profile', function (t) {
var data = {
account: 'testkey1',
username: 'arealperson',
email: 'arealperson@example.com'
}
profiles.create(data, function (err, p... |
// require just the ES6-to-JS conversion part of babel
require('babel-polyfill')
// the environment object is merged into the exports object below
const environment = {
development: {
isProduction: false
},
production: {
isProduction: true
}
}[process.env.NODE_ENV || 'development']
// exports are retu... |
/*
* Copyright (c) 2016, Globo.com (https://github.com/globocom)
*
* License: MIT
*/
import React, {Component} from "react";
import PropTypes from "prop-types";
import {EditorState, RichUtils} from "draft-js";
import classNames from "classnames";
import ToolbarItem from "./ToolbarItem";
import {getSelectionCoords}... |
module.exports = [
'a'
, 'abaft'
, 'aboard'
, 'about'
, 'above'
, 'absent'
, 'across'
, 'afore'
, 'after'
, 'against'
, 'along'
, 'alongside'
, 'amid'
, 'amidst'
, 'among'
, 'amongst'
, 'an'
, 'apropos'
, 'apud'
, 'around'
, 'as'
, 'aside'
, 'astrid... |
'use strict';
import game from './game.js';
import canvas from './canvas.js';
export default {
/**
* Bind click event on canvas
*/
init() {
var canvasElem = canvas.getCanvas();
if (canvasElem) {
canvasElem.addEventListener('click', this.onClick);
canvasElem.addEventListener('mousemo... |
// Vue
import Vue from 'vue'
import Vuex from 'vuex'
import pathify from 'vuex-pathify'
// Modules
import * as modules from './modules'
Vue.use(Vuex)
export function createStore () {
return new Vuex.Store({
modules,
plugins: [pathify.plugin],
})
}
|
(function ($) {
$.mobiscroll.i18n.it = $.extend($.mobiscroll.i18n.it, {
// Core
setText: 'OK',
cancelText: 'Annulla',
// Datetime component
dateFormat: 'dd-mm-yyyy',
dateOrder: 'ddmmyy',
dayNames: ['Domenica', 'LunedÌ', 'MertedÌ', 'Mercoled&Igrav... |
/**
* NotInitialized Error module.
* @author Aditya Subramanyam
* @module
*/
import ExtendableError from './ExtendableError';
/**
* NotInitialized Error
*/
class NotInitializedError extends ExtendableError {
/**
* Create a NotInitializedError.
* @param {(string|string[])} message - The error messag... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.