code stringlengths 2 1.05M |
|---|
angular.module('observationManager.app').controller('omMainController', [
'$scope', '$translate', function($scope, $translate) {
}
]); |
module.exports = {
CHIRP : 'CHIRP',
CHIRPED : 'CHIRPED',
GET_CHIRPS : 'GET_CHIRPS',
GOT_CHIRPS : 'GOT_CHIRPS',
GOT_CURRENT_USER : 'GOT_CURRENT_USER',
GET_USERS : 'GET_USERS',
GOT_USERS : 'GOT_USERS',
FOLLOW : 'FOLLOW',
FOLLOWED : 'FOLLOWED',
... |
(function (window, document, undefined) {
'use strict';
console.log('holla');
window.app = (function () {
var _isInitialized = false;
function initialize() {
if (_isInitialized) {
return;
}
_isInitialized = true;
var database = new Firebase('https://proto2.firebaseIO-demo.com/');
console.... |
'use strict';
module.exports = {
app: {
title: 'MEANSocket',
description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js',
keywords: 'MongoDB, Express, AngularJS, Node.js'
},
port: process.env.PORT || 3000,
templateEngine: 'swig',
sessionSecret: 'MEAN',
sessionCollection: 'sessions',
... |
( function() {
"use strict";
SOWA.Utils = SOWA.Utils || {};
SOWA.ScriptManager = SOWA.ScriptManager || {};
var SCRIPT_PATTERN = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/g,
SRC_PATTERN = /<script.*?src ?= ?"([^"]+)"/,
ID_PATTERN = /<script.*?id ?= ?"([^"]+)"/;
SOWA.... |
/*
SEARCH INPUT
==============================
*/
Sg.SearchBox = Ember.TextField.extend({
placeholder: "Search Keywords",
name: 'searchInput',
expanded: false,
classNames: ['sg-input'],
didInsertElement: function () {
if (this.searcher.searchedFor) {
this.set('value', this.searcher.searchedFor)... |
import Vue from 'vue';
import IdeReview from '~/ide/components/ide_review.vue';
import { createStore } from '~/ide/stores';
import { createComponentWithStore } from '../../helpers/vue_mount_component_helper';
import { trimText } from '../../helpers/text_helper';
import { file } from '../helpers';
import { projectData }... |
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-lolex',
included: function included(app) {
this._super.included(app);
app.import(app.bowerDirectory + '/lolex/lolex.js');
app.import('vendor/shims.js', {
exports: {
lolex: ['default']
}
});
}
};
|
'use strict';
var assert = require('assert'),
q = require('q'),
sinon = require('sinon'),
assert = require('chai').assert,
createSuite = require('../lib/suite').create,
flatSuites = require('../lib/suite-util').flattenSuites,
State = require('../lib/state'),
Runner = require('../lib/runner')... |
'use strict'
const {encode, isFunction} = require('./helpers')
const omit = require('lodash.omit')
module.exports = class Orders {
constructor (client) {
this.client = client
}
create (order, callback) {
return this.client.post('/orders', order, callback)
}
get (orderId, callback) {
return thi... |
export default {
ErrorMessage: {
EmptySearchResults: 'Empty BLAST Search results'
}
};
|
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'bidi', 'tr', {
ltr: 'Metin yönü soldan sağa',
rtl: 'Metin yönü sağdan sola'
} );
|
module.exports = require("npm:ansi-styles@2.2.1/index"); |
/**
* Created by dmytro.romenskyi on 8/4/2016.
*/
'use strict';
function AddedProduct(id, name) {
var tr = $(document.createElement('tr'));
var td = $(document.createElement('td'));
var div = $(document.createElement('div'));
var input = $(document.createElement('input'));
var span = $(document.createElement('s... |
export class PaymentStatus {
constructor(succeeded) {
this._succeeded = succeeded;
}
get isSucceeded() {
return this._succeeded;
}
}
|
import { connect } from 'react-redux'
import { toggleTodo } from '../actions'
import TodoList from '../components/TodoList.jsx'
const getVisibleTodos = (todos, filter) => {
switch (filter) {
case 'SHOW_ALL':
return todos
case 'SHOW_COMPLETED':
return todos.filter(t => t.completed)
case 'SHOW_... |
/**
* @fileOverview
* @author hisland hisland@qq.com
* @description 工具集
*/
KISSY.add('Tools', function(S, undef) {
/**
* 工具集
* @namespace
* @name Tools
*/
var Tools = window.Tools = {};
/**
* 执行n次
* @param fn 需要执行的函数, 参数1接收第几次执行, 从0开始计数
* @param n 大于0的数字, 执行次数
*/
Tools.doTimes = function(fn, n... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z" />
, 'Redo');
|
import styled from 'styled-components';
export const Column = styled.div`
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
padding: ${props => props.fluid ? '0' : '20px'};
`;
export const Row = styled.div`
display: flex;
width: 100%;
`;
|
'use strict';
(function(factory) {
if (typeof module === 'object' && module.exports) {
// CommonJS
factory(module.exports, {
chai: require('chai')
});
} else if (typeof self === 'object') {
// Window or WorkerGlobalScope
if (typeof self.chai === 'undefined') {
throw new Error('Dep... |
//= Emmeline: Pure and Simple Javascript.
//> Tom Harding | thedigitalnatives.co.uk
import test from 'tape'
import { negate } from '../../math'
test ('Math.Negate', t => {
t.same
( 2 :: negate ()
, -2
, 'Integers'
)
t.same
( 2.5 :: negate ()
, -2.5
, 'Floats'
)
t.same
( (-2) :: negate ()
... |
/* Source: https://github.com/healthsparq/ember-radical/blob/master/addon/components/rad-tabs/content/component.js */
import Component from 'ember-component';
import computed from 'ember-computed';
import hbs from 'htmlbars-inline-precompile';
/**
* This component is yielded by the `fountainhead-tabs` component. The... |
'use strict';
const chai = require('chai'),
sinon = require('sinon'),
expect = chai.expect,
Support = require('../support'),
DataTypes = require('../../../lib/data-types'),
Sequelize = require('../../../index'),
Promise = Sequelize.Promise,
current = Support.sequelize,
dialect = Support.getTestDialect(... |
'use strict';
module.exports = function(app) {
var bodyParser = require('body-parser');
var loopback = require('loopback');
// to support JSON-encoded bodies
app.use(bodyParser.json());
// to support URL-encoded bodies
app.use(bodyParser.urlencoded({
extended: true
}));
//// The access token is ... |
import { arrayFromRange } from '../utils/Utils.js';
class Deck {
constructor() {
this._cards = [];
this._populate();
this.shuffle();
}
_populate() {
this._cards = arrayFromRange(0, 51).map((card, i) => this._constructCard(i));
}
_constructCard(i) {
const su... |
var displayTree = ( tree ) => console.log( JSON.stringify( tree, null, 2 ) )
function Node( value ) {
this.value = value
this.left = null
this.right = null
}
function BinarySearchTree() {
this.root = null
this.remove = function( value ) {
if ( this.root === null ) {
return null
}
var targe... |
/**
* Mixin which manages the keydown handling for a component.
*
* TODO: Document collective behavior.
* TODO: Provide baseline behavior outside of a collective.
*
* @class Keyboard
*/
export default (base) => class Keyboard extends base {
// Default keydown handler. This will typically be handled by other ... |
/**
* @author derschmale <http://www.derschmale.com>
*/
var project = new DemoProject();
project.queueAssets = function(assetLibrary)
{
assetLibrary.queueAsset("albedo", "textures/marble_tiles/marbletiles_diffuse_white.jpg", HX.AssetLibrary.Type.ASSET, HX.JPG);
};
project.onInit = function()
{
this.camera.... |
window.onload = initBoard;
function initBoard() {
var x = 1,
y = 0;
var id = "col"+x+y;
console.log(id);
var obj = document.getElementById(id);
console.log(obj);
obj.textContent = 'AS';
} |
function cardDeckBuilder(selector) {
class CardDeckBuilder {
constructor(selector) {
this._suits = {
'C': '\u2663',
'D': '\u2666',
'H': '\u2665 ',
'S': '\u2660'
};
this._container = $(selector);
... |
//= require ./elastic
$(function() {
if ($('textarea.elastic').length) {
$('textarea.elastic').elastic();
}
});
|
export * from './Card';
export * from './CardSection';
|
const { db } = require('./sqlite');
db.run("UPDATE foo SET bar = ? WHERE id = ?", "bar", 2);
|
var ANIM_OPTIONS = {pan: {animate: true, duration: 0.75}, animate: true};
var MARKERS = [];
var ZONES_VIEW = [{nb_res: -1, view: undefined, seen: false},{nb_res: -1, view: undefined, seen: false},{nb_res: -1, view: undefined, seen: false},];
var PREVIOUS_VIEW = null;
var ORIGINAL_ZOOM = 18;
var VIEW_IS_FOCUSED = false;... |
var should = require('should');
var support = require(__dirname);
var jayson = require(__dirname + '/../../');
var Counter = support.Counter;
var http = require('http');
/**
* Get a mocha suite for common test cases for a client
* @param {Client} Client instance to use
* @return {Function}
*/
exports.getCommonForC... |
/*------------------------------------------------------------------
[ Knob & Ranges Trigger Js]
Project : Fickle Responsive Admin Template
Version : 1.0
Author : AimMateTeam
URL : http://aimmate.com
Support : aimmateteam@gmail.com
Primary use : knob slider
--------------------... |
<!--
// Configurar color lupa
var colorlupa="#EEFFEE";
var colordentro="#FF0000";
//configurar iframe src
var iframeSrc = "lupa.htm";
//No modificable apartir de aqui
//-------------------------------------
var tempY,tempX,initialized,X,Y;
var ie55 = false;
var firstTableWidth;
if(window.createPopup)... |
// flow-typed signature: 0a2ee71fad8f06690733ed63f61461fd
// flow-typed version: <<STUB>>/babel-preset-stage-2_v^6.24.1/flow_v0.46.0
/**
* This is an autogenerated libdef stub for:
*
* 'babel-preset-stage-2'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to shar... |
angular.module('d3.utils')
.factory('d3UtilsService', [function () {
return {
wrapSVGText: function (textNode, options) {
// This function attempts to create a new svg "text" element, chopping
// it up into "tspan" pieces, if the caption is too long
... |
module.exports.views = {
// View engine (aka template language)
// to use for your app's *server-side* views
//
// Sails+Express supports all view engines which implement
// TJ Holowaychuk's `consolidate.js`, including, but not limited to:
//
// ejs, jade, handlebars, mustache
// underscore, hogan, h... |
"use strict";
require("../__util__/test-init");
var chai = require("chai");
chai.config.includeStack = true;
var expect = require("chai").expect;
require("../../compiler");
var autotest = require("mocha-autotest").default;
var taglibLoader = require("../../compiler").taglibLoader;
autotest("fixtures", fixture => {
... |
define([], function () {
var zeros = "00000000";
return function (id) {
var hi = id[0].toString(16);
var lo = id[1].toString(16);
return "0x" + hi + zeros.substring(0, 8-lo.length) + lo;
};
});
|
import {connect} from 'react-redux'
import {
apiActions,
entitiesSelectors
} from 'yam-data'
import Thread from '../../components/Thread'
const mapStateToProps = (state, props) => {
const {threadId} = props
const options = {threadId}
return {
status: entitiesSelectors.getThreadStatusForId(state, options)... |
var basicAjaxExample = require('./super-selects/basic-ajax'),
basicExample = require('./super-selects/basic-example'),
basicSearchable = require('./super-selects/basic-searchable'),
customFilterFunction = require('./super-selects/custom-filter-function'),
customTemplate = require('./super-selects/custom... |
module.exports = function( t ){
t.welcome = 'Willkommen';
}
|
import {hostname} from "os";
export const NODE_ENV = process.env.NODE_ENV || "development";
export const PORT = process.env.PORT || 3000;
export const HOSTNAME = process.env.HOSTNAME || "localhost";
export const HOST = `${HOSTNAME}:${PORT}`;
export const DYNAMODB_REGION = process.env.DYNAMODB_REGION || "us-west-1";
e... |
/**
*
* @param stylesNode
* @param callback
* @private
*/
jDoc.engines.ODF.prototype._parseTextDocumentStylesNode = function (stylesNode, callback) {
var result = {
named: {},
paragraph: {},
paragraphContent: {},
table: {},
list: {}
},
... |
/*global UserSearch */
(function() {
'use strict';
describe('UserSearch', function() {
describe('Given 5 users', function() {
var users = [
{ name: 'Jonathan Knight', email: 'nahtanoj@nkotb.com'},
{ name: 'Jordan Knight', email: 'nadroj@nkotb.com'},
{ name... |
/* -*- coding: utf-8 -*-
============================================================================= */
/*jshint asi: true*/
/*jshint -W030 */
var test = global.unitjs || require('unit.js'),
should = test.should
/* Tests
============================================================================= */
describe(... |
import { readJsonSync } from 'fs-extra';
export default function getAuthorArea(username, area) {
try {
return readJsonSync(`./dump/${username}${area ? '-' + area : ''}.json`);
} catch (e) {
return {};
}
}
|
'use strict';
var util = require('util')
, winston = require('winston')
, request = require('request')
, Stream = require('stream').Stream
, _ = require('lodash')
, queue = require('async').queue
, retry = require('async').retry;
//
// ### function Slack (options)
// #### @options {Object} Options for this instance.
... |
'use strict';
angular.module('core').controller('PlayController', ['$scope', '$window', 'Authentication',
function($scope, $window, Authentication) {
$scope.authentication = Authentication;
}
]); |
var labelInsightController = angular.module('labelInsightApp.controllers', []);
labelInsightController
.controller('PhotoController', function($scope, $uibModal, $http) {
$http.get("https://jsonplaceholder.typicode.com/photos")
.then(function success(response) {
var firstTwentyF... |
gui.SandBoxOptions = function SandBoxOptions () {
/*
if ( gui.Type.isObject ( options )) {
gui.Object.each ( options, function ( key, value ) {
this [ key ] === value;
}, this );
}
*/
};
gui.SandBoxOptions.prototype = {
/**
* Tagnames are whitelisted.
*/
tag : {
whitelist : Object.create ( null... |
var webtrekkMediaTracking=webtrekkMediaTracking||{},wt_init_media=function(a,b,c){webtrekkMediaTracking.mediaStVersion=321;webtrekkMediaTracking.trackDomain=a;webtrekkMediaTracking.trackId=b;webtrekkMediaTracking.pixelSampling=c?c:0;webtrekkMediaTracking.deactivatePixel=!1;webtrekkMediaTracking.posInterval={};webtrekkM... |
import withDrawRect from 'withDrawRect'
import withCollisionDestroys from 'withCollisionDestroys'
import extend from 'lodash/object/extend'
export default class RemoteControlBullet {
constructor(game, center, velocity, size = { x: 3, y: 3}, player) {
this.game = game
this.center = center
this.size = size... |
const DisplayLeaderboard = require('./display-leaderboard');
const templates = require('./message-templates');
const $ = require('jquery');
function DisplayMessage(){
this.element = $('#post-game');
}
DisplayMessage.prototype.showBoardMessage = function(template) {
var div = this.element;
div.empty()
.show... |
var c = require('./constants');
var PREAMBLE = 0x00;
var START_CODE_1 = 0x00;
var START_CODE_2 = 0xFF;
var POSTAMBLE = 0x00;
/*
Represents a single communication frame for communication with the PN532 NFC Chip.
*/
class Frame {
// Gets the frame's data length
getFrameLength() {
throw new Er... |
import path from 'path';
import Promise from 'bluebird';
import SVGO from './svgoBrowser';
const svgo = new SVGO();
export default function minifySvg(file, content) {
return new Promise(resolve => svgo.optimize(content, result => resolve({
filename: file,
name: path.basename(file, '.svg'),
svg: result
... |
'use strict';
(function(window, fuseStorage) {
var sessionData = '';
var Storage = function(type) {
function setData(data) {
data = JSON.stringify(data);
if (type === 'session') {
sessionData = data;
} else {
fuseSt... |
var View = require('./view')
var ScrollableTextPanel = require('./scrollable_text_panel')
var log = require('winston')
var tabs = require('./constants')
var StyledString = require('styled_string')
var Chars = require('../../chars')
var indent = require('../../strutils').indent
var Screen = require('./screen')
function... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3dpbW1lclJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vZGVscy9Td2ltbWVyUmVzcG9uc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 |
const Layout = require('./layout')
const nonLayeredTidyTree = require('../algorithms/non-layered-tidy-tree')
class UpwardOrganizational extends Layout {
doLayout () {
const root = this.root
nonLayeredTidyTree(root, false)
root.down2up()
return root
}
}
module.exports = UpwardOrganizational
|
game.Sam = me.ObjectEntity.extend({
init: function (x, y, settings) {
settings.image = "sam";
this.parent(x, y, settings);
this.nickname = settings.nickname || "Sam";
this.gravity = 0.0;
this.origVelocity = new me.Vector2d(5.0, 5.0);
this.setVelocity(this.origVelocit... |
webApp.controller('DateController', ['$rootScope', '$scope', '$state', '$stateParams', '$http', '$location', '$q',
function($rootScope, $scope, $state, $stateParams, $http, $location, $q) {
// identify the date by its haash
$scope.hash = $stateParams['hash'];
// public URL for social networks
$scope.publicUrl =... |
/**
* panel.js
*
* @auteur marc laville
* @Copyleft 2013-2015
* @date 13/12/2013
* @version 0.10
* @revision $0$
*
* Fonction generique de création de fenetre et menu
*
* @date revision marc laville 03/02/2015 Gestion de la fenêtre active grace au bouton radio avant le titre de la fenêtr... |
#!/usr/bin/env node
const config = require.resolve('react-live-clock/package-scripts');
const ps = require.resolve('p-s/dist/bin/nps');
require('child_process')
.spawn('node', [ps, '--config', config].concat(process.argv.slice(2)), {
cwd: process.cwd(),
env: process.env,
stdio: [process.stdin, process... |
'use strict'
var path = require('path')
var esconnection = require('../modules/esconnection')
var hooks = {
afterPublish: function (result, postPath, abe) {
if(abe.config.elasticsearch && abe.config.elasticsearch.active){
var es = new esconnection(abe)
const revisionPath = path.join(abe.config.root, ... |
var test = require("tape")
var extend = require("./")
var mutableExtend = require("./mutable")
test("merge", function(assert) {
var a = { a: "foo" }
var b = { b: "bar" }
assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
assert.end()
})
test("replace", function(assert) {
var a = { a: "foo" }
... |
version https://git-lfs.github.com/spec/v1
oid sha256:05be42ef96ddae6cc1eddaf088008ffa5426e71234dd77c8ff5581a31e9d380e
size 4254
|
var lang = function(){
var langs = new Array();
//Add languages
langs.push(new require('./languages/en.js'));
this.returnMessage = function(lang, code) {
for (language of langs){
if(language.name == lang){
for (message of language.messages){
if(message.code == code){
return message;
}
... |
var Utils = require("../../utils")
/**
Returns an object that treats SQLite's inabilities to do certain queries.
@class QueryInterface
@static
*/
var QueryInterface = module.exports = {
/**
A wrapper that fixes SQLite's inability to remove columns from existing tables.
It will create a backup of the tab... |
'use strict';
(function(a, _) {
a.array = {
remove: function(array, valueToReject) {
var indexToReject = _.indexOf(array, valueToReject);
array.splice(indexToReject, 1);
}
};
a.browser = {
isSafari: function() {
return navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrom... |
module.exports = {
env: 'development',
MONGOOSE_DEBUG: true,
jwtSecret: 'secret',
db: 'mongodb://localhost:27017/vibetribe-debug',
SQL_DB: 'Universyl.db',
COURSE_CATALOG: 'ps_crse_catalog',
ACADEMIC_GROUP: 'ps_acad_group_tbl',
ACADEMIC_ORGANIZATION: 'ps_acad_org_tbl',
port: proce... |
const Cc=Components.classes;const Ci=Components.interfaces;Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");function jsConsoleHandler(){}
jsConsoleHandler.prototype={handle:function clh_handle(cmdLine){if(!cmdLine.handleFlag("jsconsole",false))
return;var wm=Cc["@mozilla.org/appshell/window-mediator;1"]... |
'use strict';
var express = require('express');
var controller = require('./table.controller');
var router = express.Router();
router.get('/', controller.index);
module.exports = router; |
'use strict'
const multibase = require('multibase')
const { cidToString } = require('../../../utils/cid')
module.exports = {
// bracket syntax with '...' tells yargs to optionally accept a list
command: 'ls [ipfsPath...]',
describe: 'List objects pinned to local storage.',
builder: {
type: {
type:... |
export default {
name: 'MRWidgetSHAMismatch',
template: `
<div class="mr-widget-body">
<button
type="button"
class="btn btn-success btn-small"
disabled="true">
Merge
</button>
<span class="bold">
The source branch HEAD has recently changed. Please reload... |
import Scalars from './scalars.graphql';
import Query from './query.graphql';
import Mutation from './mutation.graphql';
import Types from './types';
export default [Scalars, Types, Query, Mutation];
|
const snapshot = require('./')
const expect = require('chai').expect
describe('snapshot', () => {
it('basic', () => {
const data = JSON.parse(snapshot())
expect(data).to.have.property('snapshot')
})
})
|
(function () {
/**
* Canvas utility.
* @static
* @constructor
*/
tracking.Canvas = {};
/**
* Loads an image source into the canvas.
* @param {HTMLCanvasElement} canvas The canvas dom element.
* @param {string} src The image source.
* @param {number} x The canvas horizontal coordinate to load the ima... |
// Karma configuration
// Generated on Tue Feb 02 2016 15:50:41 GMT+1100 (AEDT)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/k... |
$(function() {
$.ajax({
url: '/news/*',
method: 'get',
dataType: 'json',
success: function(data) {
console.log(data);
if(data != null) {
var code = '';
code += '<tr>'
//code += '<th>ID</th><th>タイトル</th><th>作成日</th><th>カテゴリ</th><th>画像の数</th><th>操作</th>';
code += '<th>ID</th><th>タイトル<... |
'use strict';
angular.module('portfolio.photography', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/photography', {
templateUrl: 'photography/photography.html',
controller: 'PhotographyCtrl'
});
}])
.controller('PhotographyCtrl', ['$scope', function($scope) {
... |
// list
if ($(idTableList).length>0 && $('.customer_list').length>0) {
var statusStr = ":Tất cả;active:Hiện;inactive:Ẩn";
caption = captionButton(false, true);
// jqGrid
jQuery(idTableList).jqGrid({
url: bUrl + currentModule['url'] + '/ajax_list?q=2',
datatype... |
var template = require('./template.ejs');
var Thumbnail = require('georap-components').Thumbnail;
var ui = require('georap-ui');
var emitter = require('component-emitter');
var attachmentsApi = tresdb.stores.attachments;
module.exports = function (attachment, opts) {
// Parameters:
// attachment
// attachm... |
"use strict";
var _ms = _interopRequireDefault(require("ms"));
var _ChatCommands = require("../ChatCommands");
var _ChatActionCreators = require("../../actions/ChatActionCreators");
var _userSelectors = require("../../selectors/userSelectors");
var _ModerationActionCreators = require("../../actions/ModerationActio... |
// npm requires
var express = require('express');
var bodyParser = require('body-parser');
// local requires
var databases = require('./database');
// variables declarations
var app;
var routes;
// function declarations
// callback function declarations
var serverStarted = function(){
console.log('Server started o... |
version https://git-lfs.github.com/spec/v1
oid sha256:748a89088cf4995f825012a07729a6f59cf57ae58bb32914f7283f6fd9cc65dc
size 39705
|
'use strict';
var Search = require('node-bing-api');
var request = require('request');
module.exports = function (app, db) {
var collection = db.collection('search_history');
app.get('/',function(req,res){
res.render('index.html');
});
app.get('/history',function(req,res){
collection.find({}).sort({'time_sear... |
/**
* @ngdoc controller
* @name creepypastasApp:formCtrl
*
* @description
*
*
* @requires $scope
* */
angular.module('creepypastasApp', ['ngAnimate', 'toastr', 'ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
.controller('formCtrl', ['$scope', '$http', 'toastr', '$mdConstant', function ($scope, $http... |
import React from 'react'
import { OutboundLink } from 'react-ga'
class FloatingButton extends React.Component {
componentDidMount() {
const elems = document.querySelectorAll('.fixed-action-btn')
window.M.FloatingActionButton.init(elems)
}
render() {
return (
<div className="fixed-action-btn"... |
/*
* grunt-generate-configs
* https://github.com/creynders/grunt-generate-configs
*
* Copyright (c) 2014 Camille Reynders
* Licensed under the MIT license.
*
* Just in case you're wondering why I'm not eating my own dog food, i.e. using load-grunt-configs here, it's because
* this grunt file is used to test the... |
import './setup';
import {TestObservationAdapter} from './adapter';
import {DirtyCheckProperty} from '../src/dirty-checking';
import {SetterObserver} from '../src/property-observation';
import {
ValueAttributeObserver,
XLinkAttributeObserver,
DataAttributeObserver,
StyleObserver
} from '../src/element-observati... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import classnames from 'classnames';
export default class DateTimePickerDays extends Component {
static propTypes = {
subtractMonth: PropTypes.func.isRequired,
addMonth: PropTypes.func.isRequired,
v... |
export default async function markDeletedAtToFolders(event, data) {
const {folderIds} = data;
const {db} = this.params;
const deletedAt = Math.round(+new Date() / 1000);
const query = db.knex('Folder')
.whereIn('id', folderIds)
.update({deletedAt});
await db.raw(query);
this.resolve({message: `... |
module.exports = function(values) {
var copy = {}
for (var k in values) copy[k] = values[k]
return copy
}
|
import _ from 'lodash';
const removeNumber = (Artboards, option) => {
console.log('Remove Num Start', option);
_.forEach(Artboards, layer => {
console.log('before', layer.name);
layer.name = remove(layer.name, option);
console.log('after', layer.name);
});
console.log('Remove Num Done');
};
const ... |
import PriorityQueue from 'priorityqueuejs'
import Vertex from './vertex'
import Edge from './edge'
/**
* Route on streets, simple Dijkstra algorithm.
*/
export default class StreetRouter {
constructor (tn) {
this.tn = tn
this.pq = new PriorityQueue((a, b) => b.dist - a.dist)
}
/** call either as set... |
/**
* Created with FreeCodeCamp.
* User: imanuelgittens
* Date: 2015-06-03
* Time: 11:28 AM
* To change this template use Tools | Templates.
*/
function boo(bool) {
// What is the new fad diet for ghost developers? The Boolean.
var x = Boolean(bool);
if(x === bool){
return true;
}else{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.