code stringlengths 2 1.05M |
|---|
(function() {
'use strict';
angular
.module('users')
.controller('SettingsController', SettingsController);
SettingsController.$inject = ['$scope', 'authenticationService', '$translatePartialLoader', '$translate', 'menuService'];
function SettingsController ($scope, authenticationService, $translatePar... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.m.DisplayListItem.
sap.ui.define(['jquery.sap.global', './ListItemBase', './library'],
function(jQuery, List... |
/* bender-tags: editor */
/* bender-ckeditor-plugins: wysiwygarea,autoid */
// Clean up all instances been created on the page.
(function () {
'use strict';
function removeAllInstances() {
var allInstances = CKEDITOR.instances;
for (var i in allInstances) {
CKEDITOR.remove(allInstances[i]);
}
}
bender.te... |
Ui.App.extend('KJing.RoomApp', {
scroll: undefined,
request: undefined,
rooms: undefined,
constructor: function(config) {
var vbox = new Ui.VBox({ margin: 20 });
this.setContent(vbox);
vbox.append(new Ui.Text({ text: 'Liste des salles de médiation publiques', fontWeight: 'bold', fontSize: 20 }));
vbox.ap... |
var _0x89fd = ["maps", "fn", "extend", "length", "ul", "children", "<span class='indicator'>+</span>", "append", "each", "li", "find", ".venus-menu", "<li class='showhide'><span class='title'>Menu</span><span class='icon'><em></em><em></em><em></em><em></em></span></li>", "prepend", "resize", "unbind", "li, a", "hide",... |
var gulp = require("gulp");
var runSeq = require("run-sequence");
var merge = require("merge2");
var typescript = require("typescript");
var dtsGen = require("dts-generator");
var Builder = require("systemjs-builder");
var tsc = require("gulp-typescript");
var sourcemaps = require("gulp-sourcemaps");
var plumber = req... |
'use strict';
describe('Controller: TimeCtrl', function () {
var elm, elm2, $elm, $elm2, scope, scope2, $rootScope, $compile;
// load the controller's module
beforeEach(module('exampleApp'));
// load the templates
beforeEach(module('templates'));
// Initialize the controller and a mock scop... |
'use strict';
const path = require('path');
const babylon = require('babylon');
const traverse = require('babel-traverse').default;
const babelTypes = require('babel-types');
const generate = require('babel-generator').default;
const renderType = require('billund-enums').renderType;
/**
* 抓取require和exports出来的值,强烈建议和... |
var express = require('express');
var router = express.Router();
var PracticeService = require('../services/practiceService');
var PracticeItem = require('../models/practiceItem');
/* GET list of practice items meta data */
router.get('/practiceItems', function(req, res, next) {
PracticeService.getItemList(funct... |
import { combineReducers } from 'redux';
import NewsFeedReducer from './NewsFeedReducer';
import MarsFeedReducer from './MarsFeedReducer';
import PictureOfDayReducer from './PictureOfDayReducer';
const rootReducer = combineReducers({
newsFeed: NewsFeedReducer,
marsFeed: MarsFeedReducer,
picturesFeed: PictureOf... |
/*
* Rejewski
*
* Copyright 2014 Jason Gerfen
* All rights reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. ... |
/*
6 sectors * 512 lines * 60 vertices, t=threads, m=stamps
jetstream t: 1 m: 10 ms: 15651
jetstream t: 2 m: 10 ms: 9348
jetstream t: 3 m: 10 ms: 8583
jetstream t: 4 m: 10 ms: 7969
jetstream t: 5 m: 10 ms: 7891
jetstream t: 6 m: 10 ms: 8037
jetstream t: 7 m: 10 ms: 7981
jetstream t: 8 m:... |
/*!*
* \file MAVTKLoader.js
* \author mrdoob, Bill Hill
* \date June 2015
* \version $Id$
* \brief A VTK file loader for three.js. This is based on the VTK
* loader by mrdoob. Differences (so far) from the original
* are:
* * slightly more flexible parsing
* * polygons are optional an... |
/**
* Utils for AngularJS v1.x
* @author Bendy Zhang <zb@bndy.net>
* @copyright BNDY.NET 2017
* @see {@link http://bndy.net|Home Page}
* @external angular
*/
'use strict';
;(function (angular) {
/**
* Starts angular application.
* @function external:angular.start
* @param {string} appName - ... |
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import DayPicker from '../src/components/DayPicker';
import moment from 'moment-jalaali'
import {
VERTICAL_ORIENTATION,
VERTICAL_SCROLLABLE,
} from '../constants';
const TestPrevIcon = props => (
<span style={{
border: '1px solid #d... |
var userRoutes = FlowRouter.group({
prefix: '/meteoris/user',
name: 'meteoris_user',
triggersEnter: [function(context, redirect) {
authenticating(context.path);
}]
});
/* router level validation, only allow user with group "admin" to access this page */
function authenticating(path) {
... |
"use strict";
const gulp = require('gulp'); //build system
const source = require('vinyl-source-stream'); //converts reatable stream from webpack into the gulp compatible stream
const sass = require('gulp-sass'); //css preprocessor
const notifier = require('node-notifier'); //desktop notifications on error
const del =... |
'use strict';
/**
* Module dependencies.
*/
var should = require('should'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Colision = mongoose.model('Colision');
/**
* Globals
*/
var user, colision;
/**
* Unit tests
*/
describe('Colision Model Unit Tests:', function() {
beforeEach(function(... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
import CodeMirror from 'codemirror';
var headerList = /(#+)(\s+)?/;
CodeMirror.commands.headChangeRight = function (cm) {
if (cm.getOption("disableInput")) return CodeMirror.Pass;
var pos =... |
'use strict';
const path = require('path');
const mm = require('egg-mock');
const utils = require('../../../utils');
describe('test/lib/core/loader/config_loader.test.js', () => {
let app;
const home = utils.getFilepath('apps/demo/logs/home');
afterEach(() => app.close());
afterEach(mm.restore);
it('should... |
/*!
* 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.
*/
// Provides class sap.ui.core.support.plugins.Selector (Selector support plugin)
sap.ui.define(['jquery.sap.global', 'sap/ui/core/Pop... |
var benchmark = require('benchmark')
, p = require('../fn-pasta')()
var bench = new benchmark.Suite
var add = p.op('+')
bench.add('op', function () {
var num = 0
for(var i = 1; i<12; i++) {
num = add(num, i)
}
}).add('+', function () {
var num = 0
for(var i = 1; i<12; i++) {
num = num + i
}
}).... |
/*
written by Joe Wallace, October 2017
the code below adds the concordance functionality
also the listeners for the "reset", "home", "previous" and "next" buttons
the html texts themselves were generated by a Python script I wrote,
which uses regular expressions to extract plays from Shakespeare's
First Folio and ... |
import testUsers from '@webex/test-helper-test-users';
import {expect} from 'chai';
describe('samples', () => {
describe('browser-single-party-call', () => {
describe('normal dialing', () => {
let mccoy, spock;
const browserSpock = browser.select('browserSpock');
const browserMccoy = browser.s... |
'use strict';
/* globals describe, expect, it, beforeEach, afterEach */
var app = require('../..');
import request from 'supertest';
var newSensor;
describe('Sensor API:', function() {
describe('GET /api/sensors', function() {
var sensors;
beforeEach(function(done) {
request(app)
.get('/api... |
// not implemented as of ff 42.0 import "../tones/tones.js";
// flow:
// - goals - hit the right notes, let the player design a level
// - feedback - =- points etc.
// - no distraction - use headphones
// - just right - balance
// simplicity:
// - core - less is more
// - limited choices -
// - intuitive - guide the... |
(function () {
'use strict';
angular.module('app.controllers', [])
.controller('MapCtrl', MapCtrl)
.controller('SitesCtrl', SitesCtrl)
.controller('SiteDetailCtrl', SiteDetailCtrl)
.controller('ConfigCtrl', ConfigCtrl);
MapCtrl.$inject = ['$scope', '$ionicLoading', 'uiGmapGoogleMapApi', '$timeout... |
(function(){
var currentProject = 0;
$('.jcarousel').each(function(){
var carousel = $(this).jcarousel({
wrap: 'circular'
});
var left = carousel.parents('.carousel').find('.jcarousel-prev');
var right = carousel.parents('.carousel').find('.jcarousel-next');
left.jcarouselControl({
target: '-=1',
carousel:... |
var hive = require('hive');
exports = module.exports = hive.Query.extend({
_name: 'user'
}); |
'use strict';
// 定义模块依赖
var _ = require('lodash'),
mkdirp = require('mkdirp'),
fs = require('fs'),
path = require('path'),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller')),
mongoose = require('mongoose'),
User = mongoose.model('User');
/**
* 更... |
// All other packages automatically depend on this one
Package.describe({
summary: "Core Meteor environment",
version: '1.2.18-beta.5'
});
Package.registerBuildPlugin({
name: "basicFileTypes",
sources: ['plugin/basic-file-types.js']
});
Npm.depends({
"meteor-deque": "2.1.0"
});
Package.onUse(function (api... |
/**
* Informational Commands
* Pokemon Showdown - https://pokemonshowdown.com/
*
* These are informational commands. For instance, you can define the command
* 'whois' here, then use it by typing /whois into Pokemon Showdown.
*
* For the API, see chat-plugins/COMMANDS.md
*
* @license MIT license
*/
var comma... |
import Models from './models';
import Output from './output/index';
import Base from './base';
import to from 'to-js';
import { uniqueId } from 'lodash';
import Documents from './documents';
import DocumentsStream from './documents-stream';
import { success } from 'log-symbols';
/// @name Fakeit
/// @page api
/// @des... |
var classthewizardplusplus_1_1anna_1_1sound_1_1_p_c_m_data_bits =
[
[ "Types", "classthewizardplusplus_1_1anna_1_1sound_1_1_p_c_m_data_bits.html#a9f3fb864f916af859dc9e72e89e85e69", [
[ "BIT_8", "classthewizardplusplus_1_1anna_1_1sound_1_1_p_c_m_data_bits.html#a9f3fb864f916af859dc9e72e89e85e69af8f20decb363fdb6... |
import path from 'path';
import fs from 'fs';
import babel from 'rollup-plugin-babel';
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
let pkg = JSON.parse(fs.readFileSync('./package.json'));
let external = Object.keys(pkg.peerDependencies || {}).concat(Object.keys... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isYyyymmddDate;
/**
* Check if is a valid yyyy.mm.dd date
* This will match : yyyy.mm.dd | yyyy/mm/dd | yyyy-mm-dd | yyyy mm dd
* @param {String} date The date to check
* @return {Boolean} true if is val... |
'use strict';
var fs = require('fs')
const Headers =
//read the files from the log dir
fs.readdir('logs/', (err, files) => {
if (err) throw err
//If only header in last sync, notify
fs.stat('logs/' + files[files.length -1], (err,stats) => {
if (err) throw err
if (stats.size == 107) {
console.log("... |
'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 ("val... |
var newObject = new Object;
newObject.name = "Ram";
newObject.roll = 32;
newObject.year = 2050;
console.log(newObject.name);
// JavaScript way of creating objects : name value pair
var nvpObject = {name: "Rahim", roll: 33};
console.log(nvpObject.name);
// Object has properties and methods
var nvpObject = {nam... |
/*! @license Firebase v4.5.0
Build: rev-f49c8b5
Terms: https://firebase.google.com/terms/ */
/**
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* htt... |
{
var ancestors = [];
for (; treeScope; treeScope = treeScope.parent) {
ancestors.push(treeScope);
}
return ancestors;
}
|
define(function () {
function FilterEdiStatus(bezl) {
// FilterEdiStatus, will hide the table rows that are not in the correct filter status.
var tr, td, div;
//Get bezl rows in mainTable.
tr = $(bezl.container.nativeElement).find("#mainTable tr")
// Loop through all rows
... |
'use strict';
//Dependences service used to communicate Dependences REST endpoints
angular.module('dependences').factory('Dependences', ['$resource',
function($resource) {
return $resource('dependences/:dependenceId', { dependenceId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]); |
// All symbols in the `Ogham` script as per Unicode v7.0.0:
[
'\u1680',
'\u1681',
'\u1682',
'\u1683',
'\u1684',
'\u1685',
'\u1686',
'\u1687',
'\u1688',
'\u1689',
'\u168A',
'\u168B',
'\u168C',
'\u168D',
'\u168E',
'\u168F',
'\u1690',
'\u1691',
'\u1692',
'\u1693',
'\u1694',
'\u1695',
'\u1696',
'\u1... |
'use strict';
/* https://github.com/angular/protractor/blob/master/docs/toc.md */
describe('my app', function() {
browser.get('index.html');
it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
expect(browser.getLocationAbsUrl()).toMatch("/view1");
});
});
|
/* eslint-disable no-console */
import fs from 'fs'
import { resolve } from 'path'
import { Dir } from '../config.js'
import transformFiles from './transform-files.js'
import CleanCss from 'clean-css'
transformFiles(resolve(Dir.dist, 'css'), {}, ({ filename, sourcePath, destinationPath }) => {
const filePath = re... |
(function () {
angular
.module('app')
.factory('tokenInjector', tokenInjector)
function tokenInjector($injector, $q) {
const count = {}
return {
// 正常情况下,XSRF 不正确会触发该错误
// 从而触发跳转到登录页面
// TODO 全局提示弹框
responseError(rejection) {
if (rejection... |
'use strict';
var async = require('async'),
plugins = require('../plugins'),
db = require('../database');
(function(Entity) {
require('./entity/create')(Entity);
require('./entity/patch')(Entity);
require('./entity/delete')(Entity);
Entity.getSwaggerCacheInfo = function(callback) {
d... |
var request = require('supertest');
var app = require('../app');
var models = require('../models');
describe('registration', function() {
var agent = request.agent(app);
before('Make sure all tables exist', function(done) {
app.db.sequelize.sync({force: true})
.then(function() {
done();
});
})... |
/**
* Auto Input Text Direction is a little JavaScript function that detects the input language,
* on html forms, and changes the input direction based on the language, i.e., right to left
* for the Arabic language.
* Copyright (C) 2010 Abdulrahman Alotaiba <http://www.mawqey.com/>
*
* This program is free softw... |
import assert from 'assert'
import {
default as buildDeclarations,
buildSingleDeclaration,
isArray
} from '../../lib/utils/build-declarations'
describe('buildDeclarations function', () => {
it('should return a string with the css declarations', () => {
const actual = buildDeclarations({
borderRadius:... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { Parser: AcornParser } = require("acorn");
const { SyncBailHook, HookMap } = require("tapable");
const vm = require("vm");
const Parser = require("../Parser");
const StackedMap = require("../util/S... |
/*! drawbit v1.0.0 2013-10-05 */
/*globals console:false */
(function (db) {
'use strict';
/**
* Represents an Alphabit
* @constructor
* @param {Enum} options - Alphabit options
* @return {Object} Exposed methods
*/
db.Alphabit = function Alphabit(options) {
/**
* Layer Canvas Element
... |
// The MIT License (MIT)
// Copyright (c) 2016 – 2019 David Hofmann <the.urban.drone@gmail.com>
//
// 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 limitati... |
import outputFileSync from 'vendor/fs-extra/outputFileSync';
export default function(path){
outputFileSync(path, '');
}; |
var net = require('net');
var fs = require("fs");
var child_process = require("child_process");
var local_port = 8893;
//在本地创建一个server监听本地local_port端口
net.createServer(function (client)
{
//首先监听浏览器的数据发送事件,直到收到的数据包含完整的http请求头
var buffer = new Buffer(0);
client.on('data',function(data)
{
buffer = ... |
/*
* Copyright (c) 2015 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com)
*
* openAUSIAS: The stunning micro-library that helps you to develop easily
* AJAX web applications by using Java and jQuery
* openAUSIAS is distributed under the MIT License (MIT)
* Sources at https://github.com/raf... |
import React from 'react';
import { TrackStore } from '../stores';
import { SearchActions } from '../actions';
import Q from 'q';
import { LinkContainer } from 'react-router-bootstrap';
import { Grid, Input, Row, Col, Table, ProgressBar, Button, Glyphicon, Dropdown, MenuItem } from 'react-bootstrap';
import _ from '... |
var LintRoller = require('../src/LintRoller');
var config = {
verbose : false,
stopOnFirstError : false,
logFile : {
name : './error.log',
type : 'text'
},
//recursively include JS files in these folders
filepaths : [
'./'
],
//but ignore anything... |
/*var bmd, map, layer, marker, currentTile;
var score, scoreTextValue, nBlackTextValue, textStyle_Key, textStyle_Value;
var cursors;
var player;
var jumpButton, jumpTimer;
var background, colorBackground, backgroundDelay, changeBackground, screenDelay;
var index;
var floors;
var timer;
var A,S,D,F;
var obstacles;
var... |
import React from 'react';
import Icon from '../Icon';
export default class CloudQueueIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M38.71 20.07C37.35 13.19 31.28 8 24 8c-5.78 0-10.79 3.28-13.3 8.07C4.69 16.72 0 21.81 0 28c0 6.63 5.37 ... |
var path = require("path");
var utils = require("utils-pkg");
/**
* Parse options of the package
*
* @param {Object} opts Options given from the server
* @return {Object} Options object merged with default
*/
module.exports.parseOptions = function(opts){
if(typeof opts == "undefined"){
throw new Erro... |
(function () {
'use strict';
angular.module('OpenSlidesApp.users', [])
.factory('operator', [
'User',
'Group',
'loadGlobalData',
'autoupdate',
'DS',
function (User, Group, loadGlobalData, autoupdate, DS) {
var operatorChangeCallbacks = [autoupdate.reconnect];
var operator = {
... |
import React from 'react';
import { shallow, mount } from 'enzyme';
import Search from '../lib/Components/Search';
describe('Search', () => {
let wrapper;
let mockFn;
beforeEach(() => {
mockFn = jest.fn();
wrapper = shallow(<Search getApi={mockFn} />);
});
it('should exist', () => {
expect(wra... |
var io = require('socket.io');
var client = require('webrtc.io-client');
var rtc = {};
rtc._events = {};
var rooms = {};
module.exports.listen = function() {
// delegate all arguments to socket.io.listen
var manager = io.listen.apply(io, arguments);
attachRoutes(manager);
attachEvents(manager);
return mana... |
'use strict'
var BaseModel = require('capital-models').BaseModel;
module.exports = class Buyer extends BaseModel {
constructor(source) {
super('buyer', '1.0.0');
// Define properties.
this.code = '';
this.name = '';
this.address = '';
this.country = '';
t... |
function initMap() {
var latLng = new google.maps.LatLng(40.791885, -73.952581);
var styles = [
{
stylers: [
{ hue: "#541388" },
{ saturation: 0 }
]
},{
featureType: "road",
elementType: "geometry",
stylers: [
... |
'use strict';
angular.module('myApp.view1', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/view1', {
templateUrl: 'view1/view1.html',
controller: 'View1Ctrl'
});
}])
.controller('View1Ctrl', [function() {
$("#add-story-cta").click(function () {
... |
"use strict";
var IP = 'helios.rest.api';
describe("ProviderService of profileApp.services module", function() {
var mockProviderService, httpBackend;
beforeEach(module("profileApp.services"));
beforeEach(inject(function(_ProviderService_, $httpBackend) {
mockProviderService = _ProviderService_;
htt... |
'use strict';
const assert = require('assert');
const Bluebird = require('bluebird');
const Crypto = require('crypto');
const getAWSConfig = require('../aws_config');
const Ironium = require('../..');
const ms = require('ms');
const setup = require('../helpers');
(getAWSConfig.i... |
!function(p,A){function r(b){return A.isComplexArray(b)&&b||new t(b)}function y(b,z){var f=b.length;if(f&f-1){var f=b.length,a,c,k,e,d,h,u,n,g,m,l,q,v;if(1!==f){k=new t(f,b.ArrayType);b:{a=3;for(c=B(f);a<=c;){if(0===f%a){n=a;break b}a+=2}n=f}g=f/n;m=1/B(n);l=new t(g,b.ArrayType);for(c=0;c<n;c++){for(a=0;a<g;a++)l.real[... |
/**
* autonumeric_ujs.js
* @author: randoum
* @version: 2.0 - 2017-01-07
*
* Created by Randoum on 2013-08-15. Please report any bugs to https://github.com/randoum/autonumeric-rails
*
* Wrap-up autoNumeric.js library to be used with Rails in a UJS flavor
* All credits for autoNumeric library goes to its origina... |
//>>excludeStart("exclude", pragmas.exclude);
define(['validatrix', 'validators/regex'], function(){
//>>excludeEnd("exclude");
validatrix.validators.email = function(element, options) {
var errorMessage = element.getAttribute('data-val-email');
return validatrix.validators.regex(element, options, ... |
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var requireIndex = require("requireindex");
//------------------------------------------------------------------------------
... |
import app from '~/app';
import _ from 'lodash';
var _exports = {
escape : solrEscape,
andOr : andOr,
lstring : lstring
};
app.factory('solr', [function() { return _exports; }])
export default _exports;
function solrEscape(value) {
if(value===undefined) throw "Value is undefined";
if(value===null)... |
import React from 'react';
import PropTypes from 'prop-types';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './WhiteButton.css';
class WhiteButton extends React.Component {
render() {
const { children } = this.props;
return <button className={s.btnWhite}>{children}</button>;... |
/* eslint-disable ember/require-computed-property-dependencies */
/* globals FastBoot */
import Service from '@ember/service';
import { computed } from '@ember/object';
let isString = function(value) {
return typeof value === 'string';
};
let lowercase = function(string) {
return isString(string) ? string.toLowe... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
class SummaryList extends Component {
static propTypes = {
items: PropTypes.arrayOf(PropTypes.shape({
})),
}
static defaultProps = {
items: [
{
text: 'ราคาสินค้า',
color: 'blue',
amount: '40... |
'use strict';
var React = require('react');
var ReactDOM = require('react-dom');
var commons = require('./commons');
module.exports = function() {
ReactDOM.render(
<commons.PageHeader>Science <small>Visualization</small></commons.PageHeader>,
document.getElementById('heading')
);
ReactDOM.render(
... |
function GetShaderCode(id)
{
var shaderScript = document.getElementById(id);
if(!shaderScript) return null;
var str = "";
var k = shaderScript.firstChild;
while(k)
{
if(k.nodeType==3)
str += k.textContent;
k = k.nextSibling;
}
return str;
}
Demo =
{
minSize... |
/**
Custom trie implementation - Supports multiple entries and anything as leaves
-- add -- (key{text}, item{anything}[optional]) //If item not present, key itself will be leaf
--lookup -- (partial{text})
-- dumpJsonStr -- ()
-- wipe -- ()
Author : Aniket Lawande
**/
define(function (require,... |
version https://git-lfs.github.com/spec/v1
oid sha256:020caf1d4e1a321944ed6c57d2ddb4452fdca24efe694ef9e20b599e49846508
size 356
|
var PHASE_CODE = {
BASIC: 0,
DAY: 1,
NIGHTCOMING: 2,
WEREWOLF: 3,
SEER: 4,
WITCH: 5,
HUNTER: 6,
IDIOT: 7,
VILLAGER: 8,
ELDER: 9,
SAVIOR: 10,
KNIGHT: 11,
HUNZI: 12,
SUNRAISE: 13,
END: 14
};
module.exports = PHASE_CODE;
|
/**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it... |
import React from 'react'
import { Provider } from 'react-redux'
import { Route, Switch } from 'react-router-dom';
import RegisterComponent from '../../RegisterComponent'
import createStore from './redux/create'
import AppList from './components/AppList'
import AppUsers from './components/AppUsers'
import AppEdit fro... |
// ------------------------------------
// Constants
// ------------------------------------
export const GET_MESSAGE = 'GET_MESSAGE'
export const ADD_MESSAGE = 'ADD_MESSAGE'
// ------------------------------------
// Actions
// ------------------------------------
export const addMessage = (value) => {
return {
... |
import ToggleElement from './element'
customElements.define('shaf-toggle', ToggleElement)
|
var expect = require('expect');
var helpers = require('./helpers.js');
var validEmojiFormat = helpers.validEmojiFormat;
var getRandomBanter = helpers.getRandomBanter;
validEmojiFormatTest();
getRandomBanterTest();
function validEmojiFormatTest() {
console.log('validEmojiFormat() test');
console.log('=> should ret... |
import async from 'async'
export default ({nspApiClient, db}) => {
let syncAdvisoriesIntervalId = null
const Nsp = {
// Given a list of dependency names, retrieve an object that lists advisories
// by dependency name
getAdvisories (depNames, cb) {
const tasks = depNames.reduce((tasks, depName) =... |
const validateString = (value) => {
return (value != null && typeof value === 'string') ? value.trim() : null;
}
const validate = (value) => {
return (value != null) ? value : null;
}
const validateUrl = (url) => {
// check if url seems like a yelp url
if (url.includes('yelp.com')) {
// returns full url i... |
! function(e, t) {
"object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function(e) {
if (!e.document) throw new Error("jQuery requires a window with a document");
return t(e)
} : t(e)
}("undefined" != typeof window ? window : this, function(... |
/**
* The reveal.js markdown plugin. Handles parsing of
* markdown inside of presentations as well as loading
* of external markdown documents.
*/
(function(){
if( typeof marked === 'undefined' ) {
throw 'The reveal.js Markdown plugin requires marked to be loaded';
}
if( typeof hljs !== 'undefined... |
'use strict';
var app = require('../../app');
var request = require('supertest');
var newExpense;
describe('Expense API:', function() {
describe('GET /api/expenses', function() {
var expenses;
beforeEach(function(done) {
request(app)
.get('/api/expenses')
.expect(200)
.expec... |
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.resource('items', function() {
this.route('new');
this.resource('item', { path: '/:item_id' });
});
});
export default Router;
|
module.exports = (() => {
'use strict';
return {
write(buffer, value, offset) {
return buffer.writeInt16BE(value, offset);
},
read(buffer, offset) {
return buffer.readInt16BE(offset);
},
getByteLength(value) {
return 2;
},
getName() {
return 'int16';
}
};
})(); |
import {
isNumber,
isPlainObject,
isFunction,
isString,
isArray,
toggle,
isEmptyString,
checkNumberLength,
isEmail,
isPhone,
formatDate,
arrayMax
} from '../src/index';
describe('isNumber', () => {
it('returns false if input is not a number', () => {
expect(
isNumber([])
).toEqu... |
'use strict'
const multibase = require('multibase')
const { cidToString } = require('../../../utils/cid')
module.exports = {
command: 'links <key>',
describe: 'Outputs the links pointed to by the specified object',
builder: {
'cid-base': {
describe: 'Number base to display CIDs in. Note: specifying ... |
var Exit = Class.create(Brick, {
initialize: function($super) {
$super();
this.isDraggable = false;
this.isRemoveable = false;
this.isInFront = false;
this.hasShadow = false;
},
drawShape: function(context) {
var checkerBoardSize = 5,
checkerSize = Brick.SIZE / checkerBoa... |
var searchData=
[
['handle_165',['handle',['../classfly_1_1net_1_1detail_1_1_base_socket.html#a7b7c69b085673b626119eb8fbc87da15',1,'fly::net::detail::BaseSocket::handle()'],['../classfly_1_1net_1_1_listen_socket.html#a7b7c69b085673b626119eb8fbc87da15',1,'fly::net::ListenSocket::handle()'],['../classfly_1_1net_1_1_tcp... |
import user from './user';
import auth from './auth';
export default {
...user,
...auth
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.