code stringlengths 2 1.05M |
|---|
var gatherTheFlock = require('../../src/gatherTheFlock');
var mockDir = 'test/support/mockServers/';
describe('gatherTheFlock', function() {
context('when all the mocks are functional', function() {
it('number of mocks should be 2', function() {
expect(gatherTheFlock(mockDir + '2good').length).to.be.equal(... |
import React from 'react'
import {
TableRow,
TableCell
} from 'material-ui/Table'
import TeamChip from 'containers/Asians/TabControls/_components/TeamChip'
import RoomTypeChips from 'containers/Asians/TabControls/_components/RoomTypeChips'
import AdjudicatorDragAndDrop from './AdjudicatorDragAndDrop'
import Adjud... |
var board = function(args) {
this.width = args.width;
this.height = args.height;
this.portal = args.portal;
};
board.prototype.checkForPortal = function(x, y, direction) {
var thereIsAPortal = false;
if(this.portal) {
if((this.portal.x === x) && (this.portal.y === y) && (this.portal.direction === directi... |
var playState = {
create: function(){
var background = game.add.sprite(0, 0, 'cidade');
background.width = 1300;
background.height = 650;
graphics = game.add.graphics(0, 0);
groupCidade = game.add.group();
groupCidade.inputEnableChildren = true;
var x = 1... |
import { expect } from 'chai'
import jsdom from 'jsdom-global'
/*eslint-disable*/
import React from 'react'
import TestUtils from 'react-addons-test-utils'
import { Provider } from 'react-redux'
import CounterPage from '../../src/containers/CounterPage'
import configureStore from '../../src/store/configureStore'
/*esli... |
/**
* Created by alisabelousova on 3/27/15.
*/
module.exports = {
attributes: {
text : { type: 'string', unique: true, required: true },
isApproved : { type: 'boolean', defaultsTo: true },
isModerated : { type: 'boolean', defaultsTo: false }
}
};
|
import {vec3} from '../../global';
/**
* Tw2GeometryMeshArea
*
* @property {string} name
* @property {number} start
* @property {number} count
* @property {vec3} minBounds
* @property {vec3} maxBounds
* @property {vec3} boundsSpherePosition
* @property {number} boundsSphereRadius
*/
export class Tw2GeometryM... |
import React, {Component} from 'react';
import {Router, Route, IndexRoute, browserHistory} from 'react-router';
import { IntlActions } from 'react-redux-multilingual'
import App from 'views/app';
import Home from 'views/home';
import About from 'views/about';
import Lens from 'views/lens';
import NotFound from 'views/... |
var gulp = require('gulp');
gulp.task('build', ['browserify', 'sass', 'images', 'fonts'])
|
module.exports = require("npm:fbemitter@2.0.0/index"); |
import ReactDOM from 'react-dom';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import {Progress} from '../../../src/index';
describe('Progress', () => {
it('should have .ui.progress class by default', () => {
let instance = TestUtils.renderIntoDocument(
<Progress></P... |
import EchonestSerializer from 'ember-data-echonest/serializers/echonest';
export default EchonestSerializer.extend({
modelKey: 'biography',
removalList: ['truncated']
});
|
import React, { Component } from 'react';
import {
Text,
View,
StyleSheet
} from 'react-native';
var styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
padding: 5
},
weekday: {
paddingLeft: 15
},
date: {
paddingRight: 10
}... |
var searchData=
[
['commands_2ecpp',['Commands.cpp',['../_commands_8cpp.html',1,'']]],
['commands_2ed',['Commands.d',['../_commands_8d.html',1,'']]],
['configuration_2eh',['Configuration.h',['../_configuration_8h.html',1,'']]]
];
|
export { default } from 'ember-appkit-admin/components/admin-header/component'; |
import createFactoryFunction from '../utilities/create-factory-function.js';
import { InputControllerHelper } from '../utilities/input-controller.js';
class DateController extends InputControllerHelper {
constructor($scope, iVXjs, iVXjsActions) {
super($scope, iVXjs, iVXjsActions);
}
}
DateController.$in... |
const build_object = require("../lib/build_object.js");
const api = require("../lib/knomatic_api.js");
const config = require("../config/studio.js");
const request = require('request');
const qbHelper = require("../lib/qbHelper");
const qbConfig = require('../config/qbConfig');
module.exports = {
datasetName: "Quick... |
import axios from 'axios';
import { setUserIsLoggedIn, clearUserData } from './user';
export function loginRequest(userData) {
return (dispatch) => {
// API login call
return axios.post('/api/v1/login', userData);
};
}
export function userSignupRequest(userData) {
return (dispatch) => {
return axios... |
const globby = require('globby');
const fs = require('fs');
function encode(str) {
return str
.replace(/\\/g, '\\\\')
.replace(/`/g, '\\`')
.replace(/\$\{/g, '$\\{')
.trim();
}
var kernel = encode(fs.readFileSync('lib/jison-parser-kernel.js', 'utf8'));
var parseErrorCode = encode(fs.readFileSync... |
// is input key code
export function isInputKeyCode(event) {
let result = false;
const { keyCode, altKey, ctrlKey, shiftKey } = event;
// exclude keys
if (altKey || ctrlKey || shiftKey) {
return result;
}
// Digit0 to Digit9
if ((keyCode >= 48 && keyCode <= 57) || (keyCode >= 96 &... |
import React from 'react';
import { css } from 'emotion';
import { createClassNameFromProps, withStyles } from './common/StyleManager';
import { joinClasses } from '../../utils/componentUtils';
import { Container } from './containers/Container';
import {colorList, modularScale} from '../../theme/Theme';
const componen... |
import React from 'react'
import { Container, Content, HeroFoot, Icon } from 're-bulma'
const Footer = () => (
<HeroFoot>
<Container>
<Content>
<p style={{ textAlign: 'center', padding: '10px' }}>
made with <Icon icon="fa fa-heart" size="isSmall" style={{ color: 'red' }} /> by <a href="ht... |
#!/usr/bin/env node
var sys = require('sys');
require('child_process')
.exec("gulp remove-proxy", function(error, stdout, stderr) {
sys.puts(stdout)
});
|
_r("post", "/group/join", token2, {
id: group._id
});
|
import random from '@turf/random';
import Benchmark from 'benchmark';
import meta from './';
const fixtures = {
point: random('points'),
points: random('points', 1000),
polygon: random('polygon'),
polygons: random('polygons', 1000)
};
const suite = new Benchmark.Suite('turf-meta');
/**
* Benchmark R... |
const _ = require(`lodash`)
const { emitter, store } = require(`../redux`)
const apiRunnerNode = require(`../utils/api-runner-node`)
const { boundActionCreators } = require(`../redux/actions`)
const { deletePage, deleteComponentsDependencies } = boundActionCreators
let pagesDirty = false
let graphql
emitter.on(`CREA... |
class system_runtime_remoting_contexts_context {
constructor() {
// int ContextID {get;}
this.ContextID = undefined;
// System.Runtime.Remoting.Contexts.IContextProperty[] ContextProperties {get;}
this.ContextProperties = undefined;
}
// void DoCallBack(System.Runtime.Remo... |
({
completeAllTodos: function(component) {
return function(dispatch, getState){
var action = component.get("c.completeAllTodos"),
state = getState(),
todoList = state.todos;
action.setParams({
todos: todoList
});
... |
/**
* Created by lvliqi on 2017/7/21.
*/
module.exports.Token = require('./AccessToken');
module.exports.AuthInfo = require('./AuthInfo');
module.exports.PreAuthCode = require('./PreAuthCode');
module.exports.QueryAuth = require('./QueryAuth');
module.exports.Xcx = require('./Xcx'); |
/**
* Created by Tarnos on 2016-12-26.
*/
lotfw.factory('Game', function(EnemyList, logService){
var Game = function() {
this.stats = ['strength', 'endurance', 'dexterity', 'agility'];
this.isLoaded = true;//set to false to show intro
this.name = "Legend of the Fallen Warrior";
this.id = 0... |
export const ic_volume_down_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M16 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02 0-1.77-1.02-3.29-2.5-4.03zM5 9v6h4l5 5V4L9 9H5zm7-.17v6.34L9.83 13H7v-2h2.83L12 8.83z"},"children... |
'use strict';
// ==================================================================================
// internet.js
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
// Copyright: (c) 2014 - 2017
// Autho... |
import { combineReducers } from "redux";
import items from "./items";
// Combine reducers
const itemApp = combineReducers({
items
});
export default itemApp;
|
angular.module('designerWorkplaceApp')
.controller('messagesCtrl', ['$scope', '$mdSidenav', 'messageService', 'userService', 'workplaceService', 'notificationService',
function ($scope, $mdSidenav, messageService, userService, workplaceService, notificationService) {
'use strict';
var currentUser =... |
var class_smooth_function =
[
[ "SmoothFunction", "class_smooth_function.html#ab47b4d1be729afadb652b373bfadecf0", null ],
[ "~SmoothFunction", "class_smooth_function.html#af866864f7e676fa2a9bb91742261a942", null ],
[ "SmoothFunction", "class_smooth_function.html#ab47b4d1be729afadb652b373bfadecf0", null ],
... |
var fs = require('fs');
var parser = require("xdg-parse");
module.exports = function readXdgFile(file){
return fs.promises.readFile(file,{encoding:'utf8'}).then((c)=>parser(c));
}
|
import { Template } from 'meteor/templating';
import './tBlankLayout.html';
Template.tBlankLayout.helpers({
target() {
return this.targetTemplate
}
}); |
import React from 'react';
import IconButton from '@material-ui/core/IconButton';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';
import MoreVertIcon from '@material-ui/icons/MoreVert... |
import {Utils} from "./Utils.class";
/**
* @class
* @constructor
*/
export class Mesh {
constructor() {
this._obj = {};
this._textures = {};
this.objIndex = null; // for store new indexes
this.indexMax=0;
}
/**
* Load a point
*/
loadPoint() {
this._o... |
export default [
"X-WWW-FORM-URLENCODED",
"FORM-DATA",
"BINARY",
"JSON",
"RAW",
"XML"
] |
"use strict";
const fs = require("fs");
const path = require("path");
const less = require("less");
const baseDir = path.join(__dirname, "app/css");
let cssFiles = fs.readdirSync(baseDir);
var compilingPromises = [];
for (let cssFile of cssFiles) {
if (!path.isAbsolute(cssFile)) {
cssFile = path.join(baseDir, cssF... |
Template.storeSlotList.onRendered(function() {
this.$('.ui.dropdown').dropdown();
}); |
console.log('Hello')
console.log('Goodbye')
|
/**
* @fileoverview Tests for wrap-iife rule.
* @author Ilya Volodin
*/
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var eslintTester = require("eslint-tester");
//-----------------... |
var controllers = require('../controllers'),
passport = require('passport');
module.exports = function(app) {
app.get('/login', controllers.authCtrl.login);
app.post('/login', passport.authenticate('local-login', {
successRedirect : '/main',
failureRedirect : '/login',
failureFlash : true ... |
/*!
* segment-display.js
*
* Copyright 2012, Rüdiger Appel
* http://www.3quarks.com
* Published under Creative Commons 3.0 License.
*
* Date: 2012-02-14
* Version: 1.0.0
*
* Dokumentation: http://www.3quarks.com/de/Segmentanzeige
* Documentation: http://www.3quarks.com/en/SegmentDisplay
*/
// Segment disp... |
// To run this file, type the following on your command prompt:
// node exercise01.js
// console.log is used for printing out text.
console.log("Hello World!");
console.log("Hello Again");
console.log("I like typing this.");
console.log("This is fun.");
console.log('Yay! Printing.');
console.log("I'd much rather you '... |
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, FormattedMessage } from 'react-intl';
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
import withIntl from '../../../lib/withIntl';
import Avatar from '../../../components/Avatar';
import { capitalize, format... |
var browserSync = require('./browser-sync.js')
var paths = require('./paths.js');
module.exports = function () {
browserSync.init({
server: {
baseDir: paths.rootDir
},
open: 'local'
});
};
|
class Controller {
constructor(dataService, templateLoader, notificator, validator, utils) {
if (typeof validator !== 'object' || validator === null) {
throw new Error("Validator must be a valid object!");
}
this.validator = validator;
this.dataService = dataService;
... |
// AMD Wrapper Header
define(function(require, exports, module) {
// moment.js language configuration
// language : esperanto (eo)
// author : Colin Dean : https://github.com/colindean
// komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.
// Se ne, bonvolu korekti kaj avizi min por k... |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Copyright 2012, 2013 Matthew Jaquish
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/*
* A behavior object.
*
*/
define(['koko... |
import React from 'react';
import { View, ActivityIndicator, StyleSheet } from 'react-native';
const LoadingIcon = props => {
return(
<View style={styles.loadingContainer}>
<ActivityIndicator
size={props.size || 'large'}
/>
</View>
);
};
export { LoadingIcon };
const styles = StyleShe... |
import { app } from 'electron';
import jetpack from 'fs-jetpack';
const userDataDir = jetpack.cwd(app.getPath('userData'));
const filename = 'settings.json';
export class AppSettings {
constructor() {
this.settings = {
isGroupNotificationsEnabled: false,
isGroupFlashTaskbarEnabled: false,
isGroupNotificat... |
import React from 'react';
import cx from 'classnames';
import additionalProps from '../util/additionalProps';
export default ({
className,
data,
x = 0,
y = 0,
width,
height,
rx,
ry,
fill = 'steelblue',
fillOpacity,
stroke,
strokeWidth,
strokeDasharray,
strokeLinecap,
strokeLinejoin,
st... |
define(["./Matrix2-c6c16658","./when-4bbc8319","./EllipseGeometry-5510aad8","./RuntimeError-5b082e8f","./ComponentDatatype-3d0a0aac","./WebGLConstants-508b9636","./GeometryOffsetAttribute-821af768","./Transforms-f15de320","./combine-e9466e32","./EllipseGeometryLibrary-a4ac7ccc","./GeometryAttribute-8350368e","./Geometr... |
'use strict';
var equal = require('assert').strictEqual;
var promiseToCallback = require('./');
['q', 'bluebird', 'pinkie-promise'].forEach(function (name) {
var Promise = require(name);
if (Promise.Promise) {
Promise = Promise.Promise;
}
it(name + ': success', function (done) {
var success = new Promise(func... |
var cjson = require("circular-json");
global.CJSONString = function (obj) {
return cjson.stringify(obj);
};
global.CJSONParse = function (str) {
return cjson.parse(str);
};
global.jclone = function (obj) {
return JSON.parse(JSON.stringify(obj));
};
|
import {isFunction} from 'lodash';
function getPercent(loaded, total, computable){
if (!computable) return 100;
return ((loaded / total) * 100);
}
export default function(progress){
if (!isFunction(progress)) return;
return function(loaded, total, lengthComputable){
progress({
percent: getPercent(l... |
/**
* The InteractionContext contains all the entities which can be interact with.
* @private
*/
var InteractionContext = (function () {
var aabbMap = {}; // all axis aligned bounding boxes in current frame, indexed by id
var obbMap = {}; // all oriented bounding boxes in current frame, indexed by id
... |
'use strict';
angular.module('visualizerApp', []);
angular.module('visualizerApp').controller('VisualizerCtrl', ['$scope', function($scope) {
var fog = undefined;
function loadDebugMessages(debugMessages) {
var res = [];
for (var playerIndex = 0; playerIndex < debugMessages.length; playerInd... |
'use strict';
var RULES = {
CM: [
/^(134[0-8]|13[5-9]\d|147\d|15[0-27-9]\d|178\d|18[2-47-8]\d)\d{7}$/,
/^1705\d{7}$/
],
CT: [
/^(133\d|1349|153\d|177\d|18[0-19]\d)\d{7}$/,
/^1700\d{7}$/
],
CU: [
/^(13[0-2]|145|15[5-6]|176|18[5-6])\d{8}$/,
/^1709\d{7}$/
]
};
module.exports = {
... |
document.appLauncher = (function (document, window) {
console.log("app-launcher loaded.");
function init(containerElement, apps) {
var table = document.createElement("table");
table.className = "app-launcher-apps";
var tr = document.createElement("tr");
table.appendChild(tr);... |
System.config({
transpiler: "babel",
babelOptions: {
optional: [
"runtime"
]
},
map: {
babel: './libs/browser.js',
jquery: './libs/jquery-2.1.2.min.js',
handlebars: './libs/handlebars-v3.0.3.js'
}
});
|
var express = require('express');
var mDB = require('../model/db.js');
var router = express.Router();
router.post('/', function(req, res)
{
var expReg = /[^\$:;%&#@!,|/ª=º\[\]{}\\()\+<>*"'?\^]/g;
if (expReg.test(req.body.nombre) && expReg.test(req.body.clave))
{
mDB.qLogin(req.body.nombre, req.body.clave, functi... |
import uiButtonBase from '../mixins/ui-button-base';
import layout from '../templates/components/ui-button';
import Component from '@ember/component';
/**
ui-button component see {{#crossLink "mixins.UiButtonBase"}}{{/crossLink}}
@module components
@class UiButton
@namespace components
@constructor
*/
export default ... |
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPat... |
'use strict';
describe('angular', function() {
var element;
afterEach(function() {
dealoc(element);
});
describe('case', function() {
it('should change case', function() {
expect(lowercase('ABC90')).toEqual('abc90');
expect(manualLowercase('ABC90')).toEqual('abc90');
expect(uppercas... |
'use strict';
var myLevels = (function() {
var myLevels = {
clearWorld: clearWorld,
addFourWalls: addFourWalls,
addLeftWall: addLeftWall,
addRightWall: addRightWall,
addGround: addGround,
addCeiling: addCeiling,
catapult: catapult,
newtonsCradle: newtonsCradle,
car: car
};
f... |
// Karma configuration
// Generated on Tue Mar 01 2016 12:07:06 GMT+0000 (GMT)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/ka... |
// Invoke 'strict' JavaScript mode
'use strict';
// Set the main application name
var mainApplicationModuleName = 'mean';
// Create the main application
var mainApplicationModule = angular.module(mainApplicationModuleName, ['ngResource', 'ngRoute', 'users', 'example', 'articles','smartplugs','devices','powers','graph... |
var zousan = require('zousan');
require('../lib/fakesP');
module.exports = function upload(stream, idOrPath, tag, done) {
var blob = blobManager.create(account);
var tx = db.begin();
var blobIdP = blob.put(stream);
var fileP = self.byUuidOrPath(idOrPath).get();
var version, fileId, file;
zousa... |
/**
* Copyright 2017-present, Callstack.
* All rights reserved.
*
* @flow
*/
import stripAnsi from 'strip-ansi';
import logger from '../logger';
beforeEach(() => {
// $FlowFixMe
console.log = jest.fn();
});
afterEach(() => jest.clearAllMocks());
test('section logs are always separated by one newline', () =>... |
'use strict'
var uniqid = require('uniqid');
var Promise = require('bluebird');
var validate = require('./validator');
var utils = require('../utils');
var processDividends = require('../dividend');
/**
* Result class
* @constructor
* @param {first} - first position the race
* @param {second} - second position the r... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chro... |
//var context = require.context('./test', true, /.+\.spec\.jsx?$/);
//
//require('core-js/es5');
//
//context.keys().forEach(context);
//module.exports = context;
|
{
var node = createNode(
"<i>" +
"<i>1</i>" +
"<i>" +
"<i>" +
"<i>2</i>" +
"<i></i>" +
"</i>" +
"</i>" +
"<i>" +
"3" +
"<i>45</i>" +
"</i>" +
"</i>"
);
expectNodeOffset(getNodeForCharacterOffset(node, 3), "3", 1);
expectNodeOffset(getNo... |
(function (tree) {
tree.Operation = function (op, operands, isSpaced) {
this.op = op.trim();
this.operands = operands;
this.isSpaced = isSpaced;
};
tree.Operation.prototype = {
type: "Operation",
accept: function (visitor) {
this.operands = visitor.visit(this.operands);
},
... |
var BaseError = require('./baseError');
var captureStackTrace = require('capture-stack-trace');
function ServiceUnavailable() {
BaseError.apply(this, arguments);
captureStackTrace(this, ServiceUnavailable);
}
ServiceUnavailable.prototype = Object.create(BaseError.prototype);
ServiceUnavailable.prototype.constr... |
// @flow
import React from 'react'
import { shallow } from 'enzyme'
import toJson from 'enzyme-to-json'
import Comp from '../../pages/index'
test('snapshot', () => {
const x = shallow(<Comp />)
expect(toJson(x)).toMatchSnapshot()
})
|
/**
* Created by user on 7/19/14.
*/
jQuery(function () {
jQuery('#migrationutility-databasetables').bind('change',
function () {
var val = jQuery(this).find('option:selected').text();
... |
import Resolution from '@unstoppabledomains/resolution';
import { toChecksumAddress } from 'web3-utils';
import Web3 from 'web3';
export default class UNS {
constructor(network, web3) {
const networkname = 'mainnet';
const polyname = 'polygon-mainnet';
const polyprovider = new Web3('https://nodes.mewapi.i... |
/* global QUnit */
import { DiscreteInterpolant } from '../../../../../src/math/interpolants/DiscreteInterpolant';
export default QUnit.module( 'Maths', () => {
QUnit.module( 'Interpolants', () => {
QUnit.module( 'DiscreteInterpolant', () => {
// INHERITANCE
QUnit.todo( 'Extending', ( assert ) => {
a... |
'use strict';
// MODULES //
// PROPERTIES //
var props = {};
/**
* Element width.
*
* @type {Number}
* @default 500
*/
props.width = {
type: Number,
value: 500,
observer: '_widthChanged'
};
/**
* Background color of editor.
*
* @type {String}
* @default #FFFFFF
*/
props.backgroundColor = {
type: String,
valu... |
var WebpackTapeRun = require('webpack-tape-run')
var path = require('path')
module.exports = {
entry: {
index: './index.test.js'
},
context: __dirname,
node: {
fs: 'empty' // otherwise require('tape') throws
},
output: {
filename: '[name].test.js',
path: path.join(__dirname, 'dist')
},
... |
var _ = lodash;
var theme = {
debug: 'blue',
order: 'magenta'
};
if (Meteor.isServer) {
var colors = Npm.require('colors');
colors.setTheme(theme);
}
Meteor._ensure(Meteor, 'settings', 'public');
var debugEnabled = Meteor.settings.public.debug;
var logColor = function(msg, color) {
if (msg && color) {
if (_.... |
require('../testing-lib.js');
describe('Tester Core', function() {
const TesterCore = require('../src/TesterCore.js');
testThat('testThat should pass if nothing fails', function() {
var testPassed = false,
tester = new TesterCore();
tester.testThat('something', function() {
testPassed = true;
});
if... |
// test source file
App = Ember.Application.create();
App.Router.map(function() {
// put your routes here
});
App.IndexRoute = Ember.Route.extend({
model: function() {
return ['red', 'yellow', 'blue'];
}
}); |
/**
* HashMap - type utility
* @author Francis Desjardins <me@francisdesjardins.ca>
* Homepage: https://github.com/francisdesjardins/hashmap
*/
'use strict';
// Module dependencies.
var toString = Object.prototype.toString;
// Module variables.
var typeRegEx = /\[object (\S*)\]/gi;
// Module definition.
/**
... |
import { Meteor } from 'meteor/meteor';
import { check, Match } from 'meteor/check';
import Records from '../records.js';
import intervalRecords from '../../../queries/records/interval-records';
// publish all records of a given user
Meteor.publish('records.all', function recordsAll() {
return Records.find({ userId:... |
/**
* Testing our Button component
*/
import React from 'react';
import { mount } from 'enzyme';
import Button from '../index';
const handleRoute = () => {};
const href = 'http://google.com';
const children = (<h1>Test</h1>);
const renderComponent = (props = {}) => mount(
<Button href={href} {...props}>
{chi... |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdGames(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M30 15V4H18v11l6 6 6-6zm-15 3H4v12h11l6-6-6-6zm3 15v11h12V33l-6-6-6 6zm15-15l-6 6 6 6h11V18H33z" />
</IconBase>
);
}
export default MdGames;
|
exports = module.exports = function(express, middleware, handlers, path) {
var router = express();
router.route(path)
.all(middleware.isLoggedIn)
.get(handlers.message);
return router;
};
|
/*jslint node: true */
'use strict';
var moment = require('moment');
var uuid = require('node-uuid');
var faker = require('faker');
var TASKNAME = 'telepathy.backends.finance.trade';
function pendingJob(portfolio) {
return {
id: portfolio,
report: {
done: false,
elapsed: 60.03192901611328,
... |
(function () {
'use strict';
/*global angular, platform, Audio */
/**
* This is the controller for cheat.
*
* The board has three section, holding the cards of the player one, player
* two and the middle area's.
*
* The section for player one is the main section, from the point of the
* play... |
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","topic_0000000000000C16.html"],['408',"Tlece.Recruitment.Controllers Namespace","topic_000000000000018A.html"],['409',"AdministratorController Class","topic_000000000000018B.html"]]; |
module.exports.run = function() {
var path = require('path');
var rm = require('shelljs').rm;
var distPath = require('../../config').paths.dist;
var distFiles = path.join(distPath, '*');
var utils = require('../../utils');
if (!utils.dirExists(distPath)) {
return utils.dirSkippedDeletion(distPath);
}... |
/**
The MIT License (MIT)
Copyright (c) 2015 Steven Campbell.
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, m... |
'use strict';
/*
* Defining the Package
*/
var Module = require('meanio').Module;
var Articles = new Module('articles');
/*
* All MEAN packages require registration
* Dependency injection is used to define required modules
*/
Articles.register(function(app, auth, database, circles, swagger) {
//We enable rou... |
module.exports = function notFoundFn(req,res){
if (req.accepts('html')) {
res.status(404);
res.render('404', {url: req.url});
return
};
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.