code stringlengths 2 1.05M |
|---|
import switchbar from './index.vue';
Vue.component('widget-switch-bar', switchbar);
|
import angular from 'angular';
import ActivityService from './activity-service';
import ActivityController from './activity-controller';
import WatchListDirective from './watch-list-directive.js';
import WatchListComponent from './watch-list-component';
import 'ngreact';
angular
.module('app', ['react'])
.ser... |
module.exports = "y";
|
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define([],function(){return"precision highp mediump lowp attribute const uniform varying break continue do for while if else in out inout float int void bool true ... |
var devdb = require('../devdb');
var when = require('when');
var paginate = require('../index');
var assert = require("assert");
describe('Paginate with no reduce and page size of 3', function () {
var dbname;
before(function (done) {
devdb.devdb().then(function () {
return devdb.load([
{ key: 1... |
import { injectReducer } from '../../store/reducers'
export default (store, wrappers = []) => ({
path: 'login',
/* 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 (jso... |
import React from 'react';
import PropTypes from 'prop-types';
import FormAddComment from '../../Form/FormAddComment';
export default class PostTypeDefault extends React.Component { //eslint-disable-line
static propTypes = {
post: PropTypes.object,
postIndex: PropTypes.number,
postsLength: PropTypes.numb... |
import angular from 'angular'
import ngRoute from 'angular-route'
import { AppComponent } from './app.component'
export const AppModule = angular
.module('app', [ 'ngRoute' ])
.component('app', AppComponent)
.config(['$locationProvider', '$routeProvider',
function config ($locationProvider, $routeProvider) ... |
'use strict';
module.exports = {
method : "GET",
url : ["/admin/categories/"],
desc : "get :admin categories find",
passport : null,
handler : function(req, res, next){
req.query.pivot = req.query.pivot ? req.query.pivot : '';
req.query.name = req.query.name ? req.query.name : '';
req.query.limit = req.que... |
const request = require('request');
const cheerio = require('cheerio');
const phantom = require("phantom");
const properties = require('../config/properties');
const parser = require('./parser.js');
function run(req, res) {
request.post({
url:'https://moodle.ut.ee/login/index.php',
form: {
username:... |
Ember.AnimatedContainerView.registerEffect('flip', function(ct, newView, oldView, callback) {
var ctEl = ct.$(),
newEl = newView.$(),
oldEl = oldView.$();
ctEl.wrap('<div class="ember-animated-container-flip-wrap"></div>')
ctEl.addClass('ember-animated-container-flip-ct');
newEl.addClass... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
* @jest-environment node
*/
'use strict';
let React;
let ReactTestRenderer;
let ReactDebugTools;
let act;
... |
import Orbit from 'orbit';
import key from 'ember-orbit/fields/key';
import attr from 'ember-orbit/fields/attr';
import hasOne from 'ember-orbit/fields/has-one';
import hasMany from 'ember-orbit/fields/has-many';
import Model from 'ember-orbit/model';
import { uuid } from 'orbit/lib/uuid';
var get = Ember.get;
var Pl... |
(function(module) {
var searchView = {};
$('#searchBox').on('submit', function(e) {
e.preventDefault();
if(this.search.value) {
$('#print-results').children().remove();
var searchTerms = this.search.value;
searchController.runSearch(searchTerms);
};
});
var render = Handlebars.c... |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M12 23c5.7 0 10.39-4.34 10.95-9.9.06-.59-.41-1.1-1-1.1-.51 0-.94.38-.99.88C20.52 17.44 16.67 21 12 21c-3.12 0-5.87-1.59-7.48-4H6c.55 0 1-.45 1-1s-.45-1-1-1H... |
import React, { Component, cloneElement } from 'react';
import PropTypes from 'prop-types';
import injectSheet from 'react-jss';
import classNames from 'classnames';
import GridItem from './grid-item';
const styles = {
root: {
position: 'relative',
},
placeholder: {
backgroundColor: 'rgb(216, 226, 220)',... |
var fs = require('fs');
var path = require('path');
var express = require('express');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var bodyParser = require('body-parser');
var methodOverride = require('method-override');
var handlebars = require... |
'use strict';
describe('JsCollection', function () {
it('should create model and collection classes in global scope', function () {
expect(window.JsCollection).toBeDefined();
expect(window.JsModel).toBeDefined();
});
});
|
var express = require('express')
, mongoose = require('mongoose')
, routes = require('./routes.js')
, logger = require('morgan')
, path = require('path')
, bodyParser = require('body-parser')
, cookieParser = require('cookie-parser')
, session = require('express-session')
, app = express();
mongoos... |
/* eslint-disable */
var path = require('path')
var CopyWebpackPlugin = require('copy-webpack-plugin')
var webpack = require('webpack')
const { CheckerPlugin } = require('awesome-typescript-loader')
let publicUrl = process.env.NODE_ENV === 'production' ? 'https://liqu.io' : 'http://localhost:4000'
let baseConfig = {... |
/**
* (c) 2015 Ruben Schmidmeister
*/
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || fa... |
// JavaScript Olympics
// I paired with Ryan Salerno on this challenge.
// This challenge took me 2 hours.
// Warm Up
// Bulk Up
var athletes = [
{
name: "Sarah Hughes",
sport: "Ice Skating"
},
{
name: "Michael Phelps",
sport: "Swimming",
}
];
function addWin(athletes){
for (athlete i... |
var forEach = require('lodash.foreach');
var isDate = require('lodash.isdate');
var isEmpty = require('lodash.isempty');
var isPlainObject = require('lodash.isplainobject');
var keys = require('lodash.keys');
var strftime = require('strftime');
/**
* @param {unknown} obj
* @returns {string}
*/
function format(obj) ... |
const drums = document.querySelectorAll('.drum');
drums.forEach(drum => drum.addEventListener('transitionend', removePlayingClass));
window.addEventListener('keydown', keyHandler);
function keyHandler (event) {
const { audio, drum } = selectElements(event.keyCode);
if (!audio || !drum) return;
playFromStart(au... |
(function($) {
//By default it's null
var pluginName = 'randomBorder',
defaults = {
width : null,
color : null,
style : null,
radius : null,
show_caption: false
};
function randomBorder( element, options ) {
//alert("Hello2");
this.element = element;
this.s... |
'use strict'
var url = require('url')
// TODO: Once Node v0.10 is deprecated, change this to use a `Set` instead.
var LOCALHOST_NAMES = {
"localhost": true,
"127.0.0.1": true,
"0.0.0.0": true,
"0:0:0:0:0:0:0:1": true,
"::1": true,
"0:0:0:0:0:0:0:0": true,
"::": true
}
/**
* Utility functions for enfor... |
(function() {
var Manifest;
Manifest = exports.Manifest = require('./manifest');
exports.compute_delta = Manifest.compute_delta;
exports.hash_file = Manifest.hash_file;
exports.create_manifest = function(root, opts, cb) {
if (typeof opts === 'function') {
cb = opts;
opts = {};
}
re... |
'use strict';
angular.module('core').directive('productTabs', [
function() {
return {
restrict: 'E',
templateUrl: 'modules/core/views/product-tabs.client.view.html',
controller: function() {
this.tab = 1;
this.setTab = function(setTab) {
this.tab = setTab;
};
this.isSet = function(ch... |
// @flow
import React, { Component } from 'react';
import {Row, Col} from 'react-flexbox-grid';
import {Link} from 'react-router';
import LogoImg from '../../logo.png';
import { connect } from 'react-redux'
import { logout } from '../../actions/auth'
import { hashHistory } from 'react-router';
import { Dialog, Intent, ... |
// Copyright IBM Corp. 2014. All Rights Reserved.
// Node module: strong-statsd
// This file is licensed under the Artistic License 2.0.
// License text available at https://opensource.org/licenses/Artistic-2.0
// Copyright (c) 2010-2014 Etsy, see LICENSE.etsy
var assert = require('assert');
var async = require('async... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
... |
/*jslint browser: true, jquery: true */
/*global App: true, require: false, Ember: false, moment: false*/
App = require("app");
Ember.Handlebars.registerBoundHelper('date', function(value) {
return moment(value).fromNow();
}); |
var http = require('http');
module.exports.run = function(){
var server = http.createServer();
server.on('listening',function(){
console.log('Server is running');
});
server.listen(process.env.PORT || 5050);
}
|
import { createStore } from 'redux'
import rootReducer from '../reducers'
export default function configureStore(initialState) {
const store = createStore(rootReducer, initialState)
var store0=store.getState();
console.log('store0====='+JSON.stringify(store0));
if (module.hot) {
// Enable Webpack hot modul... |
var express = require('express');
var ziftr = require('bitcoin');
var MongoClient = require('mongodb').MongoClient;
var router = express.Router();
var log4js = require('log4js');
var async = require('async');
var moment = require('moment');
var pretty = require('prettysize');
var client = new ziftr.Client({
host: ... |
/*
* Copyright 2016 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the terms of the LICENSE file distributed with this project.
*/
import * as tslib_1 from "tslib";
// HACKHACK: these components should go in separate files
// tslint:disable max-classes-per-file
// we need some empty interfaces ... |
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { typedDependencies } from './dependenciesTyped.generated';
import { createFormat } from '../../factoriesAny.js';
export var formatDependencies = {
typedDependencies: typedDependencies,
createFormat: createFormat
}; |
/*!
* Bootstrap-select v1.13.6 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2019 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
*/
!function(e,n){void 0===e&&void 0!==window&&(e=window),"function"==typeof define... |
/**
* Each section of the site has its own module. It probably also has
* submodules, though this boilerplate is too simple to demonstrate it. Within
* `src/app/home`, however, could exist several additional folders representing
* additional modules that would then be listed as dependencies of this one.
* For exam... |
/**
* @license AngularJS v1.0.8
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {
'use strict';
////////////////////////////////////
/**
* @ngdoc function
* @name angular.lowercase
* @function
*
* @description Converts the specified string to lowerca... |
'use strict';
angular.module('items').controller('FavoritesController', ['$scope','$rootScope','$filter', '$stateParams', '$location','$http','$q','$mdDialog', 'Authentication', 'Items',
function($scope,$rootScope,$filter, $stateParams, $location,$http,$q,$mdDialog, Authentication, Items) {
$scope.authentication = ... |
import { ADD_ALBUM, DELETE_ALBUM } from '../actions/index';
import _ from 'lodash';
const MAX_NUMBER_ALBUMS = 8;
function update(arr, key, newval) {
const match = _.find(arr, key);
if(match){
const index = _.indexOf(arr, match);
arr.splice(index, 1, newval);
} else {
arr.unshift(ne... |
// determine if the browser has Netscape-style plugins
let hasNSPlugins = !!(navigator.plugins && navigator.plugins.length);
// determine if the browser has basic DOM Level 1 capabilities
let hasDOM1 = !!(document.getElementById && document.createElement &&
document.getElementsByTagName);
|
(function() {
'use strict';
angular
.module('artemisApp')
.controller('ResultDetailController', ResultDetailController);
ResultDetailController.$inject = ['$scope', '$rootScope', '$stateParams', 'previousState', 'entity', 'Result', 'Submission', 'Participation'];
function ResultDetail... |
/* global chrome */
class MessageService {
static listen(action: string, handler: (message, callback: Function) => boolean) {
chrome.runtime.onMessage.addListener((request, sender, callback) => {
if (request.action === action) {
request.sender = sender;
return ha... |
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'widget', 'tr', {
'move': 'Taşımak için, tıklayın ve sürükleyin'
} );
|
'use strict';
const assert = require('assertthat');
const validator = require('../../../lib/validators/boolean');
suite('boolean', () => {
test('is a function.', done => {
assert.that(validator).is.ofType('function');
done();
});
test('returns a function.', done => {
assert.that(validator()).is.of... |
// @flow
// Copyright (c) 2016 Uber Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable la... |
cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { /*
*
* 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. ... |
/* global AudioContext */
var load = require('audio-loader')
var player = require('..')
var ac = new AudioContext()
var NOTES = 'C4 D4 E4 F4 G4 A4 B4 C5'.split(' ')
document.body.innerHTML = '<h1>Gain (sample-player example)</h1>(open the dev console)'
console.log('Loading sample...')
load(ac, 'examples/audio/piano.js... |
'use strict';
/**
* @module code-project/task/create-slack-channels
*/
const request = require('request');
const querystring = require('querystring');
/**
* Promise wrapper for request, abstracts the http api
* @private
* @param {Object} data - request object
* @returns {Promise.<String>} promise will resolve ... |
var text_handler = require('./text')
, through = require('./through')
, lookup = require('./lookup')
function Template(root) {
if(!(this instanceof Template)) {
return new Template(root)
}
if(root.length === undefined) {
root = [root]
} else {
root = [].slice.call(root)
}
this.root_nodes ... |
/**
* @fileoverview added by tsickle
* Generated from: test_files/ts_migration_exports_shim.no_externs/correct_default_value.ts
* @suppress {checkTypes,const,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
goog.module('test_files.ts_migration_exports_shi... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
... |
/*doc
---
title: Dropdowns
name: dropdown_react
categories:
- react_components_dropdowns
- react_all
---
<code class="pam">
<img src="/styleguide/download.svg" width="16" height="16"/>
npm install pui-react-dropdowns --save
<img src="/styleguide/download.svg" width="16" height="16"/>
npm install babel-loader react-sv... |
'use strict';
var rfr = require('rfr');
var lib = rfr('lib');
var ServicesConfig = rfr('lib/services/servicesConfig');
// Lambda Handler
module.exports.handler = function(event, context) {
lib.respond(event, context, ServicesConfig.Create, __dirname);
};
|
import { shallowMount } from '@vue/test-utils'
import PauseResumeButton from '@/renderless/PauseResumeButton.vue'
import FineUploader from 'fine-uploader-wrappers'
import { status } from 'fine-uploader/lib/core/all'
describe('renderless/PauseResumeButton.vue', () => {
let wrapper
let uploader
beforeEach(() => {... |
var path = require('path');
var paths = {
js: {},
styles: {
src: path.resolve(__dirname, './{{ cookiecutter.app_name }}/apps/static/sass'),
src_files: path.resolve(__dirname, './{{ cookiecutter.app_name }}/apps/static/sass/**/*.scss'),
dst: path.resolve(__dirname, './{{ cookiecutter.app_name }}/apps/st... |
a = [4,5,7,9,2];
b = a.slice(1,3);
assert(b, [5, 7]);
b = a.slice(-5,-2);
assert(b, [4, 5, 7]);
//---
var myFish = ['angel', 'clown', 'mandarin', 'surgeon'];
// removes 0 elements from index 2, and inserts 'drum'
var removed = myFish.splice(2, 0, 'drum');
assert(myFish == ['angel', 'clown', 'drum', 'mandarin', '... |
var currentSlide = 0;
var blankSlide = false;
var actualSlide = null;
var listIndex = -1;
function getBulletPointCount(slideNum) {
var slide = document.getElementById("slide" + slideNum);
var count = 0;
for(var i = 0; i < slide.children.length; ++i) {
if(slide.children[i].tagName == "UL") {
... |
gulp.task(mts('fonts'), function () {
return gulp.src([
'src/lib/fonts/**/*'
])
.pipe(gulpif(gzipOn, gzip(gzipOpt)))
.pipe(gulp.dest(
// Returns 'dist/en/lib/fonts/' when the 'en' locale is set...
build.destLocale('/lib/fonts/')
));
});
|
console.log('homepage'); |
let Model = require('../') |
/*
* This file contains methods to handle key events
*
*/
// code keys
const RIGHT_ARROW_CODE = 39;
const LEFT_ARROW_CODE = 37
function go_to_prev_focus()
{
if (total_matches == 0)
return;
var tmp_index = current_focus_index - 1;
if (tmp_index < 0) {
tmp_index = total_matches... |
import { APP_UPDATE_DATE_TIME } from '../actions/appActions';
const appInitialState = {
datetime: 'date time will be shown here',
};
export const app = (state = appInitialState, action = {}) => {
switch (action.type) {
case APP_UPDATE_DATE_TIME:
return {
...state,
datetime: action.datet... |
var page = require('webpage').create();
var system = require('system');
var url;
page.settings.loadImages = false;
page.settings.resourceTimeout = 100000; // 10s
page.settings.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36';
if (s... |
var modStorageApp = angular.module('modStorageApp', ['angular-json-rpc', 'ui.grid', 'ui.grid.edit', 'ui.grid.resizeColumns', 'tableSort', 'modStorageFilters', 'ui.bootstrap','angularTreeview']);
modStorageApp.controller('MainController', function ($scope, $http, $modal,$log) {
$scope.name = "Demo";
... |
/**
* Created by hector on 12.11.15.
*/
'use strict';
import User from './User.js';
class Comment {
constructor(config){
if(!(config.user instanceof User))
throw new Error("Param user should be instance User");
this.id = config.id || null;
this.user = config.user;
this.message = config.message || '';
... |
import Vue from 'vue'
import Vuex from 'vuex'
import videoMutations from './video/mutations'
import loadingMutations from './loading/mutations'
import cityMutations from './city/mutations'
import cityAcions from './city/actions'
import comingMutations from './coming/mutations'
import userMutations from './user/mutation... |
var fs = require('fs');
var pivotal = require('pivotal');
var exec = require('child_process').exec;
var TWO_YEARS = 2 * 365 * 24 * 60 * 60 * 1000;
var PIVOTAL_TOKEN_COOKIE = 'pivotalToken';
var TEAMCITY_HOSTNAME_COOKIE = 'teamcityHostname';
var TEAMCITY_USERNAME_COOKIE = 'teamcityUsername';
var TEAMCITY_PASSWORD_COOKI... |
var outer_container_id = "external";
var divContTemplateId = "small_cont";
var divDragTemplateId = "draggable_item";
//Make the effect of items moving, towards the direction given in input
//('right' and 'left' are just string values, they will work fine even to vertical moving )
... |
var express = require('express')
var debug = require('debug')('meanstackjs:tools')
var plato = require('plato')
var path = require('path')
module.exports = function (self) {
debug('started setupToolPlato')
if (self.environment === 'development') {
self.app.use('/plato', express.static(path.join(self.dir, 'tools... |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdLaptopMac(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M40 37h8c0 2.21-1.79 4-4 4H4c-2.21 0-4-1.79-4-4h8c-2.21 0-4-1.79-4-4V11c0-2.21 1.79-4 4-4h32c2.21 0 4 1.79 4 4l-.02 22c0 2.21-1.77 4-3.98 4zM8 11v2... |
import {Posts, Comments} from '/lib/collections';
import {Meteor} from 'meteor/meteor';
import {check} from 'meteor/check';
export default function () {
Meteor.methods({
'posts.create'(_id, title, content) {
check(_id, String);
check(title, String);
check(content, String);
// Show the l... |
'use strict';
angular.module('creativityTestAppApp')
.controller('MainCtrl', function ($scope, $http) {
$scope.answers = [];
$scope.questionPercent = 0;
$scope.resultMessage = '';
$scope.importantMessage = '';
$scope.resultByAreas = {};
$scope.showingResults = false;
$http.get('/api/... |
// Copyright 2015-2016, Google, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
'use strict';
var pp = require('../lib/parseTweets.js');
exports['parseTweets'] = {
setUp: function(done) {
this.feedFile = './test/pentametron.rss';
done();
},
'get 8 tweets': function(test) {
// how would you test incorrect or missing config.feedFile?
pp.parseTweets('ignored', function(err, r... |
function Player(id, name, hp, fireCallback) {
this._id = id;
this._name = name;
this._hp = hp;
this._isCurrent = false;
this._fireCallback = fireCallback;
this._render();
}
Player.prototype._render = function() {
//render hp indicator
if (this.getID()==0)
{
//render name
$( "#nickn... |
/*jshint jasmine: true */
'use strict';
require('es6-promise').polyfill();
var _ = require('lodash');
var Ref = require('../Ref');
var serverStuff = require('../serverStuff');
describe('serverStuff', function () {
describe('fetchRef', function () {
var fetchRef = serverStuff.fetchRef;
var schem... |
var gui = require( '../../' )
gui.init ( 'Form Tutorial: Page 3' )
var formConfig = {
id : 'myForm',
title: 'Form: Field Types',
type : 'pong-form',
resourceURL: 'hello',
height: '750px'
}
var formPlugInConfig = {
id: 'myFormDef',
description: 'Pre-Load Data Form',
fieldGroups... |
// Eloquent JavaScript
// Run this file in your terminal using `node my_solution.js`. Make sure it works before moving on!
// Program Structure
// Write your own variable and do something to it.
var person = "Aarthi";
console.log(person);
person = "Sam";
console.log(person);
//food prompt
prompt ("What is your fav... |
import styles from '../styles/style.css';
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import ColumnContainer from './columnContainer';
import AppHeaderContainer from './appHeaderContainer.js';
import { log } from '../';
const LEFT_SIDE = 'left';
const RIGHT_SIDE = 'right';
funct... |
/**
* @file mip-wygx-imgslider 组件.
* @author east_qiu@gmail.com.
* @version 1.0.0
*/
define(function (require) {
var customElement = require('customElement').create();
var Util = require('util');
var naboo = require('naboo');
var templates = require('templates');
var viewport = require('viewp... |
var AccessTokenModel = require("./node_modules/reso-api-oauth2-server/libs/mongoose").AccessTokenModel;
var AuthorizationCodeModel = require("./node_modules/reso-api-oauth2-server/libs/mongoose").AuthorizationCodeModel;
var ClientModel = require("./node_modules/reso-api-oauth2-server/libs/mongoose").ClientModel;
var... |
const { expect } = require('chai')
const store = require('../src/store')
describe('Store', () => {
it('should expose the global map store', () => {
expect(store.global).to.be.an('object')
})
it('should expose the local map store constructor', () => {
expect(store.Store).to.be.a('function')
})
it('s... |
/*
* HomePage Messages
*
* This contains all the text for the HomePage component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.components.HomePage.header',
defaultMessage: 'Works so much better than the one I use!',
},
});
|
export {Dropdown} from './dropdown'; |
(function() {
var $menu = $('#menu-dropdown');
var $overlay = $('.overlay');
var $body = $('body');
var triggerEvt = function() {
$menu.toggleClass('menu--active');
$overlay.fadeToggle(200);
$body.toggleClass('body--no-scroll');
};
$menu.on('click', '#open', function() {
triggerEvt();
})... |
describe("EyeballControllersTestYslowOverride",function() {
var controller;
beforeEach(function() {
require = helpers.require;
controller = EyeballControllersTestYslowOverride();
});
it("checks that the test controller initialises correctly",function() {
expect(controller).toB... |
var searchData=
[
['btc_5ftx_5fmultisig',['BTC_TX_MULTISIG',['../script_8h.html#a517c02233134e7b8b6ae330184b28b49afacc953c46e0ee001822241829580d99',1,'script.h']]],
['btc_5ftx_5fnonstandard',['BTC_TX_NONSTANDARD',['../script_8h.html#a517c02233134e7b8b6ae330184b28b49a9a36c9d9acf89e32ae8113f5621c98cb',1,'script.h']]]... |
export default {
key: 'G',
suffix: 'maj9',
positions: [
{
frets: '300002',
fingers: '200001'
},
{
frets: '324232',
fingers: '214131',
barres: 2,
capo: true
},
{
frets: 'xx4435',
fingers: '002314'
},
{
frets: 'xa9bax',
fingers:... |
import {
generateCleanUrlLink, generateIframeLink, urlTester, youtubeEmbedUrlTester, youtubePlaylistEmbedUrlTester,
} from './paragraph-link-utils'
describe('paragraph-link-utils', () => {
describe('urlTester', () => {
it('should return true whatever the link', () => {
// Given
const links = [
... |
/*
* grunt-deploy
* https://github.com/kevinschaul/strib-deploy
*
* Copyright (c) 2013 Kevin Schaul
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
... |
var resource = require('resource');
var ghMschema = require('./github.mschema');
var ghCtrl = require('./lib/');
var github = module.exports = resource.define('github', {
controller: ghCtrl,
schema: ghMschema,
});
exports.github = github;
|
/* @format */
import express from 'express';
import get from 'lodash.get';
import cors from 'cors';
import jwt from 'express-jwt';
import jwks from 'jwks-rsa';
import dotenv from 'dotenv';
import bodyParser from 'body-parser';
import mongoose from 'mongoose';
import { Promise } from 'es6-promise';
mongoose.Promise = Pr... |
BR.Util = {
get: function(url, cb) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.onload = function() {
if ((xhr.status === 200 || xhr.status === 0) && xhr.responseText) {
cb(null, xhr.responseText);
} else {
cb(BR.... |
/* @flow */
/* eslint-disable */
jest.autoMockOff();
// $FlowExpectedError[prop-missing] property `atoMockOff` not found in object type
jest.atoMockOff();
const mockFn = jest.fn();
mockFn.mock.calls.map(String).map((a) => a + a);
expect(1).toEqual(1);
expect(true).toBe(true);
expect(5).toBeGreaterThan(3);
expect(5).... |
(function() {
// identify root object
var root = (typeof self === "object" && self.self === self && self)
|| (typeof global === "object" && global.global === global && global);
/**
* Create an alarm which runs a callback at a specific time. Return a function
* which can be invoked to disable the alarm.
* @par... |
on.input.in = function () {
try {
$.schema.validate($.in)
output({out: $.get('in')});
} catch(err) {
output({ error: $.create(err) });
}
};
|
(function () {
'use strict';
angular.module('starter.components.list')
.directive('list', listDirective);
listDirective.$inject = [];
function listDirective() {
var directive = {
restrict: 'EA',
templateUrl: 'components/list/list.html',
scope: {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.