code stringlengths 2 1.05M |
|---|
var fs=require("fs");
module.exports=function(opt){
opt=opt||{};
opt.path=opt.path||process.env.PWD+'/log/';
opt.logname=opt.logname||'error.'+new Date().getTime()+'.txt';
var errStream=fs.createWriteStream(opt.path+opt.logname,{flags:'a'});
var logError=function(e){
console.log('Error: '... |
var x = document.getElementById("get-location")
function getCurrentPosition() {
return new Promise(function (accept, reject) {
navigator.geolocation.getCurrentPosition(accept, reject)
})
}
function getDeviceFromUrl() {
var obj = {}
var params = location.search.slice(1).split('&')
.forEach(function (pa... |
describe("Render scheme", function () {
let mainPage
let schemeContainer
beforeEach(function (client, done) {
mainPage = client
.url("localhost:3200")
.page.main()
schemeContainer = mainPage.section.schemeContainer
client.waitForElementVisible(".download-url-input"... |
'use strict';
module.exports = {
db: 'mongodb://localhost/mean-test',
port: 3001,
app: {
title: 'Wello Fridge [Test]'
},
trello: {
clientID: process.env.TRELLO_KEY,
clientSecret: process.env.TRELLO_SECRET,
callbackURL: 'http://localhost:3000/auth/trello/callback'
}
}; |
var PUBNUB = require('pubnub') ;
require('dotenv').config();
var pubnub = PUBNUB({
publish_key : process.env.publish_key,
subscribe_key : process.env.subscribe_key
});
pubnub.subscribe({
channel: 'log_channel',
// connect: play,
callback: function(m) {
console.log ( m) ;
},
erro... |
var nf = sm("do_Notification");
var app = sm("do_App");
var me=ui("me");
me.on("touch",function(data, e){
app.openPage({source:"source://view/me.ui", data:"", animationType:"", isFullScreen:false, keyboardMode:"default", scriptType:""}, function(data, e){});
}); |
import expect from 'expect';
import * as actions from '../actions';
import {
LOAD_DATA_INITIATION,
LOAD_DATA_SUCCESS,
LOAD_DATA_FAILURE,
CLEAR_DATA_ERROR,
} from '../constants';
// Testing actions is as easy as validating that the actions are dispatched
// The way you think they are being dispatched.
// Just t... |
/**
* Created by USER: tarso.
* On DATE: 20/12/16.
* By NAME: app05-multiparm
*
* Source: https://hapijs.com/tutorials/routing?lang=en_US
*/
'use strict';
const Hapi = require('hapi');
const server = new Hapi.Server();
server.connection({ port: 3000 });
server.route({
method: 'GET',
path: ... |
/*
* SignalConnection
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribut... |
var slideBlocker = 0;
function sliderSlideLeft(outerClassName, leftArrowID, itemCounterClass, itemClass, sliderLoaderBackgroundClass, sliderLoaderProgressClass, sliderLoaderFinishClass, ItemsCount, ajaxMode, switchClass, switchItemClass, switchItemActClass, switchItemCountClass, switchResAct, switchResInAct, HideItemCl... |
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
meta: {
banner: "/*\n" +
" * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" +
" * <%= pkg.description %>\n" +
" * <%= pkg.homep... |
/*
* Wegas
* http://wegas.albasim.ch
*
* Copyright (c) 2013-2020 School of Management and Engineering Vaud, Comem, MEI
* Licensed under the MIT License
*/
/**
* @fileoverview
* @author Jarle Hulaas
*/
/*global Variable, gameModel, self */
YUI.add("wegas-i18n-survey-en", function(Y) {
Y.Wegas.I18n.registe... |
"use strict";
////////////////////////////////////////////////////////////////////////////////
// 検索
////////////////////////////////////////////////////////////////////////////////
Contents.searchbox = function( cp )
{
var p = $( '#' + cp.id );
var cont = p.find( 'div.contents' );
cp.SetIcon( 'icon-search' );
/... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('v... |
import jwt from 'jsonwebtoken'
import {COOKIE_NAMES} from '../../config/const'
export function loadUser (secret) {
return function (req, res, next) {
const userCookie = req.cookies[COOKIE_NAMES.auth]
req.user = null
if (userCookie) {
// verifies secret and checks exp
jwt.verify(userCookie, se... |
define(function () {
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
var CryptoJS = CryptoJS || function (e, m) {
var p = {}, j = p.lib = {}, l = function () { }, f = j.Base = { extend: funct... |
const maxApi = require('max-api');
const io = require('socket.io-client');
let socket;
maxApi.addHandler('connect', (url) => {
socket = io(url);
socket.on('message', (msg) => {
maxApi.outlet("message", msg);
});
});
maxApi.addHandler('disconnect', () => {
socket.close();
});
maxApi.addHandler('message'... |
export const boldDown = {"viewBox":"0 0 20 20","children":[{"name":"path","attribs":{"d":"M2.5,10H6V3h8v7h3.5L10,17.5L2.5,10z"}}]}; |
function empty (value) {
return typeof value === 'undefined' || !(value);
}
exports.empty = empty;
function nonEmpty (value) {
return !empty(value);
}
exports.nonEmpty = nonEmpty;
// min and max included in the integer distribution
function randomInteger (min, max) {
return Math.floor(Math.random() * ((max + 1)... |
const {
parentPort,
workerData
} = require('worker_threads');
parentPort.on('message', message => {
let args = Object.keys(message).filter(function (key) {
return key.match(/^argument/);
}).sort(function (a, b) {
return parseInt(a.slice(8), 10) - parseInt(b.slice(8), 10);
}).map(function (key) {
... |
const router = require('express').Router() // eslint-disable-line new-cap
const log = require('winston')
const debug = require('debug')('streamInfo:routes:webhooks')
const request = require('snekfetch')
const config = require('../config')
const twitchAPI = require('../bin/twitchAPI')
const moment = require('moment')
c... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import invariant from '../jsutils/invariant';
import type { GraphQLError } from './GraphQLError';
import type { SourceLocati... |
export const basic_paperplane = {"viewBox":"0 0 64 64","children":[{"name":"polygon","attribs":{"fill":"none","stroke":"#000000","stroke-width":"2","stroke-linejoin":"bevel","stroke-miterlimit":"10","points":"1,30 63,1 23,41 \r\n\t"},"children":[]},{"name":"polygon","attribs":{"fill":"none","stroke":"#000000","stroke-w... |
'use strict';
/*
* Do not edit the parser directly. This is a generated file created using a
* build script and the PEG grammar.
*/
module.exports = (function() {
/*
* Generated by PEG.js 0.8.0.
*
* http://pegjs.majda.cz/
*/
function peg$subclass(child, parent) {
function ctor() { this.construct... |
import {Deck, OrthographicView} from '@deck.gl/core';
import {ScatterplotLayer, PathLayer, SolidPolygonLayer} from '@deck.gl/layers';
import GL from '@luma.gl/constants';
import {Buffer} from '@luma.gl/core';
import data from './data';
/** DeckGL **/
const deck = new Deck({
container: 'container',
views: new Orth... |
// JavaScript Document
jQuery(function(){
// 幫 #qaContent 的 ul 子元素加上 .accordionPart
// 接著再找出 li 中的第一個 div 子元素加上 .qa_title
// 並幫其加上 hover 及 click 事件
// 同時把兄弟元素加上 .qa_content 並隱藏起來
jQuery('#qaContent ul').addClass('accordionPart').find('li div:nth-child(1)').addClass('qa_title').hover(function(){
jQu... |
const expect = require('chai').expect;
const User = require('../index');
const mongoose = require('mongoose');
const userData = {
minimal : require('../data/sample.minimal.json'),
full : require('../data/sample.full.json')
};
describe('User instance data', function() {
describe('should fail if ', () =>... |
var Tome = require('../..');
exports.testSelfDestroy = function (test) {
test.expect(5);
var a = { b: { c: 1 }, d: { e: 1} };
var b = Tome.conjure(a);
function fail() {
test.ok();
}
function ok() {
test.ok(true);
}
b.on('readable', fail);
b.on('destroy', ok);
b.b.on('destroy', ok);
b... |
define( "Confirm" , [ "Base" , "Panel" , "DataView" , "EventBind" ] , function( Base , Panel , DV , EB ){
var tool ,
Confirm = Base.extend( function( opt ){
this._confirmConfig = {
_opt : $.extend( {} , opt )
}
this.panel = new Panel( "zjdd... |
var app = require('app');
var ipc = require('ipc');
var server = require('./server');
var BrowserWindow = require('browser-window');
var mainWindow = null;
// Quit when all windows are closed.
app.on('window-all-closed', function() {
app.quit();
});
app.on('ready', function() {
mainWindow = new BrowserWindow({
... |
/*!
* QUnit 1.14.1pre
* http://qunitjs.com/
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-03-22T14:42Z
*/
(function( window ) {
var QUnit,
assert,
config,
onErrorFnPrev,
testId = 0,
fileName = (sourceFromStacktrace... |
export const mailReply = {"viewBox":"0 0 1792 1792","children":[{"name":"path","attribs":{"d":"M1792 1120q0 166-127 451-3 7-10.5 24t-13.5 30-13 22q-12 17-28 17-15 0-23.5-10t-8.5-25q0-9 2.5-26.5t2.5-23.5q5-68 5-123 0-101-17.5-181t-48.5-138.5-80-101-105.5-69.5-133-42.5-154-21.5-175.5-6h-224v256q0 26-19 45t-45 19-45-19l-5... |
var fs = require('fs');
console.log('Started reading a file');
//read the json file
fs.exists('./'+'source.json', function (exists)
{
if (exists)
{
fs.readFile('source.json', function(error, data)
{
... |
var express = require('express');
var colors=require('colors');
var path=require('path');
var fs=require('fs');
var app = express();
var config=require('../configs');
app.set('host', process.env.IP || config.HOST);
app.set('port', process.env.PORT || config.PRO_PORT);
var cors=require('cors');
var logger=require(... |
import Ember from 'ember';
const globalParent = {};
export default Ember.Component.extend({
tagName: '',
isPopOver: true,
isOpen: false,
manual: false,
'anchor-attachment': 'bottom left',
'body-attachment': 'top left',
'body-constraints': [{
to: 'window',
attachment... |
import React, {PropTypes} from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Dropdown, Text, Icon, Menu, Item } from "react-semantify";
import { Link } from "react-router";
import {japanMap } from './map/jquery.japan-map';
import ReactDOM from 'react-dom';
//var... |
/***
* This file allows to control the super vessel with the LeapMotion
* @type {{}}
*/
var cats = {};
function setLeap(frame) {
frame.hands.forEach(function (hand, index) {
if (hand.screenPosition()[0] >= 700) {
target.x = 200;
} else {
target.x = -200;
}
... |
var config = require('config');
var crypto = require('crypto');
var moment = require('moment');
var drivers = [];
config.get('drivers').forEach(function (driver) {
drivers.push(require('./driver/' + driver));
});
exports.authenticate = authenticate;
function authenticate(username, password, token) {
return ... |
/*!
* jQuery JavaScript Library v3.1.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2016-09-22T22:30Z
*/
"use strict";
( function( global, factory ) {
"us... |
const Article = require('../../structs/Article.js')
describe('Unit::structs/Article', function () {
const baseArticle = {
meta: {}
}
const feedData = {
feed: {}
}
describe('testFilters', function () {
it('passes with no filters', function () {
const article = new Article(baseArticle, feedDa... |
/* global define */
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// eslint-disable-line
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory) // eslint-disable-line
} else if (
typeof exports === 'object' &&
typeof exports.nodeName !== ... |
'use strict';
window.ExamplesView = Backbone.View.extend({
block: "i-examples",
el: 'body',
'events': {
'click .i-example-test__run': 'runTest'
},
'initialize': function(){
this.listenTo(this.collection, "sync", this.render);
this.listenTo(this.collection, "testsComplete"... |
module.exports = [{
input : [[-2, 0, -1]],
output : 0
}, {
input : [[2, 0, 3, -2, 4]],
output : 4
}];
|
(function() {
'use strict';
angular
.module('csc510ProjectApp')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider.state('audits', {
parent: 'admin',
url: '/audits',
data: {
... |
var express = require('express');
var router = express.Router();
var MongoClient = require('mongodb').MongoClient
var url = 'mongodb://localhost:27017/Measurements';
router.get('/weather', function(req, res) {
MongoClient.connect(url, function (err, db) {
var collection = db.collection('WeatherStation');... |
/*jslint indent: 4 */
/*global module */
module.exports = {
options: {
match: '.',
forceExit: false,
extensions: 'js',
keepRunner: true,
specNameMatcher: 'spec',
includeStackTrace: false,
jUnit: {
report: true,
savePath: './build/report... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'forms', 'nb', {
button: {
title: 'Egenskaper for knapp',
text: 'Tekst (verdi)',
type: 'Type',
typeBtn: 'Knapp',
typeSbm: 'Send',... |
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:project.vocabulary', 'Unit | Route | project.vocabulary', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function(assert) {
let route = this.subject();
assert.ok(route);
});
|
define(['exports', 'aurelia-templating', '../dialog-controller'], function (exports, _aureliaTemplating, _dialogController) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AiDialogFooter = undefined;
function _initDefineProp(target, property, descriptor, context) {... |
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 300);
$('html,body').animate({scrollTop:$(this.hash).offset().top-=5}, 300);
$(this.hash).effect("highlight", {color: "#... |
define('moduleA', ['require', 'exports'], function(require, exports) {
var moduleB = require('moduleB');
exports.stuff = moduleB.doStuff();
});
|
module.exports = require('./_project_generator'); |
// DOM Manipulation Challenge
// I worked on this challenge [by myself, with: ].
// Add your JavaScript calls to this page:
// Release 0:
// Release 1:
var done = document.getElementById("release-0");
done.className = "done";
document.getElementByClassName("done");
// Release 2:
document.getElementById("rele... |
'use strict';
var options = require('../options/common');
options.orientation = 'portrait';
module.exports = options; |
const homebridge = new (require('homebridge/lib/api').API)();
const Service = homebridge.hap.Service;
const Characteristic = homebridge.hap.Characteristic;
const Requester = require('./mock-Requester.js');
const exportedTypes = {
Service,
Characteristic,
Requester,
};
const DaikinAirconAccessory = require('../l... |
'use strict';
/**
* Module dependencies.
*/
var itemPolicy = require('../policies/item.server.policy'),
items = require('../controllers/item.server.controller');
module.exports = function (app) {
// Items collection routes
app.route('/api/item').all(itemPolicy.isAllowed)
.get(items.list)
.post(items.c... |
#!/usr/bin/env node
'use strict';
// stores From lang from the first menu (From menu). Passed byref to translationHandler and menu.initMenus
var langChoice = {
from: {
code: "",
label: ""
}
};
var checkYandexKey = require('./lib/checkYandexKey.js'),
menu = require('./lib/menu.js'),
translationHandler = requi... |
/*
*
* TestContainerB constants
*
*/
export const DEFAULT_ACTION = 'app/TestContainerB/DEFAULT_ACTION';
export const FILE_ID_UPDATE_ACTION = 'app/TestContainerB/FILE_ID_UPDATE_ACTION';
|
'use strict';
// Cars controller
angular.module('cars').controller('CarsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Cars','UrlService',
function ($scope, $stateParams, $location, Authentication, Cars, UrlService) {
$scope.authentication = Authentication;
// Create new Car
$sc... |
/* eslint no-magic-numbers:0 */
"use strict"
const test = require("tape")
const utils = require("../utils")
const testEvents = (t) => (err, events) => {
t.notOk(err)
t.equal(events[0].region, "nba finals")
t.end()
}
test("works with tbd first round", (t) => {
utils.parseFile("20210319-tbd-first-round", (e... |
$('.navbar-header .nav a h4').html('Sites');
getData(url, sites => {
new GrapheneDataGrid({...tableConfig,
schema: [
{label: 'Site Name', name:'name', required: true},
{label: 'Domain', name:'domain', required: true},
{name: 'id', type:'hidden'}
],
data: sites,
name: 'sites'
})
.on('click', e => {
... |
const { expect } = require('chai');
const nock = require('nock');
const API_URL = 'https://tenant.auth0.com';
const LogStreamsManager = require(`../../src/management/LogStreamsManager`);
const { ArgumentError } = require('rest-facade');
describe('LogStreamsManager', () => {
before(function () {
this.token = 'T... |
/**
* Created by JinWYP on 7/27/16.
*/
var express = require('express');
var router = express.Router();
var orderController = require('../../controllers/apiv1/apidemo');
// define the demo page route
// RESTful API http://mherman.org/blog/2016/03/13/designing-a-restful-api-w... |
import { expect } from 'chai';
import * as types from '../../../app/constants/ActionTypes';
import * as actions from '../../../app/actions/navigation';
describe('githubExtension Navigation actions', () => {
it('navigateTo should create NAVIGATE_TO action', () => {
expect(actions.navigateTo('data')).to.eql({
... |
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
config = require(path.resolve('./config/config'));
/**
* Geos module init function.
*/
module.exports = function (app, db) {
};
|
import nodeExternals from 'webpack-node-externals';
export default {
target: 'node',
externals: [nodeExternals()],
resolve: {
extensions: [' ', '.js'],
},
node: {
fs: 'empty'
},
module: {
rules: [
{
test: /\.js?$/,
use: 'babel-loader',
exclude: /node_modules/
... |
let supportsPassive_
/**
* Determine whether the current browser supports passive event listeners, and if so, use them.
* @param {!Window=} globalObj
* @param {boolean=} forceRefresh
* @return {boolean|{passive: boolean}}
*/
export function applyPassive(globalObj = window, forceRefresh = false) {
if (supportsPa... |
/************************************
DON'T TOUCH THIS!
This file is used just to combine
everything with CodeKit.
Minified version.
************************************/
/*
CODEKIT PREPRENDs
*/
/* LIBRARIES */
// @codekit-prepend '../bower_components/angular/angular.min.js'
// @codekit-prep... |
/* @flow */
import Rx from 'rx';
// import assert from 'assert';
var literal = Rx.Observable.of;
import translateType from '../translate/type';
import translateArguments from '../translate/arguments';
export
default
function emitIndexer(node: {
arguments: ? array <IdlArgument>,
idlType ? : IdlType
}): Rx.O... |
/**
* Accordion component is added on the sidenav component and now
* requires a click event listener to handle its function.
*
* Get the CSS class named project-accordion-label
*/
var projectAccordionLabel = document.getElementsByClassName("project-accordion-label");
////console.log("projectAccordionLabel.length ... |
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const LiveReloadPlugin = require('webpack-livereload-plugin');
module.exports = {
context: __dirname,
entry: ['./js/App.jsx', './scss/main.scss'],
devtool: 'eval',
output: {
path: path.join(__dirname, 'public')... |
// All code points in the `ASCII` category as per Unicode v7.0.0:
[
0x0,
0x1,
0x2,
0x3,
0x4,
0x5,
0x6,
0x7,
0x8,
0x9,
0xA,
0xB,
0xC,
0xD,
0xE,
0xF,
0x10,
0x11,
0x12,
0x13,
0x14,
0x15,
0x16,
0x17,
0x18,
0x19,
0x1A,
0x1B,
0x1C,
0x1D,
0x1E,
0x1F,
0x20,
0x21,
0x22,
0x23,
0x24,
0x25,
0... |
import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class AndroidCalendar extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M368.005,272h-96v96h96V272z M336.005,64v32h-160V64h-48v32h-24.01c-22.002,0-40,17.998-40,40v272
c0,22.002,1... |
'use strict';
var root = require('path').normalize(__dirname + '/../../..');
// Production specific configuration
// =================================
module.exports = {
// Server IP
ip: process.env.OPENSHIFT_NODEJS_IP ||
process.env.IP ||
undefined,
// Server port
port: pro... |
(function($) {
// Templates
var notificationTemplate = _.template("\
<% for (var i = 0; i < notifications.length; i++) { %>\
<% var notification = notifications[i]; %>\
<li class='notification' data-next='<%= notification.next %>'>\
<div class='user-thumbnail pull-left'>\
<a ... |
// Requred by theme templates
window.jQuery = $ = require('jquery');
require('parsleyjs');
// Import Nav module
import * as nav from './modules/nav.js';
import * as login from './modules/login.js';
import * as searchbar from './modules/searchbar.js';
import Tabs from './modules/tabs.js';
import Modal from './modu... |
/*jslint browser: true, devel: true, node: true, nomen: true, es5: true*/
/*global angular, $ */
module.exports = [
{
name: "user",
pattern: function (odm) {
"use strict";
return {
title: String,
author: String,
body: String,
comments: [{ body: String, date: Dat... |
// import webpack plugins
import {
DefinePlugin,
BannerPlugin,
optimize,
} from 'webpack';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import CleanWebpackPlugin from 'clean-webpack-plugin';
function makeConfig({ paths, pkg, isLive, screwIE8 }) {
const banner = `${pkg.name} - ${pkg.version}\nMa... |
var BlendFileReaderSample;
(function (BlendFileReaderSample) {
window.onload = function () {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'sample.blend');
xhr.responseType = 'arraybuffer';
xhr.addEventListener('load', function (e) {
var blendFile = BlendFileReader.read... |
const GraphQL = require('graphql');
const {
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
graphql
} = GraphQL;
const graphqlMiddleware = require('graphql-middleware').default;
const ExampleType = new GraphQLObjectType({
name: 'Example',
fields: {
id: {
type: GraphQLStrin... |
/**
* Express configuration
*/
'use strict';
var express = require('express');
var morgan = require('morgan');
var compression = require('compression');
var bodyParser = require('body-parser');
var methodOverride = require('method-override');
var cookieParser = require('cookie-parser');
var errorHandler = require('er... |
import React from 'react';
import {storiesOf} from '@storybook/react';
import {chartAsReactComponent} from '../index';
import moment from 'moment';
import currentCount from './index';
const CurrentCount = chartAsReactComponent(currentCount);
storiesOf('Current Count', module)
.add('With current count, capacity, la... |
const webpack = require('webpack');
var path = require('path');
module.exports = {
entry: {
'es-ES': './client/es-ES-loader',
'en-US': './client/en-US-loader',
'en-GB': './client/en-GB-loader'
},
output: {
path: path.join(__dirname, '/public/lib'),
filename: '[name].js',
publicPath: '/li... |
/*!
* froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2021 Froala Labs
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('froala-editor')) :
typeof define === 'function... |
(function (global) {
if (global.cpkb == undefined) {
global.cpkb = global.$c = {};
global.cpkb.app = global.$ca = {};
global.cpkb.locale = global.$cl = {};
//get resource text by key
$cl.get = global.$clg = function (key) {
if (key in cpkb.locale) { return cpkb... |
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Example app listening at http://%s:%s', host, port);
... |
/**
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v25.0.1
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = ... |
var http = require('http');
var Promise = require("promised-io/promise").Promise;
var _ = require('underscore');
var Integration = {
testRequest: function(opts, confs, callback) {
"use strict";
var promiseResult;
var promise = new Promise();
opts = opts || {};
opts.port =... |
import template from './trends-chart.html';
import Chart from 'chart.js';
export default {
template,
bindings: {
array: '<',
count: '<',
},
controller: ['$scope', controllerFunc],
};
function controllerFunc($scope) {
this.chartType = 'line';
$scope.$watch('$ctrl.count', () => {
const params ... |
// Taken from https://github.com/netlify/netlify-identity-widget
const routes = /(confirmation|invite|recovery|email_change)_token=([^&]+)/
const errorRoute = /error=access_denied&error_description=403/
const accessTokenRoute = /access_token=/
exports.onInitialClientRender = (
_,
{ enableIdentityWidget = true, pub... |
"use strict";
exports["default"] = {
CLASSES: {
'alert': 'alert',
'button': 'btn',
'button-group': 'btn-group',
'button-toolbar': 'btn-toolbar',
'column': 'col',
'input-group': 'input-group',
'form': 'form',
'glyphicon': 'glyphicon',
'label': 'label',
'panel': 'panel',
'pan... |
/*!
* jQuery QueryBuilder 2.3.2
* Locale: Romanian (ro)
* Author: ArianServ
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
(function (root, factory) {
if (typeof define == 'function' && define.amd) {
define(['jquery', 'query-builder'], factory);
}
else {
factory(root.jQue... |
// a simple random color picker
// clear previous program...
clearInterval();
// leds to choose from
var leds = [ LED1, LED2, LED3 ];
// state
var i;
var stop;
function dice() {
i++;
leds[i % 3].write(true);
leds[(i - 1) % 3].write(false);
if (i >= stop) return;
setTimeout(dice, i * 10);
}
fun... |
// notesForAppEngine.js
/**
The MIT License (MIT)
Copyright (c) 2014 James Mortensen
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... |
'use strict'
const checkRepeatable = ( task ) => {
if ( task.repeatableTime === 1 && checkDay( task.dayRef )) {
resetTask( task )
} else if ( task.repeatableTime === 2 && checkWeek( task.dayRef )) {
resetTask( task )
} else if ( task.repeatableTime === 3 && checkMonth( task.monthRef )) {
resetTask( ... |
angular.module('WaffleApp').directive('waffleNewRoomForm', function() {
return {
restrict: 'E',
scope: {},
templateUrl: 'views/chat/new-room-form.html',
replace: true,
controller: 'NewRoomFormCtrl',
controllerAs: 'ctrl'
};
}).controller('NewRoomFormCtrl', ['RoomService', function(roomService) {
var self ... |
import { Schema, model, joigoose } from 'config/mongoose'
import { setup } from 'helpers/crud'
import Joi from 'joi'
const joiSchema = Joi.object({
lead: Joi.any().meta({
type: Schema.Types.ObjectId,
ref: 'Lead'
}).required(),
subscription: Joi.any().meta({
type: Schema.Types.Object... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
require('./chunk-92621ff7.js');
require('./helpers.js');
require('./chunk-9103eeda.js');
require('./chunk-bd1feb6c.js');
require('./chunk-c00639be.js');
var __chunk_5 = require('./chunk-13e039f5.js');
require('./chunk-adaa5792.js');
require(... |
import alt from '../alt';
import ImmutableUtil from 'alt/utils/ImmutableUtil';
import Immutable from 'immutable';
import OrdersActions from '../actions/orders_actions';
class OrdersStore {
constructor() {
this.orders = Immutable.List();
this.selectedStatus = 'all';
this.amountFilter = null;... |
// jshint node:true
"use strict";
var traverse = require('./traverse');
var find = require('mout/array/find');
var insert = require('mout/array/insert');
// ---
var IMPLIED_GLOBALS = {'window':1, 'document':1};
var GLOBAL_CONTEXT = 'window';
var CUSTOM_CONTEXT = '__CUSTOM_CONTEXT__';
// ---
// simplify and de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.