code stringlengths 2 1.05M |
|---|
import Character from './Character.js';
import Film from './Film.js';
import Planet from './Planet.js';
const Query = `
type Query {
character(id: Int!): Character!
film(id: Int!): Film!
planet(id: Int!): Planet!
characters: [Character!]
films: [Film!]
planets: [Planet!]
}
`;
export default [Query, Charac... |
module.exports = {
port: 3000,
salt: '1:W_E.=V[+3 V>@P]^SmJ|j]2eG>{Ov>) $[%J(RlOqH8h++wKugFtOSUFG7o6fT',
secret: '=+SU]9LloDzT*sI-lpL1y#i6[bX2HnWG}?4%`dV;n vX<b2:.T1+Aw#gJ|nZick^',
redis: {
host: '127.0.0.1',
port: 6379
},
static_path: '/static',
mongoUri: 'mongodb://127.0.0.1:27017/guide'
}; |
var iDiagnose = {};
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent... |
var Firebase = window.Firebase;
var FirebaseAuthClient = window.FirebaseAuthClient;
var App = window.App;
export default Ember.Route.extend({
beforeModel: function(transition) {
App.set('firebase', new Firebase(window.FIREBASE_ROOT));
if (!this.controllerFor('login').get('token')) {
var loginControlle... |
'use strict';
let aws = require('../config/aws');
let user = require('./user')(aws);
module.exports.handler = function(event, context, callback) {
// request from API Gateway
console.log("Dispatch request from API Gateway: ", JSON.stringify(event));
// validate requester role Check if authAccountid is authoriz... |
function ConsoleCommandSender(log) {
this.name = 'Server';
this.log = log;
}
ConsoleCommandSender.prototype.sendMessage = function(message) {
this.log(message);
};
function enable(api) {
var split;
process.stdin.resume();
process.stdin.on('data', function(chunk) {
split = chunk.toString().split(/\s+/);
api.... |
export const aperture = {"viewBox":"0 0 8 8","children":[{"name":"path","attribs":{"d":"M4 0c-.69 0-1.34.19-1.91.5l3.22 2.34.75-2.25c-.6-.36-1.31-.59-2.06-.59zm-2.75 1.13c-.76.73-1.25 1.74-1.25 2.88 0 .25.02.48.06.72l3.09-2.22-1.91-1.38zm5.63.13l-1.22 3.75h2.19c.08-.32.16-.65.16-1 0-1.07-.44-2.03-1.13-2.75zm-4.72 3.22l... |
'use strict';
/*jshint asi: true */
var test = require('tap').test
var readproctab = require('../').readproctab
function inspect(obj, depth) {
console.error(require('util').inspect(obj, false, depth || 5, true));
}
function bycmd(proctab) {
return proctab.reduce(function (acc, p) {
acc[p.cmd] = p;
return... |
var chai = require('chai')
var expect = chai.expect
var sinon = require('sinon')
var proxyquire = require('proxyquire')
var q = require('q')
var testUtils = require('../test-utils')
chai.use(require('sinon-chai'))
describe('Helpers', function () {
var storageMock
var helpers
beforeEach(function () {
storag... |
'use strict';
var Forestry = require('forestry'),
File = require('vinyl'),
path = require('path');
function findExistingFile (file, tree) {
return tree.find(function (n) {
return n.data.path === file.path;
});
}
function getParentPath(childPath) {
var parentPath = path.resolve(childPath, '.... |
import React from 'react'
import Helmet from 'react-helmet'
import { PageContent } from 'components'
import { ArticlesLayout, SeriesList } from 'blog/components'
export default () => (
<PageContent>
<ArticlesLayout>
<Helmet>
<title>Article Series</title>
</Helmet>
<h1>Article Series!<... |
'use strict';
import React from 'react';
import {Button} from 'react-bootstrap';
require('styles/Show.scss');
class ShowComponent extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
corn: {}
};
}
yesHandler() {
this.i... |
#!/usr/bin/env node
require('node-env-file')( `${__dirname}/../.env` )
const MyObj = Object.create( require('../lib/MyObject'), { input: { value: process.argv[2] } } ),
Bcrypt = require('bcrypt')
MyObj.P( Bcrypt.hash, [ MyObj.input, parseInt( process.env.SALT ) ] )
.then( console.log )
.catch( e => console.log... |
import { uid, ktv } from '../../../utils';
import ACTION_TYPES from './action-types';
const STATUS = [
'FETCHING',
];
//
//
export default Object.assign(ktv(STATUS, uid), ACTION_TYPES);
|
function checkArrayLength(array, length){
if(array.length === length){
return array;
} else {
throw "invalid number of elements";
};
};
function sampleElement(inputObject){
var alength = inputObject.length;
return inputObject[(Math.floor(Math.random() * alength))]
}
function Die(inputLetters){
t... |
var caminte = require('caminte');
var Schema = caminte.Schema;
var mysql_user = process.env.mysql_user;
var mysql_password = process.env.mysql_password;
var mysql_host = process.env.mysql_host;
var mysql_db = process.env.mysql_db;
var config = {
driver : "mysql",
host : mysql_host,
... |
var searchData=
[
['sestado',['SEstado',['../_s_juego_8h.html#a700cd4eb8f1695daf7b74a3b5088ad94',1,'SJuego.h']]]
];
|
var test = require("test");
var a = require("a");
test.assert(a, "Should load an empty module with comments.");
|
'use strict'
let hidePhaseView = Backbone.View.extend({
tagName: "div",
className: "modal-dialog",
initialize: function(data) {
this.data = data || undefined;
},
events: {
"click #close": "close",
"click #delete": "hidephases"
},
close: function() {
$('#dialog-crud').modal('hide')
... |
describe('graph_03', function() {
const assert = chai.assert
const styles = testGlobals.styles
const logTime = testGlobals.logTime
const stringifyCondensed = testGlobals.stringifyCondensed
const approxEquals = KerasJS.testUtils.approxEquals
const layers = KerasJS.layers
const testParams = {
layers: [... |
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Reports from '../../../components/rpt/production/Reports';
import * as Actions from '../../../actions/rpt/production/Actions';
function mapStateToProps(state) {
return {
ProdRpt: state.ProdReports
};
}
function mapDispat... |
/*
* 1Derscore.js v0.1.3
* A whole mess of useful functional programming helpers without extending any built-in object for The One Developers <1Devs/>
*
* http://ali.md/1derscore
* License: http://alimd.mit-license.org/
*/
(function (root, doc, undef) { // encapsulate all variables so they don't become global v... |
export function RoutesRun ($rootScope, $state, $auth, AclService, $timeout, API, ContextService, moment) {
'ngInject'
AclService.resume()
/*eslint-disable */
let deregisterationCallback = $rootScope.$on('$stateChangeStart', function (event, toState) {
if (toState.data && toState.data.auth) {
if (!$a... |
import test from 'tape';
import React from 'react';
import {mount} from 'enzyme';
import ArcSeries from 'plot/series/arc-series';
import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils';
import ArcSeriesExample from '../../showcase/radial-chart/arc-series-example';
testRenderWithProps(ArcSeries,... |
/* globals module require */
"use strict";
const SimpleMovieProvider = require("./simple-movie-provider");
const DetailMovieProvider = require("./detail-movie-provider");
module.exports = {
getSimpleMovieProvider() {
return SimpleMovieProvider.getImdbSimpleMovies();
},
getDetailMovieProvider() {
return Detail... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
/*globals installedChunks hotAddUpdateChunk parentHotUpdateCallback importScripts XMLHttpRequest $require$ $hotChunkFilename$ $hotMainFilename$ */
module.exports = function() {
function webpackHotUpdateCallback(chunkId,... |
/**
* Catalog node
*/
'use strict';
/**
* Module dependencies.
*/
var errors = require('../errors');
var utils = require('../utils');
/**
* Initialize a new `CatalogNode` client.
*/
function CatalogNode(consul) {
this.consul = consul;
}
/**
* Lists nodes in a given DC
*/
CatalogNode.prototype.list = fu... |
import npm from './npm'
import nuget from './nuget'
export default (name) => {
if (npm.isPackageFile(name)) return npm
if (nuget.isPackageFile(name)) return nuget
} |
module.exports = {
servers: {
one: {
host: 'The IP for your Digital Oceans, AWS, or EC2 ', // Your IP for Linux test or production server IP
username: 'root',
// pem: '/home/user/.ssh/id_rsa', // mup doesn't support '~' alias for home directory
//
password: 'your password for you... |
angular.module('module_downloadManager')
.factory('$localeDurations', [function () {
return {
'one': {
year: '{} year',
month: '{} month',
week: '{} week',
day: '{} day',
hour: '{}h',
minute: '{}m',
second: '{}s',
millisecond: '{} millisecond'
},
'other': {... |
MINI_MAP= {
"index" : "1",
"data": {
"1": {
"areaSize" :"{{0,1024},{0,922}}",
"height": "922",
"width": "1024"
},
"2": {
"areaSize" :"{{0,1536},{0,1383}}",
"height": "1383",
"width": "1536"
},
"3": {
"areaSize" :"{{0,2048},{0,1844}}",
"height": "1844",
"width": "2048"... |
#!/usr/bin/env node
'use strict';
const Chalk = require('chalk');
const log = console.log;
const hive = require('../handlers/hive');
const QuickSearch = require('../handlers/quick_search');
const Log = require('../utils/log_utils');
const Utils = require('../utils/utils');
const GradleUtils = require('../utils/gradle_... |
/* eslint-disable no-nested-ternary */
/* eslint-disable no-shadow */
import React, { Component } from 'react';
import styled from 'styled-components';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { FlatList, View, ScrollView } from 'react-native';
import { ButtonGroup, Card... |
'use strict';
var redis = require('redis');
module.exports = function() {
return redis.createClient({
ip: process.env.IP,
port: 6379
});
}; |
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'devtools', 'ku', {
title: 'زانیاری توخم',
dialogName: 'ناوی پەنجەرەی دیالۆگ',
tabName: 'ناوی بازدەر تاب',
elementId: '... |
// Copyright IBM Corp. 2014,2016. All Rights Reserved.
// Node module: loopback-boot
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
var boot = require('../');
var fs = require('fs-extra');
var path = require('path');
var expect = require('chai').expect;... |
'use strict';
//Fixed rates service used to communicate Fixed rates REST endpoints
angular.module('fixed-rates').factory('FixedRates', ['$resource',
function($resource) {
return $resource('fixed-rates/:fixedRateId', { fixedRateId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]); |
/*
* jQuery File Upload User Interface Plugin 9.6.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/* jshint nomen:false */
/* global define, require, window */
(functio... |
var objectToHtml = (function () {
"use strict";
function objectProperties(object) {
var name,
value,
properties = [];
for (name in object) {
if (object.hasOwnProperty(name)) {
try {
value = object[name];
} ... |
import React from 'react'
const GraphQLErrorList = ({errors}) => (
<div>
<h1>GraphQL Error</h1>
{errors.map(error => (
<pre key={error.message}>{error.message}</pre>
))}
</div>
)
export default GraphQLErrorList
|
import React, { Component } from "react";
import Slider from "rc-slider";
import "rc-slider/assets/index.css";
import Tooltip from "rc-tooltip";
const handle = props => {
const { value, dragging, index, ...restProps } = props;
return (
<Tooltip
prefixCls="rc-slider-tooltip"
overlay={value}
... |
import { select, selectAll } from 'd3-selection';
const flipAxisAndUpdatePCP = (config, pc, axis) =>
function(dimension) {
pc.flip(dimension);
pc.brushReset(dimension);
// select(this.parentElement)
pc.selection
.select('svg')
.selectAll('g.axis')
.filter(d => d === dimension)
... |
angular.module('Loan').service("LoanService", function ($http, $q, $mdDialog, ErrorService) {
function edit(loan, cb) {
return $mdDialog.show({
controller: 'LoanEditCtrl',
controllerAs: 'loanEdit',
templateUrl: 'loan/edit.html',
locals: {
items... |
var fs = require('fs'),
gulp = require('gulp'),
eslint = require('gulp-eslint')
Karma = require('karma').Server;
;
var paths = {
src: 'src/**/*.js',
test: 'spec/**/*Spec.js'
};
gulp.task('dev-lint', function() {
return gulp.src([paths.src, paths.test])
.pipe(eslint())
.pipe(eslint.format())
... |
import { test } from 'qunit';
import moduleForAcceptance from 'first-ember-project/tests/helpers/module-for-acceptance';
import Ember from 'ember';
let StubMapsService = Ember.Service.extend({
getMapElement() {
return document.createElement('div');
}
});
moduleForAcceptance('Acceptance | list-rentals', {
be... |
function position(posicao){
location.href = posicao;
}
|
var q = require('q');
var fs = require('fs');
var path = require('path');
var modbusMap = require('ljswitchboard-modbus_map').getConstants();
var async = require('async');
var lj_apps_win_registry_info = require('lj-apps-win-registry-info');
var driver_const = require('ljswitchboard-ljm_driver_constants');
var getLJApp... |
'use strict'
const test = require('tape')
const SolidResponse = require('solid-web-client/lib/models/response')
const acls = require('../../src/index') // solid-permissions module
const resourceUrl = 'https://example.com/resource1'
const sinon = require('sinon')
const deleteSpy = sinon.spy()
const mockWebClient = {
... |
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('ShoppingCart App', function() {
describe('Cart list view', function() {
beforeEach(function() {
browser.get('app/index.html');
});
it('should filter the cart list as a user types into the search box', function(... |
/* eslint-disable no-unused-vars, arrow-body-style */
module.exports = {
up: (queryInterface, Sequelize) => {
/*
Add altering commands here.
Return a promise to correctly handle asynchronicity.
Example:
return queryInterface.bulkInsert('Person', [{
name: 'John Doe',
isBeta... |
'use strict';
var sass = require('node-sass');
var data = '#hello {\n color: #08c; }\n';
const result = sass.renderSync({ data: data }).css.toString();
if (result === data) {
console.log('ok');
}
|
import Armor from './Armor';
import DamageTypes from '../DamageTypes';
/** Amount of protection provided by armor */
var AMOUNT = 2;
/**
* Provides moderate protection against physical attacks
*/
export default class MediumArmor extends Armor {
/**
* @override
*/
getReduction(type) {
retur... |
'use strict';
//Setting up route
angular.module('codehubblogs').config(['$stateProvider',
function($stateProvider) {
// Codehubblogs state routing
$stateProvider.
state('listCodehubblogs', {
url: '/codehubblogs',
templateUrl: 'modules/codehubblogs/views/list-codehubblogs.client.view.html'
}).
state('c... |
/*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
import React from 'react';
import ExecutionEnvironment from 'react/lib/Exe... |
version https://git-lfs.github.com/spec/v1
oid sha256:a92d66dc03be7a70aaeec898345e55d264dd3011b47eb1e85956220caa5afd97
size 2527050
|
"use strict";
var _ = require('underscorem');
var apf = require('./apf');
var objectstate = require('./objectstate');
exports.make = function(dataDir, schema, ol, cb){
_.assertLength(arguments, 4);
var apState;
var ap;
apState = require('./ap_state').make(schema, ol);
//var inv = require('./inverse').mak... |
$(document).ready(function() {
$('#file-list tr.ls').click(function(e) {
e.preventDefault();
$('*').addClass('cursor-wait');
window.location = '?ls='+$(this).attr('data-href');
});
$('#file-list tr.dl').click(function(e) {
e.preventDefault();
$('*').addClass('cursor-wait');... |
'use strict';
var Dispatcher = require('../dispatcher/appDispatcher');
var Promise = require('es6-promise').Promise;
var ClientsStore = require('../stores/clientsStore');
var ClientsApi = require('../api/clientsApi');
var ActionTypes = require('../constants/actionTypes');
var ClientActions = {
getClients: function ... |
version https://git-lfs.github.com/spec/v1
oid sha256:8652a96237d642dd98f52e8b6b5b5d60ba19476df2dcc433e7e623f3e47964a1
size 20912
|
const Joi = require('joi');
const Boom = require('boom');
const authService = require('../../services/auth');
module.exports.login = {
description: 'Login with member credentials',
validate: {
payload: {
username: Joi.string().required().min(2, 'utf8'),
password: Joi.string().required().min(8, 'ut... |
import React, { Component } from 'react'
import CheckCircle from 'material-ui/svg-icons/action/check-circle'
import { green500 } from 'material-ui/styles/colors'
class IconOk extends Component {
constructor(props) {
super(props)
}
render() {
return (
<CheckCircle color={green5... |
import Init from '../../src/js/init'
describe('Init Module', () => {
it('has a function named init', () => {
expect(typeof Init.init).toBe('function')
})
})
|
define(['require'], function (require) {
var isDebugging = false,
nativeKeys = Object.keys,
hasOwnProperty = Object.prototype.hasOwnProperty,
toString = Object.prototype.toString,
system,
treatAsIE8 = false,
console = console ? console : undefined;
//see http://patik.com/blog/complete-cross-browser-cons... |
'use strict';
/**
* Module dependencies.
*/
var passport = require('passport');
module.exports = function(app) {
// User Routes
var users = require('../../app/controllers/users');
var admin = require('../../app/controllers/admin');
app.route('/users/me').get(users.me);
app.route('/users').get(us... |
/* eslint-env mocha */
import setup, { reducer, SEND_MIDI_MESSAGE, RECEIVE_MIDI_MESSAGE, SET_LISTENING_DEVICES } from '../../src';
import MidiApi from 'web-midi-test-api';
import unique from 'lodash.uniq';
import sinon from 'sinon';
import { applyMiddleware, createStore, combineReducers } from 'redux';
import createLo... |
'use strict';
/**
* Module dependencies
*/
var acl = require('acl');
// Using the memory backend
acl = new acl(new acl.memoryBackend());
/**
* Invoke Pieces Permissions
*/
exports.invokeRolesPolicies = function () {
acl.allow([{
roles: ['admin'],
allows: [{
resources: '/api/pieces',
permiss... |
var express = require('express');
router = express.Router();
_ = require('underscore');
router.get('/', function (req, res) {
var data = req.app.locals.data;
var now = new Date();
for (job in data) {
var title = data[job].title;
slug = title.replace(/\s+/g, '-').toLowerCase();
data[job].sl... |
var url = require('url');
var colours = require('colors');
var config = {
textus : {
port : 8080,
base : null
},
es : {
host : "127.0.0.1",
protocol : "http",
port : 9200,
timeout : 60000
},
mailgun : {
key : null,
from : "no-reply@textus.okfn.org"
}
};
/**
* Module to handle reading of configu... |
$(document).ready(function () {
get_data = function (page) {
//Filter
var email = $('#txt_email').val();
var type = $('#sel_type').val();
var credit_log_type = $('#sel_credit_log_type').val();
var status = $('#sel_status').val();
var order = $('#sel_order').val();
//End Filter
$.ajax(... |
// @flow
import { createSelector } from 'reselect'
import type { State } from 'types/state'
const selectHeader = (state: State) => state.HeaderContainer
const makeSelectisOpenDropdown = () =>
createSelector(
selectHeader,
s => s.isOpenDropdown
)
const makeSelectisOpenSearchField = () =>
createSelector(... |
const webpack = require('webpack');
const helpers = require('./helpers');
/*
* Plugins
*/
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextWebpackPlugin = require('extract-text-webpack-plugin');
const autoprefixer = require('autopref... |
ng.module('smart-table', []).run(['$templateCache', function ($templateCache) {
$templateCache.put('template/smart-table/pagination.html',
'<nav ng-if="numPages && pages.length >= 2"><ul class="pagination">' +
'<li ng-repeat="page in pages" ng-class="{active: page==currentPage}"><a href="javascri... |
Ext.define('Rally.apps.portfolioitemcosttracking.LowestLevelPortfolioRollupItem',{
extend: 'Rally.apps.portfolioitemcosttracking.RollupItem',
processChildren: function(){
this._rollupDataToolTip = this.getTooltip();
if (this._notEstimated && this.getPreliminaryBudget() > this.getActualCostRol... |
export function timeAgo (time) {
const between = Date.now() / 1000 - Number(time/1000)
if (between>2592000) {
return formatDate(time)
}
if (between < 3600) {
return pluralize(~~(between / 60), ' 分钟前')
} else if (between < 86400) {
return pluralize(~~(between / 3600), ' 小时前')
} else {
return ... |
/* jshint -W117, -W030 */
require('../../../app/services/article');
describe('Article-factory', function () {
var subject;
beforeEach(function () {
bard.appModule('svc.article');
bard.inject(this, 'occurances', 'categoryFactory');
bard.mockService(categoryFactory, {
createLabels: u... |
const Client = require('./Client');
const Thread = require('./Thread');
const SOFA = require('sofa-js');
class Bot {
constructor() {
this.client = new Client(this);
this.rootThread = new Thread(this);
for (let [name, schema] of Object.entries(SOFA.schemas)) {
let handlerName = "... |
d3.multilineText = function() {
var lineHeight = 1.4;
var horizontalAlign = 'center'; // 'left', 'center', or 'right'
var verticalAlign = 'center'; // 'top', 'center', or 'bottom'
var paddingTop = 10;
var paddingBottom = 10;
var paddingLeft = 10;
var paddingRight = 10;
var textAnchorsByHorizontalAlign =... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const pip_services3_commons_node_1 = require("pip-services3-commons-node");
const pip_services3_commons_node_2 = require("pip-services3-commons-node");
const pip_services3_commons_node_3 = require("pip-services3-commons-node");
const pip_servi... |
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Mock server parameters:
params = require( './../../app/params.js' ),
// Module to be tested:
handler = require( './../../app/routes/api.version.js' );
// VARIABLES //
var expect = chai.expect,
assert = chai.assert;
// TESTS //
descri... |
require('./node_modules/coffee-script/lib/coffee-script/register');
require('./gulpfile.coffee');
|
var webpack = require('webpack')
var fileName = require('./package').name
var plugins = []
if (process.env.MINIFY) {
fileName += '.min'
plugins.push(
new webpack.optimize.UglifyJsPlugin()
)
}
module.exports = {
devtool: 'source-map',
entry: './index.js',
output: {
filename: 'dist/' + fileName + '.... |
module.exports = function(status) {
return status ? 'text-success' : 'text-danger';
}; |
'use strict';
var servicesModule = angular.module('myApp').controller('ServicesCtrl', function ($scope) {
$(document).on('click', '#close-preview', function(){
$('.image-preview').popover('hide');
// Hover befor close the preview
$('.image-preview').hover(
function () {
... |
(function () {
'use strict';
angular
.module('users')
.factory('UserMembershipsService', UserMembershipsService);
/* @ngInject */
function UserMembershipsService($resource) {
return $resource('/api/users/memberships/:type', {
type: '@type'
}, {
post: {
method: 'POST'
... |
import test from 'ava';
import sinon from 'sinon';
import { createToneAdapter } from '../index';
test('should invoke chain on source with rest of args, and then Tone.Master', t => {
const expected = ['a', 'b', 'c'];
const chain = sinon.spy();
const toneAdapter = createToneAdapter({
Master: 'c',
});
toneA... |
'use strict';
$(document).ready(function() {
//Our categories of beer
//ipa, strongAle, stoutPorter, lagerPilsner, scotch, pale,
//wheat, belgian, sour, bock, misc
var ipa = [[
'Imperial IPA',
'American IPA',
'English IPA',
'Wet Hop Ale',
'Imperial Red',
'Irish Red'
], 'ipa'];
var ... |
/*
* Copyright (c) 2015 Sylvain Peyrefitte
*
* This file is part of mstsc.js.
*
* mstsc.js is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any lat... |
import StarMarketContract from '../../../../build/contracts/StarMarket.json'
import store from '../../../store'
const contract = require('truffle-contract')
export function revokeBid(starIndex) {
let web3 = store.getState().web3.web3Instance
// Double-check web3's status.
if (typeof web3 !== 'undefined') {
... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
defaultAssets = require('./config/assets/default'),
testAssets = require('./config/assets/test'),
fs = require('fs'),
path = require('path');
module.exports = function (grunt) {
// Project Configuration
grunt.initConfig({
pkg: gr... |
/**
* @description This module provides the basic functions of Lychee.
*/
lychee = {
title : document.title,
version : '3.1.6',
versionCode : '030106',
updatePath : '//update.electerious.com/index.json',
updateURL : 'https://github.com/electerious/Lychee',
website : '... |
var NwBuilder = require('node-webkit-builder')
, nw = new NwBuilder({
files: [
__dirname + '/../**'
, '!' + __dirname + '/../**/*.iml'
, '!' + __dirname + '/../cache/**'
, '!' + __dirname + '/../build/**'
, '!' + __dirname + '/../node_modules/node-webkit-builder/**'
, '!' + __dirname + '/../node_mo... |
import { combineReducers } from 'redux';
import LibraryReducer from './LibraryReducer';
import SelectionReducer from './SelectionReducer';
export default combineReducers ({
libraries: LibraryReducer,
selectedLibraryId: SelectionReducer
});
|
var express = require('express');
var app = express();
var ThaliAclDb = require('thali-acl'); // TODO: Make this configurable
app.get('/usersperrole:role', function (req, res) {
});
var server = app.listen(8085); // TODO: Make configurable
|
import React from 'react';
import {mount} from 'enzyme';
import {UsersPage} from './UsersPage'; //Using the undecorated component (In order to be able to test the component itself without having to deal with the decorator)
function setup() {
const props = {
actions: {
loadUsers: () => { //This is a mock/sp... |
version https://git-lfs.github.com/spec/v1
oid sha256:46317a572666f86d2380818e2d525bda73ad34284562a265686846e1c70e5c92
size 50083
|
/*
* 寻找发帖水王
* 一个数组,存在一个元素,个数超过数组个数的一般,找出该数
* 将复杂文件简化为小问题,然后再逐步解决这些小问题
*/
function findMoreHalf (arr) {
var candiate, nTime=0;
for(var i=0; i<arr.length; i++) {
if (nTime === 0) {
candiate = arr[i];
nTime++;
} else {
if (candiate === arr[i]) {
nTime++;
} else {
nT... |
var webpack = require('webpack')
var DevServer = require('webpack-dev-server')
var base = require('./demo-base')
var webConfig = base('vue', true)
var weexConfig = base('weex', true)
var port = process.env.DEMO_PORT | 3456
webConfig.entry = {
app: [
'./demo/src/render.js',
'./demo/src/app.js',
'webpack/h... |
/**
* # GameServer
* Copyright(c) 2018 Stefano Balietti
* MIT Licensed
*
* Parses incoming messages and emits correspondings events
*
* Contains methods that are instantiated / overwritten
* by two inheriting classes:
*
* - `AdminServer`
* - `PlayerServer`
*
* TODO: clearNode parameter is still flying ar... |
var SetOperatorNode = require("../SetOperatorNode");
module.exports = (function () {
var o = function (graph) {
SetOperatorNode.apply(this, arguments);
var that = this,
superDrawFunction = that.draw;
this.styleClass("complementof")
.type("owl:complementOf");
this.draw = function (elemen... |
'use strict';
module.exports = {
env: {
es6: true,
},
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
ecmaVersion: 2017,
sourceType: 'module',
},
rules: {
// require braces around arrow function bodies
'arrow-body-style': 'error',
// require pare... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.