code stringlengths 2 1.05M |
|---|
/**
* Copyright (C) 2020 tt.bot dev team
*
* This file is part of tt.bot.
*
* tt.bot is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any ... |
/* -*- coding: utf-8 -*-
* ----------------------------------------------------------------------------
* Copyright (c) 2013 - Damián Avila
*
* Distributed under the terms of the Modified BSD License.
*
* An IPython notebook extension to support *Live* Reveal.js-based slideshows.
* -------------------------------------... |
(function() {
var WORD_RE;
WORD_RE = /([^ ,\/!.?:;\-\n]+[ ,\/!.?:;\-]*)|\n/g;
module.exports = {
initText: function() {
this.x = 0;
this.y = 0;
this._lineGap = 0;
this._textState = {
mode: 0,
wordSpacing: 0,
characterSpacing: 0
};
return this._wrap... |
import React from 'react'
import ReactTestUtils from 'react-dom/test-utils'
import rtRenderer from 'react-test-renderer'
import {findWithType} from 'react-shallow-testutils'
import {findAllWithType} from 'react-shallow-testutils'
import initialState from '../../../data/StateGetter'
const testFunction = ... |
// All symbols in the CJK Compatibility Ideographs Supplement block as per Unicode v6.1.0:
[
'\uD87E\uDC00',
'\uD87E\uDC01',
'\uD87E\uDC02',
'\uD87E\uDC03',
'\uD87E\uDC04',
'\uD87E\uDC05',
'\uD87E\uDC06',
'\uD87E\uDC07',
'\uD87E\uDC08',
'\uD87E\uDC09',
'\uD87E\uDC0A',
'\uD87E\uDC0B',
'\uD87E\uDC0C',
'\uD8... |
a = func(), b = z;
for (a++; i < 10; i++)alert(i);
var z = 1;
g = 2;
for (; i < 10; i++)alert(i);
var a = 2;
for (var i = 1; i < 10; i++)alert(i) |
'use strict';
require('./fleet-location-vehicle-details.controller');
require('./fleet-vehicle-property-synchronizer.factory');
require('./vehicle-image-service.factory');
describe('fa.fleet.FleetLocationVehicleDetailsController > ', function describeImpl() {
var $q;
var $scope;
var $state;
var fleetLocationV... |
/**
* @license
* Copyright 2016 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge... |
var escapeRE = /([.*+?^=!:$(){}|[\]\/\\])/g
function createName(name){
var escapedName = name.replace(escapeRE, "\\$1")
return RegExp(escapedName)
}
function getRandom(list){
return list[Math.floor(Math.random() * list.length)]
}
module.exports = function(bot, options){
bot.mention(
createName(options.na... |
var numberGreaterThanOrEqualTo = require('./numberGreaterThanOrEqualTo');
window.legacy = {};
window.legacy.numberGreaterThanOrEqualTo = function() {
console.info('numberGreaterThanOrEqualTo(1, 2)', numberGreaterThanOrEqualTo(1, 2));
console.info('numberGreaterThanOrEqualTo(1, "dd")', numberGreaterThanOrEqual... |
(function( $ ) {
var clicked = false;
$('.navmenu').on('click',function(){
if(clicked) {
$('.navmenu-item').css({"display": "none"});
clicked = false;
}
else {
if ($(window).innerWidth() < 701) {
$('.navmenu-item').css({
"disp... |
module.exports = (string, times = 1) => {
if (typeof string !== 'string') {
throw new Error('args[0] must be a string');
}
let res = '';
let max = string.length * times;
if (times === 1) return string;
if (times === 2) return string + string;
while (max > res.length && times > 1) {
// 3,5,7,..... |
communicationModule.controller('parentController', function($scope, userService, sharedService) {
$scope.parentUserData = userService.getUserData();
$scope.parentData = '';
}); |
Mariachi.Routers.RecepiesRouter = Backbone.Router.extend({
initialize: function() {
},
routes: {
"": "home",
"recepies/add": "addRecepie",
"recepies/:id": "getRecepie",
"recepies/edit/:id": "editRecepie",
"recepies/delete/:id": "deleteRecepie",
"recepies/execute/:id": "deployRecepie"
},
home: functi... |
// Generated on 2013-10-19 using generator-webapp 0.4.3
'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) {
// show elapsed time a... |
/* @flow */
import Parser from "./index";
import { SourceLocation } from "../util/location";
// Start an AST node, attaching a start offset.
const pp = Parser.prototype;
class Node {
constructor(pos?: number, loc?: SourceLocation) {
this.type = "";
this.start = pos;
this.end = 0;
this.loc = new So... |
//The generic 3D object from which many world items will inherit
quack.core.genericObj = function(attr) {
//constructor
this.id = attr.id || "defaultID"; //can replace this with a random ID
this.type = attr.type | "generic";
this.parent = undefined;
this.children = [];
//this.position = new quack.math.vector3(0... |
import alt from '../alt';
class CharacterListActions {
constructor(){
this.generateActions(
'getCharacterSuccess',
'getCharacterFail'
);
}
getCharacters(payload) {
let url = '/api/characters/top';
let params = {
race: payload.race,
... |
/** @jsx React.DOM */
jest.dontMock('../../../scripts/gebo/objectToQueryString');
var React = require('react/addons'),
TestUtils = React.addons.TestUtils;
var objectToQueryString = require('../../../scripts/gebo/objectToQueryString');
describe('objectToQueryString', function() {
it('should return an URL-fr... |
export { default } from "./../../_gen/openfl/media/SoundLoaderContext"; |
/**
* HTTP server to Axis camera
*/
var http = require('http'),
url = require('url'),
es = require('event-stream')
var axis = require('./axis').createClient(JSON.parse(require('fs').readFileSync(__dirname + '/../settings.json')))
var raise500 = function(res) {
res.statusCode = 500
res.setHeader... |
var $ = require('jquery');
var MediaBrowser = require('./media').MediaBrowser;
// hold the media browser singleton
var browser = null;
/**
* tinyMCE callback function creator
* Return a closure for the tinyMCE media browser callback
* @param {[type]} url URL to the TweedeGolfMediaBundle modal page
* @return {fun... |
export function addComment(comment) {
return new Promise(resolve => {
setTimeout(resolve, 2000);
});
}
export function getAllComments() {
return Promise.resolve({data: [
{ email: 'first@test.com', message: 'New Comment' },
{ email: 'second@test.com', message: 'My Comment' },
... |
rock.namespace('rock.scene.graphics.scene');
/**
* This class is the representation for a ModelNode.
*
* ATTENTION:
* This class is awful. The representations are not thought to be generic...
* A representation must know what model it handles but here a generic model is passed instead...
* This is why 'updateMod... |
import { hashSync } from 'bcryptjs';
import genSalt from '../../auth/salt';
import { browserHistory } from 'react-router';
import { take, call, put, fork, race } from 'redux-saga/effects';
import auth from '../../auth';
import {
SENDING_REQUEST,
REQUEST_ERROR,
LOGOUT,
SET_AUTH,
LOGIN_REQUEST,
REGISTER_REQU... |
angular.module('analyticsApp').factory('chartService', ['$http', 'constants', '$filter',
function ($http, constants, $filter) {
var cache = {};
return {
getData: function (datasets, callback) {
var notCached = $filter('filter')(datasets, function (item) {
... |
app.directive("cardList", function() {
return {
restrict: "E",
scope: {
type: "@",
cards: "="
},
templateUrl: "app/card/card_list.html"
}
}); |
import React, {Component} from 'react'
import { connect } from 'react-redux'
import {
moveSection,
updateScale,
loadSections,
slideON,
slideOFF,
slideVertically,
slideHorizontally
} from '../actions'
import Section from './Section'
import Loader from '../components/Loader'
import styles from './layout.... |
'use strict';
var escpos = require('../');
var device = new escpos.USB();
var qr = [0x1D, 0x5A, 0x02, 0x1B, 0x5A, 0x03, 0x4C, 0x06, 0x05, 0x00, 0x02, 0x01, 0x01, 0x0D, 0x0A];
var datamatrix = [0x1D, 0x5A, 0x01, 0x1B, 0x5A, 0x03, 0x08, 0x06, 0x05, 0x00, 0x02, 0x01, 0x01, 0x01, 0x02];
device.open();
device.write(new ... |
var Mongoose = require('mongoose');
module.exports = Mongoose.model({
email: {
type: String,
unique: true,
required: true
},
password: {
type: String,
required: true
},
facebook: {
type: String
},
google: {
type: String
},
profile: {
type: Mongoose.Schema.Types.ObjectId,
ref: 'Profile'
},
... |
'use strict';
var url = require('url');
var assert = require('assert');
var http = require('http');
var https = require('https');
var Writable = require('stream').Writable;
var debug = require('debug')('follow-redirects');
var nativeProtocols = {'http:': http, 'https:': https};
var schemes = {};
var exports = module.e... |
module.exports = function(sequelize, DataTypes) {
var ThemeSetting = sequelize.define("ThemeSetting", {
headerfilename: {
type: DataTypes.STRING(50)
},
header_backgroundcolor: {
type: DataTypes.STRING(6),
allowNull: false
},
header_fontcolor: {
type: DataTypes.STRING(6),
allowNull: false
... |
import React from "react"
import { Link } from "react-router-dom"
import { Component } from "platform/react-support"
import { Paper } from "@material-ui/core"
import { styleUi } from "theme"
export default class Timeout extends Component {
render() {
return (
<Paper style={styleUi.paper} elevation={1}>
... |
version https://git-lfs.github.com/spec/v1
oid sha256:c22b1959fd68b50e46b2fa59b81c132c1996c8034ae560a7bf6abb9a4cb3eebd
size 1051
|
// Regular expression that matches all symbols in the `Deseret` script as per Unicode v4.0.1:
/\uD801[\uDC00-\uDC4F]/; |
const passport = require('passport');
const connection = require("../connection");
module.exports = function(app) {
function renderLocationEditView(name, address, req, res) {
connection.query('SELECT * from Location where name=? and address=?',
[name, address],
function(err, location) {
... |
'use strict';
const Gpio = require('../onoff').Gpio; // Gpio class
console.log('Gpio functionality accessible on this computer?', Gpio.accessible);
|
import React from 'react';
import Utils from '../utils/utils';
import Mixins from '../utils/mixins';
import __reactComponentSlots from '../runtime-helpers/react-component-slots.js';
import __reactComponentSetProps from '../runtime-helpers/react-component-set-props.js';
class F7MessagebarSheet extends React.Component {... |
const _checksum = require('./checksum');
function sha384file(filename, outputFormat='hex'){
// generate hash
return _checksum(filename, 'sha384', outputFormat);
}
module.exports = sha384file; |
/**
* Created by juanmanuelsanchez on 17/3/16.
*/
/**
* Created by juanmanuelsanchez on 16/3/16.
*/
(function() {
var self = this,
mediaWrapper = $("#mediaWrapper"),
datos = "data/datos.json",
count = 0;
function getData(callback) {
$.getJSON(datos, function(data) {
callbac... |
/*jshint node:true, mocha:true */
'use strict';
var better = require('betterer').better;
var convertTests = require('./convert/convertTests');
var invertConversionTests = require('./invertConversion/invertConversionTests');
var composeConversionsTests = require('./composeConversions/composeConversionsTests');
var coe... |
var models = require('../models.js');
var fs = require('fs');
var AWS = require('aws-sdk');
//Keeping our secrets secret.
var settings;
if(fs.existsSync('./settings.js')){
settings = require('../settings.js');
}else{
settings = {};
settings.amazonID = process.env.S3Key;
settings.amazonSecret = process.env.S3Secret... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{196:function(t,e,n){"use strict";n.r(e);var s=n(0),l=Object(s.a)({},function(){var t=this.$createElement;return(this._self._c||t)("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}})},[],!1,null,null,null);e.default=l.exports}}]); |
/*
With reference to Queue.js
A function to represent a queue
Created by Stephen Morley - http://code.stephenmorley.org/ - and released under
the terms of the CC0 1.0 Universal legal code:
http://creativecommons.org/publicdomain/zero/1.0/legalcode
*/
class Queue{
constructor(){
this.arr = [];
... |
exports.server = {
game: {
port: 3000,
name: 'RockMUD',
version: '0.3.0',
website: 'https://github.com/MoreOutput/RockMUD',
description: 'Websockets MUD Engine Demo',
coinage: 'gold',
persistenceTick: 245000
},
admins: []
};
|
import electron from 'electron'
import { Map } from 'immutable'
import { DATA, emitRTC } from './rtc'
// ------------------------------------
// Constants
// ------------------------------------
export const MIDI_OPEN = 'MIDI_OPEN'
export const MIDI_MESSAGE = 'MIDI_MESSAGE'
export const MIDI_OUT_NOTE_DOWN = 'MIDI_OUT_... |
var modMemory = require("module.memory");
var bodyObj = require('module.bodyTypes');
var modUtil = require('module.utility');
var modManual ={
spawn:function(type, tier, roomName, pos){
var memoryObj = modMemory.getInitalCreepMem(type);
memoryObj.manualDest = pos;
memoryObj.room = roomName;
var obj =... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
(function(){
QUnit.config.reorder = false;
/*************************************/
QUnit.module('CordovaPromiseFS');
/*************************************/
window.fs = null;
QUnit.test('fs = CordovaPromiseFS()',function(assert){
fs = CordovaPromiseFS({
Promise:Promise,
persistent: typeof cordova !== 'u... |
'use strict';
var $$Array = 0;
var Bytes = 0;
var List = 0;
var $$String = 0;
exports.$$Array = $$Array;
exports.Bytes = Bytes;
exports.List = List;
exports.$$String = $$String;
/* No side effect */
|
const jwt = require('jwt-simple');
const User = require('../models/user');
const config = require('../config/index');
function tokenForUser(user) {
const timestamp = new Date().getTime();
return jwt.encode({ sub: user.id, name: user.username, iat: timestamp }, config.secret);
}
exports.signin = function(req, res,... |
module.exports = {
"name": "ATmega329A",
"timeout": 200,
"stabDelay": 100,
"cmdexeDelay": 25,
"syncLoops": 32,
"byteDelay": 0,
"pollIndex": 3,
"pollValue": 83,
"preDelay": 1,
"postDelay": 1,
"pgmEnable": [172, 83, 0, 0],
"erase": {
"cmd": [172, 128, 0, 0],
"delay": 45,
"pollMethod": ... |
/* jshint esversion: 6 */
var http = require('http');
var fs = require('fs');
var express = require('express');
var app = express();
const PORT = 8080;
app.use('/tests', express.static(__dirname + '/tests/'));
app.use('/', (req, res)=>{
res.redirect('/tests/#/');
});
//Lets start our server
app.listen(PORT, func... |
Object.defineProperty(exports,"__esModule",{value:true});var _this=this;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];}}}return target;};
var _graphql=require('... |
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modi... |
define( 'specs/plugin/a', function(){ return 'a'; } );
|
/*===
RangeError: aiee
done
===*/
function yielder() {
var yield = Duktape.Thread.yield;
t = {};
throw new RangeError('aiee');
}
var t = Duktape.Thread(yielder);
try {
Duktape.Thread.resume(t);
} catch (e) {
print(e);
}
print('done');
|
import PropTypes from 'prop-types';
import React from 'react';
class DaySlot extends React.Component {
render() {
return (
<div className="">
<div className="topbar">
<div className="info-title">Appointment info</div>
<div className="icons">
<ul>
... |
'use strict';
var React = require('react');
var mui = require('material-ui');
var SvgIcon = mui.SvgIcon;
var createClass = require('create-react-class');
var NotificationSyncDisabled = createClass({
displayName: 'NotificationSyncDisabled',
render: function render() {
return React.createElement(
SvgIco... |
var searchData=
[
['lgssm',['Lgssm',['../classLgssm.html',1,'']]]
];
|
export clone from './clone'
export parseToInstance from './parseToInstance'
|
chart("static/data/data.csv", "orange");
var datearray = [];
var colorrange = [];
function chart(csvpath, color) {
if (color == "blue") {
colorrange = ["#045A8D", "#2B8CBE", "#74A9CF", "#A6BDDB", "#D0D1E6", "#F1EEF6"];
}
else if (color == "pink") {
colorrange = ["#980043", "#DD1C77", "#DF65B0", "#C994C7", "#D4B... |
Settings = {
chart: {
padding: { right: 40, bottom: 80 },
margins: { top: 30, bottom: 0, right: 35 },
},
defaultData: {
title: 'Bar Chart',
mode: 'single', // other mode: 'multi', refers to the number of indicators.
byYear: false,
chosenYear: '',
sorted: false, // sort by value. When f... |
/*
MIT License
Copyright (c) 2017
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, su... |
// 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 ../../../core/Accessor ../../../core/accessorSupport/dec... |
/**
* @param {Range} range
* @param {Node} node
* @returns {boolean}
*/
export default function rangeIntersectsNode(range, node) {
const nodeRange = document.createRange();
nodeRange.selectNode(node);
return range.compareBoundaryPoints(Range.END_TO_START, nodeRange) === -1 &&
range.compareBoundaryPoin... |
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);
client.recordings('RE... |
/*
AngularJS v1.2.9-build.2130+sha.02a4582
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(function(H,a,A){'use strict';function D(p,g){g=g||{};a.forEach(g,function(a,c){delete g[c]});for(var c in p)p.hasOwnProperty(c)&&("$"!==c.charAt(0)&&"$"!==c.charAt(1))&&(g[c]=p[c]);return g}var v=a.$$minErr("$... |
export default input => {
const result = input.replace(/-\w/g, match => match.charAt(1).toUpperCase());
if (input.charAt(0) === '-' && input.charAt(2) === 's') { // -ms-
return 'm' + result.substr(1); // lower case the first char
}
return result;
};
|
import { connect } from 'react-redux';
import Modal from '../components/Modal';
import { closeModal } from '../actions/modal';
const mapStateToProps = (state) => {
return {
open: state.modal.open,
form: state.modal.form,
};
};
const mapDispatchToProps = (dispatch) => {
return {
closeModal: () => {
... |
/*global define, exports, require */
(function (global, definition) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(definition);
} else if (typeof exports === 'object' && typeof require === 'function') {
module.exports = definition();
} else {
if (typeof global.hansi === '... |
import React from "react";
import PropTypes from "prop-types";
import {connect} from "react-redux";
import Home from "./Home";
import {Route, Switch} from "react-router-dom";
import {AppBar, FlatButton} from "material-ui";
import {logout} from "../store/GlobalAction";
class App extends React.Component {
render() {
... |
var React = require('react');
var ReactDOM = require('react-dom');
var Main = React.createClass({
render: function(){
return (
<div>
Hello World
</div>
)
}
});
ReactDOM.render(<Main />, document.getElementById('app')); |
/**
* Loading Screen
*
<Loading text={'Server is down'} />
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
'use strict';
/* Setup ==================================================================== */
import React, { Component } from 'react'
import {
View,
Activity... |
#pragma strict
//var WalkDest : GameObject;
var WayPoints : GameObject[];
private var CurrentDest : int = 0;
var agent : NavMeshAgent ;
var player : GameObject;
var excl : GameObject;
var status : String = "patrolling";
var lastseen : GameObject;
function Start() {
agent = GetComponent(NavMeshAgent);
agent.de... |
import _ from 'lodash';
import moment from 'moment';
import control from 'control';
import RepoActions from 'actions/RepoActions';
import {
PULSE_TIME_STAMPS,
PULSE_TIME_LABELS,
} from 'constants/dashboard';
class RepoStore {
constructor() {
this.bindActions(RepoActions);
this.state = {
repos: [],... |
import {TaskQueue} from '../src/index';
import {initialize} from 'aurelia-pal-browser';
describe('TaskQueue', () => {
let sut;
beforeAll(() => initialize());
beforeEach(() => {
sut = new TaskQueue();
});
it('queueTask does not provide immediate execution', () => {
let count = 0;
let task = () ... |
import React, { Component, PropTypes } from 'react';
import Module from '../Shared/Module';
import EuclideanSolution from './EuclideanSolution';
const inputs = [
{
name: "big",
type: "number",
validations: "isInt",
fullWidth: true,
floatingLabelText: "First Number (m)"
},
{
name: "small"... |
const error_404 = require('./error_404.js');
const error_503 = require('./error_503.js');
const content_types = require('../mongo_documents/content_types.js');
const Tags = require('../mongo_documents/tags.js');
const Tag_types = require('../mongo_documents/tag_types.js').tag_types;
const Artefacts = require('../mongo_... |
let dbMongoTest = require('./dbMongoTest');
let dbMysqlTest = require('./dbMysqlTest');
let routeTest = require('./routeTest');
dbMongoTest();
dbMysqlTest();
routeTest();
|
const testUtils = require('./testUtils');
const { generateAPITests } = require('./generateAPITests');
const matTestUtilsFactory = require('./matTestUtils');
const readExampleImagesFactory = require('./readExampleImages');
const generateClassMethodTestsFactory = require('./generateClassMethodTests');
const getNodeMajor... |
import { PropTypes } from 'react';
import classNames from 'classnames';
import { Breakpoints, FloatTypes } from './enums';
/**
* Property types for general properties.
*
* @returns {Object}
*/
export const GeneralPropTypes = {
showFor: PropTypes.oneOf([Breakpoints.MEDIUM, Breakpoints.LARGE]),
showOnlyFor: Prop... |
((w) => {
let settings = {
className: 'form__block',
params: ['login', 'password', 'email', 'surname', 'forename'],
filter: {
login: {
events: ['change', 'blur']
},
password: {
events: ['change', 'blur']
},
... |
var random = require('geojson-random')
var fs = require('fs')
var path = require('path')
var geo = random.polygon(10000, 4, 1)
fs.writeFileSync(path.join(__dirname, 'data.geojson'), JSON.stringify(geo))
|
/**
*
* ramroll on 2016/10/24.
*/
export const COLOR_PRIMARY = "#188ae4"
export const COLOR_NAV_DARK = '#082c48'
export const COLOR_TITLE = "#222"
export const COLOR_TEXT_LIGHT = "#777"
export const COLOR_PRICE = "#ee4339"
export const COLOR_INFO = '#3596e2'
export const COLOR_LIGHT_BLUE = '#d8edfe'
expor... |
module.exports = function(grunt) {
grunt.initConfig({
connect: {
server: {
options: {
port: 9001,
base: './'
}
}
},
qunit: {
all: {
options: {
urls: [
'http://localhost:9001/test/test-for-jquery.html',
'http://localhost:9001/test/test-fo... |
import test from 'ava';
import * as datatypes from '../.fixtures/datatypes.fixture';
import * as describeType from '../index.next';
import infinity from './infinity.next';
test('describeType.is.infinity exposure', (t) => {
t.is(toString.call(describeType.is.infinity), '[object Function]', 'should be a function');
});... |
/**
* @author: @AngularClass
*/
require('ts-node/register');
var helpers = require('./helpers');
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
baseUrl: 'http://localhost:3000/',
// use `npm run e2e`
specs: [
helpers.root('src/**/**.e2e-spec.ts'),
helpers.root('s... |
import ReactDOM from 'react-dom';
import {root} from 'baobab-react/higher-order';
import Tree from './state/';
import Main from './components/main';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
const tree = new Tree();
tree.load(() => {
const RootedApp = root(Main, tree);
... |
const MIN_LOGIN_LENGTH = 4;
const MIN_PASSWORD_LENGTH = 6;
const validateLogin = (login) => {
if (!login) {
return 'Required';
}
return login.length < MIN_LOGIN_LENGTH ? 'Login is too short' : '';
};
const validatePassword = (password) => {
if (!password) {
return 'Required';
}
return password.l... |
var babelHelpers = require('./babel-helpers.js');
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _angular = require('angular');
var _angular2 = babelHelpers.interopRequireDefault(_angular);
var moduleName = 'mui.dropdown'; /**
* MUI Angular Dropd... |
var mongoose = require( 'mongoose' ),
autoIncrement = require( 'mongoose-auto-increment' );
/**
* Access Token Schema
*/
var AccessToken = mongoose.Schema({
userId: {
type: Number,
required: true
},
clientId: {
type: String,
required: true
},
token: {
type: String,
unique: true,
... |
'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actua... |
import value from "./value";
// TODO sparse arrays?
export default function(a, b) {
var x = [],
c = [],
na = a ? a.length : 0,
nb = b ? b.length : 0,
n0 = Math.min(na, nb),
i;
for (i = 0; i < n0; ++i) x.push(value(a[i], b[i]));
for (; i < na; ++i) c[i] = a[i];
for (; i < nb; ++i)... |
window.addEventListener('load', function() {
var webAuth = new auth0.WebAuth({
domain: AUTH_CONFIG.domain,
clientID: AUTH_CONFIG.clientID,
redirectUri: AUTH_CONFIG.callbackURL,
audience: 'https://' + AUTH_CONFIG.domain + '/userinfo',
responseType: 'token id_token'
})
var loginStatus = docume... |
'use strict';
module.exports = {
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/watnottoeat',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min... |
const cons = (a, b) => (fn) => fn(a, b);
const car = (c) => {
if(typeof(c) === "function")
return c((a, b) => a);
else
throw new Error("Cannot car on an empty list");
};
const cdr = (c) => {
if(typeof(c) === "function")
return c((a, b) => b);
else
throw new Error("Canno... |
/* Prototype-UI, version trunk
*
* Prototype-UI is freely distributable under the terms of an MIT-style license.
* For details, see the PrototypeUI web site: http://www.prototype-ui.com/
*
*--------------------------------------------------------------------------*/
if(typeof Prototype == 'undefined' || !Proto... |
// https://github.com/babel/minify/issues/130
// https://github.com/babel/minify/pull/132
function outer() {
const inner = d => d.x;
return inner;
}
|
export default function routes($stateProvider) {
$stateProvider
.state('main', {
url: '/',
template: require('./main.html'),
controller: 'MainController',
controllerAs: 'main'
});
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.