code stringlengths 2 1.05M |
|---|
var analyzerPlugins = analyzerPlugins || [];
analyzerPlugins.push(
{
init:function () {
// Register visualizations to display in Analyzer
cv.pentahoVisualizations.push(pentaho.visualizations.getById("sample_calc"));
/*
Helpers contain code that knows about the Analyzer sp... |
'use strict';
angular.module('app')
.controller('SignupCtrl', ['$scope', '$sce', '$location', '$auth', 'toastr', 'GetPredefinedVars', 'WizardHandler', 'Register', 'CheckForUnique', function($scope, $sce, $location, $auth, toastr, GetPredefinedVars, WizardHandler, Register, CheckForUnique) {
$scope.languages = [];
... |
// { "path" : "imports/ui/routes/index.js" }
import './mainRoutes'
|
import React from 'react';
import ReactDOM from 'react-dom';
import createReactClass from 'create-react-class';
import classNames from 'classnames';
import createHistory from 'history/createBrowserHistory';
import { Router, Route, Link, Switch } from 'react-router-dom';
const browserHistory = createHistory();
const N... |
"use strict";
var PeshOS = PeshOS || {};
PeshOS.Poll = PeshOS.Poll || {};
PeshOS.Poll.constants = {
ConfigurationList: 'PollConfiguration',
VotesList: 'PollVotes',
ExportList: 'PollExports',
VotesListTemplate: 10001,
VotesListTemplateFeatureId: '89836f36-72ea-4af4-9b3f-8550a00d5875'
};
Pesh... |
var data = {gui-js: {}} |
module.exports = (options) => {
return (link) => {
switch (link.type) {
case "link":
return !!options.checkLinks
case "anchor":
return !options.allowAnchors
case "image":
return !!options.checkImages
default:
return false
}
}
}
|
window.addEventListener("deviceorientation", on_device_orientation);
// parametri senzor miscare
var alpha = 0;
var beta = 0;
var gamma = 0;
var vechi = [];
var pasi = 100; // minim 3
var pondere_curenta = pasi;
var run_function = false;
for (var i = 0 ; i < pasi ; i++)
{
p = pasi - i;
vechi.push({importanta:p... |
/**
* 简单API服务器
*
* @author Zongmin Lei <leizongmin@gmail.com>
*/
var clone = require('clone');
var parseUrl = require('url').parse;
var formatUrl = require('url').format;
var utils = module.exports = exports = clone(require('lei-utils'));
// 将参数添加到URL
utils.addQueryParamsToUrl = function (url, params) {
var i... |
function (c, arg) { //start:0, pages:1, level:4
function is_npc(name) {
var last_action = #s.users.last_action({
name: [name, 'gibson']
});
return last_action[0] && last_action[0].t.getTime() == last_action[1].t.getTime();
}
function getLevel(level, start) {
var ... |
/*
* regular-replace <https://github.com/hingisr/regular-replace
*
* Copyright (c) 2015, hingsir.
* Licensed under the MIT License.
*/
var regularReplace = {
thousands: function(number) {
return number.replace(/^(\d+)(\.\d+)?$/, function($, $1, $2) {
return $1.replace(/\d{1,3}(?=(\d{3})+$)... |
// This test shows: ReactElement vs ReactComponent vs ReactClass vs React.Component
// For more information see: https://github.com/DJCordhose/react-component-test/blob/master/README.md
import jsdom from 'mocha-jsdom';
import ReactTestUtils from 'react-addons-test-utils';
import unexpected from 'unexpected';
const e... |
/**********************************************************************
File : wr3d-canvas.js
Project : N Simulator Library
Purpose : Source file for a WR3D canvas component.
Revisions: Original definition by Lawrence Gunn.
2014/09/27
Copyright (c) 2014 by Lawrence Gunn
All Rights Reserved.
*/
'use ... |
/* global moment */
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import $ from 'jquery';
import { A } from "@ember/array";
import EmberObject from '@ember/object';
moduleForComponent('elessar-range', 'Integration | Component | elessar range', {
integration: tr... |
import * as objectInspections from './objectInspections';
const RowSeparator = '\n';
const ColumnsSeparator = '\t';
var isString = (value) => {
return (typeof value === 'string' || value instanceof String);
};
var splitWithoutEmptyEntries = (array, separator) => {
return array.split(separator).filter(v => v);... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class TextureCache {
add(t) {
this.entity.set(t.name, t);
}
get(k) {
return this.entity.get(k);
}
constructor() {
this.entity = new Map();
}
}
exports.TextureCache = TextureCache;
|
var Firebase = require("firebase");
var _ = require("lodash");
var User = function(snap) {
var user = snap.val();
this.rootRef = snap.ref().root();
if(user) {
this.id = snap.key();
this.name = user.name;
this.email = user.email;
this.data - snap.val();
}
}
module.exports = function(rootRef) {
... |
export default function LowPassFilter (
{
frequency = 1,
ramp = 0,
resonance = 0
} = {}
) {
return {
frequency, // Low-pass filter cutoff
ramp, // Low-pass filter cutoff sweep (SIGNED)
resonance // Low-pass filter resonance
... |
var perfmon = require('../perfmon');
var counters = [
'\\processor(_total)\\% processor time',
'\\Memory\\Available bytes'
];
perfmon({counters:counters, sampleInterval:5, sampleCount:5}, function(err, data) {
var date = new Date(data.time);
// display in format HH:MM:SS
data.time = twoDigits(date.getHours())
... |
/*global rg2:false */
/*global rg2Config:false */
/*global console */
(function () {
function reportJSONFail(errorText) {
$("#rg2-load-progress").hide();
$('body').css('cursor', 'auto');
rg2.utils.showWarningDialog('Configuration error', errorText);
}
function getEvents() {
var eventID;
$.get... |
var Agenda = require("Agenda");
var agenda = new Agenda({db: { address: 'localhost:27017/agenda-example'}});
var time1 ='at 10:11:14pm';
agenda.define('greet the world', function(job, done) {
console.log(job.attrs.data.time, 'hello world!');
done();
});
agenda.on('start', function(job) {
console.log("Job : %s... |
const TODO_LS_PREFIX = "todos-ConnectJS.";
class Todo extends Model {
constructor(islots) {
ast( islots.title, 'new Todo: title property is required');
let netSlots = Object.assign(
{dbKey: TODO_LS_PREFIX + uuidv4()
, created: Date.now()}
... |
// reused function for all Internal Server Errors
var internalServerError = generateErrorResponses(
500
);
|
/**
* This is the transient application state. By using a `Backbone.Model` this also makes it an
* instance of `Backbone.Events` allowing subscription to state changes. An instance of AppState created after
* definition allows any other subsequent code to access this instance.
*/
define([
'backbone'
], function(... |
(function() {
var MemoryWidget = function(widget) {
BaseWidget.call(this, widget);
};
MemoryWidget.prototype = Object.create(BaseWidget.prototype);
MemoryWidget.prototype.getTitle = function() {
return "Used Memory";
};
MemoryWidget.prototype.getWidthClass = function() {
return "one";
};
... |
/*!
* connect-mongo
* Copyright(c) 2011 Casey Banner <kcbanner@gmail.com>
* MIT Licensed
*/
/**
* Module dependencies
*/
var Store = require('connect').session.Store;
var mongo = require('mongodb');
var url = require('url');
/**
* Default options
*/
var defaultOptions = {host: '127.0.0.1',
... |
"use strict";
const path = require('path');
function isEmptyDir(grunt, dirPath) {
if( grunt.file.isDir(dirPath) ){
let files = grunt.file.expand( { 'cwd' : dirPath }, '*');
return files.length === 0;
}
return false;
}
function normalizeName(name) {
return name.split(' ').join('-').toLowerCase();
}
e... |
;(function (window, global_mod, global_expts, undefined) {
var xmod = {}
//+ getFreeGlobal :: a -> b
, getFreeGlobal = function(_window) {
return (typeof global == "object") ? global : window;
// previous implementation - not working on node for me.
var env_global = _window
, fr... |
import React, { Component } from 'react';
import AceEditor from 'react-ace';
import {globalState} from '../state';
import 'brace/mode/yaml'
import 'brace/theme/monokai'
export default class GuildConfigEdit extends Component {
constructor() {
super();
this.messageTimer = null;
this.initialConfig = null... |
var searchData=
[
['sel_5fchange_5fin_5find',['sel_change_in_ind',['../amak_8tpl.html#a31bc71d99a3f1d839ef9e8a619efc5f1',1,'amak.tpl']]],
['sel_5fdinf_5fin_5ffsh',['sel_dinf_in_fsh',['../amak_8tpl.html#a133d508fb8bec692ef00005a83852d24',1,'amak.tpl']]],
['sel_5fdinf_5fin_5findv',['sel_dinf_in_indv',['../amak_8tpl... |
app.factory('MapApi', ['$http', function($http) {
var _url = function() {
return 'http://107.170.68.187:5000';
};
return {
getRegions: function() {
var url = _url() +'/regions';
return $http.get(url);
},
getMap: function(id){
var url = _url() + '/map/' + id;
return $http.... |
'use strict';
const expansions = require('npm-expansions');
module.exports = () => expansions[Math.floor(Math.random() * expansions.length)];
|
/** Return true if tuning contains only letters from A to G
* @param {String} tuning | Required | The instrument tuning
* @return {Boolean}
*/
export function isValid (tuning) {
let pattern = new RegExp("^[#a-g]+$", "i");
if (pattern.test(tuning)) {
return true;
} else {
return false;
}
}
/** Split tuning into... |
var existingComments = [
{
"sectionId": "1",
"comments": [
{
"id": 88,
"authorAvatarUrl": "/assets/css/images/jon_snow.png",
"authorName": "Jon Sno",
"authorId": 1,
"authorUrl": "http://en.wikipedia.org/wiki/Kit_Harington",
"comment": "I'm Ned Stark's bast... |
'use strict';
var integration = require('@astronomerio/analytics.js-integration');
/*
*Expose 'Netmining' integration.
*/
var Netmining = module.exports = integration('Netmining')
.option('src', '')
.option('aid', '')
.tag('<script type="text/javascript" async src="{{ src }}?aid={{ aid }}&siclientid=">')
/*
* Ini... |
const Db = require('../db').Db;
const constants = require('../db').constants;
const BasicCollection = require('../lib/basic-collection');
const TypedCollection = require('../lib/typed-collection');
const schema = require('../sample-schemas/books');
const ObjectDescriptor = require('../lib/object-descriptor');
const con... |
"use strict";
var util = require('util');
var google = require('googleapis');
var Promise = require('bluebird');
var _ = require('lodash');
var Cordova = require('node-cordova');
var Console = require("console").Console;
var logger = new Console(process.stdout, process.stderr);
module.exports = function(grunt) {
gr... |
export const ic_gif_twotone = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M11.5 9H13v6h-1.5V9zM9 9H6c-.6 0-1 .5-1 1v4c0 .5.4 1 1 1h3c.6 0 1-.5 1-1v-2H8.5v1.5h-2v-3H10V10c0-.5-.4-1-1-1zm10 1.5V9h-4.5v6H16v-2h2v-1.5h-2v-1h... |
var ConnectionParameters = require(__dirname + '/../lib/connection-parameters');
var config = new ConnectionParameters(process.argv[2]);
for(var i = 0; i < process.argv.length; i++) {
switch(process.argv[i].toLowerCase()) {
case 'native':
config.native = true;
break;
case 'binary':
config.bi... |
module.exports = function(grunt) {
// http://gruntjs.com/getting-started
// https://github.com/gruntjs/grunt-contrib-uglify
var js_path = "../../../public/js/external/dbgraph/";
var css_path = "../../../public/css/external/dbgraph/";
var img_path = "../../../public/img/external/dbgraph/";
var ... |
var util = require("./util");
exports['test RegExp'] = function() {
// Valid RegExp
util.assertLint("var s = '';\n" +
"s.match('/(chapter \d+(\.\d)*)/i')", {
messages : []
}, [ "ecma5" ]);
// Invalid RegExp
util.assertLint("var s = '';\n" +
"s.match('/(chapter \d... |
"use strict";
var s = require('./support');
var t = s.t;
var bootDefinitions = require('../lib/boot/definitions');
var bootDatabase = require('../lib/boot/database');
describe('boot/database', function () {
var app;
beforeEach(function () {
app = s.mockApplication();
bootDefinitions('test/fi... |
'use strict';
var transformation = require('../lib/manifest');
var should = require('should');
describe('transformation: Windows 10 Manifest', function () {
describe('convertFromBase()', function () {
it('Should return an Error if manifest info is undefined', function (done) {
transformation.convertFromBa... |
/** @babel */
/** @jsx etch.dom */
import etch from 'etch'
import StatusBarComponent from './status-bar-component'
export default class ConnectedStatusComponent extends StatusBarComponent {
constructor(properties) {
super()
this.setupProperties(properties)
}
setupProperties(properties) {
this.conne... |
var Plumage = require('plumage');
var City = require('example/model/City');
module.exports = Plumage.model.Model.extend({
idAttribute: 'name',
urlIdAttribute: 'name',
urlRoot: '/',
queryAttrs: ['name', 'region'],
relationships: {
'capital': {
modelCls: City,
reverse: 'parent'
},
'... |
"use strict";
var net = require('net');
let Packetizer = require('../index.js');
var HOST = '127.0.0.1';
var PORT = 6969;
net.createServer(function (socket) {
console.log('Talking to: ' + socket.remoteAddress +':'+ socket.remotePort);
Packetizer.receive(socket).then(
function ( msg ) {
... |
import React, {Component, PropTypes} from 'react';
import IconButton from '../IconButton';
import NavigationMenu from '../svg-icons/navigation/menu';
import Paper from '../Paper';
import propTypes from '../utils/propTypes';
import warning from 'warning';
export function getStyles(props, context) {
const {
appBar... |
import del from 'del'
import path from 'path'
import runSequence from 'run-sequence'
import git from 'gulp-git'
import babel from 'gulp-babel'
import bump from 'gulp-bump'
import mocha from 'gulp-mocha'
import filter from 'gulp-filter'
import tagVersion from 'gulp-tag-version'
import webpack from 'gulp-webpack-build'
i... |
const ArrayPrototype = {
Length: struct.PropertyDescriptor({
Get: ($) => $.Internal,
Set: ($, value) => {
$.Internal = value
},
Enumerable: FALSE,
Configurable: FALSE
}),
ForEach($, fn) {
const $R = $.Reflect;
const size = $R.get($, 'Length');
for (let index = 0; index < s... |
/* globals describe it expect */
import {transform} from 'babel-core'
import {Tag} from 'cerebral/tags'
import plugin from '../index'
const pluginOptions = {
babelrc: false,
presets: ['es2015'],
plugins: [plugin]
}
describe('Run optimized tags', () => {
it('should evaluate to a tag', () => {
const code =... |
var EPUBJS = EPUBJS || {};
EPUBJS.replace = {};
//-- Replaces the relative links within the book to use our internal page changer
EPUBJS.replace.hrefs = function(callback, renderer){
var book = this;
var replacments = function(link, done){
var href = link.getAttribute("href"),
isRelative = href.search("://"),
... |
window.jermaine.util.namespace("window.ide", function (ns) {
var Project = ns.models.Project,
IDEView = ns.views.IDEView;
var DirectoryView = new window.jermaine.View (function () {
this.hasA("url").which.isA("string");
this.hasAn("ideView").which.validatesWith(function (v) {
... |
'use strict';
describe('Service: Users', function () {
// load the service's module
beforeEach(module('resourceManagementApp'));
// instantiate service
var Users;
beforeEach(inject(function (_Users_) {
Users = _Users_;
}));
it('should do something', function () {
expect(!!Users).toBe(true);
... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M21 13h-6c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1zm0-6h-6c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1zm-6 10h6c.55 0 1-.45 1-1s-.45-1-1-1h-6c-.55 0-1 .45-1 1s.45 1 1 1... |
#!/usr/bin/env node
var fs = require('fs')
var path = require('path')
var mkdirp = require('mkdrip')
var minimist = require('minimist')
var level = require('level')
var strftime = require('strftime')
var sprintf = require('sprintf')
var through = require('through')
var argv = minimist(process.argv.slice(2))
var HOME =... |
import Walk from './Walk'
export default Walk
|
import React from 'react';
import { Provider } from 'react-redux';
import PlayerList from '../../client/components/player_list';
import { store } from '../../client/store';
import { mockData } from '../mockData';
describe('PlayerList', () => {
let mockMove = jest.fn();
let wrapper = shallow( <PlayerList searchVa... |
function Person(firstName, lastName) { //Function constructor is just sintax sugar :/
this.firstName = firstName;
this.lastName = lastName;
}
Person.prototype.getFullName = function () { //function.prototype is not the __proto__ object and it is safe to use
return `${this.firstName} ${this.lastName}`;
}
v... |
import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import * as mutations from './mutations'
import {localStoragePlugin} from '../plugin/localStoragePlugin'
Vue.use(Vuex)
export const store = new Vuex.Store({
state,
mutations,
plugins: [localStoragePlugin]
})
export const dispatch = store.... |
'use strict';
/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */
var _ = require('lodash'); /* jshint ignore:line */
var Holodeck = require('../../../../../holodeck'); /* jshint ignore:line */
var Requ... |
import coreComponentTests from './core-component-tests';
import { moduleForComponent, test } from 'ember-qunit';
let component;
moduleForComponent('spotify-follow-button', 'Unit | Component | spotify follow button', {
unit: true,
setup() {
component = this.subject();
},
});
test('It has the core Spotify ... |
!
function (a) {
"use strict";
"function" == typeof define && define.amd ? define(["jquery", "../grid.base"], a) : a(jQuery)
}(function (a) {
a.jgrid = a.jgrid || {},
a.jgrid.hasOwnProperty("regional") || (a.jgrid.regional = []),
a.jgrid.regional.en = {
... |
(function() {
var getFortune, http;
http = require("http");
exports.getFortune = getFortune = function(callback) {
var opts, request;
opts = {
host: "www.fortunefortoday.com",
path: "/getfortuneonly.php"
};
request = http.request(opts, function(response) {
var data;
data = ... |
/* eslint-disable no-undef */
document.addEventListener('DOMContentLoaded', () => {
const setChatTarget = (target) => {
if (!target) {
target = 'Channel'
}
dom('.chat_target').text(target)
}
/***
* This is more like a confidence setup
* for the interface. It does not really help
* wit... |
const debug = require('ghost-ignition').debug('services:url:resources'),
Promise = require('bluebird'),
_ = require('lodash'),
Resource = require('./Resource'),
config = require('../../config'),
models = require('../../models'),
common = require('../../lib/common');
/**
* These are the default... |
'use strict';
import React from 'react';
import Heading from 'app/components/common/Heading';
import Board from 'app/components/productivity/boards/Show';
import { Row } from 'antd';
import _ from 'lodash';
const GroupShow = (props) => {
const { group, boards } = props;
const currentBoards = _.filter( boards, {... |
class skbmonitor_keystrokemonitor {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeService()
... |
var request = require('request'),
querystring = require('querystring');
exports.worker = function (task, config) {
var input = JSON.parse(task.config.input);
console.log(task.config.input);
var q = {
q: 'select * from search.termextract where context=' + JSON.stringify(input.text),
... |
/**
* Created by bryangill on 12/23/16.
*/
var rest = require('restling');
var utilityService = require('./UtilityService');
var parser = require("./ParserService");
var _ = require('lodash');
var S = require('string');
module.exports = {
win: function (file_id, team_short_name) {
/* this method determines w... |
import * as types from './types';
export const authToHttp = urls => fetchFunc => {
const { login, signup, verify } = urls;
const next = (type, params) => {
const init = {
method: 'POST',
body: JSON.stringify(params),
headers: new Headers({ 'Content-Type': 'application/json' }),
};
swi... |
beforeEach(function() {
});
afterEach(function () {
$("#spec-dom").html("");
});
|
import { takeEvery, apply, put } from 'redux-saga/effects';
import {
fetchUserFollowDetailSuccess,
fetchUserFollowDetailFailure,
} from '../actions/userFollowDetail';
import { addError } from '../actions/error';
import pixiv from '../helpers/apiClient';
import { USER_FOLLOW_DETAIL } from '../constants/actionTypes';... |
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { VueLoaderPlugin } = require('vue-loader')
module.exports = (env, { mode = 'production' }) => {
const isProd = mode === 'production'
return {
mode: mode,
devtool: 'cheap-module-source-map',
entry: {
main... |
var sirmutex_8h =
[
[ "_sirmutex_create", "d0/dfe/group__intern.html#gabb7fa2627bf9b269840231c50723c34e", null ],
[ "_sirmutex_destroy", "d0/dfe/group__intern.html#ga5ac9f33affaf105f0476bf022f7b42ef", null ],
[ "_sirmutex_lock", "d0/dfe/group__intern.html#ga1f350df79dd4baa18a77e115384fe04e", null ],
[ "... |
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
var src = [
'./src/cookies-mirror.module.js',
'./src/**/*.js'
];
var dist = 'angular-cookies-mirror.js';
gulp.task('default', function(){
return gulp
.src(src)
.pipe(plugins.sourcemaps.init())
.pipe(plugins.... |
import React from "react";
import clone from "clone";
import PropTypes from "prop-types";
export default class TableDragSelect extends React.Component {
static propTypes = {
value: props => {
const error = new Error(
"Invalid prop `value` supplied to `TableDragSelect`. Validation failed."
);
... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* RollwiseEntry Schema
*/
var RollwiseEntrySchema = new Schema({
date: {
type: Date,
required: 'Please fill date name'
},
shift: {
type: String,
required: 'Please fill shift name'
}... |
'use strict';
var test = require('tap').test;
var expressMongoDb = require('./');
test('throws on invalid uri', function (t) {
t.throws(function () {
expressMongoDb();
}, /Expected uri to be a string/);
t.end();
});
test('middleware pass error on fail', function (t) {
var middleware = expressMongoDb('mongodb:/... |
import React from 'react';
import Icon from '../Icon';
export default class MessageIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M40 4H8C5.79 4 4.02 5.79 4.02 8L4 44l8-8h28c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4zm-4 24H12v-4h24v4zm0-6H1... |
const pgconfig = require('./pgconfig');
const knex = require('knex')(pgconfig);
module.exports = {
test() {
knex.select(knex.raw(1))
},
deleteCategory(id) {
return knex('category').where('category_id', id).del();
},
insertCategory(name) {
return knex('category').insert({
... |
export default from './components/chrome/Chrome'
|
/*
* __ ______ __ __ ______
* /\ \ /\ __ \ /\ \ _ \ \ /\ __ \
* \ \ \\ \ \/\ \\ \ \/ ".\ \\ \ __ \
* \ \_\\ \_____\\ \__/".~\_\\ \_\ \_\
* \/_/ \/_____/ \/_/ \/_/ \/_/\/_/
*
* Institute of War Aptitude
*
* Web-based tool to give insight to players based on their ranked match st... |
'use strict';
var os = require('os');
require('colors');
module.exports = function (app) {
// global settings
app.domain = 'gabba.io';
app.env = 'production';
app.address = app.config.protocol + app.domain + '/'; // base url
// directories
app.public = {
build : app.address + 'build/',
compo... |
/* 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/. */
var vows = require("vows"),
assert = require("assert"),
jwcrypto = require("../index"),
assertion = jw... |
var express = require('express');
var fs = require('fs');
var path = require('path');
var morgan = require('morgan');
var bodyParser = require('body-parser');
var app = express();
// Define how to log events
app.use(morgan('tiny'));
app.use(bodyParser.urlencoded({
extended: true
}));
app.engine('html', require('ejs... |
import React from 'react';
import ReactDOM from 'react-dom';
import FriendList from '../lib/components/FriendList';
import Login from '../lib/components/Login';
import Message from '../lib/components/Message';
import NavHeader from '../lib/components/NavHeader';
import MessageView from '../lib/components/MessageView';
... |
/**
* Serialize contents
* @typedef {string | number | Array<string | number>} Contents
* @param {Contents} contents
*/
const serialize = contents =>
Array.isArray(contents) ? contents.join('') : contents.toString();
/**
* A helper to generate innerHTML validation strings containing spans
* @param {Contents} co... |
$(document).ready(function() {
$.getJSON('../data/result.json', function(jd) {
test_list = jd.report.tests;
$(".time-exe").append(Math.round(find_slowest_test(test_list).duration));
$("#check_slw_test").attr("onclick", "location.href='test_result.html?test_name=" + fetch_test_name(find_slo... |
//Directive that removes the default HL7 syntax from the message
//USAGE ex: <div ng-repeat="message in messages" formathl7="<message>"></div>
myApp.directive('formathl7',
function($filter,$sce){
return {
restrict: 'A',
scope: { formathl7: '='},
link: function(scope) {
... |
import expect from 'expect';
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import FetchingBasicExample from '../demo/src/demo-containers/fetching-basic';
describe('FetchingBasicExample tests', () => {
let node;
beforeEach(() => {
node = document.createElement('div');
... |
(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["MindmapLayouts"] = factory();
else
root... |
var StarsFrame = React.createClass({
render: function() {
return (
<div>
...
</div>
);
}
});
var ButtonFrame = React.createClass({
render: function() {
return (
<div>
...
</div>
);
}
});
var AnswerFrame = React.createClass({
render: function() {
return (
<div>
...
</div>
... |
'use strict';
describe('Course e2e test', function () {
var username = element(by.id('username'));
var password = element(by.id('password'));
var entityMenu = element(by.id('entity-menu'));
var accountMenu = element(by.id('account-menu'));
var login = element(by.id('login'));
var logout = elem... |
exports.up = async function (db) {
await db.runSql(`
CREATE MATERIALIZED VIEW ranked_matchmaking_ratings_view AS
SELECT RANK() OVER (ORDER BY r.rating DESC) as rank, r.user_id, r.rating,
r.wins, r.losses, r.last_played_date
FROM matchmaking_ratings r
WHERE r.num_games_played > 0
`)
awai... |
/*!
* 4K || fourKay
* Calculate breakpoints and base font-size values
* so that your site will keep the same layout on larger
* screens as on narrower screens.
*
* Use 'em' instead of 'px' values for the site to scale up
*
* Created by Rabbe Walter
*/
function fourKay(params) {
'use strict';
// Defaul... |
/**
* Created by heaven on 2015/1/12.
*/
decribe('A suite',function(){
it('contains spec with an expectation', function () {
console.log('this is msg from log ..');
expect(true).toBe(true);
})
});
decribe('A suite of basic functions', function () {
it('reverse word', function () {
... |
'use strict';
const nedb = require(`nedb`);
const bluebird = require(`bluebird`);
const path = require(`path`);
const bcrypt = require(`bcrypt`);
const crypto = require(`crypto`);
const sinon = require(`sinon`);
const chai = require(`chai`);
const chaiAsPromised = require(`chai-as-promised`);
chai.use(chaiAsPromised)... |
System.register([], function (exports_1, context_1) {
"use strict";
var estonia;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
execute: function () {
exports_1("estonia", estonia = {
name: 'Estonia',
codes: ['EE', 'EST', '... |
// Gravity Constant
var GRAVITY;
// Constant for a multiplier to try and ensure disc doesn't get stuck in obstacle
var ESC_VELOCITY_MULT = 1.06;
// has the ball been dropped?
var isDiscDropping = false;
//The user's input names
var names = [];
// the PlinkoBoard object that contains the pegs and discs
var Board;
//This... |
Asyncplify.prototype.flatMapLatest = function (options) {
return new Asyncplify(FlatMapLatest, options, this);
};
function FlatMapLatest(options, sink, source) {
this.mapper = options || identity;
this.sink = sink;
this.sink.source = this;
this.source = null;
this.subscription = null;
sour... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.