code stringlengths 2 1.05M |
|---|
var express = require('express');
var path = require('path');
var fs = require('fs');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var app = express();
var mongoose = require('mongoose');
var indexRoutes = ... |
/**
* jQuery mouseable() plugin
* https://github.com/dzervoudakes/jQuery-mouseable
*
* Custom jQuery method that adds hover and active classes to DOM elements...
* A !DOCTYPE-agnostic replacement for CSS :hover and :active pseudo classes
*
* Copyright (c) 2015, 2016 Dan Zervoudakes
* Released under the MIT li... |
import { createSelector } from 'reselect'
import { ENTRIES_FILTER_DEFAULT_PATH } from '../../index'
export const currentTeamEntriesSelector = createSelector(
(state) => state.entry.entities,
(state) => state.workspace.currentTeamEntries.entryIds,
(entities, entryIds) => {
if (!entities || !entryIds) {
... |
/**
* Module dependencies.
*/
var express = require('express');
var path = require('path');
var expressValidator = require('express-validator');
var uuid = require('uuid');
var ent = require('ent');
/**
* Load controllers.
*/
var homeController = require('./controllers/home');
/**
* List of random names
*/
va... |
var MongoClient = require('mongodb').MongoClient;
var url = 'mongodb://localhost:27017/cryptopredictor';
exports.run = function() {
MongoClient.connect(url, function(err, db) {
console.log("Error? " + err);
if (!err) {
console.log("Successfully connected to MongoDB server.");
}
db.... |
var assert = require('assert');
var _ = require('lodash');
var Schema = require('../lib/offshore-schema');
var References = require('../lib/offshore-schema/references');
var fixtures = require('./fixtures/many-many-through');
describe('Has Many Through', function() {
describe('junction table config', function() {
... |
// MODULES
var express = require('express')
, app = express()
, path = require('path')
, server = require('http').createServer(app)
, io = require('socket.io').listen(server);
// CUSTOM MODULES
var routes = require('./routes')
, appSocket = require('./routes/appSocket')
, leds = require('./routes/simpleled... |
'use strict';
const assert = require('assert');
const Browscap = require('../src/index.js');
suite('checking for issue 130. (1 test)', function () {
test('issue-130 ["Mozilla/5.0 (en-us) AppleWebKit/534.14 (KHTML, like Gecko; Google Wireless Transcoder) Chrome/9.0.597 Safari/534.14"]', function () {
const brows... |
//var addon = require('node-firefly2');
var addon = require('../build/Release/addon');
var fs = require('fs');
var http = require('http');
var url = require('url');
var Png = require('png').Png;
var timer = require('../timer.js').timer
var util = require('util');
var cam = new addon(10);
console.log('num cameras', ... |
module.exports = function(app) {
app.get('/', function(httpRequest, httpResponse) {
httpResponse.render('home');
});
/**
* 404 page handler
*/
app.get('/404', function(httpRequest, httpResponse) {
httpResponse.render('404', function(err, html) {
if(err)
console.log(err);
httpResponse.end(ht... |
import { getBrowser } from 'toolkit/core/common/web-extensions';
const FEATURE_SETTING_PREFIX = 'toolkit-feature:';
export const featureSettingKey = (featureName) => `${FEATURE_SETTING_PREFIX}${featureName}`;
export class ToolkitStorage {
_browser = getBrowser();
_storageArea = 'local';
_storageListeners = new... |
(function($, undefined){
function getJson() {
var data = {};
$.ajax({
url: "pmen_clones.json",
datatype: "json",
async: false,
success: function(json) {
data = json;
}
});
return data;
}
var fetchSubset = function(json, column, searchdata){
var min = max = 0;
var datamap = {};
dat... |
import Ember from 'ember';
function initialize() {
Ember.Route.reopen({
model(params, transition) {
var parentRoute = transition && transition.state.handlerInfos[transition.resolveIndex - 1];
var parentModel = parentRoute && parentRoute.context;
return parentModel;
},
attributes(params... |
var express = require('express');
var router = express.Router();
Article = require('../models/article.js');
/* GET home page. */
router.get('/', function(req, res, next) {
Article.getArticles(function(err, articles){
if(err){
res.send(err);
} else {
res.render('articles', {
title: 'All Articles',
... |
var $Math = {
random: function (min, max) {
if (min === undefined) {
return Math.random();
} else if (min !== undefined && max !== undefined) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
},
round: function (number, to) {
if (to === undefined) {
return Math.rou... |
/* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2018 Zenesis Ltd
License:
MIT: https://opensource.org/licenses/MIT
See the LICENSE file in the project's top-level directory for details.
... |
/**
* @file mip-ppkao-zixun 组件
* @author
*/
define(function (require) {
var $ = require('zepto');
var customElement = require('customElement').create();
/**
* 第一次进入可视区回调,只会执行一次
*/
customElement.prototype.firstInviewCallback = function () {
var ele = $(this.element);
... |
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// For complete reference see:
// http://docs.ckeditor.com/#!/... |
const prevNextPost = () => (pages, site) => {
const sortedPosts = pages.filter(page => page.layout === 'post').sort((a,b) => a.date < b.date)
pages.map(page => {
if(page.layout === 'post') {
const index = sortedPosts.findIndex(post => post.path === page.path)
page.previousPostLink = (index <= 0) ? undefined :... |
const jsonfile = require('jsonfile');
module.exports = {
config: null,
load: function(url){
this.config = jsonfile.readFileSync(url);
return this;
},
write: function(){
},
jsonToHtmlForm: function(obj) {
if(!obj && this.config) obj = this.config;
var response = "";
var depth = 0... |
'use strict';
var config = exports;
exports.constructor = function config() {};
var path = require('path');
var _ = require('lodash');
var packageJson = require(path.join(__dirname, '../package.json'));
/**
* @const
*/
var DEFAULT_OPTS = {
delimiter: '_',
};
var TYPE_ENUM = [
'string',
'number',
'boolean... |
var Checker = require('../../ckstyle/ckstyler').CssChecker;
var ReporterUtil = require('../../ckstyle/reporter/index').ReporterUtil
exports.Checker = Checker
exports.ReporterUtil = ReporterUtil |
/* jshint node: true */
'use strict';
module.exports = {
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},
beforeInstall: function(options) {
return this.addBowerPackageToProject('chartist', '~0.9.4... |
/*global caches, self, fetch */
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open('sync-subs-static-v2').then(function(cache) {
return cache.addAll([
'./',
'css/style.css',
'js/app.js'
]);
}).catch(function(error) {
console.error(error);
... |
/*
* @Author: yangdemo
* @Date: 2016-12-02 17:55:38
* @Last Modified by: yangdemo
* @Last Modified time: 2016-12-02 18:05:59
*/
'use strict'
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import Table from 'antd/lib/table'
import Icon from 'antd/lib/icon'
import Header ... |
define(function () {
describe('StartController', function () {
var controller, scope;
beforeEach(module('myApp'));
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
controller = $controller('StartController', {
$scope: scope
});
}));
desc... |
// # Base Model
// This is the model from which all other Ghost models extend. The model is based on Bookshelf.Model, and provides
// several basic behaviours such as UUIDs, as well as a set of Data methods for accessing information from the database.
//
// The models are internal to Ghost, only the API and some intern... |
import Phaser from '../../helper/phaser-helper';
export default class TextCounter extends Phaser.Text {
constructor(game, x = 0, y = 0, prefix = '', value = 0, style) {
super(game, x, y, '', style);
this.prefix = prefix;
this.value = value;
if (game) game.add.existing(this);
... |
/**
* angular-strap
* @version v2.1.7 - 2015-10-19
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.helpers.dateFormatter",[]).service("$dateFormatter",["$lo... |
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { Route, Redirect } from 'react-router-dom';
import { makeSelectToken } from './selectors';
/* eslint-disable react/prop-types */
const PrivateRoute = ({ component, token, ...rest }) => (
<R... |
'use strict';
var EC = protractor.ExpectedConditions;
describe('dashboard module tests', function() {
beforeEach(function() {
console.log('hello party people');
var url = browser.get('dashboard');
console.log(url);
//browser.get(browser.baseUrl + '#/dashboard', 5000);
browser.ignoreSynchronizati... |
[{"data":[[0,300],[1,160],[2,40],[3,120],[4,100],[5,70]],"label":"Mary","color":"#8d201c"},{"data":[[0,3],[1,40],[2,30],[3,45],[4,35],[5,49]],"label":"Tom","color":"#EE8310"},{"data":[[0,10],[1,180],[2,10],[3,85],[4,70],[5,79]],"label":"Brad","color":"#2a7da6"},{"data":[[0,40],[1,80],[2,90],[3,25],[4,15],[5,119]],"labe... |
/* JS */
gapi.loaded_0(function(_){var window=this;
var ia,la;_.b=function(a){return function(){return _.aa[a].apply(this,arguments)}};_._DumpException=function(a){throw a;};_.aa=[];_.na=_.na||{};_.D=this;_.kf=function(a){return void 0!==a};_.gh=function(){};
_.da=function(a){var c=typeof a;if("object"==c)if(a){if(a in... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var {results: Cr, utils: Cu} = Components;
const errors = [
"ElementNotAccessibleError",
"Elem... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper ../core/lang ../core/screenUtils ../... |
/* eslint-env jasmine, mocha */
describe('Enumeration', () => {
it('should enumerate over properties belonging to the prototype', () => {
const properties = [
'appendChild',
'childElementCount',
'childNodes',
'children',
'firstChild',
'firstElementChild',
'hasChildNodes'... |
var should = require('./init.js');
describe('crate.discover', function () {
function dropAllTables(done) {
db = getDataSource();
db.discoverModelDefinitions({}, function(err, data) {
if (err) {
done(err);
return;
}
var dropCount =... |
'use strict';
const fs = require('fs');
const path = require('path');
const assert = require('assert');
const pako = require('../index');
describe('ArrayBuffer', () => {
const file = path.join(__dirname, 'fixtures/samples/lorem_utf_100k.txt');
const sample = new Uint8Array(fs.readFileSync(file));... |
/**
* @jest-environment ./__tests__/html/__jest__/WebChatEnvironment.js
*/
describe('useSendTimeoutForActivity', () => {
test('should return send timeout for activity with and without attachments', () =>
runHTMLTest('hooks.useSendTimeoutForActivity.html'));
});
|
(function(){
'use strict';
angular.module('services')
.factory('searchService', searchService);
searchService.$inject=['$log','$http','$q', '$rootScope'];
function searchService($log,$http,$q,$rootScope){
return {
searchPartner: searchPartner,
searchD... |
/**
* Contact list management
* a user can add, remove contacts and get contact list
*/
var dbManager = require('./dbManager');
var init = function(user) {
/* User operations
* name arguments
* getContactList
* addContact email
* removeContact email
* acceptContact email
... |
export default function Loading() {
// Loading animation...
return <main className="spinner-wrapper">
<svg className="spinner"
width="65px"
height="65px"
viewBox="0 0 66 66"
xmlns="http://www.w3.org/2000/svg">
<circle className="path"
fill="none"
... |
/*
* Provides a `confirmAndCancel` method which prompts for confirmation if
* `this.isModified` returns true. Your component must supply that method.
*
* If your component has a `modal` property, which is normal for modals,
* it will close automatically on confirmation. If your component does not have a
* `modal`... |
function getAuthorName({ author }) {
if (!author) return null
return typeof author === 'string' ? author : author.name
}
export function getAltText({ data, index }): string {
if (data.caption) return data.caption
const author = getAuthorName(data)
return author ? `Photo by ${author}` : `Image ${index + 1}`... |
'use strict';
/* Controllers */
// signin controllers
angular.module("pu.settle.controllers")
.controller('SettleController',function ($scope, $rootScope, $state,$stateParams ,toaster, $uibModal,LoanQueryService,LoanTaskService,SettleService,SysDictService,modal) {
$scope.initSettleHistoryTaskList = functi... |
// Prázdný widget
dashboardApp.directive('widgetSimpleText', function() {
return {
restrict: 'E',
replace: true,
scope: {
},
link: function(scope, elem, attrs) {
scope.dbwText = attrs.dbwText;
scope.escapeHtml = attrs.dbwEscapeHtml === 'true';
},
controller: function($scope... |
'use strict';
angular.module('google-agenda').controller('DatetimepickerController', ['$scope', '$mdDialog',
function($scope, $mdDialog) {
// Datetimepicker controller logic
// ...
$scope.dateValue = new Date();
$scope.hide = function() {
$mdDialog.hide();
};
$scope.cancel = function() {
$mdDialog.... |
"use strict";
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange')
const { ExchangeError } = require ('./base/errors')
// ---------------------------------------------------------------------------
module.exports = class foxbit extends Exchang... |
/**
Copyright 2011 Christian Iversen <ci@sikkerhed.org>
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, modif... |
"use strict";
const results = require("./results");
const calculator = require("./matrixCalculator");
const consoleUtil = require("./consoleUtil");
function parseSideInput(inputSide) {
if (/^[0-9]+$/.test(inputSide))
return new results.ParseSideResult(parseInt(inputSide));
return new results.ParseSideR... |
var PIXI = require('pixi.js');
var Stats = require('stats.js');
function Renderer(game) {
var self = this;
this.tiles = [];
this.renderer = PIXI.autoDetectRenderer(
100,
100,
{'transparent':true, 'resolution': 2});
this.renderer.view.style.position = "absolute";
this.renderer.view.style.display ... |
/**
* @fileoverview This file provides a list of social sharing options.
* This directive is used
* to create a sharing panel in the page.
*
* Example:
*
* <app-share app-share-active=":mainCtrl.active"></app-share>
*
*/
goog.provide('app.ShareDirectiveController');
goog.provide('app.shareDirective');
goog.re... |
define(function(require) {
'use strict';
const $ = require('jquery');
const _ = require('underscore');
const Popper = require('popper');
const BaseView = require('oroui/js/app/views/base/view');
const VALIDATOR_ERROR_CLASS = 'validation-failed';
function getScrollParent(element) {
... |
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './index.js',
output: {
path: path.resolve(__dirname, 'www'),
filename: 'app.bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loa... |
/**
*
* StructureView2
*
*/
import _ from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import ReactGA from 'react-ga';
import { connect } from 'react-redux';
import { compose } from 'recompose';
import {
FaExternalLink,
} from 'react-icons/lib/fa';
import Grid from 'material-ui/Grid'... |
require('babel/polyfill');
/**
Load styles
**/
require('./scss/app.scss');
const riot = require('riot');
const page = require('page');
/**
Load the app
**/
require('./app.js');
riot.mount('app');
page();
|
typeof window !== "undefined" &&
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["Hls"] = f... |
var gulp = require('gulp'),
eslint = require('gulp-eslint');
// eslint js final, check console.log ...
gulp.task('eslint-final', function () {
return gulp.src([
'dist/js/app/**/*.js',
'dist/js/config/**/*.js'
])
.pipe(eslint({
useEslintrc: false,
rules: {
"no-console": 2
}... |
<script type='text/javascript'>
// $(document).ready(function() {
// $('img').mouseover(function() {
// $('img').fadeTo('fast',0.25);
// });
// $('img').mouseleave(function() {
// $(this).fadeTo('fast',1);
// });
// });
$(document).ready(function(){
$("img").hover(
function() {
$(this).stop().animate({"... |
'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]; } } }... |
import ListFormRoute from 'ember-flexberry/routes/list-form';
export default ListFormRoute.extend({
/**
Name of model projection to be used as record's properties limitation.
@property modelProjection
@type String
@default 'ApplicationUserL'
*/
modelProjection: 'ApplicationUserL',
/**
deve... |
// Regular expression that matches all symbols with the `IDS_Trinary_Operator` property as per Unicode v6.2.0:
/[\u2FF2\u2FF3]/; |
import Ember from 'ember';
import {
computedValidator,
inRange
} from 'computed-validator';
export default Ember.Component.extend({
init() {
this._super(...arguments);
this.user = {};
},
// BEGIN-SNIPPET in-range-example-validator
validator: computedValidator('user', {
age: inRange(21, 100)
... |
const test = require('tape');
const fs = require('fs-extra');
const StorageTempS3 = require('../lib/pre-processor/StorageTempS3');
const TEST_BUCKET = 'test-stream-multipart-upload';
const reUuidKey = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
test('missing option bucket', (t) => {
t.throws... |
jQuery(function($) {
var themap = $('<div id="themap"></div>').css({
'width': '90%',
'height': '500px'
}).insertBefore('ul.people');
var mapstraction = new Mapstraction('themap','google');
mapstraction.addControls({
zoom: 'large',
map_type: true
});
mapstraction... |
/**
* Write an expression that checks if given integer is odd or even.
*/
var evenNumb = 6,
oddNumb = 5;
console.log('Is ' + evenNumb + ' odd? -> ' + isOdd(evenNumb));
console.log('Is ' + oddNumb + ' odd? -> ' + isOdd(oddNumb));
function isOdd(number) {
return Boolean(number & 1);
} |
/**
* Module dependencies.
*/
var JSONCov = require('./json-cov')
, fs = require('fs');
/**
* Expose `HTMLCov`.
*/
exports = module.exports = HTMLCov;
/**
* Initialize a new `JsCoverage` reporter.
*
* @param {Runner} runner
* @api public
*/
function HTMLCov(runner) {
var jade = require('jade')
, ... |
define([
'lib',
'text!application/settings/panel-list.tpl',
'text!application/settings/widget-list-item.tpl',
'text!application/settings/panel-list-item.tpl',
'lang!application/lang.json'],
function (lib, listTemplate, widgetTemplate, panelTemplate, lang) {
var widgetView = lib.marionette.ItemView.ext... |
Meteor.subscribe('CWEs');
Meteor.subscribe('testKBs');
Template.testingTmpl.helpers({
// Get CWEs from cwe collection
cwes: function () {
return cweColl.find().fetch().map(function (it) {
var exploitability = new String(it.Likelihood_of_Exploit);
var descr = it.Name + ": " + it.... |
describe('Conhecendo o Protractor', function() {
var inputYourName = element(by.model('yourName'));
beforeEach(function() {
browser.get('/apps/ola/');
});
it('Checar o nome inicial', function() {
expect(element(by.binding('yourName')).getText()).toBe("Hello !");
});
it('Checar o nome inicial com... |
/**
* Created by Edward Luna Noriega on 25/08/17.
*/
"use strict";
const connection = require('../services/connection');
module.exports = name => {
const sequelize = connection[name];
return {
pedidos: (fecha, fletero = null, vendedor = null, supervisor = null) => {
return sequelize.qu... |
define(['sermat', 'creatartis-base'], function (Sermat, base) { "use strict";
var declare = base.declare,
Statistic = base.Statistic,
Statistics = base.Statistics;
describe("Serializations", function () {
it("for Statistic & Statistics", function () {
var sermat = new Sermat();
sermat.include(base);
... |
/**
* Base class for processes
*
* @namespace GIScene
* @class Process
* @constructor
* @param {Object} config
*
* @author mcauer https://github.com/mcauer
*/
GIScene.Process = function(config){
var defaults = {
identifier : null,
title : null,
abstract : null,
metadata : null,
processVer... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.DOK = global.DOK || {})));
}(this, (function (core) { 'use strict';
var count = 0;
var triggers... |
var path = require('path');
exports.summary = 'Compile Jade files to HTML';
exports.usage = '<src> [options]';
exports.options = {
"dest" : {
alias : 'd'
,describe : 'output the compiled html to <dest>'
},
"filename": {
describe: "filename used to resolve includes"
},
"p... |
/*
*
* Home
*
*/
import React from 'react';
import Helmet from 'react-helmet';
import HomeHeadingContainer from 'components/HomeHeadingContainer';
import ExampleBoxes from 'components/ExampleBoxes';
import TierSystem from 'components/TierSystem';
import HowItWorks from 'components/HowItWorks';
import HomeSignUpRi... |
<!-- ColumnChart generated in R 3.0.2 by googleVis 0.4.7 package -->
<!-- Mon Nov 18 08:58:35 2013 -->
<!-- jsHeader -->
<script type="text/javascript">
// jsData
function gvisDataeartab4 () {
var data = new google.visualization.DataTable();
var datajson =
[
[
"Entering freshmen",
0.117
],
[
"... |
'use strict';
export function UserResource($resource) {
'ngInject';
return $resource('/api/customerusers/:id/:controller', {
id: '@_id'
}, {
changePassword: {
method: 'PUT',
params: {
controller: 'password'
}
},
get: {
method: 'GET',
params: {
id: 'm... |
import Ember from "ember";
var Evented = Ember.Evented, // ember-runtime/mixins/evented
run = Ember.run, // ember-metal/run-loop
get = Ember.get, // ember-metal/accessors
set = Ember.set;
var PENDING = void 0;
var SEALED = 0;
var FULFILLED = 1;
var REJECTED = 2;
var LoadPromise = Ember.Mixin.create(Event... |
// flow-typed signature: 003e0792bf5342bd32fb8f8726462ca3
// flow-typed version: <<STUB>>/passport-auth0_v^0.5.2/flow_v0.35.0
/**
* This is an autogenerated libdef stub for:
*
* 'passport-auth0'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work w... |
'use strict';
db.houses = new Mongo.Collection('houses');
db.customers = new Mongo.Collection('customers');
db.transactions = new Mongo.Collection('transactions');
db.charges = new Mongo.Collection('charges');
db.accounts = new Mongo.Collection('accounts');
db.vendors = new Mongo.Collection('vendors');
db.banks = new ... |
NEWSBLUR.Views.FeedTitleView = Backbone.View.extend({
options: {
depth: 0,
selected: false
},
flags: {},
events: {
"dblclick .feed_counts" : "dblclick_mark_feed_as_read",
"dblclick" : "open_feed_link",
... |
'use strict';
var path = require('path');
var gulp = require('gulp');
var conf = require('./conf');
var browserSync = require('browser-sync');
var browserSyncSpa = require('browser-sync-spa');
var util = require('util');
var proxyMiddleware = require('http-proxy-middleware');
function browserSyncInit(baseDir, b... |
contract('ReviewModel', function(accounts) {
var DEVELOPER = "0x646576656c6f706572";
var DAPP = "0x64617070";
var VERSION = "0x76657273696f6e";
var REVIEW = "0x726576696577";
before(function(done) {
var review_model = ReviewModel.at(ReviewModel.deployed_address);
var version_model = VersionModel.at(V... |
import React, { Component, PropTypes } from 'react';
class Step1 extends Component {
render() {
/*
* TODO: Oh noes! We have terrible fake data
* in here. Use the props passed from the parent
* component to remedy this fake data.
*/
const name = 'FAKENAME',
type = 'FAKETYPE',
... |
'use strict';
module.exports = {
set: function (v) {
this.setProperty('-webkit-wrap-padding', v);
},
get: function () {
return this.getPropertyValue('-webkit-wrap-padding');
},
enumerable: true
};
|
import Pool from './pool';
import BinaryOp from './binary_op';
import Anagramlet from './anagramlet';
export default class Network {
constructor() {
Object.assign(this, {
targets: [],
nodePool: new Pool(BinaryOp),
generation: 0,
running: false,
_currentOutputs: []
});
thi... |
/**
* DevExtreme (ui/widget/ui.template_base.js)
* Version: 16.2.6
* Build date: Tue Mar 28 2017
*
* Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/
"use strict";
var $ = require("jquery"),
triggerShownEvent = r... |
const $ = require("jquery");
class RepeaterPlaceholderService {
/**
* Repeater placeholder service
* @param {HTMLElement} root
*/
constructor (
root
) {
this.$root = $(root);
this.$placeholder = this.$root.find('[data-repeater-preview-placeholder]');
}
/**
... |
/**
* User.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
token: {
type: 'string'
},
authId: {
type: '... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = EventSelector;
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function EventSelector(_ref) {... |
/* ===================================================
* alert.js v0
* ===================================================
* Copyright 2013 Bloodon, Inc.
* ==========================================================
* @require [Lib.js, Chart.js, JQuery, BloodOn]
*/
'use strict';
/**
*
* @param {Blood... |
'use strict';
/**
* @ngdoc function
* @name zucchiniStoreApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the zucchiniStoreApp
*/
angular.module('zucchiniStoreApp')
.controller('MainCtrl', function ($scope) {
$scope.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'K... |
var examples=[
{
name:'empty scene',
scn:{
nodes:{},
wires:{}
}
},{
name:'plot sines',
scn:{
nodes:[
{type:'Logger',x:500,y:200}, //0
{type:'Summer',x:200,y:100}, //1
{type:'Mouse' ,x:100,y:180}, //2
{type:'Time' ,x: 50,y:410}, //3
{type:'Sine' ,x: 50,y:300,i:{freq:.5}}, //4
{type:'Sine... |
/* eslint-disable no-unused-vars */
/* eslint-disable no-inline-comments */
import React from 'react';
function OverlayControl({
hoverChoropleth,
hoverHexagon,
hoverPoint,
hoverArc,
hoverLine,
clickItem
}) {
const clickCoords = clickItem && clickItem.geoCoords;
const choroplethId = hoverChoropleth && ... |
const ModuleHelper = require('../../modulehelper');
module.exports = function(root) {
let array = ModuleHelper.createClass(root, 'array');
ModuleHelper.createConstructor(array,
'__ctor0_hoo_array', ['char*'], true);
ModuleHelper.createFunction(array, 'push',
'int', 'hoo_array_push', ['$0']... |
describe('Module: data-processing', function(){
var dataFilter, attachCoords, filter;
var injector = angular.injector(['data-processing']),
attachCoords = injector.get('attachCoords');
before(function(){
attachCoords(testData)
});
describe('Factory: attachCoords', function(){
var test;
... |
define(['adminApp', 'moment'], function (adminApp, moment) {
adminApp.controller('CrawlHotnewsController', [
'$state', 'breadcrumb', 'api', function ($state, breadcrumb, api){
breadcrumb('Hot News', [{
name: 'Crawl',
link: 'main.crawl.hotnews'
}, {
name: 'Hot News',
lin... |
'use strict';
module.exports = function (ConvexModel) {
return ConvexModel.extend({
$name: 'domain'
});
};
module.exports.$inject = ['ConvexModel'];
|
$(function() {
$('a').click(function(e){e.preventDefault();});
$('#toggle-guide').click(function(){
toggleGuide();
});
$(".drag-no-grid").draggable();
$(".drag").draggable({containment: ".wrapper", grid: [ 5, 1 ]});
$(".box").resizable({minWidth:20,maxWidth:600,minHeight:20, maxHeight:800, grid: [ 5, 1 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.