code stringlengths 2 1.05M |
|---|
var lang = 'en-US'
var accessToken = 'CFPAT-9b7a21488af237b472d49f2a7a235f8dacc4f99cee5df788bcb47bf6c5a4bb4d'
var space_id = 'vxu5be6w735m'
var query = {}
query.content_type = 'ashTree'
var baseAPI = 'https://api.contentful.com'
var assetAPI = baseAPI +"/spaces/" + space_id + "/assets/<asset_id>"; // ?access_token=" + ... |
import * as R from 'ramda';
import * as P from '@react-pdf/primitives';
import fetchEmojis from '../text/emoji';
import fetchImage from '../image/fetchImage';
const isImage = R.propEq('type', P.Image);
/**
* Get all asset promises that need to be resolved
*
* @param {Object} root node
* @returns {Array} asset pr... |
import Ember from 'ember';
import PaperNavContainer from './paper-nav-container';
export default Ember.Component.extend({
constants: Ember.inject.service(),
tagName: 'md-sidenav',
'locked-open': 'gt-sm',
closed: true,
closeOnClick: true,
navContainer: Ember.computed(function() {
return this.nearestOf... |
var bebop = require('node-bebop');
var drone = bebop.createClient();
module.exports = {
flightControls : function(cmd) {
switch (cmd) {
case 'test':
console.log('testing');
break;
case 'up':
drone.up(2);
break;
case 'down':
... |
import axios from "axios";
import {normalize} from 'normalizr';
import * as reqUtil from "./util/request-status-util";
import * as actions from "./actionTypes";
import Config from "Config";
import * as schema from "../schemas/playerSchema";
export function getPlayersByRoundId(roundId){
return function(dispatch){
... |
const assert = require('chai').assert;
const chai = require('chai');
const DisplayMessages = require('../lib/components/display-messages.js');
require('../lib/components/Application.js');
describe('DisplayMessages', function () {
it('should have a method called render', function () {
const displayMessages = new... |
"use strict";
const Command = require('../ember-cli/lib/models/command');
const InitCommand = Command.extend({
name: 'init',
description: 'Creates a new Angular CLI project in the current folder.',
works: 'everywhere',
availableOptions: [
{ name: 'dry-run', type: Boolean, default: false, aliases... |
'use strict';
(function() {
var out$ =
(typeof exports != 'undefined' && exports) ||
(typeof define != 'undefined' && {}) ||
this;
var doctype =
'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp "&... |
const expect = require( 'expect.js' )
const PathsExec = require( '..' )
let paths = new PathsExec()
describe( 'PathsExec', function() {
let countME = 0
describe( 'define uses', function() {
it( 'one Execution with /one/:number', () => {
paths.use( '/one/:number', [ 'number' ], function( params ) {
expect... |
/**
* Fixtures for tests
*/
const AAPL = {
"Status": "SUCCESS",
"Name": "Apple Inc",
"Symbol": "AAPL",
"LastPrice": 110.06,
"Change": 0.109999999999999,
"ChangePercent": 0.100045475216007,
"Timestamp": "Fri Nov 18 00:00:00 UTC-05:00 2016",
"MSDate": 42692,
"MarketCap": 586874368780,
"Volume": 28... |
/**!
* cnpmjs.org - common/urllib.js
*
* Copyright(c) fengmk2 and other contributors.
* MIT Licensed
*
* Authors:
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
*/
'use strict';
/**
* Module dependencies.
*/
var urllib = require('urllib');
var HttpAgent = require('agentkeepalive');
var HttpsAg... |
var plugins = module.exports = {};
plugins.log = function( lvl, msg ) { return this.ui.output( this.uiSource || 'core', lvl, msg ); };
plugins.info = function( msg ) { return this.log('info', msg); };
plugins.error = function( msg ) { return this.log('error', msg); };
plugins.debug = function... |
var app = new PIXI.Application();
document.body.appendChild(app.view);
var bol = false;
// create a texture from an image path
var texture = PIXI.Texture.fromImage('required/assets/flowerTop.png');
// create a second texture
var secondTexture = PIXI.Texture.fromImage('required/assets/eggHead.png');
// create a new ... |
'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 || false; descriptor.configurable = true; if ('v... |
import test from 'tape'
import { historyState, state, state1 } from './mock'
import { stateFromBrowser } from '../src/initState'
import { initState } from '../src/reducer'
import {
getKeyIndex, selectActive, selectFirstKey, getFirstIndex, getHistoryItems,
selectActiveIndex, getActiveId, findDifferentPage,
} from ... |
$( document ).ready(function() {
var url = "/space/questions"; // the script where you handle the form input.
$.ajax({
type: "GET",
url: url,
data: $("#mindq1").serialize(), // serializes the form's elements.
success: function (data) {
if (data) {
co... |
/* jshint node: true */
'use strict';
module.exports = {
name: 'simwms-shared',
included: function(app) {
this._super.included(app);
this.app.import(app.bowerDirectory + "/js-cookie/src/js.cookie.js");
}
};
|
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1) { var s = strx.split("<"); for(var i=0;i<s.length;i++){ if(s[i].indexOf(">")!=-1){ s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length); } } strx = s.join("");}
chop = (chop < strx.length-1) ? chop : strx.length-2; while(strx.charAt(chop-1)!=' ' && strx.i... |
'use strict';
// Users service used for communicating with the users REST endpoint
angular.module('users').factory('Users', ['$resource',
function($resource) {
return $resource('users/:name', { name: '@_id' }, {
update: {
method: 'PUT'
}
});
}
]); |
export const getTimeStamp = (date)=> {
return ((now.getMonth() + 1) + '/' +
(now.getDate()) + '/' +
now.getFullYear() + " " +
now.getHours() + ':' +
((now.getMinutes() < 10)
? ("0" + now.getMinutes())
: (now.getMinutes())) + ':' +
((now.getSeconds() < 10)
? ("0" + now.get... |
"use strict";
const assert = require( 'chai' ).assert;
const ModuleBase = require( '../src/modules/Base' );
class ModuleTestParent extends ModuleBase {};
class ModuleTestChildA extends ModuleBase {};
class ModuleTestChildB extends ModuleBase {};
class ModuleTestChildC extends ModuleBase {};
class ModuleTestThrows ext... |
var assert = require('assert');
var resolve = require('../');
var fixtures_dir = __dirname + '/fixtures';
test('module to implicit extension', function(done) {
var opts = { filename: fixtures_dir + '/node_modules/module-o/main.js' }
resolve('module-a', opts, function(err, path) {
assert.ifError(err);
... |
import {action} from '../foundation/util';
const SET_UNKNOWN = 'SET_UNKNOWN';
const SET_AUTHORIZED = 'SET_AUTHORIZED';
const SET_UNAUTHORIZED = 'SET_UNAUTHORIZED';
export let setUnknown = action(SET_UNKNOWN);
export let setAuthorized = action(SET_AUTHORIZED);
export let setUnauthorized = action(SET_UNAUTHORIZED);
e... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
/**
* A covering slider.
* The previous or next slide cover the current slide from right.
*
* Includes pagers and navigation buttons.
*
* @file presets/cover-right.js
* @module presets
* @author Gregor Adams <greg@pixelass.com>
*/
import wrapper from './wrapper'
/**
* Cover right animation slider
*
* This... |
define([], function () {
return function () {
var self = this;
self.name = 'Backdrop ScreenSaver';
self.type = 'screensaver';
self.packageName = 'backdropscreensaver';
self.supportsAnonymous = false;
function createElements() {
var elem = document.que... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4v2h-4V3zm0 12V8l5.5 3-5.5 4z"
}), 'ShopTwo'); |
import gulp from 'gulp';
import less from 'gulp-less';
import lessImport from 'gulp-less-import';
import concat from 'gulp-concat';
import minifyCss from 'gulp-minify-css';
import {APP_PATH, BUILD_PATH} from '../const';
import handleError from '../handleError';
gulp.task('buildLess', () => {
let lessifier = less({... |
(function() {
var _hueToRgb = function(p, q, t){
if(t < 0) t += 1;
if(t > 1) t -= 1;
if(t < 1/6) return p + (q - p) * 6 * t;
if(t < 1/2) return q;
if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
return p;
};
/*
* Converts an HSL color to RGB.
* @param {Number} h The hue value.
* ... |
// for babel-plugin-webpack-loaders
require('babel-register');
const devConfigs = require('./webpack.config.development');
module.exports = {
output: {
libraryTarget: 'commonjs2'
},
module: {
loaders: devConfigs.module.loaders.slice(1) // remove babel-loader
}
};
|
"use strict";
var config = require('cordova.plugin.boni.config'),
_ = require('cordova.plugin.boni.lodash');
var Registry = function() {};
Registry.prototype = function() {
var _onFarFromSpot = null,
_onNearToSpot = null,
_onImmediateToSpot = null,
_onAlwaysForSpot = null,
... |
'use strict';
angular.module('testApp')
.service('users', function($http, baseurl) {
var urlBase = '/api/users';
var mainURL = baseurl.baseURL();
urlBase = mainURL + urlBase;
this.getUsers = function(params) {
console.log(params);
if (params) {
... |
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from "react-redux";
import "semantic-ui-css/semantic.css";
import configureStore from "app/store/configureStore";
const store = configureStore();
// Save a reference to the root element for reuse
const rootEl = document.getElementById("ro... |
Template.umGlobalFab.rendered = function () {
this.eventHandler = function(){};
};
Template.umGlobalFab.helpers({
hidden: function() {
return !Session.get('globalFabVisible');
},
globalFabAttributes: function () {
return Session.get('globalFabAttributes');
}
});
Template.umGlobalFab.events({
'tap paper-fab'... |
/**
* jQuery plugin for FileAPI v2+
* @auhtor RubaXa <trash@rubaxa.org>
*/
/*jslint evil: true */
/*global jQuery, FileAPI*/
(function ($, api){
"use strict";
var
noop = $.noop
, oldJQ = !$.fn.prop
, propFn = oldJQ ? 'attr' : 'prop'
, _dataAttr = 'data-fileapi'
, _dataFileId = 'data-fileapi-id'
, ... |
var PlainLink = require("./PlainLink");
module.exports = BoxArrowLink;
function BoxArrowLink(domain, range, property) {
PlainLink.apply(this, arguments);
}
BoxArrowLink.prototype = Object.create(PlainLink.prototype);
BoxArrowLink.prototype.constructor = BoxArrowLink;
BoxArrowLink.prototype.draw = fu... |
/// <reference path="../../../../../typings/angularjs/angular.d.ts"/>
angular.module('Angello.Common')
//.constant('CURRENT_BACKEND', 'node')
.constant('CURRENT_BACKEND', 'firebase')
.service('EndpointConfigService', function($rootScope, CURRENT_BACKEND) {
var service = this,
endpointMap... |
class sapi_spstreamformatconverter {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeService()
... |
require('./bundler_mini.rb')
|
d3.bspGeoJson = function (collection, options) {
// ---- Validation of Options ----
"use strict";
validateOptions();
// ---- Variables ----
var width = options.width - options.margin[3] - options.margin[1],
height = options.height - options.margin[0] - options.margin[2];
var x = d3.scale.linear... |
Admin.BaseController = RouteController.extend({
layoutTemplate: 'adminLayout'
});
|
/*
* Copyright (c) 2009 - 2015 Tropo, now part of Cisco
* Released under the MIT license. See the file LICENSE
* for the complete license
*/
// --------------------------------------------
// demonstrating transfer to a SIP URI
// --------------------------------------------
call(toNumber);
say("transferring to ... |
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profi... |
const theLast = (arr) => {
return arr[arr.length-1]
}
module.exports = theLast
|
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var dirApp = path.join(__dirname, 'app');
var dirAssets = path.join(__dirname, 'assets');
// Is the current build a development build
var isDev = (process.env.NODE_ENV === 'dev');
// Add style source... |
'use strict';
// Lasts modifs 6june 23H25
/**
* DEPENDENCIES
*/
const koa = require('koa');
const mongoose = require('mongoose');
var app = module.exports = koa();
/**
* CONFIGURATION
*/
var config = require('./config/config');
// Connexion to mongoose
//mongoose.connect('mongodb://' + config.mongo.user + ':... |
'use strict';
// antidotes-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const antidotesSchema = new Schema({
name: { type: String, required: true },
description:{type:'String... |
'use strict';
import template from './login.jade';
|
import EventEmitter from 'eventemitter3';
const button = InterruptIn(USER_BUTTON);
const buttonEmitter = new EventEmitter();
button.rise(() => {
buttonEmitter.emit('rise');
})
button.fall(() => {
buttonEmitter.emit('fall');
})
export default buttonEmitter;
|
var PIXI = require('pixi');
var Pencil = require('../shapes/Pencil')
var EVENT = require('../../../../model/model').socketEvents;
module.exports = function(el, AppState) {
var stage = AppState.Canvas.stage;
var socket = AppState.Socket;
var shapes = AppState.Canvas.Shapes;
var isDown = false;
var prevPos = {... |
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a... |
angular.module('coffeeCups.core').factory('locationService', function($geolocation, $q) {
var factory = {},
location = undefined;
function rad(x) {
return x * Math.PI / 180;
};
//calculates distance between 2 points
factory.getDistance = function(p1, p2) {
var R = 6378137;... |
'use strict';
var navigationHeader = require('../../index'),
periodicalNavigation;
var navEvents = function () {
periodicalNavigation.on('navigationInitialized', function () {
console.log('nav loaded');
});
periodicalNavigation.on('navigationShowEvent', function () {
// console.log('nav shown');
});
periodi... |
ace.define("ace/theme/dawn", ["require", "exports", "module", "ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-dawn";
exports.cssText = ".ace-dawn .ace_gutter {\
background: #ebebeb;\
color: #333\
}\
.ace-dawn .ace_print-margin {\
width: 1px;\
background: #e8e8... |
var assert = require('assert'),
request = require('supertest');
module.exports = function(app, config, db, log) {
var base = "/api/v1";
describe("Get item by ID", function() {
it("Endpoint exists", function(done) {
request(app).get(base + "/schemas/000000000000000000000000.json").expect('Content-Ty... |
'use strict';
angular.module('app')
// A service to share 'post' object between controllers
.service('sharedPost', function () {
var post = this;
})
// Service with methods related to operation on/with posts
.service('postService', ['$http', '$mdDialog', '$cookies', function ($http, $mdDia... |
/**
* Factory Pattern
* Type : Creational Pattern
*
* Factory pattern comes from the concept of factories in real world. Just as
* factories create object that we can use, a factory class can create objects
* for others to consume.
*
* A Factory class provides a simple API for the creation of instances of a cl... |
'use strict';
var placeholders = require('placeholders');
var utils = require('../../lib/utils');
var support = module.exports;
support.exists = utils.exists;
support.versionPath = function(structure, data, opts) {
return placeholders(opts)(structure, data);
};
|
// var webpack = require('webpack')
var express = require('express')
// var config = require('./config.js')('development');
var path = require('path')
var app = require('express')()
var port = process.env.PORT || 3000;
// var webpackDevMiddleware = require('webpack-dev-middleware')
// var webpackHotMiddleware = requir... |
/*******************************************************************************
*
* Async Loader
*
* Loads various scripts into the document. Appends them after a defined node.
*
*******************************************************************************/
define([], function() {
function insertElement( elem... |
var express = require('express');
var auth = require('./auth');
var router = express.Router();
var utils = require('../utils/utils.js');
var compression = require('compression');
var config = require('../profile/config.js');
var common = require('./common.js');
router.use(compression());
router.use(auth.authware({}));... |
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Home from '../../components/home/Home';
import * as HomeActions from '../../actions/home/home';
function mapStateToProps(state) {
return {
counter: state.counter
};
}
function mapDispatchToProps(dispatch) {
return bind... |
'use strict';
var DashboardPage = function () {
this.assertBuildNumberToBe = function (expectedBuildNumber) {
var buildNumber = element(by.binding('vm.applicationInfo.buildNumber'));
expect(buildNumber.getText()).toBe(expectedBuildNumber);
};
};
module.exports = DashboardPage; |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Paper } from 'material-ui'
/**
* Material design bottom sheet
* @see [Bottom Sheet](https://material.io/guidelines/components/bottom-sheets.html)
*/
export default class BottomSheet extends Component {
getStyles () {
const {
... |
import test from 'ava';
import 'babel-core/register';
import deepFreeze from 'deep-freeze';
import { normalizeArea } from '../../src/cropper/calculations';
const originalImageSize = deepFreeze({
width: 1280,
height: 720
});
test('Normalization: Valid area does not change after normalization', t => {
const vali... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
'use strict';
const {resolve} = require('path');
const {chmod, cp, mkdir, rm, test} = require('shelljs');
const {bas... |
var MyData = [];
var btnSave;
window.onload = function () {
btnSave = document.getElementById('btnSave');
btnClear = document.getElementById('btnClear');
btnSave.addEventListener('click', manipulateData);
btnClear.addEventListener('click', clearForm);
};
function manipulateData() {
if (validateData... |
'use strict';
angular.module('sbAdminApp').factory('LoginSession', function ($http, Storage) {
var authService = {};
authService.login = function (credentials) {
return $http
.post('/login', credentials)
.then(function (res) {
Session.create(res.data.id, res.data.us... |
'use strict';
var app = angular.module('myApp.view3', ['ngRoute', 'ngResource'])
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/view3', {
templateUrl: 'view3/view3.html',
controller: 'View3Ctrl'
});
}])
app.config(['$httpProvider', function($httpProvider) {
$httpProvid... |
var User = require('../models/user').User;
var multiparty = require('multiparty');
var HttpError = require('../error').HttpError;
var AuthError = require('../models/user').AuthError;
var async = require('async');
var Category = require('../models/category').Category;
var postdata = require('postdata');
var Payme... |
var mlcl_forms_services = angular.module('mlcl_forms.services', [
'angular-growl',
'ngResource'
]);
mlcl_forms_services.factory('apiService', [
'$http',
'$filter',
'schemaService',
'recordService',
'growl',
'$rootScope',
'$resource',
'$materialDialog',
function ($http, $filter, SchemaService... |
import _ from 'lodash'
import cx from 'classnames'
import React, { PropTypes } from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
SUI,
useKeyOnly,
useKeyOrValueAndKey,
useValueAndKey,
useVerticalAlignProp,
} from '../../lib'
import ListContent from './ListContent'
import ... |
import React, { Component } from 'react';
import s from './styles.css';
import CommentFormPart1 from './CommentFormPart1';
import CommentFormPart2 from './CommentFormPart2';
import CommentFormPart3 from './CommentFormPart3';
export default class CommentForm extends Component {
constructor(props) {
super(props);... |
//JSLint options:
/*jslint sloppy: true, browser: true */
/*global log, logGUI, logStatus, $L, Mojo, AppAssistant, PalmCall, config */
function WelcomeAssistant() {
/* this is the creator function for your scene assistant object. It will be passed all the
additional parameters (after the scene name) that were pas... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Urbane Innovation, LLC
*
* 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
... |
console.log(12345678);
console.log('inject and inline test');
console.log("inject and inline tes"); |
define(["Test", "Tone/core/Transport", "Tone/core/Tone", "helper/Offline",
"Tone/type/TransportTime", "Tone/signal/Signal", "helper/BufferTest"],
function (Test, Transport, Tone, Offline, TransportTime, Signal, BufferTest) {
describe("Transport", function(){
function resetTransport(done){
Tone.Transport.cancel... |
var Editor = function () {
var SIGNALS = signals;
this.signals = {
// actions
playAnimations: new SIGNALS.Signal(),
play: new SIGNALS.Signal(), //plays physics + sounds
stop: new SIGNALS.Signal(),
// notifications
themeChanged: new SIGNALS.Signal(),
... |
var startingTime = new Date().getTime();
var countFrom = 60;
var countDown = function(){
var currentTime = new Date().getTime();
var diff = currentTime - startingTime;
var secondsLeft = countFrom - Math.floor(diff/1000);
if(secondsLeft >= 10){
$('.timer').html("<h3>00:" + secondsLeft + "</h3>");
} else if... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const networks = require('./networks');
const payments = require('./payments');
const bscript = require('./script');
const types = require('./types');
const bech32 = require('bech32');
const bs58check = require('bs58check');
const typeforce = ... |
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
var Promise = require('when').Promise;
module.exports = function view(render, updates, el) {
return updates.scan(function (state, store) {
return state.then(function(state) {
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _three = require("three");
var _three2 = _interopRequireDefault(_three);
var _BaseHelper2 = require("../BaseHelper");
var _BaseHelper3 = _interopRequireDefault(_BaseHelper2);
function _interopRequireDefault(obj) { return obj && obj... |
$(document).ready(function(){
$("#dezentral_domain").keyup(function(){
$(".dezentral_domain").html($(this).val());
});
$("#update_list").change(function(){
var selected_val = $(this).find("option:selected").val();
if(selected_val == "true"){
$("#dezentral_mis").prop("di... |
/*
* sayeasy
* https://github.com/smithclay/sayeasy
*
* Copyright (c) 2012 Clay Smith
* Licensed under the MIT license.
*/
var express = require('express');
var app = express();
var say = require('say');
var fs = require('fs');
var path = require('path');
var afplay = require('./afplay');
app.use(express.bodyPa... |
'use strict';
System.register(['aurelia-templating', 'aurelia-dependency-injection', 'aurelia-framework', '../common/attributeManager', '../common/attributes', '../control/control'], function (_export, _context) {
"use strict";
var bindable, customElement, noView, inject, computedFrom, AttributeManager, getBo... |
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'qbe-prototype',
environment: environment,
baseURL: '/',
hostUrl: 'http://localhost:1337',
locationType: 'hash',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ... |
// compose :: f -> (ƒ -> (Any -> Any))
const compose = f => g => x => f(g(x))
// identity :: Any -> Any
const identity = a => a
// apply :: ƒ -> (ƒ -> ( -> Boolean))
export const apply = t =>
eq =>
() => (y => eq(y.ap(y.ap(y.map(compose))), y.ap(y).ap(y)))(t.of(identity))
export default apply
|
/*
Copyright 2015-2017 The OmniDB Team
This file is part of OmniDB.
OmniDB is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
OmniDB is distr... |
var nodebb = require('../nodebb'),
translator = nodebb.translator,
templates = nodebb.templates;
var models = require('../models');
module.exports = function (Widgets) {
Widgets.render = Widgets.render || {};
Widgets.render.recentArticles = function (widget, callback, context) {
function getArticles(err, article... |
var lorem = require('../');
lorem(10, function(err, str, unicode) {
console.log(str, unicode);
})
console.log(lorem(10))
|
var frisby = require('frisby');
frisby.create('Get Brightbit Twitter feed')
.get('https://api.twitter.com/1/statuses/user_timeline.json?screen_name=brightbit')
.expectStatus(200)
.expectHeaderContains('content-type', 'application/json')
.expectJSON('0', {
place: function(val) { expect(val).toMatchOrBeNull(... |
var stdlib = require('./stdlib/info')
, local = require('./local/info')
, remote = require('./remote/info')
, util = require('util')
;
var _info
, _finish
;
exports.info = function(name, config, callback){
var acc
, idx
;
acc =
{ registries: []
, config: config
, entry:
{ name: ... |
export { default } from "./../../_gen/openfl/filters/BitmapFilter"; |
//This module handles everything in the #tab-items.
//For: ItemBlocks,title,
import Sortable from 'sortablejs';
export default function (name, source) {
if (name === undefined)
name = "Unnamed Itemset";
if (source === undefined)
source = [{ title: 'Block 1', id: 1 }];
var options = {
item: '<li c... |
var app = angular.module('app', [])
.controller('IndexController', IndexController)
.controller('UploadController', UploadController); |
export const bName = module.id.split("/").pop();
import { report } from "./from-ordering-common.js";
report(bName);
|
var path = require('path');
module.exports = {
name: 'ember-data-factory-guy',
blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
},
included: function(app) {
this._super.included(app);
if (app.tests) {
app.import(app.bowerDirectory + '/jquery-mockjax/dist/jquery.mockj... |
/*
* Copyright (c) 2014 MKLab. All rights reserved.
*
* 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... |
import React from 'react';
import { shallow } from 'enzyme';
import Radio from './Radio';
describe('Radio', () => {
let component;
beforeEach(() => {
component = shallow(<Radio name="test-radio" id="an-id" />);
});
it('renders a hidden input that keeps and changes state', () => {
const hiddenInput =... |
(function () {
'use strict';
// コントローラ登録
angular
.module('app')
.controller('SellController', Controller);
// DI
Controller.$inject = ['$log', '$timeout', '$cordovaCamera', 'BookService'];
// コントローラ
function Controller($log, $timeout, $cordovaCamera, BookService) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.