code
stringlengths
2
1.05M
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import * as Humanize from 'humanize-plus' import {gameObjectSelectors} from '../../../selectors' import './ResourceSlot.css' const ResourceSlot = ({ resourceRef, value, resource }) => ( <span className={'ResourceSlot'...
$(document).ready(function(){ var container = $('#target'); $('.ajaxtrigger').click(function(){ doAjax($(this).attr('href')); return false; }); function doAjax(url){ if(url.match('^http')){ $.getJSON("http://query.yahooapis.com/v1/public/yql?"+ "q=select%20*%20from%20html%20whe...
define([ "text!templates/Users/CreateTemplate.html", "models/UsersModel", "common", "populate" ], function (CreateTemplate, UsersModel, common, populate) { var UsersCreateView = Backbone.View.extend({ el: "#content-holder", contentType: "Users", ...
/* Simple tool to accurately measure the time between 2 points */ var Benchmark = function(){ this.m1 = 0; this.m2 = 0; this.benchmarks = []; }; Benchmark.prototype.start = function(){ this.m1 = process.hrtime(); }; Benchmark.prototype.stop = function(){ this.m2 = process.hrtime(this.m1); ...
import React from 'react'; import AuthProviderNone from './none'; import AuthProviderOIDC from './oidc'; const AuthProvider = ({ store, children }) => { const { authType } = store.getState(); if (authType === 'NONE') return <AuthProviderNone>{children}</AuthProviderNone>; if (authType === 'OIDC') return ...
var express = require('express'), url = require('url'), request = require('request'), u = require('underscore'); var app = express.createServer( express.logger(), express.static(__dirname + '/public') ); function except(obj /*, properties */){ var result = u.extend({}, obj), properties = u.rest(argum...
//----------------------------------------------------------------------------// var express = require('express'); var router = express.Router(); var mongoose = require('mongoose'); var User = require('../models/user.model'); var Draft = require('../models/draft.model'); var Post = require('../models/post.model'); //--...
/** * Created with JetBrains WebStorm. * User: Bloodyaugust * Date: 12/10/13 * Time: 1:40 AM * To change this template use File | Settings | File Templates. */ (function () { templates = { modal: function () { div( {'class': 'modal'} ) }, menu: f...
import React from 'react' import { Link } from 'react-router' import Helmet from 'react-helmet' import { config } from 'config' import get from 'lodash/get' import _ from 'lodash' import Topic from '../../components/Topic' import { prefixLink } from 'gatsby-helpers' export default class Index extends React.Component ...
// ## Globals var argv = require('minimist')(process.argv.slice(2)); var autoprefixer = require('gulp-autoprefixer'); var browserSync = require('browser-sync').create(); var changed = require('gulp-changed'); var concat = require('gulp-concat'); var flatten = require('gulp-flatten'); var gulp ...
$("#sticky-tab").stick_in_parent({ sticky_class: 'is-stuck' });
define(function(require) { var text = require('text!./template.html'); return { template: text }; });
export const UPDATE_PLAYERS = 'UPDATE_PLAYERS'; export const SAVE_GAME_INFO = 'SAVE_GAME_INFO'; export const CREATING_GAME = 'CREATING_GAME'; export const CLEAR_CREATING_GAME = 'CLEAR_CREATING_GAME'; export const CLEAR_GAME = 'CLEAR_GAME'; export const RENDER_GAME_INFO = 'RENDER_GAME_INFO';
module.exports = { ENDPOINT_URI: "kahoot.it", ENDPOINT_PORT: 443, TOKEN_ENDPOINT: "/reserve/session/", EVAL_: "var _ = {" + " replace: function() {" + " var args = arguments;" + " var str = arguments[0];" + " return str.replace(args[1], args[2]);" + " }" + "}; " + "var log = function(){};" +...
/** * Minjector element representing a "define" or "require" definition. * * @param {TokenStructure} tokenStructure The corresponding tokenStructure * of this element. * @param {string} type "define" | "require" * @param {Token} firstBracketToken The token representing the first bracket of * the element ...
'use strict'; describe('formInput', function () { var elm, scope; // load the form code beforeEach(angular.mock.module('formsAngular')); describe('simple text input', function () { beforeEach(inject(function ($rootScope, $compile) { elm = angular.element('<div><form-input formStyle="horizontalComp...
'use strict'; const listSequences = require('./list-sequences'); const shouldIgnoreRule = require('./should-ignore-rule'); const shouldIgnoreSelector = require('./should-ignore-selector'); const toInterpoloatedRegexp = require('./to-interpolated-regexp'); const getSelectors = require('./get-selectors'); /** * @param...
// @flow /* eslint-env mocha */ /* global suite, benchmark */ import startOfMonth from '.' import moment from 'moment' suite('startOfMonth', function () { benchmark('date-fns', function () { return startOfMonth(this.date) }) benchmark('Moment.js', function () { return this.moment.startOf('month') }) ...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
'use strict'; var postcss = require('postcss'); var filterDeclarations = require('./'); var test = require('tape'); var fixture = [ 'a {', ' display: none;', ' border: 1px solid #000;', '}', '@media screen {', ' b:after {', ' content: "b";', ' }', ' @media (min-width: 300px) {', ' p q {...
import url from 'url'; import gulp from 'gulp'; import gulpLoadPlugins from 'gulp-load-plugins'; import autoprefixer from 'autoprefixer-core'; import browserSync from 'browser-sync'; import del from 'del'; import nunjucks from 'nunjucks'; import map from 'vinyl-map'; import quaff from 'quaff'; import runSequence from...
/*global Widget */ function IncrementalGraphWidget(widget, configName) { this.widget = widget; this.configName = configName; this.chart = null; this.dataToBind = { 'value': '', 'arrowClass': '', 'percentageDiff': 0, 'oldValue': '' }; } IncrementalGraphWidget.proto...
import $dataAccess from './$dataAccess'; import components from './fallbacks/components'; import loadComponents from '../app/profile/loadcomponents'; export default function daComponents() { return $dataAccess(loadComponents, components); }
'use strict'; // Add ability to create directories var mkdirp = require('mkdirp'); const Generator = require('yeoman-generator'); const chalk = require('chalk'); const yosay = require('yosay'); module.exports = class extends Generator { prompting() { // Have Yeoman greet the user. this.log(yosay( 'We...
var request = require('superagent'); var port = process.env.PORT || 3000; describe('Our server getweather route', function () { describe('when posted a single zip', function () { it('should provide weather data for that zip', function (done) { request .post('http://localhost:' + port + '/getweathe...
/* Copyright 2014, KISSY v1.43 MIT Licensed build time: May 22 12:18 */ /* Combined processedModules by KISSY Module Compiler: dd/plugin/proxy */ KISSY.add("dd/plugin/proxy", ["node", "dd", "base"], function(S, require) { var Node = require("node"), DD = require("dd"), Base = require("base"); var DDM = DD.DDM,...
var argument__data__type_8h = [ [ "ArgumentDataType", "argument__data__type_8h.html#a79871821a23eee2b543fec77b52c54d7", [ [ "Char", "argument__data__type_8h.html#a79871821a23eee2b543fec77b52c54d7a8e95e84813830072b7516cfaa7dbc1a9", null ], [ "UnsignedChar", "argument__data__type_8h.html#a79871821a23eee2b...
/* * Copyright (c) 2010 Kai Zimmer [http://www.kaizimmer.com] * * Permission is hereby granted to use, modify, and distribute this file * in accordance with the terms of the license agreement accompanying it. */ org.rialoom.utils.ClassUtils.createPackage("org.rialoom.drupal.events"); /** * BehaviorEvent constructor *...
'use strict'; /* Services */ var ampServices = angular.module('ampServices', ['ngResource']); ampServices.factory('Phone', ['$resource', function($resource){ return $resource('data/:phoneId.json', {}, { query: {method:'GET', params:{phoneId:'phones'}, isArray:true} }); }]);
var gulp = require('gulp'); var runSequence=require('run-sequence').use(gulp); gulp.task('build-all', function(cb){ runSequence('markup'); });
// Original implementation from : https://github.com/visionmedia/connect-jsonrpc/blob/master/lib/connect-jsonrpc.js /*! * Ext JS Connect * Copyright(c) 2010 Sencha Inc. * MIT Licensed */ /** * Module dependencies. */ var parse = require('url').parse, http = require('http'); /** * JSON-RPC version. */ v...
#!/usr/bin/env node /* mrkdwn v0.1.0 : github.com/benvacha/mrkdwn */ /* Test suite for javascript mrkdwn implementation. Exercises the mrkdwn implementation through node interface. Requires: colors : https://github.com/Marak/colors.js diff : https://github.com/kpdecker/jsdiff All Commands From Root (not jav...
'use strict'; var cls = require('continuation-local-storage') var logContext = cls.createNamespace('app-log-ctx') module.exports = function (req, res, next) { logContext.bindEmitter(req) logContext.bindEmitter(res) logContext.run(function () { logContext.set('requestId', req.headers['x-unique-id']) log...
function deletePref(player, element) { var prefs = JSON.parse(localStorage['prefs']); delete prefs[player]; localStorage['prefs'] = JSON.stringify(prefs); element.parentElement.removeChild(element); } function listPlayers() { var prefs = {}; if (localStorage['prefs']) { prefs = JSON.pa...
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Web Client * Copyright (C) 2009, 2010 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the ...
// --------- This code has been automatically generated !!! Wed Jul 22 2015 13:15:45 GMT+0000 (UTC) /** * @module opcua.address_space.types */ var doDebug = false; var assert = require("better-assert"); var util = require("util"); var _ = require("underscore"); var makeNodeId = require("../lib/datamodel/nodeid").mak...
var Tween = { linear: function (t, b, c, d){ return c*t/d + b; }, easeIn: function(t, b, c, d){ return c*(t/=d)*t + b; }, easeOut: function(t, b, c, d){ return -c *(t/=d)*(t-2) + b; }, easeBoth: function(t, b, c, d){ if ((t/=d/2) < 1) { return c/2*t*t + b; } return -c/2 * ((--t)*(t-2...
/** * Configuration data goes here. */ var sessions = require("client-sessions"); var conf = module.exports = { SITE_SECRET: getFromEnv('SITE_SECRET'), REDIS_HOST: getFromEnv('REDIS_HOST'), REDIS_PORT: getFromEnv('REDIS_PORT'), PORT: getFromEnv('PORT'), API_BASE: '/api/v1/' }; conf.signedCookie = session...
const fns = { toSuperlative: require('./toSuperlative'), toComparative: require('./toComparative'), } /** conjugate an adjective into other forms */ const conjugate = function (w) { let res = {} // 'greatest' let sup = fns.toSuperlative(w) if (sup) { res.Superlative = sup } // 'greater' let comp ...
module.exports = { ModalButton: require('./Modal/ModalButton'), ModalButtons: require('./Modal/ModalButtons'), ModalInner: require('./Modal/ModalInner'), ModalNoButttons: require('./Modal/ModalNoButttons'), ModalText: require('./Modal/ModalText'), ModalTextInput: require('./Modal/ModalTextInput'), ModalTextInput...
define( /** * @class Control * @inheritable */ function (require) { var lib = require('../common/lib'); var blend = require('./blend'); var runtime = require('./runtime'); var isRuntimeEnv = true;//main.inRuntime();//runtime.isRuntimeEnv&&runtime.isRuntimeEnv(); ...
'use strict'; angular.module('crossfitApp') .factory('AlertService', function ($timeout, $sce,$translate) { var exports = { factory: factory, add: addAlert, closeAlert: closeAlert, closeAlertByIndex: closeAlertByIndex, clear: clear, ge...
import React from 'react' import Relay from 'react-relay' import DeletePostMutation from '../mutations/DeletePostMutation' class Post extends React.Component { static propTypes = { post: React.PropTypes.object, viewer: React.PropTypes.object, } render () { return ( <div className='pa3 bg-blac...
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { Link, browserHistory } from 'react-router'; import SplitDropdown from 'components/dropdown/split'; import NavBar, { NAVBAR_HOME }...
const helpers = require('../../helpers') module.exports = { command: 'get <resultId>', desc: 'Fetch a single test result.', builder: {}, handler: async function (argv) { const client = helpers.getClient(argv) const result = await client.getTestResult(argv.resultId) if (argv.json) { helpers.pr...
var fm = require('../') var fs = require('fs') var path = require('path') var test = require('tape') test('var fm = require("front-matter")', function (t) { t.equal(typeof fm, 'function') t.end() }) test('fm(string) - parse yaml delinetead by `---`', function (t) { fs.readFile( path.resolve(__dirname, '../e...
define([ 'underscore', 'text!templates/grid-docs.html', 'text!pages/grid-options-shiftSelect.html', 'dobygrid' ], function (_, template, page, DobyGrid) { "use strict"; return Backbone.DobyView.extend({ events: function () { return _.extend({}, Backbone.DobyView.prototype.events, { "change #option-v...
// @flow import { SET_CURRENCY } from "../constants"; import type { Action } from "../actions"; type State = Object; export default function currencyReducer(state: State = { "value": "$", "label": "USD" }, action: Action) { if (action.type === SET_CURRENCY) { return action.currency; } return state...
import JoinAllLink from './JoinAllLink.svelte'; import getElementById from '../../common/getElementById'; function mountApp(newGroup) { return new JoinAllLink({ anchor: newGroup, target: newGroup.parentNode, }); } export default function injectJoinAllLink() { const newGroup = getElementById('notificatio...
describe('view entity events', function() { 'use strict'; beforeEach(function() { this.model = new Backbone.Model(); this.collection = new Backbone.Collection(); this.fooStub = this.sinon.stub(); this.barStub = this.sinon.stub(); this.modelEventsStub = this.sinon.stub().returns({'fo...
import { fromJS } from 'immutable'; import createReducer from 'utils/createReducer'; import { SET_COMPANY_DATA, SET_COMPANY_STATUS, } from '../actions/timeAndSalaryCompany'; import fetchingStatus from '../constants/status'; const preloadedState = fromJS({ companyName: null, data: null, status: fetchingStatu...
import moment from 'moment' import _ from 'lodash' import { fromJS } from 'immutable' import $ from 'zepto-modules' import Jed from 'jed' import { SyncApp, User } from '../app/Api' import { Files, Transfers } from '../app/Api' import { int, translations } from '../common' import Uploader from '../uploader' import Grow...
(function() { var data, keys, students, chart = document.querySelector(".chart") ; function drawGraphic(containerWidth) { chart.innerHTML = ""; var x, y, adm, color, dates, xAxis, yAxis, line, legend, revenue, enrollment, margin = { top: 16, righ...
const mongoose = require('mongoose') const ping = require("net-ping") const schedule = require("node-schedule"); const stateSchema = require('./State') const logSchema = require('./Log') var nodemailer = require('nodemailer') var smtpTransport = require('nodemailer-smtp-transport') /*mongoose.connect('mongodb://...
(function(){ 'use strict'; angular.module('app', []); })();
'use strict'; // Declare app level module which depends on views, and components angular.module('myApp', [ 'ngRoute', 'myApp.main' ]). config(['$routeProvider', function($routeProvider) { $routeProvider.otherwise({redirectTo: '/main'}); }]);
var a00446 = [ [ "CDC_BUFFER_MAX", "a00446.html#a5ac8c9377f90d6ce3044f81f900a54fe", null ], [ "CDC_DEVICES_MAX", "a00446.html#a08b6c05184266dc4d5c8727bb9c1c754", null ], [ "atcacdc_t", "a00446.html#a2df85bfd309840b4c9a5087e053d4811", null ], [ "cdc_device_t", "a00446.html#a99ee56102171adcbcecb8a78fb9fa8...
var Readable = require('stream').Readable var split = require('split') var BRANCH_HEADER_REGEX = /^branch\.(oid|head|upstream|ab) (.*)$/ var AHEAD_BEHIND_REGEX = /^\+(\d+) -(\d+)$/ var CHANGED_REGEX = /^([.MADRCUT]{2}) ([NS][.C][.M][.U]) (\d+) (\d+) (\d+) ([0-9a-f]{40}) ([0-9a-f]{40}) (.*)$/ var RENAMED_COPI...
import { RX_ARRAY_NOTATION } from '../constants/regex' import { identity } from './identity' import { isArray, isNull, isObject, isUndefinedOrNull } from './inspect' /** * Get property defined by dot/array notation in string, returns undefined if not found * * @link https://gist.github.com/jeneg/9767afdcca45601ea44...
'use strict' let Audio = require('../') let t = require('tape') let AudioBuffer = require('audio-buffer') // TODO: test if is online/offline t('audio.offset', t => { let a1 = Audio({rate: 22000}) t.equal(a1.offset(1.2), 22000 * 1.2) let a2 = Audio() t.equal(a2.offset(-1.2), -44100 * 1.2) t.end() }) t('au...
import expect from 'expect'; import dataAdapter from '../src/data-adapter.js'; describe('data-adapter', function() { it('should create an array of objects when passing an array of relative paths', function() { expect( dataAdapter( [ 'http://some.domain.com/image1.jpg', { url: 'h...
'use strict'; var bootstrap = require('./bootstrap'); bootstrap.app.env = process.env; bootstrap.app.rootPath = process.env.PWD; bootstrap.app.config = require('./config.json'); bootstrap.start();
const CaseClass = require('../utility.js').CaseClass; class NumberExpression extends CaseClass { constructor(number) { super('NumberExpression'); this.number = number; } doCase(fn) { return fn(this.number); } } class IdExpression extends CaseClass { constructor(id) { super('IdExpression'); this.id = i...
/*global module:false*/ module.exports = function (config) { 'use strict'; config.set({ autoWatch: false, basePath: '../', frameworks: ['jasmine'], jasmineNodeOpts: { defaultTimeoutInterval: 30000, isVerbose: true, showColors: true, ...
import dateUtils from 'date-utils'; import fs from 'fs'; export function initialize(callback){ fs.readFile(`${__dirname}/config.json`, { encoding: 'utf8' }, (err, config) => { callback(JSON.parse(config)); }); } export function sendWeather(client, fromNumber, toNumber, location) { const date = (new Date())....
import { Mongo } from 'meteor/mongo'; import SimpleSchema from 'simpl-schema'; import { SchemaHelpers } from '../schema_helpers.js'; /** * Status Metrics - track the health of the system */ export const SystemHealthMetric = new SimpleSchema({ key : { type: String }, title : { ...
/* @flow */ 'use strict' import { Map, List, fromJS } from 'immutable' import { SET_FILTER_COMPONENT_OPEN_STATUS, SET_FILTER_COMPONENT_MENU_STATE, RESET_FILTER_COMPONENT_STATE, CLOSE_FILTER_COMPONENT, OVERLAY_CLOSED, SET_FILTER, FILTER_SEARCH_RESULT, RESET_FILTERS, } from '../actions' import { NAME...
Accounts.onCreateUser((options, user) => { const superuser = options.superuser || false; const simulationId = options.simulationId || null; user.superuser = superuser; user.simulationId = simulationId; if (options.profile) { user.profile = options.profile; } return user; }); Met...
version https://git-lfs.github.com/spec/v1 oid sha256:dab1f8d6f5e3da06dbdc309a5ffc69906304948b18b9149abb4801126191a00d size 3360
version https://git-lfs.github.com/spec/v1 oid sha256:a91d45feedec9e236857f4f5cb0a4806f9621f7610d33b0301f5d591fb3465b7 size 5151
Page({ data: { }, onLoad() { console.log(666) }, pay() { wx.scanCode({ success: (res) => { console.log(res) } }) } })
'use strict'; var assert = require('assert'); var lz = require('./'); describe('leading-zero', function(){ it('should return the number with the correct number of leading zeros', function(){ assert.equal(lz(48, 5), '0000048'); assert.equal(lz(-48897,1), '-048897'); }); });
/* * jQuery FlexSlider v2.2.0 * Copyright 2012 WooThemes * Contributing Author: Tyler Smith */ (function (e) { e.flexslider = function (t, n) { var r = e(t); r.vars = e.extend({}, e.flexslider.defaults, n); var i = r.vars.namespace, s = window.navigator && window.navigator.ms...
'use strict'; const resultsStorage = require('../lib/support/resultsStorage'); const moment = require('moment'); const path = require('path'); const expect = require('chai').expect; const timestamp = moment(); const timestampString = timestamp.format('YYYY-MM-DD-HH-mm-ss'); function createManager(url, outputFolder) ...
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store=new Vuex.Store({ state:{ isLoading:false,//是否登陆 loadingAnimate:false, //是否显示登陆动画 }, getter:{}, mutations:{ updateLoadingState(state,flag){ state.isLoading=flag }, updateLoadingAnimate(state,flag){ state.loa...
import { moduleForModel, test } from 'ember-qunit'; moduleForModel('message-header', 'Unit | Model | MessageHeader', { needs: [ 'model:meta', 'model:narrative', 'model:resource', 'model:extension', 'model:coding', 'model:message-header-destination', 'model:reference', 'model:message-h...
/** * 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. * * @emails oncall+relay * @format */ 'use strict'; require('configureForRelayOSS'); const RelayClassic_DEPRECATED = require('RelayCla...
var SOFR = {} || SOFR; SOFR.addFileReader = function() { var fileReaderButton = SO.menu.appendChild( document.createElement( 'div' ) ); fileReaderButton.innerHTML = '<a href=# onclick=SO.toggleDialogs(SOFR.FileReader); ><p class=button >' + '<i class="fa fa-file-image-o"></i> File Reader...' + '</p></...
//base test describe("arc object",function(){ it("should not be null",function(){ expect(arc.not.toBeNull(); }); });
import SaveButton from './../../components/layout/Settings/SaveButton'; import {connect} from 'react-redux'; import {aboutClick} from './../..//actions/funcs/settings'; const mapStateToProps = () => { return { title: 'Save Changes to About Me' }; }; const mapDispatchToProps = (dispatch) => { retur...
Date.prototype.addDays=function(d){return new Date(this.valueOf()+864E5*d);}; //snippet from http://stackoverflow.com/questions/563406/add-days-to-datetime function DateDiff(date1, date2) { //snippet from http://stackoverflow.com/questions/7763327/how-to-calculate-date-difference-in-javascript date1.setHours(0...
import React, { Component } from 'react'; import applicationStore from 'focus-core/application/built-in-store'; /** * HeaderContent component. */ class HeaderContent extends Component { /** Display name. */ static displayName = 'HeaderContent'; /** * Constructor. * @param {object} props Props. ...
var sudoBlock = require('sudo-block'); var autostart = require('../lib/actions/autostart') var daemon = require('../lib/actions/daemon') // Checking if hotel is being installed using 'sudo npm' // ~/.hotel should not be created as root sudoBlock( '\n' + ' To complete install, please run:\n' + ' hotel autostart && ho...
/* jshint -W117, -W030 */ describe('customers', function() { describe('state', function() { var controller; var views = { customers: 'app/customers/customers.html', customerdetail: 'app/customers/customer-detail.html' }; beforeEach(function() { mo...
'use strict'; /*! * Collection * https://github.com/kobezzza/Collection * * Released under the MIT license * https://github.com/kobezzza/Collection/blob/master/LICENSE */ import { Collection } from '../core'; import { isFunction, isArray, isNumber, iterators } from '../helpers/types'; import { byLink, splice } ...
var port = process.env.PORT || 3000; r_port = 6379, r_host = "localhost", server = require('http').createServer(), io = require('socket.io').listen(server), crypto = require('crypto'), redis = require('redis'); // Avatar config //var avatar_url = "http://cdn.libravatar.org/avatar/"; var avatar_url = "...
// merlin.js // Import Backbone if it isnt already in place var Backbone = this.Backbone; if (!Backbone){ if(typeof exports !== 'undefined'){ Backbone = require('backbone'); } } // Import Underscore if it isnt already in place var _ = this._; if (!_){ if(typeof exports !== 'undefined'){ _ = require('und...
import virtualDom from 'virtual-dom'; import makeTag from './make-tag'; import $$ from 'slot'; import CellMode from './cell-mode'; import { sprintf } from 'sprintf-js'; var VNode = virtualDom.VNode; var VText = virtualDom.VText; class Hook { constructor(cell) { this.cell = cell; this.ondblclick = function (...
/* * .json : JSON * .hjson : hjson, (http://hjson.org) * .yaml, .yml: YAML * .conf : HOCON (https://github.com/typesafehub/config/blob/master/HOCON.md) */ const JSON_EXTNAME = ['.json']; const HJSON_EXTNAME = ['.hjson']; const YAML_EXTNAME = ['.yaml', '.yml']; const HOCON_EXTNAME = ['.conf', '.hoco...
game.PlayScreen = me.ScreenObject.extend({ /** * action to perform on state change */ onResetEvent: function() { me.device.watchDeviceOrientation(); me.device.watchAccelerometer(); // clear the background me.game.world.addChild(new me.ColorLayer("background", "#00000...
'use strict'; var i2c = require('i2c-bus').openSync(1), avr = require('./avr'), count = 0; function toCelcius(rawValue) { var voltage = rawValue * 3.3; voltage /= 1024.0; var temperatureC = (voltage - 0.5) * 100; return temperatureC; } i2c.writeByteSync(avr.ADDR, avr.A0_MODE, avr.ANALOG); i2c.writeByteS...
import Plugin from "./../Plugin"; import Util from "./../Util"; export default class RateLimiter extends Plugin { static get plugin() { return { name: "RateLimiter", description: "Automatically ignore spamming users", help: "", visibility: Plugin.Visibility....
const join = require('path').join // $FlowFixMe const esprima = require('esprima') class AstParser { parser: any sourceType: string constructor (parser: any = esprima, sourceType: string = 'module') { this.parser = parser this.sourceType = 'module' } parse (filePath: string, text: st...
import Ember from 'ember'; import config from './config/environment'; const Router = Ember.Router.extend({ location: config.locationType, rootURL: config.rootURL }); Router.map(function() { this.mount('ember-blog-engine', {as: 'blog'}); }); export default Router;
const _ = require('lodash'); const { authenticate } = require('feathers-authentication').hooks; const commonHooks = require('feathers-hooks-common'); const { restrictToOwner } = require('feathers-authentication-hooks'); const verifyHooks = require('feathers-authentication-management').hooks; const { isEnabled, ...
//Module with variables and methods for config build process module.exports = function () { //Main config variables with final distribution names (you can change them) var appScriptsFile = 'app.js'; var appStylesFile = 'app.css'; var appTemplatesFile = 'templates.js'; var appLanguagesFile = 'languages.js'; ...
import {Component, View, For} from 'angular2/angular2'; import {Inject} from 'angular2/di'; import {AlbumService} from 'components/album/service'; import {RouterService} from 'components/router/service'; @Component({ selector: 'album-list', services: [AlbumService, RouterService] }) @View({ templateUrl: '...
version https://git-lfs.github.com/spec/v1 oid sha256:5ab3e41ede67febf40554edc869bcbdf2988519e4257d9aba7a2d88b8ee14cd2 size 6729
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><circle cx="12" cy="17" r="4" /><path d="M12 3C8.1 3 4.56 4.59 2 7.15l5 5c1.28-1.28 3.05-2.08 5-2.08s3.72.79 5 2.07l5-5C19.44 4.59 15.9 3 12 3z" /></React.Fragment> , 'CompassCalibrationSharp')...
function Ambiente(){} function iniciar() { this.canvas = document.getElementById('canvas'); this.contexto = this.canvas.getContext('2d'); this.bola = new Bola(50, '#0000ff'); this.bola.x = 50; this.bola.y = 70; this.bola.vx = 55 / 60; this.bola.vy = 0; this.bola.ax = 0; t...