code stringlengths 2 1.05M |
|---|
module.exports = {
name : "Endless Terrain",
description : "An ever-repeating environment",
order : 0,
config : {
camera : {
x : 0,
z: 500,
near : 0.1,
fov : 40
}
},
components : {
renderer : { function : require('../js/renderers/effects-renderer') },
restrictedCamera : {
construct: require... |
import React from 'react'
import Group from './Group'
export default class Artboard extends Group {
render() {
let {style, ...props} = this.props;
return <Group
style={ {
...style,
background: this.props.model.hasBackgroundColor ? this.props.model.backgroundColor.toString() : undef... |
/**
* # Game stages definition file
* Copyright(c) {YEAR} {AUTHOR} <{AUTHOR_EMAIL}>
* MIT Licensed
*
* Stages are defined using the stager API
*
* http://www.nodegame.org
* ---
*/
module.exports = function(treatmentName, settings, stager, setup, gameRoom) {
stager
.stage('instructions')
... |
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ListView,
Image,
NavigatorIOS
} from 'react-native';
import Sidebar from 'react-native-sidebar';
var array;
var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
class menuNavigator extends Compon... |
System.register([],function(e,t){"use strict";t&&t.id;return{setters:[],execute:function(){}}});
//# sourceMappingURL=GameMenu.js.map
|
angular.module('vitae')
.directive('vitaePhone', function () {
return {
restrict: 'E',
template: '<img src="images/glyphicons_163_iphone.png" height=16/> {{phone}}',
scope: {
phone: '='
},
controller: function () {
t... |
var Shell = function(scene, layer, game){
this.scene = scene;
this.layer = layer;
this.game = game;
this.setDom();
this.size(4, 4);
this.setColor('#fff');
return this;
};
Shell.prototype = new sjs.Sprite();
Shell.prototype.constructor = Shell;
Shell.prototype.paramsFromMessage = function paramsFromMe... |
import Ember from 'ember';
const {
Route
} = Ember;
export default Route.extend({
model({letter}) {
return letter;
}
});
|
'use strict';
describe('Controller: BookrCtrl', function () {
// load the controller's module
beforeEach(module('shoprApp'));
var BookrCtrl, scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
BookrCtrl = $controlle... |
module.exports = function(req, res, next) {
if(!req.session.user.userName){
res.sendData({}, 'notLogin');
return ;
}
next();//调用下一filter或controller
}; |
const pdf2text = require('../lib/pdf-parser.js');
const download = require('download-file');
const DateFns = require('date-fns');
function downloadFile(url, options) {
return new Promise((resolve, reject) => {
download(url, options, function (err) {
if (err) reject(err);
resolve();
})
})
}
... |
/**
* Configuration
*/
export default {
name: 'likely',
prefix: 'likely__',
};
|
'use strict';
var path = require('path');
var packageName = require('../package').name;
var pack = require('../');
var util = require('./_util.js');
// the dummy configFile
process.argv[1] = 'test/gulpfile';
describe(packageName, function(){
util.testSuite().forEach(function(file){
var suite = path.basename(... |
export default (array, propName) => {
const unique = new Set()
return array.filter((item) => {
if (unique.has(item[propName])) return false
unique.add(item[propName])
return true
})
}
|
var gulp = require('gulp');
gulp.task('dev', ['compile-style', 'compile-js', 'copy-html', 'copy-images']);
|
/*
Copyright (c) 2011, Chris Umbel
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, distribute, su... |
var db = require('mongoose');
db.connect('mongodb://localhost:27017/mydb');
var citySchema = new db.Schema({
id: String,
name: {type: String, required: true, unique: true},
image: String,
description: String
});
module.exports = db.model('city', citySchema); |
'use strict';
var mongoose = require('mongoose-bird')(),
Schema = mongoose.Schema,
Promise = require("bluebird"),
ItemSchema = new Schema({
name: { type: String, required: true },
dateTime: Date,
hours: Number,
groupHours: Number,
groupHoursUpdateState: Number,
workStre... |
(function() {
'use strict';
angular.module('sigStickyHeader', [])
.directive('sigStickyHeader', SigStickyHeader);
function SigStickyHeader() {
var directive;
function link(scope, element, attributes) {
var originalProperties = element.css(['position', 'top', 'left', 'zI... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define(["require","exports"],function(a,b){return function(){if("undefined"!==typeof global)return global;if("undefined"!==typeof window)return window;if("undefined... |
function updateHaplo(id, data) {
var margin = {'top': 20, 'bottom': 10, 'left': 40, 'right': 40},
width = $('#'+id).width() - margin.left - margin.right,
height = $('#'+id).height() - margin.top - margin.bottom;
var svg = d3.select("#"+id),
vis = svg.append("g")
.attr("id", "... |
/*
* grunt-ordered-concat
* http://gruntjs.com/
*
* Copyright (c) 2016 SoloVid, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Internal lib.
var comment = require('./lib/comment').init(grunt);
var chalk = require('chalk');
var sourcemap = require('./lib/... |
initSidebarItems({"enum":[["Order",""]],"fn":[["convert_i8_to_order","Convert an int to an Order"],["read_i16","Read two bytes from a file/serial port and convert it to a 16 bits int"],["read_i32","Read four bytes from a file/serial port and convert it to a 32 bits int"],["read_i8","Read one byte from a file/serial por... |
import React, { Component, PropTypes } from 'react';
import { ListView, RefreshControl } from 'react-native';
import DigiError from '../../common/DigiError';
import OrganizationsRow from './OrganizationsRow';
import tumbeastNetwork from '../../common/img/tumbeast-network.png';
import tumbeastSitting from '../../comm... |
(function () {
'use strict';
var next,
walk = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null, false);
function fadeOut(el, callback){
el.style.opacity = 1;
(function fade() {
if ((el.style.opacity -= .1) < 0) {
el.style.display = 'n... |
/**
* Copyright (c) 2017-present, Ben Archer
* All rights reserved.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import Router from './src/router.component';
import Route from './src/route.component';
export {
Route... |
(function () {
'use strict';
/**
* Register the list controller as UserListController
*/
angular
.module('<%= scriptAppName %>.admin.user.list')
.controller('UserListController', UserListController);
// add UserListController dependencies to inject
UserListController.$inject = ['users', '$stat... |
module.exports =
[
{ author: "Pete Hunt", text: "This is one comment"},
{ author: "A B", text: "This is *another* comment"},
{ author: "Jonny Walker", text: "Wiskey"}
];
|
'use strict';
Blockly.CSharp.variables = {};
Blockly.CSharp['variables_get'] = function() {
// Variable getter.
var code = Blockly.CSharp.variableDB_.getName(this.getTitleValue('VAR'),
Blockly.Variables.NAME_TYPE);
return [code, Blockly.CSharp.ORDER_ATOMIC];
};
Blockly.CSharp['variables_set'] = function(... |
var FFA = require('./FFA'); // Base gamemode
var Cell = require('../entity/Cell');
var Food = require('../entity/Food');
var Virus = require('../entity/Virus');
var Vector = require('../modules/Vector');
var VirusFeed = require('../entity/Virus').prototype.feed;
function Experimental() {
FFA.apply(this, Array.prot... |
/*!
* bootstrap-fileinput v5.1.2
* http://plugins.krajee.com/file-input
*
* Glyphicon (default) theme configuration for bootstrap-fileinput.
*
* Author: Kartik Visweswaran
* Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD-3-Clause
* https://github.com/kartik-v/bootstrap-filei... |
import React, { Component } from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {showModal} from 'redux/modules/modal';
@connect (
state => ({
modalVisible: state.modalVisible
}),
dispatch => bindActionCreators({showModal},dispatch))
export default class Logo extend... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var common_1 = require("@angular/common");
require("rxjs/add/observable/fromEvent");
var components_1 = require("./components");
var directives_1 = require("./directives");
var services_1 = require("./ser... |
import "babel-polyfill";
import chai from "chai";
const assert = chai.assert;
import cq, { NodeTypes } from "../src/index";
function lines(str, startLine, endLine) {
return str
.split("\n")
.slice(startLine, endLine + 1)
.join("\n");
}
describe("typescript", () => {
describe("top level functions", () ... |
Ext.define('Rally.example.CustomList', {
extend: 'Rally.data.lookback.calculator.TimeSeriesCalculator',
config: {
completedScheduleStateNames: ['Accepted']
},
constructor: function(config) {
this.initConfig(config);
this.callParent(arguments);
},
getDerivedFieldsOnInput: ... |
'use strict';
const mongoose = require('mongoose');
const profileSchema = mongoose.Schema({
userName:{ type: String, required: true },
userID:{ type: mongoose.Schema.Types.ObjectId, required: true },
trades:{ type: mongoose.Schema.Types.ObjectId },
profilePic:{ type: String },
inbox:{ type: String },
outb... |
Vue.component('employee-departments-list', require('./components/EmployeeDepartmentsList'));
new Vue({
el: '#employeeDepartmentsList'
}); |
'use strict';
var jDataView = require('jdataview'),
Layer = require('./layer'),
COLOR_MODE = {gray: 1, rgb: 3};
/**
* PSD binary creator
* @param width {number} width of psd file
* @param height {number} height of psd file
* @param colorSpace {string} colorSpace name
* 'rgb'|'rgba'|'gray'|'graya' (deraul... |
exports.HttpPack = require('./lib/HttpPack').default;
exports.Database = require('./lib/Database').default;
exports.Protocol = require('./lib/Protocol'); |
/*
* Copyright (C) 2015 Christoph Kutza
*
* Please refer to the LICENSE file for license information
*/
describe("WebRtcNetworkTest", function() {
//tests most of WebRtcNetwork
//uses webrtc and relies on stun server thus might be slow
//or even time out. No way around without mocking webrtc
var lServer;
... |
import React from 'react'
import { Link } from 'react-router'
import Helpers from '../../utilities/Helpers'
export default class MovieInfo extends React.Component {
render () {
let genres = this.props.movie.genres.map(genre => {
return (
<strong key={this.props.movie._id + genre}>{ genre } </strong... |
import React from 'react'
import ReactDOM from 'react-dom';
import ShToast from '../src/sh-toast-service'
import '../node_modules/sh-core/bin/main.css';
import '../node_modules/sh-icons/bin/main.css';
import '../node_modules/sh-buttons/bin/main.css';
class App extends React.Component {
constructor(props) {
... |
define([
// Primary dependencies
'jquery'
,'underscore'
,'backbone'
,'events'
], function(
$
,_
,Backbone
,Eva
) {
var _remove = Backbone.View.prototype.remove;
Backbone.ModuleComposer = Backbone.View.extend({
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var ic_edit = exports.ic_edit = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.7... |
export default (from, to, step) => {
step = Math.abs(step);
step = step > 0 ? step : 1;
const deltas = {
r: (to.red() - from.red()) * step,
g: (to.green() - from.green()) * step,
b: (to.blue() - from.blue()) * step,
a: (to.alpha() - from.alpha()) * step
};
return from.clone().rgb({
r: fro... |
// this publication is used in config.js - FastRender config.
// it's necessary to send the current user together with the
// html to the users browser to speed up the load process and
// that the routing can react faster depending on
// the currentUser presence.
Meteor.publish('currentUser', function() {
return Mete... |
(function (schedulerProto) {
/**
* Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation.
* @param {Mixed} state Initial state passed to the action upon the first iteration.
... |
import {expect} from 'chai'
import PropTypesMixin2, {
PropTypes as PropTypes2
} from 'ember-prop-types'
import PropTypesMixin, {PropTypes} from 'ember-prop-types/mixins/prop-types'
import {describe, it} from 'mocha'
describe('Unit / index / ember-prop-types', function () {
it('should export PropTypesMixin as defau... |
function f_four(str) {
var cstack = [] // control stack
var cdict = // compile-time words -- note that these are not user-extensible
{ ':' :
function(dict, program, pc) {
var stop = program.indexOf(';', pc)
var name = program[pc+1]
var sub = program.slice(pc+2, stop)
... |
describe("printTreeAsc", function(root) {
var currNode;
it("test function printTreeAsc", function() {
currNode = true;
expect(currNode).toBe(true);
});
});
/* function printTreeAsc(root) {
var currNode = root;
if(currNode.left) {
printTreeAsc(currNode.left);
}
console.log(... |
import React, { Component } from 'react';
import GridPageContainer from '../../components/grid-page-container/GridPageContainer'
import HealthyRelationshipsIcon from '../../images/icons/sexualhealth/healthy-relationships.png'
import SafeSexIcon from '../../images/icons/sexualhealth/safe-sex.png'
import StisIcon from '.... |
import Vue from 'vue';
import store from '~/ide/stores';
import ide from '~/ide/components/ide.vue';
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import { file, resetStore } from '../helpers';
import { projectData } from '../mock_data';
function bootstrap(projData) {
const Comp... |
// use handlebars instead of underscore templates
Marionette.TemplateCache.prototype.compileTemplate = function (rawTemplate) {
return Handlebars.compile(rawTemplate);
};
// workaround for a handlebars issue
// compiled templates get an extra text node generated
// due to an apparent error. For more info:https... |
//# sourceMappingURL=games.js.map |
/**
* @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
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
(function($){
$.fn.fbmodal = function(options, callback){
var defaults = {
"title" : "弹出窗口",
"opacity" : 0.2,
"top" : "30%",
"width": "",
"height":"",
"close" : false
};
var options = $.extend(defaults, options);
var fbmodalHtml=
'<di... |
var Promise = require('pinkie');
var fs = require('fs');
var os = require('os');
var http = require('http');
var urlLib = require('url');
var request ... |
'use strict';
const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
if (!common.hasIPv6)
common.skip('IPv6 support required');
const initHooks = require('./init-hooks');
const verifyGraph = require('./verify-graph');
const tls = require('tls');
const fixtures = require('../co... |
'use strict';
function Token (type, content, attr) {
this.type = type;
this.content = content || '';
this.attr = attr || [];
}
Token.prototype.isText = function () {
return this.type === 'text';
};
Token.prototype.pushAttr = function (name, value) {
this.attr.push([ name, value ]);
};
modu... |
import React from 'react';
import { connect } from 'react-redux';
const NotFound = () => (
<div>
<h1>Not Found page</h1>
<p>Work in progress</p>
</div>
);
export default connect()(NotFound);
|
require('babel/polyfill');
var spawn = require('child_process').spawn;
var gulp = require('gulp');
var gutil = require('gulp-util');
var mocha = require('gulp-mocha');
var babel = require('gulp-babel');
var jshint = require('gulp-jshint');
gulp.task('default', ['build', 'test', 'lint']);
gulp.task('build', ['6to5']);
... |
<<<<<<< HEAD
<<<<<<< HEAD
// Just get the stats, and then don't do anything.
// You can't really "read" from a socket. You "connect" to it.
// Mostly, this is here so that reading a dir with a socket in it
// doesn't blow up.
module.exports = SocketReader
var fs = require("graceful-fs")
, fstream = require("../fst... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/tsSupport/generatorHelper ../../core/tsSupport/awa... |
"use strict";
ui.windowResize = function() {
// Be careful with changing this order:
return ui
.updimScreen()
.updimVideo()
.updimList()
.updimFilename()
.updimCanvas()
.updimSubtitles()
;
};
|
import FormatTime from '../../Disp/BeautifyAndFormatting/FormatTime';
import CalculateGrimoireRefillTime from '../../Disp/HelperFunctions/CalculateGrimoireRefillTime';
import {
BackupGrimoireDraw,
BackupGrimoireLaunch, // eslint-disable-line no-unused-vars
BackupGrimoireLaunchMod,
HasReplaceNativeGrimoireDraw,
... |
// an assert module that returns tappable data for each assertion.
var difflet = require('difflet')
, deepEqual = require('deep-equal')
, bufferEqual = require('buffer-equal')
, Buffer = require('buffer').Buffer
module.exports = assert
var syns = {}
, id = 1
function assert (ok, message, extra) {
if (extra... |
module.exports = function(grunt) {
// Load Grunt tasks declared in the package.json file
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
//example taken from: http://thecrumb.com/2014/03/15/using-grunt-for-live-reload/
grunt.initConfig({
//https://github.com/gruntjs/grunt... |
'use strict';
describe('travelspire.cards module', function() {
beforeEach(module('travelspire.cards'));
var scope, ctrl, $httpBackend;
describe('cards controller', function(){
it('should ....', inject(function(_$httpBackend_, $rootScope,$controller) {
var scope = $rootScope.$new(),
Ca... |
var mkdirp = require('mkdirp');
var collector = require('./collector');
var fontCarrier = require('font-carrier');
var output = function(param) {
var checkParam = function() {
if(!param.source) return 'source error: 请填写源文件路径';
if(!param.font) return 'font error: 请填写字体路径';
if(!param.output)... |
'use strict'
import {Component} from 'angular2/core'
import {DefaultValuesService} from '../../services/default-values.service'
import {AlgorithmsRunnerService} from '../../services/algorithms-runner.service'
import {RunnerResultComponent} from '../../components/runner-result/runner-result.component'
import './dashbo... |
// All code points in the Miscellaneous Mathematical Symbols-A block as per Unicode v5.2.0:
[
0x27C0,
0x27C1,
0x27C2,
0x27C3,
0x27C4,
0x27C5,
0x27C6,
0x27C7,
0x27C8,
0x27C9,
0x27CA,
0x27CB,
0x27CC,
0x27CD,
0x27CE,
0x27CF,
0x27D0,
0x27D1,
0x27D2,
0x27D3,
0x27D4,
0x27D5,
0x27D6,
0x27D7,
0x27D8,
... |
// All symbols in the Tai Xuan Jing Symbols block as per Unicode v6.3.0:
[
'\uD834\uDF00',
'\uD834\uDF01',
'\uD834\uDF02',
'\uD834\uDF03',
'\uD834\uDF04',
'\uD834\uDF05',
'\uD834\uDF06',
'\uD834\uDF07',
'\uD834\uDF08',
'\uD834\uDF09',
'\uD834\uDF0A',
'\uD834\uDF0B',
'\uD834\uDF0C',
'\uD834\uDF0D',
'\uD83... |
if (!org) var org = {};
if (!org.polymaps) org.polymaps = {};
(function(po){
po.version = "2.5.1"; // semver.org
var zero = {x: 0, y: 0};
po.ns = {
svg: "http://www.w3.org/2000/svg",
xlink: "http://www.w3.org/1999/xlink"
};
function ns(name) {
var i = name.indexOf(":");
return i < 0 ? name ... |
/*
* should.js - assertion library
* Copyright(c) 2010-2013 TJ Holowaychuk <tj@vision-media.ca>
* Copyright(c) 2013-2017 Denis Bardadym <bardadymchik@gmail.com>
* MIT Licensed
*/
import eql from "should-equal";
import getType from "should-type";
import { formatProp, format } from "../format";
import { forEach } f... |
export default {
name: 'q-card-media',
functional: true,
props: {
overlayPosition: {
type: String,
default: 'bottom',
validator: v => ['top', 'bottom', 'full'].includes(v)
}
},
render (h, ctx) {
const
data = ctx.data,
cls = data.staticClass,
slots = ctx.slots()
... |
/**
* @module @nuintun/css-deps
* @author nuintun
* @license MIT
* @version 2.2.1
* @description Transform css and get css dependences.
* @see https://github.com/nuintun/css-deps#readme
*/
'use strict';
const postcss = require('postcss');
const postcssValueParser = require('postcss-value-parser');
/**
* @mod... |
version https://git-lfs.github.com/spec/v1
oid sha256:0c2465860836108409994a1e86d50fb49a5c21c5d9d10200e23677bf0b368cab
size 4583
|
//Paul Smith
//An extension of the Vector mover to include liquids
var m = []; //the mover
var l; //liquid
function setup(){
createCanvas(400,400);
background(50);
for (var i=0;i<10;i++){
m[i] = new mover(random(width),random(height),random(5,40));
}
col = color(20,100,200,50);
l = new Liquid(0,hei... |
import * as types from '../constants/ActionTypes';
import axios from 'axios';
import { push } from 'redux-router';
const url = API_URL;
export function changeRoute(newRoute) {
return push(newRoute);
}
export function changeForm(name, value) {
return {
type: types.CHANGE_FORM,
name,
value,
};
}
export... |
import { connect } from 'react-redux';
import SplashScreen from '../components/SplashScreen';
import { requestFetchWeather } from '../actions/weatherActions';
import { getWeather } from '../reducers/selectors';
import { startAnalyticsSession } from '../actions/analyticsActions';
const mapStateToProps = (state) => ({
... |
var PlugAPI = require('plugapi');
var fs = require('fs');
var _ = require('underscore');
var DataStore = require('nedb');
var pluginFunctions = {};
var CONFIG = require('./config.json');
var plugins = new DataStore(
{
inMemoryOnly: true,
autoload: true
});
new PlugAPI(
{
"email": CONFIG.Email,
"passw... |
version https://git-lfs.github.com/spec/v1
oid sha256:ef8670559091d9bc4182324e36ef82c29150e3539626d7c8638f637ff5cb28f4
size 78484
|
/**
* @author Junxiang Wei {@link http://www.nodeunify.com}
* @copyright Copyright (c) 2016, Junxiang Wei
* @license MIT
*/
'use strict';
import gulp from 'gulp';
import util from 'util';
import urlMod from 'url';
import fs from 'fs';
import path from 'path';
import paths from '../paths';
const PREDICATE_ID... |
//NOTE: folders are relative to project root folder
var srcRoot = 'application';
var distRoot = 'public';
var paths = {
src: {
root: srcRoot,
assets: srcRoot + '/assets',
fixtures: srcRoot + '/fixtures',
documents: srcRoot + '/documents',
views: srcRoot + '/views'
},
... |
'use strict';
angular.module('myApp.view2', ['ngRoute', 'schemaForm'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/view2', {
templateUrl: 'view2/view2.html',
controller: 'View2Ctrl'
});
}])
.controller('View2Ctrl', ['$scope', function($scope) {
... |
'use strict';
var convert = require('./convert'),
func = convert('size', require('../size'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2NsaWVudC9saWIvbG9kYXNoL2... |
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const rule = require('../../../lib/rules/no-unnecessary-route-path-option');
const RuleTester = require('eslint').RuleTester;
const { ERROR_... |
'use strict';
angular.module('myApp.work', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/work', {
templateUrl: 'p_work/template.html',
controller: 'WorkCtrl'
});
}])
.controller('WorkCtrl', function($scope, $http) {
$scope.workList;
$http.get('json/works.j... |
'use strict';
var _ = require('lodash');
/**
* Розрахунок cумaрних відcтaней між мережними вузлaми зa методом Дейкcтри
* @param {array(array)} distances
* @return {array(array)}
*/
function findMinEdges (vertex, distances) {
// console.warn('vertex', vertex.index, vertex.last, distances[vertex.index]);
if (!... |
import React from 'react';
import ReactDOM from 'react-dom';
import Example from './Example';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<Example />, document.getElementById('root'));
registerServiceWorker();
|
'use strict';
var lab = exports.lab = require('lab').script();
var code = require('code');
var React = require('react');
var omniscient = require('omniscient');
var Immutable = require('immutable');
var Cursor = require('immutable/contrib/cursor');
var components = require('../')(omniscient);
lab.experiment('compon... |
var BufferGroup = require('buffer-group'),
OffsetBuffer = require('offset-buffer'),
debug = false,
events = require('events'),
util = require('util');
module.exports = require('./framing-buffer.js')(
OffsetBuffer,
BufferGroup,
debug,
events,
util,
console
);
|
import {
global,
phxWindow,
CHANNEL_EVENTS,
DEFAULT_TIMEOUT,
DEFAULT_VSN,
SOCKET_STATES,
TRANSPORTS,
WS_CLOSE_NORMAL
} from "./constants"
import {
closure
} from "./utils"
import Ajax from "./ajax"
import Channel from "./channel"
import LongPoll from "./longpoll"
import Serializer from "./serializer... |
function extend(Child, Parent)
{
var F = function() { }
F.prototype = Parent.prototype
Child.prototype = new F()
Child.prototype.constructor = Child
Child.superclass = Parent.prototype
} |
import Main from "./Main";
import withStyles from "@material-ui/core/styles/withStyles";
import styles from "./styles";
export default withStyles(styles)(Main); |
import { add, subtract } from '../../src/util/math';
import assert from 'assert';
describe('math', function () {
it('add()', function () {
const result = add(1, 2);
assert.strictEqual(result, 3);
});
it('subtract()', function () {
const result = subtract(2, 1);
assert.strictEqual(result, 1);
... |
import React from 'react';
import { createRendererWithUniDriver, cleanup } from '../../../test/utils/unit';
import { baseUniDriverFactory } from '../../../test/utils/unidriver';
import FoundationFamily from './componentsFamilies/FoundationFamily';
import LayoutFamily from './componentsFamilies/LayoutFamily/LayoutFamil... |
/**
* UDP multicast backend for service discovery
*/
/**
* Module dependencies
*/
var dgram = require('dgram')
var logger = require('../logger')('micromono:discovery:udp')
var ERR_PORT_INUSE = 'UDP port in use, please make sure you don\'t have other instances of micromono running as consumer with the same network... |
angular.module('ngsandbox.hello', [
'ui.router'
])
.config(function ($stateProvider, $httpProvider) {
$stateProvider
.state('main.hello', {
url: '/',
templateUrl: 'hello/hello.tpl.html',
controller: 'HelloController as hello'
})
;
$httpProvider.defaults.useXDomain ... |
'use strict'
// var volume = require('./cubic-meter')
// volume.set('liter', 'cubic-meter', 1 / 1000)
// module.exports = volume
module.exports = ['liter', 'cubic-meter', 1 / 1000]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.