code stringlengths 2 1.05M |
|---|
declare export default function foo(x: number, y: string): void; |
var util = require('util');
var Filterer = require('./Filterer');
/**
* @typedef {Object} module:py-logging.LogRecord
* @property {number} created Time when this record was created.
* @property {string} name Name of the logger.
* @property {number} levelno Numeric logging level.
* @property {string} levelname Tex... |
import firebase from '../firebase/firebase';
export function getReservations() {
return dispatch => {
dispatch(onGetReservations());
return firebase.database().ref('reservations').on('value', function (snap) {
const resevations = snap.val();
if (resevations)
... |
const td = require('testdouble');
const expect = require('../../../../helpers/expect');
const Promise = require('rsvp').Promise;
const adbPath = 'adbPath';
const emulatorName = 'emulator-fake';
const spawnArgs = [adbPath, ['-s', emulatorName, 'emu', 'kill']];
describe('Android Kill Emulat... |
const each = require('apr-engine-each');
/**
* <a id="for-each"></a>
* Applies the function `iteratee` to each item in `coll`, in parallel.
*
* [](https://www.npmjs.com/package/apr-for-each) [ => {
it('should show title "Adopt Fun... |
'use strict';
module.exports = function () {
for (var i = 0; i < arguments.length; ++i) {
if (arguments[i] != null) {
return arguments[i];
}
}
};
|
var EventEmitter = require('events').EventEmitter;
var utils = require('../../util/utils');
var logger = require('pomelo-logger').getLogger('pomelo-rpc', __filename);
var exp = module.exports = new EventEmitter();
exp.connect = function(tracer, cb) {
tracer.info('client', __filename, 'connect', 'connect to b... |
(function() {
'use strict';
var _ = require('lodash');
var express = require('express');
var router = express.Router();
var userAuth = require('../helpers/authentication');
var Beer = require('../../models/beer-model');
var TapRoom = require('../../models/taproom-model.js');
router.get... |
var wechat = require('wechat');
var wxConf = require('../../../conf').wechat;
var express = require('express');
var router = express.Router();
var config = {
token: wxConf.token,
appid: wxConf.appid
};
router.use(express.query());
router.use('/', wechat(config, function(req, res, next) {
var message = req.... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global'],
function(jQuery) {
"use strict";
/**
* ColumnsPanel renderer.
* @namespace
*/
var P1... |
var popbill = require('./');
popbill.config({
LinkID :'TESTER',
SecretKey : 'SwWxqU+0TErBXy/9TVjIPEnI0VTUMMSQZtJf3Ed8q3I=',
IsTest : true,
defaultErrorHandler : function(Error) {
console.log('Error Occur : [' + Error.code + '] ' + Error.message);
}
});
var accountCheckService = popbill.AccountCheckServ... |
import React from 'react';
import Control from './Control';
class ZoomComponent extends React.Component {
zoomIn(e) {
this.props.map.zoomIn(e.shiftKey ? 3 : 1);
}
zoomOut(e) {
this.props.map.zoomOut(e.shiftKey ? 3 : 1);
}
render() {
return (
<div className="leaflet-bar">
<a classNa... |
webpackJsonp([3],{
/***/ 16:
/***/ function(module, exports) {
console.log("非ADM规范js, foo2.js, 有个全局变量FOO");
var FOO = "FOO2.js"
/*** EXPORTS FROM exports-loader ***/
module.exports = FOO;
/***/ }
}); |
/* booking.js
*
* Handles interactions on the bookings page including async booking actions.
*/
var timepicker;
var datepicker;
// Initilaise the time and date pickers including disabling clots that have already
// been booked.
var init_booking_form = function(){
// initialise the time and date picker components... |
import {chai, assert} from 'chai';
import FirebaseAPI from '../../public/js/api/firebase.api';
import {registerHELP, registerFirebase, loginFirebase} from '../../public/js/api/student.api';
//TO-DO: ADD SHOULD ASSERTIONS INSTEAD OF LOGGING TO CONSOLE
describe('Registering as a student', function(){
this.timeout(20... |
import React from 'react'
import PropTypes from 'prop-types'
import { Helmet } from 'react-helmet'
import { StaticQuery, graphql } from 'gatsby'
import Header from './header'
import './layout.css'
const Layout = ({ children }) => (
<StaticQuery
query={graphql`
query SiteTitleQuery {
site {
... |
angular.module('shoppingBasketItem', [])
.directive('shoppingBasketItem', function () {
return {
restrict: '',
template: '/shoppingBasketItem.tpl.html',
replace: true,
link: function ($scope, $element, attr) {
var _
minQu... |
'use strict';
var Message = require('../../lib/message');
module.exports = function(app) {
var MessagesController = {
create: function(req, res, next) {
var message = new Message({
type: req.body.type,
body: req.body.body
});
app.services.queue.sendMessage(message, function(er... |
// @flow
const Promise = require('bluebird');
const _ = require('lodash');
const tryRequire = require('../utilities/try_require');
const serviceControl = require('../service_control');
const knex = tryRequire('knex');
const neutralDatabaseName = {
maria: 'information_schema',
mssql: 'information_schema',
mysql:... |
var expect = require('expect.js');
var util = require('../shared/Util.js');
describe('Testing Server side Util class.', function () {
it("getTypeString test", function(done) {
expect(util.getTypeString("0000000000000000000")).to.be("");
expect(util.getTypeString("1000000000000000000")).to.be("conferences");... |
import React from 'react'
import css from './style.scss'
export const ENTER_CLASS_WORD = 'enterClassWord'
export const CONFIRMING_CLASS_WORD = 'confirmClassWord'
export const JOIN_CLASS = 'joinClass'
export const JOINING_CLASS = 'joiningClass'
export class JoinClass extends React.Component {
constructor (props) {
... |
'use strict'
const Joi = require('@hapi/joi')
const Chalk = require('chalk')
const RestHapi = require('rest-hapi')
const errorHelper = require('../utilities/error-helper')
const Config = require('../../config')
const authStrategy = Config.get('/restHapiConfig/authStrategy')
const headersValidation = Joi.object({
... |
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import ListContext from '../List/ListContex... |
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
//Minify the JavaScript into the build folder
uglify: {
options: {
banner: '/**\n' +
'* @preserve <%= pkg.name %> v<%= pkg.version %> | <%= pkg.author %> | <%... |
var FFI = require('ffi'),
ref = require('ref'),
os = require('os');
var voidPtr = ref.refType(ref.types.void);
exports.CONSTANTS = {
};
var libFile;
if (os.platform() == "darwin") {
libFile = 'step2stl.so.dylib';
} else if (os.platform() == "linux") {
libFile = 'step2stl.so';
}
exports.step2stl = n... |
require("./94.js");
require("./188.js");
require("./376.js");
require("./752.js");
module.exports = 753; |
var isFB = require('./isFB')
var promisify = require('./promisify')
module.exports = function get (fb, $e, callback) {
if (isFB(this)) {
callback = $e
$e = fb
fb = this
}
callback = callback || promisify()
fb.q([['?e', '?a', '?v']], { e: $e }, [], function (err, results) {
if (err) return cal... |
/**
* @param {number[]} findNums
* @param {number[]} nums
* @return {number[]}
*/
const nextGreaterElement = function (findNums, nums) {
let numsMap = new Map();
for (let i = 0; i < nums.length; ++i) {
numsMap.set(nums[i], i);
}
let ret = new Array(findNums.length);
for (let i = 0; i < f... |
/* jshint node: true, esversion: 6 */
/* globals
describe: false,
expect: false,
it: false
*/
import { Codec } from "../src/codec";
import { Util } from "../src/util";
import { Data } from "./testdata";
describe("Codec", () => {
it("should initialize properly", () => {
let codec;
expect(() =>... |
import { combineReducers } from 'redux'
import app from './modules/app'
const rootReducer = asyncReducers => combineReducers({
app,
...asyncReducers,
})
export const injectReducer = (store, { key, reducer }) => {
if (Object.hasOwnProperty.call(store.asyncReducers, key)) return
/* eslint no-param-reassign: ... |
import { Lbryio } from 'lbryinc';
import { ACTIONS, doToast, doUpdateBalance } from 'lbry-redux';
import { selectUnclaimedRewards } from 'redux/selectors/rewards';
import { selectUserIsRewardApproved } from 'redux/selectors/user';
import { doFetchInviteStatus } from 'redux/actions/user';
import rewards from 'rewards';
... |
// jQuery & Bootstrap init
var $ = window.$ = window.jQuery = require('jquery');
var Bootstrap = require('bootstrap-sass');
// vue.js init
var Vue = require('vue');
var VueResource = require('vue-resource');
Vue.use(VueResource);
$(document).ready( function() {
if ($('#store-form').length) {
let da... |
import React, { Component, PropTypes } from 'react';
import dispatcher from 'focus-core/dispatcher';
import Button from 'focus-components/components/button';
import { navigate } from '../../utilities/router';
import backgrounds from '../../stores/backgrounds';
import Article from '../../components/article';
import S... |
lengths =
{
"chapter1":2,
"chapter2":4,
"chapter10"14
}
ng-repeat
for i in range(lengths[chapterSelected] :
build element "<a href=/"" + chapterSelect + "//#section" + {i+1} + ">"Section" + (i+1) + "/""</a>
var populateStates = function () {
angular.forEach(lengths, function(cha... |
/*
* (Creazione scheda) javascript functions
*
* @ author: Luca90
* @ homepage: http://www.luca90.netsons.org/ext.php (sooner)
* @ email: lucavall90@gmail.com
* @ subversion: 0.1
* @ last modified: 30th July 2007 16:36 pm
*
* Notes:
* Check functionality
* Check comments lang... |
'use strict';
var test = require('tape');
var aar = require('./');
test('should call the callback when all async stuff is done', function (t) {
var next = aar(function (err, results) {
t.error(err);
t.equal(results.length, 2);
t.deepEqual(results, [1, 2]);
t.end();
});
process.nextTick(next().bi... |
/* global QUnit */
import { WebGLProperties } from '../../../../../src/renderers/webgl/WebGLProperties';
export default QUnit.module( 'Renderers', () => {
QUnit.module( 'WebGL', () => {
QUnit.module( 'WebGLProperties', () => {
// INSTANCING
QUnit.todo( 'Instancing', ( assert ) => {
assert.ok( false, ... |
// @flow
const path = require( "path" );
opaque type AliasName = string;
opaque type ActualName = string;
opaque type Spec = string;
opaque type ExactVersion = string;
opaque type RangeVersion = string;
opaque type Resolved = string;
opaque type Integrity = string;
export type DepType = "deps" | "devDeps" | "optiona... |
var dataViews = require('../');
/**
* @param {Playlists} group
* @constructor
*/
var Playlists = function(group) {
goog.base(this, group);
};
goog.inherits(Playlists, dataViews.Abstract);
/**
* @return {Promise.<Array.<dataViews.Playlist>>}
*/
Playlists.prototype.getChildren = function() {
return app.api.vk... |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '@material-ui/core/SvgIcon';
function createSvgIcon(path, displayName) {
let Icon = props => (
<SvgIcon {...props}>
{path}
</SvgIcon>
);
Icon.displayName = `${displayName}Icon`;
Icon = pure(Icon);
Icon.muiName = ... |
import {UPDATE_FILTER} from '../actions/updateFilter'
export default function (state = {}, action) {
switch (action.type) {
case UPDATE_FILTER:
return action.tags
default:
return state
}
}
|
//Made by Not American
var shop = {
host: "109.54.53.110",
port: 8000,
currency: "Johto Bucks",
symbol: "$",
dailyLogins: new Object(),
gains: {
battle: 0.5,
perHour: 1,
twistWin: 0.1,
rebusWin: 0.25,
dailyLogins: 2,
tour: "johto bucks won = number of players in tournaments"
},
items: {
"symbol": ... |
const string = {
_regex: {
alphanumeric: /^[a-zA-Z0-9]*$/
},
default: context => {
if (typeof context.value !== 'string' || context.value.length === 0) {
context.fail('Value must be a string')
}
},
alphanumeric: context => {
if (context.value === null || context.value && !context.value.t... |
/**
*
* DATA: index
*
*
*
* DESCRIPTION:
* -
*
*
* API:
* -
*
*
* NOTES:
* [1]
*
*
* TODO:
* [1]
*
*
* HISTORY:
* - 2014/05/26: Created. [AReines].
*
*
* DEPENDENCIES:
* [1]
*
*
* LICENSE:
* MIT
*
* Copyright (c) 2014. Athan Reines.
*
*
* AUTHOR:
* Athan Reines. athan@nodeprime.com. 2014.
*
*
*/
(function... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'nl', {
label: 'Stijl',
panelTitle: 'Opmaakstijlen',
panelTitle1: 'Blok stijlen',
panelTitle2: 'Inline ... |
import test from "ava";
import path from "path";
import sinon from "sinon";
import Eloquent from "../../lib";
// constructor
test("Eloquent returns a constructor", (t) => {
t.is(typeof Eloquent, "function");
});
test("Eloquent constructor should works", (t) => {
Eloquent(".");
t.pass();
});
test("Eloque... |
module.exports = function (base){
var base2 = base[2];
var byte_255_str = '11111111';
var code = "\n"
+ "for(var i = 0; i < 500000; i++)\n"
+ " base2.js[10](byte_255_str);"
;
console.log(code);
var start = new Date().getTime();
for(var i = 0; i < 500000; i++)
base2.js[10](byte_255_str)... |
import React, { Component } from 'react';
import { Tooltip } from 'antd';
import classNames from 'classnames';
import styles from './index.less';
/* eslint react/no-did-mount-set-state: 0 */
/* eslint no-param-reassign: 0 */
const isSupportLineClamp = document.body.style.webkitLineClamp !== undefined;
const Ellipsis... |
console.log("Linked.");
// Dramatis Personae
var hobbits = [
'Frodo Baggins',
'Samwise \'Sam\' Gamgee',
'Meriadoc \'Merry\' Brandybuck',
'Peregrin \'Pippin\' Took'
];
var buddies = [
'Gandalf the Grey',
'Legolas',
'Gimli',
'Strider',
'Boromir'
];
var lands = ['The Shire', 'Rivendell', 'Mordor'];
va... |
const http = require('http')
const express = require('express')
const bodyParser = require('body-parser')
const asyncExpress = require('./asyncExpress')
module.exports = class WebApp {
constructor({ todoList, serveClient }) {
this._todoList = todoList
this._serveClient = serveClient
}
async buildApp() {... |
"use strict";
// Project
const messages = require("./messages");
const predicates = require("./predicates");
module.exports = [
{
message: messages.mustBePositiveInteger,
predicate: predicates.isPositiveInteger,
property: "apiVersion"
},
{
message: messages.mustBePopulatedString,
predicate: ... |
/*
* grunt-hexo
* https://github.com/4nduril/grunt-hexo
*
* Copyright (c) 2015 Tobias Barth
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= mochaTest.test.sr... |
// https://www.codewars.com/kata/first-non-repeating-character/javascript
function firstNonRepeatingLetter(s) {
let map = {};
let len = s.length;
for(let i=0;i<len;i++){
let ch = s.charAt(i).toLowerCase();
if(map[ch]==null){
map[ch]={
pos:i,
isDistinct:true
}
}
else{
... |
/** @constructor */
ScalaJS.c.scala_runtime_AbstractPartialFunction$mcZI$sp = (function() {
ScalaJS.c.scala_runtime_AbstractPartialFunction.call(this)
});
ScalaJS.c.scala_runtime_AbstractPartialFunction$mcZI$sp.prototype = new ScalaJS.inheritable.scala_runtime_AbstractPartialFunction();
ScalaJS.c.scala_runtime_Abstra... |
import React from 'react';
import MobilePage from '../containers/MobilePage';
import TradeTypePickerContainer from './TradeTypePickerContainer';
export default (props) => (
<MobilePage toolbarShown={false} backBtnBarTitle="Trade Type">
<TradeTypePickerContainer {...props} />
</MobilePage>
);
|
/* global angular:false MyCtrl:false */
angular
.module('myApp', [])
.service('myService', () => ({
getText: () => 'Test text',
}))
.controller('MyController', [
'myService',
(myService) => {
MyCtrl.message = myService.getText();
},
])
.directive('myDirective', () => ({
restrict: ... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ re... |
//jshint strict: false
module.exports = function(config) {
config.set({
basePath: './www',
files: [
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-mocks/angular-mocks.js',
'app/**/*.js',
'cocktail/**/*.js',
... |
import { expect } from 'chai';
import { describeModule, it } from 'ember-mocha';
describeModule(
'controller:<%= dasherizedModuleName %>',
'<%= friendlyTestDescription %>',
{
// Specify the other units that are required for this test.
// needs: ['controller:foo']
},
function () {
// TODO: Replace... |
(function() {
var adminboxLink;
var adminbox;
var adminboxShutdown = false;
var animationDuration = 350;
$(document).ready(function() {
adminboxLink = $("#admin-menu-link");
adminboxLink.on("click", function(event) {
event.preventDefault();
if (! adminb... |
const _ = require('lodash');
module.exports = {
find: async function (params = {}, populate) {
return this
.find(params.where)
.limit(Number(params.limit))
.sort(params.sort)
.skip(Number(params.skip))
.populate(populate || this.associations.map(x => x.alias).join(' '))
.lean(... |
function oddOrEven(num) {
if (num % 2 === 0)
console.log('even');
else if (num % 2 !== 0 && num % 1 === 0)
console.log('odd');
else
console.log('invalid');
}
oddOrEven(1.5); |
__history = [{"date":"Sun, 15 Aug 2021 07:44:17 GMT","sloc":32,"lloc":7,"functions":2,"deliveredBugs":0.107,"difficulty":8.13,"maintainability":79.955,"lintErrors":3}] |
window.twttr = (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; if (d.getElementById(id)) return t; js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); t._e = []; t.ready = function(f) { t._e.push(f); }; ... |
/**
* Gets the command and options from argv.
*/
var colors = require('colors/safe');
var yargs = require('yargs')
.usage('Usage: $0 <command> [options]')
.command('init', 'init the baselines of configured databases')
.command('up', 'migrate the configured databases up from the baselines')
.command('backup'... |
var sudokuSamples = {
simple: [
[0, 9, 1, 6, 0, 0, 4, 7, 0],
[0, 2, 0, 4, 9, 0, 0, 5, 0],
[5, 0, 4, 8, 0, 0, 0, 0, 3],
[1, 0, 6, 0, 0, 0, 8, 3, 0],
[9, 0, 0, 0, 0, 0, 0, 0, 7],
[0, 7, 3, 0, 0, 0, 1, 0, 9],
[2, 0, 0, 0, 0, 4, 7, 0, 6],
[0, 4, 0, 0, 1, 2... |
'use strict';
/**
* @ngdoc service
* @name kordingApp.scaler
* @description
* # scaler
* Factory in the kordingApp to store the current Scale Model and expose functions
* to manipulate the current scale.
*/
angular.module('kordingApp')
.factory('scaler', function() {
var TONICS = ['C', 'D', 'E', 'F... |
var fs = require('fs');
var path = require('path');
var file = module.exports = {};
// True if the file path exists.
file.exists = function () {
var filepath = path.join.apply(path, arguments);
return fs.existsSync(filepath);
};
file.isDir = function () {
var filepath = path.join.apply(path, argument... |
var Sequelize = require('sequelize');
var scrypt = require('scrypt');
// configure scrypt
var scryptParameters = scrypt.params(0.1);
scrypt.hash.config.keyEncoding = "ascii";
scrypt.verify.config.keyEncoding = "ascii";
scrypt.hash.config.outputEncoding = "base64";
scrypt.verify.config.hashEncoding = "base64";
module.... |
"use strict";
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)... |
const Collector = require('./interfaces/Collector');
const Collection = require('../util/Collection');
const { Events } = require('../util/Constants');
/**
* @typedef {CollectorOptions} ReactionCollectorOptions
* @property {number} max The maximum total amount of reactions to collect
* @property {number} maxEmojis ... |
module.exports.fogbugzUser = ''
module.exports.fogbugzPassword = ''
module.exports.fogbugzURL = '' |
import expect from 'expect';
import {
LOAD_REPOS,
LOAD_REPOS_SUCCESS,
LOAD_REPOS_ERROR,
} from '../constants';
import {
loadRepos,
reposLoaded,
repoLoadingError,
} from '../actions';
describe('App Actions', () => {
describe('loadRepos', () => {
it('should return the correct type', () => {
... |
/* eslint max-len: 0 */
import webpack from 'webpack';
import path from 'path';
import merge from 'webpack-merge';
import autoprefixer from 'autoprefixer';
import baseConfig from './webpack.config.base';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
const port = process.env.PORT || 3000;
export default... |
/**
* @file bbn-splashscreen component
* @description bbn-splashscreen.
* @author BBN Solutions
* @copyright BBN Solutions
*/
(function (bbn, Vue) {
"use strict";
Vue.component('bbn-splashscreen', {
/**
* @mixin bbn.vue.basicComponent
* @mixin bbn.vue.listComponent
* @mixin bbn.vue.events... |
/*!
* froala_editor v4.0.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2021 Froala Labs
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('froala-editor')) :
typeof define === 'function... |
module.exports = {
entry: './webapp/src/index.js',
output: {
path: './webapp/bin',
filename: 'index.bundle.js'
},
module:{
loaders: [
{
test: /\.js?$/,
loader: 'babel-loader',
query: {
presets: ['es20... |
'use strict';
// Lessons controller
angular.module('lessons').controller('BookLessonModalController', ['$scope', '$modalInstance', 'Students',
function($scope, $modalInstance, Students) {
// Get Students list
$scope.students = Students.query();
// Book Lesson
$scope.book = function() {
$modalI... |
/* ============================================================
* File: config.js
* Configure routing
* ============================================================ */
angular.module('app')
.config(['$stateProvider', '$urlRouterProvider', '$ocLazyLoadProvider',
function($stateProvider, $urlRouterProvid... |
// This is example of task function
var gulp = require('gulp');
var notify = require('gulp-notify');
var changed = require('gulp-changed');
var notifier = require('../helpers/notifier');
var tarsConfig = require('../../tars-config');
s3 = require('gulp-s3-upload')({
accessKeyId: "AKIAJFQTWH2R6RS3XZSA",
... |
"use strict";
///////////////////////////////////////////////////////////////////////////////////
// Developer notes
///////////////////////////////////////////////////////////////////////////////////
// Exceptions:
// ===========
// When Crypto operation fail, it produce exception. It also produce exception if
// pa... |
import type from 'sanctuary-type-identifiers';
import show from 'sanctuary-show';
import jsc from 'jsverify';
import {ordinal} from '../../src/internal/const.js';
import {eq, error, throws, test} from './util.js';
import {
any,
anyFuture,
anyNonFuture,
anyParallel,
anyFunction,
anyResolvedFuture,
FutureA... |
/**
* skylark-jquery - The skylark plugin library for fully compatible API with jquery.
* @author Hudaokeji Co.,Ltd
* @version v0.9.0
* @link www.skylarkjs.org
* @license MIT
*/
(function(factory,globals) {
var define = globals.define,
require = globals.require,
isAmd = (typeof define === 'function'... |
var gameTitle = function(game){}
gameTitle.prototype = {
create: function(){
var gameTitle = this.game.add.sprite(160,160,"gametitle");
gameTitle.anchor.setTo(0.5,0.5);
var playButton = this.game.add.button(160,320,"play",this.playTheGame,this);
playButton.anchor.setTo(0.5,0.5);
},
playTheGame: f... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.asecDependencies = void 0;
var _dependenciesTyped = require("./dependenciesTyped.generated");
var _factoriesNumber = require("../../factoriesNumber.js");
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
var asecD... |
'use strict';
var fs = require('fs');
var path = require('path');
module.exports = convert;
function convert(options, cb) {
var instance = this;
options = options || {};
options.alg = options.alg || 'aes-256-ctr';
var convertAllProperties = function (oldPwd, newPwd, backupOldValue) {
var keys = instanc... |
module("tinymce.html.Schema");
test('Valid elements global rule', function() {
expect(1);
var schema = new tinymce.html.Schema({valid_elements: '@[id|style],img[src|-style]'});
deepEqual(schema.getElementRule('img'), {"attributes": {"id": {}, "src": {}}, "attributesOrder": ["id", "src"]});
});
test('Whildcard ele... |
const root = __dirname
const Http = require("http")
const Path = require("path")
const Express = require("express")
const Es6Renderer = require('express-es6-template-engine')
const Fs = require("fs")
const app = Express()
let server = null
process.on("uncaughtException", err => {
console.log("uncaughtException: ",... |
import { VectorMap } from "@react-jvectormap/core";
import { thMill, thMerc } from "@react-jvectormap/thailand";
import { MapTemplate } from "../components/MapContainer/MapTemplate";
export default {
title: "maps/Map/Thailand",
component: VectorMap,
argTypes: {},
};
export const Miller = MapTemplate.bind({});
M... |
Meteor.publish('tableVisibilityModeSettings', function() {
return TableVisibilityModeSettings.find();
});
|
function musicTypeFromFile(file){
var extention=file.substr(file.indexOf('.')+1);
if(extention=='ogg'){
return 'oga'
}
//TODO check for more specific cases
return extention;
}
function playAudio(filename){
loadPlayer(musicTypeFromFile(filename),function(){
PlayList.add($('#dir').val()+'/'+filename);
PlayLi... |
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
mongoose = require('mongoose'),
Investigation = mongoose.model('Investigation'),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));
/**
* Create an investigation
*/
exports.create = functi... |
module.exports = [
{
id: '01',
name: 'user 1',
email: 'name1@my.com'
},
{
id: '02',
name: 'user 2',
email: 'name2@my.com'
},
{
id: '03',
name: 'user 3',
email: 'name3@my.com'
},
] |
export default {
name: 'foreignObject',
buttons: [
{
title: 'Foreign Object Tool'
},
{
title: 'Edit ForeignObject Content'
}
],
contextTools: [
{
title: "Change foreignObject's width",
label: 'w'
},
{
title: "Change foreignObject's height",
label: ... |
// 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) // ... |
var loadJson = require('load-json-xhr');
var Branch = require('./Branch');
function JsonExplorer(params) {
params = params || {};
var _this = this;
loadJson(params.jsonPath, function(err, data) {
Branch.call(_this, 'ROOT', data ? data : {});
document.body.appendChild(_this.domElement);
if(err) {
var listIte... |
/**
* Chrome Javascript API stub
*
* @author <a href="mailto:linux_china@hotmail.com">Jacky Chan</a>
*/
/**
* Chrome API's base object
* @type {Object}
*/
var chrome = {
"alarms":{
/**
* Clears the alarm with the given name
* @param {String} name The name of the alarm to clear
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchQuestions, choseAnswer, submitForSolutions } from '../actions';
import Footer from '../components/Footer';
import Header from '../components/Header';
import Questions from '../components/Questions';
import styles from '../sty... |
var Helpers = require("../Helpers");
exports.code = 0x01;
exports.buildRequest = Helpers.buildAddressQuantity;
exports.parseRequest = Helpers.parseAddressQuantity;
exports.buildResponse = Helpers.bitsToBuffer;
exports.parseResponse = Helpers.bufferToBits;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.