code stringlengths 2 1.05M |
|---|
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w"
>
<LogMonitor />
<... |
/*
Project: sql-ajax-web-doc-reader
Author: Christopher Anzalone
File: xmlHttpReqDB.js
*/
var x = new XMLHttpRequest;
var chapter = 0;
x.onreadystatechange = function () {
if (x.readyState == 4 && x.status == 200) {
var infoRet = JSON.parse(x.responseText);
document.getElementById('i... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import autobind from 'autobind-decorator';
import styled from 'styled-components';
import color from '~/css/base/colors.scss';
import { LogoutIcon } from './icons';
const {
func, shape, number, strin... |
import '@storybook/react/addons';
import register from '../src/manager';
// data export url used by storybook to fetch component data
register({ dataUrl: 'https://assets.brand.ai/brand-ai/style/style-data.json?exportFormat=list' });
|
'use babel';
import Beckifier from '../lib/beckifier';
// Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.
//
// To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit`
// or `fdescribe`). Remove the `f` to unfocus the block.
describe('Beckifier', () => {
let workspa... |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var util = require('util');
var inspect = function(obj) {
console.log("INSPECT: "+util.inspect(obj, { colors: true }));
};
var setupServer = function setupServer(appConf, log4js) {
var logger = log4js.getLogg... |
import { t } from '../../src/locale';
export default {
methods: {
t(...args) {
return t.apply(this, args);
}
}
};
|
var bitcoin = require('bitcoin');
var crypto = require('crypto');
var fs = require('fs');
var jsonfile = require('jsonfile')
var request = require('request')
var client = new bitcoin.Client({
host: 'localhost',
port: '8332',
user: 'fred',
pass: 'fred'
});
var address1 = "mkqCZE3X1Yab7pHkg3FnVNvaYSx8p8N3Zs"
var... |
import { argv } from 'yargs'
import config from '../config'
import webpackConfig from './webpack.config'
import _debug from 'debug'
const debug = _debug('app:karma')
debug('Create configuration.')
const karmaConfig = {
basePath: '../', // project root in relation to bin/karma.js
files: [
{
pattern: `./$... |
'use strict';
var logToConsole = require('./modules/test.js');
logToConsole('Hello world!'); |
"use strict"
var SimpleSelector = require("./SimpleSelector.js")
class SimpleSelector_Tag extends SimpleSelector
{
constructor(content)
{
super(content)
this.symbol = "<"
this.type = "Tag"
}
/**
* @inheritDoc
*/
toCSS()
{
return this.content
}
}
... |
'use strict';
var init = require('../base/init');
var error = require('../base/error');
var expb = require('../express/express-base');
var userb = require('../user/user-base');
var usera = require('../user/user-auth');
expb.core.delete('/api/users/:id([0-9]+)', function (req, res, done) {
usera.checkUser(res, funct... |
const read_directory = require('read-directory')
const EventEmitter = require('events')
const chokidar = require('chokidar')
const yaml = require('js-yaml')
const utilities = require('./utilities.js')
const logging = require('homeautomation-js-lib/logging.js')
const _ = require('lodash')
const git = require('simple-git... |
// 手机号码验证
jQuery.validator.addMethod("isTel", function (value, element) {
var tel = /^1[3|4|5|7|8]\d{9}$/;
return this.optional(element) || (tel.test(value));
}, "请正确填写您的手机号码");
//邮箱 表单验证规则
jQuery.validator.addMethod("isUICEmail", function (value, element) {
//var mail = /^[a-z0-9._%-]+@([a-z0-9-]+\.)+[a-z]{2,... |
'use strict';
const gulp = require('gulp');
const istanbul = require('gulp-istanbul');
const CI = process.env.CI === 'true';
const OPTIONS_ISTANBUL = {
dir: './shippable/codecoverage/',
reportOpts: {cobertura: {dir: './shippable/codecoverage/', file: 'api-test-unit-cobertura.xml'}},
reporters: CI ? ['cobertura'... |
version https://git-lfs.github.com/spec/v1
oid sha256:58daeac864a688375b09f988c851f2aa42ed7091a173a6e644b80fa7424d7b78
size 2187
|
import * as types from '../constants/ActionTypes';
export function setOrderPage(data) {
return {
type: types.SET_ORDERPAGE,
orderPage: data
};
}
export function exchangeOrderPage(bfIdx, afIdx) {
return (dispatch, getState) => {
// exchange order
const data = [...getState()... |
/* istanbul ignore next */
import dbf from '@mhkeller/dbf'
export default function (file, writeOptions) {
writeOptions = writeOptions || {}
function toBuffer (ab) {
var buffer = new Buffer(ab.byteLength)
var view = new Uint8Array(ab)
for (var i = 0; i < buffer.length; ++i) {
buffer[i] = view[i]
... |
/**
* @flow
*/
'use strict';
import React, { Component } from 'react';
import {
StyleSheet,
View,
StatusBar,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import SectionTitle from './sectiontitle';
import Section from './section';
import Separator from './separator';
import N... |
import 'https://static.codepen.io/assets/embed/ei.js';
import { modules } from 'https://unpkg.com/wq';
import { renderers } from 'https://unpkg.com/@wq/markdown@next';
const React = modules.react;
const Code = renderers.code;
const COMMENT = `// wq.init(config).then(...);
/*
Note: when using wq locally, replace 'h... |
/**
* Created by Riven on 2016/12/15.
*/
var path = require('path');
var http = require('http');
var url = require('url');
var crypt = require('crypto');
var fs = require('fs-extra');
var ResourceServer = function(){
this._server = null;
};
module.exports = ResourceServer;
ResourceServer.prototype.getSpriteS... |
import React from "react";
import styled, { keyframes } from "styled-components";
import style from "../../assets/global-style";
const dance = keyframes`
0%, 40%, 100%{
transform: scaleY (0.4);
transform-origin: center 100%;
}
20%{
transform: scaleY (1);
}
`;
const Loading = styled.d... |
'use strict';
angular.module('graphAlgViz.version.version-directive', [])
.directive('appVersion', ['version', function(version) {
return function(scope, elm, attrs) {
elm.text(version);
};
}]);
|
module.exports = {
"key": "shelmet",
"moves": [
{
"learn_type": "tutor",
"name": "bug-bite"
},
{
"learn_type": "tutor",
"name": "gastro-acid"
},
{
"learn_type": "tutor",
"name": "signal-beam"
... |
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('save-button').addEventListener('click', function() {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id,{cmd: "save"});
});
});
});
document.addEventListener('D... |
import Ember from 'ember';
import { validator, buildValidations } from 'ember-cp-validations';
import ValidationErrorDisplay from 'ilios/mixins/validation-error-display';
import config from 'ilios/config/environment';
const { Mixin, RSVP } = Ember;
const { Promise } = RSVP;
const Validations = buildValidations({
ti... |
var express = require('express');
var router = express.Router();
var requirements = require('../../../lib/express_requirements');
router.get('/test', requirements.validate('route.simple_get'), function(req, res, next) {
return res.status(200).json({
success: true
});
});
router.get('/test/:id', requirements.v... |
'use strict'
angular.module('app.ui', ['ui.router']);
angular.module('app.ui').config(function($stateProvider){
$stateProvider
.state('app.ui', {
abstract: true,
data: {
title: 'UI Elements'
}
})
.state('app.ui.general', {
ur... |
contract('Access', function(accounts){
it('should set an address as solved', function(done){
var access = Access.deployed();
access.authorize( accounts[0], {
from:accounts[0],
gas:2000000
}).then(function(result){
}).then(done).catch(done... |
/**
* Very simple in-browser unit-test library, with zero deps.
*
* Background turns green if all tests pass, otherwise red.
* View the JavaScript console to see failure reasons.
*
* Example:
*
* adder.js (code under test)
*
* function add(a, b) {
* return a + b;
* }
*
* adder-test.html ... |
/*
* module_template.js
* Template for browser feature modules
*
* Michael S. Mikowski - mike.mikowski@gmail.com
* Copyright (c) 2011-2012 Manning Publications Co.
*/
/*jslint browser : true, continue : true,
devel : true, indent : 2, maxerr : 50,
newcap : true, nomen : true, plusplus : true,
... |
import _ from 'underscore';
import Vue from 'vue';
import SidebarMediator from '~/sidebar/sidebar_mediator';
import SidebarStore from '~/sidebar/stores/sidebar_store';
import SidebarService from '~/sidebar/services/sidebar_service';
import Mock from './mock_data';
describe('Sidebar mediator', function() {
beforeEach... |
export default Ember.Route.extend(
Ember.SimpleAuth.AuthenticatedRouteMixin, {
model: function() {
return this.store.createRecord('job');
},
actions: {
save: function(model) {
var _this = this;
model.save().then(function() {
_this.transitionTo('jobs.show', model);
}, functio... |
<script type="text/html" class="pluginConfigForm" id="state">
<ul class="list-group">
<form class="form-horizontal" role="form">
<form role="form">
<li class="list-group-item">
<h3>State</h3>
</li>
<li class="list-group-item">
... |
import {EMPTY, Subject, animationFrameScheduler, debounceTime, distinctUntilChanged, fromEvent, interval, map, mapTo, scan, switchMap, takeWhile, withLatestFrom} from 'rxjs'
import {compose} from 'compose'
import {v4 as uuid} from 'uuid'
import Keybinding from 'widget/keybinding'
import PropTypes from 'prop-types'
impo... |
/*!
* QUnit 1.20.0
* http://qunitjs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2015-10-27T17:53Z
*/
(function( global ) {
var QUnit = {};
var Date = global.Date;
var now = Date.now || function() {
return new Date().getT... |
'use strict';
var express = require('express');
var ledstrip = require('./../lib/ledstrip');
var router = express.Router();
var config = require('./../lib/config');
router.post('/test', function (req, res) {
var len = Number(req.param('length')),
start = Number(req.param('start')) || 0,
end = Number(req.par... |
import * as actions from './actions';
import {
chatCursor
}
from '../state';
import {
register
}
from '../dispatcher';
if (typeof io !== 'undefined') {
let socket = io();
}
export const dispatchToken = register(({
action, data
}) => {
switch (action) {
case actions.postMessage:
chatCursor(chat => {... |
// Karma configuration
// Generated on Thu May 12 2016 14:37:54 GMT-0700 (PDT)
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/k... |
import _ from 'underscore'
import MeasurementFilterModel from './MeasurementFilter'
class MeasurementListModel {
constructor () {
this._requestFilter = null
this._filter = null
this._columns = []
this._values = []
}
setRequestFilter (filter) {
if ( ! (filter instanceof MeasurementFilterModel)) {
throw... |
(function(){
var tm = '<div class="page-bar">'+
'<ul>'+
'<li v-if="cur!=1"><a @click="btnClick(cur-1)">上一页</a></li>'+
'<li v-for="index in indexs" v-bind:class="{ active: cur == index}">'+
'<a v-on:click="btnClick(index)">{{ index }}</a>'+
'</li>'+
... |
var WebSocket = require('ws');
var wss = new WebSocket.Server({
port: 8080
}, function() {
console.log('Listening');
var ws = new WebSocket('ws://localhost:8080');
});
wss.on('connection', function connection(ws) {
console.log("Connected");
console.log(ws.upgradeReq.url.slice(1).toLowerCase());
}); |
(function() {
'use strict';
var app;
app = angular.module('ngPostMessage', ['ng']);
app.provider('$postMessage', function() {
var $postMessageProvider = {
options: {
showConsole: false
},
$get: function() {
return angular.extend({}, $postMessageProvider.options);
}
... |
const path = require("path");
/**
* Render the app menu
* @returns {undefined}
*/
function render() {
console.log("Started: Menu rendering");
const menus = ['File', 'Edit', 'View'];
var template = [];
var menuBar = new nw.Menu({type: 'menubar'});
_.each(menus, function(menu) {
const con... |
/**
* # QUEUE
* Copyright(c) 2015 Stefano Balietti
* MIT Licensed
*
* Handles a simple queue of operations
*/
(function(JSUS) {
"use strict";
var QUEUE = {};
QUEUE.getQueue = function() {
return new Queue();
};
/**
* ## Queue constructor
*/
function Queue() {
... |
var app = require('..');
var request = require('supertest');
describe('Home page', function () {
describe('GET /', function () {
it('should response 200 OK', function (done) {
request(app)
.get('/')
.expect(200, done);
});
});
}); |
require('ts-node/register')
global.assert = require('assert')
global.ES_SUPPORT = require('./support/es-support')
var CallLog = require('../src/value/call-log').default
var StubbingRegister = require('../src/value/stubbing-register').default
module.exports = {
beforeAll: function () {
require('./support/custom-... |
/*
* app.js: Common utility functions for working with directories
*
* (C) 2011, Nodejitsu Inc.
* MIT LICENSE
*
*/
var utile = require('utile'),
async = utile.async,
mkdirp = utile.mkdirp,
rimraf = utile.rimraf,
constants = require('../constants');
var directories = exports;
//
// ### funct... |
(function(n,C,H,I){function D(b,a){this.element=b;t=n(b);this.options=n.extend({},E,a);this._defaults=E;this._name="WebCodeCam";this.init()&&(this.setEventListeners(),(this.options.ReadQRCode||this.options.ReadBarecode)&&this.setCallback())}var a,u,k,t,h,g,l={},e=n('<video style="position:absolute;visibility:hidden;di... |
module.exports = function (schema) {
const promise = require('bluebird');
return {
defineCreateExperimentSchema,
defineUpdateExperimentSchema,
defineCreateExperimentTaskSchema,
defineUpdateExperimentTaskSchema,
defineCreateExperimentNoteSchema,
defineUpdateExperi... |
/**
* DevExtreme (framework/navigation_devices.js)
* Version: 16.2.6
* Build date: Tue Mar 28 2017
*
* Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/
"use strict";
var $ = require("jquery"),
Class = require("..... |
var express = require('express');
var router = express.Router();
var fs = require('fs');
var jsonfile = require('jsonfile');
var session = require('express-session');
var request = require('request');
var SparqlClient = require('sparql-client');
var shell = require('shelljs');
var endpointPortNumber = process.argv.slic... |
const GelatoView = require('./view');
/**
* @class GelatoComponent
* @extends {GelatoView}
*/
const GelatoComponent = GelatoView.extend({
/**
* Instance variable to represent whether the component has fully loaded
* @type {Boolean}
*/
loaded: false,
/**
* Renders a component's template with a su... |
'use strict';
if (!MODULE) { var MODULE = {}; }
MODULE.Modal = (function() {
var MODAL_HIDE_TIME = 300;
var Modal = function() {
this.background = document.getElementById('modal');
this.modal = this.background.getElementsByClassName('modal')[0];
this.content = this.modal.getElementsByClassName('conte... |
var struct_tempest_1_1_graphics_subsystem_1_1_event =
[
[ "Type", "struct_tempest_1_1_graphics_subsystem_1_1_event.html#aee9c81a4df7bf24670fbec79fc13054d", [
[ "NoEvent", "struct_tempest_1_1_graphics_subsystem_1_1_event.html#aee9c81a4df7bf24670fbec79fc13054daaeebaee15a70b7270c8ad9a377a4a968", null ],
[ ... |
(function UMDish(name, context, definition) { context[name] = definition.call(context); if (typeof module !== "undefined" && module.exports) { module.exports = context[name]; } else if (typeof define == "function" && define.amd) { define(function reference() { return context[name]; }); }})("Primus", this, fun... |
"format register";
System.register("github:aurelia/metadata@0.3.1/system/origin", [], function(_export) {
"use strict";
var _prototypeProperties,
originStorage,
Origin;
function ensureType(value) {
if (value instanceof Origin) {
return value;
}
return new Origin(value);
}
return... |
VCO.Language = {
name: "Italiano",
lang: "it",
messages: {
loading: "caricare",
wikipedia: "da Wikipedia, la enciclopedia libera",
},
buttons: {
map_overview: "vista generale della mappa",
overview: "vista generale",
backtostart: "tornare all' in... |
// TAG: #notificationhubjs
//
// This object encapsulates the functions related to registering for notifications with the
// Azure Notification Hub. The client app code has been encapsulated here for ease of re-use.
// This object is used by the default.js file during app start-up to ensure notification registration... |
/*
* gaunt
* https://github.com/dariusk/gaunt
*
* Copyright (c) 2013 Darius Kazemi
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(data) {
var result = '',
output = '';
for (var i=0; i<data.length; i++) {
if (data.charCodeAt(i) === 9) {
result += '0';
}
i... |
import angular from 'angular';
import { UsersModule } from './users/users.module';
import { InstitutionsModule } from './institutions/institutions.module';
import { ProjectsModule } from './projects/projects.module';
import { CollectivesModule } from './collectives/collectives.module';
import { GeneralTopicsModule } fr... |
import React from 'react';
import ReactDOM from 'react-dom';
// import ReactTestUtils from 'react-dom/test-utils';
import { shallow, mount } from 'enzyme';
// import renderer from 'react-test-renderer';
import NavButton from '.';
describe('NavButton', () => {
let props;
let mountedNavButton;
let shallowN... |
var path = require('path');
var fs = require('fs');
var util = require('util');
var colors = require('colors');
var uploader = require('../lib/uploader.js').uploader;
var helper = require('../lib/helper.js');
var keypress = require('keypress');
keypress(process.stdin);
// 上传模式
var modes = {
// 1: '自动监听', // 2... |
'use strict';
var Promise = require('ember-cli/lib/ext/promise');
var assert = require('ember-cli/tests/helpers/assert');
var WEBHOOK_URL = 'https://hooks.slack.com/services/123123';
var CHANNEL = '#testing';
var USER_NAME = 'ember-cli-deploy';
describe('the index', function() {
var subject, mockUi, sandbox;
... |
import { name, actionTypes } from './constants';
import * as actions from './actions';
import { reducers } from './reducer';
// re-select
// import * as selectors from './selectors'
import MainSection from './components/MainSection';
export {
name,
actionTypes,
actions,
reducers,
// sagas,
MainSection,
}... |
'use strict';
/**
* @ngdoc function
* @name habilleToiApp.controller:HomeCtrl
* @description
* # HomeCtrl
* Controller of the habilleToiApp
*/
angular.module('habilleToiApp')
.controller('HomeCtrl', function () {
});
|
var Student = require('../models/students');
var express = require('express');
var router = express.Router();
var utils = require('../utils');
var async = require('async');
var passport = require('passport');
var _ = require('lodash');
var winston = require('winston');
var logger = new (winston.Logger)({
transports:... |
import { q as isTemplatePartActive, p as parts, k as render$1, t as templateCaches, v as marker, u as Template, T as TemplateInstance, r as removeNodes, m as TemplateResult } from './common/lit-html-9957b87e.js';
export { S as SVGTemplateResult, m as TemplateResult, h as html, s as svg } from './common/lit-html-9957b87... |
const test = require('tape');
const catcha = require('../src');
const {getTestData} = require('./utils');
test('catcha test -- easy module', (assert) => {
const settings = {
transforms: [
{key: 'resize', value: '240x100'},
{key: 'colorspace', value: 'gray'},
{key: 'negate'},
{key: 'thresho... |
EmberDeviseBootstrap.SignUpController = Ember.Object.extend({
email: null,
password: null,
passwordConfirmation: null,
//
// This action performs the sign up request with the provided
// credentials from the form.
//
signUp: function() {
try {
email = this.get('email');
password = this.... |
/* choona.js 1.3
(c) 2011-2013 Narendra Sisodiya, narendra@narendrasisodiya.com
choona.js is distributed under the MIT license.
For all details and documentation:
https://github.com/nsisodiya/choona.js
For demos using Choona.js
http://nsisodiya.github.com/Demo-Scalable-App... |
/*
* Tests for the appcache module.
*/
var appcache = require('../src/appcache.js').appcache;
//------------------------------------------------------------- Tests
// Setup
(function() {
console.log("Setting up the appcache test.");
console.log("");
console.log("NOTE: This is a visual test only... |
// This test file has no tests!
|
/*global defineSuite*/
defineSuite([
'Scene/GridImageryProvider',
'Core/Ellipsoid',
'Core/GeographicTilingScheme',
'Core/WebMercatorTilingScheme',
'Scene/ImageryProvider',
'Specs/pollToPromise',
'ThirdParty/when'
], function(
GridImageryProvider,
... |
describe('Chart.Controller', function() {
function waitForResize(chart, callback) {
var resizer = chart.chart.canvas.parentNode._chartjs.resizer;
var content = resizer.contentWindow || resizer;
var state = content.document.readyState || 'complete';
var handler = function() {
Chart.helpers.removeEvent(conte... |
var Modal = require('./components/modal');
var UI = require('./components/ui');
var uid = require('../shared/util/uid');
var extend = require('extend');
var distUrl = (function() {
var scripts = document.getElementsByTagName('script');
return scripts[scripts.length - 1].src.split('/').slice(0, -2).join('/');
}... |
$(document).ready(function(){
$("#id5").click(function(){
$("#id5").animate({
left : '85%',
opacity :'0',
},2000);
setTimeout(function a(){window.location="learncplusplus.php";},2000);
});
$("#id6").click(function(){
$("#id6").animate({
left : '85%',
opacity ... |
'use strict';
var floordate = require('floordate');
var d = new Date();
var v = floordate(d, 'year').getFullYear();
if ((v > 2015) && (v < 2075)) {
console.log('ok');
}
|
var firstnamePrefixes = [
"an", "bar", "ben", "ber",
"ca", "char", "chris", "deb", "don", "doro",
"ed", "el", "ga", "ge", "hel",
"ja", "jan", "jay", "je", "jen", "jess", "jo",
"ka", "ke", "ken", "lar", "lau", "lin",
"ma", "mar", "max",
"nan", "pan",
"sa", "san", "sha", "ste", "su",
"... |
angular.module('simulator').controller('snitch', ['$scope',
function($scope) {
$scope.simulatedActionDetailArray=
[
//can be part of text factory
'you are smart. It is advised that you remain such. You don\'t get points for not snitching. You get to keep your life.',... |
import { avalon, isArrayLike, isPlainObjectCompact, compaceQuote } from '../../src/seed/lang.compact'
describe('seed/lang', function () {
it('quote', function () {
expect(avalon.quote).toA('function')
expect(avalon.quote('1')).toBe('"1"')
expect(avalon.quote('foo\nbar\r\nbaz')).toBe('"foo... |
/*
JavaScript Snake
By Patrick Gillespie
http://patorjk.com/games/snake
*/
/**
* @module Snake
* @class SNAKE
*/
var SNAKE = SNAKE || {};
/**
* @method addEventListener
* @param {Object} obj The object to add an event listener to.
* @param {String} event The event to listen for.
* @param {Function} funct ... |
export const ic_add_circle_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"},"children":[]}]}; |
import React, { Component } from 'react';
import { View, Text, ScrollView, ActivityIndicator, StyleSheet } from 'react-native';
import ForecastBlock from './ForecastBlock';
export default class ForecastDayView extends Component {
constructor(props) {
super(props);
this.state = {
isLoading: true,
... |
import React, {Component, PropTypes} from 'react';
import Icon from '../icon';
import Images from '../images/images';
class SearchResults extends Component {
render() {
const {
searchText,
fetching,
searched,
loadingMore,
searchResults,
handleItemClick,
loadMore
} =... |
(function () {
'use strict';
describe('Armors Route Tests', function () {
// Initialize global variables
var $scope,
ArmorsService;
// We can start by loading the main application module
beforeEach(module(ApplicationConfiguration.applicationModuleName));
// The injector ignores leading ... |
import 'react-datepicker/dist/react-datepicker.css';
import '../App.css';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { reduxForm } from 'redux-form';
import { Form } from 'semantic-ui-react';
import DatePicker from 'react-datepicker';
import moment from 'moment';
import styled ... |
// --- Public functions --------------------------------------------------------
export const getCell = (world, x, y) => {
// this is often called function so we use for cycle because it has superior
// performance compared to Array.prototype.find
for (let i = 0; i < world.length; i++) {
const cell = world[i... |
// Copyright (c) 2015 Uber Technologies, Inc.
//
// 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... |
'use strict';
angular.module('pumprApp')
.factory('fireflowFactory', function (agsServer) {
// Service logic
// ...
var flowLog = [];
var formStatus = false;
// Public API here
return {
find: function (latlng) {
var options = {
params: {
f: 'json',
... |
/*
* DropD jQuery Dropdown v1.0.2
* https://github.com/fjcastil/DropD
*
* Copyright (c) 2015 Frank Castillo
* Dual licensed under the MIT and GPL licenses.
* http://opensource.org/licenses/MIT
* http://opensource.org/licenses/GPL-3.0
*
* Date: 2015-09-03 17:34:21 -0500 (Thu, 03 Aug 2015)
* Revision:... |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of sou... |
var cuwebctmulti = {
onLoad: function() {
// initialization code
this.initialized = true;
this.strings = document.getElementById("cuwebctmulti-strings");
},
onMenuItemCommand: function(e) {
var cookieManager = Components.classes["@mozilla.org/cookiemanager;1"]
.getSer... |
module.exports = {
type: 'document',
children: [
doc('HTML\nPUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"'),
text('\n\n'),
comment('One line'),
text('\n'),
comment('Multi\n line'),
text('\n\n'),
tag('div', {
... |
'use strict';
/*
* ItemsView.
* As output, Observable of vtree (Virtual DOM tree).
* As input, ItemsModel.
*/
var Rx = require('rx');
var h = require('virtual-hyperscript');
var replicate = require('mvi-example/utils/replicate');
var modelItems$ = new Rx.BehaviorSubject(null);
var itemWidthChanged$ = new Rx.Subjec... |
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
import {
defineJQueryPlugin,
getElement... |
var workqueue = require('../lib/workqueue'),
cluster = require('cluster');
if (cluster.isMaster) {
var producer = new workqueue.Producer();
producer.post('job', { test: 'hello' }, function (err) {
console.log("result: %s", err);
});
} else if (cluster.isWorker) {
var consumer = new workque... |
/*!
* Validator v0.9.0 for Bootstrap 3, by @1000hz
* Copyright 2015 Cina Saffary
* Licensed under http://opensource.org/licenses/MIT
*
* https://github.com/1000hz/bootstrap-validator
*/
+function ($) {
'use strict';
// VALIDATOR CLASS DEFINITION
// ==========================
var Validator = function (e... |
//NOTE: obviously, this shouldn't be in this folder. It's late and I'm bad at organizing.
const bodyParser = require('body-parser').json();
// const Interaction = require('./lib/models/interactionModel');
const popMutuals = require('./lib/popMutuals');
const router = require('express').Router();
module.exports = rou... |
function apiModifyTable(originalData, id, response) {
angular.forEach(originalData, function(item, key) {
if (item.id == id) {
originalData[key] = response;
}
});
return originalData;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.