code stringlengths 2 1.05M |
|---|
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use strict... |
loadIonicon('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M160 64h16v54h-16zM16 208h55v16H16zM59.5 117.4l11-11.1 31.4 31.5-11 11.1zM239.4 147.9l-11-11.1 31.3-31.5 11.1 11.1zM72.5 320.7l-11-11.1 31.4-31.5 11 11.1zM165 138.3c-40.5 0-73.3 32.8-73.3 73.3 0 36.8 27.1 67.3 62.5 72.5 0 0-1.2-42.9 18.... |
loadIonicon('<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M186.3 339.893L96 249.46 64 279.97 186.3 402 448 140.506 416 110z"/></svg>','md-checkmark'); |
'use strict';
var expect = require('chai').expect;
var fs = require('fs');
/*
Assert that a file does not exist, for ensuring certain files aren't generated
@method assertFileToNotExist
@param {String} pathToCheck
*/
module.exports = function assertFileToNotExist(pathToCheck) {
var exists;
try {
ex... |
/**
* Globalize v1.1.1
*
* http://github.com/jquery/globalize
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-02-04T12:01Z
*/
/*!
* Globalize v1.1.1 2016-02-04T12:01Z Released under the MIT license
* http://git.io/TrdQbw
*/
... |
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.14.0
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files... |
angular.module('gettext', []);
angular.module('gettext').constant('gettext', function (str) {
/*
* Does nothing, simply returns the input string.
*
* This function serves as a marker for `grunt-angular-gettext` to know that
* this string should be extracted for translations.
*/
return ... |
({x(eval){"use strict";}}) |
var Document = require('../document');
var PromiseProvider = require('../promise_provider');
module.exports = Subdocument;
/**
* Subdocument constructor.
*
* @inherits Document
* @api private
*/
function Subdocument(value, fields) {
this.$isSingleNested = true;
Document.call(this, value, fields);
}
Subdocu... |
angular.module('MyApp')
.directive('passwordMatch', function() {
return {
require: 'ngModel',
scope: {
otherModelValue: '=passwordMatch'
},
link: function(scope, element, attributes, ngModel) {
ngModel.$validators.compareTo = function(modelValue) {
return modelVal... |
/* http://keith-wood.name/countdown.html
Icelandic initialisation for the jQuery countdown extension
Written by Róbert K. L. */
(function($) {
$.countdown.regionalOptions['is'] = {
labels: ['Ár', 'Mánuðir', 'Vikur', 'Dagar', 'Klukkustundir', 'Mínútur', 'Sekúndur'],
labels1: ['Ár', 'Mánuður', 'Vika', 'Dagur'... |
/**
* ImageTools.js
*
* Released under LGPL License.
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*
* Some of the matrix calculations and constants are from the EaselJS library released under MIT:
* ht... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var Template = require("./Template");
var BasicEvaluatedExpression = require("./BasicEvaluatedExpression");
var ModuleHotAcceptDependency = require("./dependencies/ModuleHotAcceptDependency");
var ModuleHotDecline... |
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
/**
* @requires OpenLayers/Layer/Grid.js
*/
/**
* Class: OpenL... |
// Copyright 2011 The Closure Library Authors. All Rights Reserved.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requ... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* JS version of browser APIs. This library can only run in the browser.
*/
var win = typeof window !== 'undefin... |
const green = {
50: '#e8f5e9',
100: '#c8e6c9',
200: '#a5d6a7',
300: '#81c784',
400: '#66bb6a',
500: '#4caf50',
600: '#43a047',
700: '#388e3c',
800: '#2e7d32',
900: '#1b5e20',
A100: '#b9f6ca',
A200: '#69f0ae',
A400: '#00e676',
A700: '#00c853'
};
export default green; |
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICU... |
( function( window, settings ) {
function wpEmoji() {
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
// Compression and maintain local scope
document = window.document,
// Private
twemoji, timer,
loaded = false,
count = 0,
ie11 = window... |
// Simple Set Clipboard System
// Author: Joseph Huckaby
var ZeroClipboard_TableTools={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addCla... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"dimanche",
"lu... |
YUI.add('tree-sortable', function (Y, NAME) {
/*jshint expr:true, onevar:false */
/**
Extension for `Tree` that makes nodes sortable.
@module tree
@submodule tree-sortable
@main tree-sortable
**/
/**
Extension for `Tree` that makes nodes sortable.
@class Tree.Sortable
@constructor
@param {Object} [config] Configur... |
/*!
* Parsleyjs
* Guillaume Potier - <guillaume@wisembly.com>
* Version 2.2.0-rc1 - built Sun Aug 16 2015 14:04:07
* MIT Licensed
*
*/
!(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module depending on jQuery.
define(['jquery'], factory);
} else if ... |
var stream = require('stream')
var pump = require('./index')
var rs = new stream.Readable()
var ws = new stream.Writable()
rs._read = function (size) {
this.push(Buffer(size).fill('abc'))
}
ws._write = function (chunk, encoding, cb) {
setTimeout(function () {
cb()
}, 100)
}
var toHex = function () {
var... |
/*!
* Qoopido.js library v3.6.1, 2015-2-5
* https://github.com/dlueth/qoopido.js
* (c) 2015 Dirk Lueth
* Dual licensed under MIT and GPL
*/
!function(e){window.qoopido.register("polyfill/object/keys",e)}(function(){"use strict";return Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError("Object.ke... |
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlas... |
'use strict'
// TODO include in notation.js
const TexScalarDepvar=require('./tex-scalar-depvar')
const TexVectorDepvar=require('./tex-vector-depvar')
class TexVector2Depvar extends TexVectorDepvar {
_(...ii) {
return new TexVector2Depvar(this.X,this.x,[...this.subscripts,...ii])
}
restDiffComponentExpressionCon... |
require('ispeak/controllers/url');
App.ChangeButton = Ember.View.extend({
tagName: 'button',
classNames: ['btn','addurl'],
classNameBindings: ['btn'],
urlBinding: 'controller.controllers.urlController.url',
isActive: function() {
var pages = this.get('pages');
for(page in pages) {
if(pages[page... |
import React from 'react'
import styled from 'styled-components'
import LazyLoad from 'react-lazyload'
import manifest from '../data/manifest'
// import Zooming from 'zooming'
import Imgix from 'react-imgix'
import Metadata from './Metadata'
import Flexlist from '../utils/Flexlist'
import Gutters from '../utils/Gutters... |
import mod103 from './mod103';
var value=mod103+1;
export default value;
|
const {Generator} = Musika
const F = 79 // Base frequency
const DF = 4 // Beat frequency
const A = Math.SQRT1_2 // Amplitude
const oscL = Generator.Sin(), oscR = Generator.Sin()
return t => [oscL(F, t) * A, oscR(F + DF, t) * A]
|
/**
* Bundles arrow, decal and line sprite into a single display object.
*/
export default class EdgeGraphic extends PIXI.Container {
/**
* @param {DisplayObject} arrow
* The arrow sprite.
*
* @param {DisplayObject} decal
* The decal sprite.
*
* @param {DisplayObject} line
... |
export const DESTINATION = 'DESTINATION';
export const DESTINATION_CLEAR = 'DESTINATION_CLEAR';
export const DESTINATION_QUERY = 'DESTINATION_QUERY';
export const DESTINATION_FROM_COORDINATES = 'DESTINATION_FROM_COORDINATES';
export const DIRECTIONS = 'DIRECTIONS';
export const DIRECTIONS_PROFILE = 'DIRECTIONS_PROFILE'... |
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@mapbox/react-native-mapbox-gl';
import sheet from '../styles/sheet';
import BaseExamplePropTypes from './common/BaseExamplePropTypes';
import Page from './common/Page';
import Bubble from './common/Bubble';
class UserLocationChange ... |
'use strict'
import m from 'mithril'
import R from 'ramda'
import util from './util'
import { $add, $update, $rm, promisify } from './util'
import flyd from 'flyd'
import dom from './dom'
const types = ['success', 'info', 'error', 'warn']
const convert = R.converge(R.zipObj, [R.nthArg(1), R.map])
let animateOnRemove... |
// Returns an array of indices where item is found in the array.
// Like array/indexOf it does loop over sparse items in the array.
// The optional fromIndex parameter can limit the scope, the same way as it does in indexOf.
/*
var items = ['lorem', 'ipsum', 'foo', 'ipsum', 'ipsum'];
indicesOf(items, 'ipsum')... |
var express = require('express');
var app = express();
app.use(express.static(__dirname + '/../public'));
app.listen(3000); |
import ansi from 'ansi-styles';
import { styleToHexColor, formatRecordToString } from 'nightingale-formatter';
var ansiStyles = {
black: ansi.black,
red: ansi.red,
green: ansi.green,
yellow: ansi.yellow,
blue: ansi.blue,
magenta: ansi.magenta,
cyan: ansi.cyan,
white: ansi.white,
gray: ansi.gray,
bg... |
const { ICUParser, getKeywordOrder } = require("..")
class CocoaStringGenerator extends ICUParser {
onBasicArgument(element) {
const { id } = element
if (id) {
this.push(`%${this.order[this.k].indexOf(element.id) + 1}$@`)
} else {
this.push(element.value)
}
}
onMessageText(element) ... |
"use strict";
var ImageLoader;
/**
* Utility for loading images of tiles, buildings and units and providing info
* about loading progress. If the tiles', buildings' or units' images are not
* pre-rotated, this utility will auto-rotate them.
*/
ImageLoader = function () {
var loadBuildingImages, notifyObservers... |
#!/usr/bin/env node
var minimist = require( 'minimist' ),
showHelp = require( './showHelp' ),
command,
sorcery = require( '../' );
command = minimist( process.argv.slice( 2 ), {
alias: {
i: 'input',
o: 'output',
v: 'version',
h: 'help',
d: 'datauri',
x: 'exclude'
}
});
if ( command.help ) {
showHel... |
'use strict'
let cli = require('heroku-cli-util')
let co = require('co')
function * run (context, heroku) {
let favorites = yield heroku.request({host: 'longboard.heroku.com', path: '/favorites?type=app', headers: {Range: ''}})
if (context.flags.json) {
cli.styledJSON(favorites)
} else {
cli.styledHead... |
"use strict";
module.exports = function (db, cb) {
db.load('./models', function (err) {
cb(err);
});
};
|
module.exports = {
entry: './main.jsx',
output: {
filename: 'bundle.js'
},
module: {
loaders:[
{
test: /\.js[x]?$/,
exclude: /node_modules/,
loader: 'babel-loader?presets[]=es2015&presets[]=react'
}
]
}
} |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { PropTypes } from 'react';
import withStyle... |
"use strict";
const gulp = require('gulp');
const config = require('../config');
const sourcemaps = require('gulp-sourcemaps');
const uglify = require('gulp-uglify');
const concat = require('gulp-concat');
const rename = require('gulp-rename');
const notify = require('gulp-notify');
const plumber = require('gulp-plum... |
var eventListeners = [];
function addEventListener(eventName, eventHandler) {
eventListeners.push({
eventName: eventName,
eventHandler: eventHandler
})
}
ROTATE_COUNT = 0;
ROTATE_INDEX = 0;
$(document).ready(function() {
//updateCashFlow();
initMessage();
//initRotator();
//... |
const Batches = require('./batches');
const ConnectionAccesses = require('./connection-accesses');
const ConnectionClients = require('./connection-clients');
const Connections = require('./connections');
const Queries = require('./queries');
const QueryHistory = require('./query-history');
const SchemaInfo = require('.... |
var classhryky_1_1thread_1_1callable_1_1_base =
[
[ "this_type", "classhryky_1_1thread_1_1callable_1_1_base.html#ad3922e54cf5990b08625fad40aae60b3", null ],
[ "Base", "classhryky_1_1thread_1_1callable_1_1_base.html#aeda337d4158d695451f0dabc9d88cf58", null ],
[ "~Base", "classhryky_1_1thread_1_1callable_1_1_... |
import React, { Component, PropTypes } from 'react';
import CSSClassnames from '../utils/CSSClassnames';
const CLASS_ROOT = CSSClassnames.HEADING;
export default class Heading extends Component {
render() {
let classes = [CLASS_ROOT];
if (this.props.size) {
classes.push(`${CLASS_ROOT}--${this.props.si... |
'use strict';
angular.module('GymApp')
.service('WorkoutService', function (WorkoutConfig, $q) {
this.deleteWorkout = function (workoutId) {
var deferred = $q.defer();
WorkoutConfig.one('/delete', workoutId).remove().then(function (response) {
//TODO: refre... |
/*jslint node: true*/
/*global describe, it*/
var should = require("should");
describe('server', function() {
"use strict";
describe('server side code', function() {
it('should not fail', function() {
var three = 3;
three.should.equal(3);
});
});
}); |
import React from 'react';
import { IndexRoute, Route } from 'react-router';
import hooks from './routerHooks';
import {
Root,
App,
Home,
Lunches,
Cooks,
About,
LoginSuccess,
NotFound,
LunchDetails,
AuthorizedApp,
TeamOffers,
TeamOfferShow,
TeamOrderShow,
AdminLun... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const RequireIncludeDependency = require("./RequireIncludeDependency");
const RequireIncludeDependencyParserPlugin = require("./RequireIncludeDependencyParserPlugin");
const ConstDependency = require("./Co... |
((bbn) => {
let script = document.createElement('script');
script.innerHTML = `<div :class="['bbn-overlay', componentClass]"
:style="{
gridTemplateColumns: columnsCfg,
gridTemplateRows: rowsCfg,
}"
@scroll.prevent.stop="preventScroll"
v-show="ready && panes.length"
>
<slot></slot>
... |
'use strict';
const _ = require('lodash');
const walk = require('walk');
const fs = require('fs');
const path = require('path');
const util = require('../util');
const chalk = require('chalk');
const indexer = {
// The remote index.
_remoteIndex: undefined,
// The JSON of the local doc index.
_localDocIndex... |
// JavaScript Variables and Objects
// I worked by myself on this challenge.
// __________________________________________
// Write your code below.
var secretNumber = 7;
var password = 'just open the door';
var allowedIn = false;
var members = ['John', 'Peter', 'Paul', 'Mary'];
// ________________________________... |
/*!
* jQuery Guide Plug-In
* http://github.com/tetsuwo/jquery-guide
*
* Copyright 2011, Tetsuwo OISHI
* Dual licensed under the MIT license.
*/
(function($) {
$.guide = function(s) {
var settings = {
name : 'guide',
appendTo : 'body',
index : 0,
is_stored : true,
... |
Template.studentsIndex.helpers({
});
Template.studentsIndex.events = {
'click #btnRemove': function(e) {
e.preventDefault();
if (confirm("Are you sure want to remove this data?"))
Router.current().remove(this._id);
},
/* sorting by parameter */
'click #btnSortname': function(e)... |
exports.renderStories = function (res, stories, title) {
var stats = this.generateStoryStateMap( stories );
res.render('stories/list-stories', {
title: title,
stories: stories,
totalPoints: stats.total,
notEstimated: stats.notEstimated,
stateMap: stats.stateMap
});
};
exports.generateStoryS... |
'use strict';
angular.module('core').controller('HomeController', ['$scope', 'Authentication',
'usersService', '$mdSidenav', '$mdBottomSheet', '$log',
function($scope, Authentication, usersService, $mdSidenav, $mdBottomSheet, $log) {
// This provides Authentication context.
$scope.authenticatio... |
var theCardsDao = require('../daos/CardsDao');
var theControllerHelper = require('../ControllerHelper');
var CardsController = function () {
'use strict';
this.getCard = function (pReq, pRes) {
var callback,
cardId;
cardId = pReq.params.cardId;
callback = theControllerHelpe... |
/**
* Created by private on 6.6.2015 ã..
*/
function Solve(params) {
var N = parseInt(params[0]), m,i, j,k,mask,maskAndI,bit, arrayOfNumbers = [],isPreviousOne,tempPosStartCounter,sum = 0,maxSum = -1000000000,posStartCounter,posEndCounter,tempCount;
var answer = 0;
for (m =0;m<N;m+=1){
arrayOfNumb... |
export const SET_IS_AUTH_MENU_OPEN = 'SET_IS_AUTH_MENU_OPEN'
export const SET_IS_MINI_MODE = 'SET_IS_MINI_MODE'
export const SET_IS_MENU_OPEN = 'SET_IS_MENU_OPEN'
export const SET_IS_MOBILE_MENU_OPEN = 'SET_IS_MOBILE_MENU_OPEN'
export const SET_IS_MINI_SWITCH_VISIBILITY = 'SET_IS_MINI_SWITCH_VISIBILITY'
|
function solve(args) {
var a = +args[0],
b = +args[1],
c = +args[2],
biggest = a;
if (biggest < b) {
biggest = b;
if (biggest < c) {
biggest = c;
}
}
if (biggest < c) {
biggest = c;
}
console.log(biggest);
} |
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 __decorate = (this && this.__decorate) || function (decora... |
Handlebars.registerHelper("formatTime", function(timestamp) {
return moment(timestamp).format('dd, HH:mm');
});
Handlebars.registerHelper("whenFromNow", function(timestamp) {
return moment(timestamp).from(TimeSync.serverTime());
});
|
var app = angular.module('app', []);
app.controller('appCtrl', function($scope) {
$scope.reset = function() {
$scope.base = '#D30000';
$scope.monotone = true;
$scope.secondary = undefined;
$scope.light = 1;
$scope.colorCount = 5;
$scope.colors = [];
};
$scope.reset();
function shadeBl... |
import { create } from '@storybook/theming/create';
import { addons } from '@storybook/addons';
addons.setConfig({
isFullscreen: false,
showAddonsPanel: true,
panelPosition: 'right',
theme: create({
base: 'light',
brandTitle: 'CRA Kitchen Sink',
brandUrl: 'https://github.com/storybookjs/storybook/t... |
import chai, {expect} from 'src/external/chai.js';
import sinon from 'src/external/sinon-3.2.1.js';
import sinonChai from 'src/external/sinon-chai.js';
chai.use(sinonChai);
import * as reflection from 'src/client/reflection.js';
function expectToInclude(hull, elements) {
elements.forEach(element => {
expect(hul... |
// flow-typed signature: 4141671bfdd617f9630037704a008788
// flow-typed version: 0f1bb24013/moment_v2.x.x/flow_>=v0.34.x
type moment$MomentOptions = {
y?: number|string,
year?: number|string,
years?: number|string,
M?: number|string,
month?: number|string,
months?: number|string,
d?: number|string,
day... |
import { Meteor } from 'meteor/meteor'
import { Tinytest } from 'meteor/tinytest'
Tinytest.addAsync('insert - Meteor.users collection document should have extra property added before being inserted and properly provide inserted _id in after hook', function (test, next) {
const collection = Meteor.users
const aspe... |
(function() {
var number;
number = 42;
}).call(this);
|
System.register(["angular2/core"], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwn... |
const Lists = ((tweetManager) => {
return {
update: () => {
const selector_value = "__chromedbird__selector__";
const update_value = "__chromedbird__update_lists__";
const options = [
`<option
value="${selector_value}"
data-list="${escape(JSON.stringify({id_str: sel... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, {PropTypes} from 'react';
import * as mdl... |
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
import VuexModelObject from 'vuex-model-template';
const store = new Vuex.Store({
strict: true,
state: {},
getters: {},
actions: {},
mutations: {},
modules: {}
});
VuexModelObject.use(store);
import 'example-app';
let domReady =... |
var grimm = angular.module('grimm', ['ngRoute'])
.constant('firebaseURL', 'https://grimm-6edf6.firebaseio.com');
firebase.initializeApp({
apiKey: 'AIzaSyCI5fY2pyhcTSQKAOFwv7XEz7kMhmV8x8U',
authDomain: 'grimm-6edf6.firebaseapp.com',
databaseURL: 'https://grimm-6edf6.firebaseio.com',
storageBucket: 'grimm-6edf... |
var server, isFinished;
var count = 0;
// var limit = NaN;
var limit = 250;
runTest();
setInterval(function() {
try {
if (isFinished) runTest();
} catch (e) {
console.log(e);
runTest();
}
}, 500);
function runTest() {
isFinished = false;
if (!isNaN(limit) && count >= limit) process.exit(0);
va... |
var extend = require('extend');
module.exports = function TrackerSetRequest() {
var category = 'tracker';
var request = 'set';
var values = {};
this.addValue = function (key, val) {
values[key] = val;
};
this.addValues = function (obj) {
extend(values, obj);
};
this.getMessage = function ()... |
/*
* Copyright (c) 2017. MIT-license for Jari Van Melckebeke
* Note that there was a lot of educational work in this project,
* this project was (or is) used for an assignment from Realdolmen in Belgium.
* Please just don't abuse my work
*/
define(function () {
// Italian
function ending (count, first, second... |
import AggTypesMetricsMetricAggTypeProvider from 'ui/agg_types/metrics/metric_agg_type';
export default function AggTypeMetricMinProvider(Private) {
let MetricAggType = Private(AggTypesMetricsMetricAggTypeProvider);
return new MetricAggType({
name: 'min',
title: 'Min',
makeLabel: function (aggConfig) ... |
test("clone", function() {
function CloneTestClass() {
this.x = 1;
}
var o = new CloneTestClass();
var o2 = Chess.Reflection.ClassReflection.clone(o);
ok(o2 instanceof CloneTestClass);
strictEqual(o2.x, o.x);
notStrictEqual(o2, o);
});
test("extend", function() {
function P... |
var parse = require('spdx-expression-parse')
var ranges = require('spdx-ranges')
var notALicenseIdentifier = ' is not a simple license identifier';
var rangeComparison = function(comparison) {
return function(first, second) {
var firstAST = parse(first);
if (!firstAST.hasOwnProperty('license')) {
thr... |
'use strict'
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var teamSchema = new Schema({
name: String,
city: String,
abbrev: String
});
var Team = mongoose.model('Team', teamSchema)
module.exports = Team; |
var toolkit = require('../index');
if (toolkit.init() != toolkit.INIT_SUCCESS) {
console.log("Failed to initialize toolkit.");
process.exit();
}
/* Create a new stage */
var stage = new toolkit.Stage();
stage.title = 'Texture';
stage.resize(500, 500);
stage.setColor(0, 0, 0, 255);
stage.on('destroy', function() {
... |
Access-Control-Allow-Credentials: true
|
import DS from "ember-data";
export default DS.JSONAPISerializer.extend({
}); |
import { Meteor } from 'meteor/meteor';
import angular from 'angular';
import template from './producer-box.ng.html';
function producerBoxController($scope, $reactive, $element, $window, $mdSidenav) {
'ngInject';
$reactive(this).attach($scope);
this.subscribe('producer', () => [this.getReactively('producerId')... |
'use strict';
module.exports = function (sequelize, getRefModel, Grant) {
const scopes = {};
scopes.withgrants = function () {
return {
include: [
{
model: Grant,
as: Grant.options.name.plural
}
]
};
};
/**
* Returns full subtree with grants populated
*
* @returns {*}
*/
scop... |
import test from 'ava';
import { ImplementationError } from '../lib/error';
import Mode from '../lib/utils/mode';
const errObj = {
type: ImplementationError.METHOD_MISSING,
mode: [Mode.STRICT, Mode.LOOSE],
signature: 'method1(foo, bar, baz)',
};
test('Generates an appropriate error string for a missing method'... |
var concat = require('gulp-concat');
gulp.task('plugins', function() {
return gulp.src('src/lib/vendor/*.js')
.pipe(concat('plugins.js'))
.pipe(gulp.dest('build/assets/js'));
});
|
function f() {
var result;
res = computeInterestingResult();
return result.value;
}
(function(_window) {
if (_window)
setupNode();
function parse() {
return uuid;
}
var uuid = parse;
uuid.v1 = v1;
})();
|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... |
const ApiBuilder = require('claudia-api-builder'),
api = new ApiBuilder();
module.exports = api;
api.registerAuthorizer('CognitoOauth2Auth', {
providerARNs: ['TEST-USER-POOL-ARN']
});
api.get('/', () => {
'use strict';
return 'setup ok';
});
api.get('/locked', () => {
'use strict';
return 'testing scopes';
},... |
/*
* grunt-jasmine-node
* https://github.com/omryn/grunt-simple-jasmine
*
* Copyright (c) 2014 Omry Nachman
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*... |
'use strict';
var config = require('./config.webgme'),
validateConfig = require('webgme/config/validator');
// Add/overwrite any additional settings here
// config.server.port = 8080;
// config.mongo.uri = 'mongodb://127.0.0.1:27017/webgme_my_app';
config.seedProjects.defaultProject = 'Example';
validateConfig(c... |
/*
* Menu model
*
* js/contrib/menu_model.js
*
* See:
* http://stackoverflow.com/questions/12908210/click-menu-item-to-highlight-in-backbone-view
*/
"use strict";
class MenuModelItem extends Backbone.Model {
get defaults() {
return {
title: 'Default Title',
isSelected: false
};
}
};
... |
version https://git-lfs.github.com/spec/v1
oid sha256:e160b4e7d6b36283e0c46a2b9941f8eb2564010f3e0a8a36dc0b5e9a0010f336
size 7670
|
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.PointerLockControls = function ( camera ) {
var scope = this;
camera.rotation.set( 0, 0, 0 );
var pitchObject = new THREE.Object3D();
pitchObject.add( camera );
var yawObject = new THREE.Object3D();
yawObject.position.y = 10;
yawObject.add( pitchObject );... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.