code stringlengths 2 1.05M |
|---|
try {
return cache()
} catch (ex) {
try {
return server()
} catch (ex) {
return 'default'
}
} |
global.Thousand = 1000; //For readability of number literals in code
global.tryRequire = (path, silent = false) => {
let mod;
try{
mod = require(path);
} catch(e) {
if( e.message && e.message.indexOf('Unknown module') > -1 ){
if(!silent) Logger.error(`Module "${path}" not found!... |
import _ from 'underscore';
export class SelectionResolver {
constructor(gridView) {
this.gridView = gridView;
}
updateItems() {
return this.patch({});
}
selectRow() {
throw new Error('Not Supported');
}
deselectRow() {
throw new Error('Not Supported');
}
selectAll() {
throw n... |
/*eslint no-underscore-dangle:0*/
'use strict';
/*!
* Module dependencies
*/
var AWS, DOC; // loaded JIT with settings
var util = require('util');
var Connector = require('loopback-connector').Connector;
var async = require('async');
var MAX_BATCH_SIZE = 25;
// Load parse library with custom operators for DynamoDB
... |
import React from 'react';
import { FormattedRelative, FormattedMessage } from 'react-intl';
import moment from 'moment';
export default function HelloWorld() {
return (
<h1 className="hw-headline">
<span>
<FormattedMessage
id="app.helloWorld.greeting"
description="Greeting to w... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/builtin/extends"));
var _react = _interopRequireDefault(require("react"));
var _reactDom = _interopRequireDefault(require("react-dom"));
va... |
module.exports = {
config: {
type: 'radar',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#ff0000'
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5]
}
]
},
options: ... |
'use strict';
module.exports = {
SERVER_ERROR: 500,
BAD_GATEWAY: 502,
BAD_PARAMS: 400,
NOT_FOUND: 404,
TEMPORARY_REDIRECT: 301,
PERMANENT_REDIRECT: 302,
NOT_AUTHORIZED: 403
};
|
var getChildren = exports.getChildren = function(elem){
return elem.children;
};
var getParent = exports.getParent = function(elem){
return elem.parent;
};
exports.getSiblings = function(elem){
var parent = getParent(elem);
return parent ? getChildren(parent) : [elem];
};
exports.getAttributeValue =... |
/**
* Paint House
*
* There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of
* painting each house with a certain color is different. You have to paint all the houses such that no two adjacent
* houses have the same color.
*
* The cost of painting eac... |
/*
* grunt-init-web
* http://github.com/Safareli/grunt-init-web
*
* Copyright (c) 2014 "Safareli" Irakli Safareli
* Licensed under the MIT license.
*/
'use strict';
// Basic template description.
exports.description = 'Create a web development skeleton, with cofeescript, stylus, jade and livereload';
// Templa... |
/* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
* Copyright (c) 2010 Mr.doob, rhyolight, bebraw
*/
var DEBUG = true;
var BRUSHES = ["sketchy", "shaded", "chrome", "blur", "fur", "longfur", "web",
"simple", "squares", "ribbon", "circles", "grid", "stringy", "curvy",
"e... |
//
// TDigest:
//
// approximate distribution percentiles from a stream of reals
//
var RBTree = require('bintrees').RBTree;
function TDigest(delta, K, CX) {
// allocate a TDigest structure.
//
// delta is the compression factor, the max fraction of mass that
// can be owned by one centroid (bigger, u... |
version https://git-lfs.github.com/spec/v1
oid sha256:8632d5b2bdb30b871a57e622df9b805a3649f022646ca3e1633ba4cf4d08f5fe
size 17011
|
/*
* ajax.js by Meiguro - MIT License
*/
var ajax = (function(){
var formify = function(data) {
var params = [], i = 0;
for (var name in data) {
params[i++] = encodeURIComponent(name) + '=' + encodeURIComponent(data[name]);
}
return params.join('&');
};
var deformify = function(form) {
var params = {... |
exports.getResource = function (path, callback) {
var fs = require('fs');
fs.readFile(path, function (err, data) {
if (err) return callback(err, null);
var result = null;
try {
result = JSON.parse(data);
} catch (e) {
return callback(e, null);
}
... |
var dnode = require( 'dnode' );
var socketio = require( 'socket.io' );
var Hash = require( 'hashish' );
var WebConnector = require( "./connector" );
var STATE_STOPPED = 0
var STATE_STARTED = 1
var ConnectorServer = function ( id , port ) {
if ( !(this instanceof ConnectorServer) ) {
return new ConnectorSe... |
import React from 'react';
import HamburgerButton from './sidebarComponents/HamburgerButton';
import Sprite from './sidebarComponents/Sprite';
class RightSidebar extends React.Component {
static defaultProps = {
sprites: []
};
render () {
const SPRITES = this.props.sprites.map(
sprite => <Sprite ... |
'use strict';
var Log = (function () {
function Log() {
}
Log.log = function (message) {
console.log(message);
};
Log.info = function (message) {
console.log(message);
};
Log.warning = function (message) {
console.log(message);
};
Log.error = function (err) {
... |
'use strict';
/* Controllers */
angular.module('myApp.controllers', [])
.controller('ListStudiesCtrl', ['$scope', '$rootScope', function($scope, $rootScope) {
$rootScope.imagedb.query("imreq", "studies", { include_docs: true });
}])
.controller('ViewStudyCtrl', ['$scope', '$rootScope', '$routeParams', funct... |
'use strict';
// Load modules
const Code = require('code');
const Joi = require('joi');
// Declare internals
const internals = {};
// Test shortcuts
const expect = Code.expect;
exports.validate = function (schema, config, callback) {
return exports.validateOptions(schema, config, null, callback);
};
ex... |
// @flow
import Block from "./block";
import Key from "./key";
import Node from "./node";
import Reader from "./reader";
export default class NamedBlock extends Block {
static test (reader: Reader): boolean {
const lb = reader.match("{");
reader.next();
const colon = reader.match(":");
reader.next();
const... |
function http(t){return new Promise(function(n,s){function e(t,n){this.status=t,this.message=n}function u(t){return JSON.parse(t)}function r(t){return JSON.stringify(t)}function i(t){t&&Object.keys(t).forEach(function(n){o.setRequestHeader(n,t[n])})}var o=new XMLHttpRequest;o.open(t.method,t.url),o.onload=function(){re... |
"use strict";
var interfaces_1 = require('./util/interfaces');
var errors_1 = require('./util/errors');
var helpers_1 = require('./util/helpers');
var events_1 = require('./util/events');
var path_1 = require('path');
var config_1 = require('./util/config');
var logger_1 = require('./logger/logger');
var webpackApi = r... |
import React from 'react';
import {Link} from 'react-router';
import {getRandomScrap} from '../server';
import {hashHistory} from 'react-router';
export default class StartPage extends React.Component {
handleFindScrapToFinish(e){
e.stopPropagation();
getRandomScrap((scrapData)=>{
hashHistory.push("sc... |
/** @ignore */
const Command = require('./../Command');
/** @ignore */
const Module = require('./utils/ChannelModule');
/**
* Modlog Command, allows server managers to toggle the
* modlog module on or off for any given channel.
*
* @extends {Command}
*/
class ModlogCommand extends Command {
/**
* Sets u... |
var app = angular.module('app', ['ui.router','custCtrl','marginService','angularMoment','ng-mfb']);
app.constant('AUTH_EVENTS', {
notAuthenticated: 'auth-not-authenticated'
})
app.constant('API_ENDPOINT', {
url: 'http://localhost:8000/api'
});
app.run(function ($rootScope, $window, AuthService, AUTH_EVENTS) {
... |
Router.configure({
// we use the master template to define the layout for the entire app
layoutTemplate: 'masterPublic',
// the notFound template is used for unknown routes and missing lists
notFoundTemplate: 'notFound',
// show the loading template whilst the subscriptions below load their data
loadingT... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {
ReactDOMResponderEvent,
ReactDOMResponderContext,
PointerType,
} from 'shared/ReactDOMTypes';
impo... |
/* @flow */
import Container from './Container';
import Row from './Row';
import Col from './Col';
export {
Container,
Row,
Col,
};
|
'use strict';
const VersionChecker = require('ember-cli-version-checker');
// project cache that stores LCA hosts by lazy engine name
// eg, eventually this `WeakMap` will look like:
// {
// projectAObj: {
// testEngineName: Project|LazyEngineHost
// }
// }
const wm = new WeakMap();
/**
* Gets the level of ... |
const ReferenceStore = require('../store/reference');
/**
* Built the store in order to the .
* @return {ReferenceStore} - An instanciated reference store.
*/
module.exports = new ReferenceStore();
|
export { default } from 'maximum-plaid/components/plaid-symbol'; |
import Intl from 'intl';
import React from 'react';
import Router from 'react-router';
import routes from './routes';
import {i18nCursor} from './core/state';
import * as scoreboard from './core/api/scoreboard-api';
const app = document.getElementById('root');
scoreboard.init();
Router.run(routes, (Handler) => {
R... |
'use strict';
//Articles service used for articles REST endpoint
angular.module('mean').factory('Articles', ['$resource',
function($resource) {
//return $resource('uri', {}, {});
return $resource('articles/:articleId', {
articleId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]);
|
const ByteBuffer = require('bytebuffer');
const SteamID = require('steamid');
const Zlib = require('zlib');
const SteamUserConnection = require('./02-connection.js');
const Schema = require('../protobufs/generated/_load.js');
const EMsg = require('../enums/EMsg.js');
const EResult = require('../enums/EResult.js');
... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Viewpoint ../../core/Accessor ../../core/Error ../../cor... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
/* eslint-disable global-require */
// The top-level (... |
version https://git-lfs.github.com/spec/v1
oid sha256:eb647ff6ada9273546ebda37b996d223b12a7bec5b6696a50e2bba5921b4f823
size 1544
|
/*
This Chess AI comes from here
https://github.com/glinscott/Garbochess-JS
Copyright (c) 2011 Gary Linscott
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain... |
// StartView.js
// -------
define(["jquery", "backbone", "mustache", "text!templates/trulyAnswer/Start.html", "text!templates/trulyAnswer/StartSuccess.html", "models/Question", "Utils", "views/trulyAnswer/Configs"],
function ($, Backbone, Mustache, template, successTemplate, Question, Utils, Configs) {
v... |
var _ = require('lodash');
var expect = require('chai').expect;
describe('date Mode', function () {
describe('now', function () {
it('', function () {
console.log(_.now());
})
})
}) |
/**
* CMD: grunt hint
*
* ---------------------------------------------------------------
*
* Runs jshint, js coding stands and js validate to ensure general
* code integrity
*
*/
module.exports = function(grunt) {
grunt.registerTask('hint', [
'jshint:src',
'jscs:src'
]);
};
|
'use strict';
var deoopfy = require('deoopfy');
/**
* Returns the available model names for a mongoose Connection.
*
* @param {mongoose.Connection} connection
* @return {Array.<String>} model_names.
*/
exports.getModelNames = function getModelNames(connection) {
if(connection === connection.base.connection) {
... |
var mod = angular.module('restaurant', ['ngResource', 'ngRoute']);
mod.factory('Restaurant', ['$resource',
function($resource) {
return $resource('/api/restaurants/restaurants/:slug', {}, {
query: {
method: 'GET',
isArray: true,
}
});
}
]);
mod.factory('Ra... |
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
release: ["public/**"]
},
assemble: {
release: {
options: {
layoutdir: 'www/templates/layouts',
partials: ['www/templates/includ... |
import { FETCH_QUESTION_SUCCESS } from './actionTypes'
function fetchQusetionSuccess(questionitem) {
return {
type: FETCH_QUESTION_SUCCESS,
questionitem: questionitem
}
}
function fetchQuestion(questionId) {
return dispatch => {
return fetch('/api/selectquestion', {
method: 'POST',
h... |
'use strict';
var CAPABILITY_RESPONSE = 0x6C;
module.exports = function () {
return {
cmd: CAPABILITY_RESPONSE,
handle: function (cmd, data, board) {
var supportedModes = 0;
function pushModes(modesArray, mode) {
if (supportedModes & (1 << board.MODES[mode])) {
modesArray.pu... |
/* The ViewManager takes care of detecting whether the user uses the old or
* new Compose in Gmail. Once it finds out, it takes care of instantiating
* the appropriate view (regularView or updatedView).
*/
var ViewManager = function () {
if (arguments.callee.singleton_instance) {
return arguments.calle... |
import * as React from 'react';
import {findDOMNode} from 'react-dom';
import {render} from '../TestUtils';
import {Simulate} from 'react-dom/test-utils';
import Immutable from 'immutable';
import List from './List';
import {defaultOverscanIndicesGetter} from '../Grid';
describe('List', () => {
const array = [];
f... |
import {createSelector} from 'reselect';
import Fuse from 'fuse.js';
import _ from 'lodash';
const options = {
keys: ['name', 'address'],
threshold: 0.45
};
const f = new Fuse([], options);
const getQuery = (state) => _.get(state.retailersView, 'query', '');
const getRetailers = (state) => _.map(_.get(state, 're... |
/*
* This file is part of the Fxp package.
*
* (c) François Pluchino <francois.pluchino@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import $ from 'jquery';
import {checkContent} from './content';
/**
* Display the... |
(function() {
angular
.module('autoTracker')
.controller('serviceCtrl', serviceCtrl);
function serviceCtrl() {
var vm = this;
}
})(); |
if(typeof exports === 'object') {
var assert = require("assert");
var alasql = require('..');
var dirname = __dirname.replace(/\\/g,"/");
} else {
dirname = '.';
};
//if(typeof exports === 'object' && false) {
describe('Test 168a - read XLSX', function() {
this.timeout(10000);
it("1. Read XLSX file"... |
const path = require("path");
// `@babel/preset-env: modules: false` is leaves `import`, that don't work on nodejs
require("@babel/register")({
babelrc: false,
extensions: [".js", ".jsx", ".ts", ".tsx"],
presets: [
[
"@babel/preset-env",
{
"targets": {
... |
var events = require("bloody-events")
var asap = require("asap")
var expando = "dispatch" + String(Math.random())
function each(list, fn, thisValue){
var index = -1
var length = list.length
while(++index < length) {
fn.call(thisValue, list[index], index, list)
}
}
function indexOfCallback(array, value) {
... |
(function() {
'use strict';
angular.module('jverhaeghePortfolio.layout', []);
})();
|
"use strict";
var Github = require("github");
var _ = require("lodash");
var inquirer = require("inquirer");
var ttys = require("ttys");
var debug = require("debug")("github-todos:github");
var config = require("../config");
/**
* Format of an issue:
* * type: String - "issue"
* * number: Number
* * url: St... |
/**
* Angular.js sidebar service
*
* @author eugene.trounev(a)gmail.com
*/
angular.module('app')
.factory('$userService', [function(){
var user;
return user;
}]);
|
var express = require('express')
var router = express.Router()
var http = require('http')
var querystring = require('querystring')
var zlib = require('zlib')
/* GET home page. */
router.get('/hitokoto', function (req, res, next) {
var chuckList = []
var _html = ''
var ret = {}
var _query = querystring.stringif... |
#import "../../jasmine-uiautomation.js"
#import "../../jasmine/lib/jasmine-core/jasmine.js"
#import "../../jasmine-uiautomation-reporter.js"
#import "../../helpers/general_helpers.js"
describe("Questions Backgrounding", function() {
var helpers = new EPHelpers();
var expectedFirstVisibleCellName = 'Content ... |
var View = Backbone.View.extend({
el: '#view',
id: 'mainView',
// Cache the template function for a single item.
// viewTpl: _.template( $('#item-template').html() ),
initialize: function (options) {
console.log('This View has been initialized.');
this.render();
},
// Re-render the title of the tod... |
HTMLWidgets.widget({
name: 'dimpleStepHor-cn',
type: 'output',
initialize: function(el, width, height) {
d3.select(el).append("div")
.attr("id","chartContainer")
.attr("width", width)
.attr("height", height);
var svg = dimple.newSvg("#chartContainer", width, height);
... |
const config = require('../config.js');
module.exports = (slackapp) =>
function(err, req, res) {
if (err) {
res.status(500).send(`ERROR: ${err}`);
} else {
slackapp.log(
`Use /incoming-webhooks/${req.identity.team_id}?businessUnitId=${
config.BUSINESS_UNIT_ID
} to receiv... |
import { drawCircularText } from 'vizart-core';
import isFunction from 'lodash-es/isFunction';
import getAxisLabel from './get-axis-label';
const getLevelLabel = (opt, label) =>
opt.plots.levelLabel && isFunction(opt.plots.levelLabel)
? opt.plots.levelLabel(label)
: label;
const highlight = (context, opt, ... |
'use strict';
var socialsInstagramCredentialsService = angular.module('socialsInstagramCredentialsService', []);
socialsInstagramCredentialsService.factory('InstagramCredentials', ['$resource', 'REST_API',
function ($resource, REST_API) {
return $resource(REST_API.INSTAGRAM_CREDENTIALS, {});
}]); |
const extend = require('lodash/extend');
const uuid = require('uuid/v4');
const Action = require('./action');
const Base = require('./base');
class PanelItem extends Base {
constructor(type, parent, id, name, desc, position) {
super(type, parent, id, name, desc);
this.position = position || -1;
... |
var calendar_charting = function() {
var chart
var init = function() {
load_data()
}
var resize_chart = function() {
chart.setSize($(window).width(), $(window).height() - 80)
}
var load_data = function() {
var y = new Date()
$.ajax({
url: '/calendar/events',
method: 'GET'
}).done(function(res)... |
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jquery", "moment" ], factory);
}
else if (typeof exports === "object") {
module.exports = factory(require("jquery"), require("moment"));
}
else {
factory(jQuery, moment);
}
})(function($, mom... |
import React, { Component } from 'react'
import PropTypes from 'prop-types';
export default class FilterByPosition extends Component {
static propTypes = {
apiData__positions: PropTypes.array.isRequired,
updatePositionFilter: PropTypes.func.isRequired,
positionArr: PropTypes.array.isRequired,
className: Pro... |
'use strict';
// Declare app level module which depends on filters, and services
var tdfTeamsApp = angular.module('tdfTeams', [
'ngRoute',
'ngSanitize',
'tdfTeams.filters',
'tdfTeams.services',
'tdfTeams.directives',
'tdfTeams.controllers',
'tdfRiders.controllers'
]);
tdfTeamsApp.config(['$routeProvide... |
import {renderComponent, expect} from '../test_helper';
import App from '../../src/components/app';
//core part of how mocha runs tests
//queue's up tests in the it blocks
//used to group together similar tests
describe('App Component', () => {
let component;
beforeEach(() => {
component = renderComponent(A... |
define([
'jquery',
'App.views.OfficeList',
'App.collections.Office'
], function($, OfficeListView, OfficeCollection) {
'use strict';
var controller = function() {
var view = new OfficeListView({
offices: new OfficeCollection()
});
$('#content').html(view.el);
};
return controller;
... |
function snap( point, e )
{
// grid
var pos = getMousePos(canvas, e);
if (objects[0].density != -1)
{
for ( var i = 0; i < objects[0].xes.length; i++ )
{
if ( Math.abs( pos.x - objects[0].xes[i] ) < 5)
{
point.x = objects[0].xes[i];
}
}
for ( var i = 0; i < objects[0]... |
'use strict';
angular.module('myjamApp')
.factory('Auth', function Auth($location, $rootScope, $http, User, $cookieStore, $q) {
var currentUser = {};
if($cookieStore.get('token')) {
currentUser = User.get();
}
return {
/**
* Authenticate user and save token
*
* @par... |
/**
* Blocks are functions with executable code that make up a spec.
*
* A block function may return a "thenable" promise, in which case the
* test completes when the promise is resolved and fails if the promise
* fails or if it succeeds with an unexpected value.
*
* @constructor
* @param {jasmine.Env} env
* @... |
module.exports = {
Code: require('./code'),
Implicit: require('./implicit')
}
|
/**
* OJSO JavaScript Library v0.2alpha
*
* Released under the MIT license
*
* Date: 2017.06.26 - 18:50
*
* namespace
*
* @todo log dump handler
* @todo merge ojso mit new ojso
* @todo dump console.x
* @todo css class id identifier
* @todo events
* @todo get every component
* @todo css identifier getCrea... |
/* global describe */
/* global it */
'use strict';
var Twitter = require('../index');
var optional = require('optional');
var optConfig = {consumer_key: 'random', consumer_secret: 'random', token: 'random', token_secret: 'random'};
var config = optional('./config.json') || optConfig;
var should = require('should');
... |
version https://git-lfs.github.com/spec/v1
oid sha256:52b68f56477ca93f7a4b6a90eb826ee92f4e827530b30a698d4131d71cb9bcea
size 664
|
var Readable = require('stream').Readable;
var readable = new Readable();
readable._read = function() {
setTimeout(function() {
// if (readable.readable) {
readable.push(new Buffer('some buffer'));
// }
}, 100);
};
['end', 'finish', 'close', 'data', 'error'].forEach(function(event) {
readable.on... |
(function() {
/*
* Module dependencies
*/
var Getter = Completed.module.get("Getter");
var KeyMap = Completed.module.get("KeyMap");
var $ = Completed.module.get("$");
var console = Completed.module.get("Console");
/*
* Main
*/
var newCompleted = function(inputSelector... |
var express = require('express'),
app = module.exports = express();
app.set('views', __dirname);
app.on('mount', function () {
app.locals.mountpath = app.route;
});
function auth(req, res, next) {
if (req.body.username === 'pedro' && req.body.passwd === 'root') {
req.session.user = 'pedro';
... |
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('Powers', {
ID: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true
},
Name: {
type: DataTypes.STRING,
allowNull: false
},
GroupName:... |
import React from "react";
import {Link} from "react-router";
export default React.createClass({
contextTypes: {
router: React.PropTypes.object
},
render: function () {
let isActive = this.context.router.isActive(this.props.to, true),
className = isActive ? "active" : "";
... |
import {INCEREMENT, INCEREMENTX, DECEREMENT, SEND_REQUEST, GOT_REQUEST, UPDATE_USER_NAME} from './mutation-types'
export default {
[INCEREMENT] (state) {
state.count++
},
[SEND_REQUEST] (state) {
state.isRequesting = true
},
[GOT_REQUEST] (state) {
state.isRequesting = false
},
[INCEREMENT... |
const path = require('path');
const webpack = require('webpack');
// env
const buildDirectory = './dist/';
module.exports = {
entry: './lib/main.jsx',
devServer: {
hot: true,
inline: true,
port: 7700,
historyApiFallback: true,
},
resolve: {
extensions: ['*', '.js', '.jsx'],
},
output: ... |
import { assign, swipeShouldReset } from '../util/util';
import { GESTURE_GO_BACK_SWIPE } from '../gestures/gesture-controller';
import { SlideEdgeGesture } from '../gestures/slide-edge-gesture';
import { NativeRafDebouncer } from '../util/debouncer';
export class SwipeBackGesture extends SlideEdgeGesture {
constru... |
module.exports = {
"env": {
"browser": false,
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"plugins": [
],
"rules": {
"object-curly-spacing" : [2, "always"],... |
/**
* Livechat Page Visited model
*/
class LivechatPageVisited extends CaoLiao.models._Base {
constructor() {
super();
this._initModel('livechat_page_visited');
this.tryEnsureIndex({ 'token': 1 });
this.tryEnsureIndex({ 'ts': 1 });
// keep history for 1 month if the visitor does not register
this.tryEn... |
Ext.define('App.view.import.departement', {
extend: 'Ext.panel.Panel',
alias: 'widget.importdepartement',
bodyPadding: 10,
layout: { type: 'vbox', align: 'stretch'},
items: [
{ xtype: 'form', bodyPadding: 10, autoScroll: true, flex: 2, title: 'Form departement', layout: { type: 'hbox', align: 'stretch'},
item... |
goog.provide('gmf.profileComponent');
goog.require('gmf');
goog.require('ngeo.CsvDownload');
goog.require('ngeo.FeatureOverlayMgr');
/** @suppress {extraRequire} */
goog.require('ngeo.profileDirective');
goog.require('ol.Feature');
goog.require('ol.Overlay');
goog.require('ol.geom.LineString');
goog.require('ol.geom.P... |
const winston = require('winston');
const logTransports = require('./logging.config').logTransports;
const errorTransports = require('./logging.config').errorTransports;
const init = () => {
const logger = new winston.Logger({
transports: logTransports,
exceptionHandlers: errorTransports,
});
return logg... |
/**
* Created by andyf on 4/14/2017.
*/
//------------------------------------------//
//------------------ROUTES------------------//
//------------------------------------------//
var multer = require("multer");
var express = require("express");
var app = express();
var multer = require("multer");
var m... |
version https://git-lfs.github.com/spec/v1
oid sha256:64c6340edff360aebb02843efb9b18f66695b3251f409ff3960a03ff443abb3c
size 23415
|
// Example pony-config consumer
var config = require('../index.js');
console.log('');
console.log( 'Demonstrating loading configuration');
config
.options( { debug: true } )
.findRuntimeEnvironment( { paths:['./example-env-file'], env: 'ENVIRONMENT', default:'prod', debug: true} )
.always().object( {'or... |
/**
* Created by tim on 14/03/17.
*/
import styled from 'styled-components/native';
import React from 'react';
import FormFieldTitle from '../form/FormFieldTitle';
import StyledView from './StyledView';
const StyledText = styled.Text`
color: palevioletred;
`;
export default class StyledComponent extends React.Co... |
(function (global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.nearestPeriodicValue = factory();
})(this, function () {
"use strict";
/*jshint -W018 */
function nearestPeriodicValue... |
exports.User = require('./user')
exports.UserFollow = require('./user_follow')
exports.Post = require('./post')
exports.PostCollection = require('./post_collection')
exports.Tag = require('./tag')
exports.Message = require('./message')
exports.Reply = require('./reply')
|
var Barc= require ('../lib/barc')
fs = require('fs');
generate('defaults', new Barc());
generate('automatic border', new Barc({border:'auto'}));
generate('big font', new Barc({fontsize:40}));
generate('rotated', new Barc({fontsize:40, border:'auto'}), 45);
generate('flipped', new Barc({fontsize:40 }), 90);
functi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.