code stringlengths 2 1.05M |
|---|
/*
* GENERATED DECORATOR SVG ICON FILES *
* DO NOT EDIT MANUALLY *
* TO GENERATE PLEASE RUN node generate_decorator_svg_list.js
*/
define([], function () {
'use strict';
return {
DecoratorSVGIconList: ["Arrow-right.svg","Attribu... |
Template.ionItem.helpers({
itemClasses: function () {
var classes = ['item'];
if (this.class) {
var customClasses = this.class.split(' ');
_(customClasses).each(function (customClass) {
classes.push(customClass);
});
}
if (this.avatar) {
classes.push('item-avatar');
... |
/**
*
* SelectField
*
*/
import React from 'react';
import { Field } from 'redux-form';
function SelectField(props) {
let options;
if (props.options) {
options = props.options.map((option, index) => (
<option key={`option-${index}`} value={option[1]}>{option[0]}</option>
));
}
return (
<div ... |
var express = require('express');
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
//static file directory
app.use(express.static(__dirname + '/img'));
app.use(express.static(__dirname + '/js'));
app.use(express.static(__dirname));
app.use(express.static(__dirname +... |
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(8090, 'localhost', function (err, result) {
if (err) {
... |
Sink = function(baseX, baseY) {
var sender = this;
var _baseX = baseX;
var _baseY = baseY;
var _group = new Kinetic.Group();
var sinkIsFull = false;
var _empty = new Kinetic.Image({
x: baseX,
y: baseY,
image: resourceManager.getImage("sink-empty"),
width: 191,
height: 98
});
_group.add(_empty);
... |
const { decode, parse } = require('../v5/response')
/**
* Fetch Response (Version: 6) => throttle_time_ms [responses]
* throttle_time_ms => INT32
* responses => topic [partition_responses]
* topic => STRING
* partition_responses => partition_header record_set
* partition_header => partition err... |
(function () {
'use strict';
angular.module('app.shared', ['app.shared.service']);
})();
|
var playlist = function () {
var videoPlaylist = [];
var videoIndex = 0;
$('#video-playlist li').each(function(index) {
videoPlaylist.push($(this).data('url'));
});
var audio = document.getElementsByTagName("audio")[0];
//audio.play();
var video = document.getElementsByTagName("vi... |
//$(document).ready(function(){
//var podatki = $('[ng-controller="driversStandingsController"]').scope().colors;
//alert(podatki[0]);
//alert("esd");
//});
var test = "test controller"; |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// The widget module currently supports only Firefox.
// See: https://bugzilla.mozilla.org/show_bug... |
define({
"addTaskTip": "ํ๋ ์ด์์ ํํฐ๋ฅผ ์์ ฏ์ ์ถ๊ฐํ๊ณ ๊ฐ๊ฐ์ ๋ํ ๋งค๊ฐ๋ณ์๋ฅผ ๊ตฌ์ฑํฉ๋๋ค.",
"enableMapFilter": "ํ๋ฆฌ์
๋ ์ด์ด ํํฐ๋ฅผ ๋งต์์ ์ ๊ฑฐํฉ๋๋ค.",
"newFilter": "์ ํํฐ",
"filterExpression": "ํํฐ ์",
"layerDefaultSymbolTip": "๋ ์ด์ด์ ๊ธฐ๋ณธ ์ฌ๋ณผ ์ฌ์ฉ",
"uploadImage": "์ด๋ฏธ์ง ์
๋ก๋",
"selectLayerTip": "๋ ์ด์ด๋ฅผ ์ ํํ์ธ์.",
"setTitleTip": "์ ๋ชฉ์ ์ค์ ํ์ธ์.",
"noTasksTip"... |
/*global expectWithUnexpectedMagicPen*/
describe('to equal assertion', function() {
var expect = expectWithUnexpectedMagicPen;
function toArguments() {
return arguments;
}
it('asserts deep equality that works with objects', function() {
expect({ a: 'b' }, 'to equal', { a: 'b' });
expect(1, 'not to... |
var fs = require('fs');
var getGraph = require('./convertToGraph.js');
module.exports = loadGraph;
function loadGraph() {
var index = getJSON(process.argv[2] || './cpan_dist.json');
var revDeps = getJSON(process.argv[3] || './cpan_reverse_deps.json');
return getGraph(index, revDeps);
}
function getJSON(name) {... |
var http = require("http");
var proto = {};
proto.isExpress = true;
proto.__proto__ = http.IncomingMessage.prototype;
module.exports = proto; |
function marker(e) {
if (!e) e = document.createElement("marker");
on("changes")(e, function () {
e.innerHTML = mark(this.source, this.search);
});
return e;
} |
var Node = function() {
var value = undefined;
var address = undefined;
this.setValue = function(val) {
value = val;
}
this.getValue = function() {
return value;
}
this.setAddress = function(val) {
address = val;
}
this.getAddress = function() {
return... |
var OT = require('../lib/ot');
var Instance = require('../lib/instance');
var expect =require('chai').expect;
var redis = require('redis');
var async = require('async');
describe('test features', function() {
before(function() {
this.ot = OT.createClient();
});
it('should return correct result', function(do... |
module.exports = function(req, res){
var language = req.body.language;
var cookieAge = 24*60*60*1000; // 1 day
res.cookie("flashcard-language",language,{maxAge:cookieAge, httpOnly:true});
res.redirect("/flashcard");
}; |
/*
_____________________________________________________
| | | |
| N | | P |
| E | | R |
| X | | E |
| T | ... |
$('#renseignements').removeClass("disabled");
$('#renseignements').addClass("active");
$('#commande a').append(' <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>');
$('#paiement').removeClass("disabled");
$('#paiement').addClass("active");
$('#renseignements a').append(' <span class="glyphicon glyphicon... |
version https://git-lfs.github.com/spec/v1
oid sha256:1611b3d71b169148d7f65c48211f4d66d985d9319b3fb475500902a690326a43
size 25136
|
describe('send', function(){
beforeEach(createServer);
afterEach(closeServer);
describe('.send(null)', function(){
it('should set body to ""', function(done){
respond(function(req, res){
res.send(null);
});
request()
.get('/')
.end(function (err, res) {
assert.... |
module.exports = function( grunt ){
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> by <%= pkg.author %> */\n',
report: 'gzip'
},
build: {
files: {
'bu... |
/**
* Edeco's gallery
*
* @author LMV <luis.montealegre@mandragora-web.systems>
* @copyright Mandrรกgora Web-Based Systems
* @version SVN: $Id$
* @package Edeco
*/
(function($) {
$.gallery = function(properties, options) {
var defaults = {
galleryDirectory: '/images/gallery/',
... |
'use strict';
angular.module('wooclientApp')
.factory('resourceFactory', function ($resource) {
// Public API here
return function(id) {
switch(id){
case 'event':
{
return $resource('/api/event', {})
}
}
}
});
|
formikation = {
// Internal variables / DOM caching / etc.
dat: {
els: null // elements
},
// Default settings / params
defaults: {
mapClass: true,
mapStyle: true
},
// Aquรญ se inicializa el tema de verdad
init: function(params) {
// filter out <= IE6
if (typeof document.body.sty... |
var PvService = require('../service/PvService');
var path = require('path');
var StatisticsServicePV = require('../service/StatisticsService_PV');
GLOBAL.pjconfig = {
"mysql": {
"url": "mysql://badjs:pass4badjs@10.198.30.62:4250/badjs"
},
"storage": {
"errorMsgTopUrl": "http://10.185.14.28:9... |
define(
[
'backbone',
'mps',
'compare/presenters/PresenterClass',
'compare/services/CompareService',
'widgets/collections/WidgetCollection'
],
function(Backbone, mps, PresenterClass, CompareService, WidgetCollection) {
'use strict';
var CompareGridPresenter = PresenterClass.extend({
... |
exports.render = function (req,res) {
res.render('header', {
user: JSON.stringify(req.user),
name:req.user?req.user.name:'Guest',
rank:req.user?req.user.rank:0
});
};
|
const config = require('./config.js');
module.exports = {
moduleFileExtensions: ['js', 'jsx'],
moduleNameMapper: {
'^_webClient/(.*)': '<rootDir>/webClient/$1',
'^_firebase/(.*)': '<rootDir>/firebase/$1',
'^_store/(.*)': '<rootDir>/webClient/store/$1',
'^_components/(.*)': '<rootDir>/components/$1'... |
var express = require("express");
var app = express();
app.use(express.logger());
app.use(express.static('www'));
var port = process.env.PORT || 5000;
app.listen(port, function() {
console.log("Listening on " + port);
}); |
import {HttpClient} from 'aurelia-fetch-client';
import * as messages from './messages';
import {EventAggregator} from 'aurelia-event-aggregator';
export class Api {
static inject() { return [EventAggregator]; }
constructor(ea) {
this.ea = ea;
this.socket = io();
this.client = new HttpClient();
this.gameId ... |
import { expect } from 'chai';
import models from '../../../build/models';
import { passwordHash } from '../../helper/helper';
const User = models.User;
const newUser = {
fullName: 'john doe',
username: 'johndoe',
password: passwordHash('johndoe'),
email: 'johndoe@gmail.com'
};
const invalidUser = {
fullNam... |
'use strict';
zaboxServices.factory('faviconService', [
function () {
var favico = new window.Favico({
animation: 'fade'
});
var badge = function (num) {
favico.badge(num);
};
var reset = function () {
favico.reset();
};
return {
badge: badge,
reset: reset
... |
/**
* Test case for apTimerMixin.
* Runs with mocha.
*/
'use strict'
const ApTimerMixin = require('../lib/ap_timer_mixin.js').default
const React = require('react')
const ReactDOM = require('react-dom/server')
const assert = require('assert')
describe('ap-timer-mixin', () => {
before((done) => {
done()
})
... |
'use strict';
/* Controllers */
angular.module('ethylApp.controllers', [])
.controller('AppCtrl', function ($scope, $http) {
$http({
method: 'GET',
url: '/api/name'
}).
success(function (data, status, headers, config) {
$scope.name = data.name;
})... |
// Regular expression that matches all symbols in the Sinhala block as per Unicode v6.0.0:
/[\u0D80-\u0DFF]/; |
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directl... |
describe('The standingZonesManager service', function(){
var utils = require('./utils'),
expect = chai.expect,
standingZonesManager;
beforeEach(function(){
angular.mock.module(utils.moduleName);
});
beforeEach(inject(function(_standingZonesManager_){
standingZonesManage... |
const React = require('react')
const {render} = require('react-dom')
const App = require('./app')
const root = document.createElement('div')
document.body.appendChild(root)
render(
<App />,
root
)
|
var chai = require('chai'),
http = require('chai-http'),
path = require('path'),
<%= S(name).underscore().s %> = require('../..');
var should = chai.should();
chai.use(http);
global.<%= S(name).underscore().s %> = <%= S(name).underscore().s %>;
global.chai = chai;
global.should = should;
global.path = pa... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define("require exports ../../../core/tsSupport/assignHelper ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/mayb... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import App from './views/App'
import router from './router'
import store from './store'
import Buefy from 'buefy'
impo... |
/* ****************************** info.js *********************************** */
$(document).ready(function () {
var info = $('#info .data');
if (info.length) {
setInterval(function () {
$.nette.ajax(info.data('handleurl'));
}, info.data('refresh'));
}
});
|
"use strict";
const fs = require('fs');
const dot = require('dot');
module.exports = (function(rootDirectory) {
let config = {
env: process.env.NODE_ENV || 'development',
};
let credentials, secrets;
let varname = dot.templateSettings.varname;
dot.templateSettings.varname = 'env';
let dir = rootD... |
$(function(){
var $t, t, v, animate,
cleanupCode = function(code){
return code.replace(/[<>\"\'\t\n]/g, function(m) { return {
'<' : '<',
'>' : '>',
"'" : ''',
'"' : '"',
'\t': ' ',
'\n': '<br/>' // needed for IE
}[m]});
};
$("a.external").each(function(){this.target = '_new'... |
'use strict';
/**
* @author walle <liaozhicheng.cn@163.com>
*/
module.exports = function(done) {
// ่ทๅๅฝๅ็ปๅฝ็จๆท๏ผsession ไธญ็็จๆท๏ผ
$.router.get('/api/login_user', async function(req, res, next) {
res.json({user: req.session.user, token: req.session.logout_token});
});
// ็จๆท็ปๅฝ
$.router.post('/api/login', async... |
'use strict';
exports = module.exports = function(app, mongoose) {
var questionSchema = new mongoose.Schema ({
content: String
});
questionSchema.index({ content: 1 });
questionSchema.plugin(require('./plugins/pagedFind'));
questionSchema.set('autoIndex', (app.get('env') === 'development'));
... |
var EventEmitter = require('eventemitter2').EventEmitter2,
inherits = require('util').inherits,
assert = require('assert'),
assign = require('lodash/object/assign'),
requireDir = require('require-directory'),
StoreFacade = require('./StoreFacade'),
Cache = require('./Cache'),
deco = requireDir(module, './... |
function solve(){
return function (selector) {
var container,
buttons;
if (typeof selector === 'string') {
container = document.querySelector('#' + selector);
}
if (typeof selector === undefined) {
throw new Error('Selector CANNOT be undefined!')... |
/* eslint-env mocha */
import { setup, teardown } from "./helpers"
describe("Collection page", () => {
let metaphysics, browser
before(async () => {
;({ metaphysics, browser } = await setup())
metaphysics.post("/", (req, res) => {
res.send(require("./fixtures/metaphysics/collection"))
})
})
... |
import { PolymerElement } from '../../../../node_modules/@polymer/polymer/polymer-element.js';
import { html } from '../../../../node_modules/@polymer/polymer/lib/utils/html-tag.js';
import '../../../../node_modules/@polymer/iron-icon/iron-icon.js';
import '../../../../node_modules/@polymer/paper-icon-button/paper-icon... |
import React, { Component, PropTypes } from "react"
import LoginPage from "./LoginPage"
import CollectPage from "./CollectPage"
import CreateStreamPageConnected from "./CreateStream/index.js"
import Message from "components/Message"
import classnames from "classnames"
import storage from 'storage'
import Terms from "./... |
'use strict';
module.exports = error => {
console.error(
['\x1b[31m', '\x1b[0m'].join('%s'),
error.cause.filename
);
console.error(error.cause.message);
console.error('line:', error.cause.line);
console.error('col:', error.cause.col);
console.error('pos:', error.cause.pos);
}
|
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { createFalse } from '../../factoriesAny.js';
export var falseDependencies = {
createFalse: createFalse
}; |
const webpack = require('webpack');
const merge = require('webpack-merge');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const common = require('./webpack.common.js');
module.exports = merge(common, {
plugins: [
new UglifyJSPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_E... |
function CollisionEngine(width, height) {
this.width = width;
this.height = height;
this.cells = new Array(width*height);
};
CollisionEngine.prototype.set = function(point, value) {
if(value === undefined)
value = true;
this.cells[point.y*this.width + point.x] = value;
};
CollisionEngine.prototype.get = functi... |
'use strict';
var Promise = require('promise');
var ms = require('ms');
module.exports = timeout;
function timeout(val, timeout) {
if (timeout === Infinity || timeout === null) {
return Promise.resolve(val);
}
return new Promise(function (resolve, reject) {
var timer = setTimeout(function () {
rej... |
var Jimp = require("jimp");
var fs = require("fs");
var replaceExt = require('replace-ext');
//print process.argv
// process.argv.forEach(function (val, index, array) {
// console.log(index + ': ' + val);
// });
Jimp.read(process.argv[2], function (err, image) {
var raw=[];
image.scan(0, 0, image.bitmap.width... |
'use strict'
const { resolve } = require('path')
const { writeFile, readFile } = require('fs').promises
const layout = require('../utils/layout')
const config = require('../utils/config')
const customTracker = require('../utils/customTracker')
const signale = require('../utils/signale')
const index = () => {
return... |
import Component from '../../component'
/**
* Set of horizontally arranged buttons with only one active at a time
*/
export default class ToggleButtons extends Component {
constructor (texts) {
super()
this.selection.classed('toggle-group', true)
this.buttons = texts.map(txt => {
return this.sel... |
describe('Testing AngularJS Test Suite', function() {
beforeEach(module('testingAngularApp'));
describe('Testing AngularJS Controller', function() {
var ctrl, $controller, $rootScope, $scope, $httpBackend, $timeout;
beforeEach(inject(function(_$controller_, _$rootScope_, _$httpBackend_, _$tim... |
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @lic... |
"use strict";
testSetScenario(function() {
describe(".tryParse", function() {
it("returns just the value", function() {
var x = 4;
assert.equal(Parsimmon.of(x).tryParse(""), x);
});
it("returns throws on a bad parse", function() {
assert.throws(function() {
Parsimmon.digit.tryP... |
var ref = require("prosemirror-model");
var Slice = ref.Slice;
var Fragment = ref.Fragment;
var ref$1 = require("./transform");
var Transform = ref$1.Transform;
var ref$2 = require("./replace_step");
var ReplaceStep = ref$2.ReplaceStep;
var ReplaceAroundStep = ref$2.ReplaceAroundStep;
function canCut(node, start, end... |
var VueSession=require('../dist/vue-session');
var assert=require('assert');
var localstorage={
setItem:function (key,value) {
this[key]=value;
},
getItem:function (key) {
return this[key];
},
removeItem:function (key) {
delete this[key];
}
};
var session=new VueSession.Session(10000,'test',lo... |
/**Parent: ptravels
* A container for the react audio player */
import React, { Component } from 'react';
import ReactPlayer from 'react-player';
export default class PlayerContainer extends React.Component {
constructor(){
super();
this.state = {
url: "",
played: 0,
... |
/** @jsx React.DOM */
var React = require('react');
if (window.location.pathname === '/create') {
var CreatePost = require('../components/CreatePost');
React.renderComponent(<CreatePost />, document.getElementById('react-root'));
}
|
var BaseEvent = require('./base-event.js');
module.exports = BaseEvent(eventLambda);
function eventLambda(ev, broadcast) {
var opts = this.opts;
var is_valid = false;
if (opts.event_types && opts.event_types.length) {
is_valid = opts.event_types.indexOf(ev.type) >= 0;
}
if (is_valid) {
broadcast(t... |
if (global && global.__hardhatContext){
require("./hardhat.plugin");
return;
}
module.exports = require('./buidler.plugin')
|
//function vistaMenuTransparenciaActiva() {
//
//
// $.post(
// base_url + "Welcome/vistaMenu1",
// {},
// function (pagina) {
//
// $("#sidebar").hide();
// $("#stream").hide();
// $("#contenido").hide();
// $("#contenido... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M10 11h2.63l-3.72 4.35C8.36 16 8.82 17 9.67 17H14c.55 0 1-.45 1-1s-.45-1-1-1h-2.63l3.72-4.35c.55-.65.09-1.65-.76-1.65H10c-.55 0-1 .45-1 1s.45 1 1 1zm11.3-4.58c-.35.42-.98.48-1.41.13l-3.07-2.56c-.42... |
import React from 'react';
import { TextField } from 'material-ui';
import { AdministrativeButton } from './../../components';
import { auth } from './../../services';
class NewRole extends React.Component {
state = {
name: '',
level: 0
};
handleNameChange = (e, newValue) => this.setState({ name: new... |
// Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'base/js/namespace',
'jquery',
'base/js/utils',
], function(IPython, $, utils) {
"use strict";
//-----------------------------------------------------------------------
// CommManage... |
#!/usr/bin/env node
"use strict";
// fรถr pid-filen
const fs = require('fs');
const path = require('path');
var pid = `${process.pid}`;
// skriv pid-filen
var filepathPID = path.join(__dirname, "pid");
fs.writeFile(filepathPID, pid, (err) => {
if (err) {
throw err;
}
console.log("PID saved at: " + __... |
'use strict';
module.exports = (it, expect, collect) => {
it('should convert the collection into a plain array', () => {
const collectionArray = collect([1, 2, 3, 'b', 'c', 'รธ']);
expect(collectionArray.toArray()).to.eql([1, 2, 3, 'b', 'c', 'รธ']);
expect(collectionArray.toArray()).to.eql(collectionArray... |
let files = ['demopage.html', /*ๆๅ
ถไป้กต้ข็่ฏ้
็ฝฎๅจ่ฟ้*/ ];
// workaround security check
let cdnPrefix = '//j1.5' + '8cdn.com.cn/jinrong/finsys-js/';
module.exports = {
'babel-polyfill': {
entry: {
path: cdnPrefix + 'babel-polyfill/6.23.0/polyfill.min.js',
type: 'js'
},
files... |
var currentPage = 1;
var date = new Date();
var year = date.getFullYear();
var pageFlag = false;
var scrollFlag = false;
$(document).ready(function(){
//load next page
$(document).on("scroll",scrolling);
changeDate();
//call one year back function
var oneyear = $('button[name=oneyear]');
oneyear.click(function(... |
var BaseTween = require('tween-base')
var isArray = require('an-array')
var ownKeys = require('own-enumerable-keys')
var ignores = ownKeys(new BaseTween())
module.exports = function getTargets(element, opt) {
var targets = []
var optKeys = ownKeys(opt)
for (var k in opt) {
//copy properties as ne... |
๏ปฟvar mongoose = require('mongoose');
// Create a new schema for our curiosity data
var schema = new mongoose.Schema({
servername : String
, datetime : String
, description : String
});
// Create a static getCuriosities method to return curiosity data from the db
schema.statics.getCuriosities = function(ca... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
var path = require('path');
var fs = require('fs');
var localeDir = path.resolve(__dirname, '../../src/config/i18n');
var distFile = path.resolve(__dirname, '../tmp/i18n.json');
/**
* ๆฅๆพๆๆ็ๅค่ฏญ่จๆไปถ
*/
var findLangs = function(dir) {
if (!fs.existsSync(dir)) {
return null;
}
var dirs = fs.readdirSy... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var Validator = require('./validation/common.server.model');
var validate = new Validator();
/**
* Discipline Schema
*/
var DisciplineSchema = new Schema({
name: {
type: String,
default: '',
validate... |
import React, {
Component, PropTypes
}
from 'react';
import {
Gmaps, Marker, InfoWindow, Circle
}
from 'react-gmaps';
import shouldPureComponentUpdate from 'react-pure-render/function';
export default class SimpleMapPage extends Component {
static propTypes = {
center: PropTypes.shape({
lat: PropTypes.... |
'use strict';
const fs = require('fs');
const path = require('path');
const util = require('util');
const should = require('should');
describe('Lexer Benchmark', () => {
const fixturesPath = path.join(__dirname, 'fixtures/lexer benchmark');
const tests = fs.readdirSync(fixturesPath);
let tokenize;
beforeEa... |
๏ปฟvar hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'Wordpress',
version:'2.1',
prepareImgLinks:function (callback) {
var res = [];
$('img[src*="wp-content"]').each(function () {
var img = $(this),
//re = /-\d+x\d+\./,
//... |
/**
* Created with JetBrains PhpStorm.
* User: fernando
* Date: 5/08/13
* Time: 8:28
* To change this template use File | Settings | File Templates.
*/
var config_module = angular.module('sifpeApp.config', []);
angular.forEach(config_data,function(key,value) {
config_module.constant(value,key);
});
/**
* Mo... |
/*
Introduction/rules/advice:
-- You will have 15 minutes to solve a randomly-selected problem as well as you can. If you finish early, your interviewer may tweak the problem or ask related questions.
After your 15 minutes, the interviewer and/or listeners will have 5 minutes to offer feedback on your presentation. ... |
/*
Copyright ยฉ 2018 Andrew Powell
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
The above copyright notice and this permission notice shall be
included in all ... |
import { endGlobalLoad } from '../store';
/**
* Tells us if input looks like promise or not
* @param {Mixed} obj
* @return {Boolean}
*/
export function isPromise(obj) {
return typeof obj === 'object' && obj && obj.then instanceof Function;
}
/**
* Utility to be able to iterate over array of promises in an asy... |
/*!
* list-item <https://github.com/jonschlinkert/list-item>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
const isNumber = require('is-number');
const fill = require('fill-range');
/**
* Returns a function to generate a plain-text/markdown list-item,
* all... |
import React from 'react';
import R from 'ramda';
import { labelNumber } from './labelNumber.js';
const WorkInfo = ({ title, source, wordInfos, workUrl }) => (
<div>
<a href={workUrl}>{title}</a>
 
<span className="workListInfo">— {source} — {labelNumber(wordInfos.length, 'word', 'words'... |
function Profile(data, raw) {
this.displayName = data.name;
this.id = data.user_id || data.sub;
this.user_id = this.id;
if (data.identities) {
this.provider = data.identities[0].provider;
} else if (typeof this.id === 'string' && this.id.indexOf('|') > -1 ) {
this.provider = this.id.split('|')[0];
... |
#!/usr/bin/env node
"use strict";
/* CLI access to vcgrep functionality */
var _ = require('underscore');
var path = require('path');
var shell = require('shelljs');
var matchstick = require('matchstick');
var api = require('./api');
var argv = processArguments();
registerSignalHandlers();
searchFiles(function af... |
'use strict';
const globalHooks = require('../../../hooks');
const hooks = require('feathers-hooks');
const auth = require('feathers-authentication').hooks;
exports.before = {
all: [],
find: [
// auth.verifyToken(),
// auth.populateUser(),
// auth.restrictToAuthenticated()
],
get: [
// auth.ve... |
import React, { Component } from "react";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
UncontrolledDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem,
NavLink
} from "reactstrap";
// import { Navbar... |
var playState = {
create: function(){
var background = game.add.sprite(0, 0, 'cidade');
background.width = 1300;
background.height = 650;
graphics = game.add.graphics(0, 0);
groupCidade = game.add.group();
groupCidade.inputEnableChildren = true;
var x = 1... |
import React, { Component } from 'react';
import { PageHeader } from 'react-bootstrap';
import DeploymentTimeline from './DeploymentTimeline';
import { componentLogger } from '../utils/logger';
const componentName = 'ReleaseTimelinesPage';
class ReleaseTimelinesPage extends Component {
componentWillMount() {
... |
export { default, commaize } from 'ccm-core/helpers/commaize';
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.