code
stringlengths
2
1.05M
function fakeAjax(url,cb) { var fake_responses = { "file1": "The first text", "file2": "The middle text", "file3": "The last text" }; var randomDelay = (Math.round(Math.random() * 1E4) % 8000) + 1000; console.log("Requesting: " + url); setTimeout(function(){ cb(fake_responses[url]); },randomDelay); } f...
/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import React from 'react'; import invariant from 'shared/invariant'; import warning from 'shared/warning'; type Unsubscribe...
const mongoose = require('mongoose'); const venueSubModels = require('./subModels/venueSubModels'); const {shortUser} = require('./UserSchemas'); const venueTaskSchema = mongoose.Schema({ _id: { type: mongoose.Schema.Types.ObjectId, required: true, }, title: { type: String, required: true, }, ...
function locationMatching(locations, field) { // Type-ahead related stuff var substringMatcher = function (strs) { return function (q, cb) { var matches, substrRegex; matches = []; substrRegex = new RegExp(q, 'i'); $.each(strs, function (i, str) { if (substrRegex.test(str)) { ...
import { StyleSheet } from 'react-native'; export default StyleSheet.create({ textInput: { height: 50, borderColor: '#ddd', borderWidth: 1, marginLeft: 10, marginRight: 10, marginTop: 40, backgroundColor: '#fff', borderRadius: 4, fontSize: 20, textAlign: 'center', }, error...
/* * Inline Form Validation Engine 2.6, jQuery plugin * * Copyright(c) 2010, Cedric Dugas * http://www.position-absolute.com * * 2.0 Rewrite by Olivier Refalo * http://www.crionics.com * * Form validation engine allowing custom regex rules to be added. * Licensed under the MIT License */ (function($) { "...
'use strict'; module.exports = function(config) { config.set({ // base path, that will be used to resolve files and exclude basePath: '', frameworks: ['jasmine'], plugins: [ 'karma-jasmine', 'karma-chrome-launcher', 'karma-phantomjs-launcher' ], // list of files / patterns to ...
var system = require('system'); if (system.args.length != 2) { console.log('Expected a target URL parameter.'); phantom.exit(1); } var page = require('webpage').create(); var url = system.args[1]; page.onConsoleMessage = function (message) { console.log(message); }; console.log("Loading URL: " + url); ...
angular.module('OpenEXP') .config($stateProvider => { $stateProvider .state('experiments.local', { url: '/experiments/local', controller: 'experimentsLocalCtrl', templateUrl: './app/experiments/local/experiments-local.html' }) });
'use strict'; var mongoose = require('mongoose'), Schema = mongoose.Schema; var PostCategory = new Schema({ name: { type: String, required: true, trim: true }, parent: { type: Schema.ObjectId, ref: 'PostCategory' }, isDeleted: { type: Boolean, ...
function init() { activateNonCarousels(); } function activateNonCarousels () { var radios = document.querySelectorAll('.mgr-radios input'), i = 0, l = radios.length; if(l) { if(l > 1) { // if you have more than one card, add back and forward buttons for sited users activateForwardAndBack(...
/** * Source config * * TODO pour la prod sous Symfony 3.3 * https://www.slideshare.net/alainhippolyte1/utiliser-webpack-dans-une-application-symfony * slide 52 */ var path = require('path'); var webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); // const WebpackManif...
/// // Dependencies /// import { combineEpics } from 'redux-observable'; import { Observable } from 'rxjs'; import map from 'lodash/map'; import reject from 'lodash/reject'; import includes from 'lodash/includes'; import api from '../app/api'; import * as actions from './actions'; import * as formsActions from '../fo...
import React, { PropTypes } from 'react' // import { Link } from 'react-router' import { reduxForm } from 'redux-form' import { addJadwal } from '../../redux/modules/jadwal' const form = 'addJadwalForm' const fields = ['kode', 'hari', 'jam_mulai', 'jam_selesai', 'kelas', 'semester', 'akademik', 'ruangan', 'mata_kuliah...
import Ember from 'ember-metal/core'; import run from 'ember-metal/run_loop'; import get from 'ember-metal/property_get'; import EmberObject from 'ember-runtime/system/object'; import isEnabled from 'ember-metal/features'; import { computed } from 'ember-metal/computed'; import { compile } from 'ember-template-compiler...
'use strict'; const Constants = require('./constants').Constants; const CustomerVaultResponse = require('./customerVaultResponse'); const request = require('request'); const logger = require('./logger').logger; const config = require('./config').Config; const ValidateResponse = require('./validateResponse'); const va...
export default function sortNumeric(a, b) { if (arguments.length === 1) { return function(x, y) { return Number(x[a]) - Number(y[a]); }; } return Number(a) - Number(b); }
module.exports = ({ env }) => ({ sourceMap: env === 'production' || 'inline', plugins: { autoprefixer: env === 'production' ? {} : false, cssnano: env === 'production' ? {} : false, } })
"use strict"; let datafire = require('datafire'); let openapi = require('./openapi.json'); module.exports = datafire.Integration.fromOpenAPI(openapi, "azure_apimanagement_apimapiversionsets");
var webpack = require('webpack'); var CopyWebpackPlugin = require('copy-webpack-plugin'); var path = require('path'); module.exports = { entry: [ 'index.tsx' ], devtool: 'eval-source-map', module: { loaders: [{ test: /\.tsx?$/, exclude: 'node_modules', loader: 'ts-loader' }] }...
const cssstats = require('cssstats'), extend = require('extend'), css = require('css'), cssShorthandExpand = require('css-shorthand-expand'), tinycolor = require('tinycolor2'), ntc = require('ntc'), JSON5 = require('json5'), sgUtil = require('../util'), Analyzer = require('./Analyzer'); const storedA...
/** * Success Criterion 1.4.4: Resize text * * @see http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-scale.html */ 'use strict'; quail.guidelines.wcag.successCriteria['1.4.4'] = (function (quail) { /** * Determines if this Success Criteria applies to the document. */ function preEvaluator...
import UserStore from '../stores/UserStore'; import StateStore from '../stores/StateStore'; import path from 'path'; import walk from 'walk'; import fs from 'fs'; class BugReportService { submitBugReport( description ) { this.submitReport({ 'text': 'Bug report', 'description': description }); ...
const Maps = [ // 1 2 3 4 5 6 7 8 9 10 11 12 [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], // 0 [1, 0, 0, 0, 3, 3, 3, 3, 3, 0, 0, 0, 1], // 1 [1, 0, 2, 3, 2, 3, 2, 3, 2, 3, 2, 0, 1], // 2 [1, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 1], // 3 [1, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1], // 4 [1, 3, 3, 3,...
/* Copyright 2014, KISSY v1.43 MIT Licensed build time: May 22 12:21 */ KISSY.add("editor/plugin/flash-common/utils",["swf"],function(d,g){var e=g("swf"),b=d.DOM,f={insertFlash:function(a,c,b,d,e){c=f.createSWF({src:c,attrs:b,document:a.get("document")[0]});b=a.createFakeElement(c.el,d||"ke_flash",e||"flash",!0,c.html,...
export const plus = {"viewBox":"0 0 1408 1792","children":[{"name":"path","attribs":{"d":"M1408 736v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"}}]};
/*! * jQuery JavaScript Library v@VERSION * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: @DATE */ (function( window, undefined ) {; // Can't do ...
// Separate Numbers with Commas in JavaScript **Pairing Challenge** // I worked on this challenge with: . /* Pseudocode Input: Any integer Output: The integer formatted with commas Steps: -Create a function called separate comma that accepts an integer as an argument. -Split the integer into an array. -Reverse the ...
import Dashboard from './dashboard'; import Users from './users'; import Roles from './roles'; export default [ Dashboard, Users, Roles, ];
"use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Action = function Action(payload) { _classCallCheck(this, Action); this.origin = 'unknown'; this.type = 'default'; this.payload = payload...
class MathHelper { static roundNumber(numberToRound, numberOfDecimalPlaces) { if (numberToRound === 0) { return 0; } if (!numberToRound) { return ''; } const scrubbedNumber = numberToRound.toString().replace('$', '').replace(',', ''); return Math.round(scrubbedNumber *...
import chai, {expect} from 'chai'; import bows from 'bows'; import assetReducer from '../reducers'; let logger = bows('chat.tests.state'); describe('assets', () => { let sampleAssets = [ { type: 'img', title: 'Image title goes here', href: 'http://thecatapi.com/api/images/get?forma...
const backgroundVideo = document.querySelector('.js-background-video'); if (backgroundVideo) { const backgroundVideoContainer = document.querySelector('.js-background-video-container'); const stopButton = document.querySelector('.js-stop-button'); const timesToLoop = 20; const videoCredit = document.querySelec...
'use strict'; var Utils = require('./utils') , BelongsTo = require('./associations/belongs-to') , BelongsToMany = require('./associations/belongs-to-many') , InstanceValidator = require('./instance-validator') , QueryTypes = require('./query-types') , Dottie = require('dottie') , Promise = require('./promi...
import Phaser from 'phaser' import {centerGameObjects} from '../utils' import node from 'assets/images/node.png' export default class extends Phaser.State { init() { } preload() { this.loaderBg = this.add.sprite(this.game.world.centerX, this.game.world.centerY, 'loaderBg') this.loaderBar ...
'use strict'; module.exports = { db: (process.env.MONGODB_URI || 'mongodb://localhost/icu'), /** * Database options that will be passed directly to mongoose.connect * Below are some examples. * See http://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html#mongoclient-connect-options ...
define([ 'dcl', 'dcl/bases/Mixer', 'frozen/box2d/CircleEntity', 'frozen/plugins/loadImage!images/head.png' ], function(dcl, Mixer, Circle, headImg){ 'use strict'; return dcl([Mixer, Circle], { draw: dcl.superCall(function(sup){ return function(ctx, scale){ scale = scale || this.scale ||...
'use strict'; var step = require('step'), colors = require('colors'), request = require('request'), fs = require('fs'), http = require('http'), open = require('open'); var MAX_FILE_SIZE = 1024 * 1024; var core = {}; core.showLog = function() { console.log(" ______ __".green...
/* */ 'use strict'; var _extends = require('babel-runtime/helpers/extends')['default']; var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; exports.__esModule = true; var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _classnames = require('cl...
// Fill urls and titles for blog posts (`BLOG_ENTRY`, `BLOG_COMMENT`) // // In: // // - infractions ([users.Infraction]) // - user_info (Object) // // Out: // // - info (Object) - key is `src`, value { url, title, text } // 'use strict'; const _ = require('lodash'); module.exports = function (N, apiPath) { // Fe...
var chennaiSmile = {}; chennaiSmile.eventPage = $("#eventPage"); chennaiSmile.baseUrl = $("#base_url").val(); chennaiSmile.filterElem = {}; chennaiSmile.filterElem.date = $('.filter-date'); chennaiSmile.filterElem.category = $('.filter-tc-button'); chennaiSmile.filterElem.type = $('.filter-type'); chennaiSmile.f...
export const BACKWARD = 'onBackward'; export const BUFFERING = 'onBuffering'; export const ENCOUNTERED_ERROR = 'onEncounteredError'; export const END_REACHED = 'onEndReached'; export const FORWARD = 'onForward'; export const LENGTH_CHANGED = 'onLengthChanged'; export const LOG_MESSAGE = 'onLogMessage'; export const MED...
{ function _class() { babelHelpers.classCallCheck(this, _class); } return _class; }
/** * @ngdoc directive * @name kml-layer * @requires Attr2Options * @description * renders Kml layer on a map * Requires: ng-map directive * Restrict To: Element * * @param {Url} url url of the kml layer * @param {KmlLayerOptions} KmlLayerOptions * (https://developers.google.com/maps/documentatio...
"use strict;" require("crisp-base"); require("crisp-event"); require("../dist/crisp-create.min"); module.exports = require("../test_/CreateJS_test.js");
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dotDivideDocs = void 0; var dotDivideDocs = { name: 'dotDivide', category: 'Operators', syntax: ['x ./ y', 'dotDivide(x, y)'], description: 'Divide two values element wise.', examples: ['a = [1, 2, 3; 4, 5, 6]', 'b = [2, 1...
'use strict'; const THREE = require('three'); export default function Models() { this.missing = 0; this.fox = null; this.flamingo = null; this.horse = null; this.player = null; var self = this; var jsonloader = new THREE.JSONLoader(true); load(this, jsonloader, '/content/fox.json', function(geo) { ...
'use strict'; class Answer { constructor(value) { this._value = value; } toString() { return this._value; } isTruthy() { return ['yes', 'y'].indexOf(this._value) >= 0; } isFalsy() { return ['no', 'n'].indexOf(this._value) >= 0; } } module.exports = A...
import ApplicationAdapter from 'glazier/adapters/application'; var SectionAdapter = ApplicationAdapter.extend({ persistSections: function(sections) { sections.forEach(function(section) { section.adapterWillCommit(); section._inFlightAttributes = section._attributes; section._attributes = {}; ...
import fs from 'fs'; import rimraf from 'rimraf'; import Logger from '../Logger'; import compareReportsCommand from './compareReports'; import domRunner from '../domRunner'; import generateDevSha from '../generateDevSha'; import uploadReport from '../uploadReport'; function indent(str) { return str.replace(/^/gm, '...
import Ember from 'ember'; import { moduleForModel, test } from 'ember-qunit'; const { run } = Ember; moduleForModel('sensor', 'Unit | Model | sensor', { // Specify the other units that are required for this test. needs: [ 'model:hub' ] }); test('celsius to fahrenheit', function(assert) { let model = th...
import 'babel-polyfill'; import _ from 'lodash'; const mongoose = require('mongoose'); import { getModelsBySchema } from './utils'; /** * Mongoose plugin to keep references to attributes synchronized. * @param {Object} schema The original schema. */ const orchestratorPlugin = function(schema) { // Store a lis...
"format register"; var __extends = (this && 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 __(); };System.register(["Component"], function(exports_1) { var Component_1; ...
import React from 'react'; import { Link } from 'react-router'; import Title from './Title'; import Thumbnail from './Thumbnail'; class Result extends React.Component { render() { const style = { display: 'block', textDecoration: 'none', position: 'relative', height: 180, width: 32...
module.exports = { example: require('./example') };
//UUID: c605db72a30e4bd9903282c5ad994fae address: dd:89:22:d8:c1:cb import mixin from './src/mixin'; import BluetoothDevice from './src/BluetoothDevice'; import BatteryService from './src/BatteryService'; //export default class PolarRUN extends mixin(BluetoothDevice,BatteryService) { export default class PolarRUN ...
'use strict'; var gulp = require('gulp'), $ = require('gulp-load-plugins')(); $.util.log('Environment', $.util.colors.blue(gulp.env.production ? 'Production' : 'Development')); var libs = []; gulp.task('scripts', function () { return gulp.src('app/app.jsx') .pipe($.browserify({ insertGlo...
/**@module app-kernel*/ modules.define('app-kernel', [ 'request-listener', 'app-router-base', 'BEMTREE', 'BEMHTML', 'pages', 'app-logger', 'vow' ], function (provide, RequestListener, appRouterBase, BEMTREE, BEMHTML, pages, logger, Vow) { "use strict"; /** * @typedef {Object} RequestData * @prope...
/*jshint node:true */ /*global describe, it */ "use strict"; var assert = require("assert"), common = require("./common"), yarm = require("../index.js"), request = common.request; describe("New instance", function() { it("Should enable creating new yarm instances", function() { assert.strictEqual(typeof yarm....
'use strict'; require('./_signin.scss'); module.exports = { template: require('./signin.html'), controller: ['$log', '$location','authService', SigninController], controllerAs: 'signinCtrl' }; function SigninController($log, $location, authService){ $log.debug('SigninController'); this.serverError=false; ...
'use strict'; // Declare app level module which depends on views, and components angular.module('sohumApp', [ 'ngRoute', 'ngAnimate', 'ngTouch', 'sohumControllers', 'myApp.version' ]) .config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', { templateUrl: 'views/home.html...
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function($) { /* ======== A Handy Little QUnit Reference ...
'use strict'; let pessoa = { sexo: 'Masculino' }; let renan = { nome: 'Renan', __proto__: pessoa }; console.log(renan); console.log(renan.sexo); console.log(renan.__proto__); console.log(renan.__proto__.__proto__); console.log(renan.__proto__.__proto__.__proto__);
module.exports = function (app) { if (!require('../config/config').RATE_LIMIT_MIDDLEWARE) return; /** * Rate limit your API calls. */ let limiter = require('../config/rate-limit'); // apply to all requests app.use(limiter); // OR only apply to requests that begin for ex with /api/ // app.use('/api/...
import * as types from './actionTypes'; export function newSearch(query) { return { type: types.ACTION_TYPES.NEW_SEARCH, payload: { query: query, }, }; }
#!/usr/bin/env node const BBY_API_KEY_MSG = 'BBY_API_KEY environment variable' const RESOURCES = ['products', 'categories', 'stores'] const pkg = require('./package') const updateNotifier = require('update-notifier') const run = require('.') function cli (args, stream, cb) { const clopts = require('cliclopts')([ ...
'use strict'; var defer = require('lodash/function/defer'); /** * Makes sure no exception is made silent. * * The rule is to use "done" only if it is at the end of the promise chain. * * @param {Promise} promise */ function promiseDone(promise) { if (!promise) { throw new TypeError('A Promise is expected ...
import 'angular-toastr'; import 'angular-toastr/dist/angular-toastr.css';
var stgr; stgr = stgr || {}; stgr.router = (function() { 'use strict'; var init, initRoutes, _testHash; init = function(callback) { if (callback == null) { callback = function() {}; } initRoutes(); _testHash(); return callback(); }; initRoutes = function() { var routes; ret...
var assault_2016_11 = [{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 163060059, "Date": "11\/01\/2016", "Time": "10:40 AM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": n...
'use strict'; /** * Module dependencies. */ var _ = require('lodash'), errorHandler = require('../errors.server.controller'), mongoose = require('mongoose'), passport = require('passport'), User = mongoose.model('User'); /** * Signup */ exports.signup = function(req, res) { // For security measurement we rem...
// @flow import React from 'react'; import {storiesOf} from '@storybook/react'; import {action} from '@storybook/addon-actions'; import {linkTo} from '@storybook/addon-links'; import {Button, Welcome} from '@storybook/react/demo'; storiesOf('Welcome', module).add('to Storybook', () => ( <Welcome showApp={linkTo('B...
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var partials = require('express-partials'); var methodOverride = require('method-override'); var ses...
import _JSXStyle from "styled-jsx/style"; export default class { render() { return <div className={_JSXStyle.dynamic([ [ "e359801ddd3b3cb6", [ inputSize ? "height: calc(2 * var(--a)) !important;" : "" ] ] ])}...
import fetch from 'isomorphic-fetch' import { apiUrlConfig } from '../../utils/config' const API_URL = apiUrlConfig + 'api/' // ------------------------------------ // Constants // ------------------------------------ export const LOGIN_START = 'LOGIN_START' export const LOGIN_SUCCESS = 'LOGIN_SUCCESS' export const LO...
restApp.controller("noteAddController", ['$scope', '$http', '$window', '$routeParams', '$location', '$timeout', function ($scope, $http, $window, $routeParams, $location, $timeout) { $scope.newNote = {}; $scope.addNote = function () { if ($scope.addNoteForm.$valid) { $http.post('http://loca...
import * as types from '../constants/actionTypes'; import { HAND, LIBRARY, BATTLEFIELD, COMMAND } from '../constants/zoneTypes'; import { TUTOR_MODAL } from '../constants/modalTypes'; import { getPlaytester } from '../reducers/playtester'; export function reset(resetMulligans = true) { return dispatch => { dis...
'use strict'; const config = require('config'); const nameHelper = require('../helper/name'); const birthdayHelper = require('../helper/birthday'); const moment = config.moment; const queryInstructionsMessage = 'You can ask another question, say enter to add more birthdays or quit to exit.'; const genericHelpForM...
// @flow import semver from 'semver'; import isNil from 'lodash.isnil'; import { getVersionInfo } from './versionInfo'; import * as providers from './providers'; import { IVersionAndStoreUrl } from './providers/types'; import { getLatestVersion, defaultOption as defaultOptionForLatestVersion, } from './getLatestVe...
/* * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions ...
var DinoFactory = (function() { var instance = null; function DinoFactory() { } DinoFactory.prototype.createRandomDino = function() { var dinoType = this.getRandomDinoType(); return this.createDino(dinoType); }; DinoFactory.prototype.createDino = function(type) { r...
/* globals menu*/ Template.sideNav.helpers({ hasUnread() { const user = Meteor.user(); return user && user.settings && user.settings.preferences && user.settings.preferences.roomsListExhibitionMode === 'unread'; }, sortByActivity() { const user = Meteor.user(); return user && user.settings && user.settings....
/* * grunt-jsduck * https://github.com/dpashkevich/grunt-jsduck * * Copyright (c) 2012 Dmitry Pashkevich, contributors. * Licensed under the MIT license. */ module.exports = function(grunt) { 'use strict'; grunt.registerMultiTask('jsduck', 'Compile JSDuck documentation', function(outDir) { var he...
var config=require('./config.json'); var Tasks=require('elliptical-gulp'); var gulp=require('gulp'); var ScaffoldTasks=require('elliptical-scaffold'); var tasks=new Tasks(config); var scaffoldTasks=new ScaffoldTasks(config); // app tasks -------------------------------------------------------------------------------...
var searchData= [ ['get',['Get',['../classv8_1_1_persistent_value_map.html#a19a924d55eddc33645cc844d4ad71004',1,'v8::PersistentValueMap']]], ['getalignedpointerfromembedderdata',['GetAlignedPointerFromEmbedderData',['../classv8_1_1_context.html#aa3b5c1a1a5d145c6096840898013f559',1,'v8::Context']]], ['getalignedpo...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Items = exports.itemsUrl = exports.DefaultTaxEnum = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable ...
/** * @fileoverview Tests for `requireSpacesInsideArrayBrackets` (JSCS) translation * @author Breno Lima de Freitas <https://breno.io> * @copyright 2016 Breno Lima de Freitas. All rights reserved. * See LICENSE file in root directory for full license. */ 'use strict' //-------------------------------------------...
'use strict'; const fs = require('fs'); const helper = require('linden-fs-helper'); module.exports = (configFileName) => { if (helper.fileExists(configFileName)) return false; try { fs.writeFileSync(configFileName, helper.getDefaultConfig()); return true; } catch (err) { con...
module.exports = { description: 'exports variables at end, if possible', options: { moduleName: 'myBundle' }, // solo: true };
"use strict"; MDTCRMCtrls.controller('SampinCtrl', ['$scope','$routeParams','dataSvc','dataShare','$timeout','$http', function ($scope, $routeParams, dataSvc, dataShare, $timeout, $http) { if ($routeParams.sampinId == null) { console.log($routeParams.sampinId); return; }...
// JavaScript Document window.nasezvafahi = "No definition has been found"; window.rimni = "la rimni sutysisku"; window.bangudecomp = "decomposing ..."; window.bangubuild = "Building index..."; window.xuzganalojudri = true; window.judri = "http://jbovlaste.lojban.org/dict/"; window.purc = "Last searched"; window.bangu ...
// @flow // aliasing globals for improved minifications export const win: any = window; export const doc: any = win.document; export const nav: any = navigator; export const encodeURIComponent: string => string = win.encodeURIComponent; export const XMLHttpRequest = win.XMLHttpRequest; export const originalFetch = w...
/** * Test case for fromFiles. * Runs with mocha. */ 'use strict' const fromFiles = require('../lib/validating/from_files.js') const assert = require('assert') describe('from-files', () => { before((done) => { done() }) after((done) => { done() }) it('From files', (done) => { assert.ok(from...
import { supertape } from "./utils.js"; import normalizeRing from "../src/normalize.js"; import interpolate from "../src/interpolate.js"; import { separate, combine } from "../src/multiple.js"; import { toPathString, splitPathString, pathStringToRing } from "../src/svg.js"; let tape = supertape(); let square = "M0,0L...
const fs = require("fs"); const path = require("path"); const abaplint = require("../build/src/index"); function getFiles(dir) { const ret = []; for (const d of fs.readdirSync(dir, {withFileTypes: true})) { if (d.isDirectory()) { for (const sub of getFiles(dir + d.name + path.sep)) { ret.push(d.n...
/*! * jquery.event.drag - v 2.0.0 * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com * Open Source MIT License - http://threedubmedia.com/code/license */ (function (f) { f.fn.drag = function (b, a, d) { var e = typeof b == "string" ? b : "", k = f.isFunction(b) ? b : f.isFunction(a) ? a : n...
'use strict'; var Lib = require('../lib'); var helpers = require('./helpers'); /* * substantial portions of this code from FileSaver.js * https://github.com/eligrey/FileSaver.js * License: https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md * FileSaver.js * A saveAs() FileSaver implementation. * 1.1.201603...
import React from 'react' import {css, rehydrate} from 'glamor' import glamorous, {ThemeProvider, Div} from 'glamorous' import baseStyles from '../styles/base' import GlobalStyles from '../styles/global-styles' import {LocaleProvider} from './locale' import Nav from './nav' import Footer from './footer' // when we can...
/** * * This Page Directive uses RequireJS to `define` a AngularJS constructor function * with its dependencies. * * @author zulfeekar cheriyampurath * @date july, 2014 * */ (function (define) { "use strict"; /** * Register the component class with RequireJS */ define([], function ...
var express = require('express'); var bodyParser = require('./bodyParsing'); var log = require("../stack/log"); var queues = require("./routes/queues"); var testClient = require("./testClient/clientRoute"); var server = express(); server.use(function (req, res, next) { console.log(req.method + ": " + req.url); ...