code stringlengths 2 1.05M |
|---|
var express = require('express');
var router = express.Router();
router.get('/', function(req,res){
res.send('hello from api route.');
});
module.exports = router; |
import is from 'is_js';
import Strategy from './strategy';
export class TimerStrategy extends Strategy {
constructor(config) {
super(config);
if (! is.number(config.intervalMs)) return;
window.setInterval(() => {
this.emit('notification');
}, config.intervalMs);
}
}
export default TimerStrat... |
'use strict';
module.exports = function (environment) {
let ENV = {
modulePrefix: 'ember-demo',
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPO... |
/**
* Graphology Louvain Indices
* ===========================
*
* Undirected & Directed Louvain Index structures used to compute the famous
* Louvain community detection algorithm.
*
* Most of the rationale is explained in `graphology-metrics`.
*
* Note that this index shares a lot with the classic Union-Find... |
export function isCommented(cm, nLine, match) {
let token = cm.getTokenAt({ line: nLine, ch: match.index });
if (token && token.type) {
return token.type === 'comment';
}
return false;
}
export function isLineAfterMain(cm, nLine) {
let totalLines = cm.getDoc().size;
let voidRE = new Re... |
import React, {PureComponent} from "react";
import {FillView} from "../shared/fill-view";
import {CodeView} from "../shared/code-view";
const sourceCode = `
export const DynamicRectangles = ({color, width, height}) => {
const divProps = {
style: {
backgroundColor: color,
width: widt... |
/* jshint browser: true */
'use strict';
(() => {
const resultList = document.getElementById("result-list");
const observer = fastnav.observer;
const actions = fastnav.actions;
const SELECT_NONE = 0;
const SELECT_DOWN = 1;
const SELECT_UP = 2;
var listManager = (() => {
var cu... |
(function(){
if (typeof(KekuleMoodle) === 'undefined')
KekuleMoodle = {};
if (!KekuleMoodle.Widget)
KekuleMoodle.Widget = {};
KekuleMoodle.Widget.ChemObjSelectorPanel = Class.create(Kekule.Widget.Panel, {
CLASS_NAME: 'KekuleMoodle.Widget.ChemObjSelectorPanel',
initialize: function(/*$super, */parentOrElementOrDoc... |
class stsserver_enumstsaltinfo {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeService()
... |
function Calendar(element, options, eventSources, resourceSources) {
var t = this;
// exports
t.options = options;
t.render = render;
t.destroy = destroy;
t.refetchEvents = refetchEvents;
t.reportEvents = reportEvents;
t.refetchResources = refetchResources;
t.reportEventChange = reportEventChange;
t.up... |
(function () {
angular.module('app').controller('edit',
['$scope', '$location', '$routeParams', 'datacontext', '$uibModal', editController]);
function editController($scope, $location, $routeParams, datacontext, $uibModal) {
var vm = this;
vm.entityName = 'FlexberryEmberDemoSugge... |
module.exports = function is_bool (mixed_var) {
// http://kevin.vanzonneveld.net
// + original by: Onno Marsman
// + improved by: CoursesWeb (http://www.coursesweb.net/)
// * example 1: is_bool(false);
// * returns 1: true
// * example 2: is_bool(0);
// * returns 2: false
ret... |
const conf = require('./gulp.conf');
const proxyMiddleware = require('./proxy-middleware.conf');
module.exports = function () {
return {
server: {
baseDir: [
conf.paths.dist
],
middleware: proxyMiddleware
},
open: false
};
};
|
//Test data
var dna_human_1 = "gcatcgatagagaagcatcgtacgtcagcccctgcccatgttagctagctatatattagctaaaaatttttcgcctaggaacacgactacgtcgatcgtagctacgtagctgactagctcgatcgatgcatgatgagagactagctagctagctgactgactgcatgctagctagctagctagctgactagctagctagtataataaagaggagaggaggctagctgactgtagatgatgctagtaggcaaaa"
var dna_human_2 = "gcatcgatggagacg... |
'use strict';
var matrix = require( 'dstructs-matrix' ),
betaln = require( './../lib' );
var data,
mat,
out,
tmp,
i;
// ----
// Plain arrays...
data = new Array( 10 );
for ( i = 0; i < data.length; i++ ) {
data[ i ] = Math.random();
}
out = betaln( data, 0.5 );
console.log( 'Arrays: %s\n', out );
// ----
//... |
// @flow
import EventEmitter from 'events';
const { emit } = EventEmitter.prototype;
// A simple UID creation function
let lastUID: number = -1;
export const uid = (prefix: string = 'w') => {
lastUID += 1;
return `${prefix}${Math.floor(46656 + (Math.random() * 1632959)).toString(36)}${lastUID.toString(36)}`;
};
... |
Package.describe({
name: 'sequoia:statistics',
version: '0.0.1',
summary: 'Statistics generator',
git: ''
});
Package.onUse(function(api) {
api.use([
'coffeescript',
'sequoia:lib'
]);
// Statistics
api.addFiles('lib/sequoia.coffee', [ 'client', 'server' ]);
api.addFiles([
'server/models/Statistics.coff... |
var cheerio = require("cheerio");
var request = require("request");
var moment = require("moment");
var months = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
var url = "http://museumca.org/events/all";
var shows = ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AutSortCustomAttribute = undefined;
var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;
var _aureliaFramework = require('aurelia-framework');
var _auTable = require('./au-table');
function _initDef... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Form, actions } from 'react-redux-form'
import { withRouter } from 'react-router-dom'
import DocumentTitle from 'react-document-title'
import AUpageAlert from '@gov.au/page-alerts/lib/js/react.js'
import AUheading from '@gov.au/head... |
import uop from "./_uop";
export default uop("squared", a => a * a);
|
var socket = require( 'socket.io' );
var express = require( 'express' );
var http = require( 'http' );
var app = express();
var server = http.createServer( app );
var io = socket.listen( server );
io.sockets.on( 'connection', function( client ) {
console.log( "New client !" );
client.on( 'message', function( dat... |
'use strict'
/* eslint-env mocha */
/* eslint-disable no-unused-expressions */
const expect = require('chai').expect
const APIctl = require('ipfs-http-client')
const http = require('http')
const path = require('path')
const fs = require('fs')
const request = require('request')
const parser = require('../src')
const o... |
'use strict';
describe('Module: tubular', () => {
describe('Filter: translate', () => {
var $filter, result, tubularTranslateService;
beforeEach(() => {
module('tubular.services');
module($provide => {
tubularTranslateService = jasmine.createSpyObj('translateService', ['translate']);
... |
(function () {
'use strict';
angular
.module('tags.admin.routes')
.config(routeConfig);
routeConfig.$inject = ['$stateProvider'];
function routeConfig($stateProvider) {
$stateProvider
.state('admin.tags', {
url: '/tags',
abstract: true,
template: '<ui-view></ui-view>... |
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1 g(0){0.2.4=\'3(5/e.6)\';0.2.f=\'c\... |
var session = require('express-session');
var scattered = {
provides: {"express/middleware/register": {after: ['express/middleware/preprocessors']}},
args: ['express/log', 'config', 'npm!express', 'express/providers/sessionStoreProvider']
};
module.exports = function(log, config, express, sessionStoreProvider) {... |
const express = require('express')
const cookieParser = require('cookie-parser')
const bodyParser = require('body-parser')
const session = require('express-session')
const passport = require('passport')
module.exports = (config, app) => {
app.set('view engine', 'pug')
app.set('views', config.rootPath + 'server/vie... |
CKEDITOR.dialog.add( 'html5video', function( editor ) {
return {
title: editor.lang.html5video.title,
minWidth: 500,
minHeight: 100,
contents: [ {
id: 'info',
label: editor.lang.html5video.infoLabel,
elements: [ {
type: 'vbox',
... |
'use strict';
var state1 = angular.module( 'state1' );
state1.controller( 'State1Controller', function( $rootScope, $scope )
{
$scope.stateName = 'state-1';
console.log( 'State1Controller active!' );
} );
|
import {READ_BREWSESSION_HISTORY_STARTED, READ_BREWSESSION_HISTORY_FAILED, READ_BREWSESSION_HISTORY_SUCCEEDED} from '../constants/actionTypes';
import objectAssign from 'object-assign';
import initialState from './initialState';
// IMPORTANT: Note that with Redux, state should NEVER be changed.
// State is considered ... |
(function() {
var VSHADER_SOURCE =
'void main() {\n' +
' gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n' + // Set the vertex coordinates of the point
' gl_PointSize = 10.0;\n' + // Set the point size
'}\n';
var FSHADER_SOURCE =
'void main() {\n' +
' gl_FragColo... |
const packageExists = require('./package-exists');
const cli = packageExists('webpack') ? require('webpack').cli : undefined;
const minimumHelpFlags = [
'config',
'config-name',
'merge',
'env',
'mode',
'watch',
'watch-options-stdin',
'stats',
'devtool',
'entry',
'target',
... |
const mongoose = require('mongoose');
let postsSchema = mongoose.Schema({
title: {
type: String,
required: true
},
content: {
type: String,
required: true
},
createdAt: {
type: String,
required: true,
},
views: {
type: Number
},
... |
const passport = require('passport');
const GoogleStrategy = require('passport-google-oauth20').Strategy;
const FacebookStrategy = require('passport-facebook').Strategy;
const LinkedinStrategy = require('passport-linkedin').Strategy;
const mongoose = require('mongoose')
const keys = require('../config/keys');
const Us... |
import React, { PropTypes } from 'react';
import UserLink from './UserLink';
import Spacer from './Spacer';
import ItemLink from './ItemLink';
import ParentLink from './ParentLink';
const CommentHeader = ({ comment }) => {
const { by, id, time, text, deleted, parent } = comment;
if (deleted) {
return <span />;... |
var mongoose = require('mongoose');
var Wine = mongoose.model('Wine');
var Comment = mongoose.model('Comment');
var express = require('express');
var router = express.Router();
// ------------------------------------------------------------------
// WINES
// -----------------------------------------------------------... |
/**
* Module dependencies.
*/
var reqwest = require('reqwest');
exports = module.exports = init;
/**
* Module initialization function.
*
* @public
*/
function init(config) {
return new Clog(config);
}
/**
* Main module object.
*
* @param {Object} config
* @param {string} [config.host="localhost"] - The... |
import EmberObject from '@ember/object';
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('OwnerRepoTileComponent', function (hooks) {
setupRenderingTest(hooks);
test('it rende... |
import { clickNotification, clickExternalNotification } from "../notifications";
describe("Notifications action creators test", () => {
it("clickNotification should return CLICK_NOTIFICATION action", () => {
const notification = {
name: "TEST_NOTIFICATION"
};
expect(clickNotification(notification))... |
import { deprecate } from "ember-data/debug";
/**
This is used internally to enable deprecation of container paths and provide
a decent message to the user indicating how to fix the issue.
@class ContainerProxy
@namespace DS
@private
*/
export default function ContainerProxy(container) {
this.container = ... |
'use strict';
module.exports = function (config) {
'use strict';
// eslint-disable-next-line no-var
var configuration = {
basePath: '',
frameworks: ['jasmine'],
files: [
'./public/modules/**/*.js',
'./public/models/**/*.js',
'./test/**/*.spec.js'
],
reporters: ['progress', 'coverage'],
pre... |
/*
* Popover plugin
*
* Options:
* - placement: top | bottom | left | right | center. The placement could automatically be changed
if the popover doesn't fit into the desired position.
* - fallbackPlacement: top | bottom | left | right. The placement to use if the default placement
* and all other ... |
// Pseudocode
// input: an array of integers
// output: three separate integer or string values: 1. the sum of the integers, 2. the mean of the integers, and 3. the median of the integers
// steps:
// create a function called sum that takes the array as an argument
// add all of the integers together
// save ... |
var config = {};
config.address = "irc.chat.twitch.tv"; // Twitch's IRC address
config.tmiPort = 6667; // Twitch's IRC port
config.relayPort = 6667; // Port the relay listens to
config.sendChannelModeNotices = true; // Send a human-readable notice with slow/sub-modes
config.apiClientId = ""; // Because Twitch API li... |
var app = angular.module('callcenterApplication', ['ngMessages', 'glue.directives']);
app.filter('time', function() {
return function(value) {
var minutes = Math.floor(value / 60);
var seconds = value - (minutes * 60);
if (minutes < 10){
minutes = '0' + minutes;
}
if (seconds < 10){
... |
import React from 'react';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
// Import Routes
import routes from './routes';
// Base stylesheet
require('./main.scss');
export default function App(props) {
return (
<Provider store={props.store}>
<Router history... |
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*\n' +
'<%= pkg.name %> | v<%= pkg.version %> | Build date: <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'Copyright (C)... |
var _ = require('lodash');
var when = require('when');
var validator = require('./validator');
var schema = require('../schema').tables;
var errors = require('../../errors');
var validateSchema = null;
var validate = null;
/**
* 模型属性值验证
* @param {String} tableName 数据表名称
* @param {String} model 模型JSON数据
... |
module.exports = {
components : {
overshadow : {
function : require('../components/camera'),
properties : {
z: -10
}
},
mouse : {
construct : require('../components/mouse'),
properties : {
speed: 5
}
},
winMessage : "You've won."
}
} |
var PubNub = require('pubnub')
// Configure Twitter subscribe key
var pubnubTwitter = new PubNub({
subscribeKey: "sub-c-78806dd4-42a6-11e4-aed8-02ee2ddab7fe",
})
// Listener on the Twitter channel
pubnubTwitter.addListener({
message: function(m) {
var msg = m.message;
// We are filtering tweets b... |
const passport = require('passport')
module.exports = function (req, res, next) {
passport.authenticate('jwt', function (err, user) {
if (err || !user) {
res.status(403).send({
error: 'Invalid Authorisation'
})
} else {
req.user = user
next()
}
})(req, res, next)
}
|
/* jQuery Content Panel Switcher JS */
var jcps = {};
jcps.fader = function(speed, target, panel) {
jcps.show(target, panel);
if (panel == null) {panel = ''};
$('.switcher' + panel).click(function() {
var _contentId = '#' + $(this).attr('id') + '-content';
var _content = $(_contentId).html();
if (sp... |
/* global describe, it */
import {assert} from 'chai'
import {Meteor} from 'meteor/meteor'
import {
createTestDID,
createTestHDWallet,
testRecoveryAddress
} from 'bitcoin/testUtils'
import {sendRawTransaction} from 'bitcoin/bitcoinRpc'
import signWithOwnerKey256 from 'bitcoin/sign'
import verifyWithOwnerKey256 ... |
import React from "react"
import { shallow } from "enzyme"
import { Idea } from "../../web/static/js/components/idea"
import IdeaEditForm from "../../web/static/js/components/idea_edit_form"
import IdeaLiveEditContent from "../../web/static/js/components/idea_live_edit_content"
import IdeaReadOnlyContent from "../../w... |
/* eslint-disable react/prop-types */
import { connect } from 'react-redux'
import { injectIntl } from 'react-intl'
import React from 'react'
import * as apiActions from '../../actions/api'
import * as locationActions from '../../actions/location'
import { getActiveSearch, getShowUserSettings } from '../../util/state'... |
var testModule = require('./testfile');
|
angular.module('game')
.factory('Particles', ['Calc', function (Calc) {
var nextName = 1;
function create(image, center, particles) {
var p = {
image: image,
size: Calc.nextGaussian(20, 4),
center: {x: center.x, y: center.y},
direction: Calc.nextCircleVector(),... |
'use strict';
const proxyquire = require('proxyquire');
const chai = require('chai');
const sinon = require('sinon');
const assert = chai.assert;
const expect = chai.expect;
const testHelper = require('../../util/testHelper');
const secrets = require('../../lib/secrets');
const constants = require('../../lib/constants... |
exports.names = ['songinfo'];
exports.hidden = false;
exports.enabled = true;
exports.matchStart = true;
exports.cd_all = 30;
exports.cd_user = 30;
exports.cd_manager = 5;
exports.min_role = PERMISSIONS.NONE;
function do_history(data, format, cid, songs_ago)
{
if (!cid || !format) {
sendMessage('/me :tfw: ... |
/**
* 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.
*
* @flow strict-local
* @format
*/
// flowlint ambiguous-object-type:error
'use strict';
const RelayConcreteNode = require('../... |
'use strict';
import React from 'react';
require('styles/hadrien/Demo.styl');
let DemoComponent = (props) => (
<div className="demo-component">
{ props.children }
</div>
);
DemoComponent.displayName = 'HadrienDemoComponent';
// Uncomment properties you need
// EditorComponent.propTypes = {};
// EditorCompo... |
/* global test expect */
const add = require('./.');
test('should add a string to a list only once', () => {
const arr = ['test'];
const newArr = add('test', arr);
expect(newArr[0]).toBe('test');
expect(newArr[1]).toBeFalsy();
});
test('should add a string to an empty list', () => {
const arr = [];
const... |
'use strict';
var React = require('react');
var mui = require('material-ui');
var SvgIcon = mui.SvgIcon;
var createClass = require('create-react-class');
var DeviceBattery90 = createClass({
displayName: 'DeviceBattery90',
render: function render() {
return React.createElement(
SvgIcon,
this.prop... |
/**
* GearBonus.js
* KC3改 The definitions of Ship's stats visible bonuses from equipment (Gears).
* Visible bonus only, hidden bonuses, improvement bonuses, anti-specified-target bonuses are excluded for now.
*/
(function(){
"use strict";
// All methods are static, do not instantiate this.
window.KC3GearBonus =... |
/* global define, describe, it, expect, beforeEach */
(function (root, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['_tree', 'underscore'], factory);
} else if (typeof exports === 'object') {
// Node. Do... |
import typescript from '@rollup/plugin-typescript'
import replace from '@rollup/plugin-replace'
import resolve from '@rollup/plugin-node-resolve'
import { uglify } from 'rollup-plugin-uglify'
import pkg from './package.json'
// These plugins are used for all builds
const sharedPlugins = [
replace({
preventAssign... |
/**
* jQuery.marquee - scrolling text like old marquee element
* @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin
*/;
(function($) {
$.fn.marquee = function(options) {
return this.each(function() {
// Extend the options if any provided
... |
'use strict';
import test from 'blue-tape'
import possum from '../src/possum'
import stampit from 'stampit'
import Promise from 'bluebird'
import {EventEmitter2 as EventEmitter} from 'eventemitter2'
import EventEmitter3 from 'eventemitter3'
const buildMachineProto = (cfg) => {
cfg = (cfg || {
initialStat... |
//@flow
/*******************************************************************************
* Imports
*******************************************************************************/
import React from "react";
import marked from "marked";
import type { Page } from "tldr/Page";
import { Markdown } from "tldr/componen... |
import React, { Component, PropTypes } from 'react';
import { Link, browserHistory } from 'react-router';
import { connect } from 'react-redux';
import { addComment, removeComment } from '../Comment/CommentActions';
import { updateGame } from '../Game/GameActions';
// Import Style
import styles from './App.css';
// Im... |
var DOCUMENTER_CURRENT_VERSION = "previews/PR99";
|
$(window).load(function(){
// CREATE RANDOM COLORS ON PROJECT HOVER
$('.get-color').hover(function() {
var randomcolor = "#000000".replace(/0/g,function(){return (~~(Math.random()*16)).toString(16);});
//console.log(color); //SHOW RANDOM HEX COLOR
$('.hover-mask').css({background: [rand... |
import 'classnames';
import 'history/createBrowserHistory';
import 'lodash';
import 'marked';
import 'proptypes';
import 'react';
import 'react-dom';
import 'react-helmet';
import 'react-redux';
import 'react-router-dom';
import 'react-router-redux';
import 'redux';
import 'redux-devtools-extension/logOnlyInProduction'... |
(function () {
"use strict";
var easm = {
registers: {
ax: 0,
bx: 0,
cx: 0,
dx: 0
},
stack: [],
regPat: /ax|bx|cx|dx/,
source: "",
init: function () {
this.registers.ax = 0;
this.registers.bx = 0;
this.registers.cx = 0;
this.registers.dx = 0;
... |
function EnviaFormSC() {
document.FormMesa.submit();
}
function EnviaFormDepar() {
document.FormDepar.submit();
}
function incrementa(id) {
document.getElementById(id).value++;
}
function decrementa(id) {
if(document.getElementById(id).value > 1)
document.getElementById(id).value--;
}
function re... |
/**
* Copyright (c) 2017-present, Alejandro Mantilla <@AlejoJamC>.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree or translated in the assets folder.
*/
/**
* Module dependencies.
*/
var async = require('async'... |
jQuery(document).ready(function ($) {
$("a.trigger").click(function (event) {
event.preventDefault();
linkLocation = $(this).attr("href");;
console.log(linkLocation);
$("body").fadeOut(1000, redirectPage);
});
function redirectPage() {
console.log(linkLocatio... |
'use strict'
const path = require('path')
module.exports = (filePath) => {
const extname = path.extname(filePath)
switch (extname) {
case '.jpeg':
return 'jpeg'
case '.jpg':
return 'jpg'
case '.jpe':
return 'jpeg'
case '.png':
return 'png'
case '.webp':
return 'we... |
import { connect } from 'react-redux';
import forEach from 'lodash/forEach';
import { fetchPosts } from 'src/actions';
export default connect(
state => ({
sources: state.qus[state.selectedQu].sources,
}),
dispatch => ({
dispatch,
}),
({ selectedQu, sources }, { dispatch }) => ({
... |
const _ = require('./utils');
// Enable followers-only mode on a channel..
function followersonly(channel, minutes) {
channel = _.channel(channel);
minutes = _.get(minutes, 30);
// Send the command to the server and race the Promise against a delay..
return this._sendCommand(this._getPromiseDelay(), channel, `/fol... |
'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actua... |
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.m.ActionSelect.
sap.ui.define(['jquery.sap.global', './Select', './library'],
function(jQuery, Se... |
import {dirname} from 'node:path';
import {fileURLToPath} from 'node:url';
import buildParserOptions from 'minimist-options';
import parseArguments from 'yargs-parser';
import camelCaseKeys from 'camelcase-keys';
import decamelize from 'decamelize';
import decamelizeKeys from 'decamelize-keys';
import trimNewlines from... |
/*! p5.sound.js v0.3.0 2016-01-31 */
(function (root, factory) {
if (typeof define === 'function' && define.amd)
define('p5.sound', ['HW0/02-bar clock/libraries/p5'], function (p5) { (factory(p5));});
else if (typeof exports === 'object')
factory(require('../p5'));
else
factory(root['p5']);
}(this, fu... |
/**
* Created by eversvik on 22.06.2015.
*/
/// <reference path='../_all.ts' />
//# sourceMappingURL=ITodoStorage.js.map |
const React = require('react');
const IconBase = require('react-icon-base');
export default class EditorIndent extends React.Component {
render() {
return (
<IconBase viewBox='0 0 20 20' {...this.props}>
<path d='M3 5v-2h9v2h-9zM13 4v-1h4v1h-4zM13 7h2v-2l4 3.5-4 3.5v-2h-2v-3zM3 8v-2h9v2h-9zM5 11v-2h7v2h-7zM3... |
import expect from 'expect';
import $q from '../src/index';
describe('querify', () => {
it(`should querify webpack loader configs`, () => {
const config = {
css: {
modules: true,
importLoaders: 2,
sourceMap: true
},
sass: {
outputStyle: 'expanded',
source... |
(function() {
'use strict';
b3e.nodes.Fuzz = b3e.node.create('Fuzz', b3e.MODULATOR, {
maxInConnections: 1,
properties: [
['curve', b3e.properties.Curve, {
lockYDomain: true,
}],
]
});
})(); |
// test-childipc.js
// © Harald Rudell 2013 MIT License
var childipc = require('../lib/childipc')
// https://github.com/haraldrudell/mochawrapper
var assert = require('mochawrapper')
exports['Child Ipc:'] = {
'Exports': function () {
assert.exportsTest(childipc, 1)
},
'TODO': function () {
},
} |
#!/usr/bin/env node
/**
* Game Idea Machine
* a twitter bot which tweets random game ideas
* this file is the wrapper around the generator, and handles all the twitter related stuff
*/
var Twit = require('twit');
var fs = require('fs');
var path = require('path');
var util = require('util');
var generator = requi... |
import React from 'react';
import {SafeAreaView, Text, StatusBar, Platform, Button} from 'react-native';
import {
BluetoothStatus,
useBluetoothStatus,
} from 'react-native-bluetooth-status';
class AppClass extends React.Component {
state = {
bluetoothState: undefined,
};
componentDidMount() {
this.c... |
import React, { Component, PropTypes } from 'react';
import _ from 'lodash';
import parentStyles from './ArrayField.css';
import styles from './ObjectArrayField.css';
import ArrayField from './ArrayField';
import Field from './Field';
import SortableList from '../../../ui/SortableList';
import Button from '../../../u... |
if (!customValidators) {
} else {
customValidators.validateCnsaBaseline = function(viewValue, form, model) {
var fieldId = form.fieldId;
var returnValue = {
custom: true,
valid: false,
error: {
code: 0,
element_ids: []
},
rootScopeBroadCast: true
};
if ... |
describe('prototype', function() {
it('[new]', function() {
var p = new T.Prototype();
var c = p.extend();
var i = c();
assert(i instanceof c);
});
it('._arguments', function() {
var p = new T.Prototype();
var i = p.extend()(1, 2, 3);
assert(_.isArgume... |
import config from 'config';
import axios from 'axios';
import URL from 'url';
import { AllNews } from './services';
import { configFetch } from './configuration';
export default (args) => {
const url = URL.parse(AllNews);
const params = {
q: args.query
}
return axios(configFetch(url, 'get', params)).the... |
'use strict'
module.exports = function (sequelize, DataTypes) {
var Image = sequelize.define('Image', {
url: DataTypes.STRING
}, {
underscored: true,
freezeTableName: true,
tableName: 'images'
})
Image.associate = function (models) {
Image.belongsTo(models.User, { foreignKey: 'user_id' })
... |
/*global describe, it, beforeEach, afterEach*/
// libraries
var path = require('path'),
chai = require('chai'),
spies = require('chai-spies'),
expect = chai.expect,
Q = require('q');
chai.use(spies);
// code under test
var provisionCmd = require('../src/command/provision');
// mocks
var mockSpeedboat ... |
import _ from 'lodash'
import Vue from 'vue/dist/vue'
import test from 'ava'
import nextTick from 'p-immediate'
import FlexTable from '../../src/components/FlexTable'
import FlexDataTable from '../../src/index'
Vue.config.productionTip = false
Vue.use(FlexDataTable)
test('has a created hook', (t) => {
t.true(_.isFu... |
var require('fuse-bindings');
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.