code stringlengths 2 1.05M |
|---|
/*
* FSS Angular component library
* Copyright 2013, Follett School Solutions, Inc.
*Licensed under the MIT license http://opensource.org/licenses/MIT
*/
(function () {
'use strict';
describe('BarGraphDirective', function () {
var testData, $scope, $compile;
beforeEach(function () {
... |
// Copyright 2014 Google Inc. All rights reserved.
//
// Use of this source code is governed by The MIT License.
// See the LICENSE file for details.
/**
* @fileoverview Functions for dynamically loading scripts without blocking.
*
* Provides asynchronous loading and dependency management, loosely similar to
* $sc... |
import { assert } from 'chai';
import Header from '../Header';
import React from 'react/addons';
const TestUtils = React.addons.TestUtils;
function shallowRender(component) {
const shallowRenderer = TestUtils.createRenderer();
shallowRenderer.render(component, {});
return shallowRenderer.getRenderOutput();
}
s... |
try {
console.log('Dave is ready.');
} catch (e) {
window.console = {
log: function () {
// alert([].slice.call(arguments).join('\n'));
},
warn: function () {},
trace: function () {},
error: function () {}
};
}
// required because jQuery 1.4.4 lost ability to search my object property :... |
'use strict';
export default (ngModule) => {
ngModule
.directive('movieGallery', movieGalleryDirective)
.controller('MovieGalleryCtrl', MovieGalleryCtrl);
/** @ngInject */
function movieGalleryDirective() {
return {
scope: {
gallery: '=',
editMode: '='
},
controlle... |
/*
* Kendo UI Web v2012.2.710 (http://kendoui.com)
* Copyright 2012 Telerik AD. All rights reserved.
*
* Kendo UI Web commercial licenses may be obtained at http://kendoui.com/web-license
* If you do not own a commercial license, this file shall be governed by the
* GNU General Public License (GPL) version 3.
* For GP... |
import express from 'express';
import session from 'express-session';
import bodyParser from 'body-parser';
import config from '../src/config';
import * as actions from './actions/index';
import {mapUrl} from 'utils/url.js';
import PrettyError from 'pretty-error';
import http from 'http';
import SocketIo from 'socket.i... |
define({
"routeUrl": "URL de rota",
"locatorUrl": "URL de Localizador",
"geocoderOptions": "Opções do Geocodificador",
"autoComplete": "Auto Completar",
"maximumSuggestions": "Máximo de sugestões",
"minCharacters": "Caracteres mínimos",
"searchDelay": "Demora na pesquisa",
"placeholder": "Placeholder",
... |
/**
* Given the root node of a binary tree, swap the 'left' and 'right' children for each node.
100
/ \
50 200
/ \ / \
25 75 125 350
100
/ \
200 50
/ \ / \
350 125 75 25
* @param root
*/
let mirror_tree = function(root) {
if ... |
'use strict';
const url = require('url');
const fetch = require('node-fetch');
const utils = require('./utils.js');
const config = require('./config.js');
/** @typedef {import('./view.js')} View */
/**
* List constructor. Create an instance of a list associated with a couchdb list in the npm registry.
*
* ```js
... |
var currentSection;
var numberedSections = [];
document.addEventListener('readystatechange', () => {
if (document.readyState === 'interactive') {
initializeFocus();
}
});
function initializeFocus() {
var sidebarButton = document.querySelector('label[for="spec-sidebar-toggle"]');
sidebarButton.addEventList... |
document.addEventListener("DOMContentLoaded", function(e) {
let playerBlack = new Player(DISK_BLACK);
let playerWhite = new Player(DISK_WHITE);
const interval = 0;
const black = function() {
if(playerBlack.place()) {
setTimeout(white, interval);
}else{
setTimeout(black, interval);
}
}
const white = ... |
'use strict';
angular.module('ticketSystemApp.projects.services', [])
.factory('projectService', [
'router',
function(
router
) {
function getByFilter(pageSize, pageNumber, filter, value) {
//Projects/?pageSize={pageSize}&pageNumber={pageNumber}&{filter}={value}
pag... |
define( function( require, exports, module ) {
/* see node.js EventEmitter */
var EventEmitter = function() {
this._events_ = [];
this.on = function( name, action ) {
if ( !( name in this._events_ ) ) {
this._events_[ name ] = [];
}
this._event... |
(function ($) {
"use strict";
if($('.playlist').length == 0) return;
var playlist = $( '.playlist' ).mepPlaylist({
audioHeight: '40',
audioWidth: '100%',
videoHeight: '40',
videoWidth: '100%',
audioVolume: 'vertical',
mepPlaylistLoop: true,
alwaysShowControls: true,
mepSkin: 'mej... |
"enable aexpr";
import AbstractAstNode from './abstract-ast-node.js'
import keyInfo from 'src/client/keyinfo.js';
export default class AstNodeBooleanLiteral extends AbstractAstNode {
async initialize() {
await super.initialize();
this.windowTitle = "AstNodeBooleanLiteral";
}
async updateProjection()... |
export default function withMethodMissing(originalClass) {
return class SafeClass extends originalClass {
constructor(...args) {
super(...args);
const handler = {
get: this._handleMethodMissing
};
return new Proxy(this, handler);
}
_handleMethodMissing(target, name, receiv... |
'use strict';
/**
* Created by greg on 15.11.15.
*/
var controllers = angular.module('controllers', ['ngResource', 'ngMaterial', 'ngAnimate', 'ngAria']);
controllers.factory('location', function ($resource) {
return $resource("test/locations.json")
});
controllers.directive('map', function ($compile, locationS... |
'use strict'
const tap = require('tap')
const ActiveDirectory = require('../index').promiseWrapper
const config = require('./config')
const serverFactory = require('./mockServer')
const settings = require('./settings').findGroup
tap.beforeEach((done, t) => {
serverFactory(function (err, server) {
if (err) retur... |
import * as constants from '../constants'
import * as storage from './storage'
export default function persistenceHandler (next) {
return (reducer, initialState) => {
const store = next(reducer, initialState)
return Object.assign({}, store, {
dispatch( action) {
store.dispatch(action)
... |
var pick = require('amp-pick');
var isNumber = require('amp-is-number');
pick({name: 'moe', age: 50, userid: 'moe1'}, 'name', 'age'); //=> {name: 'moe', age: 50}
pick({name: 'moe', age: 50, userid: 'moe1'}, function (value, key, object) {
return isNumber(value);
}); //=> {age: 50}
|
/* global d3 _ */
'use strict';
var App = App || {};
// eslint-disable-next-line no-unused-vars
const ServiceDataModel = function() {
const self = {
data: null,
filters: {},
searchTerm: ''
};
init();
function init() {}
function loadTextData(path) {
return new Promise((resolve, reject) => ... |
import React, { Component } from 'react';
import Loader from 'seek-asia-style-guide/react/Loader/Loader';
export default class LoadSandbox extends Component {
state = {
Sandbox: null
};
componentDidMount() {
import('./Sandbox').then(({ default: Sandbox }) => {
this.setState({ Sandbox });
});
... |
/* Notes:
- gulp/tasks/browserify.js handles js recompiling with watchify
- gulp/tasks/browserSync.js watches and reloads compiled files
*/
var gulp = require('gulp');
var config= require('../config');
gulp.task('watch', ['setWatch', 'browserSync'], function() {
gulp.watch(config.less.src, ['move-less']);
... |
/*
* loggly-test.js: Tests for instances of the Loggly transport
*
* (C) 2010 Charlie Robbins
* MIT LICENSE
*
*/
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
winston = require('winston'),
helpers = require('winston/test/helpers'),
Loggly = require('../lib/wi... |
/**
* @fileOverview This module provides geometry utilities.
* @author Jonathan Bronson</a>
*/
var Point = require('./point');
var Vector = require('./vector');
var Vector3 = require('./vector3');
module.exports = (function(){
'use strict';
/** namespace */
var GeomUtil = {
/**
* Computes the intersection poi... |
var db = require('../db');
exports.save = function (category) {
return db.insert('category', category)
.then(function (result) {
var id = result.insertId || 0;
if (id > 0) {
return id;
}
});
};
exports.list = function (pageRequest) {
var sql ... |
version https://git-lfs.github.com/spec/v1
oid sha256:85b599c0556280822e29014ce2eb2fba3c82ec361398da15b22fca6b11301147
size 21891
|
var X = require('./');
var opts = { cellNF: true,
type: 'file',
cellHTML: true,
cellFormula: true,
cellStyles: false,
cellDates: false,
sheetStubs: false,
sheetRows: 0,
bookDeps: false,
bookSheets: false,
bookProps: false,
bookFiles: false,
bookVBA: false,
WTF: false }
;
var FILENAME = './test... |
let f = async() : Promise<string> => await foo();
|
import { Texture } from './Texture';
/**
* @author mrdoob / http://mrdoob.com/
*/
function VideoTexture( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
Texture.call( this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
this.generateMip... |
var dotjem;
(function (dotjem) {
var DateFormat = (function () {
function DateFormat(_format) {
var _this = this;
this._format = _format;
this.monthshort = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
this.monthlong = [... |
const config = require('../config');
const EventEmitter = require('events');
const el = require('extra-life-api');
const events = Object.freeze({
TEAM_INFO_UPDATED: Symbol(),
ROSTER_CHANGE: Symbol(),
MEMBER_DONATIONS: Symbol(),
MEMBER_UPDATED: Symbol(),
MEMBER_ADDED: Symbol()
});
const TEAM_ID = config.TEAM... |
// set this matrix to a transform matrix that
// rotatie around a line segment for theta radian
// p1 : THREE.Vector3, start
// p2 : THREE.Vector3, end
// theta : rotation angle in radian
THREE.Matrix4.prototype.makeTransform = function(p1, p2, theta) {
var a = p1.x;
var b = p1.y;
var c = p1.z;
var... |
function* yield() {}
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const json2typescript_1 = require("json2typescript");
let DepositAddressData = class DepositAddressData {
constructor() {
this.Currency = undefined;
this.Address = undefined;
}
};
tslib... |
var
// global modules
path = require("path"),
xpath = require('xpath'),
dom = require('xmldom').DOMParser,
js2xmlparser = require("js2xmlparser"),
path = require('path'),
fs = require('fs-extra'),
ncp = require('ncp').ncp,
chalk = require('chalk'),
shell = require('shelljs'),
merge = require('... |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdBorderInner(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M6 42h4v-4H6v4zm8 0h4v-4h-4v4zm-4-28H6v4h4v-4zM6 34h4v-4H6v4zM18 6h-4v4h4V6zm-8 0H6v4h4V6zm24 0h-4v4h4V6zm4 12h4v-4h-4v4zm0-12v4h4V6h-4zm-8 36h4v... |
/**
* icu-converter
* https://github.com/alex-dow/icu-converter
*
* Copyright (c) 2015 Alex Dowgailenko
* Licensed under the MIT License
* https://github.com/alex-dow/icu-converter/blob/master/LICENSE
*/
describe("Converter", function() {
var ICUConverter = require('../../src/icu-converter');
var fs = requ... |
function runCode() {
console.log(new mat4());
console.log(new mat4().create());
console.log(
new mat4().createWithValues(1, 2, 3, 4, 5, 2, 3, 4, 9, 2, 3, 4, 13, 2, 3, 4)
);
var arr1 = [1, 2, 3, 4, 5, 2, 3, 4, 9, 2, 3, 4, 13, 2, 3, 4];
var arr2 = [1, 2, 3, 4, 5, 2, 3, 4, 9, 2, 3, 4, 13, 2, 3, 5];
var... |
'use strict';
import browserSync from 'browser-sync';
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import { stream } from 'wiredep';
import conf from '../conf';
const $ = gulpLoadPlugins();
function cssTransform(path) {
return `@import "${path.replace(`${conf.paths.src}/app/`, '')}";`;... |
version https://git-lfs.github.com/spec/v1
oid sha256:57c0d617733195c73646ef193d111aee6cdde3693c40c52d26b0068fe6b60835
size 204428
|
var express = require('express'),
routes = require('./routes'),
http = require('http'),
app = express(),
path = require('path'),
logger = require('morgan'),
bodyParser = require('body-parser'),
errorHandler = require('errorhandler'),
methodOverride = require('method-override');
app.locals.appTitle = 'Pi... |
/*
* Imports.
*/
// NPM.
import React, { Component } from 'react';
import PropTypes from 'prop-types';
// Local.
// Styles.
import './current-diet.css';
// Components.
import Newspaper, { Directions } from '../newspaper';
import { SelectableOutlet } from '../../components/outlet';
// Data.
import { sources } from '... |
import React from 'react'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import promiseMiddleware from 'redux-promise';
import createLogger from 'redux-logger'
i... |
import angular from 'angular';
import {
schemaDefaults,
merge,
traverseSchema,
traverseForm,
} from 'json-schema-form-core';
/**
* Schema form service.
*/
export default function() {
let postProcessFn = (form) => form;
const defaults = schemaDefaults.createDefaults();
/**
* Provider API
*/
th... |
/* global describe,it,before,after */
'use strict'
let Network
let should = require('should')
let DMsgPing = require('../lib/dmsgping')
let DMsgPong = require('../lib/dmsgpong')
let asink = require('asink')
describe('NetworkBrowserWebRTC', function () {
// Browser-only code shouldn't be tested in node
if (!process... |
"use strict";
var Timeout = require("../common/Timeout");
var vector = require("../common/vector");
var mouseWheelRange = 1000;
var mouseWheelDelay = 50;
function mouse($element, boundingBox, onStart, onInput, onEnd) {
var config = {
activated: true,
dispose: function () {
this.activ... |
// Underscore.js 1.5.1
// http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the ... |
var entity = require('basis.entity');
var Promise = require('basis.promise');
var Value = require('basis.data').Value;
var Expression = require('basis.data.value').Expression;
var sum = require('basis.data.index').sum;
var File = require('./file');
var Module = require('./module');
var FileLink = require('./file-link')... |
var clc = require('cli-color')
var async = require('async')
module.exports = function (db) {
return function (callback) {
// remove the any old stuff
db.databaseConnectRegistryIngest(function () {
var collection = db.databaseRegistryIngest.collection('mmsItems')
// delete any existing data first... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+relay
* @format
*/
'use strict';
require('configureForRelayOSS');
const QueryBuilder = require('../../query/QueryBu... |
const waitDeath = () =>
new Promise((resolve, reject) => {
process.on("uncaughtException", reject);
process.on("unhandledRejection", reject);
process.on("SIGINT", resolve);
process.on("SIGQUIT", resolve);
process.on("SIGTERM", resolve);
});
module.exports = waitDeath;
|
var path = require('path');
var _ = require('underscore-plus');
var exec = require('child_process').exec;
var HgCommitView = require('./hg-commit-view');
var CompositeDisposable = require('atom').CompositeDisposable;
var HgCommit = {
hgCommitView: null,
modalPanel: null,
subscriptions: null,
data: null... |
"use strict";
var mignonStatus_1 = require("./mignonStatus");
exports.MignonStatus = mignonStatus_1.MignonStatus;
//# sourceMappingURL=core.js.map |
const Core = require('../core');
//if installed by package, using:
//const Core = require('windows-automator-lib').Core;
var aw = Core.getAllWindows();
for(var i in aw) {
var a = aw[i];
console.log(a);
}
|
var utils = require('../../../../utils.js');
var is = require('joi');
module.exports = is.object({
name: 'AirportFrequencies',
type: 'object',
file: is.string(),
root: is.string(),
is_dependency: is.boolean(),
dependants: is.array(),
key: '_id',
seed: 0,
data: {
min: 0,
max: 0,
count: 1,
... |
var settings = {
"mdupdater_host": "devtools.clarin.dk",
"targetHost": "core.clarin.dk",
"hostDomain": "clarin.dk",
"contentModelContainer": "dkclarin:1229001",
"contentModelText": "dkclarin:14001",
"contentModelData": "dkclarin:182002",
"contentModelLex": "dkclarin:154001"
};
module.exports = settings;
|
'use strict';
module.exports = function(options, foundEntries) {
return function(tree) {
var matchers = [];
matchers.push({
tag: 'base',
attrs: {
href: true,
},
});
if (options.images) {
matchers.push({
tag: 'img',
attrs: {
src: true,
... |
/// <amd-dependency path="esri/core/tsSupport/declareExtendsHelper" name="__extends" />
/// <amd-dependency path="esri/core/tsSupport/decorateHelper" name="__decorate" />
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Arr... |
import React from 'react'
import PropTypes from 'prop-types'
const Icon = ({ alt, className, icon, width, height }) => (
<svg alt={alt} width={width} height={height} className={className}>
<use xlinkHref={`#${icon.id}`} />
</svg>
)
Icon.propTypes = {
alt: PropTypes.string.isRequired,
className: PropTypes.... |
(function () {
'use strict';
// register the service as <%= cameledName %>
angular
.module('<%= scriptAppName %>')
.directive('<%= _.camelize(name) %>', <%= cameledName %>);
// add <%= cameledName %> dependencies to inject
// <%= cameledName %>.$inject = [''];
/**
* <%= cameledName %> directiv... |
'use strict';
var filepath = require('path'),
yaml = require('js-yaml'),
fs = require('fs');
export default {
nameFor: function(name, ext) {
return `${name}.${ext}`;
},
pathFor: function(folder, name, ext) {
return filepath.join(folder, this.nameFor(name, ext));
},
load: function(folder, nam... |
import React, {Component} from "react";
import {bindActionCreators} from "redux";
import {connect} from "react-redux";
import {withRouter} from "react-router-dom";
import queryString from "query-string";
import deepEqual from "deep-equal";
import Loading from "components/util/loading";
import Error from "components/ut... |
var chai = require("chai");
var mrnode = module.exports;
var fs = require('fs');
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var pump = require('pump');
var uglify = require('gulp-uglifyjs');
var minifyCSS = require('gulp-minify-css');
var del = require('del');
var vinylPaths = require('vinyl-paths... |
"use strict";
module.exports = function (ast, opts, code) {
var gen = new CodeGenerator(ast, opts, code);
return gen.generate();
};
module.exports.CodeGenerator = CodeGenerator;
var Whitespace = require("./whitespace");
var SourceMap = require("./source-map");
var Position = require("./position");
var Buffer ... |
version https://git-lfs.github.com/spec/v1
oid sha256:295c77b29a5b31ac04fd6a0c704965e034465b925e5adc663c2013df133178a4
size 9237
|
import * as types from '../constants/ActionTypes';
export function addBookmark(title, url, sectionId = null) {
return { type: types.ADD_BOOKMARK, title, url, sectionId };
}
export function deleteBookmark(id) {
return { type: types.DELETE_BOOKMARK, id };
}
export function editBookmark(id, title, url, sectionId) {... |
(function($) {
var tempPageNo = 0;
var chooseCase = 0;
$.Page3 = function(Setting) {
var Options = $.extend({
Type: 'Table',
divID: 'GenaralizedPaging',
PagingID: 'divPaging',
Columns: ['CodeID', 'Tittle'],
CountUrl: 'GetCount',
... |
/*
* LSUIATestcases.js
*
* Created by Priya Rajagopal on 9/23/13.
* Copyright (c) 2013 Lunaria Software, LLC. All rights reserved.
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of sou... |
import {Component, View} from 'angular2/angular2';
@Component({
selector: 'block-header'
})
@View({
templateUrl: './views/blocks/header.html'
})
export class HeaderBlock {
headerTxt = '';
subHeaderTxt = '';
constructor(){
this.headerText = 'Hello this is the header';
this.subHeaderTxt = 'This is the... |
var isCommonJS = typeof window == "undefined";
/**
* Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
*
* @namespace
*/
var jasmine = {};
if (isCommonJS) exports.jasmine = jasmine;
/**
* @private
*/
jasmine.unimplementedMethod_ = function() {
throw new Error("unimplemented ... |
/**
* @license
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
* Build: `lodash include="merge"`
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Report... |
/*eslint-disable no-unused-vars*/
var profile = {
staticHasFeatures: {
'agrc-api-key': '"prod"'
}
};
|
var connect = require('connect');
var server = connect.createServer();
var browserify = require('browserify');
var port = process.env.PORT || 9797;
var cukeBundle = browserify({
mount: '/cucumber.js',
require: ['cucumber-html', './lib/cucumber', {'./gherkin/lexer/en': 'gherkin/lib/gherkin/lexer/en'}],... |
'use strict';
/* Filters */
angular.module('phonecatFilters', []).filter('checkmark', function() {
return function(input) {
return input ? '\u2713' : '\u2718';
};
});
angular.module('bkApp.filters', [])
.filter('entryEditing', function() {
return function(entries) {
var filte... |
window.the_second_coming_of_jesus=null;
window.current_plot_data=null;
window.current_plot_obj=null;
window.current_instrument_list=null;
window.current_instrument_types={"Hiseq":[],"Miseq":[],"HiseqX":[]};
$(function(){
init_page_js();
});
function obtain_data(start_date, end_date, group_level, display_type){
... |
// Initializes the `order-book` service on path `/order-book`
const createService = require('feathers-nedb')
const createModel = require('../../models/order-book.model')
const hooks = require('./order-book.hooks')
const filters = require('./order-book.filters')
module.exports = function () {
const app = this
const... |
'use strict'
const test = require('ava')
const utils = require('../lib/utils')
const {lbe} = require('./cases')
const {hex, bin} = utils
const {Buffer} = require('buffer') // NOT the mangled version
test('bin', t => {
t.deepEqual(utils.bin('1'), hex('01'))
t.deepEqual(utils.bin('11'), hex('03'))
t.deepEqual(uti... |
var assert = {};
(function() {
assert.isTrue = function(value) {
if (value !== true) {
throw new Error("AssertionError");
}
};
function make_type_checker(type_name) {
return function(value) {
assert.isTrue(typeof value === type_name);
};
}
asse... |
//Canvas drawing application
var MaxCanvasWidth = 2000,
MaxCanvasHeight = 1100,
socketServer = "http://127.0.0.1:3000";
//Utility functions
function getbyid(id) {
return document.getElementById(id);
}
function toggleVis(id) {
var vis = getbyid(id).style;
if (!vis.visibility) {
vis.vi... |
'use strict';
import ISOField from '../src/ISOField';
import IFA_LLLLLCHAR from '../src/packer/IFA_LLLLLCHAR';
import ISOUtil from '../src/ISOUtil';
import chai from 'chai';
const assert = chai.assert;
describe('IFA_LLLLLCHAR.js', function() {
it('Should pack', function(done) {
let field = new ISOField(12, "A... |
define(function () {
// First, checks if it isn't implemented yet.
if (!String.prototype.format) {
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined'
? args[n... |
import { shallowMount } from '@vue/test-utils';
import ChannelInvitationList from './../views/ChannelInvitationList.vue';
import ChannelInvitationItem from './../views/ChannelInvitationItem.vue';
import { Invitations, localStore, mockFunctions } from './data';
function makeWrapper() {
return shallowMount(ChannelInvi... |
/**
# Connected Friends
You work for a massive social network with many millions of users. You need to determine if two given users of the network are connected to each other.
Users of the social network may "follow" each other, but the relationship may not be mutual. That is, person A may follow person B but person... |
function fillForm(form, data) {
var inputs = $(":input", form);
_.each(data, function(props, obj) {
_.each(props, function(value, prop) {
inputs.filter('[name="' + obj + '[' + prop + ']"]').val(value);
});
});
}
jQuery(function($) {
var tree = $("#jstree")
var form = $("form.tableEdit");
var inputs = $("... |
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var templateCache = require('gulp-angular-templatecache');
var addStream = require('add-stream');
var path = require('path');
var runSequence = require('run-sequence');
var jshint =... |
/**
* @overview ccm component for data logging
* @author André Kless <andre.kless@web.de> 2016-2018
* @license The MIT License (MIT)
* @version 2.0.1
* @changes
* version 2.0.1 (12.01.2018)
* - accepts lib and module for pseudonymization
* - bugfix for logging specific subset settings
* version 2.0.0 (06.12.20... |
// --
// -- -- Code by Piotr Machowski <piotr@machowski.co>
// --
'use strict';
import React, {
StyleSheet,
View,
Image,
} from 'react-native';
import TouchableBounce from 'TouchableBounce';
import Assets from '../../Assets';
import bs from '../../BaseStyles';
export default class Tutorial extends React.Compo... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define("require exports ./constraintUtils/altitude ./constraintUtils/common ./constraintUtils/distance ./constraintUtils/surfaceCollision ./constraintUtils/tilt ../... |
/* */
var _curry2 = require('./internal/_curry2');
module.exports = _curry2(function prop(p, obj) {
return obj[p];
});
|
'use strict';
var Config = {
secretKey: 'ilovescotchyscotch'
};
module.exports = Config;
|
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"optimisation.modules.system"
]
},
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
... |
export const user = {
AUTH_SUCCESS: 'AUTHENTICATION_SUCCESS',
VERIFY_SUCCESS: 'VERIFY_USER_SUCCESS',
RESET_SUCCESS: 'RESET_PASSWORD_SUCCESS'
};
export const group = {
CREATE_SUCCESS: 'CREATE_GROUP_SUCCESS',
LIST_SUCCESS: 'LIST_GROUPS_SUCCESS',
};
export const member = {
ADD_SUCCESS: 'ADD_MEMBER_SUCCESS',
... |
// 'use strict'; // eslint-disable-line semi
//
// const request = require('supertest')
// const {expect} = require('chai')
// const db = require('APP/db')
// const User = require('APP/db/models/user')
// const app = require('./start')
//
// const alice = {
// username: 'alice@secrets.org',
// password: '12345'
// ... |
export default function sequence ( array, fn ) {
const results = [];
let promise = Promise.resolve();
function next ( member, i ) {
return fn( member ).then( value => results[i] = value );
}
for ( let i = 0; i < array.length; i += 1 ) {
promise = promise.then( () => next( array[i], i ) );
}
return promise... |
/* global require, requirejs */
(function (require, requirejs) {
'use strict';
require.config({
paths: {
'mm': '../../matchmedia'
},
waitSeconds: 0 // this is needed to prevent timeout errors
});
requirejs(['mm!(screen and (max-width: 500px))?scripts/maxwidth.js']);
requirejs(['mm!(screen and (min-widt... |
(function() {
'use strict';
angular
.module('webHipsterApp')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider.state('settings', {
parent: 'account',
url: '/settings',
data:... |
const mongoose = require('mongoose')
const REQUIRED_VALIDATION_MESSAGE = '{PATH} is required'
let commentSchema = mongoose.Schema({
article: { type: mongoose.Schema.Types.ObjectId, ref: 'Article' },
comment: { type: String, required: REQUIRED_VALIDATION_MESSAGE },
author: { type: mongoose.Schema.Types.ObjectId,... |
const express = require('express')
const router = express.Router()
const Mock = require('mockjs')
const init = require('./init')
class Router {
/**
* 创建并返回路由
* @param {array} routes
*/
create(routes) {
routes.forEach(route => {
router.all(route.path, (req, res) => {
let data = Mock.mock(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.