code stringlengths 2 1.05M |
|---|
const axios = require(`axios`)
const _ = require(`lodash`)
const { createRemoteFileNode } = require(`gatsby-source-filesystem`)
const { URL } = require(`url`)
const { nodeFromData } = require(`./normalize`)
const asyncPool = require(`tiny-async-pool`)
exports.sourceNodes = async (
{ actions, store, cache, createNode... |
/**
* @file 初始化Editor设置
* @author mengke01(kekee000@gmail.com)
*/
import setSelectedCommand from '../command/setSelectedCommand';
import commandList from '../menu/commandList';
import lang from 'common/lang';
function initSetting(options) {
// 设置菜单选中状态
setSelectedCommand(
commandList.editor, 'set... |
module.exports = function (grunt) {
grunt.loadNpmTasks('catena');
grunt.config.init({
catena: {
options: {
license: 'LICENSE'
},
dev: {
src: ['js/'],
dest: 'dist/app.js',
options: {
w... |
/**
* Created by siddharthsharma on 5/21/16.
*/
var React = require('react');
var AppStore = require('../stores/app-store');
var StoreWatchMixin = function(cb){
return {
getInitialState:function(){
return cb(this)
},
componentWillMount:function(){
AppStore.addChang... |
import Ember from 'ember';
const { run } = Ember;
export default function destroyApp(application) {
run(application, 'destroy');
}
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const baseResource_1 = require("./baseResource");
/**
* Workflow REST resource for retrieving workflows.
*
* @constructor Workflow
* @property {IConnector} connector the jira connector instance
*/
class Workflow extends baseResource_1.bas... |
const webpack = require('webpack')
const path = require('path')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = function (env) {
return {
entry: {
main: './src/index.js',
},
output: {
filename: '[name].js', // name 与 entry 中的属性一一对应
path: path.resolve(__dirname... |
//upvote.js
'use strict';
eventsApp.directive('dateKeys', function() {
return {
restrict: 'A',
link: function(scope, element, attrs, controller){
element.on('keydown', function(event){
if (isNumericKeyCode(event.keyCode) || isForwardSlashKeyCode(event.keyCode) || isNavigationKeyCode(event.keyCode)) {
... |
var form=document.querySelector('form');
var request=new XMLHttpRequest();
request.upload.addEventListener('progress',function(e)
{
console.log(e.load/ e.total*100 + 'percent');
},false);
request.addEventListener('loaded',function(e)
{
console.log(JSON.parse(e.target.responseText))... |
//@tscheck
global.jQuery = require('jquery');
require('bootstrap');
require('jquery-ui');
var React = require('react');
require('react-dom');
var Placeholder = require("sitecore.react.placeholders");
var Components = require('expose?Components!./views'); |
var pkg = require('../package.json');
var fs = require('fs');
var DISCOURSE_FILE = __dirname + '/DISCOURSE_POST_URL';
module.exports = {
dist: 'dist',
releasePostUrl: fs.readFileSync(DISCOURSE_FILE).toString(),
releasePostFile: DISCOURSE_FILE,
protractorPort: 8876,
banner:
'/*!\n' +
' * Copyright ... |
"use strict";
(function() {
var that;
dom.screenVideo[ 0 ].crossOrigin = "anonymous";
api.video = that = {
isStopped: true,
isPlaying: false,
play: function() {
if ( !that.isPlaying ) {
var file = api.playlist.selectedFile();
if ( api.isLoaded || api.isLoading ) {
that.isStopped = false;
that.is... |
/**
* Input: "23"
Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].
* @param {string} digits
* @return {string[]}
*/
var letterCombinations = function(digits) {
if (digits == '') return [];
strArr = [];
strNum = digits.toString();
nextStr = strNum.substring(1, strNum.length);
if... |
(function () {
'use strict';
angular.module('auth')
.directive('svRequestBusinessAccountBtn', function (RequestServ, userAuth, toastr) {
return {
replace: true,
templateUrl: 'scripts/auth/directives/sv-request-business-account-btn.html',
... |
const Webpack = require('webpack');
const Cssnano = require('cssnano');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const Config = require('./main');
const Debug = require('debug')('app:webpack:config');
const paths = Config.utils_paths;
c... |
'use strict';
var BrewEnded = require('../../../../module/Notifiers/Brew/BrewEnded');
var BrewEmitterMock = require('../../helper/EmitterMock');
describe('Notifiers:BrewEnded', function () {
it ('notifies the BrewEmitter', function () {
var obj = {};
BrewEnded(BrewEmitterMock(obj));
expect(obj.eventName... |
/**
* These are tests for core functionality that isn't used by the canonical
* implementation and therefore cannot be tested in the main test file.
*/
import propertyValueConverters from '../property-value-converters'
describe('Extended core functionality', () => {
describe('propertyValueConverters', () => {
... |
var valueToString =function(o){
return JSON.stringify( o, null, " " ).str_replace('"','')
}
var Lexeme =function( o ){
var sToken = o.token
, e = document.createElement( sToken )
, sValue = o.value
e.oValue = o
e.title = valueToString( o )
// sToken +\n\u25B6+ sValue +\u25C0
if( sValue ) e.innerHTML = sValue.... |
define([
'jquery',
'underscore',
'backbone',
'models/device/DeviceModel',
'slickgrid.core',
'slickgrid.grid',
'slickgrid.pager',
'slickback',
], function($, _, Backbone, DeviceModel){
var DeviceCollection = Slickback.PaginatedCollection.extend({
model: DeviceModel,
url: "/api/v0/device",
})... |
var path = require('path'),
fs = require('fs'),
webpack = require("webpack"),
libPath = path.join(__dirname, 'lib'),
distPath = path.join(__dirname, 'dist'),
pkg = require('./package.json'),
cordovaLib = require('cordova').cordova_lib,
extend = require('util')._extend,
deepExtend = requi... |
import HttpError from './HttpError'
class BadRequestError extends HttpError {
constructor(message) {
super(message)
this.code = 400
}
}
export default BadRequestError
|
(function () {
"use strict";
angular.module('app.controllers').controller('HeaderCtrl', function ($scope, $rootScope, $mdSidenav, $log, DialogService) {
$scope.$watch(function () {
return $rootScope.current_page;
}, function (newPage) {
$scope.current_page = newPage || ... |
/*
Please add all Javascript code to this file.
*/
$.get("https://accesscontrolalloworiginall.herokuapp.com/http://mashable.com/stories.json", function(response) {
var results = response.new;
var articles = parseResults(results);
//console.log(articles);
addArticlesToPage(articles);
function parseResults(r... |
import { reducer as formReducer } from 'redux-form';
import { reducer as uiReducer } from 'redux-ui';
import { combineReducers } from 'redux';
import { isUndefined, omitBy } from 'lodash';
import * as listingsReducers from './listings';
import * as watchesReducers from './watches';
import * as seeksReducers from './s... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
(function() {
'use strict';
angular
.module('myPick10')
.controller('LoginController', LoginController);
//inject dependencies
LoginController.$inject = ['$scope', '$location', '$routeParams', '$log', 'AuthService', 'appTitle'];
function LoginController($scope, $location, $routeParams, $log... |
app.controller('VideoTabController', function ($scope, $rootScope, $filter, $http, $location,
$routeParams, $timeout, ActionBarService) {
});
|
"use strict";
describe("defaultCountry: init plugin with a default country", function() {
var defaultCountry = "jp";
var input;
beforeEach(function() {
intlSetup();
input = new IntlTelInput(document.createElement("input"), {
defaultCountry: defaultCountry
});
});
afterEach(function() {
... |
import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:guests/new', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
var controller = this.subject();
assert.ok(controller);
})... |
$(document).ready(function() {
//google map
var geocoder;
var map;
var styles = [{
"featureType": "water",
"elementType": "geometry.fill",
"stylers": [{
"color": "#d3d3d3"
}]
},
{
"featureType": "transit",
... |
function textInputAtts() {
var atts = _.clone(this.atts);
delete atts.collection;
// we want the schema key tied to the hidden file field only
delete atts["data-schema-key"];
atts["class"] = (atts["class"] || "") + " form-control";
return atts;
}
function fileInputAtts() {
return {'data-schema-key': this... |
import _ from "lodash";
const RideUtils = {
// Find any rides that any two riders have been on together
riddenTogether: function(rider1, rider2) {
return _.intersection(rider1.rides, rider2.rides);
},
// Determine whether a rider is on a ride
signedUp: function(rider, ride) {
return _.includes(ride... |
(function () {
'use strict';
angular
.module('anlyts')
.controller('ArticlesController', ArticlesController);
ArticlesController.$inject = ['$scope', '$state', 'articleResolve', 'Authentication'];
function ArticlesController($scope, $state, article, Authentication) {
var vm = this;
vm.articl... |
var http = require('http');
var os = require('os');
var fs = require('fs');
var worker_num = process.argv[2] || 8;
var exeClicker = process.argv[3] || true;
var crawlers = {"remain" : 0};
var clickers = {"remain" : 0};
process.env.PATH=process.env.PATH+":node_modules/phantomjs-prebuilt/bin/"+":node_modules/c... |
'use strict';
const { messages, ruleName } = require('..');
testRule({
ruleName,
config: [true],
accept: [
{
code: 'a:before { }',
},
{
code: 'a:Before { }',
},
{
code: 'a:bEfOrE { }',
},
{
code: 'a:BEFORE { }',
},
{
code: 'a:after { }',
},
{
code: 'a:first-letter { }',
}... |
// From http://mkweb.bcgsc.ca/circos/guide/tables/
var matrix = [
[11975, 5871, 8916, 2868], //black row -- cols are also black, yellow, brown and red
[ 1951, 10048, 2060, 6171], //yellow
[ 8010, 16145, 8090, 8045], //brown
[ 1013, 990, 940, 6907] //red
];
matrix = [
[0,2115,531,1027,10075,285,759,1691,885... |
#!/usr/bin/env node
// requires
var createApp = require('../lib/create-app')
var debug = require('debug')('qpm_media:server.js')
var express = require('express')
var program = require('commander')
var wc_express = require('wc_express')
function bin(argv) {
program
.option('-c, --currency <currency>',... |
import _ from 'lodash';
export default function _containsMark(str) {
const spChars = "!@#$%^&*\\\'\"?".split("");
return !_.isEmpty(_.intersection(spChars, str.split('')));
}
|
'use strict';
import { deleteSelection, Tool } from 'substance'
import XRefTargets from './XRefTargets'
/*
Shown in OverlayTools
*/
class EditXRefTool extends Tool {
constructor(...args) {
super(...args)
this.handleActions({
'closeModal': this._doneEditing,
'doneEditing': this._doneEditing
... |
import cloneDeep from 'lodash/cloneDeep';
import * as CONSTANTES from '../../src/js/constants/contactos';
import * as ACCIONES from '../../src/js/actions/contactos';
import reducerContactos from '../../src/js/reducers/contactos';
const expect = global.expect;
describe('Contactos - Reducer', () => {
let estadoInicia... |
/* eslint-env mocha */
/* eslint-disable no-unused-expressions, react/no-multi-comp, react/prop-types */
import { expect } from 'chai';
import React from 'react';
import TestUtils from 'react-dom/test-utils';
import { haveXpath } from '../src/index';
const { Component } = React;
const CreateClass = React.createClass... |
var dir_a2fd3eaa993720caa1b9cca6361b5239 =
[
[ "Color.java", "src_2uran_2test_2util_2_color_8java.html", [
[ "Color", "classuran_1_1test_1_1util_1_1_color.html", null ]
] ],
[ "ColorPrint.java", "src_2uran_2test_2util_2_color_print_8java.html", [
[ "ColorPrint", "classuran_1_1test_1_1util_1_1_co... |
'use strict';
// Intrinsic modules.
var util = require('util');
var path = require('path');
var fs = require('fs');
// Npm modulez
var _ = require('lodash');
// "Constants"
var PLUGIN_NAME = 'kalabox-plugin-pantheon';
var TERMINUS = 'terminus:t0.9.3';
/*
* Constructor.
*/
function Terminus(kbox, app) {
// Term... |
function Users() {
"use strict";
let updateLanguage = function (language) {
document.getElementById("lnk-records").innerHTML = language.get("lnk-records");
document.getElementById("lnk-approval").innerHTML = language.get("lnk-approval");
document.getElementById("lnk-dashboard").innerH... |
'use strict';
//jshint unused:false
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/oaa-development');
var schema = new mongoose.Schema({
first_name: String,
last_name: String,
email: String
});
module.exports = mongoose.model('User', schema);
|
//todo |
var mongodb_pools = require("./mongodb_pools");
var mongodb_json = require("./mongodb");
var assert = require('assert');
mongodb_pools.configure(mongodb_json);
var insert = function()
{
mongodb_pools.execute("pool_1",function(client, release){
// Get the documents collection
var collection = client.col... |
'use strict';
describe('node-resemble.js', function() {
var EXAMPLE_LARGE_IMAGE = 'example/LargeImage.png';
var EXAMPLE_SMALL_IMAGE = 'example/SmallImage.png';
var EXAMPLE_PEOPLE_IMAGES = [
'example/People.png',
'example/People2.png'
];
var OPTIMISATION_SKIP_STEP = 6;
var DEFAULT_LARGE_IMAGE_THRESHOL... |
import api from '../../api';
import history from '../../module/history';
export const PROJECT_LOCK = "PROJECT_LOCK";
export const PROJECT_OK = "PROJECT_OK";
export const PROJECT_FAIL = "PROJECT_FAIL";
export const PROJECT_EDIT_START = "PROJECT_EDIT_START";
export const PROJECT_EDIT_FINI... |
import { ADD_TO_DO } from '../constants/ActionTypes';
import { EDIT_TO_DO } from '../constants/ActionTypes';
import { SAVE_TO_DO } from '../constants/ActionTypes';
import { DELETE_TO_DO } from '../constants/ActionTypes';
import { CHANGE_COLOR } from '../constants/ActionTypes';
import { COMPLETE_TO_DO } from '../constan... |
define( [ 'Loader', 'async' ], function ( Loader, async ) {
var GLTFLoader = Loader.extend( {
defaults: Loader._.extend( {}, Loader.prototype.defaults ),
initialize: function( options ){
options = options || {};
GLTFLoader.super.initialize.call( this, options );
},... |
import Result from './Result';
const users = [
{ name: 'admin', password: 'admin', admin: true},
{ name: 'guest', password: 'guest'}
];
function isDuplicate(name, exceptIdx) {
return users.some( (user, idx) => user.name === name && idx !== exceptIdx );
}
export function getUsers() {
return Result.Ok(users.sl... |
var path = require('path');
var webpack = require('webpack');
var APP_DIR = path.join(__dirname, 'dist');
module.exports = {
debug: true,
devtool: 'cheap-module-eval-source-map',
entry: {
index: [
'babel-polyfill',
'webpack/hot/dev-server',
'webpack-dev-server/c... |
var express = require('express');
var app = express();
app.get('/search', function(req, res) {
res.send(req.query);
});
app.listen(process.argv[2]); |
/* @flow */
import type { Duplex } from 'stream';
import type { Endpoint } from 'neo-blockchain-node-core';
import through from 'through';
import { ReceiveMessageTimeoutError } from './errors';
export type PeerOptions<Message> = {|
endpoint: Endpoint,
stream: Duplex,
transform: Duplex,
// eslint-disable-next... |
'use strict';
angular.module('bellows.services')
.service('sessionService', ['jsonRpc', '$window', function(jsonRpc, $window) {
var privateData = angular.copy($window.session);
this.currentUserId = function() {
return $window.session.userId;
};
this.fileSizeMax = function() {
return $wi... |
const TEMPLATE = `
<section>
<h1>Caster: {{$ctrl.caster.name}}</h1>
<video-list params="$ctrl.searchParams" page-load="true"></video-list>
</section>
`;
angular
.module(`${window.APP_NAME}.pages`)
.component('casterPage', {
template: TEMPLATE,
controller: casterPage
});
/**
* @emits Constants.Event.C... |
(function () {
'use strict';
function AdminController($scope, $http, adminService, notifier) {
var vm = this;
adminService.getAdminData()
.then(function (response) {
$scope.adminData = response;
});
}
angular.module('myApp.controllers')
... |
import * as React from 'react';
import { expect } from 'chai';
import { createShallow, getClasses } from '@material-ui/core/test-utils';
import createMount from 'test/utils/createMount';
import { createMuiTheme } from '@material-ui/core/styles';
import describeConformance from '../test-utils/describeConformance';
impor... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import '../styles/Nav.css';
import wrd from '../images/logos/wrd.png';
class Nav extends Component {
componentDidMount(){
window.scrollTo(0, 0);
}
render() {
return (
<div className="bs-component main-menu">
... |
import Ember from 'ember';
import moment from 'moment';
const { computed, Controller, inject } = Ember;
const { service } = inject;
export default Controller.extend({
queryParams: ['date', 'view', 'showCalendar', 'mySchedule', 'showFilters', 'courseFilters', 'school', 'academicYear'],
date: null,
view: 'week',
... |
export var FaveConstants = {
ADD_ITEM: 'ADD_ITEM',
REMOVE_ITEM: 'REMOVE_ITEM'
}; |
$(document).ready(function() {
eaeSlider();
});
var eaeGlobalSettings = {
changeDuration: 500,
changeDelay: 0,
changeMode: 'slide',
imageCrop: 'cover',
imagePos: 'center center',
descColor: '#696969',
descFontSize: '20px',
descPadding: 20,
descWidth:'100%',
enableCtrl: 'false',
ctrlColor: 'rgba(255, 255, 2... |
import _ from 'lodash';
export default class IncludeParser {
constructor(models) {
this.models = models;
}
parse = async (query) => {
const {
getIncludeModelInstances,
models,
} = this;
if (typeof query.include === 'undefined') return [];
const includes = _.castArray(query.incl... |
require("./22.js");
require("./45.js");
require("./91.js");
require("./182.js");
module.exports = 183; |
class Platform extends Phaser.Graphics {
constructor(game, x, y) {
super(game, x, y);
this.beginFill(0xFFBA00, 0.6);
this.lineStyle(2, 0xFFBA00, 0.6);
this.drawRect(this.x, this.y, 100, 15);
this.endFill();
}
}
export default Platform; |
// flow-typed signature: d2c311f0f82d8260d96fe5039bc2b922
// flow-typed version: <<STUB>>/update-nodejs-notifier_v^1.1.1/flow_v0.148.0
/**
* This is an autogenerated libdef stub for:
*
* 'update-nodejs-notifier'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to ... |
/**
* controller - category.
* User: raytin
* Date: 13-3-28
*/
var proxy = require('../proxy'),
common = proxy.common,
util = require('../util'),
topicProxy = proxy.Topic,
categoryProxy = proxy.Category,
userProxy = proxy.User,
config = require('../config').config,
EventProxy = require("... |
var Foundry = (function () {
function Foundry () {}
Foundry.create = function (options) {
function Constructor (properties) {
for (var prop in properties) {
if (properties.hasOwnProperty(prop)) {
this[prop](properties[prop]);
this[prop... |
import Vue from 'vue';
import App from './App.vue';
import Vuetify from 'vuetify';
import VueSocketio from 'vue-socket.io';
Vue.use(Vuetify);
Vue.use(VueSocketio, globalConfig.conglomerate.url + (globalConfig.conglomerate.port ? ':' + globalConfig.conglomerate.port : ''));
new Vue({
el: '#app',
render: h => h(App... |
import {
MOVE_CARD,
TAP_CARD,
UNTAP_CARD,
TOGGLE_TAP,
INCREMENT_CARD_VALUE,
DECREMENT_CARD_VALUE,
SET_CARD_VALUE
} from '../constants/actionTypes';
const initialState = {
id: null,
name: null,
imageUrl: null,
zone: null,
counters: 0,
power: 0,
toughness: 0,
left: 0,
top: 0,
isTapped: ... |
/*
* Title : Pinpoint Booking System WordPress Plugin (PRO)
* Version : 2.1.2
* File : assets/js/jquery.dop.frontend.BSPSearch.js
* File Version : 1.0.2
* Created / Last Modified : 11 October 2015
* Author : Dot on Paper
* Copyright ... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4z" />
, 'DeleteOutline');
|
var gulp = require('gulp');
var initGulpTasks = require('react-component-gulp-tasks');
/**
* Tasks are added by the react-component-gulp-tasks package
*
* See https://github.com/JedWatson/react-component-gulp-tasks
* for documentation.
*
* You can also add your own additional gulp tasks if you like.
*/
var tas... |
const EmptyIssue = num => ({
_id: num,
title: 'empty',
body: 'empty',
});
const EmptyColumn = num => ({
id: num,
issues: [
EmptyIssue(0),
EmptyIssue(1),
EmptyIssue(2),
EmptyIssue(3),
EmptyIssue(4),
EmptyIssue(5),
EmptyIssue(6),
EmptyIssue(7),
EmptyIssue(8),
EmptyIssue(... |
export default {
logged: "Registrada",
unlogged: "No trabajado",
faxNotSupported: "No se pueden registrar mensajes por fax."
};
// @key: @#@"logged"@#@ @source: @#@"Logged"@#@
// @key: @#@"unlogged"@#@ @source: @#@"Unworked"@#@
// @key: @#@"faxNotSupported"@#@ @source: @#@"To log fax is not supported."@#@
|
var _ = require( 'lodash' );
var fs = require( 'fs' );
var path = require( 'path' );
var Promise = require( 'bluebird' );
var getKey = require( '../util/ssh-keys' );
var Connection = require( 'ssh2' );
module.exports = {
getReadStreams: getReadStreams,
cleanup: closeConnection
};
function getReadStreams(request, op... |
jQuery(function(){
// 20130129 - no longer using 'is_primary'
// jQuery('form.edit_study_subject input:checkbox.is_primary_selector').click(function(){
// /* if primary is checked,
// check partial race as well as uncheck other primary
// */
// if( jQuery(this).prop('checked') ){
// jQuery('#'+jQuery(this).at... |
'use strict';
var Config = require('../config');
var Environment = require('../environ');
var TitleState = function() {};
function _waitForStart() {
if (this.input.keyboard.isDown(Config.Keymap.Start) || this.input.activePointer.isDown) {
this.game.state.start('title', true, false);
}
}
function _p... |
var app = require('../server');
var request = require('supertest');
describe('GET artists', function(){
it('does stuff', function(done){
request(app)
.get('/api/v1/artists')
.set('Accept', 'application/json')
.expect('Content-Type', /json/)
.expect(200, done);
});
});
describe('GET fest... |
var ENV = {
debug: true
};
ENV.data = {};
seajs.use('nav');
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33919587-17']);
_gaq.push(['_setDomainName', '${domain}']);
_gaq.push(['_setAllowHash', false]);
var dpga = function (key) {
_gaq.push(['_trackPageview', key || ''])
}
var pageTracker = {_trackPagevi... |
var expect = require('chai').expect,
Postman = require('../../../lib/importers/postman'),
Project = require('../../../lib/entities/project'),
_ = require('lodash');
describe('Postman Importer', function() {
var postmanImporter;
beforeEach(function() {
postmanImporter = new Postman();
});
describe('... |
//= require dependencies.js
//= require tests/qunit.js
//= require tests/tests.js
|
angular.module('mymasjid.services')
.factory("PushRegistration", function(
Restangular,
$ionicPlatform,
$cordovaPushV5,
appConfig,
$q
) {
function initialize() {
if(window.PushNotification == null){
console.error("Couldn't find PushNotification, only available on device.");
return;
}
... |
// This file is part of Indico.
// Copyright (C) 2002 - 2020 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.
import _ from 'lodash';
import {createSelector} from 'reselect';
import {Translate} from 'indico/re... |
require('./samples/object-literals.js');
|
'use babel'
import { findDOMNode } from 'react-dom'
import React, { PropTypes, Component } from 'react'
import { connect } from 'react-redux'
import classNames from 'classnames'
import _ from 'underscore-plus'
import SlackMessage from './SlackMessage'
// Style
import * as colors from './colors'
import styled from 'st... |
var ever = require('ever')
var vkey = require('vkey')
var events = require('events')
var game
module.exports = function(gameInstance) {
// cache the game instance
game = gameInstance
return function makeFly(physical, noKeyEvents) {
return new Fly(physical, noKeyEvents)
}
}
function Fly(physical, noKeyEve... |
/* eslint-env mocha */
'use strict'
const execa = require('execa')
const { copy } = require('fs-extra')
const { join } = require('path')
const bin = require.resolve('../')
const tempy = require('tempy')
describe('test', () => {
describe('esm', function () {
let projectDir = ''
before(async () => {
pr... |
/**
* Default job
* Compiles templates, css, assets and serves them with Browsersync.
*/
gulp.task('default', ['build'], function () {
gulp.start('browserSync');
gulp.start('watch');
});
|
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var browserify = require('gulp-browserify');
gulp.task('jshint', function () {
gulp.src('./app/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// Browserify
gulp.task('jsbuild', function() {
gulp.src('./app/fe/co... |
// test_files/rest_parameters_any/rest_parameters_any.ts(26,7): warning TS0: var args type is not an object type
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// This test covers the rest pa... |
/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.form.ListInput"]){ //_hasResource checks added by build. Do not use _hasResource directly in y... |
var tape = require("tape");
var protobuf = require("..");
var util = protobuf.util;
tape.test("util", function(test) {
test.test(test.name + " - merge", function(test) {
var o = {};
util.merge(o, {});
test.same(o, {}, "should do nothing if both objects are empty");
util.merge(o, ... |
'use strict';
const chai = require('chai'),
expect = chai.expect,
Support = require(__dirname + '/../support'),
DataTypes = require(__dirname + '/../../../lib/data-types'),
sinon = require('sinon'),
Promise = require('bluebird');
describe(Support.getTestDialectTeaser('Hooks'), () => {
beforeEach(function(... |
'use strict';
require('styles//CurrentIteration.css');
import React from 'react';
import { connect } from "react-redux"
@connect((store) => {
return {
};
})
class CurrentIterationComponent extends React.Component {
propTypes: {
}
defaultProps: {
}
constructor(props) {
super(props);
}
r... |
angular.module('cms.images').controller('ImageDetailsController', [
'$routeParams',
'$q',
'$location',
'_',
'shared.LoadState',
'shared.modalDialogService',
'shared.permissionValidationService',
'shared.urlLibrary',
'images.imageService',
'images.modulePath',
function (
$rou... |
/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.drawing.plugins._Plugin"]){ //_hasResource checks added by build. Do not use _hasResource dire... |
import fetch from 'isomorphic-fetch'
import base64 from 'base-64'
import utf8 from 'utf8'
import FormData from 'form-data'
export function encodeAccount(username, password) {
let bytes = utf8.encode(`${ username }:${ password }`)
return base64.encode(bytes)
}
export function loadFormData(payload) {
if (!payload... |
var UserDetails = function () {
this.load = function () {
browser.get('/AngularJS/AngularMaterialDemo/app/main.html');
};
this.contactUser = function () {
$('button.contact').click();
};
};
module.exports = UserDetails;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.