code
stringlengths
2
1.05M
var methodAliases = require('./method-map'); module.exports = function getMethodName(categoryName, methodAlias) { return methodAliases[categoryName] && methodAliases[categoryName][methodAlias]; };
define([ "utils/range" ],function(Range) { "use strict"; function BoundingBox(position, width, height) { this.position = position; this.width = width; this.height = height; this.rangeX = new Range(position.x, position.x + width); this.rangeY = new Range(position.y, position.y + width); } BoundingB...
const chai = require('chai'); const { MongoClient } = require('mongodb'); const bson = require('bson'); chai.use(require('chai-as-promised')); chai.use(require('chai-datetime')); const expect = chai.expect; const Model = require('../lib/model'); const cosaDb = require('../lib/...
google.load("gdata", "1"); google.setOnLoadCallback(loadFeed); var feedURL = "http://www.google.com/calendar/feeds/calendar%40ourladymotherchurch.com/public/full"; var calendarDiv = null; var service = null; function loadFeed() { service = new google.gdata.calendar.CalendarService('OLMC'); var query = new google...
/* * Flush stats to InfluxDB (http://influxdb.org/) * * To enable this backend, include 'statsd-influxdb-backend' in the backends * configuration array: * * backends: ['statsd-influxdb-backend'] * * The backend will read the configuration options from the following * 'influxdb' hash defined in the main stats...
'use strict'; var test = require('prova'), path = require('path'), exec = require('child_process').exec; function documentation(args, options, callback) { if (!callback) { callback = options; options = {}; } if (!options.cwd) { options.cwd = __dirname; } args.unshift(path.join(__dirname, '...
import { dispatch as d3_dispatch } from 'd3-dispatch'; import { event as d3_event, select as d3_select } from 'd3-selection'; import { d3keybinding as d3_keybinding } from '../lib/d3.keybinding.js'; import { osmEntity } from '../osm/index'; import { utilRebind } from '../util/rebind'; /* The hover behavi...
angular.module('square', []) .factory('square', function() { return function (num) { return num * num; }; });
function getEvents (cloudformation, argv, utils) { const stackName = argv._[1] if (!stackName) { console.error('cirrus events <stackname>') process.exit(1) } utils.fetchEvents(stackName, function (err, events) { if (err) { utils.checkExists(stackName, err) throw new Error(err) } ...
//(function() { var markedRenderer = new marked.Renderer() markedRenderer.image = function(src, title, alt) { var renderedImage = "<img src=\"" + src + "\"" if (alt != null && alt != "") { renderedImage += " alt=\"" + alt + "\"" } if (title != null && title != "") { if (title.indexOf("x...
'use strict'; var program = require('commander'); program .version('0.0.1') .option('-p, --peppers', 'Add peppers') .option('-P, --pineapple', 'Add pineapple') .option('-b, --bbq', 'Add bbq sauce') .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') .parse(process.argv); ...
// Imports const fs = require('fs'); // Constants const MASTER_KEY_ITERATIONS = 1000000; const MASTER_KEY_MESSAGE_DIGEST = 'sha512'; const LEGACY_MASTER_KEY_ITERATIONS = 250000; const LEGACY_MASTER_KEY_MESSAGE_DIGEST = 'sha512'; // Validator functions function isFile(path) { return fs.existsSync(path) && fs.stat...
// jshint node: true, esversion: 6 'use strict'; const mailgun = require('mailgun-js')({ apiKey: process.env.MAILGUN_KEY, domain: 'lcssl.org' }); const mail = { send: (recipient, subject, message, done) => { var data = { from: 'Civil Service Softball League <results@lcssl.org>', cc: 'nick@mantonbr...
'use strict'; var should = require('should'), request = require('supertest'), app = require('../../server'), mongoose = require('mongoose'), User = mongoose.model('User'), Typing = mongoose.model('Typing'), agent = request.agent(app); /** * Globals */ var credentials, user, typing; /** * Typing routes tests...
'use strict'; // ------------------------------------------------------ // TABLE OF CONTENTS // ------------------------------------------------------ // 1 - GENERAL NOTES // 2 - STEP BY STEP // 3 - GENERAL GUIDE // 4 - COMMON PROBLEMS // ------------------------------------------------------ // --------...
import EndOfGameEvent from "../events/EndOfGameEvent"; import ExitLevelEvent from "../events/ExitLevelEvent"; class CollisionDetector { constructor(scoreMgr) { this.scoreManager = scoreMgr; } detectAll(hero, level) { var that = this; var collided = false; // Detects colli...
version https://git-lfs.github.com/spec/v1 oid sha256:01d70387a0bf27d86a3b8d1aeefd71878327cc4827313de91b68e746a587783a size 104603
import * as actionTypes from "./action-types"; import { fromJS } from "immutable"; // 将 JS 对象转换成 immutable 对象 import { getBannerRequest, getRecommendListRequest, } from "../../../api/request"; export const changeBannerList = (data) => ({ type: actionTypes.CHANGE_BANNER, data: fromJS(data), }); export const ch...
var getNative = require('lodash/internal/getNative'); /** Native method references. */ var WeakMap = getNative(global, 'WeakMap'); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; module.exports = metaMap;
/** * @jsx React.DOM */ /* not used but thats how you can use touch events * */ //React.initializeTouchEvents(true); /* not used but thats how you can use animation and other transition goodies * */ var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup; /** * we will use yes for true * we will use no f...
/* * lib/iterator.js * */ var _ = require("lodash"); var fs = require("fs-extra"); var zlib = require("zlib"); var readline = require("readline"); var readChunk = require("read-chunk"); var fileType = require("file-type"); //============================================================================== module.exp...
require('./lib/plato-repo-report')( 'your repo url here' );
define([ "app/config" ], function (config) { var obj = deepExtend({ baseUrl: './', paths: { app: './app', nls: "./nls", core: "./core", service: "./core/loader/service", controller: "./core/loader/controller", directive: "./...
'use strict' var express = require('express') var expect = require('chai').expect var request = require('supertest') var bodyParser = require('body-parser') var routes = require('../route/poiRoute') var MongoClient = require('mongodb').MongoClient var Types = require('../Types') var db MongoClient.connect(process.env...
var app = angular.module('JukeTubeApp', []); // Run app.run(function () { var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); }); // Config ap...
/******************************************************************************* NAME MILLER CYLINDRICAL PURPOSE: Transforms input longitude and latitude to Easting and Northing for the Miller Cylindrical projection. The longitude and latitude must be in radians. The Easting and North...
exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['test/**/spec.js'] };
'use strict'; var React = require('react/addons'), TestUtils = React.addons.TestUtils, _ = require('lodash'), WordCloud = require('../wordcloud.js'), WordCloudTable = require('../wordcloudtable.js'), propsBase = require('./fixtures/propsBase.js'), topics = require('./fixtures/topics.json.js'); des...
'use strict'; module.exports = function(app) { var getRouterFor = require('../fake-backend.js').getRouterFor; var contactsRouter = getRouterFor('contact', 'contacts'); app.use('/api/contacts', contactsRouter); };
var login = new Object(); jQuery.extend(login, { init: function(formulario) { login.peticion(formulario); }, peticion: function(formulario) { jQuery.ajax({ url : "{{ RUTA_APP|e }}/Index/Index/autenticacion", async : false, data : jQuery(formulario).serialize(), dataType : "json",...
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import 'babel/polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment'; import Location from '....
import expect from 'expect' import _ from 'lodash'; describe('multi', function() { it('add new multi method', function() { var multi = require('src/').default; var area = multi(_.property('shape')); expect(typeof area).toBe('function'); }); it('throw if no method and no default', ...
/*! @name videojs-playlist-ui @version 3.8.0 @license Apache-2.0 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('global/document'), require('video.js')) : typeof define === 'function' && define.amd ? define(['global/document', 'video....
/** * Internal helper functions for parsing DICOM elements */ var dicomParser = (function (dicomParser) { "use strict"; if(dicomParser === undefined) { dicomParser = {}; } function readDicomDataSetImplicitUndefinedLength(byteStream) { var elements = {}; while(byteSt...
import ScrollController from "properjs-scrollcontroller"; import * as core from "../../core"; import Controller from "properjs-controller"; /** * * @public * @global * @class AnimateController * @param {Element} element The dom element to work with. * @classdesc Handle scroll events for a DOMElement. * */ cla...
var Reflux = require('reflux'); var socket = require('../socket'); var channelActions = Reflux.createActions([ 'join', 'part', 'invite', 'kick', 'addUser', 'removeUser', 'removeUserAll', 'renameUser', 'setUsers', 'setTopic', 'setMode', 'load' ]); channelActions.join.preEmit = (channels, server) => { soc...
'use strict'; angular.module('app.channels') .directive('scrollToBottom', [ function() { return { restrict: "A", link: function(scope, element, attrs) { // We dont want to abuse on watch but here it is critical to determine if the parameter has changed. scop...
module.exports = (sequelize, DataTypes) => { const Songs = sequelize.define('Songs', { title: DataTypes.STRING, artist: DataTypes.STRING, genre: DataTypes.STRING, album: DataTypes.STRING, albumImage: DataTypes.STRING, youtubId: DataTypes.STRING, lyrics: ...
var express = require('express'), app = express(), router = express.Router(), mongoose = require('mongoose'), bodyParser = require('body-parser'), morest = require('../src/morest').Morest; //Connect to your mongoDB database mongoose.connect('mongodb://127.0.0.1:27017/bears'); //Use bodyparser app....
var mongodb = require('./mongodb'); var Schema = mongodb.Schema; var ColumnMetaSchema = new Schema({ columnName : String, order : Number, locked : Boolean, visible : Boolean }); var ColumnMeta = mongodb.model("ColumnMeta", ColumnMetaSchema); var ColumnMetaDAO = function(){}; //±£´æÐÅÏ¢ ColumnMetaDAO.p...
(function () { var cache = {}; window.Storage = { Set: function (key, value) { //chrome.storage.sync.set({[key]: value}); chrome.storage.local.set({[key]: value}); }, SetLocal: function (key, value) { chrome.storage.local.set({[key]: value}); ...
(function (dust) { // Note: all error conditions are logged to console and failed silently /* make a safe version of console if it is not available * currently supporting: * _console.log * */ var _console = (typeof console !== 'undefined') ? console : { log: function () { ...
function save_options(){ var openInNewTab = document.getElementById('open-in-new-tab').checked; chrome.storage.sync.set({ openInNewTab: openInNewTab }) } // Restores select box and checkbox state using the preferences // stored in chrome.storage. function restore_options() { chrome.storage.sync.get({ ...
describe('Wheel.Utils.ObjectPath', function() { describe('#write', function() { it('builds the full path with object literals, if none are found in window', function() { if (window.Foo) { window.Foo = undefined; } Wheel.Utils.ObjectPath.write('Foo.Bar.Zardoz', 3); expect(window.Foo).toEqual({Bar...
/*------------------------------------*\ navigation \*------------------------------------*/ /** * listeners for hovers and keyboard support for the menus */ /** * TODO: Use event delegation instead of adding click events in for loops like some kind of animal... * http://www.quirksmode.org/blog/archives/2008...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2016 */ /* eslint-disable max-len */ import LocalizedStrings from 'react-native-localization'; export const buttonStrings = new LocalizedStrings({ gb: { add_batch: 'Add Batch', add_master_list_items: 'Add Master List Items', all_items_selected: ...
var React = require("react"); var PropTypes = require("prop-types"); var { requireNativeComponent } = require("react-native"); var NativeAutoComplete = requireNativeComponent("RCTAutoComplete", null); class RCTAutoComplete extends React.Component { constructor(props) { super(props); this.state = { mos...
import React, { Component, PropTypes } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import * as ViewActions from '../actions'; import Marker from '../components/Marker'; import Card from '../components/Card'; import SelectedWrapper from '../containers/SelectedWrapper'...
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), errorHandler = require('./errors.server.controller'), Project = mongoose.model('Project'), Task = mongoose.model('Task'), User = mongoose.model('User'), _ = require('lodash'); /** * Create a Project */ exports.createProject ...
'use strict'; /** * An Animation. * @param frameRate {Number} The ideal number of frame changes per second for this animation. * @constructor */ var Animation = function (frameRate) { this.frameDeltaSum = 0; this.targetFrameDelta = 1000 / (frameRate || 20); this.frame = 0; this.frames = []; }; /**...
function displayMWError() { kony.ui.Alert("Middleware Error ", null, "error", null, null); }; function displaySessionError() { kony.ui.Alert("Session Expired .. Please re-login", null, "error", null, null); }; function displayError(code, msg) { // Commented for SWA: kony.ui.Alert("Error Code: "..code .." ...
import Ember from 'ember'; export default Ember.Controller.extend({ actions: { /** Hide Sidebar by clicking submenu item. @method actions.subMenuEl */ hideSidebar() { Ember.$('.ui.sidebar').sidebar('hide'); }, /** Expand menu items by click. @method actions.subMenu...
(function () { 'use strict'; angular .module('app.layout') .controller('Header', Header); function Header($scope, authenticatedUser, $state, $timeout, $mdDialog, usersApi) { $scope.logout = function () { authenticatedUser.logout(); $timeout(function () { ...
import axios from 'axios'; import { FETCH_USER, FETCH_ITEMS, FETCH_BACKPACK, ADD_ITEM_TO_BACKPACK, DEL_ITEM_FROM_BACKPACK, REMOVE_ITEM_FROM_BACKPACK, RECALCULATE_TOTAL_PRICE, DISCARD_BACKPACK, SAVE_BACKPACK, CHECKOUT_BACKPACK, BACKPACK_IS_LOADING, BACKPACK_HAS_ERRORED, FETCH_BACKPACK_SUCCESS } from './typ...
'use strict'; const Code = require('code'); const Lab = require('lab'); const Client = require('../lib/client'); const Manager = require('../lib/manager'); const lab = exports.lab = Lab.script(); const expect = Code.expect; const describe = lab.describe; const it = lab.it; function createManager () { const m = ne...
/** * array-some * Array#some ponyfill for older browsers * (Ponyfill: A polyfill that doesn't overwrite the native method) * * https://github.com/twada/array-some * * Copyright (c) 2015-2016 Takuto Wada * Licensed under the MIT license. * https://github.com/twada/array-some/blob/master/MIT-LICENSE */ ...
'use strict'; var passport = require('passport'); var _ = require('underscore'); var formidable = require('formidable'); var md5 = require('md5'); var fs = require('fs'); var random = require('random-token'); var Models = require('../models/main'); var Additional = new (require('./additional'))(); var Mail = new (req...
// DOM Manipulation Challenge // I worked on this challenge with: Austin Dorff. // Add your JavaScript calls to this page: // Release 0: // Set up // Release 1: var div_r_1 = document.getElementById("release-0"); div_r_1.className = "done"; // Release 2: var div_r_2 = document.getElementById('release-1'); div_...
$(document).ready(function() { $("#calculator-body").draggable(); var total = ""; var currentNumber = ""; var operator; var operatorChosen = false; var decimalAlready = false; $("#ac").on("click", function() { total = ""; currentNumber = ""; operatorChosen = false; operator = ""; $("...
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" /> , 'LensSharp');
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. 'use strict'; var assert = require('chai').assert; var Client = require('./client.js'); var ConnectionString = require('azure-iot-common').ConnectionString; var Messa...
/* * Author: Eddy Huang * Date: 2015-07-29 * File: api */
var toEncoding = require("./toEncoding") module.exports = toValueEncoding function toValueEncoding(data, options) { return toEncoding(data && data.value , options.valueEncoding || options.encoding) }
import React from 'react'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import IntlProvider from './IntlProvider'; function Provide({ store, children }) { return ( <Provider store={store}> <IntlProvider>{children}</IntlProvider> </Provider> ); } Provide.propTypes = { ...
/** * CustomEmailSettings Schema */ Core.Schemas.CustomEmailSettings = new SimpleSchema({ username: { type: String, optional: true }, password: { type: String, optional: true }, host: { type: String, optional: true }, port: { type: N...
'use strict'; const url = require('url'); const _ = { map: require('lodash/map'), trimStart: require('lodash/trimStart'), sortBy: require('lodash/sortBy'), isString: require('lodash/isString'), forEach: require('lodash/forEach'), remove: require('lodash/remove'), has...
var HomeController = require("./Base"), View = require("../views/Base"), Service = require("../domain/concrete/services/HomeService.js"); module.exports = HomeController.extend({ name: "Home", // index action for home index: function(req, res, next) { var view = new View(res, 'home'); view.render({ ...
let point = require('./gis/protobuf/point_pb'); module.exports.Point2D = point.Point2D; module.exports.Point3D = point.Point3D; module.exports.MultiPoint2D = point.MultiPoint2D; module.exports.MultiPoint3D = point.MultiPoint3D; let linestring = require('./gis/protobuf/linestring_pb'); module.exports.LineString2D = line...
'use strict'; import React from "react"; var RefreshButton = React.createClass({ render: function() { return ( <button type="button" className="refresh-button btn btn-info navbar-btn" title="Sync" onClick={this.props.onRefreshClick}> <span className={"fa fa-refresh" + (this.props.i...
var is = require('annois'); module.exports = function(op, y, x) { return is.number(op(y, x)); };
'use strict'; var mongoose = require('mongoose'), Schema = mongoose.Schema; var BookSchema = new Schema({ name: {type: String, required: true}, info: String, author: {type: String, required: true}, user: {type: Schema.Types.ObjectId, ref: 'User', required: true}, bookcase: {type: Schema.Types.ObjectId, re...
'use strict'; const _ = require('lodash'); const Script = require('smooch-bot').Script; const scriptRules = require('./script.json'); module.exports = new Script({ processing: { //prompt: (bot) => bot.say('Beep boop...'), receive: () => 'processing' }, start: { receive: (bot) => ...
/* * @title Bump * @description A task to bump the bower and package version numbers * @summary Allowed bump types: major, minor, patch * @default patch * @example (cli) env BUMP_TYPE=major gulp bump */ /********************************************************************************* 1. DEPENDENCIES ********...
import jwt from 'jsonwebtoken'; import ErrorConstants from '../constants/ErrorConstants'; import { User } from '../models'; import Constants from '../constants/Constants'; const { userDeleteUnauthorizedError, voidUserDeleteError, } = ErrorConstants; /** * @description allows users to delete only his account. * ...
'use strict'; //region Imports const configuration = require( './../system/configuration-reader.js' ); const Argument = require( '../system/argument-check.js' ); const ModelError = require( './model-error.js' ); const PropertyInfo = require( './property-info.js' ); //endregion //region Private variables const _get...
/* * Copyright (c) 2017. MIT-license for Jari Van Melckebeke * Note that there was a lot of educational work in this project, * this project was (or is) used for an assignment from Realdolmen in Belgium. * Please just don't abuse my work */ define(function (require) { 'use strict'; var zrUtil = require(...
define(["jquery","Velocity","easing"], function ($,velocity) { $.fn.collapsible = function(options) { var defaults = { accordion: undefined }; options = $.extend(defaults, options); return this.each(function() { var $this = $(this), $panel_headers = $(this).find('> li > .collapsible-header'), collap...
fetch('https://foo.com/form-data') .then((response) => response.formData()) .then((formData) => console.log(formData.get('foo')); // bar BodyFormDataExample02.js
import Joi from 'joi'; import pluck from 'lodash/map'; import dates from '../lib/dates'; import validate from '../lib/validate'; import payoutMethods from '../ui/payout_methods'; import i18n from '../lib/i18n'; /** * New expense schema */ const schema = Joi.object().keys({ attachment: Joi.string().uri() .labe...
$(function(){ // set-up the favs_people table if it doesn't exist $(document).ready(function(){ db.transaction( function(transaction) { transaction.executeSql( 'CREATE TABLE IF NOT EXISTS favs_people '+ ' (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, username TEXT NOT NULL, given...
var machina = require('machina'); var request = require('request'); var lagarto = require('./devices'); var data = require('./data'); // Global Variables to the experiment var currentBlock = []; var currentNumOfTrials = 0; var currentTrialNum = 0; var timeOutLeadsToFail = false; var timeoutValue = 0; var delayValue = ...
import { assert, JSData } from '../../_setup' import { productSchema } from './_productSchema' describe('Schema.pick', function () { it('has the right exports', function () { assert.isFunction(JSData.Schema.prototype.pick) }) it('Copies a value based on the properties defined in the schema', function () { ...
var puremvc = window.puremvc; var TodoProxy = require('../../model/proxy/TodoProxy'); class PrepModelCommand extends puremvc.SimpleCommand { execute() { this.facade.registerProxy(new TodoProxy()); } } module.exports = PrepModelCommand;
import Shader from "./shader/shader-program"; import { degToRad, makePerspective } from "./utility"; import PerformanceCounter from "./performance-counter"; import TextureManager from "./texture-manager"; import Planet from "./planet"; import config from "./config"; /** * Resizes the given canvas element to fit the ...
import Enzyme, { mount } from 'enzyme' import Adapter from 'enzyme-adapter-react-16' Enzyme.configure({ adapter: new Adapter() }) import { Line } from './Line' describe('<Line />', () => { let wrapper beforeEach(() => { wrapper = mount(<Line />) }) test('Should renderer', () => { expect(wrapper).to...
var gulp = require('gulp'); var ts = require('gulp-typescript'); var gutil = require('gulp-util'); var sourcemaps = require('gulp-sourcemaps'); var ddescribeIit = require('gulp-ddescribe-iit'); var shell = require('gulp-shell'); var ghPages = require('gulp-gh-pages'); var del = require('del'); var merge = require('merg...
/** * @license * Copyright (c) 2016 Nicholas Nelson * * 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...
import Ember from "ember-metal/core"; import run from "ember-metal/run_loop"; import EmberObject from "ember-runtime/system/object"; import RSVP from "ember-runtime/ext/rsvp"; import EmberView from "ember-views/views/view"; import jQuery from "ember-views/system/jquery"; import Test from "ember-testing/test"; import "...
var router = require('express').Router(); var Q = require('q'); var KEY = require('./key'); var User = require('../models/user.js'); var Comm = require('../comm'); var ERR = Comm.ERR; var FailProcess = Comm.FailProcess; /* * get: 注册页面 * post: 提交注册 */ router.route('/') .get(function(req, res){ return res.render...
angular.module('demoApp').config([function() { }]);
/* */ var _curry1 = require('./internal/_curry1'); var curryN = require('./curryN'); module.exports = _curry1(function curry(fn) { return curryN(fn.length, fn); });
var GoogleMalwareList = require('./GoogleMalwareList'); var GooglePhishingList = require('./GooglePhishingList'); var DefaultLists = [ GoogleMalwareList, GooglePhishingList ]; module.exports = DefaultLists;
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.controllers' is found in controllers.js ap...
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M17 6H3v8h14V6zm-7 7c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z" opacity=".3" /><path d="M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM3 14...
// let info = { // user: 'X', // comp: 'O' // }; // const settings = (state = info, action) => { // switch (action.type) { // case 'SET_USER_MARKER': // return { // user: action.marker, // comp: action.marker === 'X' ? 'O' : 'X' // }; // ...
console.log (` // ""--.._ || (_) _ "-._ || _ (_) '-. || (_) __..-' \\__..--"" `);
const assert = require('assert'); const is = require('is_js'); function StringBuilder() { const chars = []; //appends a value to the string function append(value) { assert.equal(is.not.object(value), true); value + ''; for (let i = 0; i < value.length; i++) { chars.push(value[i]); } } // removes any ...
/* eslint-env node */ const GetterRegex = /^(?:chronology|dayOf(?:Month|Week|Year)|hashCode|hour|instant|millis|minute|month|monthValue|name|nano|lengthOf(?:Month|Year)|offset|ordinal|second|value|year)$/; module.exports = function({ types: t }) { const idEmber = t.identifier('Ember'); const idEmberObject = t.ide...
describe("About Expects", function() { //We shall contemplate truth by testing reality, via spec expectations. it("should expect true", function() { expect(true).toBeTruthy(); //This should be true }); //To understand reality, we must compare our expectations against reality. it("should expect equalit...
import React from 'react'; import { Link } from 'react-router'; class Navbar extends React.Component { constructor(props) { super(props); this.url = location.href.split('#')[0]; this.updateContent = props.updateContent || function(){}; } componentDidMount() { this.initEvent(); } componentDidUpd...