code stringlengths 2 1.05M |
|---|
/**
* file-handler.js: handle files
*
* nseg module: Node.js version of MMSEG for Chinese word segmentation
*
* https://github.com/mountain/nseg/
*
* By Mingli Yuan <mingli.yuan+nseg@gmail.com> (http://onecorner.org/)
*
* MIT License
*
*/
var util = require('util'),
path = require('path'),
fs = re... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import store from './store'
/* eslint-disable no-new */
new Vue({
store,
el: '#app',
template: '<App/>',
components: {
App
}
... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S11.13.2_A4.11_T2.5;
* @section: 11.13.2, 11.10.3;
* @assertion: The production x |= y is the same as x = x | y;
* @description: Type(x) is different from Type(y)... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _bluebird = require('bluebird');
var _bluebird2 = _interopRequireDefault(_bluebird);
var _mongoose = require('mongoose');
var _mongoose2 = _interopRequireDefault(_mongoose);
var _httpStatus = require('http-status');
var _httpStatu... |
const _ = require('underscore');
const DrawCard = require('../../../drawcard.js');
class WithoutHisBeard extends DrawCard {
setupCardAbilities() {
this.reaction({
when: {
afterChallenge: (e, challenge) => (
challenge.winner === this.controller &&
... |
import * as core from 'core-js';
import {hyphenate} from './util';
import {bindingMode} from 'aurelia-binding';
function getObserver(behavior, instance, name){
var lookup = instance.__observers__;
if(lookup === undefined){
lookup = behavior.observerLocator.getOrCreateObserversLookup(instance);
behavior.en... |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Flare = props =>
<SvgIcon {...props}>
<path d="M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05l-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-... |
(function() {
var checkVersion = Dagaz.Model.checkVersion;
Dagaz.Model.checkVersion = function(design, name, value) {
if (name != "catch-pigs-restrictions") {
checkVersion(design, name, value);
}
}
var CheckInvariants = Dagaz.Model.CheckInvariants;
Dagaz.Model.CheckInvariants = function(board)... |
import * as PIXI from 'pixi.js';
import config from '../../config';
import TweenLite from 'gsap';
import Collectable from './Collectable';
export default class Item extends Collectable{
constructor(game){
super(game);
}
build(data){
super.build(data);
this.shape = new PIXI.Graphics().beginFill(0x00FF63... |
var expect = require('chai').expect;
var util = require('../..');
describe('cli-util:', function() {
it('should pad string (trailing)', function(done) {
var res = util.pad('a', 5);
expect(res.length).to.eql(5);
expect(res).to.eql('a ');
done();
});
it('should pad string (leading)', function(do... |
/**
* Wrapper
*/
class Wrapper {
constructor(adapter) {
this.adapter = adapter;
}
async initialize() {
return await this.adapter.initialize();
}
async list() {
return await this.adapter.all();
}
async has(id) {
const value = await this.adapter.find(id);
if (value) {
return true;
}
return f... |
/**
* Task server stuff, gls, watch, etc
* output user message
*/
var gulp = require('gulp'),
config = require('../../../../../config.json'),
jshint = require('gulp-jshint'),
gls = require('gulp-live-server'),
gutil = require('gulp-util'),
watch = require('gulp... |
const _ = require('lodash');
const should = require('should');
const sinon = require('sinon');
const Promise = require('bluebird');
const common = require('../../../../../../../server/lib/common');
const validators = require('../../../../../../../server/api/v2/utils/validators');
describe('Unit: v2/utils/validators/in... |
'use strict';
// Implements Brad Hill's Double HMAC pattern from
// https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/february/double-hmac-verification/.
// The approach is similar to the node's native implementation of timing safe buffer comparison that will be available on v6+.
// https://git... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
ext... |
module.exports = require('./webpack.config')({
isProduction: true,
devtool: 'source-map'
});
|
/*----------------------------------------------------------------------*/
/* wl_Widget v 1.2 by revaxarts.com
/* description: handles all function for the widgets
/* dependency: wl_Store, jquery sortable a.d.
/*----------------------------------------------------------------------*/
$.fn.wl_Widget = function ... |
/**
* 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.
*
* @flow
*/
import typeof ReactTestRenderer from 'react-test-renderer';
import type {GetInspectedElementPath} from 'react-devtools... |
// Use this file to change prototype configuration.
// Note: prototype config can be overridden using environment variables (eg on heroku)
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
serviceName: '',
// Default port that prototype runs on
port: '9999',
// Enable or disable... |
/**
*
* Uploads a base64 data object.
*
* @param {Object} data base64 data object
* @callbackParameter error, response
*
* @type protocol
*
*/
module.exports = function file (base64data) {
this.requestHandler.create(
'/session/:sessionId/file',
{ file: base64data },
arguments[argu... |
/*jslint indent: 2*/
/*global require: true, module: true*/
(function () {
'use strict';
module.exports = function (number, value) {
return number + value;
};
}());
|
/* js-yaml e28a4bea9f7dd6fd54ddf742d3ae23bde9400fb2 https://github.com/minj/js-yaml
* check package-lock.json
* $ make browserify
*/(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="un... |
import $ from 'jquery';
import Vue from 'vue';
import Cookies from 'js-cookie';
import Flash from '../flash';
import Translate from '../vue_shared/translate';
import banner from './components/banner.vue';
import stageCodeComponent from './components/stage_code_component.vue';
import stagePlanComponent from './component... |
function addListener (reference){
$(".question-type")[reference].onchange = function () {
changeQuestionType(this.value, reference);
}
};
var ngAddApp = angular.module("ngAddApp", []);
ngAddApp.controller("MainCtrl", ['$scope', function ($scope) {
var numOfQuestions = 1; //number of origin address boxes
... |
/** @type {import("../../../").Configuration[]} */
module.exports = [
{
mode: "production",
entry: "./index",
output: {
filename: "a.js"
},
stats: "none"
},
{
mode: "production",
entry: "./index",
output: {
filename: "b.js"
},
stats: "none"
}
];
|
function NavbarCtrl($scope, $http, $interval) {
var items = [];
this.addItem = function (item) {
items.push(item);
};
this.select = $scope.select = function (item) {
angular.forEach(items, function (item) {
item.selected = false;
});
item.selected = true;
... |
/*
* grunt-rt-deployinator
* https://github.com/michael/grunt-rt-deployinator
*
* Copyright (c) 2014 Michael Klein
* Licensed under the MIT license.
*/
'use strict';
var manifestOptions = {
manifest: 'runtastic',
manifestSize: 10
};
var redisConfigDev = {
host: 'localhost',
port: 6379
};
module.export... |
/*
* File: app/view/formAplicacionViewModel.js
*
* This file was generated by Sencha Architect version 4.2.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... |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.input = mod.exports;
}
})(typeof globalThis ... |
var mongoose = require('mongoose');
var UserSchema = new mongoose.Schema({
username: {type: String, unique: true},
password: String,
name: String,
image: String,
// format is intended to be: { <qNumber>: "solution string", ...}
// entries will only exist for a question that the user has solved.
// Note:... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S13.2.2_A13;
* @section: 13.2.2;
* @assertion: Calling a function as a constructor is inadmissible as long as this.any_Function is declared by eval and called;
* @desc... |
'use strict';
// Configuring the Articles module
angular.module('core').run(['Menus',
function (Menus) {
}
]);
|
"use strict";
var it = require('it'),
assert = require('assert'),
helper = require("../../data/oneToOne.helper.js"),
patio = require("../../../lib"),
comb = require("comb");
var gender = ["M", "F"];
it.describe("patio.Model oneToOne with a hash as the key", function (it) {
var Works, Employee;
... |
type LibK = {
p: string;
...
}
|
import React from 'react'
import Icon from 'react-icon-base'
const FaCommenting = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m14.3 20q0-1.2-0.9-2t-2-0.9-2 0.9-0.8 2 0.8 2 2 0.9 2-0.9 0.9-2z m8.6 0q0-1.2-0.9-2t-2-0.9-2 0.9-0.9 2 0.9 2 2 0.9 2-0.9 0.9-2z m8.5 0q0-1.2-0.8-2t-2-0.9-2 0.9-0.9... |
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
(function() {
"use strict";
var UNIX_BUILD_COMMAND = "./jake.sh";
var WINDOWS_BUILD_COMMAND = "jake";
var UNIX_INTEGRATE_COMMAND = "./integrate.sh";
var WINDOWS_INTEGRATE_COMMAND = "integrate";
var os = require("os");
... |
YUI.add('primrose-method-spy-test', function (Y) {
Y.namespace('Primrose').MethodSpyTest = new YUITest.TestCase({
name: "MethodSpy",
setUp: function () {
var that = this;
this.wasRun = false;
this.meth = function () {
that.wasRun = true;
};
this.obj = {
meth... |
import resolver from './helpers/resolver';
import './helpers/flash-message';
import {
setResolver
} from 'ember-qunit';
setResolver(resolver);
|
describe("Table", () => {
beforeEach(() => {
cy.visit("http://localhost:21356");
});
it("can navigate to Table", () => {
cy.contains("Table").click({force: true})
.hash()
.should("eq", "#/components/table");
});
beforeEach(() => {
cy.visit("http://localhost:21356/#/components/table");
});
context(... |
//- app/modules/UI/routes.js
export default function routes($urlRouterProvider, $stateProvider) {
'use strict';
return $stateProvider
.state('root.ui', {
url: '/UI',
abstract: true,
content: {
title: 'UI'
}
})
.state('root.ui.general', {
url: '/general',
cont... |
var Writer = require(process.env.PWD+'/tools/generator/writers/writer.js');
function Model(name, args, pckg) {
Writer.call(this, name, args, pckg);
var self = this;
self.write_to = 'models';
self.process = function() {
var mainTemplate = new self.Template('model.tmpl.js')
.addReplacer('<Name>', self.nam... |
Ext.define('CF.model.Station', {
extend: 'Ext.data.Model',
fields : [
{
name: 'symbolizer',
convert: function(v, r) {
return r.raw.layer.styleMap.createSymbolizer(r.raw, 'default');
}
},
{name: 'station', type: 'st... |
import Vue from 'vue';
import FileRow from '~/vue_shared/components/file_row.vue';
import FileRowExtra from '~/ide/components/file_row_extra.vue';
import { file } from 'spec/ide/helpers';
import mountComponent from '../../helpers/vue_mount_component_helper';
describe('File row component', () => {
let vm;
function... |
function collect(stream){function save(b){typeof b=="string"&&(b=new Buffer(b));if(Buffer.isBuffer(b)&&!b.length)return;buf.push(b)}function saveEntry(e){collect(e),entryBuffer.push(e)}function proxyPause(p){p.pause()}if(stream._collected)return;stream._collected=!0,stream.pause(),stream.on("data",save),stream.on("end"... |
const { app, BrowserWindow } = require('electron')
const fs = require('fs')
app.disableHardwareAcceleration()
let win
app.whenReady().then(() => {
win = new BrowserWindow({ webPreferences: { offscreen: true } })
win.loadURL('https://github.com')
win.webContents.on('paint', (event, dirty, image) => {
fs.wri... |
/*
* Copyright (c) 2017. MIT-license for Jari Van Melckebeke
* Note that there was a lot of educational work in this project,
* this project was (or is) used for an assignment from Realdolmen in Belgium.
* Please just don't abuse my work
*/
//! moment.js locale configuration
//! locale : afrikaans (af)
//! author... |
window.addEventListener('DOMContentLoaded', function() {
window.requestAnimationFrame(function() {
var manager = new GameManager(4, KeyboardInputManager, HTMLActuator);
});
var container = document.getElementById('container');
function resetContainer() {
container.style.perspective = '1000px';
con... |
function a(sent) {
assert.strictEqual(sent, 1);
a.called = true;
}
function b(sent) {
assert.strictEqual(sent, 2);
b.called = true;
return { callee: b };
}
function *gen() {
assert.ok(!a.called);
assert.ok(!b.called);
for (var key in a(yield 0), b(yield 1)) {
assert.ok(a.called);
assert.ok(b.c... |
var express = require('express');
var app = express();
app.use('/', express.static('public'));
app.get('/', function(req, res) {
res.sendFile('./public/index.html');
});
app.listen(3000, function() {
console.log('Server started on port 3000')
}); |
/**
* WordPress jQuery-Ajax-Comments v1.3 by Willin Kan.
* URI: http://kan.willin.org/?p=1271
* for WP3.5+ | modified version URI: http://zww.me/wordpress3-5-willin-ajax-comment.z-turn
*/
var i = 0, got = -1, len = document.getElementsByTagName('script').length;
while ( i <= len && got == -1){
var js_url = documen... |
/**
* Mail Service for Venture Game
*/
'use strict';
var nodemailer = require('nodemailer'),
winston = require('winston'),
logger = new (winston.Logger)({
transports: [
new (winston.transports.File)({
name: 'sent_mail',
filename: './logs/sent_mail.log',
... |
describe("module:ng.service:$window", function() {
beforeEach(function() {
browser.get("./examples/example-example66/index.html");
});
it('should display the greeting in the input box', function() {
element(by.model('greeting')).sendKeys('Hello, E2E Tests');
// If we click the button it will block the tes... |
/**
* Tests sit right alongside the file they are testing, which is more intuitive
* and portable than separating `src` and `test` directories. Additionally, the
* build process will exclude all `.spec.js` files from the build
* automatically.
*/
define(['home/index', 'angularMocks'], function(app, ngMock ) {
... |
/** @license React vundefined
* react-dom-test-utils.production.min.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(){'use strict';(function(f,q){"object"===typeof ex... |
var generators = require('yeoman-generator');
module.exports = generators.Base.extend({
html: function() {
this.mkdir('public');
this.copy('index.html', 'public/index.html');
},
app: function() {
this.mkdir('src/js/actions');
this.mkdir('src/js/constants');
this.mkdir('src/js/components');
this.mkdir... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("widget","gl",{move:"Prema e arrastre para mover"}); |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) ... |
module.exports = function(grunt) {
grunt.initConfig({
exec: {
test1: {
cmd: 'echo bruce willis was dead> test1'
}
, test2: {
cmd: function() { return 'echo grunt@' + this.version + '> test2'; }
}
, test3: {
cmd: function(answerToLife, tacoThoughts) {
var... |
import { $$ } from '../dom'
import { Command } from '../editor'
import AuthorModal from './AuthorModal'
export default class AddAuthorCommand extends Command {
getCommandState () {
return { disabled: false }
}
execute (params, context) {
const editorSession = context.editorSession
const document = e... |
const mkdirp = require('mkdirp');
const fs = require('fs');
const nunjucks = require('nunjucks');
function saveBook(dirPath) {
fs.readFile(process.env['HOME'] + '/Library/Application Support/cucumberly-editor/cucumberly.db', 'utf8', function (err, bookData) {
bookData = JSON.parse(bookData);
boo... |
'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]; } }... |
import passport from 'passport';
import {Strategy as TwitterStrategy} from 'passport-twitter';
export function setup(User, config) {
passport.use(new TwitterStrategy({
consumerKey: config.twitter.clientID,
consumerSecret: config.twitter.clientSecret,
callbackURL: config.twitter.callbackURL
},
functio... |
angular.module('hoodie')
.factory('hoodieObject',
function (hoodieStore, $rootScope) {
var service = {};
function updateObject(des, src) {
angular.forEach(des, function(value, key) {
if(!src.hasOwnProperty(key)) {
delete des[key];
}
});
angular.extend(des, src);... |
/* global chrome, BugMagnet */
BugMagnet.ChromeMenuBuilder = function () {
'use strict';
var self = this,
buildContentMessage = function (menuValue) {
if (typeof (menuValue) === 'string') {
menuValue = { '_type': 'literal', 'value': menuValue};
}
return function (info, tab) {
chrome.tabs.sendMessag... |
var mongoose = require("mongoose");
var bcrypt = require("bcrypt");
var userSchema = new mongoose.Schema({
username: {
type: String,
unique: true,
required: true,
trim: true,
},
password: {
type: String,
required: true
},
email: {
type: String,
unique: true,
required: tr... |
pn.util.createTable = function(_args) {
var data = [];
data.push(new pn.util.createTableRow({
backgroundImage: pn.images.rowbg,
data : {
title : 'No result',
},
index : 0,
}))
var view = Ti.UI.createView({
top : _args.top != undefined ? _args.top : undefined,
bottom : _args.bottom != undefined ? _ar... |
(function(){
"use strict";
}());
|
(function() {
/*
Copyright (c) 2002-2014 "Neo Technology,"
Network Engine for Objects in Lund AB [http://neotechnology.com]
This file is part of Neo4j.
Neo4j is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software... |
var searchData=
[
['x',['x',['../classhryky_1_1geometry_1_1coord_1_1_cartesian3_d.html#a4dcd5b0cc85e0e3d4827bf552445c6c7',1,'hryky::geometry::coord::Cartesian3D::x()'],['../classhryky_1_1geometry_1_1coord_1_1_cartesian2_d.html#a43e730c23f9c35500ca23cdae59d2527',1,'hryky::geometry::coord::Cartesian2D::x()']]]
];
|
const querystring = require("querystring");
const http = require("http");
const url = require("url");
// TODO 处理错误逻辑, 支持 https
require('http').createServer(function(req, res) {
let str = querystring.unescape(req.url.slice(1))
const u = url.parse(str);
res.setHeader('Access-Control-Allow-Origin', '*');
let bod... |
'use strict';
var isFunction = require('es5-ext/function/is-function')
, mixin = require('es5-ext/object/mixin')
, setPrototypeOf = require('es5-ext/object/set-prototype-of')
, toStringTagSymbol = require('es6-symbol').toStringTag
, d = require('d')
, DbjsError =... |
var http = require('http');
var nodes = [
"a",
"e",
"6",
"12",
"1a",
"2",
"16",
"1e"
];
var server = http.createServer(function(req, res) {
var delay = Math.floor((Math.random() * 35) + 30)
process.stdout.write(".");
setTimeout(function() {
var nodeNumber = Math.floor((Math.random() * nodes.length) + 1)... |
/* @flow */
import React from "react";
import ReactDOM from "react-dom";
export type RenderArgsType = {
component: Function,
args: Object,
elementSelector: string,
dataSelector: string,
onRender?: Function
};
const render = async function(params: RenderArgsType) : Promise {
const { component, args, elemen... |
/*------------------------------------------------------------------------------------
MSF Dashboard - module-intro.js
(c) 2015-present, MSF-Dashboard contributors for MSF
List of contributors: https://github.com/MSF-UK/MSF-Dashboard/graphs/contributors
Please refer to the LICENSE.md and LICENSES-DE... |
YUI().use('gallery-icello-button', 'node-event-simulate', function (Y) {
'use strict';
var CSS = {
DISABLED: 'yui3-icello-button-disabled',
VIEW_TYPES: {
ICON_ONLY: 'yui3-icello-button-icononly',
LABEL_ONLY: 'yui3-icello-button-labelonly',
... |
// ExStart:1
var fs = require('fs');
var assert = require('assert');
var SlidesApi = require('asposeslidescloud');
var StorageApi = require('asposestoragecloud');
var configProps = require('../Config/config.json');
var data_path = '../../../Data/';
var AppSID = configProps.app_sid;
var AppKey = configProps.api_key;
va... |
var crypto = Npm.require('crypto');
import {AccountsCommon} from "./accounts_common.js";
/**
* @summary Constructor for the `Accounts` namespace on the server.
* @locus Server
* @class AccountsServer
* @extends AccountsCommon
* @instancename accountsServer
* @param {Object} server A server object such as `Meteo... |
/**
* Module dependencies.
*/
var through = require('through')
, esprima = require('esprima')
, estraverse = require('estraverse')
, escodegen = require('escodegen')
, util = require('util');
/**
* Transform AMD to CommonJS.
*
* This transform translates AMD modules into CommonJS modules. AMD modules
*... |
"use strict";
const path = require("path");
const fs = require("graceful-fs");
const MemoryFs = require("memory-fs");
const webpack = require("..");
describe("WatchDetection", () => {
if (process.env.NO_WATCH_TESTS) {
it.skip("long running tests excluded", () => {});
return;
}
jest.setTimeout(10000);
for (... |
"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")... |
Template.postItem.helpers({
ownPost: function() {
return this.userId === Meteor.userId();
},
domain: function() {
var a = document.createElement('a');
a.href = this.url;
return a.hostname;
}
});
|
// 在这里新增你的测试用例
describe('测试用例', function() {
var S = KISSY;
S.config({
packages:[{
name:'proj',
path:'../'
}]
});
// 在这里添加你的测试用例
it('测试用例A', function(done) {
S.use('proj/index',function(S,Index){
Index.init();
S.one('#log').text().should.be.eql('ok');
done();
});
});
});
|
import autobind from 'autobind-decorator';
@autobind
class Word{
indexWord = null;
chars = [];
@Private _width = 0;
@Private _height = 0;
@Private _x = 0;
@Private _y = 0;
constructor(){
}
get x(){
return this._x;
}
set x(value){
this._x = value;
}
... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // A... |
var env = process.env.NODE_ENV || 'development'
|
export default {
observers: [
'_stopEditingOnResize(active)'
],
listeners: {
'keyup': '_keyupHandler',
'blur': '_blurHandler'
},
/**
* Go inactive on viewport resize
* (Since we're fixed width and abspos)
* @param {Boolean} active Current value of the active property
* @return {unde... |
"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")... |
// By Philipp Sporrer
// https://github.com/PhilippSpo
// philipp.sporrer@planifcia.de
//
// Last update February 2015
//
// Free to use and distribute at will
// As long as you are nice to people, etc
/* jshint strict: false */
/* global PolygonFunctions:true */
/* global CanvasFunctions */
/* global lodash */
var... |
declare type StoryFunc<T> = () => T;
declare type Info = {|
kind: string,
story: string,
|};
declare module '@storybook/react' {
declare class Story { add(name: string, func: StoryFunc<Node>): Story }
declare export function configure(func: () => void, typeof module): void;
declare export function addDecora... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S11.4.3_A3.2;
* @section: 11.4.3;
* @assertion: Result of applying "typeof" operator to null is "object";
* @description: typeof null === "object";
*/
//CHECK#1
i... |
/**
* @author Glen Cheney
*/
/*
* jQuery throttle / debounce - v1.1 - 3/7/2010
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function(b,c){var $=b.jQuery||b.Cowb... |
import { Screen } from '../screen';
import { SingleVanquishedScreen, SplitVanquishedScreen } from './vanquished';
import GameState from '../../init/gamestate';
import ChangeTitle from '../../lib/page-title';
export default class WinScreen extends Screen {
static enter() {
GameState.game.engine.lock();
this.... |
import assert from 'assert';
import Q from 'q';
import request from 'request';
import url from 'url';
import { memoize, uniqBy } from 'lodash';
import { filter, until } from './promises';
import decorateFunctionLogger from './decorate-function-logger';
const INTERVAL = 60000;
const PAGE_LENGTH = 100;
const MAX_CHANGEL... |
import lib from './mutations';
import { FINISH_PROGRESS, OPEN_MODAL, CLOSE_MODAL } from './mutationTypes';
describe('toolbar mutations', () => {
test(`finishes progress for ${FINISH_PROGRESS}`, () => {
expect(lib[FINISH_PROGRESS]({})).toEqual({ ui: { currentProgress: 0 } });
});
test('opens modals', () => {... |
module.exports = {
get: function(key) {
return localStorage.getItem(key);
},
set: function(key, value, options) {
return localStorage.setItem(key, value);
},
unset: function(keys) {
if (!(keys instanceof Array)) keys = [keys];
for (var i = 0; i < keys.length; i++) localStorage.removeItem(keys[... |
import React, { PropTypes } from 'react';
import ThreadCard from './thread-card';
import * as I from 'immutable';
const ThreadCardList = ({ shouldShowImagePreview, toggleImagePreview, threads }) => {
return (
<section>
{
threads
.map((thread, i) => {
const data = thread.get('d... |
import { h } from 'preact' // eslint-disable-line no-unused-vars
export default () => (
<div className='FourOhFour page'>
<h1>Dag nab it!</h1>
<p>The url you are trying cannot be found.</p>
</div>
)
|
/**
* Created by romain & hen (hendrik.strobelt.com)
*/
function plotSetOverview() {
var initialize = false;
var animate = false;
if (arguments[0]){
//console.log(arguments[0]);
initialize = arguments[0].initialize || false;
if (initialize){
ctx.setSelection.mode =... |
var structswig__module__info =
[
[ "cast_initial", "structswig__module__info.html#a15f6b50a41f144afb1148fc412dc01f7", null ],
[ "clientdata", "structswig__module__info.html#a9fb6e461fcaf14c209049adfae4e9754", null ],
[ "next", "structswig__module__info.html#ac177d150b85ab77122089acf1f06d9c6", null ],
[ ... |
/* eslint-env mocha */
'use strict'
const config = require('../mocha.config')
const request = config.request
const agent = config.supertest.agent(config.baseUrl)
const authHelper = require('../helper/user')
// const databaseHelper = require('../helper/database')
describe('SIGN controller', function () {
describe('... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.