code stringlengths 2 1.05M |
|---|
import isNil from "lodash/isNil";
import isArray from "lodash/isArray";
import isFunction from "lodash/isFunction";
import isObject from "lodash/isObject";
import mergeWith from "lodash/mergeWith";
import Fakerator from "lib/fakerator";
module.exports = function() {
let locale = require("lib/locales/sv-SE");
let fb... |
module.exports = {
'tokens': [
{
'type': 'category',
'name': 'Colors',
'tokens': [
{
'variable': '--app-accent-color',
'name': 'App Accent Color',
'type': 'color',
'themes': {
'plain': {
'value': 'black',
'va... |
/*
* Copyright (C) 2014 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration. All Rights Reserved.
*/
/**
* @exports BMNGRestLayer
*/
define([
'../error/ArgumentError',
'../layer/Layer',
'../util/Logger',
'../... |
console.log('Hello!');
var thermostat = new Thermostat();
var updateTemperature = function() {
$('#temperature_display').text(thermostat.temperature);
$('#temperature_display').css('color', thermostat.colour);
};
$(document).ready(function() {
updateTemperature();
$('#increase-button').on('click', functio... |
var Observer = require('../../../../src/observer')
var config = require('../../../../src/config')
var _ = require('../../../../src/util')
describe('Observer', function () {
it('create on non-observables', function () {
// skip primitive value
var ob = Observer.create(1)
expect(ob).toBeUndefined()
//... |
const { BrowserWindow } = require('electron');
const path = require('path');
class RecorderWindow {
constructor() {
let htmlPath = 'file://' + path.join(__dirname, '..') + '/pages/recorder_window.html'
this.window = new BrowserWindow({
show: false,
height: 400,
width: 600,
minHeight... |
/*
This file is part of Ext JS 4
Copyright (c) 2011 Sencha Inc
Contact: http://www.sencha.com/contact
Commercial Usage
Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the term... |
;(function(){
"use strict";
const module = window.load = {
name: "xhr"
};
const xhr = module.exports = (type, url, cb, opts) => {
const xhr = new XMLHttpRequest();
if (opts) Object.keys(opts).map(key => xhr[key] = opts[key]);
xhr.open(type, url);
xhr.onreadystatechange = () => {
if (xhr.readyState... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... |
var subject = require('../../lib/helpers/injector');
var Promise = require('bluebird');
describe('injector', function() {
it('returns a function returning a promise', function() {
var fn = subject({});
expect(fn('name', [])).to.be.instanceOf(Promise);
});
});
|
const merge = require('webpack-merge')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const base = require('./webpack.config.base')
const pkg = require('../app/package.json')
module.exports = merge(base, {
entry: {
renderer: ['./app/rende... |
var https = require('https');
var xml2js = require('xml2js');
var groups = {};
var host, port , auth, origin;
groups.getUserGroups = function(req, res) {
var options = {
rejectUnauthorized: false,
hostname: host,
port: port,
path: "/sap/opu/odata/UI2/PAGE_BUILDER_PERS/PageSets('%2... |
'use strict';
const fs = require('fs');
const path = require('path');
const Router = require('koa-router');
const apiRouter = require('./api');
const ask = require('../lib/ask');
const config = require('config');
const indexFilePath = path.resolve(__dirname, '..', 'views', 'index.html');
const router = new ... |
var group__spi__interface__gr =
[
[ "Status Error Codes", "group__spi__execution__status.html", "group__spi__execution__status" ],
[ "SPI Events", "group__SPI__events.html", "group__SPI__events" ],
[ "SPI Control Codes", "group__SPI__control.html", "group__SPI__control" ],
[ "ARM_DRIVER_SPI", "grou... |
import checkEmpty from '../helpers/checkEmpty';
const validateReview = {
validateFields(req, res, next) {
const { content } = req.body;
if (checkEmpty(content)) {
return res.status(400).json({
status: 'fail',
message: 'Review content field cannot be empty'
});
}
next();
... |
const m = require('mithril');
const Component = require('../../core/Component');
class ProjectBanner extends Component {
view(vnode) {
return m('.project', {
style: "background-image: url(" + vnode.attrs.bannerImage + ")",
onclick: function() {
m.route.set("/" + vno... |
/**
* Created by chenjianjun on 16/2/25.
*/
var env=require("../../config");
var type=env.Thinky.type;
/*
{
"success": true,
"message": null,
"data": [
{
"id": 227,
"recordVideoId": 9,
"createTime": "2016-01-21 17:31:09",
"updateTime": "2016-01-21 17:31:09",
"operater": 1,
"isU... |
export { default } from 'ember-fhir/models/parameters'; |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
errorHandler = require('./errors'),
Book = mongoose.model('Book'),
_ = require('lodash');
// ,
// googleapi = require('node-google-api')('AIzaSyAffzxPYpgZ14gieEE04_u4U-5Y26UQ8_0');
// exports.gbooks = function(req, res) {
// goog... |
import { Mongo } from 'meteor/mongo'
export const Saved = new Mongo.Collection('saved');
if (Meteor.isClient) {
Meteor.subscribe('saved')
}
if (Meteor.isServer) {
Meteor.publish('saved', function savedPublication() {
return Saved.find()
})
} |
'use babel';
import moment from 'moment';
import openUrl from 'opn';
const addError = ({ project, branch, build, endDate, commit }) => {
const relativeTime = moment(endDate).fromNow();
atom.notifications.addError(`Build #${build.id} has failed`, {
buttons: [
{
onDidClick() {
openUrl(`... |
var userData = [
{'fName':'Justin', 'lName' : 'Gil', 'age': 70, 'gender': 'M', 'phone': '949-111-1111', 'profilePic': '../pix/justin.jpeg', 'city' : 'San Diego', 'add' : '55 Serenity'
, 'Bio': 'I like soccer and long walks on the beach.', 'userIndex' : 1, 'username': 'justin', 'password': 'lol', 'state' : 'CA',... |
import FormComponent from '../../form-component';
export class TextArea extends FormComponent {
constructor(context, options) {
super(
context,
context.querySelector('.text-area__input'),
context.querySelector('.text-area__error'),
'Text Area',
options
);
super.init();
t... |
/**
* @aside guide tabs
* @aside video tabs-toolbars
* @aside example tabs
* @aside example tabs-bottom
*
* Tab Panels are a great way to allow the user to switch between several pages that are all full screen. Each
* Component in the Tab Panel gets its own Tab, which shows the Component when tapped on. Tabs can... |
window.PerfHelpers = window.PerfHelpers || {};
;(function(PerfHelpers) {
var timers = {};
PerfHelpers = window.performance || {};
PerfHelpers.now = PerfHelpers.now || function () {};
if ((!console) || (!console.time)) {
console.time = function() {};
console.timeEnd = function() {};
}
var consoleTi... |
function preloadimages(n,o){function r(){++a>=e&&o(i)}var a=0,e=0,i=n instanceof Array?[]:{};for(var c in n)e++,i[c]=new Image,i[c].src=n[c],i[c].onload=r,i[c].onerror=r,i[c].onabort=r} |
module.exports = function(locker) {
/*
locker.add(function(callback) {
//Return content in format:
callback({
name: "Vehicle Speed",
type: "metric",
content: {
x: 0,
y: 0,
... |
{
it("returns a key", () => {
var nativeEvent = new KeyboardEvent("keypress", {
key: "f"
});
expect(getEventKey(nativeEvent)).toBe("f");
});
}
|
/**
* A 32-bit unsigned bitfield that describes an entity's classification(s)
* @typedef {number} EntityClass
*/
/**
* Enumerate entity classes
*/
const ENTITY = {
NULL: 0x00,
// Base celestial classes
ASTEROID: 0x01, // floating rock in space, orbits star
COMET: 0x02, // an asteroid ... |
var _; //globals
/* This section uses a functional extension known as Underscore.js - http://documentcloud.github.com/underscore/
"Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support
that you would expect in Prototype.js (or Ruby), but without extend... |
const autoAdjustOverflow = {
adjustX: 1,
adjustY: 1
}
const targetOffset = [0, 0]
export const placements = {
left: {
points: ['cr', 'cl'],
overflow: autoAdjustOverflow,
offset: [-3, 0],
targetOffset
},
right: {
points: ['cl', 'cr'],
overflow: autoAdjustOverflow,
offset: [3, 0],
... |
'use strict';
function removeIndex(key, id, callback) {
var client = this._;
client.del(key + ':' + id + '@index', callback);
}
module.exports = removeIndex;
|
/* FTUI Plugin
* Copyright (c) 2016 Mario Stephan <mstephan@shared-files.de>
* Under MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/* global ftui:true, Modul_widget:true */
"use strict";
var Modul_medialist = function () {
$('head').append('<link rel="stylesheet" href="' + ftui.config.d... |
version https://git-lfs.github.com/spec/v1
oid sha256:2d79d4ce9f72e0b9db16aee949410ecd30bfcfb5205af39053f05ac39083e151
size 22425
|
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
requirejs: {
compile: {
options: {
shim: {
grape: {
exports: 'Grape'
... |
'unit tests';
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './src',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon', 'brows... |
const FeedParser = require("feedparser");
const request = require("request");
const Promise = require("bluebird");
const flatten = require("lodash").flatten;
const nodemailer = require("nodemailer");
const cfg = require("dotenv").config();
const readUrls = require("./urls.json");
const EMAIL_OPTIONS = {
host:... |
const {Scene, Sprite} = spritejs;
const container = document.getElementById('stage');
const scene = new Scene({
container,
width: 1200,
height: 600,
// contextType: '2d',
});
const layer = scene.layer();
(async function () {
const sprite = new Sprite({
anchor: 0.5,
bgcolor: 'red',
pos: [500, 300]... |
import webpack from 'webpack';
import path from 'path';
export default {
debug: true,
devtool: 'cheap-module-eval-source-map',
noInfo: false,
entry: [
// 'eventsource-polyfill', // necessary for hot reloading with IE
'webpack-hot-middleware/client?reload=true', //note that it reloads the page if hot mo... |
/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.gfx.silverlight_attach"]){ //_hasResource checks added by build. Do not use _hasResource direc... |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import Greetings from './components/Greetings';
import SignupPage from './components/signup/SignupPage'
export default (
<Route path="/" component={App}>
<IndexRoute component={Greetings}/> //make all ma... |
(function() {
'use strict';
angular
.module('tiny-leaflet-directive')
.factory('tldMapService', tldMapService);
tldMapService.$inject = ['tldHelpers'];
function tldMapService(tldHelpers) {
var maps = {};
return {
setMap: setMap,
getMap: getMap,... |
/*eslint-disable react/prop-types*/
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { createStore } from 'redux'
import { Provider, connect, ReactReduxContext } from '../../src/index.js'
import * as rtl from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
con... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styles from '../../build/styles';
export default class Subtitle extends Component {
static propTypes = {
children: PropTypes.any,
className: PropTypes.string,
size: PropTypes.oneOf([
'is1',
'is2',
'is3'... |
define(function(require, exports, module) {
var Notify = require('common/bootstrap-notify');
exports.run = function() {
var $form = $("#user-roles-form"),
isTeacher = $form.find('input[value=ROLE_TEACHER]').prop('checked'),
currentUser = $form.data('currentuser'),
edit... |
/**
* Test async injectors
*/
import { memoryHistory } from 'react-router';
import { put } from 'redux-saga/effects';
import { fromJS } from 'immutable';
import configureStore from 'store';
import {
injectAsyncReducer,
injectAsyncSagas,
getAsyncInjectors,
} from '../asyncInjectors';
// Fixtures
const... |
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
// grunt-contrib-clean
clean: {
instrument: "<%= instrument.options.basePath %>"
},
// grunt-contrib-jshint
jshint: {
files: [... |
const EventEmitter = require('events');
/**
* Ends the session. Uses session protocol command.
*
* @example
* this.demoTest = function (browser) {
* browser.end();
* };
*
* @method end
* @syntax .end([callback])
* @param {function} [callback] Optional callback function to be called when the command finishe... |
import Botkit from 'botkit';
import os from 'os';
import Wit from 'botkit-middleware-witai';
import moment from 'moment-timezone';
import models from '../../app/models';
import storageCreator from '../lib/storage';
import setupReceiveMiddleware from '../middleware/receiveMiddleware';
import notWitController from './n... |
/**
Create by Huy: codocmm@gmail.com ~ nqhuy2k6@gmail.com
07/31/2015
*/
define(["durandal/app", "knockout", "bootstrap", "viewmodels/component-4"], function (app, ko, bootstrap, Component4) {
return function () {
var me = this;
var dashboardViewModel = this;
dashboardViewModel.compoment4 ... |
/*
************************************************************************
Copyright (c) 2013 UBINITY SAS
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... |
'use strict';
/**
* Created by Alex Levshin on 26/11/16.
*/
var RootFolder = process.env.ROOT_FOLDER;
if (!global.rootRequire) {
global.rootRequire = function (name) {
return require(RootFolder + '/' + name);
};
}
var restify = require('restify');
var _ = require('lodash');
var fs = require('fs');
v... |
require.register("scripts/product", function(exports, require, module) {
var req = require('scripts/req');
AddStyleTagToItemVM = function(user, styletag_repo) {
// this is very similar to AddItemToCollectionVM - yet different.
var self = this;
self.styletags = styletag_repo.create_filte... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
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... |
import React, { Component } from 'react';
import List from 'react-toolbox/lib/list/List';
import ListSubHeader from 'react-toolbox/lib/list/ListSubHeader';
import ListCheckbox from 'react-toolbox/lib/list/ListCheckbox';
import ListItem from 'react-toolbox/lib/list/ListItem';
import Dropdown from 'react-toolbox/lib/drop... |
import {
defaultAction,
} from '../actions';
import {
DEFAULT_ACTION,
} from '../constants';
describe('Marginals actions', () => {
describe('Default Action', () => {
it('has a type of DEFAULT_ACTION', () => {
const expected = {
type: DEFAULT_ACTION,
};
expect(defaultAction()).toEqu... |
//A simple build file using the tests directory for requirejs
{
baseUrl: "../../../requirejs/tests/text",
paths: {
text: "../../../requirejs/../text/text"
},
dir: "builds/text",
optimize: "none",
optimizeAllPluginResources: true,
modules: [
{
name: "w... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'no', {
label: 'Stil',
panelTitle: 'Stilformater',
panelTitle1: 'Blokkstiler',
panelTitle2: 'Inlinestil... |
"use strict";
var sqlite3 = require('sqlite3');
var authHelper = require('./server/helpers/auth');
var db = new sqlite3.Database('./data/users.db');
db.serialize(function() {
db.run(
'CREATE TABLE "users" ('
+ '"id" INTEGER PRIMARY KEY AUTOINCREMENT,'
+ '"username" TEX... |
"use strict"
var writeIEEE754 = require('../float_parser').writeIEEE754
, readIEEE754 = require('../float_parser').readIEEE754
, Long = require('../long').Long
, Double = require('../double').Double
, Timestamp = require('../timestamp').Timestamp
, ObjectID = require('../objectid').ObjectID
, Symbol ... |
/**
* DocumentController
*
* @description :: Server-side logic for managing documents
* @help :: See http://links.sailsjs.org/docs/controllers
*/
var exec = require('child_process').exec;
var path = require('path');
var fs = require('fs');
var UPLOADFOLDER = __dirname+'/../../.tmp/uploads';
module.export... |
'use strict';
var assert = require('assert'),
mongoose = require('mongoose'),
mobgoose = require('../')(mongoose);
var Foo = mongoose.model('Foo', new mongoose.Schema({}), 'foo_collection_name');
it('accepts configuration without url', function() {
return mobgoose({ host: 'localhost', database: 'test123' }... |
"use strict";
const setupTask = require('utils').setupTask;
const calcTasks = require("calcTasks");
module.exports = {
run : function(creep){
if(!creep.task){
var room = creep.room;
var creepsByTask = _(Game.creeps).filter( (c) => c.task && c.task.roomName == room.name).groupBy('task.typ... |
// GET /api/v1/nowplaying/groovesalad
{
"stationId": "groovesalad",
"time": 1425871720000,
"artist": "Panorama",
"title": "Selene",
"album": "Panorama",
"trackCorrected": false,
"artistCorrected": false,
"albumCorrected": false,
"corrected": false,
"duration": 335000,
"durationEstimated": false
}
|
/**
* Using Rails-like standard naming convention for endpoints.
* GET /api/bridges -> index
* POST /api/bridges -> create
* GET /api/bridges/:id -> show
* PUT /api/bridges/:id -> upsert
* PATCH /api/bridges/:id -> patch
* DELETE /api/br... |
/*
jQuery UI Sortable plugin wrapper
@param [ui-sortable] {object} Options to pass to $.fn.sortable() merged onto ui.config
*/
angular.module('ui.sortable', [])
.value('uiSortableConfig',{})
.directive('uiSortable', [ 'uiSortableConfig',
function(uiSortableConfig) {
return {
... |
load("build/jslint.js");
var src = readFile("dist/jquery.ImageColorPicker.js");
JSLINT(src, { evil: true, forin: true });
// All of the following are known issues that we think are 'ok'
// (in contradiction with JSLint) more information here:
// http://docs.jquery.com/JQuery_Core_Style_Guidelines
var ok = {
"Expect... |
var fs = require('fs');
var os=require('os');
var express = require('express'),
// wine = require('./routes/wines');
user = require('./services/user');
contact = require('./services/contact');
inbox = require('./services/inbox');
outbox = require('./services/outbox');
device = require('./services/devic... |
// Javascript helper functions for parsing and displaying UUIDs in the MongoDB shell.
// This is a temporary solution until SERVER-3153 is implemented.
// To create BinData values corresponding to the various driver encodings use:
// var s = "{00112233-4455-6677-8899-aabbccddeeff}";
// var uuid = UUID(s); // ... |
var assert = require('assert');
var RequestBuilder = require('../lib/rest-builder');
describe('REST Request Builder', function () {
describe('Request templating', function () {
var server = null;
before(function (done) {
var express = require('express');
var app = express(... |
/**
* Copyright 2015 aixigo AG
* Released under the MIT license.
* http://laxarjs.org/license
*/
require( [
'laxar',
'laxar-application/var/flows/embed/dependencies',
'json!laxar-application/var/flows/embed/resources.json'
], function( ax, mainDependencies, mainResources ) {
'use strict';
window.laxa... |
import React from 'react';
import Tap from '../hahoo/Tap';
class BtnUpLevel extends React.Component {
static propTypes = {
onItemClick: React.PropTypes.func
}
state = {}
render() {
const { onItemClick, ...rest } = this.props;
return (<Tap
onTap={onItemClick}
className="btn btn-defaul... |
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
var _graphqlRelay = require("graphql-relay");
var _EnsayoType = _interopRequireDefault(require("./EnsayoType"));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default... |
/**
* @author Phuluong
* Feb 13, 2016
*/
/** Exports **/
module.exports = new Config();
/** Imports **/
var fs = require("fs");
var util = require(__dir + '/core/app/util');
/** Modules **/
function Config() {
var configContainer = {};
/**
* Get config value by key
* @param {String} key
* @par... |
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'addressbook-app',
environment: environment,
baseURL: '/',
locationType: 'auto',
emberPouch: {
localDb: 'dentone-addressbook',
remoteDb: 'https://wasilleptichandfurningio:6c01f93f266bb3cf6dfd579... |
/* global describe, before, it */
require('mocha')
require('should')
var async = require('async')
var testUtils = require('./testUtils')
var errorMessage = require('../errorMessages/errorMessages')
var mongo_dcms_core = require('../index')
describe('should get file Content by file id', function () {
var filepath = '... |
/**
* Lawnchair!
* ---
* clientside json store
*
*/
var Lawnchair = function () {
// lawnchair requires json
if (!JSON) throw 'JSON unavailable! Include http://www.json.org/json2.js to fix.'
// options are optional; callback is not
if (arguments.length <= 2 && arguments.length > 0) {
var... |
(function(){function h(a){return function(){return this[a]}}var k=this;function n(a){return"string"==typeof a}function p(a,c){var b=a.split("."),d=k;!(b[0]in d)&&d.execScript&&d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)!b.length&&void 0!==c?d[e]=c:d=d[e]?d[e]:d[e]={}};var q="constructor hasOwnProperty... |
/**
* drcProcess
* Created by dcorns on 1/2/15.
*/
'use strict';
var RunApp = require('./runApp');
var Server = require('./server');
var parseInput = require('./parseInput');
var CommandList = require('./commandList');
var runApp = new RunApp();
var cmds = new CommandList();
cmds.add(['ls', 'pwd', 'service', 'ps']);... |
"use strict";
const tester = require("./framework");
const repeatAsyncUntil = require("../source/regularly");
module.exports = tester.run([
tester.make("repeatAsyncUntil() should repeat calls to λ while predicate returns false", async () => {
let executionsCount = 0;
const λ = a... |
import {ATTACHMENTS} from "../constants";
export default (...args) => {
// Use one or the other
const attachments = args.length ? args : ATTACHMENTS;
return {
props: {
attach: {
type: String,
validator: value => value === "" || attachments.includes(value)
}
},
computed: {... |
'use strict';
module.exports = Source;
const inherits = require('util').inherits;
const Stream = require('../stream');
const Chunk = require('../chunk');
const Compose = require('../through/compose');
const Break = require('../through/break');
const Filter = require('../through/filter');
const Map = require('../throu... |
// Idea and initial code from https://github.com/aomra015/ember-cli-chart
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'canvas',
attributeBindings: ['width', 'height'],
onlyValues: false,
chartData: {},
didInsertElement: function(){
var context = this.get('element').getCo... |
/*
* Copyright (c) 2012 Adobe Systems Incorporated. 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
* ... |
'use strict';
/**
* Email.js service
*
* @description: A set of functions similar to controller's actions to avoid code duplication.
*/
const _ = require('lodash');
const sendmail = require('sendmail')({
silent: true
});
module.exports = {
send: (options, cb) => {
return new Promise((resolve, reject) => ... |
DS.classes.Message = function(create){
var relations = [];
//check
check(create, {
time: DS.classes.Time,
data: Match.Optional(Object)
});
//create
_.extend(this, create);
//add relations
this.addRelation = function(relation, reversed){
check(relation, DS.cla... |
'use strict';
import React from 'react';
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';
var products = [];
function addProducts(quantity) {
var startId = products.length;
for (var i = 0; i < quantity; i++) {
var id = startId + i;
products.push({
id: id,
name: "Item n... |
////////////////////////////////////////////////////////////////////////////////////
////// Events
////////////////////////////////////////////////////////////////////////////////////
'use strict';
// DI
var db,
responseHandler;
/**
*
* @param req the HTTP requests, contains header and body parameters
* @param re... |
'use strict';
const path = require('path');
const request = require('supertest');
const pedding = require('pedding');
const assert = require('assert');
const sleep = require('ko-sleep');
const mm = require('..');
const fixtures = path.join(__dirname, 'fixtures');
const baseDir = path.join(fixtures, 'app-event');
desc... |
/*!
* Kaiseki
* Copyright(c) 2012 BJ Basañes / Shiki (shikishiji@gmail.com)
* MIT Licensed
*
* See the README.md file for documentation.
*/
var request = require('request');
var _ = require('underscore');
var Kaiseki = function(options) {
if (!_.isObject(options)) {
// Original signature
this.appli... |
(function(app) {
"use strict";
app.directive("ratingInput", [
"$rootScope", function($rootScope) {
return {
restrict: "A",
link: function($scope, $element, $attrs) {
$element.raty({
score: $attrs.cdRatingInput,
... |
{
"status": {
"error": false,
"code": 200,
"type": "success",
"message": "Success"
},
"pagination": {
"before_cursor": null,
"after_cursor": null,
"previous_link": null,
"next_link": null
},
"data": [
{
"id": 1111,
... |
var gulp = require('gulp');
var connect = require('gulp-connect');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var opn = require('opn');
var config = {
rootDir: '.',
servingPort: 8080,
servingDir: './dist',
paths: {
src: {
scripts: './src/**/*.js',
styles: './src/*... |
import React from 'react'
import {Observable} from 'rx'
import {TextField} from 'material-ui'
import ThemeManager from 'material-ui/lib/styles/theme-manager';
import MyRawTheme from '../components/Theme.js';
import ThemeDecorator from 'material-ui/lib/styles/theme-decorator';
import {compose} from 'recompose'
import... |
(function(ns) {
/**
* JSON CORS utility
* Wraps up all the cors stuff into a simple post or get. Falls back to jsonp
*/
var JSONCORS = function() {
var self = this;
var supportsCORS = ('withCredentials' in new XMLHttpRequest()) || (typeof XDomainRequest != 'undefined');
/**********************************... |
{ //using constants
const a = 2;
console.log( a ); // 2
a = 3; // TypeError!
}
{ //an array constant
const a = [1,2,3];
a.push( 4 );
console.log( a ); // [1,2,3,4]
a = 42; // TypeError!
} //we can change the object using its methods, we just cannot reassign it...
|
import {ProviderSpecification} from 'dxref-core/system/provider/provider-specification';
import { module, test } from 'qunit';
module('Unit | dxref-core | system | provider | provider-specification');
test('provider-specification', function(assert) {
var myFunc = function() {};
var providerSpec = new Provid... |
version https://git-lfs.github.com/spec/v1
oid sha256:c1d57d1ad50c4639ecd398deb6c1db998e272cc6faf1314dec77ca509ca49153
size 1303
|
team1 = {"name" : "Iron Patriot",
"key": "MURICA",
"puzzles" :
[{"idPz": 0}, // Breakfast
{"idPz": 1}, // Blueprints, all
{"idPz": 2}, // Morning Rotation # 1
// {"idPz": 14}, // Morning Rotation # 1 Item! (to alieviate routing issues slightly)
{"idPz": 3}, // M... |
import Off from './Off';
import On from './On';
// ==============================
// CONCRETE CONTEXT
// ==============================
export default class Computer {
constructor() {
this._currentState = null;
this._states = {
off: new Off(),
on: new On()
};
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.