code stringlengths 2 1.05M |
|---|
var webpackConfig = require('./webpack.config.js');
var Webpack = require('webpack');
var _ = require('lodash');
module.exports = _.assign({}, webpackConfig, {
output: {
filename: 'bundle.min.js'
},
devtool: null,
plugins: [
new Webpack.optimize.UglifyJsPlugin(),
new webpack.Def... |
jest.mock(`fs`, () => {
return {
existsSync: jest.fn(),
readFileSync: jest.fn(),
}
})
jest.mock(`recursive-readdir`, () => jest.fn())
jest.mock(`gatsby-cli/lib/reporter`, () => {
return {
panic: jest.fn(),
}
})
const fs = require(`fs`)
const nodePath = require(`path`)
const readdir = require(`recur... |
var normalizeVector = function(x, y) {
// edge case: 0
if (x === 0 && y === 0)
return { x: 0, y: 0 }
var length;
length = Math.sqrt((x * x) + (y * y))
return {
x: x / length,
y: y / length
}
}
var substractVector = function(x0, y0, x1, x0) {
}
var lerp = function(a, b, amount) {
retur... |
(function() {
'use strict';
angular
.module('app.core')
.provider('logger', loggerProvider);
function loggerProvider() {
var options = {
$log: true
};
return {
config: function(opts) {
angular.extend(options, opts);
},
$get: ['$log', 'toastr', function($l... |
(function () {
'use strict';
var hasWindow = typeof(window) !== 'undefined';
var inherits = hasWindow ? window.nodeUtil.inherits : require('util').inherits;
var EventEmitter = hasWindow ? window.nodeEventEmitter : require('events').EventEmitter;
/**
* This event emitter can fire the followin... |
import {context, index, noop} from '../util/fn';
import d3 from 'd3';
import _dataJoin from '../util/dataJoin';
// The multi series does some data-join gymnastics to ensure we don't -
// * Create unnecessary intermediate DOM nodes
// * Manipulate the data specified by the user
// This is achieved by data joining the s... |
const { isValid } = require('mongoose').Types.ObjectId;
const isValidId = (req, res, next) => {
const { id } = req.params;
const { query_field = '_id' } = req.query;
if (query_field !== '_id' || isValid(id)) {
return next();
}
return res.status(400).send({
error: `id ${id} is invalid!`
});
};
modu... |
export { default } from 'ilios-common/components/common-dashboard';
|
var fs = require('fs'),
path = require('path'),
async = require('async');
var log = require('../log');
exports.model = function(db, callback) {
var models = {};
fs.readdir(__dirname, function(err, files) {
if (err) callback(err);
else {
async.each(files, funct... |
/* eslint no-use-before-define:0 */
/* globals Log*/
import _ from 'underscore';
import s from 'underscore.string';
import moment from 'moment';
/*
Adds migration capabilities. Migrations are defined like:
Migrations.add({
up: function() {}, //*required* code to run to migrate upwards
version: 1, //*required* nu... |
var o = require("ospec")
var browserMock = require("mithril/test-utils/browserMock")
window = browserMock()
o.spec("mithril-util-attributes", function() {
var ma
o.beforeEach(function() {
var mock = browserMock()
if (typeof global !== "undefined") {
global.window = mock
}
ma = require('../... |
///////////////////////
// todo methods
Meteor.methods({
addTodo: function (text, taskId) {
// Make sure the user is logged in before inserting a task
if (! Meteor.userId()) {
throw new Meteor.Error("not-authorized");
}
// bottom of the list
var pos = 0.0;
var ts = Tasks.findOne({_id:... |
import constant from '../actions/constants';
const iniState = {
keyStrokes: [],
incorrect: 0,
total: 0,
timeSpent: 0,
wpf: 0
};
const saveTypeResult = (state = iniState, action) => {
const typeResult = action.typeResult;
switch (action.type) {
case constant.typeResult: {
const... |
if (window.location.hostname == "blog.jemu.name") {
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://matomo.jemu.name/";
_paq.push(["setTrackerUrl", u+"matomo.php"]);
_paq.... |
// @author Taehoon Moon 2015
'use strict';
var Size = require('famous/components/Size');
var Layout = require('./Layout');
var Utility = require('../utilities/Utility');
function SequentialLayout(options) {
Layout.apply(this, arguments);
this.direction = options && options.direction !== undefined ?
... |
// @flow
import { Platform } from 'react-native';
import isNil from 'lodash.isnil';
import isFunction from 'lodash.isfunction';
import * as providers from './providers';
import { IProvider, IVersionAndStoreUrl } from './providers/types';
const latestVersion = null;
export type GetLatestVersionOption = {
forceUpdat... |
'use strict';
// Use application configuration module to register a new module
ApplicationConfiguration.registerModule('customer-panel');
|
'use strict';
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Any commits to this file should be reviewed with security in mind. *
* Changes to this file can potentially create security vulnerabilities. *
* An approval from 2 Core members with history of modifying ... |
/*
* Copyright (c) André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertSyntaxError
} = Assert;
// ClassHeritage : extends LeftHandSideExpression
assertSyntaxError(`class C extends G || H {}`);
assertSyntaxError... |
/* jshint expr:true */
'use strict';
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
var mockery = require('mockery');
var assert = require('yeoman-generator').assert;
var helpers = require('yeoman-generator').test;
var Xml2Js = require('xml2js');
var validator = require('validator');
v... |
import Users from '../models/users.model';
export default (app, router) => {
router.route('/users')
.post((req, res) => {
Users.create({
// text : req.body.text
nombre: req.body.nombre,
sexo: req.body.sexo,
fechaNac: req.body.fechaNac,
email: req.body.email,
... |
define(['exports', '../common/widget-base', '../common/constants', '../common/decorators', '../common/common'], function (exports, _widgetBase, _constants, _decorators, _common) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ejToggleButton = undefined;
function _c... |
$.njCalendar.lang("fi", {
defaultButtonText: {
month: "Kuukausi",
week: "Viikko",
day: "Päivä",
list: "Tapahtumat"
},
allDayText: "Koko päivä",
eventLimitText: "lisää"
});
|
'use strict';
// yarn add -D fs-extra
const fs = require('fs-extra');
/**
* 指定ファイル・ディレクトリをコピーするタスク
* @param {string} origin - コピー元ファイル・ディレクトリの絶対パス
* @param {string} dist - コピー先ファイル・ディレクトリの絶対パス
* @return {Promise<void, Error>}
*/
function copy(origin, dist) {
return new Promise((resolve, reject) => {
fs.c... |
import React from 'react';
import { capitalizeFirstLetter } from '../utils';
export default function Loading({ from, plural }) {
return (
<span>
<span className="fa fa-spinner fa-pulse fa-2x"></span>
{capitalizeFirstLetter(from)} {plural ? 'are' : 'is'} loading
</span>
);
}
|
/*
* Copyright (c) 2015 peeracle 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, modify, merg... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Article Schema
*/
var ChartSchema = new Schema({
time: {
type: Number,
required: true,
trim: true
//default: Date.now
},
value: {
type: Number,
... |
var chai = require('chai'),
expect = chai.expect,
mock = require('./mocks/db.mock'),
SaphyreData = mock.SaphyreData;
describe('this test', function () {
it('should have 6 models', function () {
expect(mock.models).to.have.property('Author');
expect(mock.models).to.have.property('Artic... |
/*! hansi - v0.1.0-alpha - 2014-06-01
* Copyright (c) 2014 Jonas Pommerening; Licensed MIT */
(function() {
'use strict';
if (typeof define === 'function' && define.amd) {
} else if (typeof exports === 'object' && typeof require === 'function') {
} else {
}
})(function() {
'use strict';
});
(function (gl... |
require('proof')(2, async okay => {
await require('./harness')(okay, 'idbcursor_delete_objectstore4')
await harness(async function () {
var db,
t = async_test(),
records = [{ pKey: "primaryKey_0"},
{ pKey: "primaryKey_1"}];
var open_rq = createdb(... |
describe("Spec v2: a", function() {
// ShoppingListApp modulü için bi tane mock service tanımlanır ve before each içinde dependency
// olarak çağrılabilmesi için $provide ile oluşturulur.
beforeEach(function () {
beforeEach(module('ShoppingListApp'));
module(function ($provide) {
$provide.service('S... |
import devtool from "../../../../src/reducers/devtool";
module.exports = devtool({});
|
var EventEmitter = require('events').EventEmitter
, sutil = require('./stringutils')
var LEVELS = {
info: 0,
warning: 1,
error: 2
}
function Logger() {
this.prompt = "[supershell][{level}] ";
this.path = '/tmp/supershell.log';
this.mode = 'none';
this.level = 'info';
}
Logger.prototype.__proto__ = E... |
const expect = require('chai').expect
const eligiblityHelper = require('../../../helpers/data/eligibility-helper')
const claimHelper = require('../../../helpers/data/claim-helper')
const claimChildHelper = require('../../../helpers/data/claim-child-helper')
const expenseHelper = require('../../../helpers/data/expense-h... |
SPP.Brownian=function()
{
SPP.Force.call(this);
};
SPP.inherit(SPP.Brownian,SPP.Force);
SPP.Brownian.prototype.init=function(maxValue,cycle,life)
{
SPP.Force.prototype.init.call(this,0,0, life);
this.maxValue=maxValue;
this.cycle=cycle;
this.pastTime=0;
this.value.reset((Math.random()*2-1)*this.maxValu... |
import Reactotron from 'reactotron-react-native'
import { reactotronRedux as reduxPlugin } from 'reactotron-redux'
import sagaPlugin from 'reactotron-redux-saga'
console.disableYellowBox = true
// First, set some configuration settings on how to connect to the app
Reactotron.configure({
name: 'Demo App'
// host: ... |
// 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/scheduling","../../../tiling","../../../libs/gl-matrix/vec2"],function(c,d,h,e,k){Object.defineProperty(d,"__esModu... |
module.exports = require('./lib/client-builder.js'); |
var ardus = require('../lib/ardus');
ardus.global('profiler').profile();
var person = require('./modules/profile'),
lets = person.doSomething,
response = person.callback;
function respond(result) {
for (var i = 0; i < 1; i++)
console.log(result += '.');
}
// console.log("\nlets ", lets)
lets('G... |
class bidispl_bidispl {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeService()
GetLifeti... |
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { history } from '../store'
import AppBar from 'material-ui/AppBar'
import IconButton from 'material-ui/IconButton'
import IconMenu from 'material-ui/IconMenu'
import MenuItem from 'material-ui/MenuItem'
import FlatButton f... |
// heavily inspired by : https://github.com/prakhar1989/react-tags/
/* @flow */
import React from 'react';
import type { ElementRef } from 'react';
import withStyles from 'isomorphic-style-loader/withStyles';
import s from './TagInput.css';
import Box from '../Box';
import TagPreview from './TagPreview';
import Tag fr... |
import webpack from 'webpack';
import conf from './conf';
export default (context, pluginConf = {}, webpackConf = {}) =>
webpack(conf(context, pluginConf, webpackConf));
|
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {Fiber} from './ReactFiber';
import type {FiberRoot} from './ReactFiberRoot';
import type {ExpirationTime}... |
var gulp = require('gulp');
var usemin = require('gulp-usemin');
var rev = require('gulp-rev');
var minifyCss = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var del = require('del');
var nodemon = require('gulp-nodemon');
var cache = require('gulp-cache');
gulp.task('clean',function () {
return... |
var grunt = require('grunt');
grunt.loadNpmTasks('grunt-aws-lambda');
var AWS = require('aws-sdk')
AWS.config.region = 'us-west-2'
grunt.initConfig({
lambda_invoke: {
default: {
}
},
lambda_deploy: {
default: {
options: {
region: 'us-west-2'
... |
var authentication = require('../controllers/authentication.server.controller.js'),
priceRatio = require('../controllers/price-ratio.server.controller');
module.exports = function (app) {
app.route('/api/priceRatio')
.get(authentication.requiresLogin, priceRatio.list)
.post(authentication.requires... |
import bcrypt from 'bcrypt'
import Hapi from 'hapi'
import Basic from 'hapi-auth-basic'
import hapireact from 'hapi-react-views'
let server
server = new Hapi.Server({debug: { request: ['error'] }})
server.connection({port: 5000})
let users = {
micharch54: {
username: 'micharch54',
password: '$2a$10$CX8f3dPAJ... |
(function () {
'use strict';
/* jshint -W098 */
angular
.module('mean.test')
.controller('TestController', TestController);
TestController.$inject = ['$scope', 'Global', 'Test'];
function TestController($scope, Global, Test) {
$scope.global = Global;
$scope.package = {
name: 'test'
... |
var React = require('react-native');
var {
StyleSheet,
PropTypes,
View,
Text,
Dimensions,
TouchableOpacity,
Image,
} = React;
import MapView from 'react-native-amap-view'
var PriceMarker = require('./PriceMarker');
var { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
c... |
define(
({
viewer:{
main:{
scaleBarUnits: "metric" //"english (for miles) or "metric" (for km) - don't translate.
},
errors:{
createMap: "Kan kaart niet maken",
bitly: 'Bitly wordt gebruikt om de URL die u wilt delen, korter te maken. Bekijk het leesmij-bestand voor details over... |
'use strict';
angular
.module('app', [
'svma.home',
'angular-storage',
'ui.router'
])
.constant("constant", {
"ssid": "svma",
"imagePath": "http://14.63.174.249/getImages",
//"contextPath": "http://localhost:8280/allpetapi/v1/",
"contextPath": "http:/... |
/**
* Copyright 2012-2020, 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';
var Axes = require('../../plots/cartesian/axes');
module.exports = function formatLabels(cdi, trace, fullLayout... |
/**
submit:
Hijacks submit events and sends a request with the current scope as the body.
The request type is the form `method`, and the url the form `action` attribute.
```html
<form fn="submit">
...
</form>
```
*/
import { get } from '../../fn/module.js';
import { events, preventDefault, request } from '../..... |
/**
* Created by michaelseeberger on 29.04.16.
*/
var helper = require('./helper.js');
var chai, chaiAsPromised, expect;
chai = require("chai");
chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
expect = chai.expect;
var expectCountOfPlayersToBe = helper.expectCountOfPlayersToBe;
describe("... |
// All code points with the `Other_Default_Ignorable_Code_Point` property as per Unicode v10.0.0:
[
0x34F,
0x115F,
0x1160,
0x17B4,
0x17B5,
0x2065,
0x3164,
0xFFA0,
0xFFF0,
0xFFF1,
0xFFF2,
0xFFF3,
0xFFF4,
0xFFF5,
0xFFF6,
0xFFF7,
0xFFF8,
0xE0000,
0xE0002,
0xE0003,
0xE0004,
0xE0005,
0xE0006,
0xE0007... |
define([], function() {
'use strict';
return [
'$scope',
'getCreateRequest',
'getRequestStat',
'gettext',
function($scope, getCreateRequest, getRequestStat, gettext) {
$scope.setPageTitle(gettext('Requests'));
$scope.typeSelection = getCreateRequest($scop... |
//
// Src: https://github.com/excid3/stimulus-slimselect
//
import { Controller } from "stimulus"
import SlimSelect from "slim-select"
export default class extends Controller {
static values = {
options: Object
}
connect() {
this.slimselect = new SlimSelect({
select: this.element,
...this.o... |
let Microcosm = require('../Microcosm')
describe('Serialization', function() {
it ('runs through serialize methods on stores', function() {
let app = new Microcosm()
app.addStore('serialize-test', {
getInitialState() {
return 'this will not display'
},
serialize() {
return... |
(function () {
angular.module('sos').directive('sosMenu', function () {
return {
restrict: 'E',
scope: {},
templateUrl: '/app/components/sosMenu/sosMenu.html',
controller: 'sosMenuController'
}
})
})(); |
/**
* Function that returns default values.
* Used because Object.assign does a shallow instead of a deep copy.
* Using [].push will add to the base array, so a require will alter
* the base array output.
*/
'use strict';
const path = require('path');
const srcPath = path.join(__dirname, '/../src');
const dfltPor... |
'use strict';
var schemas = require('../..');
var schemaField = schemas.field;
var SchemaArray = schemas.Array;
var SchemaObject = schemas.Object;
var util = require('../lib/util');
describe('schemas', function () {
describe('.field', function () {
describe('.isNumeric', function () {
var isNumeric = sch... |
'use strict';
const _ = require('lodash');
const utils = require('lib/server-utils');
const {SUCCESS, UPDATED, SKIPPED} = require('lib/constants/test-statuses');
const {ERROR_DETAILS_PATH} = require('lib/constants/paths');
const {stubTool, stubConfig} = require('../utils');
const proxyquire = require('proxyquire');
co... |
/* Copyright (c) 2010-2013 Richard Rodger */
"use strict";
var assert = require('chai').assert
var gex = require('gex')
var parambulator = require('..')
describe('custom', function() {
var pb
it('happy', function() {
pb = parambulator({
required$: 'req',
equalsbar$: 'foo',
exactlyo... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({addBookmark:"Adicionar marcador",goToBookmark:"Ir para marcador",noBookmarksHeading:"Nenhum marcador",noBookmarksDescription:"Adicione marcadores ao seu ma... |
'use strict';
const path = require('path');
const express = require('express');
const morgan = require('morgan');
const templates = require('./templates/templates');
//////
let app = express();
app.use( morgan('combined') );
if (process.env.NODE_ENV === 'development') {
setupDevHotReloading();
} else {
app.use( ... |
import React, {Component, PropTypes} from 'react';
import {findDOMNode} from 'react-dom';
import invariant from 'invariant';
// Export Higher Order Sortable Element Component
export default function SortableElement (WrappedComponent, config = {withRef: false}) {
return class extends Component {
static disp... |
function flattenComponentChildren(component = {}) {
let fields = [];
const children = component.props.children;
if (children) {
if (_.isArray(children)) {
for (const child of children.values()) {
fields.push(child);
fields = fields.concat(flattenComponentChildren(child));
}
} e... |
import { expect } from 'chai';
import getModuleStatusReducer from '../../lib/getModuleStatusReducer';
import getAddressBookReducer, {
getSyncStatusReducer,
getContactListReducer,
getSyncTokenReducer,
} from './getAddressBookReducer';
import actionTypes from './actionTypes';
import syncStatus from './syncStatus';... |
/* eslint-disable no-underscore-dangle */
require([
'sherlock/providers/_ProviderMixin'
], function (
_ProviderMixin
) {
describe('sherlock/providers/_ProviderMixin', function () {
var testObject;
beforeEach(function () {
testObject = new _ProviderMixin();
});
des... |
module.exports={A:{A:{"2":"L H G E A B jB"},B:{"1":"BB","2":"C D d K I N J"},C:{"1":"0 1 5 6 7 8 9 W X Y Z a b c e f g h i j k l m n o M q r s t u v w x y z AB CB DB EB O GB HB","2":"2 3 gB IB F L H G E A B C D d K I N J P Q R S T U V aB ZB"},D:{"1":"0 1 6 7 8 9 g h i j k l m n o M q r s t u v w x y z AB CB DB EB O GB ... |
import React, {Component, PropTypes} from 'react';
import {reduxForm } from 'redux-form';
import {connect} from 'react-redux';
import attachBankValidation from './attachBankValidation';
import { push } from 'react-router-redux';
import { attachInfo, logout } from 'redux/modules/auth';
@connect((state) => ({ user: stat... |
// Set some variables
var port = 8180;
var clients = [];
// Require the modules we need
var http = require('http');
var WebSocketServer = require('websocket').server;
// Create a http server with a callback handling all requests
var httpServer = http.createServer(function(request, response) {
respons... |
'use strict';
var async = require('async');
var util = require('util');
var Address = require('address-rfc2821').Address;
var constants = require('haraka-constants');
exports._get_alias = function (address, callback, connection) {
var plugin = this;
var pool = connection.server.notes.ldappool;
... |
(function() {
angular.module('biznavi.service.user', ['biznavi.service.cordys']).service('userService', ['$q', 'cordysService', 'xmlService', 'NUM_ROWS',
UserService
]);
/**
* UserService
* @constructor
*/
function UserService($q, cordysService, xmlService, NUM_ROWS) {
var self = this;
sel... |
var
Config = require('../Config/System.json'),
Enum = require('./Enum.js');
(function(window)
{
var $type = String,
$prototype = $type.prototype;
$type.__typeName = 'string';
//$type.__typeCode = TypeCode.String;
$type.__class = true;
// StringComparison Enum
window['StringComparison'] = new Enum... |
const gulp = require('gulp');
const concat = require('gulp-concat');
const uglifycss = require('gulp-uglifycss')
const cssFiles = [
'_css/poole.css',
'_css/hyde.css',
'_css/**/*.css',
];
gulp.task('css', function() {
return gulp.src(cssFiles)
.pipe(concat('all.min.css'))
.pipe(uglifycss({
... |
var assert = require('assert');
var Combo = require('../index')
var fs = require('fs')
var reTags = {
script: /<(script)([^>]*)>((?:.|\r\n)*?)<\/script>/g,
link: /<(link)([^>]*?)\/?>/g
}
/**
* 获取匹配指定正则表达式的TAG列表
* @param {String} rawHtml 待匹配的HTML源
* @param {Regexp} reTag 指定的正则表达式
* @returns {Array} 匹配的TAG列表
*/... |
// ----------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// --
// Copyright 2016-2018 Andi Dittrich <... |
import { pick } from '../../utils'
import Geoloc from './geoloc.vue'
function plugin (Vue, options = {}) {
if (plugin.installed) {
return
}
plugin.installed = true
options = pick(options, 'dataProjection')
Object.assign(Geoloc, options)
Vue.component(Geoloc.name, Geoloc)
}
export default plugin
exp... |
'use strict'
const url = require('url')
const path = require('path')
const rdf = require('rdflib')
const ns = require('solid-namespace')(rdf)
const defaults = require('../../config/defaults')
const UserAccount = require('./user-account')
const AccountTemplate = require('./account-template')
const debug = require('./.... |
/*!
* Phosphor Framework 1.0.2
* http://www.divergentmedia.com/phosphor
*
* Copyright 2013, divergent media, inc.
* Licensed under the MIT license.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal... |
import React from 'react'
import renderer from 'react-test-renderer'
import transform from '../lib/transform'
describe('transform', () => {
it('should transform headings', () => {
const src = '# Hello, world!\n## This is a test.'
const component = renderer.create(transform(src))
expect(component.toJSON... |
'use strict';
/* global app:false */
app.directive('traffic', ['TrafficFactory', function (TrafficFactory) {
return {
templateUrl: 'app/traffic/traffic.html',
restrict: 'EA',
link: function ($scope) {
$scope.currentStation = {};
$scope.currentStation.Name = 'Gullmarsplan';
$scope.factor... |
import errorLogger from '@keboola/middy-error-logger';
import middy from 'middy';
import CognitoEmail from '../lib/CognitoEmail';
import Services from '../lib/services';
// eslint-disable-next-line no-unused-vars
import lambdaHandler from '../lib/lambda-handler';
const handlerFunction = async (event, context, callbac... |
var pkg = require('./package.json');
var clean = require('gulp-clean');
var concat = require('gulp-concat');
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var jshintStylish = require('jshint-stylish');
var header = require('gulp-header');
var karma = require('karma').server;
var ngAnnotate = require... |
const sketchDstH = 1024;
const sketchDstW = 2048;
var cameraInput;
$( document ).ready(function() {
cameraInput = document.getElementById("file-input");
cameraInput.addEventListener('change', uploadPic, false);
window.addEventListener('hashchange', hashChange, false);
});
function hashChange(){
if (location.... |
require('babel-polyfill'); |
/**
* 基本模块定义
*/
export default class BaseModule {
constructor(moduleName, moduleTarget, moduleData) {
this.moduleName = moduleName;
this.moduleTarget = moduleTarget;
this.moduleData = moduleData;
}
}
|
var PageController = function($scope, $routeParams, PageService, $location) {
var userId = $routeParams.uid;
var websiteId = $routeParams.wid;
var pageId = $routeParams.pid;
this.pages = PageService.findPageByWebsiteId(websiteId);
this.currentPage = PageService.findPageById(pageId);
this.toProfile = functi... |
// /* Blob.js
// * A Blob implementation.
// * 2014-07-24
// *
// * By Eli Grey, http://eligrey.com
// * By Devin Samarin, https://github.com/dsamarin
// * License: X11/MIT
// * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
// */
// /*global self, unescape */
// /*jslint bitwise: true, regexp... |
//Getting a string for a players name
var boscode = require('boscode');
var getPlayerName;
getPlayerName = function (playerName) {
return playerName;
};
boscode.display(getPlayerName('Kandra'));
|
/**
* Wraps a Meteor method into a Promise.
* This is particularly useful for creating information dialogs after execution of a Meteor method
* @param {The Meteor method to be calls} method
* @param {the method's parameters} params
*/
export const call = (method, ...params) => new Promise((resolve, reject) => {
M... |
// Controller for admin-related API functionality
import mongoose from 'mongoose';
import { middlewareFactory } from '../_common/express-helpers';
import authUserGoogle from './authUserGoogle';
// to abstract the token validation (in case we want to change later to,
// e.g. Facebook login), validation is done by... |
// TODO: Lobby is where the players lie |
<<<<<<< HEAD:main.js
/*
* Author: Daniel Holmlund <daniel.w.holmlund@Intel.com>
* Copyright (c) 2015 Intel Corporation.
*
* 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 restric... |
$(function() {
window.tableUpdate0 = function tableUpdate0(edit) {
var updateTable0 = {};
var test = getData();
var editvalues = {};
for(var i=0; i<edit.length; i++) {
editvalues[test[1][0][edit[i][0][1]]] = edit[i][0][3];
alert(test[1][0][edit[i][0][1]]);
alert(edit[i][0][3]);
}
var con = [];
... |
var concat = require('gulp-concat');
var gulp = require('gulp');
var jasmine = require('gulp-jasmine');
var jshint = require('gulp-jshint');
var gettext = require('gulp-angular-gettext');
gulp.task('lint', function() {
gulp.src(['src/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('t... |
export default function setEnvironment(environment) {
return function setEnvironment$filter(notice) {
notice.context.environment = environment;
return notice;
};
}
|
/* exported StickyHeader */
function StickyHeader(scrollable, sticky) {
'use strict';
var headers = scrollable.getElementsByTagName('header');
var stickyPosition;
var stickyStyle = sticky.style;
this._throttledRefresh = function() {
var display = false;
if (stickyPosition === undefined) {
sti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.