code stringlengths 2 1.05M |
|---|
const exec = require('child_process').exec;
const ver = require('../package.json').version;
let hash;
module.exports.init = function (b) {
exec('git rev-parse HEAD', (error, stdout, stderr) => {
if (error != null) {
hash = null;
console.err("git's broken yo");
}
hash = stdout;
});
};
mod... |
/*!
Tiny table
*/
var TINY = {};
function T$(i) {
return document.getElementById(i);
}
function T$$(e, p) {
return p.getElementsByTagName(e);
}
TINY.table = function() {
function sorter(n, t, p) {
this.n = n;
this.id = t;
this.p = p;
if (this.p.init) {
thi... |
(function () {
function getQueryVariable(variable) {
var query = window.location.search.substring(1),
vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] === variable) {
return pair[1];
}
}
}
function getPreview(query, content, previewL... |
define([
"./core",
"./core/access",
"./var/document",
"./var/documentElement",
"./css/var/rnumnonpx",
"./css/curCSS",
"./css/addGetHookIf",
"./css/support",
"./core/init",
"./css",
"./selector" // contains
], function( jQuery, access, document, documentElement, rnumnonpx, curCSS, addGetHookIf, support ) {
... |
import UnitConverter from '../../../UnitConverter'
import { Fraction, mul, div } from '../../../../numbers'
import { Mass } from '../../domains'
import { UnitedStates } from '../../authorities'
import { OunceConverter } from '../../us/customary/mass'
import { ChickenEggs } from '../../systems'
import { Jumbo, VeryLarg... |
'use strict';
var path = require('path');
var generators = require('yeoman-generator');
var yaml = require('js-yaml');
var _ = require('lodash');
var chalk = require('chalk');
var GitHub = require('github');
module.exports = generators.Base.extend({
_logHeading: function (msg) {
this.log("\n");
t... |
class MetaFloorController extends MRM.MetaBaseWallController{
constructor(dom){
super(dom);
this.dom = dom;
this.metaObject = this.createMetaObject()
this.metaVerse = null;
this.setupComponent();
this.updateMetaObject();
}
get metaAttachedActions(){
return {
attachMetaObject: t... |
import 'isomorphic-fetch'
import base64 from 'base-64'
import utf8 from 'utf8'
import Request from './Request'
function encodeAccount(username, password) {
let bytes = utf8.encode(`${ username }:${ password }`)
return base64.encode(bytes)
}
export default class Stormpath {
constructor({ application, authenticat... |
/* global Fae, SimpleMDE, toolbarBuiltInButtons */
/**
* Fae form text
* @namespace form.text
* @memberof form
*/
Fae.form.text = {
init: function() {
this.overrideMarkdownDefaults();
this.initMarkdown();
},
/**
* Override SimpleMDE's preference for font-awesome icons and use a modal for the gui... |
'use babel';
// eslint-disable-next-line
import { CompositeDisposable, TextEditor, Directory } from 'atom';
import config from './config';
import Creator from './Creator';
import Insertor from './Insertor';
class DavsPackage {
constructor() {
this.reactReduxUtilsView = null;
this.modalPanel = null;
thi... |
import React from 'react';
import PropTypes from 'prop-types';
import Text from '../Text/Text';
import { Styled } from './CalloutGroupItem.styles';
const CalloutGroupItem = ({ text, imgSrc, imgAlt, emoji }) => {
return (
<>
{!imgSrc ? (
!emoji ? (
<Text>{text}</Text>
) : (
<Text>
<Styled.... |
// Render home page and json data
exports.view = function(req, res){
// Import json data
var logData = require("../data/log.json");
// Set ateFoodGroup to numerical values
var ateGrains;
if(req.body.ateGrains == null){ateGrains = 0;}
else ateGrains = 1;
var ateFruit;
if(req.body.ateFruit == null){ateFruit ... |
var expect = require('expect.js');
var Promise = require('bluebird');
var ZugZug = require('../lib/zugzug');
var Job = require('../lib/job');
describe('job.delete():Promise(self)', function() {
var zz, job;
beforeEach(function() {
zz = new ZugZug();
job = new Job(zz, 'default');
});
afterEach(function(... |
'use strict';
module.exports = {
app: {
title: 'Surf Around The Corner',
description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js',
keywords: 'MongoDB, Express, AngularJS, Node.js'
},
port: process.env.PORT || 3000,
templateEngine: 'swig',
sessionSecret: 'MEAN',
sessionCollection: ... |
// anonymous closure - BEGIN
(function(jQuery){
// anonymous closure - BEGIN
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// include microevent.js //
/////////////////////////////////////////... |
"use strict";
var assert = require("assert");
var stringmap = require("stringmap");
var stringset = require("stringset");
var is = require("simple-is");
var fmt = require("simple-fmt");
var error = require("./error");
var UUID = 1;
function Scope(args) {
assert(is.someof(args.kind, ["hoist", "block",... |
"use strict";var assert;module.watch(require('assert'),{default(v){assert=v}},0);var unhexArray;module.watch(require('./testutil'),{unhexArray(v){unhexArray=v}},1);var table;module.watch(require('../src/table'),{default(v){table=v}},2);
describe('table.js', function() {
it('should make a ScriptList table', funct... |
/*jshint node:true */
module.exports = function( grunt ) {
"use strict";
var entryFiles = grunt.file.expandFiles( "entries/*.xml" );
grunt.loadNpmTasks( "grunt-clean" );
grunt.loadNpmTasks( "grunt-wordpress" );
grunt.loadNpmTasks( "grunt-jquery-content" );
grunt.loadNpmTasks( "grunt-check-modules" );
grunt.initConf... |
var searchData=
[
['slot_5fcount',['SLOT_COUNT',['../classmastermind_1_1_mastermind.html#ad4cfc8127641ff8dfe89d65ae232331c',1,'mastermind::Mastermind']]]
];
|
(function() {
var AS = this, Fn = AS.Fn;
// assign
$.extend(Fn, {
execConvPrint: execConvPrint
});
return;
function execConvPrint() {
var b_FPR = AS.Bo.FPR;
var fn = null;
try {
if(b_FPR.Value('convfn') == "function(i, f, a){\n}")
throw Error('Function is not modified');
... |
const gulp = require('gulp');
const spawn = require('../lib/spawn');
const config = require('../config');
gulp.task('webpack', (callback) => {
if (config.context === 'production') {
process.env.NODE_ENV = 'production';
}
process.env.WEBPACK_CONTEXT = config.context;
const options = [];
... |
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP AG or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
jQuery.sap.declare("sap.m.BusyDialogRenderer");sap.m.BusyDialogRenderer={};
sap.m.BusyDialogRenderer.render=function(r,c){... |
'use strict';
/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */
var Holodeck = require('../../../holodeck'); /* jshint ignore:line */
var Request = require(
'../../../../../lib/http/request'); /* ... |
module.exports = {
attributes: {
group: {
model: 'Group'
},
user: {
model: 'User'
},
synchronized: 'boolean',
active: 'boolean',
child_group: {
model: 'Group'
},
level: 'integer'
},
migrate: 'safe',
... |
var Type = require("@kaoscript/runtime").Type;
module.exports = function() {
let tt = foo();
if(!Type.isValue(tt)) {
tt = bar;
}
}; |
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var TaskSchema = new Schema({
name: String,
description: String,
point: Number,
task_users: [{ type: Schema.Types.ObjectId, ref: "TaskUser"}],
_week: { type: Schema.Types.ObjectId, ref: "Week"}
});
module.exports = mongoose.mod... |
const path = require("path");
const Nightmare = require("nightmare");
const { EncryptionAlgorithm, createAdapter } = require("../../dist/index.node.js");
const TEXT = "Hi there!\nThis is some test text.\n\të ";
const sandboxURL = `file://${path.resolve(__dirname, "./sandbox.html")}`;
const nightmare = Nightmare({
... |
'use strict';
// prePublish gets run on 'npm install' (e.g. even if you aren't actually publishing)
// so we have to check to make sure that we are in our own directory and this isn't
// some poor user trying to install our package.
var path = require('path');
var fs = require('fs');
var rootDirectory = path.join(__dir... |
import React, { Component } from 'react';
import classnames from 'classnames';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import LinearProgress from 'material-ui/LinearProgress';
import history from '../../core/history';
import Link from '../../components/Link/Link';
import Image from '../../compo... |
version https://git-lfs.github.com/spec/v1
oid sha256:32728342485677be1fe240941c1404f53f367f741f7980cf29ae5c77e3f66a16
size 558
|
var Accumulator, errorTypes, isConstructor, isType, isValidator, throwFailedValidator, throwFailure, throwInvalidType;
throwFailure = require("failure").throwFailure;
Accumulator = require("accumulator");
isConstructor = require("./isConstructor");
isValidator = require("./isValidator");
errorTypes = require("../e... |
import SyncClient from 'sync-client';
const versions = [{
version: 1,
stores: {
bookmarks: 'id, parentID',
folders: 'id, parentID',
},
}, {
version: 2,
stores: {
bookmarks: 'id, parentID, *tags',
folders: 'id, parentID',
tags: 'id',
},
}];
export default new SyncClient('BookmarksManage... |
'use strict';
angular.module('meanDemoApp')
.config(function ($stateProvider) {
$stateProvider
.state('main', {
url: '/',
templateUrl: 'app/main/main.html',
controller: 'MainCtrl'
});
}); |
const _parseHash = function (hash) {
let name = '';
let urlType = '';
let hashParts = hash.split('_');
if (hashParts && hashParts.length === 2) {
name = hashParts[1];
let type = hashParts[0];
// take off the "#"
let finalType = type.slice(1, type.length);
switch (finalType) {
case 'met... |
/**
* An ES6 screeps game engine.
*
* An attempt to conquer screeps, the first MMO strategy sandbox
* game for programmers!
*
* @author Geert Hauwaerts <[email protected]>
* @copyright Copyright (c) Geert Hauwaerts
* @license MIT License
*/
/**
* Cache for static function results.
*/
export default cl... |
'use strict';
var conf = require('../config');
var ctrlBuilder = require('../controllers/face-controller');
var version = conf.get('version');
var base_route = conf.get('baseurlpath');
var face_route = base_route + '/face';
module.exports = function (server, models, redis) {
var controller = ctrlBuilder(server,... |
var chai = require('chai');
chai.use(require('chai-fs'));
var expect = chai.expect
var execute = require('../');
describe('execute', function() {
it('should exist', function() {
expect(execute).to.exist;
});
it('should return a promise', function() {
expect(execute().then).to.exist;
});
it('should... |
/*
* catberry-homepage
*
* Copyright (c) 2015 Denis Rechkunov and project contributors.
*
* catberry-homepage's license follows:
*
* 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 wit... |
import util from './util'
import LatLngBounds from './latlngbounds'
const {abs, max, min, PI, sin, cos, acos} = Math
const rad = PI / 180
// distance between two geographical points using spherical law of cosines approximation
function distance (latlng1, latlng2) {
const lat1 = latlng1.lat * rad
const lat2 = latl... |
import React from 'react'
const EditableText = React.createClass({
propTypes: {
onSubmit: React.PropTypes.func.isRequired,
validator: React.PropTypes.func,
enableEditing: React.PropTypes.bool,
value: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.number,
])
},
... |
(function () {
"use strict";
//angular.module('app', ['angularUtils.directives.dirPagination']);
var env = {};
if (window) {
Object.assign(env, window.__env);
}
var app = angular.module("deviceManagement",
['angularUtils.directives.dirPagination',
'comm... |
/**
* Created by zad on 17/4/20.
*/
/** to left shift an Array
* @param {Array} arr
* @param {Number} num
* @return {Array}
*/
function leftShift(arr, num) {
const result = arr.concat();
if (num < 0) {
return rightShift(arr, -num);
}
while (num > 0) {
result.push(result.shift());
num--;
}
... |
/* eslint-env node */
'use strict';
module.exports = {
'cowsay': require('./cowsay')
};
|
import Component from '@ember/component';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import { isEmpty } from '@ember/utils';
import { all } from 'rsvp';
import { task, timeout } from 'ember-concurrency';
import { validator, buildValidations } from 'ember-cp-validations... |
module.exports = {
Server: app => ({
app,
listen: jest.fn(),
}),
};
|
/*
* Responsive Slideshow - jQuery plugin
*
* Copyright (c) 2010-2012 Roland Baldovino
*
* Project home:
* https://github.com/junebaldovino/jquery.resss.plugin
*
* Version: 0.1
*
*/
(function($){
var _this,settings;
var methods = {
init : function( options ) {
return this.each(function(){
setti... |
/* global bp, noEvents, emptySet */
/*
* This little app adds bthreads dynamically.
*/
bp.log.info("Program Loaded");
// Define the events.
var kidADone = bp.Event("kidADone");
var kidBDone = bp.Event("kidBDone");
var parentDone = bp.Event("parentDone");
bp.registerBThread("parentBThread", function () {
... |
//configure requirejs
var requirejs = require('requirejs');
requirejs.config({ baseUrl: __dirname + '/../javascripts', nodeRequire: require });
//turn off rendering for commandline unit tests
var global = requirejs('global');
global.RENDER = false;
//export requirejs
module.exports = {
require: requirejs
}; |
"use strict"
/**
* Construct URL for Magento Admin.
*
* @param {string} path path to Magento page (absolute path started with '/', alias - w/o)
*/
var result = function getUrl(path) {
/* shortcuts for globals */
var casper = global.casper;
var mobi = global.mobi;
var root = mobi.opts.navig.mage;
... |
"use strict";
var EventEmitter = require('events').EventEmitter;
var util = require( './util' );
/**
* Single user on the server.
*/
var User = function(data, client) {
this.client = client;
this._applyProperties(data);
};
User.prototype = Object.create(EventEmitter.prototype);
/**
* @summary Moves the ... |
"use strict";
module.exports = function (context) {
return context.data.root.query.name + context.data.root.query.suffix;
};
|
/**
* @author mrdoob / http://mrdoob.com/
*/
var Config = function () {
var namespace = 'threejs-inspector';
var storage = {
'selectionBoxEnabled': false,
'rafEnabled' : false,
'rafFps' : 30,
}
if ( window.localStorage[ namespace ] === undefined ) {
window.localStorage[ namespace ] = JSON.stringify( ... |
var _ = require("underscore");
var util = require("util");
exports.show = function (req, res) {
var async = require('async');
if (!req.session.screen) {
req.session.messages = { errors: ['screen not found'] };
res.redirect('/');
return;
}
var Handlebars = require('../hbs_helpers/hbs_helpers.js');
... |
var db=require('./dbDatabase');
var mysql=require('mysql');
var connect_pool=mysql.createPool(db.options);
connect_pool.connectionLimit=100; //准备好20个链接
connect_pool.queueLimit=100; //最大链接数
function getConnection(callback){
connect_pool.getConnection(function(err,client){
if(err){
console.log... |
angular.module('factoria', ['firebase'])
.factory('fireService', ['$firebaseArray', function($firebaseArray){
var firebaseRef= "";
var setFirebaseSource = function(url){
firebaseRef= new Firebase(url);
};
var getFirebaseRoot = function(){
return firebaseRef;
};
var addData = fu... |
//A container for data pertaining to the local card game state. Defines the decks stored locally as well as the local player data.
class CardSystem {
constructor() {
this.deck = [random_deck()]; //Plan on having multiple decks available
this.player = new Player();
this.player.deck = this.dec... |
const path = require('path');
const wmd = require('wmd');
const {getFile} = require('./importHelpers');
const createContextForList = (folderContents) => {
let promises = [];
return new Promise((resolve, reject) => {
for (let file in folderContents) {
let promise = getFile(folderContents[file].path);
... |
class AchievementEvt {
constructor(subType, payload) {
this.type = 'achievements';
this.subType = subType;
this.payload = payload;
}
};
/**
* generate PageVisitEvt
* @param {string}
* @returns {AchievementEvt}
*/
export class PageVisitEvt extends AchievementEvt {
constructor(pag... |
function InputHandler(viewport) {
var self = this;
self.pressedKeys = {};
self.mouseX = 0;
self.mouseY = 0;
self.mouseDownX = 0;
self.mouseDownY = 0;
self.mouseMoved = false;
self.mouseDown = false;
self.mouseButton = 0; // 1 = left | 2 = middle | 3 = right
self.viewport = viewp... |
// Generated by CoffeeScript 1.9.1
(function() {
var bcv_parser, bcv_passage, bcv_utils, root,
hasProp = {}.hasOwnProperty;
root = this;
bcv_parser = (function() {
bcv_parser.prototype.s = "";
bcv_parser.prototype.entities = [];
bcv_parser.prototype.passage = null;
bcv_parser.prototype.re... |
const config = require('../../../knexfile').intweb
const knex = require('knex')(config)
const dateFormatter = require('../date-formatter')
const insertClaimEvent = require('./insert-claim-event')
const claimEventEnum = require('../../constants/claim-event-enum')
module.exports = function (claimId, isTrusted, untrusted... |
import Ember from 'ember';
import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin';
import config from 'ilios/config/environment';
const { inject } = Ember;
const { service } = inject;
export default Ember.Route.extend(ApplicationRouteMixin, {
flashMessages: service(),
commonAjax: ser... |
var map = [
[0x1, 0x8],
[0x2, 0x10],
[0x4, 0x20],
[0x40, 0x80]
]
function Canvas(width, height) {
if(width%2 != 0) {
throw new Error('Width must be multiple of 2!');
}
if(height%4 != 0) {
throw new Error('Height must be multiple of 4!');
}
this.width = width;
this.height = height;
this.co... |
/**
* Test for fur bin.
* Runs with mocha.
*/
'use strict'
const assert = require('assert')
const fs = require('fs')
const furBin = require.resolve('../bin/fur')
const execcli = require('execcli')
const mkdirp = require('mkdirp')
let tmpDir = __dirname + '/../tmp'
describe('bin', function () {
this.timeout(24... |
Router.map(function(){
this.route('home',{
path:'/',
template: 'home',
onBeforeAction: function(pause){
this.subscribe('getAlgosByReg',Session.get('mainQuery')).wait();
this.subscribe('getAlgosByName',Session.get('mainQuery')).wait();
this.subscribe('getAlgosByKeyWord',Session.get('mainQuery')).wait();
... |
/**
* Imports
*/
var path = require('path');
var fs = require('fs');
var _ = require('lodash');
/**
* BaseDbContext class
* @param {Object} options
*/
var BaseDbContext = module.exports = function(options) {
options || (options = {});
this.entities = {};
this._loadModels();
this.initialize.a... |
import React, {Component} from "react";
import { addAnimationId } from './modules/animationFunctions.js'
import '../scss/dev-projects.css';
import close from "../assets/close.png";
export default class DevProjects extends Component {
componentDidMount() { addAnimationId('dev-projects', 'dev-section-fadein') }
re... |
import React, { PropTypes } from 'react';
import Spinner from './Spinner';
const ModalOverlay = (props) => {
const isActive = props.active ? 'active' : '';
const spinner = props.spinner ? <Spinner /> : '';
return (
<div id="modal-overlay" className={isActive}>
{spinner}
</div>
);
};
ModalOver... |
version https://git-lfs.github.com/spec/v1
oid sha256:1371b661d4ebad753ee72a0b75d51aca5ca885cbb51d046e634951057b5314f6
size 144
|
function tabCtrl(id) {
var element = document.querySelectorAll('[data-selector="tabbar/tab"]');
for (var i = 0; i < element.length; i++) {
if (element[i].dataset.id === id) {
element[i].classList.add('tabbar__tab__active');
} else {
element[i].classList.remove('tabbar__tab__active');
}
}
}
function ta... |
import core from 'comindware/core';
import CanvasView from 'demoPage/views/CanvasView';
export default function() {
const model = new Backbone.Model({
referenceValue: {
id: 'test.1',
text: 'Test Reference 1'
}
});
return new CanvasView({
view: ... |
'use strict';
// Use local.env.js for environment variables that grunt will set when the server starts locally.
// Use for your api keys, secrets, etc. This file should not be tracked by git.
//
// You will need to set these on the server you deploy to.
module.exports = {
DOMAIN: 'http://localhost:9000',
... |
/*
Copyright 2013, KISSY UI Library v1.30
MIT Licensed
build time: Jul 1 20:13
*/
var KISSY=function(a){var b=this,i,k=0;i={__BUILD_TIME:"20130701201313",Env:{host:b,nodejs:"function"==typeof require&&"object"==typeof exports},Config:{debug:"",fns:{}},version:"1.30",config:function(b,j){var l,e,f=this,d,h=i.Config... |
import { template, traverse, types as t } from "@babel/core";
import { environmentVisitor } from "@babel/helper-replace-supers";
const findBareSupers = traverse.visitors.merge([
{
Super(path) {
const { node, parentPath } = path;
if (parentPath.isCallExpression({ callee: node })) {
this.push(p... |
import React from "react"
import Presentation from "./Presentation"
import Icon from 'material-ui/Icon'
import IconButton from 'material-ui/IconButton'
import Grid from 'material-ui/Grid'
import Typography from 'material-ui/Typography'
import { colors } from "../themes/coinium"
require("../themes/coinium/index.css")
c... |
/**
* 在球场
* zaiqiuchang.com
*/
const initialState = {
users: {},
posts: {},
courts: {},
files: {},
userStats: {},
postStats: {},
courtStats: {},
fileStats: {}
}
export default (state = initialState, action) => {
if (action.type === 'CACHE_OBJECTS') {
let newState = Object.assign({}, state)
... |
// ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
// Use a prefilter if available (1.5+)
if ($.ajaxPrefilter) {
$.ajaxPrefilter... |
module.exports = { prefix: 'fal', iconName: 'trademark', icon: [640, 512, [], "f25c", "M121.564 134.98H23.876c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h240.249c6.627 0 12 5.373 12 12v14.98c0 6.627-5.373 12-12 12h-97.688V404c0 6.627-5.373 12-12 12h-20.873c-6.627 0-12-5.373-12-12V134.98zM352.474 96h28.124a12 12 ... |
export const FETCH_MESSAGES_REQUEST = 'FETCH_MESSAGES_REQUEST';
export const FETCH_MESSAGES_SUCCESS = 'FETCH_MESSAGES_SUCCESS';
export const FETCH_MESSAGES_ERROR = 'FETCH_MESSAGES_ERROR';
export const CREATE_MESSAGE_REQUEST = 'CREATE_MESSAGE_REQUEST';
export const CREATE_MESSAGE_SUCCESS = 'CREATE_MESSAGE_SUCCESS... |
(function(){
if ( !window.File || !window.FileReader || !window.FileList || !window.Blob)
return alert('La API de Archivos no es compatible con tu navegador. Considera actualizarlo.');
var Fractal = {
loaded: false,
imagen: null,
tipo: "mandelbrot",
busy: false,
mode: 0,
lastTime: 0,
prope... |
var Model = require('./beer');
var Controller = {
create: function(req, res) {
var dados = req.body;
var model = new Model(dados);
model.save(function (err, data) {
if (err){
console.log('Erro: ', err);
res.json('Erro: ' + err);
}
else{
console.log('Cerveja ... |
(function() {
// numeral.js locale configuration
// locale : Latvian (lv)
// author : Lauris Bukšis-Haberkorns : https://github.com/Lafriks
return {
delimiters: {
thousands: String.fromCharCode(160),
decimal: ','
},
abbreviations: {
thousand: ... |
module.exports = {
out: "./docs/",
readme: "README.md",
name: "Persian Tools",
includes: "./src",
entryPoints: ["./src/index.ts"],
exclude: ["**/test/**/*", "**/*.js", "**/dist/**/*", "**/src/dummy/**"],
excludeExternals: true,
includeVersion: true,
excludePrivate: false,
};
|
'use strict';
/**
* Confirm new player name
*/
module.exports = (srcPath) => {
const EventUtil = require(srcPath + 'EventUtil');
return {
event: state => (socket, args) => {
const say = EventUtil.genSay(socket);
const write = EventUtil.genWrite(socket);
write(`<bold>${args.name} doesn't e... |
import React, {Component} from 'react';
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {initialPlay, nextTrack, togglePlaying} from 'redux/modules/player';
import {starTrack, unstarTrack} from 'redux/modules/starred';
import {isTrackStarred} from 'utils/track';
const classNames = ... |
/**
* @fileoverview Rule to enforce grouped require statements for Node.JS
* @author Raphael Pigulla
* @deprecated in ESLint v7.0.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//---------------------------------------------------------------... |
import IntersectionObserverPolyfill from './resources/IntersectionObserverPolyfill';
import IntersectionObserverEntryPolyfill from './resources/IntersectionObserverEntryPolyfill';
export {
IntersectionObserverEntryPolyfill,
IntersectionObserverPolyfill,
}; |
(function() {
var bcv_parser, bcv_passage, bcv_utils, root,
hasProp = {}.hasOwnProperty;
root = this;
bcv_parser = (function() {
bcv_parser.prototype.s = "";
bcv_parser.prototype.entities = [];
bcv_parser.prototype.passage = null;
bcv_parser.prototype.regexps = {};
bcv_parser.prototy... |
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const PATHS = {
SRC: path.join(__dirname, 'src')
};
const webpackConfig = {
entry: ['./src/index.jsx'],
plugins: [new ExtractTextPlugin('style.css')],
devtool: 'source-map',
node: {
fs: 'empty'
},
output:... |
var ctx,canvasWidth,canvasHeight;
var img_pyr;
var img_ryp;
var lowpass1, lowpass2;
function demo_app(videoWidth, videoHeight) {
savnac.width = canvas.width = videoWidth
savnac.height = canvas.height = videoHeight
vidWidth = videoWidth
vidHeight = videoHeight
// canvasWidth = canvas.width;
... |
import { curry, range, always } from 'ramda'
const FALSE = always(false)
export const makeGrid = curry((cell, size) => {
const r = range(0, size)
return r.map((y) => r.map((x) => cell(y, x)))
})
export const makeBlankGrid = makeGrid(FALSE)
|
'use strict';
const resultsStorage = require('../lib/core/resultsStorage');
const moment = require('moment');
const expect = require('chai').expect;
const timestamp = moment();
const timestampString = timestamp.format('YYYY-MM-DD-HH-mm-ss');
function createResultUrls(url, outputFolder, resultBaseURL) {
return resu... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
container_interval_id = 0;
password_interval_id = 0;
distro_image = 'ubuntu.svg';
// Shows a message
// Leave text empty to hide message
// error is a boolean deciding whether or not to add an error class
function message(text, error) {
var message = document.getElementById('message');
message.innerHT... |
import test from 'ava';
import Nightmare from 'nightmare';
const nightmare = new Nightmare({
show: process.env.SHOW
});
test('food', async t => {
await nightmare
.goto('http://localhost:3333');
const visible = await nightmare
.click('#food')
.wait(500)
.visible('[class*=_box_]');
t.true(visib... |
/**
* Created by faspert on 28.04.2015.
*/
'use strict';
angular.module('gardenApp')
.directive('gvDygraph', function () {
return {
restrict: 'EAC', //E = element, A = attribute, C = class, M = comment
scope: true , //use parent's scope
//replace: 'true', ... |
'use strict';
//Setting up route
angular.module('mean.system').config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
// For unmatched routes:
$urlRouterProvider.otherwise('/');
// states for my app
$stateProvider
... |
module.exports = {
extends: ["standard", "standard-react"],
env: {
browser: true,
es6: true
},
globals: {
graphql: true
},
plugins: ["class-property"],
parser: "babel-eslint",
rules: {
indent: ["off"],
"no-unused-vars": [
"error",
{
varsIgnorePattern: "React"
... |
Rc4Random = function(seed)
{
var keySchedule = [];
var keySchedule_i = 0;
var keySchedule_j = 0;
function init(seed) {
for (var i = 0; i < 256; i++) {
keySchedule[i] = i;
}
var j = 0;
for (var i = 0; i < 256; i++) {
j = (j + keySchedu... |
const TelegramBot = require('node-telegram-bot-api');
const EnchancedTelegramTest = require('./EnhancedTelegramTest');
const { track, trackInline } = require('../src/analytics');
const { initHandlers } = require('../src/handlers');
function createBot() {
return new TelegramBot('0123456789abcdef', { webhook: true });... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.