code
stringlengths
2
1.05M
function extend(child, super) { for (var property in super.prototype) { if (typeof child.prototype[property] == "undefined") child.prototype[property] = new super.prototype[property]; } return child; };
'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...
// server injected code /* Debug info: {"server":"WEB519","utc_time":"2016-04-04T20:05:03.641Z","src_ip":"192.204.11.162","method":"HTTPS","api_key":"2_fq_ZOJSR4xNZtv2rA8DALl1Gxp7yTYMb3UdER6zerupB55mwkzh9pVBz4Blzi8SW","site_found":true} */ if (typeof gigya == 'undefined' || !gigya.isGigya) { gigya = { isGigya: true } }...
// Read the Docs // http://readthedocs.org/ // Searching as the user types. (function(){ // Save a reference to the global object. var root = this; // Global Search object on which public functions can be added var Search; Search = root.Search = {}; // for instituting a delay between keypresses ...
import * as types from './actionTypes'; export function addNote(newNote) { return { type: types.ADD_NOTE, newNote }; } export function deleteNote(id) { return { type: types.DELETE_NOTE, id }; } export function updateNote(updatedNote) { return { type: types.UPDATE_NOTE, updatedNote }; } export function getNot...
(function (module) { 'use strict'; module.service("Dialog", dialogService); module.constant("dialogMap", dialogMap()); function dialogMap() { return { 'product-details': { controller: 'ProductDetailsController', templateUrl: '/views/widgets/product-d...
"use strict"; const ID = require("./ID.js"); class Finger{ constructor(node, index){ this.node = node; this.start = node.id.add(ID.powerOfTwoBuffer(index)); } } module.exports = Finger;
var $$ = React.createElement; var Substance = require("substance"); var Scrollbar = require("./scrollbar"); var _ = require("substance/helpers"); var PanelMixin = require("./panel_mixin"); var ContentPanelMixin = _.extend({}, PanelMixin, { contextTypes: { app: React.PropTypes.object.isRequired, componentFac...
'use strict'; /* jshint maxstatements: 30 */ var chai = require('chai'); var should = chai.should(); var expect = chai.expect; var bitcore = require('..'); var PublicKey = bitcore.PublicKey; var Address = bitcore.Address; var Script = bitcore.Script; var Networks = bitcore.Networks; var validbase58 = require('./dat...
import $ from "jquery"; import _ from "underscore"; import "bootstrap"; import "jquery-deparam"; import "./configure_datatables"; import View from "../view"; import Cache from "../cache"; import ColumnManager from "./column_manager"; import SelectionManager from "./selection_manager"; import LockManager from "./lock...
var s = document.createElement('script'); s.src = chrome.extension.getURL('flourish.js'); s.onload = function() { this.parentNode.removeChild(this); }; (document.head||document.documentElement).appendChild(s);
import PropTypes from 'prop-types'; import Element from './Element'; export default class Rect extends Element { static displayName = 'Rect'; static propTypes = { x: PropTypes.oneOfType([PropTypes.func, PropTypes.number]), y: PropTypes.oneOfType([PropTypes.func, PropTypes.number]), height: PropTypes...
'use strict'; // var Boom = require('boom'); var BPromise = require('bluebird'); module.exports = function (handler) { return function (req, res) { return new BPromise(function (resolve) { resolve(handler(req, res)); }) .then(function (response) { if (response === undefined) { // [...
(function() { if (typeof module === "undefined") self.queue = queue; else module.exports = queue; queue.version = "1.0.1"; function queue(parallelism) { var queue = {}, active = 0, // number of in-flight deferrals remaining = 0, // number of deferrals remaining head, tail, // singl...
/*globals define, WebGMEGlobal, requirejs*/ /*jshint browser: true*/ /** * @author rkereskenyi / https://github.com/rkereskenyi * @author lattmann / https://github.com/lattmann * @author pmeijer / https://github.com/pmeijer */ define([ 'common/core/coreQ', 'plugin/PluginManagerBase', 'plugin/PluginRes...
module.exports = function (grunt) { 'use strict'; // Project configuration. grunt.initConfig({ jshint: { options: { "expr": true, "laxcomma": true, "smarttabs": true, "curly": true, "eqeqeq": false, ...
/*! CSSLint Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ri...
const exec = require('child_process').exec; module.exports = { onLivingRoomLightOn, onLivingRoomLightOff, }; function onLivingRoomLightOn() { return exec(`sudo ${__dirname}/../../lib/scripts/Emetteur 3 ${__dirname}/../../lib/actions/livingRoom/LightOn.csv`, (error, stdout, stderr) => { if (error) ...
import {StyleSheet} from 'react-native' const styles = StyleSheet.create({ container: { flex: 1 } }) export default styles
/* eslint-disable */ () => { const filterOptions = [ { id: 'In Stock, Out Of Stock', value: 'In Stock, Out Of Stock' }, { id: 'In Stock', value: 'In Stock' }, { id: 'Out Of Stock', value: 'Out Of Stock' }, ]; const [activeFilter, setActiveFilter] = React.useState(filterOptions[0].id); const [searc...
module.exports = { test: { src: [ 'test/vendor/assert.js', 'test/test-adapter.js', 'transpiled/tests.cjs.js' ], options: { reporter: 'spec' } } };
import { Map } from 'immutable'; const BLOCK_MAP = Map({ 'header-one': { element: 'h1', }, 'header-two': { element: 'h2', }, 'header-three': { element: 'h3', }, 'header-four': { element: 'h4', }, 'header-five': { element: 'h5', }, 'header-six': { element: 'h6', }, bloc...
var _base = require('./bog.domain.repositories._base.js'); var StatusDataRepo = require('../../data/repositories/bog.data.repositories.status'); var StatusRepository = function (current_user) { var self = this; var user = current_user; // Return All Items var All = function (callback) { var d...
/* */ "format cjs"; ; (function(factory) { var objectTypes = { 'function': true, 'object': true }; function checkGlobal(value) { return (value && value.Object === Object) ? value : null; } var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; var free...
var utils = { handleError: function(dataToLogToConsole, errorMessage, errorObj) { console.log(dataToLogToConsole || errorMessage); if (errorMessage) { var alertMessage = errorMessage; // if error object is passed, then append error message in the error object if (errorObj && errorObj.hasOwnP...
(function($){ $(function(){ triggerNavigation(); triggerScrollTop(); triggerTooltips(); initMQ(); }); function autoplayVideo(video, autoplay) { autoplay = autoplay || false; var $carousel = $('.carousel'); $carousel.on('slide.bs.carousel', function(e)...
module.exports = MnInputCustomElement() function MnInputCustomElement() { const supportsCustomElements = 'customElements' in window if (!supportsCustomElements) { require('@webcomponents/custom-elements') } if (!window.customElements.get('mn-input')) { window.customElements.define('mn-input', require...
( function () { 'use strict'; function isPlainObject(stuff) { if ( typeof stuff !== 'object' || stuff === null // Не объект || stuff === stuff.window // window || stuff.nodeType // DOM node || !stuff.constructor || !stuff.constructor.prototype.hasOwnProperty('isPrototypeOf'...
global.SETTINGS = require('./settings'); global.log = require('./lib/log'); let app = require('./lib/server'); app.listen(SETTINGS.PORT, () => { log.info(`#server Listening on port ${SETTINGS.PORT}`); });
define(['underscore', 'util', 'collection/abstract'], function(_, Util, AbstractCollection) { 'use strict'; var _parent = AbstractCollection.prototype; var ArrayCollection = Util.extend(AbstractCollection, { _registry: null, create: function() { va...
(function(global) { var LiteGraph = global.LiteGraph; function GamepadInput() { this.addOutput("left_x_axis", "number"); this.addOutput("left_y_axis", "number"); this.addOutput("button_pressed", LiteGraph.EVENT); this.properties = { gamepad_index: 0, threshold: 0.1 }; ...
var ViewportContainers = function ( editor ) { var container = new UI.Panel(); container.setId( 'ViewportContainers' ); return container; };
import view from './views/home' export { view }
/* * Copyright (c) 2015 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com) * * sisane: The stunning micro-library that helps you to develop easily * AJAX web applications by using Angular.js 1.x & sisane-server * sisane is distributed under the MIT License (MIT) * Sources at https://github.com...
// Copyright (c) 2015 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
module.exports = { _id: '5731eb718dc033bc69d9660f', email: 'register_user@test.com', name: 'New Test User', password: '09a3fcee233197960eb1bafe82e20021ad2807e8b12c79e9822ba0d5addfdcb7f786a365b2e8de0419f24cf671f2bd8bac9e6aacd5ff5bece1e5e7346fc19c1741e0286659e39577aaa4a6fd4fe0eab30b95d4437f3821838e27f311bda42a70a...
//you will need an API key from https://developer.voicesignin.com var https = require('https'); exports.handler = (event, context, callback) => { const crypto = require('crypto'); const hash = crypto.createHash('sha256'); console.log(JSON.stringify(event)); configureParams(); //validate inp...
const path = require('path'); const nodeExternals = require('webpack-node-externals'); // 외부 Node.js 모듈들을 포함하지 않기 위해 로드. const WebpackShellPlugin = require('webpack-shell-plugin'); const OutputFileName = 'aether.agent.package.js'; var serverCfg = { context: path.resolve(__dirname, 'src'), entry: './app.js', target:...
com.chanjet.gzq.aflow.Canvas = draw2d.Canvas.extend({ canvasName: "com.chanjet.gzq.aflow.Canvas", init: function(id){ this._super(id); this.setScrollArea("#"+id); this.id = id; var MyInterceptorPolicy = draw2d.policy.canvas.ConnectionInterceptorPolicy.extend({ init : function() { this._super(); ...
import explicitElementToString from './elementToString'; import * as util from './util'; /** * converts an explicit dataSet to a javascript object * @param dataSet * @param options */ export default function explicitDataSetToJS (dataSet, options) { if (dataSet === undefined) { throw 'dicomParser.explicitData...
'use strict'; var _ = require('lodash'); var Bacon = require('baconjs'); var logger = require('./logger'); var bus = new Bacon.Bus(); var dirtyStores = []; var dispatching = false; function dispatch(type, payload) { if (dispatching) { return Promise.reject('Cascading dispatches are prohibited. Fix your flux.')...
import * as React from 'react'; // import of a small, pure module in a private demo // bundle size and module duplication is negligible /* eslint-disable-next-line no-restricted-imports */ import { convertLength } from '@mui/material/styles/cssUtils'; import { createTheme, responsiveFontSizes } from '@mui/material/styl...
import Mirage from 'ember-cli-mirage'; import Schema from 'ember-cli-mirage/orm/schema'; import Model from 'ember-cli-mirage/orm/model'; import Db from 'ember-cli-mirage/db'; export default { setup() { let db = new Db(); this.schema = new Schema(db); this.schema.registerModels({ wordSmith: Model.e...
define([ 'webgl/createProgram', 'webgl/shader/compileShaderFromFile' ], function( createProgram, compileShaderFromFile ) { /** * Creates a program from 2 script tags. * * @param {!WebGLRenderingContext} gl The WebGL Context. * @param {string} vertexShaderFileName The file name of the vertex shader. * @pa...
import styled from "styled-components" export const Code = styled.code` padding: 3px 8px; background-color: ${({ theme }) => theme.posts.inlineCodeBackground}; color: ${({ theme }) => theme.posts.inlineCodeColor}; border-radius: 6px; `
var searchData= [ ['textobject',['TextObject',['../class_oxy_1_1_framework_1_1_objects_1_1_text_object.html',1,'Oxy::Framework::Objects']]], ['textrenderer',['TextRenderer',['../class_oxy_1_1_framework_1_1_text_renderer.html',1,'Oxy::Framework']]], ['textrenderer',['TextRenderer',['../class_oxy_1_1_framework_1_1_...
'use strict'; angular.module('polaris.directives') .directive('spinner', [function() { function link(scope) { scope.$watch('disappear', function() { if (scope.disappear) { scope.hideSpinner = true; } else { scope.hideSpinner = false; } }); } var tp...
'use strict'; var should = require('chai').should(); describe('Cache', function(){ var Hexo = require('../../../lib/hexo'); var hexo = new Hexo(); var Cache = hexo.model('Cache'); it('_id - required', function(){ return Cache.insert({}).catch(function(err){ err.should.have.property('message', 'ID i...
class MenuController { constructor(translate) { this.languages = [{locale: 'es', name: 'Español'}, {locale: 'en', name: 'English'}]; this.translate = translate; this.loc = 'es'; } changeLocale(loc) { this.loc = loc || this.loc; this.translate.use(this.loc); } } MenuController.$inject = ['...
(function() { 'use strict'; var mergeModuleExports = require('../../utils/mergemoduleexports'); mergeModuleExports(module.exports, require('./loader')); mergeModuleExports(module.exports, require('./any')); })();
var Message = function() { this._data = { 'push_type': 1, 'android': { 'doings': 1 } }; return this; }; /* * Notification bar上显示的标题 * 必须 */ Message.prototype.title = function(title) { return this.setAndroid('notification_title', title); }; /* * Notification bar上显示的内容 * 必须 */ Message.p...
'use strict'; const periodic = require('periodicjs'); const capitalize = require('capitalize'); const pluralize = require('pluralize'); const reactappLocals = periodic.locals.extensions.get('periodicjs.ext.reactapp'); const reactapp = reactappLocals.reactapp(); function userRoleForm(options = {}) { const { e...
var Court = artifacts.require("./Court.sol"); contract('Court', (accounts) => { it("test kleroterion", () => {}) })
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { fetchWeather } from '../actions/index'; class SearchBar extends Component { constructor(props) { super(props); this.state = { term: '' }; this.onInputChange = this.onIn...
/** * 检查文件名后缀,判断是否为合法的日志文件 * * @param fileName 文件名字符串 * @returns {bool} 文件名是否合法,true 合法,false 非法 */ function isValidLogFile(fileName) { if(fileName === null || fileName === '') throw new Error('file name empty!'); return (lastValid = /.*\.slf$/.test(fileName)); } var lastValid = false; function wasLastFileN...
version https://git-lfs.github.com/spec/v1 oid sha256:9e6f79a284bf0e25e4a049856c97549792145e4af30916b5044b69d4779caae2 size 23494
/** * @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...
import { Meteor } from 'meteor/meteor' import { composeWithTracker } from 'react-komposer' import { Semesters, RegStatuses, Classrooms, Sessions, Categories, Classes, Terms } from '../../api/data/data' import CourseCreation from '../components/CourseCreation' import Loading from '../components/loading' const composer ...
define([ 'jquery', 'room-info', 'local-session', 'utils', 'connection', 'mode-list' ], function ($, roomInfo, localSession, Utils, connection, modeList) { "use strict"; /** * タブ単体の制御 * @param {String} viewerId * @param {String} tabId * @param {String} tabName */ var Tab = function (viewerId, tabId, tabName)...
/* Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'toolbar', 'zh', { toolbarCollapse: '摺疊工具列', toolbarExpand: '展開工具列', toolbarGroups: { document: '文件', clipboard: '...
/** @constructor */ Libraries.SyntaxHighlighter = function (){}; /** @type {Function} */ Libraries.SyntaxHighlighter.all; /** @type {Object} */ Libraries.SyntaxHighlighter.defaults; /** @type {Function} */ Libraries.SyntaxHighlighter.highlight; /** @type {Object} */ Libraries.SyntaxHighlighter.Highlighter; /** @type ...
 /** * @ngdoc controller * @name NavigationController * @function * * @description * Handles the section area of the app * * @param {navigationService} navigationService A reference to the navigationService */ function NavigationController($scope,$rootScope, $location, $log, navigationService, di...
import { remove, attempt, isError } from 'lodash'; import uuid from 'uuid/v4'; import { fileExtension } from 'Lib/pathHelper' import AuthenticationPage from './AuthenticationPage'; window.repoFiles = window.repoFiles || {}; function getFile(path) { const segments = path.split('/'); let obj = window.repoFiles; w...
import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import TutorialScreen from '../components/tutorialScreen'; import { toggleAutoplay, } from '../actions/audio'; import { tutorialPageDidChange, hideTutorial, } from '../actions/tutorial'; const mapStateToProps = (state) => { ...
/* Copyright Ben Trask and other contributors. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify...
// Karma configuration // Generated on Sat Jul 04 2015 21:07:22 GMT-0300 (BRT) 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 onLoaded() { var csInterface = new CSInterface(); var appName = csInterface.hostEnvironment.appName; if(appName != "FLPR"){ loadJSX(); } var appNames = ["PHXS"]; for (var i = 0; i < appNames.length; i++) { var name = appNames[i]; ...
/* First Roll 1 2 3 4 5 6 S 1 ! @ # $ % ^ e 2 & * ( ) - = c 3 + [ ] { } \ o 4 | ` ; : ' " n 5 < > / ? . , d 6 ~ _ 3 5 7 9 */ var special = { 11: "!", 12: "&", 13: "+", 14: "|", 15: "<", 16: "~", 21: "@...
import Ember from 'ember'; export default Ember.Component.extend({ hasErrors: Ember.computed.notEmpty('model.errors.[]') });
import fetch from '../api' import config from '../config' export const login = (source, token) => fetch( 'POST', `${config.API_URL}/login`, {}, false, {'X-Auth-Source': source, 'X-Auth-Token': token} )
var Taco = Taco || {}; Taco.Util = Taco.Util || {}; Taco.Util.HTML = Taco.Util.HTML || {}; Taco.Util.HTML.render = function(str, html) { html = (typeof html != 'undefined') ? html : false; return (html === true) ? str : Taco.Util.Str.htmlEntities(str); }; Taco.Util.HTML.attribs = function(attribs,...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { emailChanged, passwordChanged, signinUser } from '../core/actions'; import { Container, Content, Form, Item, Input, Grid, Col, Spinner, Toast, Icon, Button, Text } from 'native-base'; class Login extends Component { static n...
Miogen.require(['Component.BaseComponent', 'Component.Button'], function () { Miogen.define('Component.Toolbar', Miogen.Component.BaseComponent.extend({ construct: function (cfg) { this._super(cfg); }, build: function (cb) { var t = ...
/** * syntaxEnvironment.js * Andrea Tino - 2015 */ /** * Main collection point for types to be rendered. */ module.exports = function() { var tsClass = require('./class.js'); var tsInterface = require('./interface.js'); var tsEnum = require('./enum.js'); // Configuration: { classIds = [], interfaceIds ...
/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.plugins.setLang("specialchar","id",{euro:"Tanda Euro",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double quotation mark",rdqu...
;(function() { MozVisibility = { _MAX_TRIES: 10, _date: new Date, _tries: 0, _timer: null, _isVisible: undefined, _proxy: function(fn, context) { context = context || window; return function() { fn.apply(context, arguments); }; }, _getEvent: function() { if (!this._event) { ...
const { createCompileTsFilesTask, createDeleteDistFolderTask, createLintTsFilesTask, createRunIntegrationTestsTask, createRunUnitTestsTask, } = require("../tasks"); const {parallel, series} = require("gulp"); const failAfterError = true; exports.createBuildWorkflow = (moduleName) => series( ...
/* jQuery OSM field 2014 by Thomas netAction Schmidt for Sinnwerkstatt https://www.sinnwerkstatt.com/ MIT License */ (function ($) { $.fn.osmfield = function () { return this.each(function () { // Create HTML elements for osmfield var lang, map, marker, tile_url, ...
var path = require('path'); var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { devtool: 'source-map', entry: { app: './src/main.js' }, output: { filename: '[name].min.js', path:...
$(function () { $.widget("as24.qr", { _create: function () { var self = this; $(self.element).find('[data-description="QR-Code Generation"]').find("p").hide(); $(self.element).find('[data-generate="qr-code"]').click(function () { $(self.element).f...
(function () { 'use strict'; angular .module('app.web') .service('fileUpload', Service); Service.$inject = ['$http']; function Service($http) { this.uploadFile = uploadFile; //////////////// function uploadFile(file, url, done) { var fd = new FormD...
function util() { var self = this; if (typeof Object.beget !== 'function') { Object.beget = function (o) { var F = function () {}; F.prototype = o; return new F(); }; } }; exports.util = new util();
// Heavily influenced by Mike Bostock's Scatter Matrix example // http://mbostock.github.io/d3/talk/20111116/iris-splom.html // ScatterMatrix = function(url, data, dom_id) { this.__url = url; if (data === undefined || data === null) { this.__data = undefined; } else { this.__data = data; ...
const times = require('lodash/times'); const {GameEngine} = require('../../lib/common/engine'); const {R, G, B, _} = require('../../lib/common/panel-league/util'); module.exports.testAdd = ((test) => { const game = new GameEngine(); game.addEvent({ time: 0, type: 'addGarbage', slab: {x: 0, width: game...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function () { let root = arguments.length <= 0 || arguments[0] === undefined ? '.' : arguments[0]; let options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; root = (0, _path.nor...
'use strict'; /** * Home controller simply lists all the videos */ angular.module("nodeVideoCMS.videos").controller("VideosCtrl", function($scope, $routeParams, api){ var videosPerPage = 12, criteria; $scope.maxSize = 5; $scope.currentPage = 1; $scope.paginationVisible = false; if($routeParams && $r...
/* global window */ import React from 'react' import NProgress from 'nprogress' import PropTypes from 'prop-types' import { connect } from 'dva' import { Helmet } from 'react-helmet' import { withRouter } from 'dva/router' let lastHref const App = ({ children, dispatch, app, loading, location }) => { const href = w...
'use strict'; describe("Calling the fromTo-function of a moment", function(){ moment.period .add({name: 'fromTo15Minutes', count: 15, unit: 'minute'}) .add({name: 'fromTo1Month', count: 1, unit: 'month'}); it("should create an object with properties for from and to", function(){ expect...
(function() { 'use strict'; angular.module('journal.component.editor') .service('EditorService', ['$http', 'AuthService', 'CONFIG', EditorService]); function EditorService($http, AuthService, CONFIG) { this.apiUrl = CONFIG.API_URL; this.checkSlug = function(title, id) { ...
/*global module, process*/ /*eslint no-use-before-define:0 */ var webpack = require('webpack'); var webpackDevServer = require('webpack-dev-server'); var path = require('path'); // Support for extra commandline arguments var argv = require('optimist') //--env=XXX: sets a global ENV variable (i.e. window.E...
var hello = function() { alert("My name is" name) };
var _ = require("lodash-node"); module.exports = function(client) { client.connect(function(err) { if(err) { return console.error('could not connect to postgres', err); } // 1. clear any previous migrations, db constraints will cascade on theme links and maplayers // var query = "DELET...
import React from 'react'; import _ from 'lodash'; import { FlatButton, RaisedButton } from 'material-ui'; const DialogStandardButtons = ({ handleCancel, handleConfirm, submitLabel = 'Confirm', cancelLabel = 'Cancel', inverted, disabled, submitDisabled, cancelDisabled, ...other }) => { const style...
var mongoose = require('mongoose'); var workLogSchema = mongoose.Schema({ startedAt: { type: Date, required: true, default: Date.now }, timeSpent: { type: Number, required: true, validate: [ function (value) { return value > 0; }, 'Time spent must be greater than zero.' ] }, ...
import React, {Component} from 'react' import {findDOMNode} from 'react-dom' import styles from '../sass/Form' import {Button, Form, Input, DatePicker, Select} from 'antd' class FormComponent extends Component { constructor() { super() this.handleSubmit = this.handleSubmit.bind(this) } handleSubmit(e)...
/** * Core dependencies. */ var path = require('path'); var dirname = path.dirname; /** * Create path. * * @param {String} pattern * @returns {Object} * @api private */ function createPattern(pattern) { return { pattern: pattern, included: true, served: true, watched: false }; } /** * I...
/* * This class represent a game paddle */ 'use strict'; import Vector from 'Vector.js'; export default class { constructor(x, y, width, height, color = '#FFFFFF', speed = 3) { this.width = width; this.height = height; this.color = color; this.position = new Vector(x, y); this.velocity = new ...
// // resourcetiming-decompression.js // // Decompresses ResourceTiming data compressed via resourcetiming-compression.js. // // See http://nicj.net/compressing-resourcetiming/ // // https://github.com/nicjansma/resourcetiming-compression.js // (function(window) { "use strict"; // save old ResourceTimingDecomp...
var through = require('through2'); var escapeStr = require('js-string-escape'); var STYLE_HEADER = '!function(){var a="'; var STYLE_FOOTER = '",b=document.createElement("style");b.type="text/css",b.styleSheet?b.styleSheet.cssText=a:b.appendChild(document.createTextNode(a)),(document.head||document.getElementsByTagNa...
var angular = require('angular'); // import the hello UI component require('./hello/main'); // compose the app and the routes module.exports = angular .module('myApp', [ 'ngRoute', 'hello' ]) .config([ '$routeProvider', function ($routeProvider) { $routeProvider.when( '/', { templateUrl: 'app/hell...