code stringlengths 2 1.05M |
|---|
/*global define*/
define(function(require){
'use strict';
var filters = require('filters/filters');
return filters.filter( '<%= name %>', function(){
return function(text) {
text = String(text).replace(/\%<%= name.toUpperCase() %>\%/mg, '<%= name %>'.split('').reverse().join(''));
return text;
... |
(function() {
'use strict'
app.factory('httpGET', ["$http", "$q",
function($http, $q) {
return function(route) {
var deferred = $q.defer()
console.log("FIRED QUERY");
$http.get(route)
.success(function(data) {
console.log(`Successful GET request from ${route}... |
"use strict";
$("#draw-form").submit(function draw() {
$("svg").remove();
$(".last-updated").hide();
$("#update-button").hide();
$("#expand-children-button").hide();
$("#collapse-children-button").hide();
$("#layout-opts").hide();
$("#node-info").html("");
$("#search-group").show();
... |
'use strict';
var bucketNameComposer = require('../private/bucket_name_composer');
/**
* Save the model instance for the given data
* @param {String} modelName The model name
* @param {Object} data The model data
* @param {Function} [apiCallback] The callback function
*/
module.exports = function(modelName, data... |
'use strict';
const fixture = require('../../fixtures/post_render');
describe('Render post', () => {
const Hexo = require('../../../lib/hexo');
const hexo = new Hexo();
const Post = hexo.model('Post');
const Page = hexo.model('Page');
const renderPost = require('../../../lib/plugins/filter/before_generate/r... |
import Microcosm from 'microcosm'
describe('History::toArray', function() {
it('does not walk past the head', function() {
const repo = new Microcosm()
let one = repo.append('one')
repo.append('two')
repo.append('three')
repo.checkout(one)
repo.history.archive()
expect(`${repo.history... |
(function() {
'use strict';
angular
.module('users')
.controller('SettingsController', SettingsController);
SettingsController.$inject = ['$scope', '$http', '$location', 'Users', 'Authentication'];
function SettingsController($scope, $http, $location, Users, Authentication) {
... |
// import "vue"
// import "jquery"
// import "underscore"
// import { $, jQuery } from "jquery"
// export for others scripts to use
// window.$ = $
// window.jQuery = jQuery
|
var projectModule = angular.module('projectModule', ['app.services', 'highcharts-ng']);
projectModule.controller('ProjectListController', ['$scope', '$http', '$location',
function(scope, http, location) {
scope.projects = [];
http.get('/project/all').success(function(data) {
scope.proj... |
exports.blackCards = ["__________. High five, bro.",
"TSA guidelines now prohibit __________ on airplanes.",
"It's a pity that kids these days are all getting involved with __________.",
"In 1,000 years, when paper money is but a distant memory, __________ will be our currency.",
"Major League Baseball has banned _____... |
// Returns a random integer between min (included) and max (excluded)
// Using Math.round() will give you a non-uniform distribution!
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
function fillArray(value, len) {
var arr = [];
for (var i = 0; i < len; i++) {
arr.pu... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const webpackMerge = require('webpack-merge');
const config_1 = require("./config");
const webpack_configs_1 = require("./webpack-configs");
const path = require('path');
class NgCliWebpackConfig {
constructor(buildOptions, appConfig) {
... |
_.mixin({
/**
* empty event handler function, which simply prevents default handling
*
* @function module:undermore.eFn
* @example
* $('#thing').on('click',this.conf.onClick||_.eFn)
*/
eFn: function(e) {
e.preventDefault();
}
});
|
var re1 = /([\W_\-]+\S?)/g;
var re2 = /[\W_]/g;
module.exports = function toCamelCase(string, capitalizeFirst) {
var replaced = string.replace(re1, function (match) {
return match.replace(re2, '').toUpperCase();
});
var first = replaced.slice(0, 1)[capitalizeFirst ? 'toUpperCase' : 'toLowerCase'](... |
beforeEach(() => {
cy.visitStory('components-dropdowns-dropdown--dropdown-default')
})
describe('Dropdown', () => {
it('Should open a Dropdown', () => {
cy.get('[data-cy="DropdownTrigger"]').click()
cy.get('.DropdownMenuContainerPlacementRoot').should('exist')
})
})
|
import React, { Component } from 'react'
import Game from './Game'
class GameList extends Component {
renderGames () {
return this.props.games.map(game => {
return (<Game key={game.id} game={game} goToGame={this.props.goToGame} />)
})
}
render () {
return (
<div className='dark-container... |
module.exports = _.extend({}, Backbone.Events); |
/*****************************************************************************/
/* Server Methods */
/*****************************************************************************/
Meteor.methods({
'server/submitenquiry': function (doc) {
check(doc, {
name: String,
email: String,
phone: Match... |
import { shallowMount } from '@vue/test-utils';
import waitForPromises from 'helpers/wait_for_promises';
import { GlAlert, GlModal } from '@gitlab/ui';
import PagerDutySettingsForm from '~/incidents_settings/components/pagerduty_form.vue';
describe('Alert integration settings form', () => {
let wrapper;
const rese... |
var style = {
contentHeadline: {
fontWeight: 100,
color: '#676767',
fontSize: '32px'
},
contentHr: {
border: 'none',
height: '1px',
backgroundColor: 'rgba(0, 0, 0, 0.15)',
marginLeft: '-10px',
width: 'calc(100% + 20px)'
},
center: {
textAlign: 'center'
},
button: {
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createScript;
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _path = require('path');
var _path2 = _interopRequireDefault(_path);
var _slash = require('slash');
var _slash2 = _interopRequireDefa... |
// JavaScript Variables and Objects
// I paired [by myself, with:] on this challenge.
// __________________________________________
// Write your code below.
var secretNumber = 7
var password = "just open the door"
var allowedIn = false
var members = ["John", , ,"Mary"]
// ___________________________________... |
export const ic_format_underlined_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"},"children":[]}... |
module.exports = function(that) {
var val = that.value;
if (!val)
return true;
var otherField = that.getField(that.Rules.smallerThan);
if (!otherField || !otherField.value)
return true;
var otherFieldValue = otherField.value;
var value1 = !!isNaN(val) || typeof val=='object'?val:parseFloat(... |
'use strict';
var greet = function(name) {
if (name === undefined) {
name = 'world';
}
return 'Hello ' + name + '!';
};
module.exports = greet;
|
//==================FLUX=========================
var Reactor = require("client/js/reactor.js");
//===============================================
var IndexPage = React.createClass({
displayName: "IndexPage",
propTypes: {
device: React.PropTypes.string,
children: React.PropTypes.node,
route: React.PropTypes.ob... |
"use strict";
var esprima = require("esprima");
var estraverse = require("estraverse");
var escodegen = require("escodegen");
var jsstana = require("jsstana");
function stripAsserts(code) {
function notAssertStatement(node) {
if (node.type == "FunctionDeclaration" && node.id.name.match(/^assert/)) {
retu... |
//Dates: 'june' or 'may'
const ambig = require('../_ambig')
const dates = `(${ambig.personDate.join('|')})`
let list = [
// ==== Holiday ====
{ match: '#Holiday (day|eve)', tag: 'Holiday', reason: 'holiday-day' }, // the captain who
// ==== WeekDay ====
// sun the 5th
{ match: '[sun] the #Ordinal', tag: 'We... |
const data = [
{
resource: 'Node.js',
link:'https://nodejs.org/en/',
description: 'Node.js® is a JavaScript runtime built on Chrome\'s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js\' package ecosystem, npm, is the largest ecosys... |
var cluster = require('cluster'),
fetch = require("fetch"),
EventEmitter = require('events').EventEmitter,
utillib = require("util"),
fs = require("fs");
module.exports = StatBot;
function StatBot(options){
EventEmitter.call("this");
options = options || {};
options.childProcesses = ... |
#!/usr/bin/env node
// ./index.js -f tux 'Hello World!'
// ______________
// < Hello World! >
// --------------
// \
// \
// .--.
// |o_o |
// |:_/ |
// // \ \
// (| | )
// /'\_ _/`\
// \___)=(___/
//
// Help output
// -----------
//
// ./index.js --help
// Usa... |
function onAnimalLoved (player, animal) {
// TODO: Add this event call from JAVA
if (animal.hasTrait('carriable')) { // TODO: Add this function to animal scripting
player.status().adjust('animals_carried', 1)
}
}
|
// Unfinished
// Shadow Momo
var obj_list;
var cn;
function DCInit_MO(colorname){
DCSetCN_MO(colorname);
DCChange_MO();
}
function DCSetCN_MO(colorname){
cn = colorname;
}
function DCChange_MO(){
for (var i=0; i < obj_list["length"]; i++){
if (obj_list[i].getAttribute(cn) == "#000000"){
obj_list[i].setA... |
taskName = "Task2";
function Main(bufferElement) {
//#region Input
var test1 =
[
],
test2 =
[
],
test3 =
[
],
result1, result2, result3;
//#endregion
//#region Solution
function solve(args) {
var result, i... |
/**
* Created by Administrator on 2017-4-11.
* 显示静态图片
*/
var fs = require('fs');
var http = require('http');
// 获取 images文件目录下的图片名
fs.readdir(process.cwd() + '/images', function (err, files) {
var _imgHtml = '';
files.forEach(function (val) {
_imgHtml += '<img src="/images/'+ val +'">';
});
... |
/**
* Created by 殿麒 on 2015/9/18.
*/
logIn.directive('dialoger',function(){
function link($scope,ele){
var window_width = document.documentElement.clientWidth,
dialog_left = (window_width - 235) / 2,
window_height = document.documentElement.clientHeight,
dialog_header =... |
var elements = new Array(
"lname", "pass" , "vpass",
"fname", "sname" , "address",
"city", "pincode" , "email" ,
"occupation", "ccno" , "ccdate"
);
function doBadThing(name , val){
if( val )
document.getElementById( name ).src = "images/sn.gif";
else
document.getElementById( name ).src = "images/sy.gif";
re... |
import Immutable from 'immutable';
import Actions from '../actions/Actions';
const { REQUEST } = Actions;
const initialState = Immutable.fromJS({});
export const REQUEST_STATE_KEY = ['API-Request'];
export function mutateState(previousState, props, STATE_KEY = []) {
let nextState = previousState;
for (let key ... |
/*!
* TimeShift.js version 20130811
*
* Copyright 2013 Mobile Wellness Solutions MWS Ltd, Sampo Niskanen
* Released under the MIT license
*/
(function() {
var root = this;
var OriginalDate = root.Date;
var TimeShift;
if (typeof exports !== 'undefined') {
TimeShift = exports;
} else {
TimeShift = root.T... |
/********************************
** Module dependencies
********************************/
var utils = require('./utils'),
debug = require('debug')('gaia.injector');
var Injector = {
dependencies: {},
getInjectMethod: function(target) {
if ('$inject' === utils.getFnName(target)) {
r... |
var UserModel = require('./models').UserModel
, error = require('./error')
, _ = require('underscore')
, async = require('async');
/**
* Create new dummy user for debugging. THIS IS NOT PRODUCTION CODE.
*
* @param {Object} The parsed and validated json from the client.
* @param {Function} Callback to execute a... |
var defaults = require('./defaults');
var Album = module.exports = function (lastfm) {
this.lastfm = lastfm;
};
Album.prototype.addTags = function (artist, album, tags, callback) {
if (!Array.isArray(tags)) { tags = [ tags ]; }
var options = defaults.defaultOptions({
'artist' : artist,
'album' : album,
'tags... |
/*
Copyright 2013-2016 ASIAL CORPORATION
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 agreed to in wr... |
/*
Version: 0.2.0
Publish Date: October 22, 2014
*/
(function () {
/*
Title: Minerva Header
Description: Defines a generic header for the Minerva body container
Parameters:
mv-Title: The title of the header
*/
var mvHeader = function()
{
return {
restrict: 'E',
... |
console.log('loading module ngMenu')
angular.module('ngMenu', []).directive('ngMenu',function(){
return{
templateUrl: 'ngapp/menu/template.html',
link:function ($scope) {
$scope.$on("$stateChangeSuccess", function (v) {console.log(v)})
}
}
});
console.log('loaded modu... |
var Mocha = require('mocha').Mocha,
mocha;
// @hack to avoid path.resolve errors
Mocha.prototype.loadFiles = function (fn) {
var self = this,
suite = this.suite;
this.files.forEach(function (file) {
suite.emit('pre-require', global, file, self);
suite.emit('require', require(file)... |
var fs = require('fs');
var express = require('express');
var cfg = require('./config.json');
var key = fs.readFileSync(cfg.key).toString();
var cert = fs.readFileSync(cfg.cert).toString();
var ca = cfg.ca ? fs.readFileSync(cfg.ca).toString() : null;
var app = require('express')();
var http = require('http... |
var dataManager = require('../../core/DataManager'),
domSelector = require('../../utils/domSelector'),
scpSignals = require('../../core/scpSignals'),
Q = require('../../libs/q'),
Signal = require('../../libs/signals'),
City = require('./City'),
body = document.body,
LIST_CITY_CLASS = 'list-city... |
/*
Constructors for SCXML events, since the browser's built-in DOM Events
are not ideally suited for that role.
*/
// the basic constructor:
SCxml.Event=function SCxmlEvent(name, type)
{
this.name=String(name)
this.timestamp=new Date().getTime()
this.type=type||"platform"
}
SCxml.Event.prototype={
constructor: SC... |
'use strict';
// var binding = require('node-cmake')('tessocr');
var path = require('path');
var binary = require('node-pre-gyp');
var binding_path = binary.find(path.resolve(path.join(__dirname, '../package.json')));
var binding = require(binding_path);
var _ = require('lodash');
var os = require('os');
var async = ... |
'use strict';
const _ = require('lodash');
const { Bots } = require('./../../../lib/bot/bots');
const config = require('../../mock');
describe('/bots', function () {
describe('Should instantiate bots correctly', function () {
let slackBots;
beforeEach(function () {
slackBots = new Bots(config.BotsTes... |
var Component = require('./component.js');
var Partial = Component.extend();
module.exports = Partial;
|
define([
'intern!object',
'intern/chai!expect',
'../helper/fixtures/shadow-input.fixture',
'../helper/supports',
'ally/maintain/disabled',
], function(registerSuite, expect, shadowInputFixture, supports, maintainDisabled) {
registerSuite(function() {
var fixture;
var handle;
var handle2;
r... |
export const countries = [
{'name': 'Afghanistan', 'code': 'AF'},
{'name': 'land Islands', 'code': 'AX'},
{'name': 'Albania', 'code': 'AL'},
{'name': 'Algeria', 'code': 'DZ'},
{'name': 'American Samoa', 'code': 'AS'},
{'name': 'AndorrA', 'code': 'AD'},
{'name': 'Angola', 'code': 'AO'},
{'name': 'Anguill... |
const Flint = require('../../../index.js')
const supertest = require('supertest')
const mongoose = require('mongoose')
describe('publicRegistration', () => {
let server
let agent
const signupRoute = '/p/signup'
const loginRoute = '/p/login'
beforeAll(async () => {
const flintServer = new Flint({
l... |
;(function(){
// Console wrapper
if (typeof console === 'undefined') {
var f = function () {};
window.console = {
log:f, info:f, warn:f, debug:f, error:f
};
}
// Helper function inspired by Backbone to trigger an event function quickly
var triggerEvents = function(events, args) {
var ev, i = -1, l =... |
import React, { Component } from 'react';
import {setColor} from '../../actions/image';
import { SketchPicker } from 'react-color';
if (process.env.WEBPACK) require('./css/ColorPicker.scss');
import { connect } from 'react-redux';
import Button from '../components/button';
import ClickOutside from 'react-click-outside'... |
module.exports = function(a, b) {
return a + b;
};
|
// Regular expression that matches all symbols in the `Devanagari` script as per Unicode v5.2.0:
/[\u0900-\u0939\u093C-\u094E\u0950\u0953-\u0955\u0958-\u0963\u0966-\u096F\u0971\u0972\u0979-\u097F\uA8E0-\uA8FB]/; |
angular
.module('ScheduleModule')
.factory('authorityEnum', function() {
return {
USER: 'USER',
ADMIN: 'ADMIN'
}
}); |
var mongoose = require('mongoose'),
shortid = require('shortid'),
helpers = require('./model_helpers'),
user = require('./user'),
Schema = mongoose.Schema,
ObjectId = Schema.Types.ObjectId;
var message = new Schema({
// This should be the ID of the sending user
// If it isn't the user this mess... |
(function() {
'use strict';
function Game() {
}
Game.prototype.create = function() {
this.input.onDown.add(this.onInputDown, this);
};
Game.prototype.update = function() {
};
Game.prototype.onInputDown = function() {
};
window['<%= projectName %>'] = window['<%= projectName %>'] || {... |
export Footer from './Footer';
export Section from './Section';
export DropDownSection from './DropDownSection';
export LinkList from './LinkList';
|
test("url building - music tags", function(){
var starting_text= [
"<https://www.deezer.com/album/7509216>",
"<https://www.deezer.com/track/75795831>",
"<https://www.deezer.com/playlist/66498465>",
"<https://play.spotify.com/track/7EE7jbv7Dv8ZkyWBlKhPXX>",
"<https://soundcloud.com/delete... |
// U3.W9:JQuery
// I worked on this challenge [by myself, with: ].
// This challenge took me [#] hours.
$(document).ready(function(){
//RELEASE 0:
//link the image
//RELEASE 1:
//Link this script and the jQuery library to the jQuery_example.html file and analyze what this code does.
$('body').css({'backgroun... |
var validate = require('../lib/validate');
exports.async = function(test) {
function one(value, callback) {
test.equal(this, context);
test.equal(value, 'duck');
process.nextTick(callback.bind(null, true));
}
var context = { req: { hi: 'you' } };
var value = 'duck';
validate.async(context, one... |
var Interval = require('interval-js');
var generateDrawFn = function(options) {
var devicePixelRatio = window.devicePixelRatio,
canvas = options.canvas,
width = options.width,
height = options.height,
ctx = canvas.getContext('2d'),
container = options.container,
elem... |
import React from 'react';
import Helmet from 'react-helmet';
//
import { Basic, Domain } from 'czechidm-core';
import SystemGroupSystemTable from './SystemGroupSystemTable';
import { SystemGroupSystemManager } from '../../redux';
/**
* Table of system groups-system relations.
*
* @author Vít Švanda
* @since 11.2.... |
(function() {
'use strict';
angular.module('app.services.!!NAME!!', []);
})(); |
module.exports.safe = true;
/*
Purpose:
Executes jquery paths to extract a single value or an array of values from an HTML document.
Each key is the location where the captures will be stored. The value of each key should be a jquery path.
If the path/value is a single-value array, then all matches will be capt... |
const should = require("should");
const makebuffer_from_trace = require("node-opcua-debug").makebuffer_from_trace;
const inlineText = require("node-opcua-debug").inlineText;
const hexDump = require("node-opcua-debug").hexDump;
const crypto_utils = require("node-opcua-crypto");
let buffer = makebuffer_from_trace(
... |
import { expect } from 'chai';
import { ClientFunction } from 'testcafe';
import { saveWindowState, restoreWindowState } from '../../../../../window-helpers';
const getWindowDimensionsInfo = ClientFunction(() => {
return {
innerWidth: window.innerWidth,
innerHeight: window.innerHeight,
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("val... |
'use strict'
module.exports = {
ADD:{
USER:"ADD_USER",
TASK:"ADD_TASK",
},
UPDATE:{
TASK:"UPDATE_TASK",
},
DEL:{
USER:"DEL_USER",
TASK:"DEL_TASK",
},
} |
var fs = require('fs'), uglify = require('uglify-js');
var FILE_ENCODING = 'utf-8',
PROJECT_NAME = 'app',
LICENSE = '../LICENSE.md',
INPUT_DIR = '../src',
OUTPUT_DIR = '../dist',
FILE_EXT = '.js',
SCRIPTS = [
'core.js',
'routes.js',
'router.js',
'template.js',
'about.js',
'users.js',
'run.js'
];
... |
"use strict";
var glob = require("glob");
function config() {
var cfg = {};
cfg.dest = ".";
cfg.styles = "sass";
cfg.template = "templates/email.tpl.html";
cfg.srcFiles = glob.sync("src/**/*.js?(x)");
cfg.srcMainEntry = "./index.js";
cfg.testDest = "test/build";
cfg.testFiles = glob.sync("./test/src/*.js... |
// Module variables
var PATTERN_REGEXP = /\{\{([\w\*\.]*?)\}\}/g;
var DOT_REGEXP = /([^\.]+)/g;
/**
* Compile template
* @param {String} template String to precompile
* @param {Object} object Template arguments
* @return {String} Precompiled template
* @api public
*/
export function compile(template... |
(function (){
var Documentor,
util,
emitter,
isNode=typeof module == 'object' && module.exports;
if(isNode){
util=require('../lib/util');
Documentor=module.exports;
emitter=require('../lib/events').EventEmitter;
}else{
util=window.util;
Documentor=util.ns('Documentor');
emitter=windo... |
//=============================================================================
// AddEscapeCommandForAllActor.js
//=============================================================================
/*:
* @plugindesc This plugin add a Escape Command for all Actor.
* @author masami
*
* @help This plugin does not provide... |
'use strict';
const
Util = require('./util');
/**
* All movement methods should have the same signature so that execute() can call them.
*/
class MovementStrategy {
/**
* @param board
* @param methodName
* @param frightMethodName
* @param scatterx (optional)
* @param scattery (opti... |
/* global require, describe, it */
'use strict';
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Matrix data structure:
matrix = require( 'dstructs-matrix' ),
// Deep close to:
deepCloseTo = require( './utils/deepcloseto.js' ),
// Validate a value is NaN:
isnan = require( 'validate.io... |
"use strict";
var app = {
map: undefined,
marker: undefined,
rectangle: undefined,
rectangleBounds: undefined,
initialize: function() {
app.map = new google.maps.Map(document.getElementById('map'), {
center: { lat: 41.99081, lng: -87.9634719 },
zoom: 8
});
... |
'use strict';
var myApp = angular.module('projects').controller('ProjectsController', ['$scope','$rootScope', '$http', '$stateParams', '$location', '$upload', '$modal', '$sce', 'Authentication', 'Projects','$state', '$timeout',
function($scope, $rootScope, $http, $stateParams, $location, $upload, $modal, $sce, Aut... |
"use strict";
var React = require('react'),
S3Upload = require('./s3upload.js'),
objectAssign = require('object-assign'),
ProgressBar = require('react-bootstrap/lib/ProgressBar');
var ReactS3Uploader = React.createClass({
getInitialState:function(){
return{
filename:"",
... |
var objects = require('../src/09-objects.js').objects;
describe('Objects ', function () {
'use strict';
it('should ', function () {
var p1 = objects.point(1, 3);
var p2 = objects.point(-2, 2);
var p3 = objects.point(3, -1);
expect(Math.floor(objects.calculateDistances(p1, p2))).toBe(3);
expec... |
import proxyquire from 'proxyquire';
import {stub} from 'sinon';
import should from 'should';
const noop = function() {};
describe('Move Resource', function(){
let r;
let req = {body: {upperX: 5, upperY: 5, robots: {}}};
let res = {};
let Grid;
let move;
let robotFactory;
let Resource;
beforeEach(() =>... |
export default class VideoRepository {
constructor(httpClient) {
this.httpClient = httpClient;
}
latest() {
return this.httpClient.get('/api/videos/latest');
}
get(videoId) {
return this.httpClient.get('/api/videos/' + videoId);
}
labels(videoId) {
return t... |
angular.module('option', [
'filter.i18n',
'service.storage',
'service.setting',
'ui.bootstrap.bindHtml'
])
.config(function() {
})
.controller('optionController', function($rootScope, $scope, appSetting) {
appSetting.bind('ready', function() {
$scope.setting = $.extend(true, {}, appSe... |
conn = new Mongo();
db = conn.getDB("sci")
//var myregexp = /(....)-(..)-(..)T(..):(..):(..)\.(.+)([\+-])(..)/;
db.tweets.find().forEach(function(element) {
var dStr = element.created_at;
dStr.replace(/^\w+ (\w+) (\d+) ([\d:]+) \+0000 (\d+)$/,"$1 $2 $4 $3 UTC");
var d = new Date(dStr);
print(d); // Just to make ... |
import frRegionsMerc from "./frRegionsMerc.json";
import frRegionsMill from "./frRegionsMill.json";
export { frRegionsMerc, frRegionsMill };
//# sourceMappingURL=index.js.map
|
/**
* Created by pomy on 10/01/2017.
*/
'use strict';
let Handlebars = require('handlebars');
let Metalsmith = require('metalsmith');
let ora = require('ora');
let async = require('async');
let render = require('consolidate').handlebars.render;
let path = require('path');
let chalk = require('chalk');
let log = re... |
/**
* @license Copyright (c) 2012, Viet Trinh All Rights Reserved.
* Available via MIT license.
*/
/**
* Test tests handler B.
*/
define([], function()
{
return { name: 'testsHandlerB' };
}); |
/**
* Main controller for Ghost frontend
*/
/*global require, module */
var moment = require('moment'),
RSS = require('rss'),
_ = require('lodash'),
url = require('url'),
when = require('when'),
Route = require('express').Route,
api = requ... |
'use strict';
var Events = require('Events');
var profile = require('../../../../views/profile/index.js');
var msgPlus = require('../../../../views/msgPlus/index.js');
var modal = require('../../../../views/modal/index.js');
var industryWarn = require('../../../../views/industryWarn/index.js');
/**IE8不支持
functio... |
var assert = require('assert');
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var logger = require('../../../../mage').core.logger.context('msgStream', 'HttpPolling');
function HttpPollingHost(style, cfg) {
assert(style === 'shortpolling' || style === 'longpolling', 'Invalid HttpPoll... |
"use strict";
var debug = require("debug")("ch-arge:lib/bootstrap.js");
var types = require("./types.js");
var mTable = require("../tools/map-table.js").mapTable;
var initTable = require("../tools/map-table.js").initTable;
var docDone = require("../tools/map-table.js").saveTable;
exports.newType = newType;
exports.mk... |
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Card, CardHeader, CardMedia, CardTitle, CardText } from 'material-ui/Card';
import Avatar from 'material-ui/Avatar';
import FontIcon from 'material-ui/FontIcon';
import moment from 'moment';
import Constatns from '../../config/Co... |
module.exports = {
frameworks: ['jasmine'],
basePath: '../',
files: [
'test/unit/jasmine/*.js'
],
preprocessors: {
'src/**/*.js': ['webpack'],
'test/**/*.js': ['webpack']
},
webpack: require('./webpack.config.js'),
webpackMiddleware: {
noInfo: true
},
plugins: [
'karma-webpack',
... |
const Deferred = require('promised-io/promise').Deferred
const all = require('promised-io/promise').all
const when = require('promised-io/promise').when
const debug = require('debug')('p3api-server:TranscriptomicsGene')
const request = require('request')
const config = require('../config')
const distributeURL = config.... |
var data = [];
for (var i = 0; i < 100; ++i)
data.push(i);
var pred = function (x) {
return x % 3 === 0;
};
var etalon = [];
for (var i = 0; i < 100; i += 3)
etalon.push(i);
module.exports = {
data: data,
pred: pred,
etalon: etalon
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.