code stringlengths 2 1.05M |
|---|
import Ember from 'ember';
import AuthenticateRoute from 'wholetale/routes/authenticate';
export default AuthenticateRoute.extend({
userAuth: Ember.inject.service(),
model() {
let currentUserId = this.get('userAuth').getCurrentUserID();
let catalogItems = {
mine: Ember.A(),
used: Ember.A(),... |
describe("Events", function(){
var EventTest;
var ListenTest;
var spy;
beforeEach(function(){
EventTest = Spine.Class.create();
EventTest.extend(Spine.Events);
spy = jasmine.createSpy();
});
it("can bind/trigger events", function(){
EventTest.bind("daddyo", spy);
EventTest.trigger("dad... |
'use strict';
System.register(['aurelia-templating', 'aurelia-dependency-injection', 'aurelia-framework', '../common/attributeManager', '../common/attributes', '../element/element'], function (_export, _context) {
"use strict";
var bindable, customElement, noView, inject, computedFrom, AttributeManager, getBo... |
'use strict';
// Configuring the Recipes module
angular.module('recipes').run(['Menus',
function(Menus) {
// Set top bar menu items
Menus.addMenuItem('topbar', 'Recipes', 'recipes', 'dropdown', '/recipes(/create)?');
Menus.addSubMenuItem('topbar', 'recipes', 'List Recipes', 'recipes');
Menus.addSubMenuItem('t... |
/**
* @summary theDirt
* @description handle dirty rails forms
* @version 0.0.1
* @file jquery.theDirt.js
* @author Blair Anderson (www.blairanderson.co)
* @contact www.blairandersom.co
*
* @copyright Copyright 2014 Blair Anderson
*
*/
/**
* @example
* // Basic initialisation... |
const queryparse = require('url').parse;
const domino = require('domino');
const jQuery = require('jquery');
/**
* Yttrium Router
* @type {module.Router}
*/
module.exports = class Router {
constructor(options) {
this.dom = domino.createWindow('<!DOCTYPE html>'); // new jsdom.JSDOM('<!DOCTYPE html>');
this... |
var NAVTREEINDEX70 =
{
"group___peripheral___registers___bits___definition.html#gae284870b7eb267d0ef7eb1f347038e1b":[2,106,0,5,0,3723],
"group___peripheral___registers___bits___definition.html#gae284870b7eb267d0ef7eb1f347038e1b":[4,0,0,1,0,23,5229],
"group___peripheral___registers___bits___definition.html#gae29556bba5b... |
'use strict';
module.exports = function(config, ircbot, utils) {
const logger = utils.logger.log;
if (!('path' in config) && !('port' in config)) {
logger('Starting without control socket, because neither path nor port were provided');
return;
}
function commandCallback(line) {
let args = line.split(' ')... |
/*global define*/
define([
'./BoundingRectangle',
'./BoundingSphere',
'./Cartesian2',
'./Cartesian3',
'./ComponentDatatype',
'./CornerType',
'./defaultValue',
'./defined',
'./DeveloperError',
'./Ellipsoid',
'./Geometry',
'./... |
define(['app'], function (app) {
// controller
app.controller('firstPageCtrl', function (socket,$css,$scope,$ionicModal,$http, $timeout,$ionicPopup,$state) {
// properties
socket.on('connect',function(){
//Add user called nickname
socket.emit('add user','nickname');
alert("http... |
'use strict';
// Init the application configuration module for AngularJS application
var ApplicationConfiguration = (function() {
// Init module configuration options
var applicationModuleName = 'examplemean';
var applicationModuleVendorDependencies = ['ngResource', 'ngCookies', 'ngAnimate', 'ngTouch', 'ngSaniti... |
'use strict';
/*
* Module dependencies
*/
var _ = require('underscore');
var Mei = require('../mei');
var Goban = require('./goban');
var Player = require('./player');
var Room = require('./room');
var Stone = require('./stone');
/*
* Game model
*
* @key {Model:Goban} goban
* @key {string} turn (black/white)
... |
'use strict';
app.service('UserSession', function () {
this.create = function (userId, userAccessrights) {
console.log('UserSession.create: userId: %d, userAccessrights: %s ', userId, userAccessrights);
this.userId = userId;
this.userAccessrights = userAccessrights;
};
this.destroy = function () {
this.use... |
/**
* Created with IntelliJ IDEA.
* User: berkich
* Date: 6/21/13
*
* $.securityLabelRest is the global jQuery identifier to access this widget
*/
/*jslint plusplus: true */
jQuery(function ($, undefined) {
var bannerContainer = 'body';
var securityLabelName = 'securityLabel';
// var securityAggrega... |
'use strict';
/**
* @ngdoc function
* @name recappApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the recappApp
*/
angular.module('recappApp')
.controller('MainCtrl', function ($scope) {
$scope.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'Karma'
];
var... |
const redis = require("redis");
const _ = require("lodash");
const req = require("tiny_request");
const http = require("http");
const htmlparser = require("htmlparser2");
class RedisStorage {
constructor() {
this.client = redis.createClient({
host: process.env.REDIS_HOST,
port: pr... |
/*! UIkit 2.8.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
(function(addon) {
var component;
if (jQuery && jQuery.UIkit) {
component = addon(jQuery, jQuery.UIkit);
}
if (typeof define == "function" && define.amd) {
define("uikit-htmleditor", ["uikit"], function(){... |
this.props.; |
var Paddle = function(){
this.height = 20,
this.width = 100,
this.colour = 'red',
this.x = canvas.width / 2,
this.y = canvas.height - 30,
this.center = function(){
return (this.x + (this.x + this.width)) / 2
}
}
Paddle.prototype.surfaceRange = function () {
var lower, upper;
lower = this.center... |
var path = require('path'),
color = require('ansi-color').set;
var exit = require('../exit.js').exit;
exports.run = function(argv) {
var id = argv.id,
shell = color('neco_deactivate', 'bold+yellow');
console.log('run \''+shell+' command in your shell, :)');
exit.emit('success');
};
|
var EventEmitter = require('events').EventEmitter;
var Promise = require('bluebird');
var Readable = require('stream').Readable;
var util = require('util');
function Router(){
EventEmitter.call(this);
this.routes = {};
}
util.inherits(Router, EventEmitter);
Router.format = Router.prototype.format = function(pat... |
var personalData = require('./personalData');
var webModel = require('./webModel');
var webModelFunctions = require('./webModelFunctions');
var robotModel = require('./robotModel');
const spawn = require('child_process').spawn;
var ipAddress = require('./ipAddress');
/*
To get the state of all relays:
switch_relay_n... |
/**
* Created by liushuo on 17/3/8.
*/
import React , {Component} from 'react';
import {AppRegistry , Text , View, StyleSheet, Dimensions, Image, TouchableOpacity} from 'react-native';
let {width} = Dimensions.get('window');
export default class BSBottomTopCommonCell extends Component{
constructor(props){
... |
var lib = require("../");
var helper = require("./helper");
var nock = require("nock");
var InServiceNumber = lib.InServiceNumber;
describe("In Service Number", function(){
before(function(){
nock.disableNetConnect();
helper.setupGlobalOptions();
});
after(function(){
nock.cleanAll();
nock.enable... |
/**
Big I worker thread
**/
SOAR = {};
importScripts("/debug/soar/vector.js");
importScripts("/debug/soar/mesh.js");
importScripts("/debug/soar/noise.js");
importScripts("/debug/soar/space.js");
importScripts("/debug/soar/pattern.js");
//
// pattern/surface variables
//
var rng = SOAR.random.create();
var road =... |
// flow-typed signature: b02d4e2bdae07acdc32a378268f654f9
// flow-typed version: <<STUB>>/babel-preset-react-optimize_v^1.0.1/flow_v0.39.0
/**
* This is an autogenerated libdef stub for:
*
* 'babel-preset-react-optimize'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourag... |
// Dependencies
import notification from './notification';
// Module definition
document.addEventListener('click', function(event) {
switch(event.target.id) {
case 'success':
case 'error':
case 'info':
case 'help':
case 'globe':
case 'fixed':
case 'loading'... |
/*
Copyright (c) 2014, Pixel & Tonic, Inc.
@license http://buildwithcraft.com/license Craft License Agreement
@link http://buildwithcraft.com
*/
(function(a){Craft.EntryTypeSwitcher=Garnish.Base.extend({$form:null,$typeSelect:null,$spinner:null,$fields:null,init:function(){this.$form=a("#entry-form");this.$ty... |
$(document).ready(function(){
var x = $(document).width();
var y = $(document).height();
var containerW = x-40;
var containerH = y-40;
//$("#myApp").width(containerW);
//$("#myApp").height(containerH);
/*var pstyle = 'background-color: #F5F6F7; border: 1px solid #dfdfdf; padding: 5px;';... |
var format = require('util').format;
var debug = require('debug')('qufoxMonitor');
var MongoClient = require('mongodb').MongoClient;
var async = require('async');
var TcpSocketServer = require('./TcpSocketServer');
var Database = require('./Database');
var WebServer = require('./WebServer');
var HttpServer = requir... |
const functions = require('firebase-functions');
const cors = require('cors');
const BASE = functions.config().legionassult.base;
const base = parseInt(+new Date(BASE) / 1000, 10);
const calcAssultTime = require('./utils/calcAssultTime')(base);
const corsOptions = {
origin: true,
methods: 'GET',
exposedHeaders... |
/**
* Copyright (c) Microsoft. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... |
/*
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code ... |
angular.module('dmsApp').controller('personRolesController', function($scope, $state, personRoleService, personService, documentService) {
$scope.personRoles = [];
$scope.personRole = {};
$scope.documents = [];
$scope.persons = [];
$scope.tmp = {};
$scope.loadPersonRoles = function(){
... |
import normaliseKeypath from 'utils/normaliseKeypath';
import resolveRef from 'shared/resolveRef';
var options = {
capture: true, // top-level calls should be intercepted
noUnwrap: true // wrapped values should NOT be unwrapped
};
export default function Ractive$get ( keypath ) {
var value;
keypath = normaliseKe... |
import requireDir from 'require-dir';
import Waterline from 'waterline';
const models = requireDir();
const waterline = new Waterline();
Object.keys(models).forEach((name) => {
waterline.loadCollection(models[name].default);
});
export default {
waterline,
};
|
(function ($) {
"use strict";
/**
* Hero module implementation.
*
* @author Terrific Composer
* @namespace Tc.Module
* @class Hero
* @extends Tc.Module
*/
Tc.Module.Hero = Tc.Module.extend({
/**
* Initializes the Hero module.
*
* @meth... |
var mongoose = require('mongoose'),
shortid = require('shortid'),
helpers = require('./model_helpers'),
broadcast = require('./broadcast'),
chat = require('./chat'),
skill = require('./skill'),
job = require('./job'),
project = require('./project'),
Schema = mongoose.Schema,
ObjectId... |
// Compiled by ClojureScript 0.0-2322
goog.provide('clojure.browser.repl');
goog.require('cljs.core');
goog.require('clojure.browser.event');
goog.require('clojure.browser.event');
goog.require('clojure.browser.net');
goog.require('clojure.browser.net');
clojure.browser.repl.xpc_connection = cljs.core.atom.call(null,nu... |
// Adapted from Vue CLI v2 "init" command
const kolorist = require('kolorist')
const Metalsmith = require('metalsmith')
const Handlebars = require('handlebars')
const async = require('async')
const render = require('consolidate').handlebars.render
const path = require('path')
const multimatch = require('multimatch')
... |
describe('Game service', function () {
beforeEach(angular.mock.module('sevenWonders.core.game'));
beforeEach(angular.mock.module('sevenWonders.core.model'));
beforeEach(module(function ($exceptionHandlerProvider) {
$exceptionHandlerProvider.mode('log');
}));
beforeEach(inject(function (_Us... |
/*
* 存放错误记录
*/
const Sequelize = require('sequelize');
module.exports = (db) => {
return db.define('logtable', {
/* 订单价格 */
totalCost: {
type: Sequelize.DECIMAL(10, 2)
},
orderId: {
type: Sequelize.INTEGER,
unique: true
},
/*买家付款*/
buyerPay: {
type: Sequelize.DEC... |
$(document).ready(function(){
$('#dataProductos').DataTable( {
dom: 'Bfrtlip',
responsive: true,
buttons: [
{
extend: 'excel',
exportOptions: {
columns: [2,3,4,5]
}
}
],
columnDefs: [
{
targets: [... |
declare module pg {
// Note: Currently There are some issues in Function overloading.
// https://github.com/facebook/flow/issues/2423
// So i temporarily remove the
// `((event: string, listener: Function) => EventEmitter );`
// from all overloading for EventEmitter.on().
// `any` types exised in this file... |
if (Meteor.isClient) {
}
if (Meteor.isServer) {
Meteor.startup(function () {
});
}
|
/*
FILE ARCHIVED ON 0:22:26 Dec 1, 2007 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 8:41:23 Apr 5, 2015.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*============================... |
'use strict';
// bower install angular#~1.3 angular-route#~1.3 angular-animate#~1.3
// bower install angular#~1.4 angular-route#~1.4 angular-animate#~1.4
angular.module('mgcrea.ngStrapDocs', ['mgcrea.ngStrap', 'mgcrea.ngPlunkr', 'ngRoute', 'ngAnimate'])
.constant('version', 'v2.3.6')
.constant('ngVersion', angular.ve... |
define(function(require, exports, module) {
var useTestServer = true;
var testBaseUrl = 'http://10.0.0.9:9999/';
var releaseBaseUrl = 'https://shiliujishi.com/';
var testServiceUrls = {
'account' : testBaseUrl + 'admin/member/members.js'
};
var releaseServ... |
module.exports = {
conditions: [''],
name: 'SpreadElement',
rules: [
'... AssignmentExpression_In',
],
handlers: [
'$$ = new (require(\'./ast/SpreadElementNode\'))($2, { loc: this._$, yy })',
],
subRules: [
require('./AssignmentExpression_In'),
],
};
|
module.exports = { prefix: 'fal', iconName: 'sign-out', icon: [512, 512, [], "f08b", "M48 64h132c6.6 0 12 5.4 12 12v8c0 6.6-5.4 12-12 12H48c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h132c6.6 0 12 5.4 12 12v8c0 6.6-5.4 12-12 12H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48zm279 19.5l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17l1... |
/*
* TouchPoint.js v1.0.1 - 2017-09-30
* A JavaScript library that visually shows taps/cicks on HTML prototypes
* https://github.com/jonahvsweb/touchpoint-js
*
* Copyright (c) 2017 Jonah Bitautas <jonahvsweb@gmail.com>
*
* Released under the MIT license
*/
'use strict';
var TouchPoint;
(function () {
... |
import React from 'react'
import { Link } from 'react-router'
import Logon from './logon'
/**
* 本组件为欢迎页(首页)
* 由于几乎没有交互逻辑
* 因此可以不使用类的写法
*
* 实际上,ES6 的类经由 Babel 转码后
* 其实还是返回一个类似的函数
*/
const Welcome = () => (
<div className="row">
<div className="medium-8 columns">
<h1>欢迎使用 <br/> 我是占位符我是占位符我是占位符我是... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BsNavbar = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descripto... |
'use strict';
// Configuring the Pets module
angular.module('pets').run(['Menus',
function(Menus) {
// Add the pets dropdown item
Menus.addMenuItem('topbar', {
title: 'Mascotas',
state: 'pets',
type: 'dropdown'
});
// Add the dropdown list item
Menus.addSubMenuItem('topbar', 'pets', {
title: 'M... |
/* @ngInject */
class NavigationController {
constructor(){}
}
export default NavigationController; |
import Layer from './components/layer/layer.js'
import './css/common.css'
const App=function () {
let dom=document.getElementById('app');
let layer=new Layer()
dom.innerHTML=layer.tpl({
name:'john',
arr:['apple','xiaomi']
});
}
new App(); |
// define collections
Notifications = new Mongo.Collection('notifications')
if (Meteor.isClient) {
angular.module('notifyapp', ['angular-meteor'])
angular.module('notifyapp').controller('notificationsListController', ['$meteor', '$scope',
function ($meteor, $scope) {
$scope.notifications = $meteor.coll... |
version https://git-lfs.github.com/spec/v1
oid sha256:f28a6959ed09eed29c22734d75df9d0d7a85111a4cb695808bc0da5cc57318d8
size 8132
|
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.m.Select.
sap.ui.define(['jquery.sap.global', './Bar', './Dialog', './InputBase', './Popover', './SelectList'... |
import {default as bindScope} from './bind';
import {forEach, uid} from '../';
import Scope from '../scope';
const EACH_FOR = 'data-each-for';
// each="foo"
var propertyRegExp = '[a-zA-Z0-9_\\$\\.]+';
const PROPERTY_REG_EXP = new RegExp(`^${propertyRegExp}$`);
// each="foo in bar"
var eachInRegExp = `(${propertyRegE... |
// importa models/user
// import models/user
var User = require('../models/user');
// metodo proteger rotas com autenticação (token)
// method to protect routes with authentication
exports.authorize = (token, resp) => {
// .findOne() -> metodo mongoDB, procura token na BD
User.findOne({'token': token}, (... |
'use strict';
describe("filter", function() {
beforeEach(module("app"));
return describe("interpolate", function() {
beforeEach(module(function($provide) {
$provide.constant("VERSION", "TEST_VER"); // mock the service
}));
return it("should replace VERSION", inject(function(interpolateFilter) {
return exp... |
(function() {
var ArrMethods = {
where: function(attrs) {
var nodes = [];
_.each(this, function(model) {
nodes = nodes.concat(model.where(attrs));
});
return wrapArray(_.uniq(nodes));
}
};
var wrapArray = function(array) { return _.extend(array, ArrMethods); };
var TreeModel = Backbone.TreeMod... |
(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){e.defineMode("solr",function(){function k(b){return function(a,c){for(var d=!1,g;null!=(g=a.next())&&(g!=b||d);)d=!d&&"\\... |
/*globals $,asyncTest,deepEqual,equal,expect,module,notDeepEqual,notEqual,
notStrictEqual,ok,QUnit,raises,start,stop,strictEqual,test */
var audioUrl = 'audio/the_black_atlantic_-_dandelion.mp3';
var errorUrl = 'audio/idonotexist.mp3';
asyncTest( " returns a promise object which should resolve with the audio object"... |
var searchData=
[
['findwhereattributes',['FindWhereAttributes',['../class_client_plugin_1_1_providers_1_1_identifier.html#aa316293812114130847eb77455704a97',1,'ClientPlugin::Providers::Identifier']]],
['findwhereopcodes',['FindWhereOpCodes',['../class_client_plugin_1_1_providers_1_1_identifier.html#a916ac175843a21... |
module.exports = require('./GUI')
|
'use strict';
const bundleTypes = {
UMD_DEV: 'UMD_DEV',
UMD_PROD: 'UMD_PROD',
NODE_DEV: 'NODE_DEV',
NODE_PROD: 'NODE_PROD',
FB_WWW_DEV: 'FB_WWW_DEV',
FB_WWW_PROD: 'FB_WWW_PROD',
RN_OSS_DEV: 'RN_OSS_DEV',
RN_OSS_PROD: 'RN_OSS_PROD',
RN_FB_DEV: 'RN_FB_DEV',
RN_FB_PROD: 'RN_FB_PROD',
};
const UMD_DEV... |
module.exports = {
'secret': 'Secret string for encoding in the api',
'database': 'mongoDB URL'
};
|
// React Component
import React,{ Component,PropTypes } from 'react'
import { Menu, Icon } from 'xComponent'
const SubMenu = Menu.SubMenu
const Item = Menu.Item
import logo from '../img/logo.png'
import defaultUser from '../img/defaultUser.png'
export default class PortalHeaderComponent extends Component {
handleMen... |
function sum_AB_test(mode) {
var gpu = new GPU({ mode });
var f = gpu.createKernel(function(a, b) {
return (a[this.thread.x] + b[this.thread.x]);
}, {
output : [6],
mode : mode
});
QUnit.assert.ok( f !== null, "function generated test");
var a = [1, 2, 3, 5, 6, 7];
var b = [4, 5, 6, 1, 2, 3];
var ... |
import callMethod from '../callMethod'
export default async function (root, {email}, context) {
callMethod(context, 'forgotPassword', {email})
return {
success: true
}
}
|
import React,{PropTypes} from 'react';
class InputEmail extends React.Component {
constructor(props, context) {
super(props, context);
this.removeInput = this.removeInput.bind(this);
this.updateEmail = this.updateEmail.bind(this);
}
removeInput() {
this.props.deleteManagerInputs(this.props.po... |
import React from 'react';
import "./styles.css";
import Section from '../Section';
const SectionDark = (props) => <Section {...props} className="SectionDark">{props.children}</Section>;
export default SectionDark
|
export default {
AF: 'Afghanistan',
EG: 'Ägypten',
AX: 'Åland',
AL: 'Albanien',
DZ: 'Algerien',
AS: 'Amerikanisch-Samoa',
VI: 'Amerikanische Jungferninseln',
AD: 'Andorra',
AO: 'Angola',
AI: 'Anguilla',
AQ: 'Antarktika',
AG: 'Antigua und Barbuda',
GQ: 'Äquatorialguine... |
var mongoose = require('mongoose');
module.exports = function (uri) {
mongoose.connect(uri);
mongoose.connection.on('connected', function () {
console.log('Mongoose! Conectado em ' + uri);
});
mongoose.connection.on('disconnected', function () {
console.log('Mongoose! Desconectado de '... |
soku.factory('sokuService', ['$rootScope', '$http', '$routeParams',
function($rootScope, $http, $routeParams) {
var serviceBase = 'api/';
params = $routeParams;
function getGameId(){
return params.gameId;
}
return {
getPlayerTurn : function(){
return $http.get(serviceBase + 'player' ... |
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
clean: {
dev: ["dev/css/fonts"],
build: ["build/**/*", "!build/VERSION"],
cleanup: [".grunt/"]
},
copy: {
dev: {
expand: true,
cwd: "node_modules/bootstrap-sass/assets/... |
// is location refreshing currently on?
var watchingPosition = false;
// current location variable and dependency
var location = new ReactiveVar(null);
// error variable and dependency
var error = new ReactiveVar(null);
var onError = function (newError) {
error.set(newError);
};
var onPosition = function (newLoca... |
// FIXME should possibly show tooltip when dragging?
goog.provide('ol.control.ZoomSlider');
goog.require('ol');
goog.require('ol.View');
goog.require('ol.animation');
goog.require('ol.control.Control');
goog.require('ol.css');
goog.require('ol.easing');
goog.require('ol.events');
goog.require('ol.events.Event');
goog... |
Module.register("camera", {
// Module config defaults.
defaults: {
},
start: function() {
this.sendSocketNotification("FETCH_ALL_PHOTOS");
this.photos = ['~/theia/photos/william.jpg'];
},
socketNotificationReceived: function(notification, payload) {
Log.info(this.name + " received a notificat... |
import DegToRad from 'math/DegToRad.js';
import RadToDeg from 'math/RadToDeg.js';
import Wrap from 'math/Wrap.js';
import ShapeFill from 'canvas/shapes/ShapeFill.js';
import ShapeStroke from 'canvas/shapes/ShapeStroke.js';
export default function Shape (
{
x = 0,
y = 0,
widt... |
var Parse = require('parse').Parse,
models = require('./models'),
readline = require('readline'),
colors = require('colors');
function printTags(tags) {
var str = '\bTags'.blue.bold + ': '.grey;
for (var i = 0; i < tags.length; i++) {
if (i > 0) str += ', '.grey;
str += tags[i].green;
};
console.log(str)... |
// ==========================================================================
// Grunt Build
// ==========================================================================
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
sass: {
dev: {
options: {
style: 'expanded',
... |
initSidebarItems({"enum":[["ColorMode","The color mode the encoder will use to encode the image."]],"struct":[["Encoder","A GIF encoder."]]}); |
import dva from 'dva';
import './index.css';
import { useRouterHistory } from 'dva/router';
import { createHashHistory } from 'history'
// 1. Initialize
const app = dva({
history: useRouterHistory(createHashHistory)({ queryKey: false }), // 去除 _k
});
// 2. Plugins
// app.use({});
// 3. Model
// app.model(require('... |
var admin = require("firebase-admin");
admin.initializeApp({
credential: admin.credential.cert("./server/firebase-service-account.json"),
databaseURL: "https://solo-project-70874.firebaseio.com", // replace this line with your URL
});
/* This is where the magic happens. We pull the id_token off of the request,
ve... |
import {DIRECTION, EVENT} from './Constants';
import SprdRange from './SprdRange';
import Actions from './Actions';
import {eventTriggered} from './Util';
//used to handle arrow key movements
export default class SprdNavigator {
static move(props, direction, step = 1){
let {ranges, minCol, minRow, rows, cols, i... |
const hooks = require('hooks');
hooks.before('Articles > Publish an article > 201 > application/json; charset=utf-8', (transaction) => {
transaction.request.headers.Authorization = 'Basic: YWxhZGRpbjpvcGVuc2VzYW1l';
});
|
var stack = []
, domReadyRE = /interactive|complete|loaded/
, isReady = false
function async(fn){
setTimeout(function(){
fn()
}, 0)
}
function checkStatus(){
var item
if(isReady) return
if(domReadyRE.test(document.readyState)) {
isReady = true
while(item = stack.shift()) async(item)
retu... |
var width = 800;
var height = 600;
var score = 0;
var lives = 3;
var time = 0;
var started = false;
//rocks and misiles (sets);
var rock_group = [];
var missile_group = [];
var explosion_group = [];
var timer = "undefined";
var asteroid_info;
var keydown = {};
var FPS = 60;
var extra_size = 40;
window.requestAnimFr... |
var _ = require('lodash');
var glob = require('glob');
var requireConfig = require('./assets/app/config');
var spawn = require('child_process').spawn;
function buildRequireConfig(options) {
'use strict';
if (options == null) {
options = {};
}
var ret = {};
_.extend(ret, requireConfig('../..'), options, {... |
function solve(args) {
var rows = args[0],
matrix = [],
current,
row, col;
for (row = 0; row < rows; row += 1) {
matrix[row] = '';
current = row + 1;
for (col = 0; col < rows; col += 1) {
matrix[row] += String(current) + ' ';
current += 1... |
import {
createStore,
applyMiddleware,
compose
} from 'redux';
import thunk from 'redux-thunk';
import rootReducer from '../reducers';
const createStoreWithMiddleware = compose(
applyMiddleware(
thunk
)
)(createStore);
export default function configureStore(initialState) {
const store = createStoreWi... |
// Generated on 2014-05-19 using generator-angular-fullstack 1.4.2
'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 = function (grunt) {
// Load grun... |
var express = require('express');
var router = express.Router();
router.use(require('./cart'));
router.use(require('./signup'));
router.use(require('./login'));
router.use(require('./share'));
router.use(require('./shop'));
module.exports = router;
|
import Ember from 'ember';
import FactoryGuy, {build, buildList} from 'ember-data-factory-guy';
import SharedAdapterBehavior from './shared-adapter-tests';
import SharedFactoryGuyTestHelperBehavior from './shared-factory-guy-test-helper-tests';
import {title, inlineSetup} from '../helpers/utility-methods';
let App = ... |
/*
* grunt-srcmust
* https://github.com/derrickliu/grunt-srcmust
*
* Copyright (c) 2014 derrickliu
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
rev: {
files: {
src: ['release/js/contact/main.js','r... |
/**
* angular-strap
* @version v2.2.1 - 2015-11-27
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
'use strict';
angular.module('mgcrea.ngStrap.helpers.debounce', [])
// @source jashkenas/underscore... |
"use strict";
module.exports = {
rules: {
// The following rules can be used in some cases. See the README for more
// information. (These are marked with `0` instead of `"off"` so that a
// script can distinguish them.)
curly: 0,
"max-len": 0,
"no-mixed-operators": 0,
quotes: 0,
// T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.