code stringlengths 2 1.05M |
|---|
import cache from 'lscache';
import lockr from 'lockr';
export function getFriends() {
return cache.get('friends')
}
export function setFriends(value) {
cache.set('friends', value, getFriendsExpiry());
}
export function getFriendsExpiry() {
var defaultValue = 60 * 24 * 7; //1 week
return lockr.get('f... |
export const document = {"viewBox":"0 0 20 20","children":[{"name":"path","attribs":{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M16,1H4C3.447,1,3,1.447,3,2v16c0,0.552,0.447,1,1,1h12c0.553,0,1-0.448,1-1V2\r\n\tC17,1.448,16.553,1,16,1z M15,17H5V3h10V17z"}}]}; |
// javascripts/models/challengeModel.js
var ChallengeModel = Backbone.Model.extend({
urlRoot: '/challenges'
}); |
const { createServer } = require('http')
const { parse } = require('url')
const next = require('next')
const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev, dir: __dirname })
const handle = app.getRequestHandler()
app.prepare().then(() => {
cre... |
const ComplexTypes = require('./../complex-types');
const createBasicProperty = require('./create-basic-property');
const createRelationship = require('./create-relationship');
module.exports = async (DOMAIN, persistence, changesToMake) => {
if (changesToMake.type === ComplexTypes.BasicProperty) {
return c... |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M14 11V8c4.56-.58 8-3.1 8-6H2c0 2.9 3.44 5.42 8 6v3c-3.68.73-8 3.61-8 11h6v-2H4.13c.93-6.83 6.65-7.2 7.87-7.2s6.94.37 7.87 7.2H16v2h6c0-7.39-4.32-10.27-8-11... |
'use strict';
var express = require('express');
var path = require('path');
var favicon = require('static-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var wikimaps = require('./routes/wikimaps')... |
kango.ui.ContextMenuItem=function(a){this.superclass.apply(this,arguments);this.init(a)};kango.ui.ContextMenuItem.prototype=kango.oop.extend(kango.ui.ContextMenuItemBase,{init:function(a){this.addItem("item1",a.caption,a.context||"all")},addItem:function(a,b,c){a={title:b,contexts:[c]};a.onclick=kango.func.bind(functi... |
import { appendIfMissing } from '@zambezi/d3-utils'
import { defaultTemplate } from './basic-grid-template'
import { isIE } from './is-ie'
import { select } from 'd3-selection'
export function createSetupGridTemplate () {
const appendStirrup = appendIfMissing('div.zambezi-grid-stirrup')
let template = defaultTempl... |
// JavaScript Document
function img(num) {
$("#imgbox") .attr("src","image/picture" + num + ".png");
} |
const XLSX = require(`xlsx`)
const fs = require(`fs-extra`)
const _ = require(`lodash`)
// read files as `binary` from file system
function _loadNodeContent(fileNode, fallback) {
return fileNode.absolutePath
? fs.readFile(fileNode.absolutePath, `binary`)
: fallback(fileNode)
}
async function onCreateNode(
... |
var base = require( '../ProducerBase.js' );
var OAuth2 = require("oauth").OAuth2;
function FacebookUserPhotosProducer(fetcher) {
this.fetcher = fetcher;
base.init(this);
}
base.inherit(FacebookUserPhotosProducer);
FacebookUserPhotosProducer.prototype.getMatchPatterns = function() {
return [ '^acct:facebook:[0-... |
import React from "react"
let stylesStr
if (process.env.NODE_ENV === `production`) {
try {
stylesStr = require(`!raw-loader!../public/styles.css`)
} catch (e) {
console.log(e)
}
}
class HTML extends React.Component {
render() {
let css
if (process.env.NODE_ENV === `production`) {
css = (... |
describe('acoustics.services', function () {
beforeEach(module('sokratik.atelier.acoustics.services'));
var acoustics, rootScope, q;
beforeEach(inject(function ($q) {
q = $q;
}));
beforeEach(inject(function($window){
$window.fakeNavigator = {
mockGetUserMedia: fakeGetUser... |
'use strict';
/**
* @ngdoc function
* @name publicApp.controller:ProjectsCtrl
* @description
* # ProjectsCtrl
* Controller of the publicApp
*/
angular.module('publicApp')
.controller('ProjectsCtrl', ['$scope', '$routeParams', '$http', function ($scope, $routeParams, $http) {
var sParams = ($routeParams.pro... |
function Tw2Track()
{
this.trackRes = null;
this.bone = null;
}
function Tw2TrackGroup()
{
this.trackGroupRes = null;
this.model = null;
this.transformTracks = [];
}
function Tw2Animation()
{
this.animationRes = null;
this.time = 0;
this.timeScale = 1.0;
this.cycle = false;
thi... |
/*!
* dependsOn v${version}
* a jQuery plugin to facilitate the handling of form field dependencies.
*
* Copyright 2016 David Street
* Licensed under the MIT license.
*/
var SubjectController = require('./subject-controller')
/**
* Plugin access point.
* @param {Object} initialSet An object of key-value pairs... |
var community_gps = require('../community_gps.js');
var community = require('../community.js');
var community_price = require('../community_price.js');
var geoURL = "http://suzhou.anjuke.com/ajax/geomap/";
var table = "suzhou_anjuke_community";
var tableMonth = "suzhou_anjuke_month";
var community_url = "http://suzhou... |
/* global window */
// Run ticktockman in the browser.
// Assume window.sampleData is defined.
var app = require("./app.js");
app.setup();
app.loadData(window.sampleData);
|
import UJumbotron from './UJumbotron.js'
export {
UJumbotron
}
|
module.exports = {
appName: 'Cfail',
email_to_console: false,
paths: {
public: process.cwd() + (process.env.PUBLIC_DIR || '/.tmp/public')
},
staticBase: process.env.STATIC_BASE
}; |
/*!
* froala_editor v4.0.2 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2021 Froala Labs
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('froala-editor')) :
typeof define === 'function... |
'use strict';
angular.module('myApp.purple', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/purple', {
templateUrl: 'purple/purple.html',
controller: 'PurpleCtrl'
});
}])
.controller('PurpleCtrl', [
'$scope',
'$css',
function($scope, $css) {
$css.removeAl... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'iframe', 'mk', {
border: 'Show frame border', // MISSING
noUrl: 'Please type the iframe URL', // MISSING
scrolling: 'Enable scrollbars', //... |
exports.printMsg = function() {
console.log("more and more");
}
|
import React from 'react'
import * as editorActions from '../../actions/editor'
export default class EditorTabs extends React.Component {
render() {
const openedFiles = this.props.openedFiles.map((file) => {
const style = {width: `${100 / this.props.openedFiles.length}%`}
const c... |
var assert = require('assert')
, net = require('net')
, tcpghost = require('../tcpghost')
;
describe('The tcpghost module', function() {
it('should just work', function(done) {
var real_rx = [];
var ghost_rx = [];
var real = net.createServer(function(sock) {
real_rx.push({connected:{uri:uri... |
var extend = require('../../extend'),
async = require('async'),
fs = require('graceful-fs'),
term = require('term'),
util = require('../../util'),
file = util.file,
spawn = util.spawn,
config = hexo.config.deploy;
extend.deployer.register('github', function(args, callback){
if (!config.repository || !c... |
angular.module('barsOfGold')
.controller('AccountListController',['$scope','$rootScope','$modal','$log',function($scope,$rootScope,$modal,$log){
// var ModalInstanceCtrl = function($scope,$modalInstance){
// // Please note that $modalInstance represents a modal window (instance) dependency.
// // It is not the same ... |
var Delta = require('../dist/Delta');
var Op = require('../dist/Delta').Op;
describe('Op', () => {
describe('length()', () => {
it('delete', () => {
expect(Op.length({ delete: 5 })).toEqual(5);
});
it('retain', () => {
expect(Op.length({ retain: 2 })).toEqual(2);
});
it('insert text... |
var fs = require('fs');
var lodash = require('lodash');
var path = './build';
function compile(path, cb){
var i = 0;
var alltunes = [];
fs.readdir(path, function(err, files){
if (err) return cb(err);
files.forEach(function(file){
var filepath = path + '/' + file;
fs.readFile(filepath, functio... |
import {getEl, extend} from '../utils/utils';
export default class TutorialStep {
constructor($el, message){
this.$el = getEl($el)
this.message = message;
}
highlightEl(){
this.addPlaceholder(this.$el);
Object.assign(this.$el.style, {position:'absolute', zIndex:'30'});
}
addPlaceholder($el){
co... |
import React from 'react';
import PostImageResp from '../components/story/PostImageResp';
import TwoPostImageResp from '../components/story/TwoPostImageResp';
import FullImageResp from '../components/story/FullImageResp';
import StoryPage from '../components/story/StoryPage';
import StoryTextBlock from '../components/s... |
import React from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { withPrefix } from 'gatsby';
import striptags from 'striptags';
function toSentence(arr) {
return arr.join(', ').replace(/,\s([^,]+)$/, ' and $1');
}
function stripNewLines(someText) {
return someText.rep... |
export const ENABLE = 'PREVENT_DOUBLE_CLICK::ENABLE';
export const DISABLE = 'PREVENT_DOUBLE_CLICK::DISABLE';
|
/* jshint expr:true */
import {
describe,
it,
beforeEach,
afterEach
} from 'mocha';
import {expect} from 'chai';
import startApp from '../../helpers/start-app';
import destroyApp from '../../helpers/destroy-app';
import {invalidateSession, authenticateSession} from 'ghost-admin/tests/helpers/ember-simpl... |
// stats.js r8 - http://github.com/mrdoob/stats.js
const Stats = function(){var h,a,n=0,o=0,i=Date.now(),u=i,p=i,l=0,q=1E3,r=0,e,j,f,b=[[16,16,48],[0,255,255]],m=0,s=1E3,t=0,d,k,g,c=[[16,48,16],[0,255,0]];h=document.createElement("div");h.style.cursor="pointer";h.style.width="80px";h.style.opacity="0.9";h.style.zIndex=... |
KJing.ResourceViewer.extend('KJing.FileViewer', {
text: undefined,
downloadButton: undefined,
constructor: function(config) {
var vbox = new Ui.VBox({ verticalAlign: 'center', horizontalAlign: 'center', spacing: 10 });
this.setContent(vbox);
vbox.append(new Ui.Icon({ icon: 'file', width: 128, height: 128, ... |
'use strict';
//Start by defining the main module and adding the module dependencies
angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);
// Setting HTML5 Location Mode
angular.module(ApplicationConfiguration.applicationModuleName).config(['$loc... |
function FPSManager(pubsub) {
this.pubsub = pubsub;
pubsub.on("sprites_loaded_from_server", this.sprites_loaded_from_server.bind(this));
// this.start(); // TODO: don't start until after the sprite_loader finishes
}
FPSManager.prototype.sprites_loaded_from_server = function() {
requestAnimatio... |
const path = require("path");
// Helper functions
const ROOT = path.resolve(__dirname, "..");
exports.root = function root(args) {
args = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [ROOT].concat(args));
}
|
// @flow
import React from 'react'
import { shallow } from 'enzyme'
import MyComponent from '../Medium'
it('renders without crashing', () => {
shallow(<MyComponent />)
})
|
define([
'services/logger',
'plugins/dialog',
'services/unitofwork',
'viewmodels/utilities/investmentPlanEdit'
],
function (logger, dialog, unitofwork, investmentPlanEditViewModel) {
var command = function (viewmodel, afterCloseEditor) {
var self = this;
var cmd = ko.asyncCommand({
... |
var util = require('util')
, Constants = require('jsr-constants')
, AbstractCommand = require('jsr-exec').Command
, COMMAND_LIST = null;
/**
* Handler for the COMMAND command.
*/
function Command() {
AbstractCommand.apply(this, arguments);
}
util.inherits(Command, AbstractCommand);
/**
* Helper to lazil... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _LoadingModal = require('./LoadingModal');
var _LoadingModal2 = _interopRequireDefault(_LoadingModal);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = _LoadingModal2.def... |
"use strict";
let
_ = require('lodash'),
chai = require('chai')
,expect = chai.expect
;
let
jsodvcs = require("../../")
;
exports.spec = function(){
describe('Repository#commit(message, options)', function() {
context("when committing a blank index; no message; no options", function() {
... |
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [message])
test.deepEqual(actual, expected, [messag... |
import {Playerstats_Question} from 'questions/playerstats';
export class Most_Assists_Question extends Playerstats_Question {
constructor(http) {
super(http, 'A');
this.heading = 'Who got most assists during the 14/15 SHL regular season for Modo?';
}
}
|
VirtualKeyboard.addLayout({code:'KRI-SL'
,name:'Krio'
,normal:'`1234567890-=\\qwertyuiopɛɔasdfghjkl;\'zxcvbnm,./'
,shift:{0:'~!@#$%^&*()_+|',35:':"',44:'<>?'}
,alt:{0:'̀',4:'̱̣̌̂̇̆̑̄',24:'[]',36:'́'}
,shift_alt:{0:'̃',8:'̤',24:'{}',36:'̈'}
,dk:{'\\':'ɛ[Ɛ{ɔ]Ɔ}`̀\'́6̂~̃-̄9̆8̇"̈*̣:̤0̌_̱\\\\'}}); |
jQuery( document ).ready( function( jQuery ) {
});
|
import { EventEmitter, Events, Stage } from 'alien.js';
import { Global } from '../config/Global.js';
export class Socket extends EventEmitter {
constructor() {
super();
this.views = [];
// 0: USERS: EVENT_ID(UINT8), USER_ID(UINT8), NICKNAME(UINT8), REMOTE_ADDRESS(UINT32), LATENCY(UINT16)... |
version https://git-lfs.github.com/spec/v1
oid sha256:837406b1a7ea4bfc4db49e77d2de0c8113cefb7fef71c57acf29d98e5ebd6257
size 15217
|
import expect from 'expect'
import extractValues from '../src/extractValues'
import {fromJS} from 'immutable'
describe(`redux-uniform`, () => {
describe(`extractValues`, () => {
it(`should extract values from fields`, () => {
const fields = fromJS({
field1: {
... |
module.exports = function(error, request, response) {
if(typeof error === 'string') {
error = { message: error, errors: [] };
}
//setup an error response
response.message = JSON.stringify({
error: true,
message: error.message,
validation: error.errors || [] });
//trigger that a response has been made... |
require("requirish")._(module);
var _ = require("underscore");
var should = require("should");
import ServerEngine from "lib/server/ServerEngine";
import DataValue from "lib/datamodel/DataValue";
var Variant = require("lib/datamodel/variant").Variant;
var DataType = require("lib/datamodel/variant").DataType;
import No... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
//= require tjadmin/ace-extra
//= require tjadmin/bootstrap
//= require tjadmin/ace-elements
//= require tjadmin/ace |
/* global describe, before, it */
'use strict';
import {assert, test as helpers} from 'yeoman-generator';
import {EOL} from 'os';
import {join} from 'path';
import sinon from 'sinon';
let coffeeDeps, es2015Deps, jadeDeps, hamlDeps, lessDeps, scssDeps, stylusDeps, typescriptDeps;
coffeeDeps = [
'"coffee-script":',
... |
describe("About Functions", function() {
it("should declare functions", function() {
function add(a, b) {
return a + b;
}
expect(add(1, 2)).toBe(3);
});
it("should know internal variables override outer variables", function () {
var message = "Outer";
function getMessage() {
r... |
/**
* @file Unitcell
* @author Alexander Rose <alexander.rose@weirdbyte.de>
* @private
*/
import { Color, Vector3, Matrix4 } from '../../lib/three.es6.js'
import { defaults } from '../utils.js'
import { degToRad } from '../math/math-utils.js'
import {
uniformArray, uniformArray3, centerArray3
} from '../math/ar... |
require(['common'], function () {
/*require(['Config', 'ErrorReporter', 'GA', 'Sugar'], function (Config, ErrorReporter, GA) {
require.config({
config: {
i18n: {
locale: Config().locale.toLowerCase() /!* TODO: change to your app's way of getting the locale *!... |
/*! Textbox Revision Tracker - v0.1.0 - 2015-11-15
* https://github.com/jonmbake/textbox-revision-tracker
* Copyright (c) 2015 Jon Bake; Licensed MIT */
(function($) {
/**
* Revision Tracker Base Class.
* @constructor
* @param {[type]} $el jqeury element to attach revision tracker to
* @param {[type]}... |
/**
* Created by 64945 on 2015/8/17.
*/
//$(document).ready(function(){
// $(document).off('click.bs.dropdown.data-api'); //�ر�dropdown�ĵ���¼�
//});
//$(document).ready(function(){
// dropdownOpen();//����
//});
//
///***��껮��չ���Ӳ˵�������Ҫ�������չ��***/
//function dropdownOpen() {
// $('.dropdown').mouseov... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
// Generated by CoffeeScript 1.3.3
(function() {
var codeCur, codeListCur, componentCur, conceptCur, conceptSchemeCur, dataStructureCur, dimensionPos, entryActions, exitActions, guards, header, sdmx, util, _;
_ = require('underscore');
header = require('./header');
sdmx = require('../../pipe/sdmxPipe');
u... |
var LocalStoragePersister = function() {
var timeUtil;
var recordFormatter;
var init = function() {
timeUtil = new TimeUtil();
recordFormatter = new LocalStorageRecordFormatter();
};
init();
return {
fetch:function(dateStr) {
try {
var result = localStorage.getItem(dateStr);
... |
(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... |
import fs from 'fs';
import path from 'path';
import * as Utils from './utils';
import Halyard from '../../src/halyard';
const halyard = new Halyard();
const carmakersPath = path.join(__dirname, '../../examples/data/carmakers.json');
halyard.addTable(carmakersPath, 'Car Makers');
describe('Enigma Mixin', () => {
i... |
import { combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';
import { reducer as formReducer } from 'redux-form';
import signUp from './signUp';
import login from './login';
import book from './book';
import favorites from './favorites';
import profile from './profile';
import borrowRequ... |
var Lab = require('../lib');
var suite = Lab.experiment;
var test = Lab.test;
var expect = Lab.expect;
var before = Lab.before;
var after = Lab.after;
suite('math', function () {
test('returns true when 1 + 1 equals 2', function (done) {
expect(1+1).to.equal(2);
done();
});
});
|
import sinon from 'sinon';
const Installer = sinon.stub();
Installer.stubbedOvservable = {
subscribe: sinon.stub(),
toPromise: sinon.stub().resolves(),
};
Installer.prototype.install = sinon.stub().returns(Installer.stubbedOvservable);
export default Installer;
|
function eat(food){
return food + ' tasted really good.';
}
console.log(eat('bananas')); |
import { GraphQLObjectType, GraphQLString, GraphQLInt, GraphQLList, GraphQLNonNull } from "graphql";
import ErrorType from "./error";
import UserType from "./user";
import { api, normalizeErrors } from '../helpers';
import typeFactory from '../types/factory';
export const fields = {
id: {
type: GraphQLInt,
d... |
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('netcat.html', {
'bounds': {
'width': 320,
'height': 480
}
});
}); |
/**
* phant-stream-csv
* https://github.com/sparkfun/phant-stream-csv
*
* Copyright (c) 2014 SparkFun Electronics
* Licensed under the GPL v3 license.
*/
'use strict';
/**** Module dependencies ****/
var stream = require('stream'),
util = require('util');
/**** Make Writable a writable stream ****/
util.in... |
/* global describe, it, sinon */
describe('OptionsModel', function () {
var OptionsModel = $.require('OptionsModel')
it('should store refresh interval', function () {
var model = new OptionsModel()
model.setRefreshInterval(1000)
model.getRefreshInterval().should.equal(1000)
})
it('should publish @... |
(function () {
'use strict';
angular
.module('articles')
.controller('ArticlesController', ArticlesController);
ArticlesController.$inject = ['$scope', '$state', '$timeout', 'articleResolve', 'Authentication', 'Socket'];
function ArticlesController($scope, $state, $timeout, article, Authentication, S... |
var minifyInline = require('gulp-minify-inline');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync');
var imagemin = require('gulp-imagemin');
var stylus = require('gulp-stylus');
var locals = require('./locals');
var jade = require('gulp-jade');
var umd = require('gulp-umd');
va... |
/*!
* bio-grids.js
* Kevin English, University of Hawaii
*/
Ext.bio.SeqSearchField = Ext.extend(Ext.form.TwinTriggerField, {
initComponent : function(){
Ext.bio.SeqSearchField.superclass.initComponent.call(this);
this.on('specialkey', function(f, e){
if(e.getKey() == e.ENTER){
this.onTrigger2... |
// Backbone.js 0.9.10
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function(){
// Initial Setup
// -------------
// Save a reference to the global object (`w... |
import {inject} from 'aurelia-dependency-injection';
import { Router } from 'aurelia-router';
import OrganizationService from 'resources/services/organization-service';
import OrganizationModel from 'resources/models/organization-model';
import WardenService from 'resources/services/warden-service'
import WardenModel f... |
"use strict";
const FieldEditor = require('../FieldEditor');
class DateFieldEditor extends FieldEditor {
static createData(params) {
return {
'@class': 'DateField',
'@attributes': Object.assign(Object.assign({}, FieldEditor.createAttributes(params)), { readOnly: params.readOnly ? par... |
/**
** VCF - Parser for the vcard format.
**
** This is purely a vCard 4.0 implementation, as described in RFC 6350.
**
** The generated VCard object roughly corresponds to the JSON representation
** of a hCard, as described here: http://microformats.org/wiki/jcard
** (Retrieved May 17, 2012)
**
**/
var VCF;
... |
var path = require( 'path' );
var gulp = require( 'gulp' );
var gutil = require( 'gulp-util' );
var webpack = require( 'webpack' );
var gulpWebpack = require( 'gulp-webpack' );
var WebpackDevServer = require( 'webpack-dev-server' );
// var stylus = require( 'gulp-stylus' );
var clean = require( 'gulp-clean' );
var runS... |
'use strict';
const readFile = require('fs').readFileSync;
const writeFile = require('fs').writeFileSync;
const pathJoin = require('path').join;
const defaults = require('lodash/defaultsDeep');
const DEFAULT_OPTIONS = require('./default-options');
const inputWithConfirmation = require('./utils/inquires').inputWithConf... |
'use strict';
let map = [
[ , , ,0,0,0,0],
[ , ,0,0,0,0,0],
[ ,0,0,0,0,0,0],
[0,0,0,0,0,0,0],
[0,0,0,0,0,0 ],
[0,0,0,0,0 ],
[0,0,0,0 ],
].reduce((map, row, r) => {
for (let q = 0; q < row.length; q++) {
if (row[q] == null) continue;
map.push({ r, q });
}
return map;
}, []);... |
$(document).ready(function(){
$("#horizontal-slider").change(function() {
var slider = $('#horizontal-slider')
var col = $('.col-xs-1')
var horizontal = new Array(eval(slider.val()))
col.attr('ng-repeat', horizontal)
console.log("horizontal " + slider.val());
con... |
// Just return a value to define the module export.
// This example returns an object, but the module
// can return a function as the exported value.
return gamesense;
}));
|
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","topic_0000000000000C16.html"],['3072',"Tlece.Recruitment.Services.Recruitment Namespace","topic_0000000000000AE0.html"],['3117',"QuestionVideoService Class","topic_0000000000000B07.html"],['3124',"Methods","topic_0000000000000B07_methods--.html"]]... |
function PlayerObjectDB() {
var db = new PouchDB(StaticValues.playerObjectURL);
this.createPlayerObject = function(playerName, playerImage) {
var playerObject = {
_id: general.getCookie("username") + '.playerObj:' + playerName,
userId: 'org.couchdb.user:' + general.getCookie("username"),
name... |
import io from 'socket.io-client';
import store from '../store';
import { getRoomsSuccess, createRoomSuccess } from '../actions/room-actions';
// remove unnecessary imports
import { updateChatSuccess } from '../actions/chat-actions';
import { setUserIdSuccess } from '../actions/user-actions';
import { loadInitialState ... |
import path from 'path';
let __root = (dir) => path.join(path.dirname(__dirname), dir);
export default Object.assign(require('../package.json'), {
name: "I站",
path: {
client: __root('client'),
server: __root('server'),
static: [
{
path: __root('clien... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Channel = new Schema({
clientId : String,
pubChannels : [String],
subChannels : [String]
});
Channel.methods = {
addPubChannel : function(channel, cb){
if(!channel)
cb(new Error("No channel provided"));
else {
this.pubCh... |
const path = require("path");
module.exports = {
// TODO - Source map
entry: path.resolve(process.cwd(), "app/main.jsx"),
output: {
path: path.resolve(process.cwd(), "app/bundle.js")
},
devServer: {
inline: true,
contentBase: path.resolve(process.cwd(), "app"),
port: 9732
},
module: {
... |
import React from 'react'
import { render } from 'react-dom'
import { BrowserRouter, Match } from 'react-router'
import { Provider } from 'react-redux'
import store from './store'
import Landing from './Landing'
import Search from './Search'
import Details from './Details'
import preload from '../public/data.json'
impo... |
import {Test} from '../src/index';
describe('test', function () {
it('returns 7', function () {
let t = new Test();
expect(t.go()).toBe(7);
});
});
|
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var mongoURL = "mongodb://localhost:27017/locatec";
mongoose.connect(mongoURL, function(error){
if (error) {
throw error; return;
}
console.log("...Conexión a DB")
})
var posibles_tipos = ["utiles","ropa","trastes","otros"];
var objeto_schem... |
define([], function() {
return function() {
return [{
action: "editor-save",
iconClass: "save",
text: "Save<br/><code>Ctrl + S</code>",
addons: "disabled",
doNotShow: true,
className: 'header__tab__button-pane__b... |
// Generated by CoffeeScript 1.7.1
(function() {
var extend,
__slice = [].slice,
__hasProp = {}.hasOwnProperty;
extend = exports.extend = function() {
var key, nextIterationSources, source, sources, target, val;
target = arguments[0], sources = 2 <= arguments.length ? __slice.call(arguments, 1) : [... |
'use strict';
$(document).ready(function () {
$(window).on('action:app.load', function () {
require(['composer/drafts'], function (drafts) {
drafts.loadOpen();
});
});
$(window).on('action:composer.topic.new', function (ev, data) {
if (config['composer-default'].composeRouteEnabled !== 'on') {
require(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.