code stringlengths 2 1.05M |
|---|
var webpack = require('webpack');
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: ["webpack-dev-server/client?http://localhost:3000", "webpack/hot/dev-server", './src/init.js'],
output: {
path: path.join(__dirname, '/dist'),
filename: 'bundle.js... |
/*
* grunt-contrib-clean
* http://gruntjs.com/
*
* Copyright (c) 2013 Tim Branyen, contributors
* Licensed under the MIT license.
*/
'use strict';
var rimraf = require('rimraf');
module.exports = function(grunt) {
function clean(filepath, options) {
if (!grunt.file.exists(filepath)) {
... |
/*
* Kendo UI v2014.2.1008 (http://www.telerik.com/kendo-ui)
* Copyright 2014 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial lice... |
document.addEventListener('DOMContentLoaded', displayTime);
function displayTime() {
var h = 11;
var m = 40;
var ap = "PM";
var size = 2.4;
var canvasS = document.getElementById("clock");
var spacer = document.getElementById("spacer");
var title = document.getElementById("title");
var c... |
(function (app) {
document.addEventListener('DOMContentLoaded', function () {
ng.platform.browser.bootstrap(app.AppComponent);
});
})(window.app || (window.app = {})); |
/*global ajja */
ajja.locales.en = {
successfully_saved_value: 'Successfully saved value.',
field_contains_unsaved_changes: 'This field contains unsaved changes.',
communication_error: 'There was an error communicating with the server.',
required_field_left_blank: 'This field is required but has no inp... |
'use strict';
var Filter = require('broccoli-filter');
var Ember = { assert: function() {}, FEATURES: { isEnabled: function() {} } };
// ES6Todo: when ember-debug is es6'ed import this.
// var emberAssert = Ember.assert;
var Handlebars;
function TemplateCompiler (inputTree, options) {
if (!(this instanceof Templat... |
#! /usr/bin/env node
'use strict';
(function () {
var jargs = require('../src/index');
var Help = jargs.Help;
var Program = jargs.Program;
var Command = jargs.Command;
var KWArg = jargs.KWArg;
var Flag = jargs.Flag;
var Arg = jargs.Arg;
var Required = jargs.Required;
var RequireAll = jargs.RequireA... |
// This is synchronous code.
// Each line runs right after the other.
// It's easy to see what's going on here.
var myCode = function () {
console.log('starting');
var step1result = dostep1();
var step2result = dostep2();
var step3result = dostep3();
console.log('all done');
analysis();
};
var analysis = func... |
/**
* Set of utilities for working with files and text content.
*/
define(function (require, exports, module) {
"use strict";
require("utils/Global");
var FileSystemError = require("filesystem/FileSystemError"),
DeprecationWarning = require("utils/DeprecationWarning"),
LanguageManag... |
'use strict';
const path = require('path');
const Routes = require('../src/routes.js');
module.exports = {
register: Routes,
options: {
pathToRoutes: path.normalize(__dirname + '/../routes')
}
};
|
var aLi = document.getElementsByTagName('li');
for (var i = 0; i < aLi.length; i++) {
fn(i);
}
function fn(i) {
var aSpan = aLi[i].getElementsByTagName('span');
var aLink = aLi[i].getElementsByTagName('a');
var aInput = aLi[i].getElementsByTagName('input');
var value = '';
aLink[0].onclick = function() {
valu... |
angular.module('myApp').factory('channels', ['$http', function ($http) {
var appKey = 'Sbww2ApeluUulvolRLdkwI73A1ca4xA5mMak6vXE',
apiKey = 'TvsLnnwZKH87aaT7LKCHXcofAbhhl0wBFcSroXFN',
url = 'https://api.parse.com/1/classes/rooms',
headers = {
'X-Parse-Application-Id': appKey,
... |
/*
* Copyright (C) 2013 Apple 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 a... |
module.exports = Controller("Home/BaseController", function(){
//"use strict";
return {
indexAction: function(){
var self= this;
self.session()
console.log('referer:\n', self.http.cookie.http_referer)
self.session('http_referer', self.http.cookie.ht... |
/**
* Class for animation
*/
(function (window, undefined) {
"use strict";
/**
* time when we start counting fps
* @type {number}
*/
var fpsStart = 0,
/**
* counted fps in current second
* @type {Number}
*/
fpsCounting = 0,
/**
... |
import React, { Component } from 'react'
import { popupClose } from '../../actions/popup_actions'
import { dashboardAddWidget } from '../../actions/dashboard_actions'
import { dispatch } from '../../helpers/dispatcher'
import WidgetStore from '../../stores/widget_store'
import { FormattedMessage } from 'react-intl'
cl... |
steal("//steal/get/json", "//steal/rhino/prompt", function( steal ) {
/**
* @parent stealjs
* Downloads and installs a plugin from a url. Normally this is run from the steal/getjs script.
*
* <p>The following copies the mustache-javascript repo to a local mustache folder.</p>
*
* @codestart text
* js ... |
/*
* File: KarelWorldTest.java
* -------------------------
* Makes sure we can read Karel world files.
*/
function KarelWorldTest() {}
KarelWorldTest.main = function(args) {
var console = new JSConsole();
var world = new KarelWorld();
var cmdProc = function(console, line) {
var req = new XMLHttpReq... |
/*
aDBName is a string that identifies the database in local indexedDB
aDBVersion is an integer that identifies the database version
aTablesDefinition is an array of json.
Each element of this array must contain:
name (the name of the set of documents or a tableName in SQL notation)
keyPath (the name of th... |
const { createLogger, format, transports } = require('../');
const { combine, errors, json } = format;
const logger = createLogger({
format: combine(
errors({ stack: true }),
json()
),
transports: [
new transports.Console(),
]
});
logger.warn(new Error('Error passed as info'));
logger.log('error',... |
/**
* Interface:
* mwf.touch.geolocation.getType() -> 0|1|2
* mwf.touch.geolocation.getTypeName() -> "HTML5 Geolocation"|"Google Gears"|"Unsupported"
* mwf.touch.geolocation.getApi() -> Geolocation API (HTML5 or Google Gears)
* mwf.touch.geolocation.isSupported() -> boolean
* mwf.touch.geolocation.getPo... |
/* @flow */
import React from 'react';
import Root from './components/root';
type Props = {
path?: string
};
export const routes: Map<string, React$Element<*>> = new Map();
routes.set('/', <Root />);
export default function router(props: Props) {
return props.path && routes.has(props.path) ? routes.get(props... |
'use strict';
const Hapi = require('hapi');
const apiPlugin = require('../api');
const Code = require('code');
const Lab = require('lab');
const lab = exports.lab = Lab.script();
const describe = lab.describe;
const it = lab.it;
const before = lab.before;
const expect = Code.expect;
var rand = Math.random() * (46.2... |
import React from 'react';
import { FormattedMessage } from 'react-intl';
import A from 'components/A';
import messages from './messages';
function Footer() {
return (
<div>
<section>
<FormattedMessage {...messages.licenseMessage} />
</section>
<section>
<FormattedMessage
... |
var Helpers = {};
var fs = require('fs');
var path = require("path");
var touch = require("touch");
var isStream = require("is-stream");
var validUrl = require('valid-url');
var _ = require("lodash");
var emailTester = /^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-?\.?[a-zA-Z0-9])*... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M19 19H5V5h14v14zM3 3v18h18V3H3zm14 12.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" />
, 'DisabledByDefaultOutlined');
|
var path = require('path');
/**
* Different rename keys for Assemble loaders
*
* @param {Function} `defaultKey` defualt Assemble rename key
* @return {Type} Description
*
*/
module.exports = function(defaultKey) {
return {
dirnameKey: function (search) {
return function (fp) {
if (fp.indexOf(... |
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
/*
The key idea is to assume as little as possible about
the underlying DOM structure, i.e., what elements we
need, what classes they should have, and how they're
a... |
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2013 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a ... |
// Globals are:
// - Variables outside functions
// - Variables without a var (even inside functions)
// - Named functions
// Can be updated/deleted at any time...
var name = 'fido';
age = 10;
var fruit = 'banana';
(function() {
// name and age will be overridden, but fruit will not
name = 'ka... |
import Ember from 'ember';
/*global device*/
export default Ember.TextField.extend({
classNames: 'gh-input',
value: Ember.computed('city', 'country', function(){
return this.get('city') ? [this.get('city'), this.get('country')].join(', ') : '';
}),
updateCityCountry: function(){
var cc =... |
AFRAME.registerComponent('gui-icon-label-button', {
schema: {
on: {default: 'click'},
toggle: {type: 'boolean', default: false},
toggleState: {type: 'boolean', default: false},
icon: {type: 'string', default: 'f0f3'},
iconActive: {type: 'string', default: ''},
iconFon... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
d: "M4 20h16V4H4v16zm7.07-14.5h1.86l5.11 13h-2.09l-1.14-3H9.17l-1.12 3H5.96l5.11-13zM12 7.98L9.93 13.5h4.14z",
opacity: ".3"
}), h("path", {
d: "M9.17 15.5h5.64l1.14 3h2.09l-5.11-13h-1... |
import createTester from './internal/createTester.js'
import eachOf from './eachOf.js'
import awaitify from './internal/awaitify.js'
/**
* Returns the first value in `coll` that passes an async truth test. The
* `iteratee` is applied in parallel, meaning the first iteratee to return
* `true` will fire the detect `c... |
const webpack = require('webpack');
const webpackClientDevConfig = require('./../webpack/webpack.config.client.dev');
const webpackServerDevConfig = require('./../webpack/webpack.config.server.dev');
const handleWebpackStats = require('./../webpack/handle-stats');
const replaceEntry = require('./../webpack/replace-entr... |
var _ = require('lodash');
// Add actions in enum structure here... values will be tokenized into 'true'
var ACTIONS = {
DEMO: {
PROVE_FLUX_LOADED: true
}
};
(function buildActions(accKey, tree) {
_.each(tree, function(value, nextKey) {
if (_.isObject(value)) {
buildActions(accKey + '.' + nextKey... |
// 实现jquery对象继承,支持深拷贝
export function extend () {
const extended = {}
let deep = false
let i = 0
const length = arguments.length
if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {
deep = arguments[0]
i++
}
function merge (obj) {
for (let prop in obj) {
if (Objec... |
'use strict'
var opts = {
mesh: {
auto: true,
listen: [
{pin: 'role:service1,cmd:component,client:web-scaffold', model: 'consume'},
{pin: 'role:service1,cmd:action1,client:web', model: 'consume'},
{pin: 'role:service1,cmd:action2,client:web', model: 'consume'}
]
}
}
require('seneca')... |
angular.module('myApp.search.controller', ['myApp.search.service'])
.controller('SearchCtrl', ['SearchSvc', '$location', function (SearchSvc, $location) {
var vm = this;
vm.flight = {
origin: null,
destination: null,
dateStart: null,
dateEnd: null
};
vm.visible = {
... |
(function($) {
$.fn.extend({
pupslider: function(options) {
var settings = $.extend({ stick: 'right', speed: 1000, opacity: 1 }, options);
var wrapper = $(this);
var sw = $('.btn-show', wrapper).outerWidth();
var w = $('.pushup-form', wrapper).outerWidth() +... |
version https://git-lfs.github.com/spec/v1
oid sha256:6c4261e7f0810d4cfb304b88ae4fedcbd1862a1c586a793e2b2ad21f79d0d272
size 32779
|
export { default as check } from './check.svg'
export { default as docs } from './docs.svg'
export { default as github } from './github.svg'
export { default as loader } from './loader.svg'
export { default as upload } from './upload.svg'
|
const CardPackError = require('../Errors').CardPackError;
const GameObject = require('./GameObject');
const chance = new (require('chance'))();
/**
* Class representing a pack of cards (aka an expansion).
* @extends {GameObject}
*/
class CardPack extends GameObject {
/**
* Construct a card pack.
* @param {... |
/**
* Logger lib
**/
'use strict';
var winston = require('winston');
var moment = require('moment-timezone');
var logLevel = process.env.LOG_LEVEL || 'info';
var Logger = winstonObj;
Logger.getInstance = function () {
return new Logger();
};
// Log update setup
winston.setupLog = function (opt) {
if (!opt) op... |
export default (func, wait, immediate) => {
let timeout
return function () {
const context = this
const args = arguments
const later = function () {
timeout = null
if (!immediate) func.apply(context, args)
}
const callNow = immediate & !timeout
clearTimeout(timeout)
timeout =... |
#!/usr/bin/env node
// debug 还是实验性功能
const path = require('path')
const babelCliDir = require('babel-cli/lib/babel/dir')
const cfg = require('./config')
require('colors')
console.log('>>> [DEBUG]: Debug Mode is an expiremental feature'.cyan)
console.log('>>> [DEBUG]: Compiling...'.green)
babelCliDir({
outDir:... |
App.Question12View = App.BaseView.extend({
// Automatically inherits animations
}); |
/**
* The MIT License (MIT)
*
* Copyright (c) 2013 Miguel De Anda
*
* 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 u... |
'use strict'
import React, {Component} from 'react';
import {Text} from 'react-native';
import {Container, Header, Content, Title, Icon, Button} from 'native-base';
// import styles as baseStyles from '../login/styles';
const baseStyles = require('../login/styles');
import styles from './styles';
class Offline exten... |
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { lupDependencies } from './dependenciesLup.generated';
import { matrixDependencies } from './dependenciesMatrix.generated';
import { multiplyDependencies } from './dependenciesMultiply.generated';
import { subtractDependencies } from './dependenc... |
import chai from 'chai';
import Vue from 'vue';
import DateDisplay from 'src/components/DateDisplay';
import { dayList, monthList } from 'src/util/dateUtils';
import { nextTick } from '../utils';
chai.should();
describe('DateDisplay.vue', () => {
let el;
beforeEach(() => {
el = document.createElement('div')... |
angular.module('AceApp')
.provider('$gritter', function() {
this.$get = function () {
return {
add: jQuery.gritter.add,
remove: jQuery.gritter.remove,
removeAll: jQuery.gritter.removeAll
}
}
})
/**
.provider('$bootbox', function () {
this.$get = function () {
return {
alert: bootbox.al... |
var shop = {
host: "45.56.82.40",
port: 8000,
currency: "Goats",
symbol: "G",
dailyLogins: new Object(),
gains: {
battle: 0.5,
perHour: 1,
twistWin: 0.1,
rebusWin: 0.25,
dailyLogins: 2,
tour: "goats won = number of players in tournaments"
},
items: {
"symbol": {
name: "Custom Sy... |
//calling module from MyModule.js file//
var myModule = require('./MyModule.js');
var result = myModule.calculate(20,10);
console.log(result);
//calling node testModule.js should return 300//
|
embedMe.addModule(function(){
"use strict";
return {
name: "Image",
global: true,
getPatterns: function() {
return [
/^[^?#]+\.(?:jpg|png|gif|jpeg)(?:$|[?#])/i
];
},
getEmbedFunction: function() {
GM_addStyle(".embed-me-image { max-width: 90%; }");
return function(url, text, node) {
var... |
'use strict';
/**
* Module dependencies
*/
var acl = require('acl');
// Using the memory backend
acl = new acl(new acl.memoryBackend());
/**
* Invoke Items Permissions
*/
exports.invokeRolesPolicies = function () {
acl.allow([{
roles: ['admin'],
allows: [{
... |
Module.Utils.Events = {
included: function(Klass) {
Beacon.setup(Klass);
Klass.addCallback("beforeReady", "_initApplicationEvents");
if (Beacon.Notifications) {
Klass.addCallback("beforeReady", "_initNotifications");
}
}
};
Module.Utils.include(Module.Utils.Events);
|
import React, { PropTypes, Component } from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
class Modal extends Component {
componentDidUpdate() {
if (this.props.isOpen === true && document.body.classList.contains(this.bodyClass) === false) {
document.body.classList.add(th... |
'use strict';
var memoize = require('../../lib')
, nextTick = require('next-tick');
module.exports = function () {
return {
"Regular": {
"Sync": function (a) {
var mfn, fn, i = 0, value = [], x, invoked;
fn = function (x, y) {
++i;
return x + y;
};
mfn = memoize(fn, { dispose: funct... |
//https://github.com/slimjack/ExtJs-AsyncModel
Ext.define('Ext.ux.binder.TextFieldCasingBinder', {
extend: 'Ext.ux.binder.AbstractFormFieldBinder',
metaDataName: 'textCase',
onComponentBound: function (formField, model, modelFieldName) {
this.applyPlugin(formField, 'fieldcasing');
},
app... |
module.exports.blendini = {
serialPort: '/dev/ttyAMA0'
}; |
var config = require(__dirname + "/config.js"),
db = require(__dirname + "/database.js"),
md5 = require(__dirname + "/md5.js"),
utils = require(__dirname + "/utils.js"),
mongodb = require("mongodb"),
objectid = mongodb.BSONPure.ObjectID,
datetime = require(__dirname + "/datetime.js"),
errorc... |
'use strict';
angular.module('calves').config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('calves', {
url: 'crias-listado',
parent: 'home',
menuOption: 'calves',
appTitle: 'Crías',
templateUrl: 'modules/calves/vi... |
import { padNumber, toInteger, isNumber } from '../util/util';
/**
* Abstract type serving as a DI token for the service parsing and formatting dates for the NgbInputDatepicker
* directive. A default implementation using the ISO 8601 format is provided, but you can provide another implementation
* to use an alternat... |
var ObjectId = require('mongodb').ObjectID;
var backupModel = {};
var __class = {
_name: 'unknow',
_column: {
},
_index: null,
_collection: null,
_db: null,
init: function() {
this.initColumn();
},
initColumn: function() {
// check cache exists
if(backupModel[this.__name]) {
this._column = backup... |
var express = require('express');
var router = express.Router();
router.get('/', function(req, res, next) {
res.send({
success: true,
text: 'index of node.js+express api router'
});
});
router.all('*', (req, res, next) => {
res.send({
success: true,
text: 'method is all in api rout... |
var bcrypt = require('bcrypt'),
Q = require('q'),
SALT_ROUNDS = 10;
var security = function () {
return {
encode: function(password) {
var deferred = Q.defer();
bcrypt.genSalt(SALT_ROUNDS, function(err, salt) {
if(err) deferred.reject();
bcrypt.hash(password, salt, function(err, hash) {
if... |
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
// To set up environmental variables, see http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH... |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { r... |
import {fetchGroups} from '../../actions/groups'
import {groupDialogOpen} from '../../actions/group_dialog'
import {connect} from 'react-redux'
import MainMenu from '../../components/main_menu/MainMenu'
const groupPages = ['/']
function mapStateToProps(state) {
return {
isGroupPage: state.router.location !== nul... |
(function () {
'use strict';
angular.module('ap-file-upload').directive('apFile', apFile);
apFile.$inject = [];
function apFile() {
return {
scope: {
file: '=',
disabled: '='
},
controller: 'FileController as vm',
templateUrl: 'views/file.directive.html'
}
};... |
define(function (require) {
'use strict';
var extend = require('extend');
var PropulsionUnit = require('./PropulsionUnit');
var AfterBurnerSwitch = require('./AfterBurnerSwitch');
function PropellingNozzle(power) {
PropulsionUnit.call(this);
this.power = power;
this.afterB... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Content = /** @class */ (function () {
function Content(_a) {
var _b = _a === void 0 ? {
url: '',
position: 0,
contentType: '',
breaks: [],
trackingData: null,
... |
/**
* Created by Andy<andy@away.name> on 03.09.13.
*/
var $uuid = require('uuid');
var $util = require('util');
/**
* Logger Console Adapter
* @param {Object} params
* @param {LoggerFactory} loggerFactory
* @constructor
*/
var ConsoleAdapter = function(params, loggerFactory){
this._id = $uuid.v4();
thi... |
module.exports = function (config) {
config.set({
plugins: [
'karma-mocha',
'karma-chrome-launcher',
'karma-firefox-launcher'
],
frameworks: ['mocha'],
singleRun: false,
autoWatch: true,
colors: true,
reporters: ['dots'],
browsers: [process.env.TRAVIS ? 'Firefox' : 'C... |
var searchData=
[
['y',['Y',['../class_pathfinder_1_1_g_u_i_1_1_base_interaction.html#a2d9ea7ba6d3b89405f1b84f26aab1d58',1,'Pathfinder.GUI.BaseInteraction.Y()'],['../class_pathfinder_1_1_util_1_1_vector2.html#a3bb1cdf28fa28d43296cb96c9b5c7c27',1,'Pathfinder.Util.Vector2.Y()']]],
['ybound',['YBound',['../class_pathf... |
Package.describe({
name: 'atomic:posts',
version: '0.5.0',
summary: 'Atmoic posts api, this is the model used to read/write/update and delete posts',
git: 'https://github.com/meteor-atomic/atomic'
});
Package.onUse(function(api) {
api.versionsFrom('1.1.0.2');
// Meteor Core
api.use("underscore");
// ... |
'use strict'
const fs = require('fs')
const yaml = require('js-yaml')
const Step = require('./Step')
class Parser {
constructor(pipelinePath) {
this.config = yaml.safeLoad(fs.readFileSync(pipelinePath))
this.pipelines = {
default: this.parseSteps(this.config.pipelines.default),
bra... |
/**
* Porsche.js is licensed under the MIT license. If a copy of the
* MIT-license was not distributed with this file, You can obtain one at:
* http://opensource.org/licenses/mit-license.html.
*
* @author: Yang Yang (compking@gmail.com)
* @license MIT
* @copyright Yang Yang, 2015
*/
"use strict";
function Class() {}
... |
function check(text){
if(text== null || text == undefined){
// console.log('');
return false;
}
if(text.length ==1){
return true;
}
if(text.charAt(0)!= text.charAt(text.length-1)){
return false;
}
return check(text.substr(1,text.length-2));
}
console.log(check(undefined));
|
Meteor.startup(function() {
Hooks.init({ updateFocus: settings.updateFocus });
}); |
// Karma configuration
// Generated on Mon Oct 07 2013 21:35:01 GMT-0400 (EDT)
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
frameworks: ['jasmine', 'requirejs'],
// list of files / patterns to... |
function Unit(tile, player, options) {
var settings = $.extend( {
move : 0,
range : 1,
str : 10
}, options);
this.tile = tile;
this.element = tile.board.svg.use(this.tile.tile, '#' + settings.name,
{class : 'unit' } );
$.extend( this, settings );
return this;
}
Unit.prototype.click = function() {
... |
define(['DataFormatters/DataFormatter'],
function (DataFormatter) {
'use strict';
var _getGraphId = function(multiAxis, axis) {
var idNumber = multiAxis.indexOf(axis) + 1;
return "AmGraph-" + idNumber;
}
var _buildMultiAxisGraphs = function(multiAxis) {
var graphs = [];
... |
let exampleData = {
id: "558d9a81f721c6b110000025",
name_lowercase: "pbbs8c-rfp",
FQDN: "tnrich.pBbS8c-RFP",
hash: "6580dff42e14e03986393225d08e320eafd52ca12faa20347e149c5327c48bbc",
ve_metadata: "",
sequence: "atgatagatagagagtatagacacccacatctatttttctacatcgcgcacgagcgacgataaa",
circular: true,
name: "pBb... |
var nc = require('../ncurses'), consts = require('../ncconsts');
var intScroll, inputLine = "";
var win = new nc.ncWindow();
win.centertext(win.lines/2, "hello world");
win.refresh();
win.addListener('inputChar', function (chr, intval) {
if (intval == consts.BACKSPACE || intval == 7) {
if (inputLine.length)
inpu... |
'use strict';
var config = require('../config');
var twilio = require('twilio');
var client = twilio(config.accountSid, config.authToken);
module.exports = function(app) {
app.post('/call', function(req, res) {
console.log(req.body.phoneNumber);
client.makeCall({
to: req.body.phoneNumber,
from: ... |
search_result['4222']=["topic_0000000000000A13.html","TranscriptModel.Transcript Property",""]; |
import { assert } from '@ember/debug';
import Component from '@ember/component';
import layout from '../templates/components/bootstrap-input';
import asserIfUsingRenamedEvents from '../utils/assert-if-using-renamed-events';
export const INPUT_CLASS_NAME = 'bootstrap-input-component';
export default Component.extend({... |
(function(){
'use strict';
function FacultadService($resource, TokenHandler){
var resource = $resource('api/facultades/:factId', {factId: '@id'});
//TokenHandler le agrega en header con el token a los resources
resource = TokenHandler.wrapActions(resource, ['get', 'query', 'remove', 'post']);
var optio... |
var BulletsPoolFactory = (function iife(parent) {
'use strict';
const BulletCount = 100;
const turretMissile = {
spriteName: 'missile',
bulletSpeed: 500,
tracking: true,
explosionType: 'missileExplosion',
explosionSound: 'missileExplosion'
};
/**
*
... |
var i,l,raw, nodes, node, loc, pw, ph;
onmessage = function(ev) {
var data = JSON.parse(ev.data);
nodes = data.nodes;
l = nodes.length;
raw = { data: data.pixels.data };
pw = data.pixels.width;
postMessage(JSON.stringify(data));
return;
setInterval(function() {
// for (i=0; i<l; i+=1) {
node = node... |
'use strict';
/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */
var _ = require('lodash'); /* jshint ignore:line */
var Holodeck = require('../../../../../holodeck'); /* jshint ignore:line */
var Requ... |
import Ember from 'ember';
export default Ember.Route.extend({
controllerName: 'cabin',
model: function (params) {
return this.store.findRecord('cabin', params.id, {reload: true});
},
afterModel: function (cabin, transition) {
const cabinNavn = cabin.get('navn') || 'Hytte uten navn';
document.tit... |
import {JSHINT as jshint} from 'jshint';
import castArray from 'lodash-es/castArray';
import clone from 'lodash-es/clone';
import compact from 'lodash-es/compact';
import concat from 'lodash-es/concat';
import defaults from 'lodash-es/defaults';
import find from 'lodash-es/find';
import includes from 'lodash-es/include... |
'use strict';
var recipes = [
{
name: 'Simple Beef Stew',
description: 'This is the recipe from when I was in college.',
category: 'Soup',
prepTime: 20,
cookTime: 145,
ingredients: [
{
foodItem: 'Beef',
condition: 'Sliced',
amount: '2 cups'
},
{
... |
/**
* @license Copyright (c) 2014, Viet Trinh All Rights Reserved.
* Available via MIT license.
*/
/**
* A repository implementation for the sql database and set_card_price_buy data store.
*/
define([ 'private/framework/repository/base_sql_repository',
'private/domain/repository/i_set_card_price_buy_repositor... |
/**
* @license AngularJS v1.3.0-build.51+sha.e888dde
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
/* jshint maxlen: false */
/**
* @ngdoc module
* @name ngAnimate
* @description
*
* # ngAnimate
*
* The `ngAnimate` module provides s... |
const React = require('react')
const Enzyme = require('enzyme');
const Adapter = require('enzyme-adapter-react-15');
const Checkout = require('./../client/jsx/checkout')
const Products = require('./../seeds/products.json')
Enzyme.configure({ adapter: new Adapter() });
describe('checkout', () => {
const cartItems = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.