code stringlengths 2 1.05M |
|---|
/* global require, describe, it */
'use strict';
// MODULES //
var chai = require( 'chai' ),
etc = require( './../lib' );
// VARIABLES //
var expect = chai.expect;
// TESTS //
describe( 'app-etc-config', function tests() {
it( 'should export a function', function test() {
expect( etc ).to.be.a( 'function' ... |
'use strict';
var bytes = require('bytes')
, os = require('os');
/**
* HotPath: A memory constrained cache for HotPath or critical files. These
* files should be served out of memory instead of from disk for performance
* reasons.
*
* Options:
*
* - maximum: The maximum amount of memory we can allocate for o... |
'use strict';
var _ = require('lodash');
var Q = require('q');
var DependentPhoneNumberList = require(
'./address/dependentPhoneNumber').DependentPhoneNumberList;
var Page = require('../../../../base/Page');
var deserialize = require('../../../../base/deserialize');
var values = require('../../../../base/values');... |
/* jshint node: true */
'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addBowerPackageToProject('spectrum');
}
};
|
// tests/roll-d-format-test.js
'use strict';
let chai = require('chai');
let expect = chai.expect;
let DiceRoller = require('./../src/dice-roller');
describe('DiceRoller - d# format', () => {
it('roll("d20") should return an object with a result property between 1 and 20, inclusively', () => {
let diceRol... |
const goodsArr = new Array(24).fill('');
const bannersArr = new Array(4).fill('');
const specialsArr = new Array(24).fill('');
/* eslint-disable global-require */
/* eslint-disable import/no-dynamic-require */
const goodsList = goodsArr.map((item, idx) => ({
img: require(`./img/goods/g${idx + 1}.jpg`),
id: Mat... |
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { Provider } from 'react-redux';
import AppNavigator from './AppNavigator';
import store from './store';
class App extends Component {
render() {
return (
<Provider store={store}>
<AppNa... |
var data = require('../stub/data');
var db = module.exports = {};
db.get = function (name, callback) {
callback(null, data[name]);
};
|
// @ts-check
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer")
const merge = require("webpack-merge")
const { env } = require("../utils/env")
export function bundleAnalyzer(config) {
if (!env.enableWebpackAnalyze) {
return config
}
return merge.smart(config, {
devtool: "none",
sta... |
'use strict';
import React, { Component } from 'react';
import { Text, StyleSheet, View, ScrollView, RefreshControl } from 'react-native';
import HotPanel from '../../component/HotPanel';
import ListViewForHomeTab from '../../component/ListViewForHome';
import ListViewForOtherTab from '../../component/SimpleListView';... |
// @auto-index
import _1 from './1.jpg'
import _2 from './2.jpg'
import _3 from './3.jpg'
import _4 from './4.jpg'
import _5 from './5.jpg'
import _6r1920x1080 from './6r1920x1080.jpg'
import _7r1920x1080 from './7r1920x1080.jpg'
import _8r1920x1080 from './8r1920x1080.jpg'
export { default as _1 } from './1.jpg'
exp... |
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const CompressionPlugin = require('compression-webpack-plugin');
const path = require('path');
module.exports = {
entry: {
main: path.join(__dirname, '_scripts/main.js')
},
output: {
path: path.join(__dirname, '... |
/**
* Dependencies
*/
var split = require('split-object')
var typeOf = require('type-of')
/**
* Validate `obj` against `schema`.
*
* @param {object} obj
* @param {object} schema
* @return {boolean|array}
*
* @api public
*/
function validObject(obj, schema) {
var errors = []
split(schema)
.f... |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed ... |
import React, { Component } from 'react';
import style from './style.css';
import Logo from '../Logo';
class Header extends Component {
render() {
return (
<header className={style.header}>
<Logo className={style.logo} />
</header>
);
}
}
export default Header;
|
export default class FormulonRuntimeError extends Error {
constructor(message, errorType, options) {
super(message);
this.errorType = errorType;
this.options = options;
}
}
|
'use strict';
(function () {
angular.module('iTableTree').factory('TreeGeneralService', ['UtilService', function (UtilService) {
function TreeGeneralService($scope) {
this.$scope = $scope;
}
TreeGeneralService.prototype.adjustCols = function (wrapperWidth, gtMinWidthCols) {
... |
/*
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
to use it in non-GPL project. Please contact sales@dhtmlx.com for details
*/
scheduler.attachEvent("onTemplatesReady",function(){function e(d,b,a,c){for(var i=b.getElementsByTagName(d),h=a.getElementsByTagName(d),g=h.leng... |
import Ember from 'ember';
const { controller } = Ember.inject;
export default Ember.Controller.extend({
repoController: controller('repo'),
lintUrl: Ember.computed('repoController.repo.slug', function () {
var slug;
slug = this.get('repoController.repo.slug');
return 'https://lint.travis-ci.org/' + ... |
module.exports = {
STATE_ERROR: 'error',
STATE_WAITING: 'waiting',
STATE_PREPROCESSING: 'preprocessing',
STATE_UPLOADING: 'uploading',
STATE_POSTPROCESSING: 'postprocessing',
STATE_COMPLETE: 'complete',
}
|
var timestamp = require('console-stamp')(console, '[dd.mm.yyyy HH:MM:ss.l]')
var fs = require('fs')
var assert = require('assert')
var pack = require('./system/pack')
var auth = require('./system/chat-packet')
var connect = require('./system/connect')
var handle = connect.handle
var s = connect.s
var events = require('... |
module.exports = function (req, res, next) {
console.info('[Middleware] setting');
next();
};
|
'use strict'
/* eslint-env jasmine */
import ExtDate from './ExtDate.js'
/**
* @test {ExtDate}
*/
describe('The ExtDate class', function () {
const testedNativeMethods = {
proto: {}
}
const testedOwnMethods = {
proto: {}
}
it('should return a string representation of the current time when called... |
/* jshint latedef:nofunc */
const MediaServices = require('./media-services');
const InCall = require('./incall');
/**
* handles sending and receiving calls.
* @param {object} user contains user information.
* @param {object} srf Drachtio Signaling Resource Framework object for SIP handling.
* @returns {object} res... |
import * as React from 'react';
import { expect } from 'chai';
import { createRenderer, describeConformance } from 'test/utils';
import PaginationItem, { paginationItemClasses as classes } from '@mui/material/PaginationItem';
describe('<PaginationItem />', () => {
const { render } = createRenderer();
describeConf... |
'use strict';
var config;
switch (process.env.NODE_ENV) {
case 'development':
config = {
APP_PORT: 3000,
database: {
couch: {
host: 'http://127.0.0.1',
port: 5984,
options: {}
}
}... |
/*
* GET analysis page.
*/
exports.view2 = function(req, res){
res.render('analysis-B');
}; |
'use strict';
(function() {
// Products Controller Spec
describe('MEAN controllers', function() {
describe('ProductsController', function() {
// The $resource service augments the response object with methods for updating and deleting the resource.
// If we were to use the standard toEqual matcher,... |
import { platform } from '../core/platform.js';
import { EventHandler } from '../core/event-handler.js';
import { XrTrackedImage } from './xr-tracked-image.js';
/** @typedef {import('./xr-manager.js').XrManager} XrManager */
/**
* Image Tracking provides the ability to track real world images by provided image sampl... |
export function falsyToNull(value) {
if (!value) return null;
return value;
}
|
var cursor = db.stat.find({"data.event": "AnswerProblem"});
while (cursor.hasNext()) {
var track = cursor.next();
var properties = track.data.properties;
if (properties.LessonId && properties.ChapterId && properties.LayerId && properties.ProblemId && properties.ActivityId && properties._id && track._id)
... |
var SelectInputBox = require('/selectInputBox');
var args = arguments[0] || {};
var opts = {
data: ['choco', 'mika', 'tora', 'jack']
};
var selectInputBox = new SelectInputBox(opts);
var selectInputBox2 = new SelectInputBox(opts);
$.container.add(selectInputBox.getView());
$.container2.add(selectInputBox2.getView())... |
'use babel';
import {Point, Range} from 'atom';
export default class EventHandler {
constructor(doc, editor, path, router) {
this.doc = doc;
this.editor = editor;
this.path = path;
this.router = router;
this.clientId = atom.config.get('coeditor.clientId');
this.push = true;
this.buffer =... |
var expect = require( 'chai' ).expect,
SpecialTiles = require( '../js/special_tiles' ),
Colors = require( '../js/colors' ),
Shapes = require( '../js/shapes' );
describe( 'EmptyTile', function () {
it( 'has no color or shape', function () {
var t = new SpecialTiles.EmptyTile();
expect( t.color ).to.be.null;
... |
var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.render('umengcallback');
});
module.exports = router;
|
import * as types from './constants'
export const colleagueChangedAction = payload => ({type: types.COLLEAGUE_CHANGED, payload: {colleague: payload} })
export const customerChangedAction = payload => ({type: types.CUSTOMER_CHANGED, payload: {customer: payload} })
export const accountChangedAction = payload => ({typ... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M14 7l-5 5 5 5V7z"
}), 'ArrowLeftTwoTone'); |
/**
* Creates a special genius web worker.
*/
var workerBlob,
global = window;
/**
* The body of our custom Web Worker. It expects to receive messages
* in the form of JSON objects, each containing `label` and `msg`.
*
* `label` describes the kind of message the message is.
* `msg` holds the actual messag... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
var c = require('better-console')
var fs = require('fs')
var jf = require('jsonfile')
var path = require('path')
var yaml = require('js-yaml')
var REjson = /\.json$/i
var REyaml = /\.ya?ml$/i
/**
* Reads data from external JSON files
*
* @param {[type]} value [description]
* @return {object} data
*/
modul... |
__history = [{"date":"Fri, 12 Jul 2013 08:56:51 GMT","sloc":8,"lloc":8,"functions":1,"deliveredBugs":0.09650526669358983,"maintainability":83.46368220920098,"lintErrors":0,"difficulty":8}] |
'use strict';
//Reviews service used for communicating with the articles REST endpoints
angular.module('bars').factory('Reviews', ['$resource',
function($resource) {
var that = $resource('/bar/:barId/reviews/:reviewId', {
barId: '@barID',
reviewId: '@_id',
}, {
update: {
method: 'PUT'
}
})... |
process.env.NODE_PATH = `${__dirname}/aws/node_modules`;
require('module').Module._initPaths();
console.log("added NODE_PATH", process.env.NODE_PATH)
const redis = require("redis")
const redisEndPointData = require("./redis.lab");
const redisEndPoint = function() {
//console.log("redisEndPoint:", redisEndPointData)... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
/*
* @Author: xiongjie
* @Date: 2017-03-22 01:35:38
* @Last Modified time: 2017-03-23 11:58:27
*/
'use strict';
// import React from "react";
// import { render } from "react-dom";
import React from "react";
import { render } from "react-dom";
//入口文件,只渲染一个顶级组件和所需要的数据
import { BoardContainer } from "./BoardContain... |
// node modules
var app = require( 'electron' ).remote,
path = require( 'path' ),
_ = require( 'lodash' ),
ipcRenderer = require( 'electron' ).ipcRenderer,
moment = require( 'moment' ),
settings = require( 'electron-settings' ),
excel = require( './datasource-adapters/xls' ),
csv = require( './datasource... |
/**
* Database connector module<br>
* Implements ajax data fetching from Cache back-end
* @module DBConnector
*/
define(['MessageCenter', 'Mocks'], function (mc, mocks) {
"use strict";
/**
* @constructor
* @alias module:DBConnector
* @return {Object} Instance
*/
function DBConnector(... |
var db = require('mongo-start')('pages');
module.exports = function (req, res, next) {
var publishDate = new Date();
console.log(publishDate);
db.find({
publishOn: null
}, function (err, pages) {
console.log(pages);
if(!req.xmsData) {
req.xmsData = {};
}
... |
const expect = require('chai').expect
const authenticationHelper = require('../helpers/routes/authentication-helper')
const dataHelper = require('../helpers/data/aggregated-data-helper')
const workloadTypes = require('../../app/constants/workload-type')
let regionDefaultUrl
describe('region', function () {
describe... |
/**
* Function that returns default values.
* Used because Object.assign does a shallow instead of a deep copy.
* Using [].push will add to the base array, so a require will alter
* the base array output.
*/
'use strict';
const path = require('path');
const srcPath = path.join(__dirname, '/../src');
const dfltPor... |
import React from 'react';
import ReactDOM from 'react-dom';
import styles from '../scss/app.scss';
ReactDOM.render(
<div>
<h1>React, Redux & Webpack boilerplate</h1>
<div className="secondary">
Everything you need to build React Redux web application is here! <br />
This boilerplate include <a href="https... |
$(function(){if($('[data-toggle="tooltip"]').tooltip(),""!==window.location.search){var o=window.location.search.split("=")[1];if(void 0===o)return;o=parseInt(o),$("#doc-menu-detail li:eq("+o+") a").tab("show")}void 0!==$("img.lazyload").lazyload&&($("img.lazyload").lazyload({effect:"fadeIn"}),$(".lazyload-background")... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-au', {
toolbar: 'Source',
title: 'Source'
} );
|
'use strict';
// Declare app level module which depends on filters, and services
angular.module('PX2App', [
'PX2App.HoldingPatternCtrl',
])
|
describe( 'parse.js', function () {
var mi2 = mi2JS;
it('/ parse', function () {
var node = mi2.addTag(null, {tag:'DIV', attr:{as:'Base'}, html:'<b p="b1"></b>'});
var comp = mi2.parse(node);
expect(comp instanceof mi2).toBeTruthy();
expect(comp instanceof mi2.getComp('Base')).toBeTruthy();
expect(comp.... |
'use strict';
import CONSTANTS from './constants.js';
import canvas from './canvas.js';
export default class {
constructor(x, y) {
this.x = x;
this.y = y;
this.isWin = false;
this.hover = false;
this.state = CONSTANTS.EMPTY;
}
/**
* Get current stat of the cell
* @return {Number}
... |
import React, { useState } from "react"
import { Link } from "gatsby"
import SEO from "../../components/seo"
import { LogoIcon, WebIcon } from "../../components/icons"
const SurveyPage = () => {
const [showHow, updateHow] = useState(null)
return (
<div className="bg-grey-light font-sans px-8">
<SEO title="... |
var jwt = require('jsonwebtoken');
var bcrypt = require('bcrypt');
var uuid = require('uuid');
var data = require('./data.js');
function verifyToken(){
// decode token - in browser cookie
var decoded = jwt.verify(req.cookies.token, userInMemory.secondFactor);
console.log(decoded);
// check conte... |
// flow-typed signature: 8f87565e23ae89dfad398587a1b3de03
// flow-typed version: <<STUB>>/coveralls_v^2.11.15/flow_v0.52.0
/**
* This is an autogenerated libdef stub for:
*
* 'coveralls'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
... |
/*
AngularJS v1.3.0-beta.12
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(function(K,T,s){'use strict';function G(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.3.0-beta.12/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)... |
/* Global Vars */
var _base_url = window.location.href.split('#')[0];
var previousScroll = 0;
var _parameters;
var resLoad;
var resHashChange; |
/**
* Email service.
*/
var emailjs = require('emailjs');
var regexp = require('./regexp').account;
var settings = require('../settings');
var server = emailjs.server.connect(settings.email.server);
var sender = settings.email.sender;
var website = settings.title;
// Send email
exports.send = function (receiver, c... |
const hdb = require('hdb');
const appLog = require('../../lib/app-log');
const { formatSchemaQueryResults } = require('../utils');
const id = 'hdb';
const name = 'SAP HANA';
function getSchemaSql(schema) {
const whereSql = schema ? `WHERE tables.SCHEMA_NAME = '${schema}'` : '';
return `
SELECT
columns.... |
/* @license Copyright (c) 2011-2013 Brian Cavalier */
import marked from 'marked';
function markdown (options) {
return function(markdownText) {
marked.setOptions(options);
return marked(markdownText);
};
}
export default markdown; |
//=============================================================================
// 🏤drowsepost Plugins - Map Camera Controller
// DP_MapZoom.js
// Version: 0.87
//
// Copyright (c) 2016 - 2019 canotun
// Released under the MIT license.
// http://opensource.org/licenses/mit-license.php
//==============================... |
/**
* Created by Administrator on 2017/4/19 0019.
*/
var app = require('app');
app.registerController('LazyimgCtrl', LazyimgCtrl);
/*@ngInject*/
function LazyimgCtrl(Static) {
var vm = this;
vm.data = [1, 2, 3, 4, 5];
vm.collection = [];
vm.searchText = 1;
vm.changeImageUrl = changeImageUrl;
vm.change... |
'use strict'
const { ipcRenderer: comscan } = require('electron')
const React = require('react')
const v = require('v')
const GroupsSection = require('./groupsSection')
const RoutesSection = require('./routesSection')
module.exports = class Routes extends React.Component {
constructor (props) {
super(p... |
var gulp = require('gulp');
var config = require('../config/js');
var header = require('gulp-header');
var footer = require('gulp-footer');
var concat = require('gulp-concat');
var jshint = require('gulp-jshint');
var changed = require('gulp-changed');
var remember = require('gulp-remember');
gulp.task('js', funct... |
(function(){
function idx$(a,b){
return (b && b.indexOf) ? b.indexOf(a) : [].indexOf.call(a,b);
};
function iter$(a){ return a ? (a.toArray ? a.toArray() : a) : []; };
// helper for subclassing
function subclass$(obj,sup) {
for (var k in sup) {
if (sup.hasOwnProperty(k)) obj[k] = sup[k];
};
// obj.__s... |
// @flow
import styled from 'styled-components'
const ImageWrap = styled.div`
padding: 0;
margin: 0;
display: flex;
`
export default ImageWrap
|
'use strict';
// Articles controller
angular.module('articles').controller('ArticlesController', ['$scope', '$stateParams', '$location', '$rootScope', '$http', '$upload', 'Authentication', 'Articles', 'FileUpload',
function($scope, $stateParams, $location, $rootScope, $http, $upload, Authentication, Articles, FileUpl... |
(function() {
var config, winston;
config = require('./shuss-config');
winston = require('winston');
winston.resetConfig = function() {
if (config.get('verbose')) {
winston.remove(winston.transports.Console);
return winston.add(winston.transports.Console, {
level: 'debug',
col... |
import {Meteor} from 'meteor/meteor';
import {Accounts} from 'meteor/accounts-base';
export default() => {
Accounts.onCreateUser((options, user) => {
user.profile = options.profile ? options.profile : {};
return user;
});
};
|
//Handles roster callbacks etc
EmberXmpp.Roster = Ember.ArrayProxy.extend({
content: null, //Array of entities (friends)
init: function(){
this.set('content', Em.A());
},
/**
* @param {Array of XC.Entity} entites List of friends received.
*/
onRosterItems: function(entities){
... |
define([ "jquery", "public/assets/javascripts/lib/components/social_toolbar.js" ], function($, SocialToolbar) {
"use strict";
describe("SocialToolbar", function() {
var newUrl = "https://www.lonelyplanet.com/bar",
encodedNewUrl = encodeURIComponent(newUrl);
beforeEach(function() {
loadFixt... |
(function () {
"use strict";
function initFactory(apiContext) {
var apibase = "api/expense/";
function getExpense(barcode, isFromMain) {
return apiContext.get(apibase + "GetExpense?barcode=" + barcode + "&isFromMain=" + isFromMain);
}
function addExpense(expense) ... |
'use strict';
require('./lib'); |
module.exports = function (domain, range, angle) {
// Estimate translation along a line at the given angle.
//
// Parameters:
// domain
// array of points
// range
// array of points
// angle
// number, radians
//
// Return
// a transform
//
const N = Math.min(domain.leng... |
/**
* @class Oskari.lupapiste.bundle.myplaces2.ButtonHandler
*
* Handles the buttons for myplaces functionality
*/
Oskari.clazz.define("Oskari.lupapiste.bundle.myplaces2.ButtonHandler",
/**
* @method create called automatically on construction
* @static
*/
function (instance) {
this... |
// Generated by CoffeeScript 1.10.0
(function() {
var csonParser, stringify;
csonParser = require('cson-parser');
stringify = function(object) {
return csonParser.stringify(object, null, 2) + '\n';
};
module.exports = stringify;
}).call(this);
|
const fs = require("fs-extra");
const path = require("path");
const yaml = require("yaml");
const recursive = require("recursive-readdir");
const { success, pending, error } = require("signale");
const SRC = path.join(__dirname, "..", "src");
let server = fs.readFileSync(path.join(SRC, "server.ts")).toString();
const... |
var express = require('express')
, router = express.Router();
router.use('/users', require('./users'));
module.exports = router; |
import { mount } from '@vue/test-utils'
import { BBreadcrumbLink } from './breadcrumb-link'
describe('breadcrumb-link', () => {
it('has default classes and structure', async () => {
const wrapper = mount(BBreadcrumbLink)
expect(wrapper.element.tagName).toBe('A')
expect(wrapper.attributes('href')).toBeDe... |
require('dotenv').config({path: __dirname + '/.env'});
/**
* Contains API keys and tokens.
*
* NOTE: .env file must be inside the /config directory
*/
const twitter = {
consumer_key: process.env.TWITTER_CONSUMER_KEY,
consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
access_token_key: process.env.T... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getCertificateFromStoreInfo = exports.sign = undefined;
var _bluebirdLst;
function _load_bluebirdLst() {
return _bluebirdLst = require("bluebird-lst");
}
let sign = exports.sign = (() => {
var _ref = (0, (_bluebirdLst |... |
// @flow
import GroupsRoute from './GroupsRoute';
import { Route, Switch } from 'react-router-dom';
import PageNotFound from '../../pageNotFound';
import { UserContext } from 'app/routes/app/AppRoute';
const groupRoute = ({ match }: { match: { path: string } }) => (
<UserContext.Consumer>
{({ currentUser, logged... |
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var GameJam;
(function (GameJam) {
var Onion = (function (_super) {
__extends(Onion, _supe... |
/*
* Copyright (c) 2015 airbug Inc. All rights reserved.
*
* All software, both binary and source contained in this work is the exclusive property
* of airbug Inc. Modification, decompilation, disassembly, or any other means of discovering
* the source code of this software is prohibited. This work is protected un... |
import { init } from "marko/src/runtime/components/index.js";
import "./index.marko";
init(); |
(function($, window, document, undefined) {
var fRoll = {
currentStep: 0,
stepNumber: 4,
isAnimating: false,
BreadCrumbEl: $('#breadcrumb'),
StepsEl: $('#steps > li'),
initBreadCrumb: function(){
var b_width = this.BreadCrumbEl.width();
for(var i=0; i<this.stepNumber; i++){
var bullet = $('<span />'... |
// Generated by CoffeeScript 1.8.0
var argv, consul, fs, http, mkdirp, path, usage;
usage = "\nUsage: consul-backup [consul http address]\n\n Copy the contents of consul's key value store into files and folders\n";
argv = process.argv.slice(2);
if (argv.length !== 1) {
console.error(usage);
process.exit(1);
}
... |
var request = require('request'),
fs = require('fs'),
parseArgs = require('minimist');
var THREADLOCATION = 'http://a.4cdn.org/' + board + '/thread/' + threadId + '.json';
var IMAGELOCATION = 'http://i.4cdn.org/' + board + '/';
var IMAGEDIRECTORY = 'images';
var IMAGESAVEPATH = IMAGEDIRECTORY + '/' + board + '/' + t... |
// Include package
var graph = require('./webgraph/index.js');
// configuration
var options = {};
options.token = 'b34ef56jil001'; // Your Webgraph API token.
options.url = "http://www.booksinbelgium.be/"; // The url to scrape
options.endpoint = "http://webgra.ph/v1/web"; // The endpoint
/* Execute */
graph.parse(op... |
import Util from '../../core/util.js';
export class Zoom extends Util {
constructor(SL, config) {
super(SL, config);
this.name = 'Zoom';
this.eventHandlers = {};
this.initialized = true;
this.configure();
}
configure(config) {
config = super.configure(config);
if (!config.scale) {
... |
/*jslint node: true */
"use strict";
var mongoose = require('mongoose');
var jwt = require('jsonwebtoken');
var config = require('../config');
var logger = config.logger;
var User = require('../models/user');
exports.login = function(req, res) {
logger.info('Auth.login called ', req.body, req.connect... |
/**
* @since 2021-06-26
* @author vivaxy
*/
import { useRef, useEffect } from 'react';
import * as EDIT_TYPES from '../../enums/edit-types';
import * as Y_DOC_KEYS from '../../enums/y-doc-keys';
import './Editor.css';
function getDiffStart(prev, cur, cursorPos) {
const max = Math.min(
Math.max(prev.length - 1... |
var Promise, React, request;
React = require('react/addons');
Promise = require('bluebird');
request = require('request');
module.exports = React.createClass({
render: function() {
return React.createElement("div", null, this.props.error);
}
});
|
'use strict'
module.exports = function($, tab, testElem, time) {
let browser = $
$
//tab
.click('.nav-tabs a[href="' + tab + '"]')
.waitForElementVisible(testElem, time || 500)
}
|
var path = require('path'),
webpack = require('webpack');
module.exports = {
cache: true,
debug: true,
devtool: '#cheap-module-eval-source-map',
entry: [
path.resolve(__dirname, 'src/bix')
],
eslint: {
configFile: './.eslintrc',
emitError: true,
failOnError: true,
failOnWarning:... |
/*
* Jquery Quickedit 中文叫快速修改插件
* 使用例子:
* $('.table a').quickEdit({
* blur: false,
* checkold: true,
* space: false,
* maxLength: 50,
* showbtn: false,
* submit: function (dom, newValue) {
* dom.text(newValue);
* }
* });
*/
(function ($) {
$.quickEdit = {
defaults: {
pre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.