code stringlengths 2 1.05M |
|---|
var Cards = require('../Cards');
var getWinner = function(state) {
var winners = state.players.filter(function(player) {
return player.hole_cards != undefined && player.amount_won != undefined;
});
if (winners.length == 0) {
// Not last round
return undefined;
}
return {
hand: winners[0].hole_car... |
function mergeRoute(original, template) {
const result = { ...original };
for (const key in template) {
const templateValue = template[key];
if (typeof templateValue == 'function') {
const originalValue = original[key];
if (originalValue) {
result[key] = ... |
require('babel-register');
require('./global');
const getenv = require('getenv');
const env = require('../config/expose');
global.CONFIG = getenv.multi(env).default;
require('../src/utils/seeder.runner')
.default('./src/seeds/');
|
app.controller('ProgramsController', function($scope, programs) {
$scope.chart = {
data: {
series: [],
labels: []
},
options: {
distributeSeries: true,
horizontalBars: true,
height: '400px',
axisY: {
offs... |
import svgMarkup from './PhoneIcon.svg';
import React from 'react';
import Icon from '../private/Icon/Icon';
export default function PhoneIcon(props) {
return <Icon markup={svgMarkup} {...props} />;
}
PhoneIcon.displayName = 'PhoneIcon';
|
const Joi = require('joi');
module.exports = {
VerifyMember: {
email: Joi.string().email().required(),
password: Joi.string().required()
},
CreateMember: {
name: Joi.string().required(),
email: Joi.string().email().required(),
password: Joi.string().required()
},
UpdateProfile: {
email: Joi.string().e... |
require('proof')(1, async okay => {
await require('./harness')(okay, 'idbcursor_update_objectstore4')
await harness(async function () {
var db,
t = async_test()
var open_rq = createdb(t);
open_rq.onupgradeneeded = function(e) {
db = e.target.result;
va... |
require('file?name=fontawesome-webfont.eot!font-awesome/fonts/fontawesome-webfont.eot');
require('file?name=fontawesome-webfont.svg!font-awesome/fonts/fontawesome-webfont.svg');
require('file?name=fontawesome-webfont.ttf!font-awesome/fonts/fontawesome-webfont.ttf');
require('file?name=fontawesome-webfont.woff!font-awes... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2016 DeNA Co., Ltd.
*
* 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 u... |
import fetch from 'isomorphic-fetch';
import handleResponse from '../utils/fetchHandler';
import API_BASE from '../utils/APIBase';
export const LOAD_USER_REQUEST = 'LOAD_USER_REQUEST';
export const LOAD_USER_SUCCESS = 'LOAD_USER_SUCCESS';
export const LOAD_USER_FAILURE = 'LOAD_USER_FAILURE';
async function get(userna... |
import React from 'react';
import { shallow, mount } from 'enzyme';
import Nav from '../lib/Nav';
describe('Nav', () => {
const clickNavFn = jest.fn();
const wrapper = shallow(<Nav
sevenClicked = { clickNavFn }
tenClicked = { clickNavFn }
cityClicked = { clickNavFn }/>)
const mountWrap = mount(<Nav... |
var pjson = require("./package.json");
var config = require("./config/general");
var socket_config = require("./config/general");
var log = require("winston")
var cluster = require('cluster');
var http = require('http');
var numCPUs = require('os').cpus().length;
var Server = require("./scripts/server");
var Socket... |
import toString from './toString';
/** Used to generate unique IDs. */
var idCounter = 0;
/**
* Generates a unique ID. If `prefix` is given the ID is appended to it.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {string} [prefix=''] The value to prefix the ID with.
* @returns {string} Ret... |
/* @flow */
import Extractor from './Extractor';
export default (content: string, options: ?DoctrineOptions): Array<CommentObject> => {
const extractor = new Extractor(options);
return extractor.extract(content);
};
|
/* */
var combine = require("./index");
var Benchmark = require("benchmark");
var fs = require("fs");
var point = require("turf-point");
var linestring = require("turf-linestring");
var polygon = require("turf-polygon");
var featurecollection = require("turf-featurecollection");
var pt1 = point(50, 51);
var pt2 = poin... |
var ReportGraphSingleStudent = React.createClass({displayName: "ReportGraphSingleStudent",
selectStudent: function( msg, data ){
console.log( msg, data );
this.setState({currentStudent: data});
},
componentWillMount: function() {
console.log("ReportGraphSingleStudent componentWillMount");
var toke... |
// OAuth2 template
module.exports = function(idValue, secretValue) {
// github - http://developer.github.com/
var config = {};
config.enabled=true;
config.type='oauth-2.0';
config.authorizationUrl = 'https://github.com/login/oauth/authorize';
config.accessTokenUrl = 'https://github.com/login/oauth/access_t... |
import { escapeKey, unescapeKey } from 'shared/keypaths';
import { addToArray, removeFromArray } from 'utils/array';
import { isArray, isObject, isFunction } from 'utils/is';
import bind from 'utils/bind';
import { create, keys as objectKeys } from 'utils/object';
const shuffleTasks = { early: [], mark: [] };
const re... |
'use strict';
const assert = require('assert');
const mm = require('egg-mock');
const request = require('supertest');
const sleep = require('mz-modules/sleep');
const fs = require('fs');
const path = require('path');
const Application = require('../../lib/application');
const utils = require('../utils');
describe('te... |
'use strict';
angular
.module('playlistApp')
.controller('PlaylistCtrl', PlaylistCtrl);
angular
.module('playlistApp')
.controller('PlaylistListCtrl', PlaylistListCtrl);
function PlaylistCtrl (Playlist, YoutubePlayerService, Queue, $routeParams, $scope, $log) {
$scope.playlist = Playlist.query({
id: $... |
'use strict';
/**
* Module dependencies
*/
var fiteHubPolicy = require('../policies/fiteHub.server.policy'),
fiteHub = require('../controllers/fiteHub.server.controller');
module.exports = function (app) {
// FiteHub collection routes
app.route('/api/fiteHub').all(fiteHubPolicy.isAllowed)
.get(fiteHub.lis... |
/*
Copyright 2013-2014 appPlant UG
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache Lic... |
import MediaStates from './app/MediaStates'
import SoundPlayer from './app/SoundPlayer'
import SoundRecorder from './app/SoundRecorder'
export default { MediaStates, SoundPlayer, SoundRecorder } |
'use strict';
const events = require('events');
const util = require('util');
const _ = require('lodash');
const UrlMapper = require('../../url-mapper');
const ObjectGroup = require('../object-group');
const consoleTracker = module.exports = new events.EventEmitter();
consoleTracker.buffer = [];
function addToCo... |
/*!
* Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.
*/
// Too much stuff can go wrong with during call cleanup, so it's really helpful
// to log what it's doing
/* eslint-disable no-console */
import {Call} from '@ciscospark/plugin-phone';
import sinon from '@ciscospark/test-helper-sinon';
import {m... |
/*jslint node: true */
/*global angular */
'use strict';
angular.module('ct.clientCommon')
.constant('RESOURCE_CONST', (function () {
var model = ['path', 'type', 'storage', 'factory'], // related to ModelProp
schemaModel = ['schema', 'schemaId', 'resource'].concat(model), // related to Schema & ModelPr... |
import { LitElement, html, css } from 'lit-element'
import { repeat } from 'lit-html/directives/repeat.js'
import { store } from '../../reduxStore.js'
import { connect } from 'pwa-helpers/connect-mixin.js'
import './timeline-animation.js'
import { getAnimation, getAnimations, getLive } from '../../selectors/index.js'
i... |
/*
@property id {String} The id by which you'll reference this expression.
@property caption {String} The alt text that will appear for this image. Primarily used for accessability.
@property src {String} The path to the image, relative to the `public` directory.
Example:
{
id: 'steven--jumping',
ca... |
'use strict';
import Settings from 'settings';
var settings = new Settings();
window.settings = settings;
// TODO: automatically save settings to localStorage
settings.observe('*', (prop, oldVal, newVal) => console.log(prop, oldVal, newVal));
export default settings;
|
/**
@module ember-data
*/
import Ember from 'ember';
import Model from 'ember-data/model';
import { assert, warn, runInDebug } from "ember-data/-private/debug";
import _normalizeLink from "ember-data/-private/system/normalize-link";
import normalizeModelName from "ember-data/-private/system/normalize-model-name";
im... |
'use strict';
var info = require('../');
var should = require('should');
describe('browser-info', function() {
it('should return info', function(done) {
global.navigator = {
userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 Safari/537.36',
};
s... |
'use strict';
var mongoose = require('mongoose-bird')(),
Schema = mongoose.Schema;
var CurrenttaskSchema = new Schema({
name: String,
totalSeconds:Number,
date: Date,
started: Boolean,
userId: Schema.Types.ObjectId,
workStream: Schema.Types.ObjectId
});
module.exports = mongoose.model('Currenttask', ... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 18H7V6h10v12z" />
, 'StayCurrentPortraitRounded');
|
/* eslint no-param-reassign: 0 */
import expressJwt from 'express-jwt';
import jwt from 'jsonwebtoken';
import crypto from 'crypto';
import config from '../../config';
import { getUserFromRefreshToken, register, saveRefreshToken } from '../db/user-repository';
const defaultTokenTime = 1800;
// authorizes, d... |
const logger = require('winston');
const app = require('./app');
const port = app.get('port');
const server = app.listen(port);
process.on('unhandledRejection', (reason, p) =>
logger.error('Unhandled Rejection at: Promise ', p, reason)
);
server.on('listening', () =>
logger.info(
'Feathers application started... |
define(['joga', 'text!Inspector.html'], function (joga, html) {
function Inspector() {
this.inspectee = joga.objectProperty(window);
this.element = joga.elementProperty(html);
}
Inspector.prototype.properties = function () {
var properties = [];
for (var pr... |
/// <reference path="../../../src/bobril.d.ts"/>
var GameOfLifeApp;
(function (GameOfLifeApp) {
var HeaderLevel;
(function (HeaderLevel) {
HeaderLevel[HeaderLevel["H1"] = 0] = "H1";
HeaderLevel[HeaderLevel["H2"] = 1] = "H2";
HeaderLevel[HeaderLevel["H3"] = 2] = "H3";
})(HeaderLevel =... |
{
if (node instanceof HTMLShadowElement) return;
if (node instanceof HTMLContentElement) {
var content = node;
this.updateDependentAttributes(content.getAttribute("select"));
var anyDistributed = false;
for (var i = 0; i < pool.length; i++) {
var node = pool[i];
if (!node) continue;
... |
/**
* Created by gt60 on 13-11-12.
*/
var ZorderTouchMenu = cc.Menu.extend({
ctor:function (){
cc.Menu.prototype.ctor.call(this);
this.initWithItems();
},
_itemForTouch:function (touch) {
var touchLocation = touch.getLocation();
var itemChildren = this.children, locItemChil... |
import * as actionTypes from "../actionTypes";
const serverDataInitialState = {};
export default function (state = serverDataInitialState, action) {
switch (action.type) {
case actionTypes.serverData.SET:
return action.data;
case actionTypes.serverData.UPDATE: {
let { server, data } = action;
if (data... |
define(function (require) {
const
ko = require("knockout"),
site = require("engine/common/framework");
var EditViewModelBase = function (dirtyProperties) {
this.errors = ko.validation.group(dirtyProperties, { deep: true, live: true });
this._dirtyFlag = new ko.DirtyFlag(dirtyPr... |
var OfflinePlugin = require(__ROOT__);
var path = require('path');
var deepExtend = require('deep-extend');
var DefinePlugin = require('webpack/lib/DefinePlugin');
var compare = require('./compare');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = function(OfflinePlu... |
import React, { PureComponent } from 'react';
export default class States extends PureComponent {
props: {
states: any[],
selected: string,
id: string,
noLabel: boolean,
onChange: (e: SyntheticEvent) => void,
};
render() {
const { states, onChange, id, sele... |
import React from "react";
import { shallow } from "enzyme";
import renderer from "react-test-renderer";
import { spy } from "sinon";
import AddButton from "../../app/components/AddButton";
describe("Add Button component", () => {
it("should be defined", () => {
expect(AddButton).toBeDefined();
});
it("Shou... |
var ursa = require('ursa');
var toPEM = require('ssh-key-to-pem');
var inherits = require('inherits');
var BlockStream = require('block-stream');
var combine = require('stream-combiner2');
var through = require('through2');
var defined = require('defined');
exports.encrypt = function (pub, opts) {
if (!opts) opts ... |
// @flow
import * as npm from '../npm';
import Project from '../../Project';
import * as processes from '../processes';
import fixtures from 'fixturez';
import containDeep from 'jest-expect-contain-deep';
const f = fixtures(__dirname);
jest.mock('../logger');
jest.mock('../processes');
let REAL_ENV = process.env;
... |
import deepFreeze from 'deep-freeze';
import {
narozeniSortMethod,
prijmeniJmenoNarozeniSortMethod,
reverseSortDirType,
sortForColumn,
SortDirTypes,
} from './sort';
const narozeniSortMethodDescending = (a, b) => narozeniSortMethod(a, b, true);
const data = [
{
prijmeni: 'Balabák',
jmeno: 'Roman',... |
import { on } from './event';
import promiseFn from './promise';
import { query } from './selector';
import { getCssVar } from './style';
export function bind(fn, context) {
return function (a) {
var l = arguments.length;
return l ? l > 1 ? fn.apply(context, arguments) : fn.call(context, a) : fn.ca... |
'use strict';
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var defaultMessage = '\nGatsby is currently using the default _template. You can override it by\ncreating a React component at "/... |
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
app.get('/', function(req, res){
res.sendFile(__dirname + '/Chat');
// res.send('<h1>Hello world</h1>');
});
// http.listen(3000, funcion(){
io.listen(3000, function(){
console.log('listening on *:... |
'use strict';
const expect = require('chai').expect;
const coMocha = require('co-mocha');
const VError = require('verror');
const Tree = require('../lib/tree');
const SrcCollection = require('../lib/src-collection');
const Logger = require('shark-logger');
co... |
'use strict';
var tempresultModule = angular.module('tempresult');
tempresultModule.controller
('tempresultController',
['$scope',
'$http',
'$location',
'Authentication',
'Tempresult',
'ngTableParams',
'$modal',
'$log',
'ConvertArray',
function($scope, $http, $location, Authentication, Tempresult,... |
import Ember from 'ember';
import zfWidget from 'ember-cli-foundation-6-sass/mixins/zf-widget';
export default Ember.Component.extend(zfWidget, {
/** @member tag type */
tagName: 'ul',
/** @member Class names */
classNames: ['vertical', 'menu'],
/** @member Attribute bindings */
attributeBindings: ['d... |
/**
* Copyright (c) 2015-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.
*
* @flow
*/... |
define(['iframeResizer'], function(iFrameResize) {
describe('Scroll Page', function() {
var iframe
var log = LOG
beforeEach(function() {
loadIFrame('iframe600.html')
})
afterEach(function() {
tearDown(iframe)
})
it('mock incoming message', function(done) {
iframe = iFr... |
import * as Utils from './utils'
import * as Evaluators from './evaluators'
import * as Nodes from './nodes'
import * as Parser from './parser'
import ColorScale from './ColorScale'
import ValueType from './ValueType'
import BlendMode from './BlendMode'
Parser.parser.yy = Nodes
export function evaluate(exp... |
'use strict';
import React from 'react'
import reactCSS from 'reactcss'
import map from 'lodash/map'
import throttle from 'lodash/throttle'
import markdown from '../helpers/markdown'
import { Grid } from '../../../react-basic-layout'
import MarkdownTitle from './MarkdownTitle'
import Markdown from './Markdown'
import... |
import RectangleTexture from "openfl/display3D/textures/RectangleTexture";
import Context3DTextureFormat from "openfl/display3D/Context3DTextureFormat";
import Stage3DTest from "./../../display/Stage3DTest";
import * as assert from "assert";
describe ("ES6 | RectangleTexture", function () {
it ("uploadFromBitmap... |
const webpack = require('webpack');
const merge = require('webpack-merge');
const development = require('./dev.config.js');
const production = require('./prod.config.js');
const developmentSSR = require('./dev.ssr.config.js');
const path = require('path');
const TARGET = process.env.npm_lifecycle_event;
process.env.BA... |
export default function ( component ) {
var ancestor, query;
// If there's a live query for this component type, add it
ancestor = component.root;
while ( ancestor ) {
if ( query = ancestor._liveComponentQueries[ '_' + component.name ] ) {
query.push( component.instance );
}
ancestor = ancestor._parent;
... |
var MemoryStream = require('memorystream');
var GlitchedStream = require('glitch').GlitchedStream;
var fs = require('fs');
module.exports = function(grunt) {
grunt.registerMultiTask('glitch', 'Clean files and folders.', function() {
var options = this.options({
enabled : false,
deviation: 2,
p... |
module.exports = function(grunt) {
// Add our custom tasks.
grunt.loadTasks('../../../tasks');
// Project configuration.
grunt.initConfig({
zaproxyStart: {
options: {
port: 8081
}
},
zaproxyStop: {
options: {
port: 8081
}
}
});
// Default task.
grun... |
// Generated by CoffeeScript 1.8.0
(function() {
'use strict';
/*
WorkQueueMgr Example -- provider03
For each string in the two expectedItems lists, this app sends it
into either 'demo:work-queue-1' or 'demo:work-queue-2' for consumption by worker03.
When done with that, it quits.
Usage:
cd dem... |
var mutuationMethodModel = new Vue({
el: '#app',
data: {
items: [
]
}
})
|
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp", "mk", {title: "Инструкции за пристапност", contents: "Содржина на делот за помош. За да го затворите овој дијалот притиснете ESC.", lege... |
import CycleBase, {
CycleExecution,
CycleSetup,
DisposeFunction,
} from '@cycle/base';
import KefirAdapter from './adapter';
/**
* Takes a `main` function and circularly connects it to the given collection
* of driver functions.
*
* **Example:**
* ```js
* import {run} from 'cyclejs-kefir';
* const dispose =... |
// @flow
import Bugsnag from 'bugsnag-js';
import config from 'config';
Bugsnag.apiKey = config.bugsnagAPIKey;
export const reportError = (err: Error) => Bugsnag.notifyException(err);
export default {
reportError,
};
|
export default () => ({
path: '*',
/* Async getComponent is only invoked when route matches */
getComponent (nextState, cb) {
/* Webpack - use 'require.ensure' to create a split point
and embed an async module loader (jsonp) when bundling */
require.ensure([], (require) => {
... |
'use strict';
const EventEmitter = require('events');
function hasOwnProperty(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
/**
* 构造器,传入限流值,设置异步调用最大并发数
* Examples:
* ```
* var bagpipe = new Bagpipe(100);
* bagpipe.push(fs.readFile, 'path', 'utf-8', function (err, data) {
* // TODO
*... |
// source: lospec.com
_palettes = {
"2bit-catgirls-rise":"#162c27,#534650,#6f9b8a,#ead7be",
"ice-cream-gb":"#7c3f58,#eb6b6f,#f9a875,#fff6d3",
"kirokaze-gameboy":"#332c50,#46878f,#94e344,#e2f3e4",
"rustic-gb":"#2c2137,#764462,#edb4a1,#a96868",
"mist-gb":"#2d1b00,#1e606e,#5ab9a8,#c4f0c2",
"hallowpumpkin":"#300030,#... |
var assert = require('assert');
var convert = require('../js/convert.js');
describe('convert', function() {
describe('datePickerFormatTest', function() {
it('should return dd.mm.yyyy for date format d.m.Y', function() {
assert.equal(convert.datepicker_format('d.m.Y'), 'dd.mm.yyyy');
})... |
'use strict';
var expect = require('chai').expect;
var colorString = require('../src/utils/color_string');
describe('color_string.js', function() {
it("works", function(){
expect(colorString("someString")).to.equal("#4D5D13")
})
})
|
/* vim:st=2:sts=2:sw=2:
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://... |
require.config({
paths: {
angular: '../../bower_components/angular/angular',
domReady: '../../bower_components/requirejs-domready/domReady',
angularRoute: '../../bower_components/angular-route/angular-route',
uiBootstrap: '../../bower_components/angular-bootstrap/ui-bootstrap-tpls',
... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
User = mongoose.model('User'),
async = require('async'),
config = require('meanio').loadConfig(),
crypto = require('crypto'),
nodemailer = require('nodemailer'),
templates = require('../template'),
_ = require('lodash'),
... |
import React from 'react';
import ReplSuggestions from './components/ReplSuggestions';
import ReplPreferences from './components/ReplPreferences';
import Repl from './components/Repl';
import ReplConstants from './constants/ReplConstants';
import ReplFonts from './common/ReplFonts';
import _ from 'lodash';
import remot... |
import PropTypes from 'prop-types';
export default {
directionsService: PropTypes.object,
directionsDisplay: PropTypes.object,
google: PropTypes.object,
map: PropTypes.object,
};
|
/**
* Session Configuration
* (sails.config.session)
*
* Sails session integration leans heavily on the great work already done by
* Express, but also unifies Socket.io with the Connect session store. It uses
* Connect's cookie parser to normalize configuration differences between Express
* and Socket.io and hoo... |
<<<<<<< HEAD
function drawDataChart() {
$.ajax({
url: '../v1.0/id/1/ch/1/dp',
type: 'GET',
async: true,
dataType: 'json',
success: function(data, textStatus)
{
var dataJSON = JSON.parse(data);
var dataArray = new Array();
for (var i=0; i<dataJSON.length; i++) {
dataArray[i] = parseFloat(dataJS... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
// NOTE object below must be a valid JSON
window.BookShelf = $.extend(true, window.BookShelf, {
"config": {
"layoutSet": "navbar",
"navigation": [
{
"title": "To Read",
"onExecute": "#LaterList",
"icon": "bsicon bsicon-toread"
},
{
"title": "Finished",
... |
'use strict';
var gulp = require('gulp');
var del = require('del');
gulp.task('reset', ['clean'], function (done) {
del([global.path.src + '/lib/jspm', 'node_modules', '.sass-cache'], done);
});
|
import React from 'react';
import ReactDOM from 'react-dom';
import MonkeyUi from '../../lib/monkeyui.js';
// Upload, Icon, Modal
const {Upload,Icon,Modal,Button,PreviewPicture}=MonkeyUi;
/*
资助图片列表
诊疗图片列表
[
{
name:'typeName',
zlList:[]
}
]
*/
class PicturesWall extends React.Component {
co... |
fs = require('fs');
console.log('module.exports=' + JSON.stringify(
fs.readFileSync(process.argv[2]).toString()));
|
/* =========================================================
* 基于bootstrap-alert的提示框组件
* huweixuan
* ========================================================= */
define(function(require) {
var $ = require('jquery');
require('bootstrap');
var Alert = function() {
//this.init();
};
Aler... |
import React from "react";
import { render } from "react-dom";
import { Provider } from "react-redux";
import { Router, browserHistory } from "react-router";
import routes from "./routes";
import configureStore from "./store/configureStore";
import { syncHistoryWithStore } from 'react-router-redux';
import "./public/m... |
var HTMLService = (function () {
var productsList;
var totalPrice;
function updateCart(products) {
updateList(products);
updateTotalPrice(products);
}
function updateTotalPrice(products) {
calculateTotalPrice(products);
var a = document.getElementById('totalPrice')... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M10 10v5h2V4h2v11h2V4h2V2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4zm-2 7v-3l-4 4 4 4v-3h12v-2H8z" /></g>
, 'FormatTextdirectionRToL');
|
import React from 'react';
import $ from 'jquery';
import fecha from 'fecha';
import { Link } from 'react-router-component';
import i18next from 'i18next';
import Constants from './../../constants';
import EpisodeCard from './../episodeCard';
module.exports = React.createClass({
propTypes: {
slug: React.PropT... |
import React from "react"
import Link from "gatsby-link"
import { rhythm } from "../utils/typography"
const MainLayout = ({ children, location }) => (
<div
css={{
maxWidth: 600,
margin: `0 auto`,
padding: `${rhythm(1)} ${rhythm(3 / 4)}`,
}}
>
{location.pathname !== `/` && (
<h4... |
import {
sanitizeAuthor,
sanitizeCategories,
sanitizeId,
sanitizeImages,
sanitizeIsOfficial,
sanitizeKeywords,
sanitizeLogo,
sanitizeMinimumVersion,
sanitizePermissions,
sanitizeSize,
sanitizeSource,
sanitizeTitle,
sanitizeUrls,
sanitizeVersion
} from './config-sanitizers'
export class Plug... |
aethernauts.service('world', ['renderer', function(renderer) {
var service = {};
service.data = null;
return service;
}]);
|
import test from 'ava'
import { isNumber, isObject, isString, isUrl } from './matchers'
import queryWithFragments from './fixtures/queryWithFragments'
import mock from '../src/index'
test('it can mock a query with a nested fragment', t => {
const { avatar } = mock(queryWithFragments)
t.true(isObject(avatar))
... |
import isAndroid from './isAndroid'
const mockUserAgent = (userAgent) => {
Object.defineProperty(navigator, 'userAgent', { value: userAgent, writable: true })
}
const mockUndefinedNavigator = () => {
Object.defineProperty(global, 'navigator', { value: undefined, writable: true })
}
describe('isAndroid', () => {
... |
/*
* Copyright (c) 2016-present, Parse, LLC
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import React from 'react';
import Field from 'components/Field/Field.react';
import Fieldset from 'components/Fie... |
import React from 'react'
import PropTypes from 'prop-types'
import { FormattedMessage } from 'react-intl'
import { Flex } from 'rebass/styled-components'
import { Text } from 'components/UI'
import { CryptoSelector, CryptoValue } from 'containers/UI'
import messages from './messages'
const ChannelBalance = ({ channel... |
<%- banner %>
import * as axMocks from 'laxar-mocks';
describe( 'The <%= name %>', () => {
beforeEach( axMocks.setupForWidget() );
beforeEach( () => {
axMocks.widget.configure( {} );
} );
beforeEach( axMocks.widget.load );
afterEach( axMocks.tearDown );
////////////////////////////////////... |
var searchData=
[
['callaction',['callAction',['../index_8php.html#a6e8525da6dad002542958c13132118e4',1,'index.php']]],
['checkusercanedittasks',['checkUserCanEditTasks',['../tasks_8php.html#a17b2ff0082f478470dc8ca4d28b6568f',1,'tasks.php']]],
['connect',['connect',['../classDB.html#a031c0b13b6803f486c377a4c98774... |
// @flow
export function longString(str: string, nb: number) {
if (str.length > nb) {
return str.slice(0, nb) + '...';
}
else {
return str;
}
}
|
const fs = require('fs')
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware')
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware')
const ignoredFiles = require('react-dev-utils/ignoredFiles')
const redirectServedPath = require('react-dev-utils/redirect... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.