code stringlengths 2 1.05M |
|---|
/**
* Module dependencies.
*/
var base62 = require('./base62');
/**
* Converts a GID Buffer to an ID hex string.
* Based off of Spotify.Utils.str2hex(), modified to work with Buffers.
*/
exports.gid2id = function (gid) {
for (var b = '', c = 0, a = gid.length; c < a; ++c) {
b += (gid[c] + 256).toString(1... |
import { ELEMENT, COMPONENT } from '../../../config/types';
export default function findElement( start, orComponent = true ) {
while ( start && start.type !== ELEMENT && ( !orComponent || start.type !== COMPONENT ) ) {
if ( start.owner ) start = start.owner;
else if ( start.component ) start = start.component.par... |
/**
* entry point view for the app
* itself a noop view, which manages relationships
* to child views: NotesView and EditorView
* includes Split.js handling for main UI/layout
* and simple RegEx search handling
*/
var MainView = function (options) {
var View = Backbone.View.extend({
el: '#app',
searchC... |
// Rayson package (c) Tomasz Zduńczyk <tomasz@zdunczyk.org>
// Please view the LICENSE file distributed with this code.
var rayson = rayson || {};
(function(bundle) {
var ULEB_MAX_SIZE = ulebSize(bitSize(Number.MAX_VALUE));
// right bit shift >>
function rsh(val, bits) {
return Math.floor(val ... |
var fs = require('fs');
var vm = require('vm');
var includeInThisContext = function(path) {
var code = fs.readFileSync(path);
vm.runInThisContext(code, path);
}.bind(this);
includeInThisContext(__dirname + "/../../../../build/base.js");
var assert = require('assert');
function toArrayBuffer(buffer) {
... |
import { useContext, useState, useEffect, useDebugValue } from 'react';
import AxisContext from '../AxisContext';
import useChart from '../UseChart';
import createProvidedAxis from '../Axis/createProvidedAxis';
export default function useAxis(axisId) {
const chart = useChart();
const contextAxis = useContext(AxisC... |
import { takeLatest } from 'redux-saga';
import { LOCATION_CHANGE } from 'react-router-redux';
import { take, call, put, fork, select, cancel } from 'redux-saga/effects';
import { startConfiguration } from '../LampConfiguration/sagas'
import {
selectCurrentConfiguration,
selectTimeLimit,
selectDelay,
selectFeed... |
/**
* Created by paul on 3/1/15.
*/
requirejs.config({
//By default load any module IDs from js/lib
baseUrl: 'scripts/lib',
//except, if the module ID starts with "app",
//load it from the js/app directory. paths
//config is relative to the baseUrl, and
//never includes a ".js" extension since... |
import expect from '../index'
describe('toNotEqual', () => {
it('works', () => {
expect('actual').toNotEqual('expected')
})
it('works with objects that do not have the same keys', () => {
const a = { a: 'a', b: 'b', c: 'c' }
const b = { a: 'a', b: 'b', d: 'c' }
expect(a).toNotEqual(b)
})
it... |
/**
* Created by cmanalan on 3/4/2017.
*/
var ChatBotReceiver;
(function ($) {
$(document).ready(function() {
ChatBotReceiver = {
"say": function(msg) {
var $messages = $('.messages');
if (msg.mode == 'public') {
$messages.html($messages.html() + msg.sender + ' says: ' + msg.me... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v7.5c0 .83.67 1.5 1.5 1.5S6 20.33 6 19.5V19h12v.5c0 .82.67 1.5 1.5 1.5.82 0 1.5-.67 1.5-1.5V12l-2.08-5.99zM7.5 16c-.83 0-1.5... |
require("ts-node").register({
project: "tsconfig.json",
files: true,
}); |
import { validateRecord, validateRecordWarnings } from '../validators';
import attributeRules from './testdata/attributeRules.json';
import record from './testdata/record.json';
describe('(Record validation) Test some example record', () => {
const errors = validateRecord(record, attributeRules);
const warnings =... |
app.controller('LoginCtrl', function($scope, $location, notifier, identity, auth) {
$scope.identity = identity;
$scope.login = function(user) {
auth.login(user).then(function(success) {
if (success) {
notifier.success('Greetings ' + user.username + '!');
if($... |
var Plotly = require('@lib/index');
var Bar = require('@src/traces/bar');
var Lib = require('@src/lib');
var Plots = require('@src/plots/plots');
var PlotlyInternal = require('@src/plotly');
var Axes = PlotlyInternal.Axes;
var createGraphDiv = require('../assets/create_graph_div');
var destroyGraphDiv = require('../... |
bandicoot.framework.serviceInjector.registerInjectedType({
name: 'loki',
construct: function(options) {
var loki = require('lokijs');
return new loki(options.service.service);
}
}); |
(function () {
"use strict";
function Calculator(markupValues) {
var i;
this.markup = {
flat : 0.05,
person : 0.012,
material : {
"drugs" : 0.075,
"food" : 0.13,
"electronics" : 0.02
}
};
for (i in markupValues) {
this.markup[i] = markupValue... |
var chai = require('chai');
var should = chai.should();
var frog = require('../frog.node');
function err(fn, msg) {
try {
fn();
throw new chai.AssertionError({ message: 'Expected an error' });
} catch (err) {
should.equal(msg, err.message);
}
}
suite('frog.Flow', function() {
... |
var http = require('http');
var server = http.createServer();
server.on('request', function (req, res) {
console.log('request coming: ' + req.url);
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World!\n');
});
server.listen(3000);
console.log('server running at http://localhost:3000')... |
var Q = require('q');
var fs = require('fs');
var _ = require('underscore');
var path = require('path');
var google = require('googleapis');
var authenticate = require('../utils/authenticate');
var updateManifest = require('../utils/manifestor');
var config = require('../config');
var error = moduleErrors();
module.ex... |
var fs = require('fs');
var Scheduler = require('../index').Scheduler;
//the following context object is going to be made available to the handler
//function via a closure that is created around it. by injecting it into
//the supervisors scope below. Local.inject(context).Supervisor;
//this allows you to access psuedo... |
'use strict';
import '../sass/stats.scss';
import Stats from './components/Stats.js';
import Charts from './components/Charts.js';
(function() {
new Stats(
function() {
return {
'log': function() {
},
'warn': function() {
},
... |
///<reference path="../../../typings/easeljs/easeljs.d.ts" />
///<reference path="../../../typings/preloadjs/preloadjs.d.ts" />
///<reference path="../../../typings/underscore/underscore.d.ts" />
var AssetLibrary = (function () {
function AssetLibrary(basePath) {
this.basePath = basePath;
this.reque... |
module.exports = function (io) {
io.res.write('i2');
io.next();
};
|
'use strict';
(function() {
xdescribe('GAMBO controllers', function() {
describe('IndexController', function() {
// Load the controllers module
beforeEach(module('gambo'));
var scope, IndexController;
beforeEach(inject(function($controller, $rootScope) {
... |
/* eslint-disable class-methods-use-this */
import Joi from 'joi';
import { ServiceContainer, decorators } from 'octobus.js';
const { service, withSchema } = decorators;
class Security extends ServiceContainer {
@service()
@withSchema({
userId: Joi.any().required(),
permissions: Joi.array().items(Joi.stri... |
/**
* base class for the player.
* @constructor
* game : the phaser game.
* posx : his location in x.
* posy : his location in y.
* @method toggleCombatMode
* change the player mode on Combat Mode.
* @method reload
* TODO: reload the current weapon magazine
* @property onLadder
* the player colliding w... |
import './css/ex.scss';
import './css/modifier/blue.scss';
import './elements/Ex-link/css/ex-link.scss';
import './js/ex';
|
const closedValue = null;
window.Modal = new (class {
constructor() {
this._currentModal = new ReactiveVar(closedValue);
this._onCloseGoTo = '';
this._isWideModal = false;
}
getHeaderName() {
const currentModal = this._currentModal.get();
return currentModal && currentModal.header;
}
ge... |
/*------------------------------ LANG: OBJECT ------------------------------*/
eachKey =
fuse.Object.each = (function() {
// use switch statement to avoid creating a temp variable
var each;
switch (function() {
var key, count = 0, klass = function() { this.toString = 1; };
klass.prototype... |
const test = require('tape');
const normalize = require('../../lib/normalize');
test('Normalize', (nest) => {
nest.test('undefined input', (assert) => {
const data = undefined;
const params = {
title: '.title_wrapper h1',
};
const actual = normalize(data, params);
const expected = undefine... |
#!/usr/bin/env node
/**
* @file
* The script generates docs.json used as the source of truth
* for the source code generators (FP, typings, etc.).
*
* It's a part of the build process.
*/
const os = require('os')
const pLimit = require('p-limit')
const fs = require('fs/promises')
const path = require('path')
co... |
'use strict';
var verifyCode = require('../controllers/verify_code');
module.exports = function (app) {
app.route('/verify_code/wxBind').get(verifyCode.getWxBindCode);
};
|
// Copyright 2017 Cory Douthat
"use strict";
var textures = [];
// LoadTexture()
// Load texture image and buffer
function LoadTexture(img_path)
{
// Load regular texture
textures.push(LoadTextureImg(img_path));
// Load alpha masks
// TODO: special considerations for mask?
// TODO: make editable?... |
import express from 'express';
import tricksRoutes from './tricks.route';
import tagsRoutes from './tags.route';
import infoRoutes from './infos.route';
import personalitiesRoutes from './personality.route';
const router = express.Router(); // eslint-disable-line new-cap
/** GET /health-check - Check service health *... |
import chokidar from 'chokidar';
import fs from 'fs-extra';
import path from 'path';
import VendorAdapter from './VendorAdapter'
class LocalVendorAdapter extends VendorAdapter {
constructor({
config,
appPath,
cloud
}) {
super({
config,
cloud,
});
this.appPath = appPath;
thi... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const path = require("path");
const SilentError = require('silent-error');
function findParentModule(projectRoot, appRoot, currentDir) {
const sourceRoot = path.join(projectRoot, appRoot, 'app');
// trim curre... |
import React from 'react';
import { shallow } from 'enzyme';
import SpinnerButton from '../SpinnerButton';
describe('<SpinnerButton />', () => {
let component;
const onPressSpy = jest.fn();
const onHoldSpy = jest.fn();
beforeEach(() => {
component = shallow(<SpinnerButton
content=... |
'use strict'
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['mocha'],
files: [
{ pattern: './config/spec-bundle.js', watched: false },
],
exclude: [ ],
plugins: [
require('karma-coverage'),
require('karma-chrome-launcher'),
require('ka... |
/**
* @author Virtuosi Media
* @link http://www.virtuosimedia.com
* @version 1.0
* @copyright Copyright (c) 2012, Virtuosi Media
* @license: MIT License
* @description: Creates a social share widget
* Requirements: MooTools 1.4 Core - See http://mootools.net
*/
var Social = new Class({
Implements: [Events,... |
/*
Proof
JavaScript
Weather web application
Author: Jonathan Milam Walters
Date: 04 May 2016
Filename: scriptJSONP.js
*/
// interpret contents in strict mode
"use strict";
// global variables
var selectedCity = "Tucson, AZ";
var weatherReport;
// use to track if existing... |
import {axisBottom, axisLeft, axisRight} from 'd3-axis';
import {scaleLinear, scaleOrdinal} from 'd3-scale';
import {stack} from 'd3-shape';
import {transition} from 'd3-transition';
// workaround for event
import * as d3sel from 'd3-selection';
// test d3 version Map d3v4
/* global d3:true */
let d4 = {};
if (d3 === ... |
import { createStore, combineReducers } from 'redux';
import { expect } from 'chai';
import { createFormReducer, validator } from '../src';
import { createModelValidator, isRequired } from '../src/validate';
import * as actions from '../src/actions';
describe('react-redux-reformed', () => {
describe('createFormRed... |
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var jade = require('gulp-jade');
var minifyCss = require('gulp-minify-css');
gulp.task('jade', function() {
gulp.src('./views/index.jade')
.pipe(jade())
.pipe(gulp.dest('./'))
});
gulp.task('sass', function () {
gulp.src('./sty... |
import Cookies from 'js-cookie';
import { getParameterValues } from '~/lib/utils/url_utility';
import bp from '~/breakpoints';
import { parseBoolean } from '~/lib/utils/common_utils';
import { INLINE_DIFF_VIEW_TYPE, DIFF_VIEW_COOKIE_NAME, MR_TREE_SHOW_KEY } from '../../constants';
const viewTypeFromQueryString = getPa... |
var data = {
wendigo: 'Burn it to death',
vampire: 'Behead it with a machete',
shapeshifter: 'Silver knife or bullet to the heart',
angel: 'Use the angelic blade',
demon: 'Use Ruby\'s knife, or some Jesus-juice',
ghost: 'Salt and iron, and don\'t forget to burn the corpse',
dragon: 'You have to find the excalibu... |
// Load required packages
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
// Define our user schema
var UserSchema = new mongoose.Schema({
username: {
type: String,
unique: true,
required: true
},
password: {
type: String,
required: true
}
});
// Execute before e... |
// Copyright (c) 2014-2015 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file.
"use strict";
var assert = require("./util/assert.js");
var reset = require("./__reset.js");
var Assertable = require("./assertable.js");
var QElement = require("./q_element.js");
var ElementEdge = require("... |
import React, { Component } from 'react';
var echarts = require('echarts/lib/echarts');
require('echarts/lib/chart/bar');
require('echarts/lib/component/tooltip');
require('echarts/lib/component/title');
export class PieReact extends React.Component {
constructor(props) {
super(props);
this.setPie... |
var express = require("express");
var app = express();
var Wemo = require("wemo");
var _ = require("lodash");
var client = Wemo.Search();
var devices = [];
client.on('found', function (device) {
console.log("Device found : " + device.friendlyName);
var isDeviceRegistered = !!devices.find(function (registeredDe... |
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'hu', {
button: 'Illeszd be a kódtöredéket',
codeContents: 'Kód tartalom',
emptySnippetError: 'A kódtöredé... |
import Phaser from 'phaser'
export default class HpBars {
constructor (game) {
this.game = game
this.init()
}
init () {
this.hpBarOverUnitWidth = 25
this.hpBarOverUnitHeight = 3
this.hpBarOnScreenWidth = 747
this.hpBarOnScreenHeight = 9
this.hpBarO... |
import passport from 'passport';
import { Strategy as LocalStrategy } from 'passport-local';
import User from './models/user';
let config = function () {
passport.use('local', new LocalStrategy(
(username, password, done) => {
User.findOne({ userName: username })
.exec()
... |
import React from "react";
import PropTypes from "prop-types";
import Helmet from "react-helmet";
import { siteMetadata } from "../../gatsby-config";
const TemplateWrapper = ({ children }) => (
<div>
<Helmet>
<meta name="author" description={siteMetadata.author} />
<link
rel="stylesheet"
... |
'use strict';
module.exports = {
version: '1.2.3',
};
|
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP AG or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
jQuery.sap.declare("sap.m.FacetFilterList");jQuery.sap.require("sap.m.library");jQuery.sap.require("sap.m.List");sap.m.Lis... |
import * as console from "./console";
import * as list from "./list";
import * as _async from "./async";
import { assert } from "./assert";
// TODO a tiny bit hacky
const performance = window["performance"];
const nth_root = (x, i) => {
if (x < 0) {
return NaN;
} else {
return Math["pow"](x, 1 / i);
}... |
const $ = require('../');
const assert = require('assert');
$.import('Foundation');
var success = false;
var appSchema = $.NSURLProtocol.extend('URLAppSchema');
// methodsd on the class
appSchema.addClassMethod('canInitWithRequest:', 'c@:@', function(self, cmd, theRequest) {
success = true;
return $.NO;
});
... |
import React, { useState, useEffect } from 'react';
import AceEditor from "react-ace";
import "brace/mode/json";
import {editorStyleProps} from './EditorViewer';
const JSONEditor = ({
json,
onJSONChange,
}) => {
const [value, setValue] = useState(JSON.stringify(json, null, 2));
useEffect(() => {
setValue(J... |
module.exports = function (_, Backbone, Models) {
'use strict';
var Views = {};
Views.Index = Backbone.View.extend({
el: '#content',
template: require('../templates/index.handlebars'),
initialize: function() {
this.colors = new Models.Colors();
this.colors.fetch({ success: _.bind(this.re... |
import check from "check-arg-types";
import partial from "@wasmuth/partial";
export default function where(key, val, obj) {
if (arguments.length < 3) return partial(where, arguments);
check(Array.prototype.slice.call(arguments, 0, 3), [
"string",
"-any",
"object",
]);
return obj[key] === val;
}
|
/*!
Copyright (C) 2013 by WebReflection
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 use, copy, modify, merge, publish, distribut... |
import { declare } from "@babel/helper-plugin-utils";
import syntaxLogicalAssignmentOperators from "@babel/plugin-syntax-logical-assignment-operators";
import { types as t } from "@babel/core";
export default declare(api => {
api.assertVersion(7);
return {
name: "proposal-logical-assignment-operators",
in... |
/****************************************************
* RandomAnim
* http://eldub10.github.io/randomanim
* Copyright (c) 2015 Larry Wright
*
****************************************************/
(function($) {
$.fn.randomAnim = function(options, complete) {
var settings = $.extend({
duration: 10000,
... |
__history = [{"date":"Fri, 12 Jul 2013 08:56:51 GMT","sloc":9,"lloc":10,"functions":1,"deliveredBugs":0.0842050039155446,"maintainability":79.13807292434527,"lintErrors":4,"difficulty":6.5249999999999995}] |
var bcrypt = require('bcryptjs');
var Promise = require('bluebird');
module.exports = {
createHashPassword : (plainTextPassword) => {
return new Promise((resolve, reject) => {
bcrypt.hash(plainTextPassword, 10, (err, hash) => {
if (err) { return reject(err); };
resolve(hash);
});
... |
module.exports = {
// entry points into the app
entry: {
// this will be output to app/bundle.js
bundle: './manifest.js',
// These are nodeJS require/import strings, and will be bundled if installed with npm to vendor.js
vendor: ['angular', 'angular-ui-router', 'angular-loader']
},
// generate s... |
// Copyright (c) 2015 Uber Technologies, Inc.
//
// 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 use, copy, modify, merge... |
/**
* @author: Qi
* @date: 2017-11-22
* @file: mip-html-ajax.js
*/
define(function (require) {
var customElem = require('customElement').create();
var $ = require('zepto');
var viewPort = require('viewport');
var util = require('util');
var platform = util.platform;
var theOs = platform.isA... |
/**
* @ngdoc module
* @name material.components.panel
*/
angular
.module('material.components.panel', [
'material.core',
'material.components.backdrop'
])
.service('$mdPanel', MdPanelService);
/*****************************************************************************
* ... |
/* This script generates mock data for development.
This way you don't have to point to an actual API,
but you can enjoy realistic, but randomized data,
and rapid page loads due to local, static data.
*/
/* eslint-disable no-console */
import jsf from 'json-schema-faker';
import { schema } from './mockDataSchema';
im... |
global.XMLHttpRequest = require('xhr2');
const RemoteStorage = require('./src/remotestorage.js');
module.exports = RemoteStorage;
|
define(["angular", "common/http_interceptor/files/factory"], function(angular, factory) {
"use strict";
var HttpInterceptor = angular.module("ngJS.http.interceptor", []);
HttpInterceptor.factory("HttpInterceptor", factory);
return HttpInterceptor;
});
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _c... |
/* eslint-env mocha */
/* eslint-disable no-unused-expressions */
import { expect } from 'chai';
import ActionTypes from '../../constants/ActionTypes';
import users from '../users';
describe('reducerMaps/users', () => {
describe('USER_PATCHED', () => {
let beforeState;
let afterState;
beforeEach(() => {... |
'use strict';
/**
* Important! Set the environment to test
*/
process.env.NODE_ENV = 'test';
var chai = require('chai');
var should = chai.should();
var config = require('../../config/environments/test');
describe('User model', function() {
var mongoose;
var User;
var _user;
var newUserData = {
email: ... |
var _ = require('lodash'),
gulp = require('gulp'),
clean = require('./src/gulp/tasks/clean'),
buildBookmarklets = require('./src/gulp/tasks/build-bookmarklets'),
buildLauncher = require('./src/gulp/tasks/build-launcher'),
transformContent = require('./src/gulp/tasks/transform-content'),
copyStat... |
angular.module( 'prosAndConsService', [] )
.service( 'prosAndConsService', function(localStorageService) {
return {
/**
* Creates a new pros and cons entry into the localstorage
* @param Array pros
* @param Array cons
* @return Boolean Create success or failure
*/
create: fun... |
UI.once('init', function(){
var UI = this
, messages = new MessageList()
, newline = Util.Text.newlineMatcher
, last_line = null
, msgs = [];
// Clicking on username appends @username to the input
$('#message_list').click(function(e){
var name = $(e.target).data('data-uname');
if(name){
var inpu... |
/*
* grunt-github-tags
* https://github.com/ajself/grunt-github-tags
*
* Copyright (c) 2013 AJ Self
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
... |
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
* in FIPS PUB 180-1
* Version 2.1a Copyright Paul Johnston 2000 - 2002.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for details.
*/
/* js... |
/*
* ChatLoadMore Messages
*
* This contains all the text for the ChatLoadMore component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.components.ChatLoadMore.header',
defaultMessage: 'This is the ChatLoadMore component !',
},
});
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2014 imwhiskas@gmail.com, hugo.kelfani@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 withou... |
export default {
storeUser (state, { user }) {
state.id = user.id;
state.login = true;
state.user = user;
}
} |
KISSY.add("cyclic/a", function (S, require, exports) {
var b = require('./b');
exports.a = 'a';
exports.get = function () {
return b.get()+this.a;
}
}); |
var store = require('../store.js');
var job = store.job;
var tasks = store.tasks;
exports.set = function(req, res) {
var task_id = req.params.task_id;
var data = req.body;
res.json(store.save_result(task_id, data));
};
exports.show = function(req, res) {
var task_id = req.params.task_id;
var result = job.... |
'use strict';
var Counter = require('./domain/services/Counter');
var Greeting = require('./domain/services/Greeting');
var UserRepo = require('./dao/UserRepo');
module.exports = [
require('./dao/db'),
{
register: function(app) {
app.set('repo.user', function(app, callback) {
... |
/**
* Created by eli on 07.01.16.
*/
$(document).ready(function(){
run();
createStyle();
});
function run(){
world.turn();
//$('#world-plan').text(world.toString());
drowWorld();
//console.log(world.grid.getAllCritters());
setTimeout(function(){
run();
}, 300);
}
functio... |
'use strict'
module.exports = function (grunt) {
var node = grunt.option('node') || process.env.nodejs_version || process.env.TRAVIS_NODE_VERSION || ''
var platform = grunt.option('platform') || process.env.PLATFORM || process.env.TRAVIS ? 'x64' : ''
var os = grunt.option('os') || process.env.APPVEYOR ? 'windows... |
/*Klendathu.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'http://localhost:1337',
namespace: 'eventbus'
});
Klendathu.ApplicationRoute = Ember.Route.extend({
setupController : function(controller, model){
var store = this.get('store');
Klendathu.eb.send('cards.find',... |
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import CollapsibleFormSnippet from '../CollapsibleFormSnippet';
describe('<CollapsibleFormSnippet />', () => {
it('should contain the child label', () => {
const wrapper = shallow(
<CollapsibleFormSnippet label="label">
... |
/**
* Truncate the sqlite db
*
* Removes all data from relevant tables in the associated sqlite database.
*
* The `opts` options hash can be used to pass configuration options valid
* options include:
*
* - `dbfile`: A string. Where the sqlite data file is located.
*
* Pass a callback function `cb... |
/*
* Copied from https://github.com/alphagov/govuk_frontend_toolkit/blob/master/javascripts/govuk/analytics/analytics.js
* Also see https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/analytics.md
*/
(function (global) {
'use strict'
var GOVUK = global.GOVUK || {}
var EMAIL_PATTERN = /[^\s=/?... |
/*globals MySystem */
sc_require('models/node');
MySystem.Node.FIXTURES = [
{
"guid": "1",
"image": sc_static('resources/clay_red_tn.png'),
"title": "A Node",
"transformer": false,
"inLinks": [],
"outLinks": [
"link1",
"link2"
],
"x": 160,
"y": 160,
"nodeType": "030454f0-b92c-11e0-a4dd-08... |
var basename = require('path').basename;
var debug = require('debug')('metalsmith-markdown');
var dirname = require('path').dirname;
var extname = require('path').extname;
var join = require('path').join;
var marked = require('marked');
/**
* Check if a `file` is markdown.
*
* @param {String} file
* @return {Boole... |
window.viewControllers = window.viewControllers || {};
(function(namespace){
namespace.itemViewController = function(options){
this.modalViewController = options.modalViewController;
}
var proto = namespace.itemViewController.prototype;
proto.initlializeFromData = function(itemData){
var self = t... |
function Grid(size, previousState, value_jpg_refs) {
this.isMaravillas = 1;
this.size = size;
this.cells = previousState ? this.fromState(previousState) : this.empty();
if (value_jpg_refs) {
this.value_jpg_refs = value_jpg_refs
}
else {
this.value_jpg_refs = {}
this.value_jpg_refs[-11] = 9... |
export const name = "Point Reflection";
export const L = 4;
export const E = 5;
export const V = 1;
|
angular
.module('app')
.factory('SectorService', function($http) {
var service = {};
service.getAll = function(success, error){
$http.get('/api/sectors').then(success, error);
};
service.save = function(sector, success, error){
$http.post('/api/sectors', sector).then(success, error);
... |
var mapProperty = function() {
var center;
var zoomLevel;
var stations;
var newStations = [];
return {
center,
zoomLevel,
stations,
newStations
}
}();
var map;
function initMap() {
var markers = [];
var centerPoint = mapProperty.center;
var zoomLe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.