code stringlengths 2 1.05M |
|---|
import {Trait} from '../entity.js';
export default class Velocity extends Trait {
constructor() {
super('velocity');
}
update(entity, deltaTime) {
entity.pos.x += entity.vel.x * deltaTime;
entity.pos.y += entity.vel.y * deltaTime;
}
}
|
/* globals describe, it */
var chai = require('chai')
chai.should()
chai.use(require('chai-interface'))
describe('Nullable', function () {
var Nullable = require('../')
it('callable with or without new', function () {
Nullable(null).should.be.instanceof(Nullable)
new Nullable(null).should.be.instanceof(Nu... |
apos.define('apostrophe-workflow-modified-documents-manager-modal', {
extend: 'apostrophe-pieces-manager-modal',
construct: function(self, option) {
self.onChange = function() {
// We refresh list view on *all* doc changes, not just one piece type
self.refresh();
};
var superBeforeShow = sel... |
'use strict';
/* import all background scripts */
import './background';
|
define([], function () {
'use strict';
function WizardService($filter, Restangular) {
this.getConfig = getConfig;
/**
* Implementation
*/
function getConfig(configName, filter, successCbk) {
var config = Restangular.oneUrl('config','./app/modules/pce/dat... |
import dotenv from 'dotenv'
import { join } from 'path'
const cwd = process.cwd()
export const CONFIG = 'chenv.config.js'
export const loadCredentials = (envValue) => {
const { error } = dotenv.config({
path: (envValue && typeof envValue === 'string')
? envValue
: join(cwd, '.env')
})
if (error) c... |
var React = require('react');
var Results = require('../components/Results');
var ErrorMsg = require('../components/Error');
var PropTypes = React.PropTypes;
var apiHelper = require('../utils/apiHelper');
var ResultsContainer = React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
... |
// Defines routes for app.
var AppRouter = Backbone.Router.extend({
routes: {
// Basic route:
"register" : "registerUser",
// Route with params:
"market/:id" : "getMarket",
// Route with optional params:
"paypalpaymentapproved(/:... |
/* ===================================================
* jquery-sortable.js v0.9.13
* http://johnny.github.com/jquery-sortable/
* ===================================================
* Copyright (c) 2012 Jonas von Andrian
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or w... |
var create = require('./create');
var render = require('../../var/string/html');
var html = require('./html');
var isString = require('../../var/is/string');
var tmp_div;
module.exports = function(attrs, tag, inner) {
tmp_div = tmp_div || create();
html((isString(attrs) && attrs.indexOf('<') > -1) ? attrs : re... |
var appConstants = {
'EVENT_SHOW_LOGIN': 'event:show:login',
'EVENT_SHOW_HOME': 'event:show:home',
'EVENT_REDIRECT_TO_HOME': 'rcommand:redirect-to:home'
}
export {appConstants as default} |
/*
* ProductHighlights Messages
*
* This contains all the text for the ProductHighlights component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.components.ProductHighlights.header',
defaultMessage: 'product highlights',
},
});
|
module.exports = {
InitializedEvent: require('./event/InitializedEvent.js'),
ShutdownEvent: require('./event/ShutdownEvent.js'),
NewArticleEvent: require('./event/NewArticleEvent.js'),
ArticleCommentChangedEvent: require('./event/ArticleCommentChangedEvent.js'),
CafeMemberChangedEvent: require('./ev... |
yarr.controller('PlaceController', ['$scope', '$stateParams', '$state' , 'Places', 'Ratings', 'Users', 'Auth', function($scope, $stateParams, $state, Places, Ratings, Users, Auth) {
$scope.place = Places.get({ id: $stateParams.id });
$scope.ratings = Ratings.query({ place: $stateParams.id });
$scope.ratings.$prom... |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('/Site', ['exports', 'jquery', 'Base', 'Menubar', 'Sidebar', 'PageAside'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('jquery'), require('Base'), require('Menubar'), require('Sidebar')... |
const mysqlCmds = require('./commands.js')
var rssConfig = require('../../config.json')
var mysql, sqlite3
if (rssConfig.sqlType.toLowerCase() == "mysql") mysql = require('mysql');
else if (rssConfig.sqlType.toLowerCase() == "sqlite3") sqlite3 = require('sqlite3').verbose();
const credentials = require('../../mysqlCr... |
const each = require("./each.js");
const flatten = require("./flatten.js");
const isBool = require("../object/isBool.js");
/**
* Get a new array of values transformed by a function.
* @param {Object} col The collection to evaluate
* @param {Function} fn The function to apply
* @par... |
'use strict';
var fs = require('fs');
var expect = require('chai').expect;
var LintReporter = require('../src/js/lint-reporter');
describe('LintReporter', function() {
describe('runReport(jsonOutput)', function() {
});
});
|
/*******************************
Install Task
*******************************/
/*
Install tasks
For more notes
* Runs automatically after npm update (hooks)
* (NPM) Install - Will ask for where to put semantic (outside pm folder)
* (NPM) Upgrade - Will look for semantic install, copy over fil... |
'use strict';
angular.module('myApp.a', ['ngRoute'])
.controller('pageController', ['$scope', function ($scope) {
console.log('hello');
}]) |
// <script>
/*
=============================================================
WebIntelligence(r) Report Panel
Copyright(c) 2001-2003 Business Objects S.A.
All rights reserved
Use and support of this software is governed by the terms
and conditions of the software license agreement and support
policy of Busines... |
'use strict';
// Posts controller
angular.module('posts').controller('PostsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Posts',
function($scope, $stateParams, $location, Authentication, Posts) {
$scope.authentication = Authentication;
// Create new Post
$scope.create = function() {
... |
"use strict";
var chai = require('chai');
var sinon = require('sinon');
var Person = require("../lib/Person");
var expect = chai.expect;
describe('Person test', function () {
var per;
beforeEach(function () {
per = new Person("Ganesh");
});
afterEach(function () {
per = null;
});
... |
/*jshint node: true, globalstrict: true */
"use strict";
// Imports
// -------------------------------------------------------------------------------------------------
var del = require("del");
var gulp = require("gulp");
var to5 = require("gulp-6to5");
// Configuration
// ---------------------------------------... |
import Ember from 'ember';
export default Ember.Mixin.create({
isStart: Ember.computed.equal('model.type', 'start'),
isEnd: Ember.computed.equal('model.type', 'end'),
isCondition: Ember.computed.equal('model.type', 'condition'),
isProcess: Ember.computed.equal('model.type', 'process'),
isStartOrEnd: Ember.co... |
// jQuery
$(document).ready(function() {
// Définition des textareas redimentionnables
$("textarea").addClass("ui-widget-content").resizable( { handles: "s", minHeight: 50 });
// Simulation click sur avis au rechargement
var jqoTmp = $("input[name='Forms_E5_Avis']:checked");
if(jqoTmp.length != 0) jqoTm... |
/*
mustache.js — Logic-less templates in JavaScript
See http://mustache.github.com/ for more info.
*/
var Mustache = module.exports = function () {
var _toString = Object.prototype.toString;
Array.isArray = Array.isArray || function (obj) {
return _toString.call(obj) == "[object Array]";
}
var _trim... |
export { default } from './GitPlainWordmark'
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
exports.getScroll = getScroll;
var _utils = require('./utils');
var _react = require('react');
va... |
/* global namespace */
(function() {
'use strict';
var ViewModel = namespace('ca.wbac.blog.model.Blog');
var mithrilUtils = namespace('ca.wbac.collectionJson.utils.Mithril');
var selected = -1;
var response = {
collection: {
items: [],
template: {
data: [
{ 'prompt': 'Titl... |
// Copyright (c) 2014 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file.
"use strict";
// Release build file. Automates our deployment process.
var git = require("../util/git_runner.js");
var branches = require("../config/branches.js");
var sh = require("../util/sh.js");
//*** RELE... |
'use strict';
var advance = require('../util').advance;
var addPrefix = function (message) {
return 'Inline-block format violation: ' + message;
};
/**
* Error messages.
* @readonly
*/
var messages = {
empty: addPrefix('can\'t be empty.'),
noFirstSpace: addPrefix('no space after "/*".'),
extraFirstSpace... |
import test from 'ava';
import {arrayToObject, cardId} from '../src/utilities';
// Card ID tests
test('card id pilot', async t => {
let response = cardId({
id: 12,
slot: 'pilot'
});
t.is(response, '12p');
});
test('card id condition', async t => {
let response = cardId({
id: 0,
slot: 'condition'
});... |
export default function createValidator(rules) {
return (data = {}) => {
const errors = {}
Object.keys(rules).forEach((key) => {
const rule = join([].concat(rules[key])) // concat enables both functions and arrays of functions
const error = rule(data[key], data)
if (error) {
errors[k... |
import Koa from 'koa'
import logger from 'koa-logger'
import session from 'koa-session-minimal'
import redisStore from 'koa-redis'
import Router from 'koa-router'
import bodyParser from 'koa-bodyparser'
import { graphqlKoa, graphiqlKoa } from 'graphql-server-koa'
import schema from './schema'
import formidable from './... |
/*global describe, beforeEach, it*/
'use strict';
var assert = require('assert');
describe('astrogenerator generator', function () {
it('can be imported without blowing up', function () {
var app = require('../app');
assert(app !== undefined);
});
});
|
import sinon from "sinon";
import Database from "almaden";
import Model from "../../../";
import databaseConfig from "../databaseConfig.json";
import {User} from "../testClasses.js";
describe(".fetch(callback)", () => {
let user,
userAttributes,
clock;
beforeEach(() => {
clock = sinon.useFakeTimers();
Mod... |
var fileExtensionRE = /\.\w+$/;
var specialCharsRE = /[!@#\$%\^\&\*\)\(\\[\]+=]+/g;
var spaceLikeCharsRE = /[_-]/g;
var whiteSpaceRE = /[\s\.]+/g;
var seasonEpisodeRE = /s(\d+)(\s+)?e(\d+)/gi;
var leadingZeroesRE = /0+(\d+)/g;
module.exports = function simplifyFileName(fileName){
return fileName.replace(fileExten... |
'use strict';
class CorsMiddleware extends Skyer.AppMiddleware {
constructor( options ) {
super(options);
this.order = 70;
}
__default() {
const cors = require('kcors');
return cors();
}
}
module.exports = CorsMiddleware;
|
import React, { Component } from 'react';
import { changeTraining, getData} from '../reducers/'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import axios from 'axios';
let trainings;
class Capitol extends Component {
constructor(props){
super(props);
this.state={
traini... |
import PropTypes from 'prop-types';
import React from 'react';
import injectT from '../../i18n/injectT';
function AccessibilityShortcuts({ t, mainContentId }) {
const mainContentHref = `#${mainContentId}`;
return (
<div className="app-AccessibilityShortcuts">
<a
className="sr-only app-Accessibi... |
'use strict'
var request = require('request')
var cheerio = require('cheerio')
var moment = require('moment')
var async = require('async')
var tracker = require('../')
var trackingInfo = function (number) {
return {
method: 'POST',
url: 'http://www.rincos.co.kr/tracking/tracking_web.asp',
data: {
... |
sap.ui.define([
"flp/no/unit/model/models",
"sap/ui/thirdparty/sinon",
"sap/ui/thirdparty/sinon-qunit"
], function (models) {
"use strict";
QUnit.module("createDeviceModel", {
afterEach : function () {
this.oDeviceModel.destroy();
}
});
function isPhoneTestCase(assert, bIsPhone) {
// Arran... |
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; va... |
version https://git-lfs.github.com/spec/v1
oid sha256:380dcffd8a7564b74871bebe87bbc24f985be39513d4970874ede3401bd70e1d
size 57476
|
// ==UserScript==
// @name Spacom.Addons.Fleets.Sort
// @version 0.1.4
// @namespace http://dimio.org/
// @description Add a sorting and filters for fleets tabs
// @author dimio (dimio@dimio.org)
// @license MIT
// @homepage https://github.com/dimio/userscripts-spacom.ru-addons
// @suppo... |
"use strict";
module.exports = {
"rules": {
// Enforces getter/setter pairs in objects
"accessor-pairs": 0,
// treat var statements as if they were block scoped
"block-scoped-var": 0,
// specify the maximum cyclomatic complexity allowed in a program
"complexity": [0, 11],
// require retur... |
const personalData = require('../personalData');
const webModel = require('../webModel');
const webModelFunctions = require('../webModelFunctions');
const robotModel = require('../robotModel');
const masterRelay = require('../MasterRelay');
const wait = require('../wait');
async function handleUsbHubPower() {
if (we... |
var x;
x = $(document);
x.ready(proyecto);
function proyecto(){
$( "input" ).on( "click", function() {
var anho = $("#anhopro option:selected");
var opciones = $("input:checked").val();
if(anho.val() != ''){
var v3;
v3 = anho.val();
alert(v3);
var postForm ={'v3' : v3};
alert(opciones);... |
Template.RecipeSingle.onCreated(function(){
var self = this;
self.autorun(function() {
var id = FlowRouter.getParam('id');
self.subscribe('SingleRecipe', id);
});
});
Template.RecipeSingle.helpers({
recipe: ()=> {
var id = FlowRouter.getParam('id');
return Recipes.findOne({_id: id});
}
}); |
'use strict';
export default class BoardCtrl {
constructor($location, metaDataService, menuService, boardService) {
this.title = 'BoardOfShame Список мошенников';
metaDataService.setPageTitle(this.title);
menuService.setActiveItem('/');
this.$location = $location;
this.boar... |
'use strict';
module.exports.tester = require('./tester.js')
module.exports.cli = require('./cli.js');
|
// 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 any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
var yield = function yield(){}; |
(function () {
$("#ProdutoId").change(
function () {
$.get("/Produtos/ObterPrecoDoProduto/" + $("#ProdutoId").val(),
function (data) {
$("#PrecoUnitarioCobrado").val(data.replace(".",","));
});
});
})(); |
module.exports = {
_: '/cond/:val1(\\d+)',
get: (controller) => `/globally_replaced_to_root_all/cond/${controller.params('val1', true)}`,
};
|
'use strict'
var subclassOf = require('../util/subclassOf');
var Character = require('./Character');
function Player(){
Character.apply(this, arguments);
}
Player.prototype = subclassOf(Character);
module.exports = Player; |
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'a11yhelp', 'sv', {
title: 'Hjälpmedelsinstruktioner',
contents: 'Hjälpinnehåll. För att stänga denna d... |
'use strict';
/**
* Clone helper
*
* Clone an array or object
*
* @param items
* @returns {*}
*/
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
module.exports = ... |
songist.controller('PlayerCtrl', ['$scope', '$location', '$route', 'Tracks', 'MediaGalleries', 'Queue', function($scope, $location, $route, Tracks, MediaGalleries, Queue) {
var shuffled = false;
$scope.player = document.getElementById('player');
$scope.history = [];
$scope.duration;
$scope.currentTime;
$s... |
/**
*
* @providesModule restful
*
*/
import 'react-native';
// o tipo do corpo de uma requisição
export type PayloadType = string | Object;
// o tipo do retorno de um pedido
export type ResultType = { status: string,
error: null | string,
response: null | Pro... |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(gene... |
var t = require('babel-types');
function toES5Component(name, jsxElement) {
return t.variableDeclaration(
'const',
[t.variableDeclarator(
t.identifier(name),
t.callExpression(
t.memberExpression(
t.identifier('React'),
t.identifier('createClass')),
[t.objectExpression... |
var register = require('./register')
var stream = require('stream')
var cadence = require('cadence')
module.exports = cadence(function (step, directory, params, argv, stdin) {
if (Array.isArray(params)) {
stdin = argv
argv = params
params = {}
}
step(function () {
register.o... |
var digger = require('../src');
var async = require('async');
var _ = require('lodash');
var Bridge = require('digger-bridge');
describe('contractresolver', function(){
it('should run a basic pipe contract', function(done){
var warehouse = digger.warehouse();
warehouse.use(digger.middleware.contractreso... |
'use strict';
/**
* The gameboard controller is responsible for setting up a level and managing gameplay for
* a level
* */
var Gameboard = function (canvas, hdim, vdim) {
this.canvas = canvas;
this.camera = new Camera(canvas);
this.grid = new GameGrid(768 * hdim, 1024 * vdim, 768, 1024);
this.waterf... |
// Dev Mode Webpack Configuration
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
app: [
'webpack-dev-server/client?http://0.0.0.0:3000',
'webpack/hot/only-dev-server',
'./src/main/js/mountApp'
]
},
output: {
path: path.join(__dirname, 'pub... |
var orderly = function () {
var a = function () {
var a = {}, b = {}, c = function (d) {
a[d] || (console.log (d), a[d] = {}, b[d] (c, a[d], {id: d}));
return a[d]
};
c.def = function (a, c) {
console.log ("def", a), b[a] = c.factory
};
return c
} ();
a.def ("orderly", {
... |
export default () => (
<div className="footer">
<div className="widgets">
<iframe src="https://ghbtns.com/github-btn.html?user=getbem&repo=getbem.com&type=star&count=true&size=large" frameBorder="0" scrolling="0" width="130px" height="30px"></iframe>
</div>
<br/>
<p>Brought to you by <a href="https://github... |
var exec = require('child_process').exec;
var curl = require('node-curl');
var fs = require('fs');
var regenerate = require('regenerate');
var parseLine = function (line) {
if (line.indexOf('#') < 1) {
return null;
}
var category = line.match(/# ([A-Z][a-z&])/)[1];
var fields = line.replace(/#.*/, '').trim... |
import styles from './header.css'
import HeaderService from './header.service'
import userSection from './user-section/user-section.component'
import navigation from './navigation/navigation.component'
export default window.angular
.module('header', [userSection.name, navigation.name, 'ui.router'])
.service('Head... |
/**
* Init wrapper for the core module.
* @param {Object} The Object that the library gets attached to in library.init.js. If the library was not loaded with an AMD loader such as require.js, this is the global Object.
*/
function initVlilleCore(context) {
'use strict';
/**
* @constructor
* @param... |
// external dependencies
const bPromise = require('bluebird');
// internal dependencies
const PsmImagePicker = require('../image-picker');
// logic
exports = module.exports = function(filePath) {
var imageDictionary;
// try parsing the input file
try {
imageDictionary = require(filePath);
} catch (error)... |
'use strict';
var cssom = require('cssom'),
os = require('os');
/**
* Returns Media Query text for a CSS source.
*
* @param {String} css source
* @api public
*/
module.exports = function (css) {
var rules = cssom.parse(css).cssRules || [];
var queries = [];
for (var i = 0, l = rules.length; i <... |
/**
* @fileoverview Prevent missing displayName in a React component definition
* @author Yannick Croissant
*/
'use strict';
const Components = require('../util/Components');
const astUtil = require('../util/ast');
const docsUrl = require('../util/docsUrl');
// -----------------------------------------------------... |
$(function () {
var flag=true;
getDoctorInfo();
var userName;
//按钮发送消息 ------------------------------------------------
$("#send").click(function() {
var msg = $("#sendMsg").val();
if(msg=="" || msg==" " ||msg==null){//消息判断----------------
alert("消息不能为空");
return false;
}
//医生回复-... |
(function(){$(function(){return ko.bindingHandlers.immybox_choices={init:function(i,o,a){var n,e;n=ko.utils.unwrapObservable(o()),(e=ko.utils.unwrapObservable(a().immybox_options)||{}).choices=n,$(i).immybox(e),ko.utils.domNodeDisposal.addDisposeCallback(i,function(){$(i).immybox("destroy")})},update:function(i,o,a){va... |
'use strict';
describe('Editor List and Entry', function () {
var constants = require('../../../../testConstants');
var loginPage = require('../../../../bellows/pages/loginPage.js');
var projectsPage = require('../../../../bellows/pages/projectsPage.js');
var util = require('../../../../bellows/p... |
let Statment = require('../base').Statment;
let errors = require('../../../basics/errors');
let events = require('../../events');
module.exports = Statment.extend('ACTION','FOR_LOOP', {
}, {
$init(variable, source, scope){
this.variable = variable;
if (!this.variable["#addressable"]){
throw new errors.RuntimeE... |
import gulp from 'gulp';
// Babel
import babel from 'gulp-babel';
// Cleaning filesystem
import del from 'del';
// Contact and ordering
import runSequence from 'run-sequence';
// Minification Javascript and Browserify
import browserify from 'browserify';
import uglify from 'gulp-uglify';
import source from 'vinyl-s... |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var stylus = require('stylus');
var nib = require('nib');
var environment = require('./env');
var... |
(function () {
angular
.module('app')
.controller('ControlPanelController', [
'$mdDialog', '$interval',
ControlPanelController
]);
function ControlPanelController($mdDialog, $interval) {
var vm = this;
vm.buttonEnabled = false;
vm.showPr... |
var cookbookApp = angular.module('cookbookApp', ["ngRoute", "cookbookController", "cookbookFilter"]);
cookbookApp.config(["$routeProvider", function($routeProvider){
$routeProvider.
when("/cookbooks",{
templateUrl: 'partials/cookbook-list.html',
controller: 'cookbookListCrl'
... |
import Phaser from 'phaser';
export default class extends Phaser.Sprite{
constructor(game,x,y,asset){
super(game,x,y,asset);
this.colorMap = new Map([
[0,'flash-red'],
[1,'flash-blue'],
[2,'flash-green'],
[3,'flash-pink'],
[4,'flash-gold'],
[5,'flash-lb']
]);
// ... |
import React from 'react';
import ReactShallowRenderer from 'react-test-renderer/shallow';
import Progress from 'chamel/Progress';
/**
* Test rendering the Progress
*/
describe("Progress Component", () => {
// Basic validation that render works in edit mode and returns children
it("Should render", () => {
... |
/**********************************************************
examples.js - Some use cases and tests for Dcor
Alan Zawari
May 2014
Note:
First define all sample functions (Block #1)
and then try different test cases one by one (Block #2)
***********************************************************/
... |
define(function(require) {
var Position = require('../src/position');
var $ = require('$');
describe('position', function() {
var pinElement, baseElement, noopDiv;
$(document.body).css('margin', 0);
beforeEach(function() {
pinElement = $('<div style="width:100... |
var page = div();
page.innerHTML = Main;
class Renderer {
PARTICLE_COUNT = 150;
PARTICLE_RADIUS = 6;
MAX_ROTATION_ANGLE = Math.PI / 60;
TRANSLATION_COUNT = 500;
constructor(strategy) {
if (strategy) {
this.init(strategy);
}
}
init(strategy) {
this.setPar... |
/**
* Created by vedi on 11/21/13.
*/
'use strict';
const Bb = require('bluebird');
const mongoose = require('mongoose');
const GridStore = Bb.promisifyAll(mongoose.mongo.GridStore);
const ObjectID = mongoose.mongo.ObjectID;
class GridFsStorage {
initialize(options) {
this.db = options.dataSource.ModelClas... |
import gulp from 'gulp';
import mocha from 'gulp-mocha';
export const testunit = 'test:unit';
function handleError(err){
console.log(err.toString());
this.emit('end');
}
gulp.task(testunit, () => {
return gulp.src('src/**/*_test.js', {read: false})
.pipe(mocha({
compilers: 'js:babel-c... |
/*
*
* WeChatLogin constants
*
*/
export const DEFAULT_ACTION = 'app/WeChatLogin/DEFAULT_ACTION';
export const DO_WECHAT_LOGIN = 'DO_WECHAT_LOGIN';
|
var firebaseData = new Firebase('https://burning-fire-9280.firebaseio.com');
var commentsDB = firebaseData.child("comments");
var getEpoch = function() {
return (new Date()).getTime();
}
var epochToDate = function(epoch) {
var d = new Date(0);
d.setUTCMilliseconds(epoch);
return d;
}
var handleCommentKeypr... |
angular.module('pl.paprikka.directives.haiku', ['pl.paprikka.services.haiku.slides', 'pl.paprikka.services.hammerjs', 'pl.paprikka.haiku.services.remote', 'pl.paprikka.directives.haiku.hTap', 'ngSanitize']).directive('haiku', [
'$window', 'Slides', 'Hammer', 'Remote', '$rootScope', function($window, Slides, Hammer, R... |
$(function () {
$(".logo-image").hover(
function () {
$('.logo-image.color').stop().animate({"opacity": "1"}, 600);
},
function () {
$('.logo-image.color').stop().animate({"opacity": "0"}, 100);
});
// $("img.lazy").lazyload();
$('.bxslider').bxSlider... |
import './node_check_edit_list.html';
import { Template } from 'meteor/templating';
import { RobaDialog } from 'meteor/austinsand:roba-dialog';
import { NodeChecks } from '../../../../imports/api/nodes/node_checks.js';
import { NodeCheckTypes, NodeCheckTypesLookup } from '../../../../imports/api/nodes/node_check_types.... |
requirejs.config({
paths : {
'vlib' : 'core/Vlib',
'config' : 'config.vlib',
'pluginLoader' : 'pluginLoader',
'jquery' : 'libs/jquery/jquery.min',
'underscore' : 'libs/underscore/underscore.min',
'three' : 'libs/three/build/three.min',
'three_trackball_controls' : 'libs/three/controls/Trackball... |
import * as api from '../api/app'
import { push } from 'react-router-redux';
import { submit } from 'redux-form'
export const requestResource = (resource_id, diff = 0) => ({
type : 'RESOURCE/REQUEST',
isFetching : true,
resource_id,
diff
})
export const requestCurrent = (resource_id) => ({
type : ... |
$(function(){$.widget("primeui.puicarousel",{options:{datasource:null,numVisible:3,firstVisible:0,headerText:null,effectDuration:500,circular:false,breakpoint:560,itemContent:null,responsive:true,autoplayInterval:0,easing:"easeInOutCirc",pageLinks:3,styleClass:null},_create:function(){this.id=this.element.attr("id");
i... |
import Util from '../common/Util';
import Activity from './Activity';
import UserPointer from './UserPointer';
import UserKeyboard from './UserKeyboard';
class SelectCoords extends Activity {
constructor(...args) {
super(...args);
this.init();
}
/**
* Initialises local helpers
*/
init() {
th... |
function matchTrackingsOnShopotam(){var a=chrome.i18n.getMessage("track_package"),b=0;$("a[title='отследить посылку']").each(function(){b++;var c=$(this).text();if(c&&void 0!==c){var d=GdePosylkaExt.generateGoUrlSync("/detect/"+c);$('<a href="'+d+'" target="_blank" class="button button-danger button-mini shopotam-track... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.