code stringlengths 2 1.05M |
|---|
describe('TComponent Directive', function () {
let element,scope;
let todo = {
id:1,
type:"todo",
created: "10/07/2017 17:00:50",
raw: "TODO 12/07/2017 at 17:00:50 Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
tcompid:1,
dueDate: "12/07/2017 17:00:50",
descript... |
/*global module*/
/*global require*/
// Generated on 2014-04-28 using generator-angular 0.8.0
'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 = functi... |
angular.module("kanmApp.front").controller("ContactCtrl",['$scope','$http','$modal', "officers", function($scope,$http,$modal, officers) {
$scope.nopic = "/server/_assets/img/officerpics/nopic.png";
$scope.officers = officers;
}]);
|
var grunt = require('grunt');
module.exports = {
amd: {
src: [ 'tmp/**/*.amd.js' ],
dest: 'tmp/ember-crud.amd.js'
},
globals: {
src: [ 'tmp/**/*.amd.js' ],
dest: 'dist/ember-crud.js'
}
};
|
exports.loginRequired = function(req, res, next){
if(req.session.user){
next();
}else{
res.redirect('/login');
}
};
exports.new = function(req, res){
var errors = req.session.errors || {};
req.session.errors = {};
res.render('sessions/new', { errors: errors});
};
exports.create = function(req,res)... |
/*
./src/utils/now.js
An implementation of the best-performing now() available
*/
msngr.extend(function (external) {
"use strict";
var nowExec = undefined;
var lastNow = undefined;
var nowPerformance = function() {
return performance.now();
};
var nowNode = function() {
... |
//import {createStore, applyMiddleware} from 'redux'
//import rootReducer from '../reducers/index';
//import thunk from 'redux-thunk';
//
//export default function configureStore(initialState){
// return createStore(
// rootReducer,
// initialState,
// applyMiddleware(thunk)
// );
//} |
// Copyright 2014 Technical Machine, Inc. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
/... |
// ------------------------------------------------------------------------
// GuiGhost Games 2017
//
//
var newGameLoad = 0;
window.onload = function() {
// Get the canvas and context
var canvas = document.getElementById("viewport1");
var context = canvas.getContext("2d");
//game sound loop
var so... |
var AnimakitExpander = require('./lib/AnimakitExpander');
AnimakitExpander.displayName = 'AnimakitExpander';
module.exports = AnimakitExpander;
|
/*
**** Autore: Matteo Granzotto
**** Link project: https://github.com/Blundert/Calendario-partite-Treviso-Basket
**** Data: Novembre 2015
**** Versione: 1.1
**** Descrizione: Metodo semplice ed intuitivo per importare gli orari e le date delle partite di TVB sul proprio calendario personale.
**** License: MIT
*/
$(do... |
/**
* @fileOverview tests.js Gives testing code for the tooltip
* that is displayed on injected content.
*
* This spec is managed by the Jasmine testing library.
**/
describe ("Tooltip Test Suite", function() {
afterEach(function() {
document.body.innerHTML = "";
});
it("updates the message", functio... |
const settings = require('./../../settings.json');
const moment = require('moment');
/**
* This method should return the response directly to the channel
* @param {*string array} params
* @param {*message} message
*/
async function command(params, message) {
if (settings.owners.includes(message.author.id)) {
... |
/*!
* A MongoDB inspired ES6 Map() query language. - Copyright (c) 2017 Louis T. (https://lou.ist/)
* Licensed under the MIT license https://raw.githubusercontent.com/LouisT/MapQL/master/LICENSE
*/
'use strict';
/*
* A list of data types used in import/export.
*/
const DataTypes = {
// List of primitives... |
const express = require('express');
const url = require('url');
const router = express.Router();
module.exports = () => {
router.delete('/', (req, res) => {
let {profileUuid} = url.parse(req.url, true).query;
let metadataUrls = Storage.get('metadataUrls');
metadataUrls = metadataUrls.map((metadata) =>
... |
import React, { Component } from 'react'
import Sliders from './Sliders'
import Dots from './Dots'
import styles from '../assets/style/slide.styl'
class Slide extends Component {
constructor(props) {
super(props)
this.autoSlideHandler = this.autoSlideHandler.bind(this)
this.SlideInter = null
this.state = {
... |
/**
* DocuSign REST API
* The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
*
* OpenAPI spec version: v2.1
* Contact: devcenter@docusign.com
*
* NOTE: This class is auto generated. Do not edit the class manually and submit a new issue inste... |
var gulp = require('gulp');
var runSequence = require('run-sequence');
// require external tasks
require('./gulp/concat.js');
require('./gulp/server.js');
require('./gulp/test.js');
require('./gulp/watch.js');
require('./gulp/style.js');
require('./gulp/dist.js');
gulp.task('default', ['serve']);
gulp.task('serve', f... |
import React from 'react/addons';
import AuthLinks from './AuthLinks.js';
const TestUtils = React.addons.TestUtils;
const Simulate = TestUtils.Simulate;
function renderComponent(comp, props) {
return TestUtils.renderIntoDocument(
React.createElement(comp, props)
);
}
function simulateClickOn(selector) {
va... |
import React, { Component, PropTypes } from 'react';
import CustomRadioButton from './CustomRadioButton';
/**
* This component is a workaround for problematic binding with input[type=radio]
* The issue is open here
* https://github.com/facebook/react/issues/5897
*/
export default class CustomRadioGroup extends Com... |
'use strict';
import Backbone from 'backbone';
class RegionsCollection extends Backbone.Collection {
url() {
return `${config.apiUrl}/countries`;
}
comparator(region) {
return region.name;
}
};
export default new RegionsCollection();
|
/* jshint expr: true */
/* global before, beforeEach, after */
'use strict';
var User = require('../lib/models/user');
var db = require('../lib/db');
var q = require('q');
var util = require('util');
var chai = require('chai');
var expect = chai.expect;
var server = null;
var get, post;
var port = 383273;
var baseU... |
/* eslint-disable global-require */
import React from 'react';
import { Route, IndexRoute, IndexRedirect } from 'react-router';
import App from './modules/App/App';
import User from './modules/User/User';
import Game from './modules/Game/Game'
import { isAdmin, isReporter, isLoggedIn } from './util/apiCaller';
// req... |
import test from 'ava';
import TypedArrayBuffer from '../typed-array-buffer';
import basicTests from './helpers/_basic-tests';
import appendTest from './helpers/_append-tests';
import inheritanceTest from './helpers/_inheritance-tests';
import fromStringTests from './helpers/_from-string-tests';
import mapTests from '... |
let vec4 = Float32Array;
export default function (a, b, c, d, dst = new vec4(4)) {
dst[0] = a;
dst[1] = b;
dst[2] = c;
dst[3] = d;
return dst;
}
|
function() {
$script("tmp/foo.js","foo");
$script(["tmp/bar.js","tmp/baz.js"],"stuff");
$script.ready(["foo","stuff"], function() {
runMyApp();
});
} |
/* @flow */
import React, { Component } from 'react';
import { createLog } from '../utils';
const ENABLE_LOG = false;
const log = createLog(ENABLE_LOG, 'LevelMeter');
const DB_MIN_SCALE = -48;
const PEAK_BUFFER_SIZE = 40;
const MIN_LIN = Math.pow(10, DB_MIN_SCALE / 20);
function linToDb(lin) {
return 20 * Math... |
import { fork, call, put, take, select } from 'redux-saga/effects'
import firebase from 'firebase'
import * as constants from './constants'
import * as actions from './actions'
function getPackageLevels(packageId) {
return firebase.database().ref('/levels').orderByChild("packageId").equalTo(Number(packageId)).once(... |
'use strict';
angular.module('projects').controller('CreateProjectController', ['$scope', '$stateParams', '$location', 'Authentication', 'Projects', '$http', '$mdToast', '$mdDialog', '$timeout', '$rootScope', 'RESOURCE_DOMAIN',
function($scope, $stateParams, $location, Authentication, Projects, $http, $mdToast, $mdDi... |
initSidebarItems({"mod":[["length_delimited","Frame a stream of bytes based on a length prefix"]],"struct":[["BytesCodec","A simple `Codec` implementation that just ships bytes around."],["Framed","A unified `Stream` and `Sink` interface to an underlying I/O object, using the `Encoder` and `Decoder` traits to encode an... |
bf.directive('bfAssertSameAs', function () {
return {
restrict: 'A',
require: 'ngModel',
link: function (scope, elm, attrs, modelCtl) {
modelCtl.$validators.same = function (modelValue, viewValue) {
var value = modelValue || viewValue;
var anotherV... |
"use strict";
var path = require('path')
var fs = require('vigour-fs-promised')
var http = require('http')
var SocketIO = require('socket.io')
var Bundler = require('../bundler')
var HttpServer = require('../http-server')
var registry = {}
var Daemon = module.exports = {
server: undefined,
listening: false,
lis... |
"use strict";
var PassThrough = require("stream").PassThrough,
zlib = require("zlib"),
convert = require("./convert.js")
;
var STORE = 0x00,
DEFLATE = 0x08
;
var isDir = /[\/\\]$/;
var Entry = module.exports = function(raw) {
this._stream = null;
this.raw = { };
this.update(raw);
}
Entry.prototype.update ... |
/**
* First we will load all of this project's JavaScript dependencies which
* include Vue and Vue Resource. This gives a great starting point for
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
/**
* Next, we will create a fresh Vue application instance and attach ... |
import {combineReducers} from 'redux';
import {routerReducer} from 'react-router-redux';
import {reducer as formReducer} from 'redux-form';
import requests from './requests';
import entities from './entities';
const rootReducer = combineReducers({
entities,
requests,
routing: routerReducer,
form: formReducer,
... |
var express = require('express');
var router = express.Router();
var passport = require('passport');
/* signup page */
router.get('/', function (req, res, next) {
res.render('signup', { title: 'signup',
message: req.flash('error') });
});
/* signup newuser credentials sent through post */
... |
/* @flow */
'use strict';
var React = require('react-native');
var CalendarManager = require('react-native').NativeModules.CalendarManager;
var { DeviceEventEmitter } = require('react-native');
var {
StyleSheet,
Text,
TextInput,
View,
TouchableHighlight,
ActivityIndicatorIOS,
Image,
Component
} = Reac... |
'use strict';
// $viewPathProvider, to allow overriding system default views
angular.module('mean.system').provider('$viewPath', function() {
function ViewPathProvider() {
var overrides = {};
this.path = function(path) {
return function() {
return overrides[path] || path;
};
};
... |
var warningState = {
preload : function() {
game.load.image('warning', 'assets/warning.png');
},
create : function() {
var warning = game.add.sprite(0, 0, 'warning');
warning.alpha = 0;
t1 = this.game.add.tween(warning);
t1.to({
alpha : 1
}, 2000, Phaser.Easing.Linear.None, true);
t1.onComplete.... |
import React, { Component } from 'react';
import svg from 'lib/svg';
@svg({
width: 600,
height: 497.2
})
class BookWormEGW extends Component {
render = () => {
const st2Style = {
opacity: .1
};
const st12Style = {
opacity: .5
};
/* eslint-dis... |
// Import React
import React from "react";
// Import Spectacle Core tags
import {
BlockQuote,
Cite,
Deck,
Heading,
ListItem,
List,
Quote,
Slide,
Text,
Appear,
CodePane,
Link,
Layout,
Fill,
Notes
} from "spectacle";
// Import image preloader util
import preloader from "spectacle/lib/utils... |
/**
* Copyright (c) 2013-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.
*
* @providesModule setRelayModernMutationConfigs
*
* @format
*/
'use strict';
function setRelayModernMutationConfigs(configs, operat... |
/*
polyfil script for details support based on the code here
https://gist.github.com/remy/370590
*/
(function (window, document) {
if ('open' in document.createElement('details')) return;
// made global by myself to be reused elsewhere
var addEvent = (function () {
if (document.addEventListener) {
return fu... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var caretLeft = exports.caretLeft = { "viewBox": "0 0 640 1792", "children": [{ "name": "path", "attribs": { "d": "M640 448v896q0 26-19 45t-45 19-45-19l-448-448q-19-19-19-45t19-45l448-448q19-19 45-19t45 19 19 45z" } }] }; |
(function() {
'use strict';
var app = angular.module('goteoStatistics');
/**
* Angular service to interact with Goteo's API.
*/
app.service('GoteoApi', [
'ApiService',
'$rootScope',
'$translate',
function(ApiService, $rootScope, $translate) {
var api = {};
api.getCategories = ... |
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('my app', function() {
browser.get('index.html');
it('should automatically redirect to /home when location hash/fragment is empty', function() {
expect(browser.getLocationAbsUrl()).toMatch("/index");
});
describe('home', ... |
(function () {
'use strict';
angular
.module('chairYg')
.config(config);
/** @ngInject */
function config() {
}
})();
|
var member = require("./member.js"),
rp = require("request-promise"),
common = require("./common.js"),
event = require("./event.js"),
album = require("./album.js"),
doc = require("./doc.js"),
post = require("./post.js"),
file = require("./file.js");
const graphAPIUrl = "https://graph.fac... |
SystemJS.config({
devConfig: {
"map": {
"babel-plugin-transform-react-jsx": "npm:babel-plugin-transform-react-jsx@6.8.0",
"core-js": "npm:core-js@2.4.1",
"plugin-babel": "npm:systemjs-plugin-babel@0.0.10"
},
"packages": {
"npm:babel-helper-buil... |
const Card = require('./card/connector');
const User = require('./user/connector');
module.exports = {
Card,
User
};
|
var $input = $('#input');
var input = $input.get(0);
var $d = $(document);
var $status = $('#status');
var $mb = $('#mini-buffer');
var $body = $('html,body');
$(function(){
$input.val('');
var ime = false;
input.focus();
$input.blur(function(){input.focus();}).focusout(function(){input.focus();});
setInterva... |
class mtxspm_sharedpropertygroupmanager_1 {
constructor() {
// ISharedPropertyGroup Group (string) {get}
this.Parameterized = undefined;
}
// ISharedPropertyGroup CreatePropertyGroup (string, int, int, bool)
CreatePropertyGroup(string, int, int, bool) {
}
}
module.exports = mtxs... |
/**
* @license AngularJS v1.2.2
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {'use strict';
/**
* @description
*
* This object provides a utility for producing rich Error messages within
* Angular. It can be called as follows:
*
* var exampleMinEr... |
"use strict";
const findAtRuleContext = require("../findAtRuleContext");
const postcss = require("postcss");
it("findAtRuleContext", () => {
const css = `
a {}
@media print {
b {}
}
@media (min-width: 900px) {
c {}
}
d {}
`;
return postcss()
.process(css, { from: undefin... |
/*
* Copyright (c) 2012-2014 André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertSame, assertTrue, assertSyntaxError
} = Assert;
// 13.1.*: Behaviour for top-level GeneratorDeclarations unclear
// https://bugs.... |
(function() {
angular.module('biznavi.components.businesstree', [])
.controller('businessTreeController', ['$q', '$scope', '$mdDialog', '$translate', 'utilService', 'xmlService', 'businessTreeService', 'toastService',
BusinessTreeController
]);
/**
* BusinessTreeContro... |
$.extend({
feature: function(body_class, callback) {
// calling $.feature('bclass', function () {}) means that the function will
// only get called when your body tag has the correct class.
if ($('body').hasClass(body_class)) {
$(callback);
}
}
});
$(function() {
var csrftoken = $.cookie('c... |
app.directive("aceLxInput", function() {
return {
restrict: "E",
require: 'ngModel',
replace: true,
compile: function(tElem, tAttrs) {
var form = tAttrs.aceLxFormName + '.' + tAttrs.name;
var formError = form + '.$error';
function camelToDash(str) {
return str.replace(/\W+/g... |
module.exports = (Model, options) => {
let currentSiteForInstance;
// TODO: Site selector to API explorer
Model.beforeRemote('**', (ctx, user, next) => {
currentSiteForInstance = ctx.req.site;
next();
});
Model.observe('access', (ctx, next) => {
if (!ctx.query.where) ctx.query.where = {};
if (!ctx.query.... |
import React from 'react';
import proxyquire from 'proxyquire';
import {defaultsDeep} from 'lodash';
import {List} from 'react-virtualized';
import {mkConnectedComponent} from './utils';
import viewModes from 'lib/constants/view-modes';
describe('<Suites/>', () => {
const sandbox = sinon.sandbox.create();
let... |
'use strict';
const path = require('path');
const fs = require('fs');
const app = require('app');
const BrowserWindow = require('browser-window');
const shell = require('shell');
const Menu = require('menu');
const appMenu = require('./menu');
require('electron-debug')();
require('crash-reporter').start();
let mainWi... |
// flow-typed signature: 0a2dbb11c137c0b31ad4691ce8c5db9b
// flow-typed version: <<STUB>>/stylelint-config-standard_v^16.0.0/flow_v0.46.0
/**
* This is an autogenerated libdef stub for:
*
* 'stylelint-config-standard'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage y... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommandLineArgs = void 0;
const MeasurementType_1 = require("../runner/config/MeasurementType");
const ExecutionType_1 = require("../runner/config/ExecutionType");
const Converter_1 = require("../utilities/Converter");
class CommandLin... |
var unirest = require('unirest')
var harplayer = require('harplayer')
var statusCodes = require('./codes.js')
function statusCategory(code) {
if (code >= 100 && code < 200) {
return "Informational"
} else if (code >= 200 && code < 300) {
return "Success"
} else if (code >= 300 && code < 400) {
return... |
import React from 'react';
import {
StyleSheet,
Switch,
Text,
View
} from 'react-native';
const Switcher = (props) => {
return <View>
<Switch
thumbTintColor = '#fc5888'
onTintColor = '#f5afbb'
onValueChange = {(value) => prop... |
import MainThreadReceiver from "./mainThreadReceiver";
import menubar from "menubar";
import IconResolver from "./IconResolver";
import { MainMenu } from "./mainMenu";
export class Initializer {
constructor({
mainWindow,
isDevMode,
indexPath,
iconPath,
big,
app,
openDevTools,
alwaysOn... |
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { ComplexDependencies } from './dependenciesComplexClass.generated';
import { divideScalarDependencies } from './dependenciesDivideScalar.generated';
import { logDependencies } from './dependenciesLog.generated';
import { typedDependencies } from ... |
import { emit } from "../../api";
export function roomUpdated(room) {
return { type: "room/updated", room };
}
export function loadingMessages(roomId) {
return { type: "message/loadingMany", roomId };
}
export function messageSent() {
return { type: "message/sent" };
}
export function messageReceived(message) {
... |
'use strict'
require('./tasks/build')
require('./tasks/release') |
;(function(window, Modernizr){
var
// Is Modernizr defined on the global scope
Modernizr = typeof Modernizr !== "undefined" ? Modernizr : false,
// whether or not is a touch device
isTouchDevice = Modernizr ? Modernizr.touch : !!('ontouchstart' in window || 'onmsgesturechange' in window),
// Ar... |
webpackJsonp([0,4],[
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(8)
, core = __webpack_require__(7)
, hide = __webpack_require__(28)
, redefine = __webpack_require__(15)
, ctx = __webpack_require__(40)
, PROTOTYPE = 'prototype';
var $e... |
'use strict';
// TODO: is the following comment still true??
// This class is only for attr parameters to simplify dependency injection, all other functionality
// is handled by Attr
var AttrParams = function (docId, name, value, changedByUserId, destroyedAt, recordedAt, updatedAt,
seq, quorum, userUUID, colId, docU... |
"use strict";
const express = require("express");
const router = express.Router();
const passport = require("passport");
const User = require("./model");
require('./local');
router.get("/login", (req, res) => {
res.render("login");
});
router.post('/login',
passport.authenticate('local',
{
successRed... |
const fs = require('fs')
const path = require('path')
const yaml = require('js-yaml')
const imageHelpers = require('../src/utils/imageHelpers.js')
// Output format
// [
// {
// "original": "/path/to/big/original/image.jpg",
// "versions": [
// {
// "format": "jpg",
// "default": true,
// "sizes... |
'use strict';
describe('liltaelApp', function () {
var module;
beforeEach(function () {
module = angular.module('liltaelApp');
});
it('should be registered', function () {
expect(module).not.to.be(null);
});
}); |
'use strict';
var Crud = require('./crud');
var Form = require('../dto/form');
var q = require('q');
function Response(db, userLogged) {
this.crud = new Crud(db, 'RESPONSE', userLogged);
this.db = db;
this.userLogged = userLogged;
//DB Table Schema
this.schema = {
id : '/Response',
type : 'object',
propert... |
var fs = require('fs');
var _ = require('lodash');
function TemplateRenderer () {
this.template = function(filepaths, dest, options) {
var templates = this.render(filepaths, options);
this.writeFiles(templates, dest);
};
/**
* The main render function.
*/
this.render = function(filepaths, op... |
jQuery(function($){
//region Section Full Height
var $w = $(window),
$sections = $('.pi-section-high, .pi-block-high'),
resizeTMT;
$w.resize(function(){
clearTimeout(resizeTMT);
resizeTMT = setTimeout(function(){
setSectionHeight();
}, 100);
});
setSectionHeight();
function setSec... |
"use strict";
exports.Route = [
{ path: './doctor-profile', title: 'Change Password', icon: 'dashboard', class: '' },
/*{ path: './doctor-view-profile', title: 'View Profile', icon:'content_paste', class: '' },*/
{ path: './doctor-view-appointment', title: 'Appointments', icon: 'person', class: '' },
{... |
(function() {
'use strict';
const angular = require('angular');
angular
.module('andHow')
.controller('TestCtrl', TestCtrl);
TestCtrl.$inject = [
'$scope',
];
function TestCtrl($scope) {
var testCtrl = this;
}
}());
|
/**
* @externs
* @suppress {duplicate}
*/
// NOTE: generated by tsickle, do not edit.
/**
* @constructor
* @struct
* @param {number} opt_a
*/
function MultipleConstructorsOptional(opt_a) {}
/**
* @constructor
* @struct
* @param {boolean|number} a
*/
function MultipleConstructorsTypes(a) {}
/**
* @constru... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnvController = void 0;
const tslib_1 = require("tslib");
const route_1 = require("@appolo/route");
let EnvController = class EnvController extends route_1.Controller {
test(req, res) {
res.json({ working: true, controllerN... |
import passport from 'passport';
import Nodemailer from 'nodemailer';
import md5 from 'spark-md5';
import User from '../models/user';
import VerificationToken from '../models/verificationToken';
import PasswordResetToken from '../models/passwordResetToken';
import * as constants from '../../../constants';
export funct... |
var modes = require('../lib/modes.js');
module.exports = function (repo) {
repo.logWalk = logWalk; // (ref) => stream<commit>
repo.treeWalk = treeWalk; // (treeHash) => stream<object>
};
module.exports.walk = walk;
function logWalk(ref, callback) {
if (!callback) return logWalk.bind(this, ref);
var last, se... |
'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var rename = require("gulp-rename");
module.exports = yeoman.Base.extend({
prompting: function () {
// Have Yeoman greet the user.
this.log(yosay(
'Welcome to the pioneering ' + chalk.blu... |
import React from 'react'
import { Provider } from 'react-redux'
import { Router } from 'react-router'
export default class Root extends React.Component {
static propTypes = {
history: React.PropTypes.object.isRequired,
routes: React.PropTypes.element.isRequired,
store: React.PropTypes.object.isRequired
... |
import { PropTypes } from 'react';
import { BEM } from 'rebem';
const block = 'demo-item';
function renderTitle(props) {
if ('title' in props) {
return BEM(
{
block,
elem: 'title',
tag: 'h3'
},
props.title
);
}... |
var BUILD_TIMESTAMP = "14 Jan 2014 3:22";
|
var sectionAnimationTime = 750;
var sectionAnimation = true;
var section = 0;
var loadedPortfolio = false;
var portfolio = false;
var images = [];
function showSection(section) {
var $section, $sectionContent, delay;
$sectionBackground.removeClass();
switch (section) {
case 0:
$sectionB... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.browser = browser;
var _system_js_hot_reloadJs = require('./system_js_hot_reload.js');
function browser(window, bs) {
(0, _system_js_hot_reloadJs.HotReload)();
}
'use strict';
Object.defineProperty(exports, '__esModule', {
va... |
/*globals requireJS, module*/
'use strict';
const CONSTANTS = requireJS('common/storage/constants');
function __connectUserToRouter(router, socketId, handles) {
router._handles[socketId] = handles;
}
/** Class for individual users connected via websocket to the websocket router. */
class WebsocketRouterUser {
... |
'use strict';
var url = require('url');
var safeVerb = require('../../helpers/safe-verb.js');
var hasCustomResponder = require('./has-custom-responder.js');
var getContent = require('./get-content.js');
var customize = require('../customize.js');
/**
* Get the function which will respond to this endpoint.
* It cou... |
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
import HomeView from '../views/HomeView.vue'
import AboutView from '../views/AboutView'
export default new Router({
model: 'history',
scrollBehavior: () => ({y: 0}),
routes: [
{ path: '/home', component: HomeView},
{ path: '/about', ... |
'use strict';
describe('Session', function() {
var session;
beforeEach(module('angularShiro'));
beforeEach(function() {
session = new Session();
});
it('should have a starttime', function() {
expect(session.getStartTimestamp()).not.toBeNull();
expect(session.getStartTimestamp()).toBeDefined(... |
'use strict';
var url = require('url');
angular.module('tangHelper.common', [])
.factory('getLocalIP', function($q) {
return function() {
var df = $q.defer();
chrome.system.network.getNetworkInterfaces(function(items) {
df.resolve(items.filter(function(el) {
... |
// Learn more on how to config.
// - https://github.com/ant-tool/atool-build#配置扩展
const webpack = require('atool-build/lib/webpack');
const fs = require('fs');
const path = require('path');
const glob = require('glob');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var OpenBrowserPlugin = require('open-brows... |
"use strict";var ResKit={};ResKit.params=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"服务器繁忙",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n={status:t,data:e,in... |
let gamepad;
var menuState = {
create: function () {
gamepad = game.input.gamepad;
let logo = game.add.image(0, 0, 'title-text');
let start = game.add.image(0, 0, 'title-start');
let startKey = game.input.keyboard.addKey(Phaser.Keyboard.A);
startKey.onDown.addOnce(this.sta... |
/** Array which stores all functions to be called upon game initialization **/
var EngineInitializationFunctions = [];
/**
Constructor for game objects
@constructor
*/
function GameObject()
{
/** All wanted drawing contexts, or empty array for all */
this.drawContext = new Array();
/** All wanted input contex... |
/**
* @license MIT
* taksim.io/vec2 // @echo VERSION
* https://github.com/taksim-io/vec2
* Copyright (c) 2015 taksim.io
*/
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory(root);
} else {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.