code
stringlengths
2
1.05M
/** * Created by mugen on 6/14/16. */ export class Pipe { constructor (handler, stream) { this.handler = handler; this.stream = stream; this.state = 1; } carry (data) { if (this.state === 1) { this.handler(data); } return !!this.state; } open () { this.state = 1; } close () { this.state ...
'use strict' module.exports = require('quiver-util/tape')
jQuery(document).ready(function($) { MenuDragDrop.init(); });
// @flow import * as React from 'react' import styled from 'styled-components' import { debounce } from 'lodash' import Slider from 'material-ui/Slider' import { FormattedMessage } from 'react-intl' import messages from './messages' export type Props = { setMinBookmarks: (value: number) => void, minBookmarks: numb...
/** * Created by chriswillingham on 2/6/14. */ var BaseView = Backbone.View.extend({ scope: {}, template: function(){ return '<h1>PLACEHOLDER</h1>'; }, initialize: function(){ }, getScope: function(){ return this.scope; }, render: function(){ // this.unrender()...
"use strict"; const ports = {}; chrome.runtime.onConnect.addListener(function(port) { ports[port.name] = port; port.onDisconnect.addListener(function() { delete ports[port.name]; ports[port.name] = null; }); }); const userMenu = chrome.contextMenus.create({ title: "このユーザーの投稿を全削除(はてなスペース)", id: "add...
function mandelbrot(x,y,scale,angle,iterations) { iterations=Math.min(15,Math.abs(iterations)); // use a single shader. // another implementation used one shaderi source per int(iterations), but Odroid XU4 crashed on that. On U3, it was fine. gl.mandelbrot = gl.mandelbrot || new Shader(null, '\ ...
/** * Angularjs Controller - Raptor.js * Generado automaticamente */ angular.module('ngPortalApp') .controller("config", function ($scope, $http, $mdToast) { $('[data-toggle="tooltip"]').tooltip(); $scope.databases={ 'postgres':{ name:"postgres", por...
'use strict'; angular.module('exampleApp', []) .controller('defaultCtrl', ['$scope', '$http', '$interval', '$timeout', '$log', function($scope, $http, $interval, $timeout, $log){ $scope.counter = 0; $scope.incrementCounter = function(){ $scope.counter++; $http.get('productData.json').then((resp)...
/*! test_admin 2015-12-02 */ "use strict";angular.module("ui.jp",["oc.lazyLoad","ui.load"]).value("uiJpConfig",{}).directive("uiJp",["uiJpConfig","MODULE_CONFIG","$ocLazyLoad","uiLoad","$timeout",function(a,b,c,d,e){return{restrict:"A",compile:function(c,f){var g=a&&a[f.uiJp];return function(a,c,f){function h(){var b=[...
/*! * Color Thief v2.0 * by Lokesh Dhakar - http://www.lokeshdhakar.com * * License * ------- * Creative Commons Attribution 2.5 License: * http://creativecommons.org/licenses/by/2.5/ * * Thanks * ------ * Nick Rabinowitz - For creating quantize.js. * John Schulz - For clean up and optimization. @JFSIII * ...
import React, {Component} from 'react'; import classNames from 'classnames'; import moment from 'moment'; import PropTypes from 'prop-types'; import {Container} from './container'; import {Content} from './content'; import {Icon} from './icon'; export class Post extends Component { render() { let { abstract, ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CADStatusMapModule = void 0; const _ = require("lodash"); const helpers_1 = require("../helpers"); async function CADStatusMapModule(mongoose) { const Schema = mongoose.Schema; const ToStatusIdSchema = (0, helpers_1.createSchem...
/////////////////////////////////////////////////////////////////////////////// // Plugin generador de tags // /////////////////////////////////////////////////////////////////////////////// $(document).ready(function () { "use strict"; var pluginName = "fwNotify...
version https://git-lfs.github.com/spec/v1 oid sha256:736231d29be12d4dd1757a9b78451cd52cf1b7cf3e81852d808a0b12f54589fb size 465
System.register(['./query-language/query-language'], function(exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function configure(aurelia) { aurelia.globalResources('./query-language/query-language'); } exports_1("configure", configure); var exportedNam...
/* * Case insensitive regexp compilation has bad performance behavior at * least up to Duktape 1.3.0. Basic test for that behavior. */ function test() { var i; var src = []; for (i = 0; i < 1e2; i++) { // Use a RegExp constructor call rather than a literal to ensure the // RegExp is co...
module.exports = { createRandomWord : function(length) { var consonants = 'bcdfghjklmnpqrstvwxyz', vowels = 'aeiou', rand = function(limit) { return Math.floor(Math.random() * limit); }, i, word = '', length = parseInt(length, 10), ...
const { assign } = require('lodash') const { readFileSync, writeFileSync } = require('fs') const DEFAULT_BOUNDS = { height: 800, width: 1024 } module.exports = configPath => { return { get (name) { let data = {} try { data = JSON.parse(readFileSync(configPath, 'utf8')) } catc...
var class_wanzyee_studio_1_1_extension_1_1_delegate_extension = [ [ "Notify", "class_wanzyee_studio_1_1_extension_1_1_delegate_extension.html#a5f5abc58b5018d592c9a7624eb90cba8", null ] ];
/** * Broadcast updates to client when the model changes */ 'use strict'; var game = require('./game.model'); exports.register = function(socket) { game.schema.post('save', function (doc) { onSave(socket, doc); }); game.schema.post('remove', function (doc) { onRemove(socket, doc); }); } function onS...
import memoize from 'lru-memoize'; import {createValidator, required, maxLength, atLeastOneValueMustBeChecked} from './validation'; var toyValidation = createValidator({ name: [required, maxLength(60)] }, {categories: [atLeastOneValueMustBeChecked]}); export default memoize(10)(toyValidation);
require('proof')(4, okay => { const DOMStringList = require('../living/generated/DOMStringList') const globalObject = {} DOMStringList.install(globalObject, [ 'Window' ]) const list = DOMStringList.create(globalObject, [], { array: [ 'a', 'b', 'c' ] }) okay(list.contains('b'), 'contains') okay...
/** * Created by Maurizio on 05/01/2017. */ $(function () { console.log("Modifica Statistiche Calciatore"); $("form.modifica_statistiche_calciatore").submit(modificaStatisticheHandler); }); function modificaStatisticheHandler(event) { event.preventDefault(); console.log("ModificaStatisticheCalciatore...
#!/usr/bin/env node var ottomatonBrowserPath = require.resolve('..'); // Inject browser actions into the otto context process.argv.splice(2, 0, ottomatonBrowserPath); require('ottomaton/lib/bin/otto');
var BandSpeed = BS = _ = (function($, exports) { //================================================================================ //====================================Variables=================================== //================================================================================ var request, t...
var element = { nome: 'Andsssersonsss', idade: 20 };
/** Address editable input. Internally value stored as {city: "Moscow", street: "Lenina", building: "15"} @class address @extends abstractinput @final @example <a href="#" id="address" data-type="address" data-pk="1">awesome</a> <script> $(function(){ $('#address').editable({ url: '/post', title: 'Enter ci...
function insertMealsPins(map, data){ var infowindows = new Array (); // creates an array to hold the info windows for each restaurant for (var i = data["meals"].length - 1; i >= 0; i--) { var pins, html, attendees, pinLatLng, pinMarkers, button; pins = data["meals"][i]; if (pins["restaurant"]["attend...
/** * Socket Configuration * * These configuration options provide transparent access to Sails' encapsulated * pubsub/socket server for complete customizability. * * For more information on using Sails with Sockets, check out: * http://sailsjs.org/#documentation */ module.exports.sockets = { // This custom ...
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var assets = require('connect-assets'); var routes = require('./routes/index'); var users = require...
const expect = require('chai').expect; const isLetter = require('../src/isLetter'); // 测试 describe('isLetter字母的测试集合', function() { // 'ABC' it('isLetter(\'ABC\') 等于 true', function() { expect(isLetter('ABC')).to.be.equal(true); }); // '' it('isLetter(\'\') 等于 false', function() { expect(isLetter(''...
module.exports = function(grunt){ grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), less: { development: { options: { compress: false, optimization: 2, ieCompat:true }, files: { "css/main.css": "less/main.less" // desti...
'use strict'; var tabject = require('../'); console.log(tabject(process, { maxValueLength: 100, excludeKeys: [ 'env' ] }));
import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, intlShape, defineMessages, FormattedMessage } from 'react-intl'; import Typography from '@material-ui/core/Typography'; import { languageLabel } from '../../../LanguageRegistry'; import SmoochBotMainMenuSection from './SmoochBotMainMenu...
/*! commands/site-settings.js */ var CP = CP || {}; CP.CommandList = CP.CommandList || []; (function (constants, util) { 'use strict'; var strings = constants.Strings, siteType = constants.SiteTypes; CP.CommandList = CP.CommandList.concat([ { command: strings.siteSettings + ': ' + strings.usersAndPermissi...
export default { food: { festivalMenuEmpty: 'Festival menu is empty for now. We will publish it later.' } }
import create from './index.tpl' import './index.styl' export default create({ props: { source: { type: Object, default: () => ({ html: '', javascript: '', css: '' }) }, defIndex: { type: Number, default: 0 } }, data() { return { la...
var casper = require('casper').create(); casper.start('http://casperjs.azurewebsites.net', function(){ this.waitForSelector('#countrySelect', function(){ this.echo(this.getTitle()); }); }); casper.then(function(){ this.waitUntilVisible('#countrySelect', function(){ this.clickLabel('Info','a'); ...
import * as topojson from 'topojson-client'; import reach from '../../constants/reach.js'; import utils from '../utils/index.js'; import sources from '../../constants/sources.js'; function sourceRoads({ map }) { return fetch(reach.ROADS) .then((response) => response.json()) .then((topo) => { const laye...
var User = require('../index'); var expect = require('chai').expect; var noop = require('101/noop'); var Model = require('../lib/models/base'); var Collection = require('../lib/collections/base'); var mockClient = { post: noop, patch: noop, del: noop }; var modelOpts = { client: mockClient }; function collectio...
const emojiFromWord = require("emoji-from-word") , countWordsArray = require("count-words-array") ; /** * emojiFromText * * @name emojiFromText * @function * @param {String} s The input text. * @param {Boolean} f If `true`, only the first object from array will be returned. * @return {Array} An array of...
const debug = require("debug")("ferreiro:setup:database"); const mongoose = require("mongoose"); const bluebird = require("bluebird"); const env = require("../env"); const mongoDB = env.DB_URI; module.exports = () => { //Set up default mongoose connection mongoose.Promise = bluebird; mongoose.connect( mongo...
const initialCode = ` // import const { createApp } = Frint; const { render, observe, streamProps } = FrintReact; const { createStore, combineReducers } = FrintStore; // constants const INCREMENT_COUNTER = 'INCREMENT_COUNTER'; const DECREMENT_COUNTER = 'DECREMENT_COUNTER'; // actions function incrementCounter() { r...
/** * Module dependencies. */ // var path = require('path'); var development = require('./env/development'); // var test = require('./env/test'); // var production = require('./env/production'); // var defaults = { // root: path.normalize(__dirname + '/..') // }; /** * Expose */ module.exports = { developm...
const { GraphQLEnumType } = require('graphql') const CODES = { ab: 'Abkhaz', aa: 'Afar', af: 'Afrikaans', ak: 'Akan', sq: 'Albanian', am: 'Amharic', ar: 'Arabic', an: 'Aragonese', hy: 'Armenian', as: 'Assamese', av: 'Avaric', ae: 'Avestan', ay: 'Aymara', az: 'Azerbaijani', bm: 'Bambara', ...
Dagaz.Controller.persistense = "none"; ZRF = { JUMP: 0, IF: 1, FORK: 2, FUNCTION: 3, IN_ZONE: 4, FLAG: 5, SET_FLAG: 6, POS_FLAG: 7, SET_POS_FLAG: 8, ATTR: 9, SET_ATTR: 10, PROMOTE: ...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ObjectId = Schema.Types.ObjectId; var timestamp = require('mongoose-timestamp'); var ActivityStatusSchema = new Schema({ isPassed: { type: Boolean, default: false }, problems: { type: Boolean, default: fal...
(function(root, undefined) { "use strict"; /* draglune main */ var callback; // Base function. var draglune = function () { }; draglune.makeFileDrop = function(o, b) { if (!(o && o.nodeType && o.nodeType === 1 && b && b instanceof Function)) { return false; } o.addEventListener("dragover", function (e) { ...
import { composeWithTracker } from 'react-komposer'; import { Meteor } from 'meteor/meteor'; import { Giveaway } from '../../components/giveaways/giveaway'; import { Loading } from '../../components/loading'; import { Giveaways } from '../../../api/giveaways/giveaways'; const composer = (props, onData) => { if (Met...
const express = require('express'); const PaginationController = require('./pagination.controller'); const router = express.Router(); const curdy = require('./../../../../../../index'); router.use('/', curdy.generateRoutes(PaginationController)); module.exports = router;
/** * Created by peter on 9/15/16. */ // ==UserScript== // @name Axel Episodes // @namespace http://v.numag.net/grease/ // @description grab all episodes for axel download // @include http://hyper.numag.net/*/ // @include http://amsterdam.hikerlink.org/youtube/*/ // @include http://...
'use strict'; var SockJS = require('../sockjs-stream'), _URL = require('url'); function buildBuilder (client, opts) { var wsOpt = { protocol: 'mqttv3.1' }, host = opts.hostname || 'localhost', port = String(opts.port || 80), path = opts.path || '/', url = opts.protocol + '://' + host + '...
import Ember from 'ember'; import config from '../config/environment'; export default Ember.Service.extend({ upload(file) { const data = new FormData(); data.append(`value`, file); return Ember.$.ajax({ data, method: `POST`, cache: false, processData: false, contentType: fa...
angular.module('resources.applicant', [ 'services.djangorestresource', ]) .factory('applicantFactory', [ 'DjangoRestResource', function($resource) { return $resource('/api/applicants/:applicant_id/', { applicant_id: "@id_no" }, { query: {} }); } ])
$(document).ready(function () { var pagetop = $('#pagetop'); var menu = $('#menu'); var menuButton = $('#menu-btn'); document.documentElement.clientWidth; var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; $(window).resize(function () { document.documentElement.clientWidth; ...
var gulp = require('gulp'); var path = require('path'); var ts = require('gulp-typescript'); var mocha = require('gulp-mocha'); gulp.task('build', function() { var tsProject = ts.createProject(path.resolve('./tsconfig.json')); return gulp .src(path.resolve('./src/**/*.ts')) .pipe(ts(tsP...
SIP.LoggerFactory.prototype.debug = SIP.LoggerFactory.prototype.log = SIP.LoggerFactory.prototype.warn = SIP.LoggerFactory.prototype.error = function f() {}; describe('ClientContext', function() { var ClientContext; var ua; var method; var target; var body; var contentType; beforeEach(function(){ ...
var fs = require('fs'), read = fs.readFileSync; var priv = __dirname+"/private/"; var config = { "production": process.env.NODE_ENV == "production" }; config.lite = { prod: { cert: priv+'lite/prod.crt.pem', key: priv+'lite/prod.key.pem', gateway: 'gateway.push.apple.com' }, sandbox: { cert: priv+'lite/de...
var Combinatorics = require('js-combinatorics'); var Numbered = require('numbered'); // Util functions for generating schema and utterances // =================================================== // Convert a number range like 5-10 into an array of english words function expandNumberRange(start, end, by) { by =...
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z" }), 'ViewList');
/** * BOOK.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ module.exports = { attributes: { } };
"use strict"; module.exports = function(str, firstAppend){ if (typeof str === 'number'){ return str + 1; } if (typeof str !== 'string'){ return '1'; } if (str.length === 0) { return '1'; } var name = str.replace(/\d+$/, ''); var number = str.split('').reduce(...
import React, {Component} from 'react'; import { connect } from 'react-redux'; import Chart from '../components/chart'; import googleMap from '../components/google_Maps.js'; class WeatherList extends Component { renderWeather(cityData) { const name = cityData.city.name; const temps = cityData.list.map(tempA...
exports.ContextProvider = require('./lib/providers/Context').default exports.ExecutionProvider = require('./lib/providers/Execution').default exports.PropsProvider = require('./lib/providers/Props').default exports.PathProvider = require('./lib/providers/Path').default exports.ReduxProvider = require('./lib/providers/R...
module.exports = { addSourcesTasks: stub() };
/* global io */ 'use strict'; angular.module('appManagerApp') .factory('socket', function(socketFactory) { // socket.io now auto-configures its connection when we ommit a connection url var ioSocket = io('', { // Send auth token on connection, you will need to DI the Auth service above // 'query...
const snekfetch = require('snekfetch'); const { RichEmbed } = require('discord.js'); module.exports = { commands: [ 'neko', 'nekos' ], usage: 'neko', description: 'OwO', category: 'Fun', execute: (bot, msg) => { msg.edit('', { embed: new RichEmbed() .setColor(0x5B8DEA) .setTit...
// ==UserScript== // @name Liquipedia Spoiler Hider // @namespace www.lux01.co.uk // @description Hides tournament spoilers on the Liquipedia // @include http://wiki.teamliquid.net/* // @exclude http://wiki.teamliquid.net/hearthstone/* // @version 1.0.1a // @grant none // @copyright 2015, W...
'use strict'; /** * practice Node.js project * * @author William Wang <wangmuming_0218@126.com> */ import {expect} from 'chai'; import {session} from '../test'; describe('topic', function(){ // it('list', async function(){ // // const list = await request.get('/api/topic/list'); // console.log(list); ...
var $ = global.jQuery; module.exports = MainVerticalShift; function MainVerticalShift(opts) { if (!(this instanceof MainVerticalShift)) { return new MainVerticalShift(opts); } // console.log('MainVerticalShift initialized.'); var hexagonHeight = $('.hexagon').eq(0).height(); var hexagonOuterHeight = ...
import React from 'react'; import { StyleSheet, Text, View, TextInput, Button, StatusBar } from 'react-native'; import { SearchBar } from 'react-native-elements' export let SEARCH_QUERY = '' const Home = ({ navigation: { navigate }}) => { console.log('Home rendered!!') return ( <View style={{flex: 1}}> <St...
import ascii from "ascii-art"; ascii.Figlet.fontPath = `${__dirname}/../../figlet-fonts/`; export default function subtitle(message = "Sub-Title", figletFont = "standard") { this.debug("subtitle", message, figletFont); this.then((stimpak, done) => { ascii.font(message, figletFont, renderedMessage => { this.wr...
import Vue from 'vue'; Vue.directive('field', { bind(el, { expression: field }, { context: block }) { if(typeof field === 'string') { block.fieldElements[field] = el; } else if(Array.isArray(field)) { field.forEach((f) => block.fieldElements[f] = el) } } });
const func = require('../src/longest-consecutive-sequence'); const assert = require('assert'); describe('longest-consecutive-sequence', function () { describe('#longestConsecutive()', function () { it("should return 4 when numbers are [100, 4, 200, 1, 3, 2]", function () { let ret = func([100, 4...
const CHAMPION_LOAD = 'CHAMPION_LOAD'; const CHAMPION_LOAD_SUCCESS = 'CHAMPION_LOAD_SUCCESS'; const CHAMPION_LOAD_FAIL = 'CHAMPION_LOAD_FAIL'; const initialState = { loaded: false }; export default function reducer(state = initialState, action = {}) { switch (action.type) { case CHAMPION_LOAD: ...
/*globals angular */ 'use strict'; /** * Routes each URL Request to a specific html page, * each html page is connected to a specific controller which handles the logic * * protected: If page may only be shown if user is logged In * hideIfLoggedIn: for Login/Signup pages -> May not be shown if user is logged In a...
// wrapper for THREE.SVGRenderer trying to optimize creation of many small SVG elements THREE.CreateSVGRenderer = function(as_is, precision, doc) { function Create(document) { // now include original THREE.SVGRenderer //
const uniqueValidator = require('mongoose-unique-validator') module.exports = schema => uniqueValidator(schema, {})
'use strict'; var mongoose = require('mongoose'); var productModel = function () { //Define a super simple schema for our products. var productSchema = mongoose.Schema({ name: String, price: Number }); //Verbose toString method productSchema.methods.whatAmI = function () { ...
/* * systems-api-version-test.js: Tests for the 'system' resource's RESTful API. * * (C) 2010, Nodejitsu Inc. * */ var assert = require('assert'), apiEasy = require('api-easy'), helpers = require('../../helpers'), fixtures = require('../../fixtures/systems'), systems = fixtures.systems, missin...
/** * Created by kdban on 4/8/2016. */ var $ = require('jquery'); var Logger = require('polyball/shared/Logger'); var appendNameToList = function (listElement, localID) { return function (spectatorOrPlayer) { if (spectatorOrPlayer == null) { return; } var listItem = $('<li...
// Karma configuration // Generated on Sat May 02 2015 15:36:20 GMT+0530 (India Standard Time) 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/...
var normalize = require("./lib/normalize.js") var error = require("./lib/error.js") module.exports = enumDropdown function enumDropdown(opts) { opts = normalize("enumDropdown", opts) if (!opts.options) { throw new Error("enumDropdown(opts): opts.options is required " + JSON.stringify(opts...
(function() { "use strict"; function $$route$recognizer$dsl$$Target(path, matcher, delegate) { this.path = path; this.matcher = matcher; this.delegate = delegate; } $$route$recognizer$dsl$$Target.prototype = { to: function(target, callback) { var delegate = this.delegate...
import React from 'react' import {mount} from 'enzyme' import interactiveMarkdown from '../interactive-markdown' function flushAllPromises() { return new Promise(resolve => setTimeout(resolve, 200)) } test('parses interactive pragmas into CodePreviews', async() => { const markdown = ` # hello world I am ...
/* * Super simple AJAX forms powered by Formspree -- http://jdp.org.uk/ajax/2015/05/20/ajax-forms-without-jquery.html */ var message = {}; message.loading = 'Laden ...'; message.success = 'Vielen Dank!'; message.failure = 'Fehler!'; var form = document.forms[0]; var submitForm = document.getElementById('submi...
$( document ).ready(function() { $("#menu-toggle").click(function(e) { e.preventDefault(); $("#wrapper").toggleClass("toggled"); }); $(window).on('load, resize', function mobileViewUpdate() { var viewportWidth = $(window).width(); if (viewportWidth < 768) { $("#wrapper").remov...
#!/usr/bin/env node var Promptosaurus = require('../lib/promptosaurus'); var rawr = new Promptosaurus(); rawr.add('Would you like to play a game of chess (y | n)?', function(answer){ // tell promptosaurus if you wish to accept the answer. // A value of 'false' will have Promptosaurus ask the question again ...
/** * babel plugin for common configuration * * This will replace any object expression with a value specified in its parameter. */ import * as Kit from "./kit"; export default Kit.babelPlugin(function* (si) { const s = Kit.auto(si); for (const i of s) { if (i.enter && i.type === Kit.Tag.ObjectExpression) ...
const router = require('express').Router(); const jwt = require('jsonwebtoken'); const SECRET = process.env.JWT_KEY; router.get('/', (req, res, next) => { jwt.verify(req.cookies.token, SECRET, (err, payload) => { (!req.cookies.token) ? res.redirect("./login") : res.render('./dailyplan/') }); }); module.expo...
const fs = require('fs'); const resolve = require('path').resolve; const userIds = require('../userIds'); /** * @param {IMessage} msg Message object * @return {boolean} whether the message sender has access */ function senderIsOwner (msg) { const sender = msg.member || msg.author; const isAeryk = sender.id === ...
const db = require('./db'); const bookshelf = require('bookshelf')(db); const BCrypt = require('bcryptjs'); const SALT_FACTOR = 10; let RoleModel = require('./Role'); //console.log('orm loaded and ready'); let User = bookshelf.Model.extend({ tableName: 'user_accounts', initialize: function() { this.on('creat...
version https://git-lfs.github.com/spec/v1 oid sha256:2e55b4cdfa39ace8085f1f7ca5e9807f119de33cc5fb7b1099ebc2f22d6a62e7 size 833
import React from 'react'; import 'highlight.js/styles/github-gist.css'; import {getTopicDetail} from '../lib/client'; import {renderMarkdown} from '../lib/utils'; export default class TopicDetail extends React.Component { constructor(props) { super(props); this.state = {}; } componentDidMount() { ...
// dataViews/index.js import * as actions from './actions'; import * as components from './components'; import * as constants from './constants'; import reducer from './reducer'; import * as selectors from './selectors'; export default { actions, components, constants, reducer, selectors };
var el = document.getElementById('input'); // el.addEventListener('click', function() { // el.value = 'clicked'; // }); var msgContainer = document.getElementById('msg-container'); function sendMessage() { var msg = el.value; el.value = ''; var msgEl = document.createElement('p'); msgEl.innerTex...
'use strict'; /** * Drags the `from` element to the location of the `to` element. * @param from element whose position to start drag operation at * @param to element whose position to stop drag operation at */ module.exports.drag = function (from, to) { browser.actions(). mouseMove(from). mouse...
'use strict'; // Fire me up! module.exports = { implements: 'starSelector/initError/throwError:sub' }; module.exports.factory = function () { throw new Error(require('path').relative(process.cwd(), __filename)); };
const InvalidError = require('./errors/InvalidError'); const NegativeError = require('./errors/NegativeError'); class Range{ constructor(start, end, step = 1){ this.start = start; this.end = end; this.step = step; if(this.end < this.start){ throw new InverseOrderError(start, end); } if(...