code stringlengths 2 1.05M |
|---|
(function() {
// Inheritence Key:
// InteractiveMeter.js > Path.js > Base.js
var InteractiveMeter = function (source, min, max) {
// Path manager deals with JSON
JHVH.Path.call(this, source);
this.off_color = source.off_color;
this.min = min || 0;
this.max = max || 1000;
// flag for blocking inp... |
angular.module('firebaseService', [
'firebase'
])
// a simple utility to create references to Firebase paths
.factory('firebaseRef', function(Firebase, FBURL) {
function pathRef(args) {
for(var i=0; i < args.length; i++) {
if( typeof(args[i]) === 'object' ) {
args[i] = pathRef(args[i]);
}
... |
'use strict';
var xhrRequest = function (url, type, key, callback) {
var xhr = new XMLHttpRequest();
xhr.onload = function () {
callback(this.status, this.responseText);
};
xhr.open(type, url);
xhr.setRequestHeader('WEB-API-Key', key);
xhr.send();
}
// http://gis.stackexchange.com/ques... |
/*global Codes, parseInt, Math, List, module*/
/* This object contains javascript global functions used in this project */
var Utils = {
parseInt: function (string) {
"use strict";
return (parseInt(string, Codes.DECIMAL_SYSTEM));
},
random: function () {
"use strict";
retur... |
'use strict';
/**
* Das Modul fuer den Mensa-Zugriff.
*/
var canteen = angular.module('Canteen', []);
/**
* Kapselung des Zugriffs in Form eines Dienstes.
* Noch einfacher klappt der Zugriff auf eine REST-Schnittstelle
* in vielen Faellen mit dem Modul ngResource.
*/
canteen.factory('CanteenService', [ '$http',... |
import React, { Component } from 'react';
export default class ResetButton extends Component {
render () {
return (
<button onClick={this.props.onClick}>Reset</button>
);
}
}
|
class microsoft_mediacenter_glidhost_glidloaderwrapper_1 {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object... |
const window = global;
global.window = window;
window.navigator = {};
|
var keyWords = [
"Collection","Debug","Print","Input","Error","Lock","Unlock","Line Input","Call","Erase","Put","Get","Empty","Step","Wend","While","Until","Let","Null","Each","To","True","False","Like","Is","Mod","Imp","Eqv","On Error","Set","Nothing","Declare","Lib","ByVal","ByRef","Dim","ReDim","Preserve","Const"... |
'use strict';
// Google Analytics Collection APIs Reference:
// https://developers.google.com/analytics/devguides/collection/analyticsjs/
angular.module('app.controllers',[])
// Path: /
.controller('HomeController', ['$scope', '$location', '$window', function ($scope, $location, $window) {
$scope.$r... |
import { defaultSlackArchivePath } from '../util/globalPaths';
import { makePath } from '../util/paths';
import { getMessagesFromDailyArchive } from '../util/loadArchives';
import { setMessages } from '../actions/index';
export const loadMessagesForGroup = (store, messageGroupName) => {
if (messageGroupName === '') {... |
import React from 'react'
import { request } from 'utils'
import { apiPrefix } from 'utils/config'
import { Row, Col, Select, Form, Input, Button, List, Tag, Checkbox } from 'antd'
import classnames from 'classnames'
import { CloseOutlined } from '@ant-design/icons'
import { Trans } from "@lingui/macro"
import api from... |
$(document).ready( function ()
{
$('#table_cust').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": false,
"responsive": true,
"autoWidth": false,
"pageLength": 10,
"ajax": {
"url": ... |
$(function () {
/**
* PARTICIPATION: Participation details
*/
var paymentManagementModal = $('#dialogPriceConfiguration'),
toPayTableEl = $('#dialogPriceConfiguration #payment tbody'),
toPayFooterTableEl = $('#dialogPriceConfiguration #payment tfoot'),
priceTagTableEl = $('#di... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S12.10_A3.6_T2;
* @section: 12.10;
* @assertion: No matter how control leaves the embedded 'Statement',
* the scope chain is always restored to its former state;
... |
let mongoose = require('mongoose');
let Schema = mongoose.Schema;
let datumSchema = new Schema({
tableId : Number,
rawVal : Number,
delta : Number,
timestamp : Number
}, {collection : 'pong'});
module.exports = mongoose.model('Datum', datumSchema); |
KISSY.add('mux.bcharts/charts/js/pub/views/infos/other',function(S,Base,node,Global,SVGElement,SVGGraphics,Light){
function Other(){
var self = this
Other.superclass.constructor.apply(self,arguments);
}
Other.ATTRS = {
element:{
value:null
},
os:{
value:[]
}
}
S.extend(Other,Base,{
init... |
(function() {
'use strict';
var CONFIG = {};
var LAST_COUNTS;
function buildConfig() {
return new Promise((resolve, reject) => {
var defaultConfig = {
whmcsUrl: '',
monitorOrders: true,
monitorTickets: true,
showNotifications: true
};
// Populate the init... |
'use strict';
var run = function() {
// Replace '../bitcore' with 'bitcore' if you use this code elsewhere.
var bitcore = require('../bitcore');
var RpcClient = bitcore.RpcClient;
var hash = '0000000000b6288775bbd326bedf324ca8717a15191da58391535408205aada4';
var config = {
protocol: 'http',
user: 'u... |
'use strict';
const util = require('util');
function sendResponse(ctx, statusCode, response, next, async) {
if (async) {
return true;
}
ctx.headers = {
'Content-Type': 'application/json'
};
ctx.statusCode = statusCode;
return next(null, response);
}
function errorHandler(ctx, ... |
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.Freccia = (root.Freccia || {});
root.Freccia.Vector = factory();
}
}(this, function() {
'use strict';
fun... |
define("ghost/routes/editor/new",
["ghost/routes/authenticated","ghost/mixins/style-body","exports"],
function(__dependency1__, __dependency2__, __exports__) {
"use strict";
var AuthenticatedRoute = __dependency1__["default"];
var styleBody = __dependency2__["default"];
var EditorNewRoute = Authen... |
describe('ngNuxeoUI module', function () {
'use strict';
var nuxeo, $compile, $scope, $templateCache;
beforeEach(
module(
'ngNuxeoUI',
'data/entry-picture.json', 'data/entry-audio.json',
'expected/nuxeo-picture.html', 'expected/nuxeo-audio.html',
'data/user.json'
)
);
before... |
module.exports.basename = require('./basename');
module.exports.dirname = require('./dirname');
module.exports.fclose = require('./fclose');
module.exports.feof = require('./feof');
module.exports.fgetc = require('./fgetc');
module.exports.fgetcsv = require('./fgetcsv');
module.exports.fgets = require('./fgets');
modul... |
var $hxClasses = $hxClasses || {},$estr = function() { return js.Boot.__string_rec(this,''); };
function $extend(from, fields) {
function inherit() {}; inherit.prototype = from; var proto = new inherit();
for (var name in fields) proto[name] = fields[name];
return proto;
}
var CADelegate = $hxClasses["CADelegate"] =... |
import PropTypes from 'prop-types'
import React from 'react'
import {loadImage} from './loadImage'
export default class ImageLoader extends React.PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
children: PropTypes.func
}
state = {
loadedImage: null,
error: null
}
comp... |
var module = angular.module("selectDirective", ['ui.select', 'ngSanitize']);
module.directive("paramSelector", function () {
'use strict'
return {
restrict: 'E',
templateUrl: '/scripts/directives/select.html',
controller: 'ParamSelectorController',
scope: {
matchPlac... |
import React from 'react';
import PropTypes from 'prop-types';
import styles from '../styles/app.scss';
import Menu from '../containers/Menu.js';
// import { Link } from 'react-router';
class App extends React.Component {
render() {
console.log(this.props.path);
return (
<sect... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
import _ from 'underscore';
import moment from 'moment';
import Immutable from 'immutable';
export const Project = Immutable.Record({
id: null,
name: null,
url: null,
desc: null,
status: null,
createdAt: null,
updatedAt: null
}, 'Project');
export default function(state, action) {
if (... |
'use strict'
const elasticsearch = require('elasticsearch')
const config = require('../config')
const client = new elasticsearch.Client({
host: config.ELASTIC_URL,
log: 'error'
})
module.exports.getFrontpage = (request, reply) => {
const viewOptions = {
query: '',
total: 0,
results: []
}
reply.v... |
// Generated on 2015-03-13 using generator-angular 0.11.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Load grunt tasks a... |
'use strict';
describe('Controller: BooksBookidCtrl', function () {
// load the controller's module
beforeEach(module('dashboardApp'));
var BooksBookidCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
Bo... |
var gulp = require('gulp'),
sass = require('gulp-sass'),
nodemon = require('gulp-nodemon'),
jshint = require('gulp-jshint'),
livereload = require('gulp-livereload'),
paths = {
js: ['./src/js/**/*.js'],
node: ['./*.js', './lib/**/*.js'],
sass: ['./src/scss/*.scss'],
cs... |
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const StyleLintPlugin = require('stylelint-webpack-plu... |
class database {
constructor(client, host, user, password, database){
this.knex = require('knex')({
client: client,
connection: {
host: host,
user: user,
password: password,
database: database
}
});... |
#!/usr/bin/env node
/**
* Sample Express (mostly) static server.
*
* Serves up the root of the project.
*/
var express = require("express"),
winston = require("winston"),
winMid = require("../index"),
app = express(),
logOpts = {
transports: [
new (winston.transports.Console)({ json: true })
]... |
exports.config = {
seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar',
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['no-sandbox'] // workaround: https://c... |
import React from 'react';
import { shallow } from 'enzyme';
import UpdateBookDetails
from '../../../../src/components/library/admin/UpdateBookDetails';
import {
book
} from '../../../__mocks__/mockData';
const props = {
book
};
const wrapper = shallow(
<UpdateBookDetails {...props} />
);
describe('CategoryL... |
import SpriteMagic from './SpriteMagic';
export default Object.assign((options = {}) => {
const spriteMagic = new SpriteMagic(options);
return (url, prev, done) => {
spriteMagic.resolve({ url, prev })
.then(done)
.catch(err => setImmediate(() => { throw err; }));
};
}, { Sp... |
/*exported CNPJBASE */
var CNPJBASE = function(value) {
if(!value) {
return value;
}
var cnpjBasePattern = new StringMask('00.000.000');
var formatedValue = cnpjBasePattern.apply(value);
return formatedValue;
};
|
'use strict';
const Vector3 = require('./vector3.js');
/**
* @author mrdoob / http://mrdoob.com/
* @author supereggbert / http://www.paulbrunt.co.uk/
* @author philogb / http://blog.thejit.org/
* @author jordi_ros / http://plattsoft.com
* @author D1plo1d / http://github.com/D1plo1d
* @author alteredq / http://a... |
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'el', {
toolbar: 'Κώδικας',
title: 'Κώδικας'
} );
|
const { readFileToArray } = require('./utils');
async function day1() {
const results = await readFileToArray('./day1-input.txt', function (line) {
return Number(line);
})
const frequency = results.reduce((acc, item) => (acc + item), 0)
console.log(frequency);
}
day1(); |
import { pipeP } from 'ramda';
import { getResultsFromResponse } from 'utils';
import categoryStore from './categoryStore';
import { getCategoriesApi } from '../apis';
// TODO handle try catch
export const getCategories = (categoryCode) => pipeP(
getCategoriesApi,
getResultsFromResponse,
categoryStore.setCategorie... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _areSimilar = require('./areSimilar');
var _areSimilar2 = _interopRequireDefault(_areSimilar);
var _deny = require('./deny');
var _de... |
var http = require("http");
var https = require("https");
var cheerio = require('cheerio');
var Logger = require("./logger.js");
var Media = require("./media");
var CustomEmbedFilter = require("./customembed").filter;
var Server = require("./server");
var Config = require("./config");
var ffmpeg = require("./ffmpeg");
... |
'use strict';
angular.module('workingRoom')
.controller('UserCtrl', function ($mdDialog, user, admin, User, Users, GroupsList) {
var vm = this;
vm.deleteUser = deleteUser;
vm.user = user;
vm.admin = admin;
function deleteUser(event) {
$mdDialog.show({
... |
const express = require('express');
const path = require('path');
const bodyParser= require('body-parser')
const github = require('octonode');
const app = express();
const client = github.client();
app.set('view engine', 'jade')
app.set('views', path.join(__dirname, 'templates'));
app.use(express.static(path.join(__d... |
import {get} from 'api/utils'
export async function getPostsAPI () {
return get('https://jsonplaceholder.typicode.com/posts?userId=1')
}
|
/* =========================================================
* bootstrap-datepicker.js
* http://www.eyecon.ro/bootstrap-datepicker
* =========================================================
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
*
* Licensed under the Apache License, Version 2.0 (the "Lice... |
/*
* grunt-clopp
* https://github.com/boostermedia/clopp
*
* Copyright (c) 2015 Riko Ophorst
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.i... |
'use strict';
describe('planRowDirective', function() {
beforeEach(module('gc.planRowList'));
var elm, scope;
beforeEach(inject(function($rootScope, $compile) {
scope = $rootScope.$new();
scope.plans = [
{ status: 'active', id: 11 },
{ status: 'inactive', id: 22 }
];
elm = angular.e... |
// Inisde this function we could diptch other actions.
// .e.g to activate spinners/signal errors and so.
import axios from 'axios'
export const TALKS_UPDATED = 'TALKS_UPDATED'
// Do the vote, reload talks from server
// then return the TALKS_UPDATED action
export function vote(id) {
console.log("VOTING", id)
re... |
import * as constants from "./constants";
import Attractor from "./Attractor";
let initNum = 1;
export default class Deflector extends Attractor {
constructor(game, center) {
super(game, center);
this.type = "deflector";
this.id = initNum;
this.isAlive = true;
this.game = ... |
import PropTypes from 'prop-types';
import React, { Fragment } from 'react';
const FragmentComponent = props => (<Fragment>
{props.children}
</Fragment>);
FragmentComponent.propTypes = {
children: PropTypes.node,
id: PropTypes.string
};
FragmentComponent.defaultProps = {};
export default FragmentCompone... |
'use strict';
const Window = (() => {
const _window = document.getElementById('gameCanvas');
const _context = _window.getContext('2d');
let _width = 800;
let _height = 600;
_window.width = _width;
_window.height = _height;
const setWidth = width => {
_window.width =_width ... |
/**
* @depends {3rdparty/jquery-2.1.0.js}
* @depends {3rdparty/bootstrap.js}
* @depends {3rdparty/big.js}
* @depends {3rdparty/jsbn.js}
* @depends {3rdparty/jsbn2.js}
* @depends {3rdparty/pako.js}
* @depends {3rdparty/webdb.js}
* @depends {3rdparty/ajaxmultiqueue.js}
* @depends {3rdparty/growl.js}
* @depends ... |
const styles = {
container: {
minHeight: '100vh',
backgroundColor: 'white'
},
header: {
textAlign: 'right',
justifyContent: 'space-between',
borderBottomWidth: 'thin',
borderBottomStyle: 'solid',
borderColor: '#8b9dc3',
padding: '2vh 4vh'
},
logoGithub: {
width: '4vh',
... |
angular.module('app').factory('Recipe', ['$q', 'MealPlan', 'Marklogic', 'Utilities', function ($q, MealPlan, Marklogic, Utilities) {
function initSearch(options) {
var deferred = $q.defer();
//Create Additional Query
var additionalQuery = "";
additionalQuery += "<cts:and-query xml... |
import type NodePath from "./index";
// This file contains Babels metainterpreter that can evaluate static code.
const VALID_CALLEES = ["String", "Number", "Math"];
const INVALID_METHODS = ["random"];
/**
* Walk the input `node` and statically evaluate if it's truthy.
*
* Returning `true` when we're sure that the... |
require(['common', 'layui', 'tools', 'ajaxurl', 'layers', 'page', 'moment', 'jquery.metisMenu'], function (common, layui, tools, ajaxurl, layers, page, moment) {
var main = {
form: '',
/**
* 初始化全局树形菜单
*/
sideMenu: function (callback) {
Vue.nextTick(function () ... |
module.exports = TheGreatFlat;
var BaseTerritory = require("./Base.js");
TheGreatFlat.prototype = new BaseTerritory();
TheGreatFlat.prototype.constructor = TheGreatFlat;
function TheGreatFlat() {
this.name = "The Great Flat";
var neighbors = new Array(
"FuneralPlain", "PlasticBasin", "WindPass", "TheGrea... |
(function() {
module.exports = function(connect, options) {
var app, express, routes;
express = require('express');
routes = require('./routes');
app = express();
app.configure(function() {
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverr... |
/**
* @constructor
*
* @param {RegExp} test - Remove match from html
*/
function HtmlWebpackPluginRemove (test) {
this.test = test;
}
HtmlWebpackPluginRemove.prototype.apply = function(compiler) {
var test = this.test;
compiler.plugin("compilation", function(compilation) {
// Hook into html-we... |
version https://git-lfs.github.com/spec/v1
oid sha256:b73bee18e289bd7150cdfe8bf69b971a30f710635f951d3303b9da5beea5541e
size 32880
|
/**
* Class that handles the products
* @type {*}
*/
window.themingStore.models.ProductModel = window.themingStore.models.AbstractModel.extend({
defaults: {
'template[title]': 'dsa'
},
/**
* the type of the model, required for save operations
*/
type: 'template'
}); |
export { default } from 'ilios-common/models/curriculum-inventory-sequence-block';
|
/**
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
module.exports = require('../src/traces/box');
|
$(function(){
$.BaseStorage = Class.extend(function(){
var storage = this;
storage.key = null;
storage.data = {};
storage.constructor = function(storageKey, callback){
storage.key = storageKey;
if(callback && typeof callback == 'function'){
... |
$(document).ready(function(){
newGame = new Game;
$("#board").on("click", '.board-column', function(){
$("#player2").toggle();
$("#player1").toggle();
})
$("#board").on("click", '.cell', function(event){
// debugger;
var player_1_color = "white"
var player_2_color = "black"
if($("... |
/*global define:false, describe: false, before:false, after: false, beforeEach: false, afterEach: false, it:false, expect: false, i18n: false */
define([
// Libraries.
'jquery',
'underscore',
'backbone',
// Modules.
'modules/meta',
'modules/session',
'modules/nls'
],
function($, _, Back... |
/*
* IndexController from errorPage Module
*/
app.registerService(function() {
var self = this;
self.moduleName = "files";
self.serviceName = "$filesService";
self.initService = function() {
angular.module(self.moduleName).factory([self.moduleName, self.serviceName].join("."), ['$resource... |
buttonToOpenPopUp("#newEmployee", "showAddEmployee.html", "#addEmployee");
buttonToOpenPopUp("#employeeToProject", "employeeProject.html", "#employeeProject");
var activeEmployeeToProject = null;
var list = $("#employeesPopUp .list-group");
list.empty();
for(c of empresa.funcionarios.membros){
list.append(c.html);... |
/*jslint node: true, nomen: true, white: true, unparam: true*/
/*globals describe, beforeEach, afterEach, it, expect, spyOn*/
/*!
* Sitegear3
* Copyright(c) 2014 Ben New, Sitegear.org
* MIT Licensed
*/
(function (templateObject) {
"use strict";
describe('Utility Function: expandSettings()', function () {
desc... |
var events = require('events');
var spawn = require('child_process').spawn;
var split = require('split');
var path = require('path');
var util = require('util');
var rtf2htmlPythonScript = path.join(__dirname, 'rtf2html.py');
function Processor() {
events.EventEmitter.call(this);
this.killTimer = null;
this.child... |
'use strict';
let constants = require('./constants');
const NIL = '-';
const EMPTY = '';
const FILTER_PRINT_US_ASCII = /([\x21-\x7e])+/g;
/**
* @param {string} str
* @param {number} maxLength
* @returns {string}
*/
function filterPrintUsASCII (str, maxLength) {
if (typeof str === constants.TYPE_OF.NUMBER || ty... |
define('getSpreadsheetFromFile', ['papaparse', 'xlsx' ], function (Papa, xlsx, __createReactClass) {
return (f, callback) => {
if (! f)
return callback(null, null);
if (! (window.File && window.FileReader && window.FileList && window.Blob))
return callback(null, null);
... |
'use strict';
var winston = require('winston');
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.addColumn('settings', 'help_page', {
type: Sequelize.STRING(255),
defaultValue: '',
allowNull: false
})
... |
import { ContactEmailsModel } from '@proton/shared/lib/models/contactEmailsModel';
import createUseModelHook from './helpers/createModelHook';
export default createUseModelHook(ContactEmailsModel);
|
'use strict';
const EasyObjectValue = require('../values/EasyObjectValue');
class NumberPrototype extends EasyObjectValue {
static *valueOf$e(thiz) {
if ( thiz.specTypeName === 'number' ) return thiz;
if ( thiz.specTypeName === 'object' ) {
let pv = thiz.primativeValue;
if ( pv.specTypeName === 'number' ... |
// app.js
(function() {
"use strict";
angular.module("myFirstApp")
.controller("MyFirstController", MyFirstController);
function MyFirstController() {
let vm = this;
vm.name = "Vitalii";
/* $scope.sayHello = () => {
return "Hello, world!";
}; */
}
})();
|
function solve(input) {
let arraySize = input[0];
let arr = [];
for(k = 0; k < arraySize; k++){
arr[k] = 0;
}
for(i = 1; i <= input.length-1; i++){
let currentCommand = input[i].split(" - ");
arr[currentCommand[0]] = currentCommand[1];
}
arr.forEach(a ... |
var app = require('http').createServer(handler),
io = require('socket.io').listen(app),
fs = require('fs'),
qs = require('querystring')
io.sockets.on('connection', function(socket) {
console.log('client connected');
socket.on('disconnect', function() {
console.log('client disconnected');
... |
'use strict'
const test = require('tape')
const { checkSingle } = require('./util/util')
test('\npreflop:single: pair vs. pair', function(t) {
[ [ 'AsAh', 'KsKh', 82 ]
, [ 'JsJh', '7s7h', 81 ]
, [ 'JsJh', 'TsTh', 82 ]
, [ 'AsAh', '2s2h', 83 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end(... |
$(function() {
$.widget('sense2party.eventEdit', {
// Default options
options: {
},
// Private variables
/**
* The constructor
*
* @private
*/
_create: function() {
this._on(this.document, {
'click.dele... |
/* global firebase */
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, Route, useRouterHistory } from 'react-router';
import { createHashHistory } from 'history';
impor... |
/* @flow */
import { InputTypeComposer } from 'graphql-compose';
import { getTypeName, type CommonOpts, desc } from '../../../utils';
export function getCumulativeSumITC<TContext>(
opts: CommonOpts<TContext>
): InputTypeComposer<TContext> {
const name = getTypeName('AggsCumulativeSum', opts);
const description ... |
/**
* Created with IntelliJ IDEA.
* User: davidtudury
* Date: 9/14/13
* Time: 2:05 PM
*/
var Q = require('q');
module.exports = denodeifyErrorless;
function denodeifyErrorless(f) {
var args = [].slice.call(arguments, 1);
return function () {
var deferred = Q.defer();
f.apply(void 0, a... |
/*
StorageTweetenImport.js
Copyright (c) 2014-2022 dangered wolf, et al
Released under the MIT License
*/
import { getPref, setPref } from "./StoragePreferences.js";
import { exists } from "./Utils.js"
/*
Processes Tweeten Settings import
obj = object converted from the raw JSON
*/
export function importTweeten... |
function formatHeight(height) {
var heightElement = document.createElement("span");
heightElement.id = "jriCacheHeightFt";
heightElement.innerHTML = (height >= 0) ? " +" : " ";
heightElement.innerHTML += Math.round(height * 3.28084) + "ft";
return heightElement;
}
|
"enable aexpr";
import Morph from 'src/components/widgets/lively-morph.js';
export default class FooBar extends Morph {
async initialize() {
this.windowTitle = "FooBar";
this.registerButtons()
lively.html.registerKeys(this); // automatically installs handler for some methods
lively.addEventLis... |
function main() {
var n = parseInt(readLine());
var binaryN = getBinaryRepresentationOf(n);
console.log(getMaximumNumberOfConsecutiveOnes(binaryN));
function getBinaryRepresentationOf(base10Integer) {
return (base10Integer >>> 0).toString(2);
}
function getMaximumNumberOfConsecutiveOnes(binaryNumber)... |
var mongoose = require('mongoose');
mongoose.connect('mongodb://yuuko:123456@hk.1234.sh/yuuko', {
server: {
auto_reconnect: true,
socketOptions:{
keepAlive: 1
}
},
db: {
numberOfRetries: 3,
retryMiliSeconds: 1000,
safe: true
}
});
exports.mongo... |
var game = require('../game/monty-hall-game');
'use strict';
exports.action = {
name: 'startGame',
description: 'startGame',
blockedConnectionTypes: [],
outputExample: {gameId: 1},
matchExtensionMimeType: false,
version: 1.0,
toDocument: t... |
// DATA_TEMPLATE: empty_table
oTest.fnStart("bAutoWidth");
/* It's actually a little tricky to test this. We can't test absolute numbers because
* different browsers and different platforms will render the width of the columns slightly
* differently. However, we certainly can test the principle of what should happen... |
module.exports = {
build: {
src: 'assets/js/app.min.js',
dest: 'assets/js/app.min.js'
}
} |
const {
should,
fixtures,
} = require('../../lib/util/tests');
const parser = require('../../lib/decorate/parse');
describe('decorate/parse', () => {
it('is function', () => {
parser.should.be.a('function');
});
it('invalid', () => {
const r = parser(fixtures.torrent.invalid.file);
should.not.ex... |
'use strict'
var countn = require('./')
var example = countn(2, function(err, results) {
console.log(err, results)
console.log('All examples executed.')
})
// Example 1
//
// When all calls are successful results are concatenated
// and returned in callback function
var cb = countn(5, function() {
example(null... |
define(['angular'], function() {
'use strict';
return angular.module('app', [
'ngRoute',
'app.configs',
'app.filters',
'app.services',
'app.directives',
'app.controllers'
]);
});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.