code stringlengths 2 1.05M |
|---|
var Value = require('basis.data').Value;
var LS_KEY_HIDE_3RD_PARTY_MODULES = 'wraHide3rdPartyModules';
var hide3rdPartyModules = new Value({
handler: {
change: function() {
localStorage.setItem(LS_KEY_HIDE_3RD_PARTY_MODULES, this.value);
}
},
init: function() {
Value.pro... |
var PIXI = require('pixi.js');
var Config = require('../Config');
var Button = require('./Button');
var Intro = function() {
this.view = new PIXI.DisplayObjectContainer();
var size = Config.layout.worldSize;
this.bg = new PIXI.Graphics();
this.bg.beginFill(0xFFcc00);
this.bg.drawRect(-size.w/2, -size.h/2, ... |
/*
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( 'templates', 'fo', {
button: 'Skabelónir',
emptyListMsg: '(Ongar skabelónir tøkar)',
insertOption: 'Yvirskriva núverandi... |
/* eslint react/no-array-index-key: "off" */
import PropTypes from 'prop-types';
import React from 'react';
import VideoCardContent from './VideoCardContent';
const VideoCardAttachment = ({ attachment: { content }, disabled }) => (
<VideoCardContent content={content} disabled={disabled} />
);
VideoCardAttachment.... |
describe('Functional', function() {
var data, bindData, el, input;
beforeEach(function() {
adapter = {
subscribe: function(obj, keypath, callback) {
obj.on(keypath, callback);
},
unsubscribe: function(obj, keypath, callback) {
obj.off(keypath, callback);
},
read: f... |
import _ from 'lodash'
import * as actions from 'redux/actions'
export default (
dispatch,
tournament,
startDate,
endDate
) => {
let body = _.cloneDeep(tournament)
body.startDate = startDate
body.endDate = endDate
dispatch(actions.tournaments.current.update(tournament._id, body))
}
|
"use strict";
let aliasConf = require('../../../conf/alias.conf');
let path = require('path');
let commandLoader = require('../module/command.loader');
let commandPath = path.join('..', '..');
let commandBlackList = ['core'];
/**
* 命令别名
* @param argv
*/
module.exports = (argv) => {
commandLoader.loadCommandLi... |
import Code from '../../components/Code'
import {Button,SelectTime,Toast} from 'candy-mobile'
export default ()=>{
return (
<div>
<div className="ct-page__title">时间选择器:</div>
<Code>{`
<Button type="primary" size="small" onClick={function(){
new SelectTime({
title:'时间选择器'... |
import { combine as $combine, pool } from "kefir";
import { isStream, noop } from "./utils";
import combineMiddleware from "./combineMiddleware";
// ---
export default function createStore(
actions$,
reducerInitializers,
initialState = {},
{ middleware = [] } = {}
) {
const stateSources = pool();
const s... |
var hammerhead = window.getTestCafeModule('hammerhead');
var browserUtils = hammerhead.utils.browser;
var featureDetection = hammerhead.utils.featureDetection;
var testCafeCore = window.getTestCafeModule('testCafeCore');
var styleUtils = testCafeCore.get('./utils/style');
var testCafeAutomation = window.g... |
/*! Hammer.JS - v2.0.4 - 2014-09-28
* http://hammerjs.github.io/
*
* Copyright (c) 2014 Jorik Tangelder;
* Licensed under the MIT license */
if (Object.create) {
!function (a, b, c, d) {
"use strict";
function e(a, b, c) {
return setTimeout(k(a, c), b)
}
function f(... |
const balboa = require('..')
balboa().listen(3000)
console.log('Proxy server listening on port:', 3000)
|
module.exports = {
'apisModel': require('./lampAPI'),
'accountsModel': require('./accounts')
}
|
import { normalize, schema } from 'normalizr';
const users = [
{
id: 1,
name: 'Roza',
avatar: 'https://pickaface.net/assets/images/slides/slide1.png',
}, {
id: 2,
name: 'Peter',
avatar: 'https://pickaface.net/assets/images/slides/slide2.png',
}, {
id: 3,
name: 'Sam',
avatar: '... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _classnames = require('classnames');
var _classnames2 = _in... |
var express = require('express');
var router = express.Router();
var mongoose = require('mongoose');
var User = require('../models/User.js');
var auth = require('../auth/auth.js');
var tokenHelper = require('../auth/tokenHelper.js');
var nodemailer = require('nodemailer');
// create reusable transporter object using... |
/* WARNING!!! THIS IS NOT FUNCTIONAL */
module.exports = require('ridge/view').extend({
template: 'admin/models/user',
events: {
'click': 'toggle'
},
elements: {
info: '.info'
},
toggle: function() {
if(this.elements.info.children().length > 0)
this.elements.info.toggleClass('visible')... |
/**
* Collects the informations required for the overview json file
*/
module.exports = function(router, plugins) {
router.get('/overview', function(req, res) {
var info = [];
plugins.forEach(function(plugin) {
info.push(plugin.overview());
});
res.send(i... |
export const FIND_BEERS = 'findBeers';
export const GET_BEER = 'getBeer';
export const SHOW_LOADING = 'showLoading'; |
'use strict'
// var $ = require('jquery'),
// _ = require('lodash'),
// Firebase = require('firebase');
angular
.module('anyPlane', ['ui.router'])
.constant('BASE_URL', 'https://any-plane.firebaseio.com')
.config(function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise('/');
$stateProvi... |
import { Component } from 'react';
import filter from 'lodash/filter';
import isEqual from 'lodash/isEqual';
import withOptions from 'hoc/withOptions';
import withTheme from 'hoc/withTheme';
import { getUrl, loadBackground } from 'lib/api';
import removeAllElements from 'utils/removeAllElements';
import FaviconImage... |
(function () {
'use strict';
xdescribe('Async Test', function () {
it('should catch async errors', function (done) {
setTimeout(function () {
throw new Error('Async error!');
}, 100);
});
});
})();
|
'use strict';
const Location = require('../../../models/location');
exports.create = (payload) => {
return new Location().save(payload)
.then((location) => new Location({ id: location.id }).fetch());
};
|
// Creates the document that will be returned in the search
// results. There may be cases where the document that is searchable
// is not the same as the document that is returned
const Transform = require('stream').Transform
const util = require('util')
const CreateStoredDocument = function (options) {
Transform.c... |
import test from 'ava';
import sinon from 'sinon';
import subject from '../../lib/createDepsProxy';
import mock from 'mock-require';
import chanceFactory from 'chance';
const chance = chanceFactory();
const sandbox = sinon.sandbox.create();
test.afterEach(() => {
sandbox.reset();
});
test('native modules are added ... |
"use strict"
var http = require('http');
var shoe = require('shoe')
var ecstatic = require('ecstatic')({
root : __dirname,
baseDir : '/',
cache : 3600,
showDir :true,
autoIndex :true,
defaultExt : 'html',
gzip : false
});
var server = http.createServer(ecstatic);
server.on('req... |
$(function () {
'use strict';
$.get('/list', function (list) {
var $ul = $('#list');
var $lis = [];
for (var i=0, l=list.length; i<l; i++) {
var item = list[i],
$li = $('<li></li>'),
$a = $('<a></a>');
$a.text(item).attr('href', '/... |
export function locations () {
return [
{
id: 1,
address: 'Praça Dos Omaguas, 34 - Pinheiros - São Paulo - SP',
city: 'Pinheiros',
state: 'SP',
},
{
id: 2,
address: 'Av. Pulista, 901 - Bela Vista - São Paulo - SP',
... |
module.exports = function() {
return {
// Prepare app HTML for production
dist_template: {
src: ['ng-templates/ng-apps.html.template'],
dest: 'ng-templates/ng-apps.html',
replacements: [{
from: '<!-- replace-tag -->',
to: '<script s... |
define(() => {
'use strict';
return class BoardRenderer {
constructor() {
this.width = 0;
this.height = 0;
}
clear() {
this.width = 0;
this.height = 0;
}
updateGameConfig({width, height}) {
if(width !== this.width || height !== this.height) {
this.width = width;
this.height = heigh... |
/**
* @copyright Copyright 2006-2013, Miles Johnson - http://milesj.me
* @license http://opensource.org/licenses/mit-license.php - Licensed under the MIT License
* @link http://milesj.me/code/cakephp/forum
*/
'use strict';
var Forum = {
/**
* Update an input with a characters remaining ... |
Object.defineProperty(exports, "__esModule", { value: true });
var date_reg = /^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$/;
var email_reg = /([\w-\.]+)@((... |
!function() {
var createDirective = function(type) {
return ['$uiHighChartsManager',
function(highChartsManager) {
return {
restrict: 'EAC',
transclude: true,
replace: true,
template: '<div></div>',
scope: {
... |
import Ember from "ember";
export default Ember.Component.extend({
gridOptions: {
columnDefs: [
{
headerName: "Product", field: "name"
},
{
headerName: 'Units', field: 'units'
},
{
headerName: 'Sales', field: 'sales'
},
{
headerName: 'Pro... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ts = require("typescript");
var TypeGuard_1 = require("./TypeGuard");
function getPropName(node) {
if (!TypeGuard_1.isJsxAttribute(node)) {
throw new Error('The node must be a JsxAttribute collected by the AST parser.');
}
... |
import _ from 'lodash'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import {
customPropTypes,
eventStack,
getElementType,
getUnhandledProps,
isBrowser,
META,
} from '../../lib'
/**
* Responsive can control visibility of content.
*/
export default class Responsive extends C... |
module.exports = {
'A': 'Å', 'a': 'ª',
'B': 'ß', 'b': 'Ь',
'C': 'Ç', 'c': '¢',
'D': 'Ð', 'd': 'ð',
'E': 'É', 'e': 'ë',
'F': 'F', 'f': 'ƒ',
'G': 'Ĝ', 'g': 'ğ',
'H': 'Ħ', 'h': 'λ',
'I': '1', 'i': 'ï',
'J': 'Ĵ', 'j': 'ĵ',
'K': 'Ķ', 'k': 'к',
'L': '£', 'l': 'ł',
'M': 'M', 'm': 'ḿ',
'N': 'И', 'n': 'ñ',
'O': '... |
import React from 'react'
import PropTypes from 'prop-types'
export default class LoadMoreButton extends React.Component {
static propTypes = {
hasMore: PropTypes.bool,
isActive: PropTypes.bool,
activeDescriptionText: PropTypes.string,
normalDescriptionText: PropTypes.string,
... |
import addons from '@kadira/storybook-addons';
const ADDON_ID = "storybook-addon-style";
const PANEL_ID = `${ADDON_ID}/style-panel`
function register() {
addons.register(ADDON_ID, api => {
// addons.addPanel can be used to add a new panel to storybook manager
// The `title` field will be used as the tab titl... |
// Configuration
// The `/ytdl` folder that is hosted on your site
const endpoint = "https://de.surge.sh/ytdl"
// See https://console.developers.google.com/apis/api/urlshortener
const googlApiKey = "YOUR-GOOGLE-API-KEY";
export {
endpoint,
googlApiKey
} |
importScripts('serviceworker-cache-polyfill.js');
var CACHE_NAME = 'statistika-v1';
// File want to cache
var urlsToCache = [
'./',
'./index.html',
'./manifest.json',
'./serviceworker-cache-polyfill.js',
'./src/assets/img/blank-thumbnail.png',
'./src/assets/img/favicon.png',
'./src/assets/img/icon-48.... |
/**
* @license Highcharts JS v4.0.0 (2014-04-22)
*
* Standalone Highcharts Framework
*
* License: MIT License
*/
/*global Highcharts */
var HighchartsAdapter = (function () {
var UNDEFINED,
doc = document,
emptyArray = [],
timers = [],
timerId,
Fx;
Math.easeInOutSine = function (t, b, ... |
import Handler from '../handlers/signup';
import Response from '../responses/signup';
import Validation from '../validation/signup';
export default [
{
method: 'POST',
path: '/signup',
config: {
auth: false,
handler: Handler.signup,
response: {
... |
// ==UserScript==
// @name adarkroom_doublespeakgames_com
// @namespace http://www.subtl.fr/
// @description Colorize resources changes.
// @downloadURL https://github.com/flowgunso/greasemonkeyScripts/
// @version 1.0
// @include /[(http(s)?):\/\/[]{2,256}?(adarkroom.doublespeakgames.com)\b[-a-zA-Z0-9@:%_... |
var s1 = 'Hallo, ';
var s2 = "Olli's Oma";
// === JavaScript ~ == Java
// == JavaScript ~ Obskure Typkonvertierung in Java
var s3 = s1 + s2;
//console.log(s3);
// immer (!) === nehmen
//console.log(s3 === "Hallo, Olli's Oma");
// true
s3[1] === "a";
console.log(s3[1]);
console.log(typeof s3[1]);
s3.charAt(1) === s3[1... |
(function() {
var BrowserWorker, Point, Report, Sequelize, Utils, sequelize;
Utils = require('./utils');
Sequelize = require('sequelize');
sequelize = Utils.connect();
Report = sequelize.define('Report', {
metric: {
type: Sequelize.STRING,
allowNull: false
},
key: {
type: Seq... |
const DEFAULT_SUBREDDITS = [
"/r/askscience",
"/r/explainlikeimfive",
"/r/todayilearned",
];
export { DEFAULT_SUBREDDITS };
|
// Blockly workspace
var workspace;
window.addEventListener('load', function() {
// To remember the control_if blockId
var controlBlockId = '';
// Change the if block to be more cheerful
Blockly.Msg.LOGIC_HUE = '#24c74f';
// Remote previous and next statement from control_if block
Blockly.def... |
export function callIfExists(func, ...args) {
return (typeof func === 'function') && func(...args);
}
export function hasOwnProp(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
export function uniqueId() {
return Math.random().toString(36).substring(7);
}
export const cssClasses = ... |
var util = require('util');
var Q = require('q');
var jwt = require('jsonwebtoken');
var BaseCipher = require('./BaseCipher');
/**
* Secret key for symmetric encoding
* @type {String}
* @private
*/
var SECRET_KEY = "53c5ec198c6f51575796da791e5350cd6362bb3c7953f7c259ac792b7a93265d";
/**
* Algorithm that using for... |
"enable aexpr";
import AbstractAstNode from './abstract-ast-node.js'
export default class CompoundNodeCallFunctionShorthand extends AbstractAstNode {
async initialize() {
await super.initialize();
this.windowTitle = "CompoundNodeCallFunctionShorthand";
}
async updateProjection() {
await this.crea... |
seajs.config({
base: '../'
});
define(function(require) {
var test = require('../../../test');
var program = require('package/order-no-matter/program');
test.assert(program.result === 11, 'math program');
test.next()
});
|
const copy = require("../../copy");
const path = require("path");
const fs = require("fs");
const { promisify } = require("util");
const templates = {
test: {
filename: path.join(__dirname, "templates", "example.js"),
variable: "example"
},
contract: {
filename: path.join(__dirname, "templates", "Exa... |
// helpers for getting information about DOM nodes
class ElementQuery {
constructor (el) {
this.el = el;
}
get nodeName () {
return this.el.nodeName.toLowerCase();
}
get firstTextNodeValue () {
const textNodes = Array.from(this.el.childNodes).filter(el => el.nodeType === 3);
return textN... |
/* eslint new-cap: [2, {"capIsNewExceptions": ["Match.ObjectIncluding", "Match.Optional"]}] */
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
Meteor.methods({
'livechat:saveCustomField'(_id, customFieldData) {
if (!Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userI... |
'use strict'
const vm = require('vm')
const fs = require('fs')
const callsite = require('callsite')
const path = require('path')
const threePath = path.join(require.resolve('three'), '..', '..')
const context = {}
Object.assign(context, global)
context.console = { // disable console for new modules
log: function ()... |
var sl = require('sugarlisp-core/sl-types'),
reader = require('sugarlisp-core/reader');
// the opening paren is treated as an operator in sugarscript
// A normal parenthesized expression "(x)" is considered a prefix operator
// But when used postfix e.g. "fn(x)" this is understood to be a function
// call read in ... |
'use strict';
angular.module('activities').controller('ActivitiesController', [
'$scope',
'$stateParams',
'$state',
'$location',
'$timeout',
'Authentication',
'Activities',
'FileUploader',
function($scope, $stateParams, $state, $location, $timeout, Authentication, Activities, FileUploader) {
... |
const expect = require("expect.js");
const eio = require("../");
const { isIE11, isAndroid, isEdge, isIPad } = require("./support/env");
const FakeTimers = require("@sinonjs/fake-timers");
describe("Socket", function() {
this.timeout(10000);
describe("filterUpgrades", () => {
it("should return only available ... |
/* ========================================================================
* DOM-based Routing
* Based on http://goo.gl/EUTi53 by Paul Irish
*
* Only fires on body classes that match. If a body class contains a dash,
* replace the dash with an underscore when adding it to the object below.
*
* .noConflict()
* ... |
import './announcements.users.component.css';
export const AnnouncementUsersComponent = {
template: require('./announcements.users.component.html'),
controllerAs: 'vm',
controller: class AnnouncementUsersComponent {
constructor(AnnouncementService, $stateParams, $scope) {
'ngInject';
... |
function HTMLActuator() {
this.tileContainer = document.querySelector(".tile-container");
this.scoreContainer = document.querySelector(".score-container");
this.bestContainer = document.querySelector(".best-container");
this.messageContainer = document.querySelector(".game-message");
this.score = 0;
... |
var Show = require('../models/show');
var Season = require('../models/season');
var Episode = require('../models/episode');
var webParser = require('../modules/webParser');
var baseUrl = "http://www.imdb.com/";
module.exports.get = function(req, res, next) {
var id = req.params.id;
webParser.getAndParse(
baseU... |
(function() {
var navBarModule = angular.module("hel-navbar", ["hel-services"]);
navBarModule.service("hel-navbar-service", function($location, $rootScope){
this.pages = config.navbar;
this.currentPage = this.pages[0];
this.currentSubPage = null;
this.editorOn = false;
... |
/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojo.dnd.Container"]){ //_hasResource checks added by build. Do not use _hasResource directly in you... |
/* An evenly spaced set of labels.
*/
//(function () {
core.require(function () {
var item = svg.Element.mk('<g/>');
item.width = 1000;
item.height = 500;
item.centerLabels = true;
// possible orientation values: 'horizontal' and 'vertical'
item.orientation = 'horizontal';
//label prototype
//var labelP = svg.Ele... |
/* jshint node: true */
'use strict';
var readEnvironmentConfig = require('./lib/environment-config').read;
var fastbootTransform = require('fastboot-transform');
module.exports = {
name: 'ember-cli-bugsnag',
options: {
nodeAssets: {
'bugsnag-js': {
vendor: {
srcDir: 'src',
... |
// [Working example](/serviceworker-cookbook/offline-status/).
var CACHE_NAME = 'dependencies-cache';
// Files required to make this app work offline
var REQUIRED_FILES = [
'random-1.png',
'random-2.png',
'random-3.png',
'random-4.png',
'random-5.png',
'random-6.png',
'style.css',
'index.html',
'ind... |
angular
.module( 'app', ['uiSwitch'] )
.controller( 'MyController', function( $scope ) {
$scope.enabled = true;
$scope.onOff = true;
$scope.yesNo = true;
$scope.disabledTrue = true;
$scope.disabledFalse = false;
$scope.changeCallback = function() {
console.log( ... |
(function() {
// Initialize o.
this.o = o = {};
// Initialize the o configuration object.
o.config = {};
//
// Utils.
//
// Some configuration.
o.config.utils = {
// XML sanitization rules.
sanitizationRules: [
[/&/g, '&'],
[/</g, '<'],
[/>/g, '>'],
[/"/g... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* User Schema
*/
var MessageFixSchema = new Schema({
message : String,
messageFix : String
});
module.exports = mongoose.model('MessageFix', MessageFixSchema);
|
var express = require('express');
var app = express();
app.set('view engine', 'ejs');
app.use(express.static('public'))
// Routes
app.get('/', function(req, res) {
res.render('index');
})
// Port for AWS deployment or local
var port = process.env.PORT || 3000;
app.listen(port, function() {
console.log('Ap... |
/*jshint node:true, indent:2, curly:false, eqeqeq:true, immed:true, latedef:true, newcap:true, noarg:true,
regexp:true, undef:true, strict:true, trailing:true, white:true */
/*global X:true */
(function () {
"use strict";
var nodemailer = require("nodemailer"),
smtpOptions = {
host: X.options.datasource... |
import appendFlagToRegularExpression from 'helper/reg_exp/append_flag_to_reg_exp';
import coerceToString from 'helper/string/coerce_to_string';
import escapeRegExp from 'escape/escape_reg_exp';
/**
* Returns a new string where all matches of `pattern` are replaced with `replacement`. <br/>
*
* @function replaceAll
... |
var jshint = require('gulp-jshint')
var shell = require('gulp-shell')
var gulp = require('gulp')
var paths = {
solutions:'./exercises/*/solution/solution.js',
exercises:'./exercises/*/exercise.js',
scripts: './exercises/**/*.js'
}
gulp.task('lint', function() {
return gulp.src(paths.scripts)
.pipe(jsh... |
'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]; } }... |
Meteor.startup(function () {
// New user email
Router.route('/email/new-user/:id?', {
name: 'newUser',
where: 'server',
action: function() {
var user = Meteor.users.findOne(this.params.id);
var emailProperties = {
profileUrl: getProfileUrl(user),
username: getUserName(user)... |
import React, {
PropTypes
} from 'react';
import {
GridTile
} from 'material-ui/GridList';
class SearchGifView extends React.Component {
constructor(props) {
super(props);
this.handleMouseOver = this.handleMouseOver.bind(this);
this.handleMouseOut = this.handleMouseOut.bind(this);
... |
import Promise from 'bluebird';
import mongoose from 'mongoose';
import httpStatus from 'http-status';
import APIError from '../helpers/APIError';
/**
* Url Schema
*/
const UrlSchema = new mongoose.Schema({
reportId: {
type: String,
required: true
},
url: {
type: String,
required: true
},
c... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var CMLFormulaElem_1 = require("./CMLFormulaElem... |
import Bundler from './lib/bundler';
module.exports = Bundler;
|
import React from 'react';
import { mount } from 'enzyme';
import {
isEnzymeTestkitExists,
isUniEnzymeTestkitExists,
} from 'wix-ui-test-utils/enzyme';
import { isTestkitExists, isUniTestkitExists } from 'wix-ui-test-utils/vanilla';
import AllComponents from './all-components';
import COMPONENT_DEFINITIONS from ... |
// Boilerplate Canvas Code
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var canvasUi = document.getElementById("canvasUi");
var ctxUi = canvasUi.getContext("2d");
var canvasHeight = canvas.height;
var canvasWidth = canvas.width;
var requestAnimationFrame = window.requestAnimation... |
/*
* grunt-template4js
* https://github.com/albertshaw/grunt-template4js
*
* Copyright (c) 2014 Xiao Long
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
var path = require('path');
var template4js = require('../lib/template4js')({
templateSettings : {
... |
require('dotenv').config();
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { env: { NODE_ENV, HOST_NAME, FACEBOOK_APP_ID } } = process;
const isDevMode = NODE_ENV === 'development';
exports.webpack = webpack;
const config = {
devtool:... |
var crypto = require('crypto');
var through = require('through');
var pipeline = require('stream-combiner');
var concatStream = require('concat-stream');
var checkSyntax = require('syntax-error');
var parents = require('parents');
var mdeps = require('module-deps');
var browserPack = require('browser-pack');
var depSo... |
import test from 'ava'
import * as notificationActions from './notificationActions'
test('deliverMessage action returns the expected action', assert => {
const inbox = {
message: 'I am a dummy mesage',
type: 'message'
}
const action = notificationActions.deliverMessage(inbox)
const expectedAction = {... |
/*
* Copyright (C) 2014 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration. All Rights Reserved.
*/
/**
* @exports WmsLayerCapabilities
* @version $Id: WmsLayerCapabilities.js 3055 2015-04-29 21:39:51Z tgaskins $
*/
define([
'../../... |
import React from "react"
export default {
title: "Dashboard/header",
}
export const exampleStory = () => (
<div style={{ padding: "16px", backgroundColor: "#eeeeee" }}>
<h1 style={{ color: "rebeccapurple" }}>Hello from Storybook and Gatsby!</h1>
</div>
) |
module.exports = {
up: function(migration, DataTypes) {
return migration.createTable('RefreshTokens', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
token: {
type: DataTypes.UUID,
allowNull: false
},
expires_in: {
... |
'use strict';
var changelog = require('conventional-changelog');
var parseUrl = require('github-url-from-git');
module.exports = function (pluginConfig, _ref, cb) {
var pkg = _ref.pkg;
var repository = pkg.repository ? parseUrl(pkg.repository.url) : null;
changelog({
version: pkg.version,
repository: ... |
'use strict';
var _ = require('lodash');
var moment = require('moment');
var uuid = require('node-uuid');
var jwt = require('jwt-simple');
/**
* various utility methods
*
* @type {Object}
*/
module.exports = {
/**
* gathers all params for this request
*
* @param {Object} req the express request object... |
/*
* Author: @senthil2rajan
* plugin: timepicker
* website: senthilraj.github.io/Timepicki
*/
(function($) {
$.fn.timepicki = function(options) {
var defaults = {
format_output: function(tim, mini, meri) {
if(settings.show_meridian){
return tim + " : " + mini + " : " + meri;
}else{
return... |
import React from 'react';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { shallow, mount } from 'enzyme';
import sinon from 'sinon';
import GoogleSignup from '../components/GoogleSignup';
const middlewares = [thunk];
const mockStore = configureStore(middlewares);
co... |
import React from 'react'
import TableRow from './TableRow'
const Table = (props) => {
return(
<div className='game-container'>
{ [...new Array(props.rows)].map((val, i) => {
if (typeof props.matrix[i] !== "undefined") {
return <TableRow cols={props.... |
/* http://keith-wood.name/svg.html
SVG for jQuery v1.4.2.
Written by Keith Wood (kbwood{at}iinet.com.au) August 2007.
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
Please attribute ... |
'use strict';
var _map = require('lodash/map');
var _filter = require('lodash/filter');
var _bind = require('lodash/bind');
var _each = require('lodash/each');
var _difference = require('lodash/difference');
var _findIndex = require('lodash/findIndex');
var _isUndefined = require('lodash/isUndefined');
var _find = req... |
/**
* Copyright (c) 2015-present, yhtml5.com, Inc.
* All rights reserved.
*/
'use strict';
const downLoad = ({
name = 'download',
url = ''
}) => {
if (process.env.NODE_ENV !== 'production') {
if (Object.prototype.toString.call(url) !== '[object String]' && !url) {
console.error('The function downLoad u... |
// @flow
export default [
{
title: 'Front End Engineer',
unit: 'Appier',
location: 'Taipei, Taiwan',
duration: '2017 - Present',
description: 'Aixon Team',
},
{
title: 'F2E&RGBA Meetup',
unit: 'Co-organizer',
location: 'Taipei, Taiwan',
duration: '2016 - Present',
descripti... |
/*
* timeselector
* https://github.com/nicolaszhao/timeselector
*
* Copyright (c) 2014 Nicolas Zhao
* Licensed under the MIT license.
*/
(function($) {
var Timeselector = function() {
this._$div = null;
this._inst = null;
this._showing = false;
this.uuid = new Date().getTime();
this.initialized =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.