code stringlengths 2 1.05M |
|---|
/** @jsx CycleDOM.hJSX */
import Rx from 'rx';
import Cycle from '@cycle/core';
import CycleDOM from '@cycle/dom';
import playground from './components/playground';
import header from './components/header';
import communication from './components/communication';
let main = ({DOM}) => {
let intent = (DOM) => {
... |
var sf = require('..');
exports['reduce a simple array'] = function (test) {
test.async();
var reduce = sf.reduce(function (data, accum) { return data + accum; }, 0);
reduce.run([1,2,3])
.success(function(result) {
test.ok(result);
test.equal(result, ... |
var background, ground, base, cursors, gameObjects, storyPositionArrow, currentStory;
var gameObjectsCollisionGroup, staticObjectsCollisionGroup;
var debugText;
var FRICTION = 150;
var GRAVITY = 200;
var BASE_SPEED = 250;
var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, '', {
preload... |
module.exports = class PostDataTakenError extends require('./AppError') {
constructor (message) {
// Providing default message and overriding status code.
super(message || 'Posted data is not correct or incompleted', 400);
}
};
// https://gist.github.com/slavafomin/b164e3e710a6fc9352c934b9073e72... |
Package.describe({
name: "nova:kadira",
summary: "Telescope Kadira package",
version: "1.0.0",
git: "https://github.com/TelescopeJS/Telescope.git"
});
Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@1.0.0',
'meteorhacks:kadira@2.30.0',
'kadira:debug@3.2.2... |
module.exports = function (date) {
return new Promise((resolve, reject) => {
this.agent
.post('https://iuczniowie.pe.szczecin.pl/mod_panelRodzica/plan/WS_Plan.asmx/pobierzPlanZajec')
.send({idPozDziennika: this.id, data: date, pidRokSzkolny: date.getFullYear().toString().substring(1)})
.then(response ... |
describe('Questions', function(){
var testQuestionUrl;
beforeAll(function() {
// Start with a question to test against.
browser.get('/questions/create');
multiChoiceRadio = element(by.id('multiChoiceRadio'));
multiChoiceTitleInput = element(by.id('multiChoiceTitle'));
o... |
/**
* scrollpos plugin : repositioning that pesky floating scrollbar
*/
define([
'dojo/_base/declare',
'JBrowse/Plugin'
],
function(
declare,
JBrowsePlugin
) {
return declare( JBrowsePlugin,
{
constructor: function( args ) {
var browser ... |
'use strict';
module.exports = function (grunt) {
// Load npm tasks.
[
'grunt-contrib-jshint',
'grunt-jscs',
'grunt-contrib-jasmine'
].forEach(function (name) {
grunt.loadNpmTasks(name);
});
var config = {
javascripts: ['*.js', 'test/**/*.js']
};
grunt.initConfig({
jshint: {
... |
var test = require('tape')
var classes = require('./')
test('css selector classes', function(t) {
t.plan(9)
t.deepEquals(classes('.wat'), ['wat'])
var c
c = classes('.wat > .yo')
t.notEqual(c.indexOf('wat'), -1, 'should return correct classes')
t.notEqual(c.indexOf('yo'), -1, 'should return correct class... |
/* We need to tell jshint which are our global variables */
/* global $:false,
Rickshaw: false,
moment: false,
navigator: false,
theme: false
*/
(function() {
'use strict';
var app = angular.module('winderfulApp',
[
'turbine-directives',
'winderful-filters',
'ngBootstrap',
... |
/**
*
* @param {string} nombreHabilidad
*/
function lanzarEventoSegunHabilidad(nombreHabilidad) {
var habilidad = getHabilidad(nombreHabilidad);
switch (habilidad.getTipo()) {
case TIPO_CAPACIDAD:
personaje_actual.updateMultiplosVida(true);
break;
case TIPO_HB_COMBATE... |
var ajaxProvider = new Ergo.data.AjaxProvider('data/mock-15.json');
$context.section('Сортировка элементов');
//= require sort-items
$context.section('Серверная сортировка');
//= require sort-datasource
$context.section('Сортировка связывания');
//= require sort-values
|
import React from 'react';
import {connect} from 'react-redux';
import LineChart from './LineChart';
class LineChartContainer extends React.Component {
render(){
return(
<LineChart
title={this.props.title}
data={this.props.data}
/>
);
}
}... |
/*global describe before it*/
'use strict';
var Replay = require('replay'); //eslint-disable-line no-unused-vars
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
var expect = chai.expect;
var Dfp = require('../index');
var DFP_CREDS = require('../fixtures/setup/application-creds');
var c... |
var completeCallback = null;
function onExecuteComplete(success, text) {
'use strict';
// This function is called from console_boot.js
if (completeCallback) {
completeCallback({
success: success,
text: text
});
completeCallback = null;
}
}
function pickCharacters(callback) {
'use str... |
import DB from '../db';
import * as types from '../constants/tablesConstants';
import { stopFetching, internalInitTable } from './currentTable';
export function setCurrentTable(tableName) {
return {
type: types.SET_CURRENT_TABLE,
tableName
};
}
export function changeTableName(newTableName) {
return {
... |
// tutorial6.js
/*
* Let's create the Comment component, which will depend on data passed in from its parent.
* Data passed in from a parent component is available as a 'property' on the child component.
* These 'properties' are accessed through this.props.
* Using props, we will be able to read the data passed ... |
var searchData=
[
['i2c_2epy',['i2c.py',['../i2c_8py.html',1,'']]]
];
|
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (... |
// Generated by CoffeeScript 1.6.3
(function() {
$(function() {
var brick;
brick = "<div class='brick small'><div class='delete'>×</div></div>";
$(document).on("click", ".gridly .brick", function(event) {
var $this, size;
event.preventDefault();
event.stopPropagation();
$this... |
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './example/index.tsx',
output: {
path: path.resolve('example/build'),
filename: 'index.js'
},
module: {
rules: [{
test: /\.tsx?$/,
ex... |
Enumerable.max = function(iterator) {
iterator = iterator ? iterator : Enumerable.identity;
var result;
this.forEach(function(value, index) {
value = iterator(value, index);
if (result == undefined || value >= result) {
result = value;
}
});
return result;
}; |
'use strict'
// add components in the graph
// TODO needs refactoring
module.exports = function addImpComponent (cy, component, nodeCounter) {
switch (component) {
case 'event sensor':
cy.add({
group: 'nodes',
data: {
id: `n${nodeCounter}`,
label: `${component}`,
... |
(function () {
'use strict';
angular
.module('app')
.directive('navigation', navigation);
function navigation () {
return {
restrict: 'EA',
templateUrl: '/components/navigation/navigation.view.html',
controller: 'navigatio... |
/*
* fis
* http://fis.baidu.com/
*/
'use strict';
//kernel
//加载fis-kernel模块
var fis = module.exports = require('fis-kernel');
//merge standard conf
//增加modules配置信息
fis.config.merge({
modules : {
preprocessor: { //预处理器
js: 'components',
css: 'components',
html: 'comp... |
'use strict';
(function() {
describe('cashewApp.services module', function() {
beforeEach(function() {
module('cashewApp.services');
});
describe('PayablesService', function() {
it('should maintain desc date order when updating payments', inject(function(PayablesService) {
expect(Pay... |
/**
* Sets a request header with the value of a cookie from document.cookie, if it exists
*/
export default (cookieName = 'csrfToken', headerName = 'x-csrf-token') =>
function CsrfMiddleware() {
const REGEXP_COOKIE_NAME = new RegExp(cookieName + '[^;]+')
const getCookie = () => {
const cookieString = ... |
import { LOAD_LANG, LOAD_LANG_SUCCESS } from './actionTypes';
export function loadLang(locale, data) {
return async dispatch => {
dispatch({
type: LOAD_LANG,
locale
});
let loader = typeof data === 'function' ? data(locale) : data;
let lang;
if (typeof loader === 'function') {
... |
/*
Coding Soccer
Copyright (c) 2017 Cédric Ronvel
The MIT License (MIT)
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 ... |
// Regular expression that matches all symbols with the `Hyphen` property as per Unicode v4.0.1:
/[\x2D\xAD\u058A\u1806\u2010\u2011\u30FB\uFE63\uFF0D\uFF65]/; |
/* global on:false, generateRowID:false */
import { Abilities } from './Abilities';
const abilities = new Abilities();
import { AbilityChecks } from './AbilityChecks';
const abilityChecks = new AbilityChecks();
import { Actions } from './Actions';
const actions = new Actions();
import { Attachers } from './Attachers';... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.__BackgroundImpl = exports.Background = undefined;
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.hasOwnPro... |
var express = require("express");
var logfmt = require("logfmt");
var app = express();
app.use(logfmt.requestLogger());
app.use("/", express.static(__dirname + '/www'));
var port = process.env.PORT || 5000;
app.listen(port, function() {
console.log("Listening on " + port);
}); |
import path from 'path';
import fs from 'fs';
export function parseList(str) {
return str.split(',');
}
export function getEnvConfig(program, configEnv) {
Object.keys(configEnv).forEach(fieldName => {
const envVarName = configEnv[fieldName];
const envVarValue = process.env[envVarName];
if (envVarValue... |
// @flow
import React from 'react'
import classNames from 'classnames'
import { Link } from 'next/link'
type Props = {
children?: React$Element<*>,
className?: ?string,
icons?: string,
href?: ?string,
type?: 'primary' | 'danger' | 'warning' | 'link' | 'close' | 'success',
submit?: boolean
}
const Button ... |
var async = require('async');
var Pipeline = require('./pipelines/pipeline')
/**
* The reporting engine, responsible for tying everthing together and rendering the report. Generally
* render will run throug the folling phases.
* I. Execute datasource
* II. Compile template(s)
* III. Bind datasource output ... |
export default (createInstance) => {
describe('#uri', () => {
it('sets uri', () => {
const inst = createInstance()
const value = 'https://example.com/resource'
inst.uri = value
expect(inst.uri).to.equal(value)
})
})
}
|
// Karma configuration
// Generated on Thu Dec 25 2014 11:20:38 GMT-0800 (PST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// https://github.com/karma-runner/karma/blob/master/docs/config/01-configuration-file.md#bro... |
var PanelGroup = require('./transpiled/PanelGroup')['default'];
module.exports = PanelGroup |
module.exports={A:{A:{"1":"B A","2":"K C G E WB"},B:{"2":"D u Y I M H"},C:{"1":"0 1 2 3 4 5 6 7 L h i j k l m n o p q r s t y v","2":"UB z SB RB","132":"F J K C G E B A D u Y I M H N O P Q R S T U V W X w Z a b c d e f"},D:{"1":"0 1 2 3 4 5 6 7 V W X w Z a b c d e f L h i j k l m n o p q r s t y v GB g DB VB EB","2":"F... |
/* global require, describe, it */
'use strict';
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Module to be tested:
lr = require( './../lib' );
// VARIABLES //
var expect = chai.expect,
assert = chai.assert;
// TESTS //
describe( 'compute-linear-regression', function tests() {
it... |
(function ($) {
var methods = {
init: function (options) {
var settings = {
color: $(this).css("background-color"),
reach: 20,
speed: 1000,
pause: 0,
glow: true,
repeat: true,
onHover:... |
console.log('\x1b[35m%s\x1b[0m', ' _____ _____ _ \r\n|_ _| |_ _| | \r\n | |_ _ _ __ ___ | | | |_ \r\n | | | | | \'_ \\ \/ _ \\| | | __|\r\n | | |_| | |_) | __\/| |_| |_ \r\n \\_\/\\__, | .__\/ \\___\\___\/ \\__|\r\n __\/ | | \r\n |___\/|_| \n');
cons... |
"use strict";
debugger;
let target = "123가나다";
console.log(target.endsWith("가나다"));
console.log(target.endsWith("가나"));
console.log(target.endsWith("가나", 5));
let dummy;
|
const exec = require('child_process').execFile;//get child_process module
const fs = require('fs');
const enwebp=require('./cwebp.js');//get cwebp module(converts other image format to webp)
const dewebp=require('./dwebp.js');//get dwebp module(converts webp format to other image)
const gifwebp=require('./gwebp.js');//... |
'use strict';
module.exports = {
create: function(req, res) {
return res.view('user/EditUser', {
user: null,
title: '创建用户'
});
},
doCreate: function(req, res) {
var uid = req.param('uid');
var newUser = {
uid: req.param('uid'),
pwd: req.param('pwd'),
fullname: req.... |
'use strict'
// Required modules
const ChanceTimer = require('./lib/ChanceTimer')
const Discordie = require('discordie')
const http = require('https')
const logger = require('./lib/logger.js')
// .env
require('dotenv').config({silent: true})
// Required environment variables
;[
'BOT_CHANCE', // Chance to stream on... |
var urlData = global.container.urlData;
var helpers = global.container.helpers;
exports.getUrls = function(onSuccess, onError){
urlData.getUrls(function(urls){
onSuccess(urls);
}, onError);
};
exports.getUrl = function(id, onSuccess, onError){
urlData.getUrl(id, function(url){
if(url){
onSuccess(u... |
const appRoot = "src/";
const outputRoot = "dist/";
module.exports = {
root: appRoot,
source: appRoot + "**/*.js",
html: appRoot + "**/*.html",
style: "styles/**/*.css",
output: outputRoot,
e2eSpecsSrc: "test/e2e/src/*.js",
e2eSpecsDist: "test/e2e/dist/",
};
|
'use strict';
/**
* Module dependencies.
*/
var express = require('express');
var load = require('express-load');
var bodyParser = require('body-parser');
var session = require('express-session');
module.exports = function(){
var app = express();
// all environments
app.set('port', process.env.PORT || 80);
... |
function createImagesPreviewer(selector, items) {
var currentSelector = document.querySelector(selector),
leftDiv = document.createElement('div'),
rightDiv = document.createElement('div'),
elements = document.createElement('div'),
listElement = document.createElement('div'),
searchDiv = document.createElemen... |
console.log("scripts/main.js here"); |
document.write(
'<div class="fotorama" id="fotorama" data-nav="thumbs">' +
'<a href="http://youtu.be/d27gTrPPAyk"></a>' +
'<a href="http://www.youtube.com/embed/KLVq0IAzh1A"></a>' +
'<a href="http://player.vimeo.com/video/61527416"></a>' +
'<a href="http://vimeo.com/67556702"></a>' +... |
/**
* The Enum Field class
*
* @constructor
*
* @author Jelle De Loecker <jelle@develry.be>
* @since 0.2.0
* @version 1.1.0
*/
var Enum = Function.inherits('Alchemy.Field', function Enum(schema, name, options) {
Enum.super.call(this, schema, name, options);
});
/**
* Set the datatype name
*
* @auth... |
/**
* The `ivh-treeview` directive
*
* A filterable tree view with checkbox support.
*
* Example:
*
* ```
* <div
* ivh-treeview="myHierarchicalData">
* ivh-treeview-filter="myFilterText">
* </div>
* ```
*
* @package ivh.treeview
* @copyright 2014 iVantage Health Analytics, Inc.
*/
angular.module('... |
if (window.__karma__) {
var base = document.createElement('base');
base.href = '/base/tests';
document.head.appendChild(base);
}
|
self.onmessage = function ( e ) {
var _RESPONSE_PACKAGE_SIZE_ = 1000;
var isRunning = true,
id = e.data.id,
STATUS = {
OK : 'ok',
ERROR: 'error',
INFO : 'info',
DONE : 'done'
};
var sendMessage = function ( response, status ) {
var msg = {status: status || STATUS.OK, response: response};
post... |
/**
* Created by lauriane1 on 04/03/15.
*/
'use strict';
//requires
var mysql = require('mysql');
var Q = require('q');
// database connection object
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : 'root',
database : 'euromillions'
});
// module execution
(fu... |
module.exports.ADMIN = "admin"
module.exports.USER = "user"
|
var http = require('http');
var config = require('./config');
var Starbucks = require('starbucks-egift-client').client(config['starbucks-egift-client']);
var twitter_auth = require('./twitter_auth');
var client = require('./send-factory/TwitterSendFactory').client(Starbucks, twitter_auth);
var Qiita = require('qiita-j... |
campaignManager.controller('loginController', ['$scope', 'authService', function($scope, authService){
$scope.user = { username: '', password: '' };
$scope.checkLogin = function(user) {
authService.login(user);
}
}]);
|
module.exports = function(config){
config.set({
basePath : './',
files : [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/components/**/*.js',
'app/view*/**/*.js'
... |
define([
'react', 'reqwest', 'buildpack_table/template'
], function (React, reqwest, template) {
'use strict';
return React.createClass(new Config());
function Config() {
/* jshint validthis: true */
return {
propTypes: propTypes(),
render: render
};
function propTypes() {
... |
/* global angular */
angular.module('j3lte.thePixel', ['base64'])
.service('pixelService', ['$base64', function($base64) {
'use strict';
var getTime = function() {
return Math.floor(new Date() / 1000);
};
var getRandom = function() {
return Math.floor(Math.r... |
var path = require('path')
var utils = require('./utils')
var config = require('../config')
var vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
... |
#!/usr/bin/env node
/**
* Module dependencies
*/
var fs = require('fs');
var program = require('commander');
// options
program
.version(require('../package.json').version)
.usage('[options] command [args]')
.option('-S, --sample <sample>', 'sample option')
program.on('--help', function(){
console.log(' ... |
$(document).on("ready" ,function(){
//sector
listaSector();/*llamar a mi datatablet listarSector*/
listaSectorCombo();//para listar en un combo los sectores
$("#form-addSector").submit(function(event)//para añadir nuevo sector
{
event.preventDefault()... |
let Collection = require('./collection');
describe('Collection', function () {
let collection;
beforeEach(function () {
collection = new Collection();
});
describe('when instantiating without items', function () {
it('should instantiate', function () {
expect(collection).t... |
var passport = require('passport');
var InstagramStrategy = require('passport-instagram').Strategy;
var config = require('../config');
var init = require('./auth-base').init;
var findOneAndUpdate = require('./auth-base').findOneAndUpdate;
const strategyFunction = function(req, accessToken, refreshToken, profile, done)... |
define([
'underscore',
'backbone'
], function(_, Backbone){
/*A Subpage is a special model used in code pages. In code pages, a Subpage
*is used to highlight specific sections of code (represented in "codeHTML")
*and use captions (represented in "caption") to describe the code.
*Subpages can... |
import React from 'react';
import ReactDOM from 'react-dom';
import { HashRouter } from 'react-router-dom';
import 'normalize.css';
import './styles/index.css';
import Root from './Root';
const wrapped = (
<HashRouter>
<Root />
</HashRouter>
);
ReactDOM.render(wrapped, document.getElementById('root'));
|
export const COLORS = ["red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black"];
|
/**
* @file Position static
*/
export default {
TOP_LEFT: 'top-left',
TOP: 'top',
TOP_RIGHT: 'top-right',
BOTTOM_LEFT: 'bottom-left',
BOTTOM: 'bottom',
BOTTOM_RIGHT: 'bottom-right',
LEFT_TOP: 'left-top',
LEFT: 'left',
LEFT_BOTTOM: 'left-bottom',
RIGHT_TOP: 'right-top',
... |
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import autoprefixer from 'autoprefixer';
import path from 'path';
// import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';
export default {
resolve: {
extensions: ['', '.js', '.jsx', '.json']
},
debug: true,
devtool... |
TemplateController('login', {
state: {
forgotPassword: false,
sent: false,
btnWaiting: false
},
helpers: {
titleText: function() {
return this.state.forgotPassword ? 'login.title.forgot' : 'login.title.login';
},
passwordResetClass: function() {
return this.state.forgotPassword... |
var WebpackNotifierPlugin = require('webpack-notifier');
module.exports = {
entry: "./src/index.tsx",
output: {
filename: "bundle.js",
path: __dirname + "/dist"
},
// Enable sourcemaps for debugging webpack's output.
devtool: "source-map",
resolve: {
// Add '.ts' and '... |
import 'raf/polyfill';
import Enzyme, { shallow, render, mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import toJson from 'enzyme-to-json';
// React 16 Enzyme adapter
Enzyme.configure({ adapter: new Adapter() });
// Make Enzyme functions available in all test files without importing
global.sha... |
(function () {
"use strict";
var control = {
interval: 1,
oldInterval: 1,
maxSpeed: 20
};
var data = {
placement: [],
list: []
};
data.list.push(
['A little learning is a dangerous thing; Drink deep, or taste not the Pierian spring.', 'Alexander P... |
import gulp from 'gulp'
import gulpSequence from 'gulp-sequence'
gulp.task('build', gulpSequence(
'clean', [
'manifest',
'scripts',
'styles',
'pages',
'locales',
'images',
'fonts',
'chromereload'
]
)) |
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 82130096, "Date": "07\/31\/2008", "Time": "12:54 PM", "Police District": "7.0", "Offense 1": "THEFT OF MOTOR VEHICLE... |
'use strict';
let router = require('koa-router')();
let navigation = require('../controllers/navigation.js');
function isAuth() {
return function* (next) {
console.log('-----', this.user , '---- ', this.state);
if (this.state.user || this.user) {
yield next;
} else {
... |
define(['backbone', 'backbone-ribs'], function (Backbone) {
/**
* BaseModel
* @module
*/
return Backbone.Ribs.Model.extend({});
});
|
class Owner {
constructor(client) {
this.client = client
}
get(options) {
return this.client.apiRequest({
method: 'GET',
path: '/owners/v2/owners',
qs: options,
})
}
getById(id, options) {
return this.client.apiRequest({
method: 'GET',
path: `/owners/v2/owners/$... |
import * from './parent';
export class Child{
name:String;
constructor(name:String){
this.name = name;
}
talk(message:String){
return "Child "+this.name+"Says"+message;
}
} |
'use strict';
// Declare app level module which depends on views, and components
var app = angular.module('myApp', [
'ngRoute',
'ngTable'
]);
app.config(['$locationProvider', '$routeProvider', function ($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeProvider
.wh... |
'use strict'
const collectOfflineEnvVariables = require('../../src/lib/collectOfflineEnvVariables.js')
describe('collectOfflineEnvVariables', () => {
let serverless
beforeAll(() => {
serverless = {
service: {
}
}
})
describe('default options', () => {
it('should return environment va... |
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
config = require(path.resolve('./config/config'));
/**
* Proxies module init function.
*/
module.exports = function (app, db) {
};
|
(function(){
var h2 = document.querySelector('h2');
var spanUsername = document.querySelector('span');
var spanEmail = document.getElementsByTagName('span')[1];
var usernameField = document.forms[0].elements[0];
var emailField = document.forms[0].elements[1];
var spanUsernamePattern = new... |
function PostProcess(canvas, shaderId){
this.canvas = canvas;
this.texture = null;
this.framebuffer = null;
this.renderbuffer = null;
this.c_width = this.canvas.width;
this.c_height = this.canvas.height;
this.vertexBuffer = null;
this.textureBuffer = null;
this.shader = null;
... |
/*
* ************************************************************* *
* Name : Chained inputs *
* Date : March 2011 *
* Owner : CreativeMilk *
* Url : www.creativemilk.net ... |
/**
* Created by paper on 15/11/28.
*
* Word Pattern
* https://leetcode.com/problems/word-pattern/
*
* Given a pattern and a string str, find if str follows the same pattern.
* Here follow means a full match,
* such that there is a bijection between a letter in pattern and a non-empty word in ... |
Object.prototype.repeat = function (count) {
var s = this;
s._repeat = count;
return s;
};
module.exports = {
/** データ定義 **/
entries: [
{
_id: "7${padZero(rownum, 23)}",
name: "${'日立ソリューションズ,NECソフト,東芝ソリューション,NTTデータ,野村総合研究所,新日鉄住金ソリューションズ,NSOL,どこか,その他,不明'.split(',')[row... |
(function() {
'use strict';
const path = require('path');
const assert = require('assert');
const taskLoader = '../../build/index.js';
let gulp;
// register coffeescript to handle any coffee files
require('coffee-script/register');
describe('filenameDelimiter', function() {
beforeEach(function() ... |
var Analyzer = function(sequelize) {
this.sequelize = sequelize;
this.dbName = sequelize.config.database;
};
Analyzer.prototype = {
sequelize: null,
dbName: null,
getInfo: function(cb) {
var self = this;
var db = {};
this.getTables(function(tables) {
var tablesLength = tables.length;
for(var i=0; i<t... |
'use babel';
import BananaView from '../lib/banana-view';
describe('BananaView', () => {
it('has one valid test', () => {
expect('life').toBe('easy');
});
});
|
import {nicInfo} from '../';
const {describe, test, expect} = global;
describe('Old NIC ID', () => {
test('should return information object', () => {
expect(nicInfo('853409999V')).not.toBeNull();
expect(nicInfo('907510999V')).not.toBeNull();
});
describe('Gender', () => {
test('should return correct... |
define(function () {
'use strict';
// TODO: Consider using a polyfill later.
return window.URL;
});
|
/**
* @license Highstock JS v9.0.1 (2021-02-16)
*
* Indicator series type for Highstock
*
* (c) 2010-2021 Daniel Studencki
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.e... |
/**
* Модуль для генерации цветов
*/
/*jslint node:true*/
var colors = colors || (function () {
'use strict';
function randomColors(total) {
var i = 360 / (total - 1),
r = [], x;
for (x = 0; x < total; x++) {
r.push(hsvToRgb(i * x, 40, 100));
}
return r;
}
/**
* HSV to RGB color conversion
*... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.