code stringlengths 2 1.05M |
|---|
// Useful when measuring inter-frame deltas, a PastAndPresent
// instance holds a continuously updated reference to the
// vector from the frame before, so that when new data rolls
// in, a specified callback function can be used to compare
// the two values in the manner of your choice. After the
// callback executes,... |
import chai, { expect } from 'chai';
import dirtyChai from 'dirty-chai';
chai.use(dirtyChai);
import { shallow } from 'enzyme';
import React from 'react';
describe('WalletHistory', () => {
it('should exists', () => {
const WalletHistory = require('../WalletHistory');
const wrapper = shallow((
<Walle... |
import Raven from 'raven-js';
export default class ErrorReport {
constructor(btn) {
this.btn = btn;
this.eventId = this.btn.dataset.event;
this.render();
}
render() {
this.btn.addEventListener('click', () => this._invokeRavenModal());
}
_invokeRavenModal() {
Raven.showReportDialog({
... |
var myApp = angular.module('myApp', [
'ngRoute',
'ui.router',
'firebase',
'appControllers',
'LocalStorageModule'
]).constant('FIREBASE_URL', 'https://vanbertkitchens.firebaseio.com');
var appControllers = angular.module('appControllers', ['firebase']);
myApp.run(["$rootScope", "$state", function ($rootScope, $st... |
/*global require, QUnit*/
(function () {
"use strict";
// Simulate a full-on require environment.
window.module = {
exports: {}
};
require.config({
paths: {
jquery: "../../../third-party/jquery/js/jquery"
}
});
var flockingBuildPath = "../../../dist/fl... |
/* eslint no-console: 0 */
// Run this example by adding <%= javascript_pack_tag 'hello_vue' %> (and
// <%= stylesheet_pack_tag 'hello_vue' %> if you have styles in your component)
// to the head of your layout file,
// like app/views/layouts/application.html.erb.
// All it does is render <div>Hello Vue</div> at the bo... |
'use strict';
var fs = require('fs');
var path = require('path');
var Promise = require('promise');
var readFile = Promise.denodeify(fs.readFile);
module.exports = getResult;
function getResult(filename, options) {
var input = readFile(filename, 'utf8');
var expected = readFile(options.expected(filename), 'utf8'... |
Function.prototype.inheritsFrom = function (parentClassOrObject) {
if (parentClassOrObject.constructor == Function) {
//Normal Inheritance
this.prototype = new parentClassOrObject;
this.prototype.constructor = this;
this.prototype.parent = parentClassOrObject.prototype;
}
els... |
import { Component } from 'react';
import Link from 'next/link';
import CollectionsBox from './CollectionsBox';
import Filter from './Filter';
import Batch from './Batch';
import { connect } from 'react-redux';
import { fetchCollections, fetchBatchLimits } from '../actions';
import List from '@material-ui/core/Lis... |
// Generated by CoffeeScript 1.8.0
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__supe... |
(function () {
'use strict';
angular
.module('thecalculator')
.factory('OperationFactory', OperationFactory);
OperationFactory.$inject = [];
function OperationFactory() {
function Operation(op) {
var leftOperandValue = op.right;
var rightOperandValue = ... |
"use strict";
const HASH = Symbol.for('HASH');
const stylecow = require('../index');
stylecow.IdSelector = class IdSelector extends require('./classes/node-name') {
static create (reader, parent) {
if (reader.currToken === HASH) {
return (new stylecow.IdSelector(reader.data())).setName(reade... |
'use strict'
import Vue from 'vue'
import router from './router'
import App from 'vue/App'
// database
require('./firebase')
// styles
require('sass/app')
window.app = new Vue({
router,
render: h => h(App)
}).$mount('#app')
|
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const autoprefixer = require('autoprefixer');
module.exports = {
// For production build we want to extract CSS to stand-alone file
// Provide `extractStyles` param and `bootstrap-lo... |
Package.describe({
name: 'cornerstone',
summary: 'Cornerstone Web-based Medical Imaging libraries',
version: '0.0.1'
});
Package.onUse(function(api) {
api.versionsFrom('1.3.5.1');
api.use('jquery');
api.use('dicomweb');
api.addFiles('client/cornerstone.js', 'client', {
bare: true
... |
'use strict';
const AggregationExpression = require('./AggregationExpression');
class AggregationColumn extends AggregationExpression
{
/**
* @param {PreparingContext} preparingContext
* @param {string[]} alias
* @param {Node} expression
* @param {boolean} isUserDefinedAlias
* @returns {AggregationColumn}
... |
var algojs = require("../../");
var array = [ 2, 3, 1, 4, 5, 9, 6, 8, 7, 0 ];
algojs.algorithm.qsort(array);
console.log(array);
algojs.algorithm.qsort(array, function(a, b) {
if(a % 2 && !(b % 2)) return true;
if(b % 2 && !(a % 2)) return false;
return a < b;
});
console.log(array);
var names = [
... |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM7.68 14.98H6V9h1.71c1.28 0 1.71 1.03 1.71 1.71v2.56c0 .68-.42 1.71-1.74 1.71zm4... |
import axios from "axios";
export function logMeIn(email, password) {
const logInData = {email, password}
return {
type: "LOGIN",
payload: axios({
method: 'post',
url: 'https://pumpkin-basket.aguilarstory.com/api/user/auth/app-external',
data: logInData,
headers: {'Content-Type': '... |
'use strict';
const expect = require('chai').expect,
fail = expect.fail,
merge = require('../../../lib/utils/object_utils').merge,
values = require('../../../lib/utils/object_utils').values,
areEntitiesEqual = require('../../../lib/utils/object_utils').areEntitiesEqual;
describe('ObjectUtils', functio... |
/**
* @private
* @flow
*/
import fs from 'fs';
import * as util from 'silk-sysutils';
import version from 'silk-core-version';
// Vibrate by default only on developer builds
let enabled = !util.getboolprop('persist.silk.quiet', version.official);
/**
* Silk vibrator module
*
* @module silk-vibrator
* @example... |
(function() {
'use strict';
angular
.module('app.admin')
.run(appRun);
appRun.$inject = ['routerHelper'];
/* @ngInject */
function appRun(routerHelper) {
routerHelper.configureStates(getStates());
}
function getStates() {
return [
{
state: 'admin',
config: {
... |
'use strict';
var Businesses = require('../models/businesses.js');
var mongoose = require('mongoose');
function ReservationHandler () {
this.handleError = function(err, res){
console.log("An error occurred", err);
res.json({error: "An error occurred"});
};
this.getReservations = function (req, res) {
... |
// Copyright 2014 Google Inc. All rights reserved.
//
// Use of this source code is governed by The MIT License.
// See the LICENSE file for details.
/**
* @fileoverview Tests for dynamically loading scripts.
*/
goog.require('spf.array');
goog.require('spf.net.resource');
goog.require('spf.net.script');
goog.requir... |
/**
* get string type representation of the cell's value
* @return {string}
*/
cell.fx.getStringValue = function(){
return this.value+'';
};
|
/**
* Created by josh on 8/1/15.
*/
var Dom = require('../src/dom');
var VirtualDoc = {
_change_count:0,
_ids:{},
idChanged: function(old_id, new_id, node) {
delete this._ids[old_id];
this._ids[new_id] = node;
},
getElementById: function(id) {
return this._ids[id];
}... |
var bignum = require('bignum');
var AWS = require('aws-sdk');
var path = require('path');
AWS.config.loadFromPath(path.join(__dirname, '../config.json'));
exports.s3 = new AWS.S3();
exports.respond_err = function (res, err, code) {
res.writeHead(code || 500, {"Content-Type": "text/plain"});
res.end(err.messag... |
var util = require('util');
var Promise = require('bluebird');
var AbstractConnectionManager = require('../abstract/cache-manager');
util.inherits(CacheManager, AbstractConnectionManager);
function CacheManager(cacheInstance, sequelize) {
AbstractConnectionManager.call(this, cacheInstance, sequelize);
}
CacheManag... |
// jQuery Alert Dialogs Plugin
//
// Version 1.1
//
// Cory S.N. LaViska
// A Beautiful Site (http://abeautifulsite.net/)
// 14 May 2009
//
// Visit http://abeautifulsite.net/notebook/87 for more information
//
// Usage:
// jAlert( message, [title, callback] )
// jConfirm( message, [title, callback] )
//... |
/**
* Created by saurabhk on 04/09/16.
*/
"use strict";
//require('pixi.js');
//require('p2');
//require('phaser');
//require('./css/parallax.css');
var boot = require("./states/boot");
var preload = require("./states/preload");
var menu = require("./states/menu");
var theGame = require("./states/game");
//
var game ... |
define([
'jquery',
'underscore',
'backbone',
'text!/templates/aws/aws_security_group.html'
], function($, _, Backbone, awsTemplate){
var awsView = Backbone.View.extend({
el: $('#drag-zone'),
render: function(){
var that = this;
var compiledTemplate = _.template(awsTemplate)({'prefix':'aws_sec'});
... |
/**
* @class Oskari.harava.bundle.mapquestions.request.ToggleQuestionToolsRequest
* Requests a hide question tools
*
* Requests are build and sent through Oskari.mapframework.sandbox.Sandbox.
* Oskari.mapframework.request.Request superclass documents how to send one.
*/
Oskari.clazz.define('Oskari.harava.bundle.... |
global.swintVar = {};
module.exports = {
defaultize: require('./defaultize'),
validate: require('./validate'),
print: require('./print'),
walk: require('./walk'),
concat: require('./concat'),
createHash: require('./createHash'),
traverseWithQuery: require('./traverseWithQuery')
};
global.print = module.exports... |
import {combineReducers} from 'redux';
const count = (state = 0, action) => {
switch (action.type) {
case 'increment':
return state + 1;
case 'decrement':
return state - 1;
default:
return state;
}
};
const counter = combineReducers({
count
});
export default counter;
// selecto... |
/*
* This file is part of the Sulu CMS.
*
* (c) MASSIVE ART WebServices GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
define([
'sulusnippet/components/snippet/main',
'sulucontent/components/copy-locale-overlay/main',
'sulucont... |
"use strict";
ace.define("ace/mode/toml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
... |
/*
- Author : Iain M Hamilton - <iain@beakable.com> - http://www.beakable.com
Twitter: @beakable
*/
/** jsiso/utils simple common functions used throughout JsIso **/
define(function() {
return {
roundTo: function (num, dec) {
return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
},
r... |
function setRH(CR, VR){
CR[VR]("User"+"-Agent", "TW96aWxsYS80LjAgCEMENTKGNvbXBhdGlibGU7IE1TSUUgNi4wOyCEMENTBXaW5kb3dzIE5UIDUuMCk=".acetilenButan());
}
var Desdimonproducer_SayNoNo ="CEMENT"+ ""+"";
var silkopil = "/";
var meuArData = new Array(
52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,5... |
/**
*
* Video
*
*/
import React from 'react';
// import styled from 'styled-components';
const video = require('../../resources/home.mp4');
function Video() {
return (
<div style={style.videoContainer}>
<h1 style={style.videoText}>Light Electric Vehicle Technologies</h1>
<video autoPlay loop style=... |
var keytar = require('keytar')
module.exports = {
get: get
}
function get (name) {
var services = {
'darwin': 'AirPort'
}
return keytar.getPassword(services[process.platform], name)
}
|
import React from 'react';
import {Link} from 'react-router';
import truncate from 'component-truncate';
import IssueLabel from './IssueLabel';
import UserDisplay from './UserDisplay';
function isEventLikeAClick(e) {
return e.type === 'click'
|| (e.type === 'keydown'
&& (e.keyCode === 32 || e.ke... |
import {
LOGIN,
LOGOUT,
SIGNUP,
RESET_PASSWORD
} from '../constants/actionTypes';
import { localStorageTokenName } from '../config';
export default function authMiddleware() {
return next => action => {
const { type } = action;
if(__CLIENT__) {
if(type === LOGIN || type === SIGNUP) {
... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ScrollView,
Image
} from 'react-native';
var Dimensions = require('Dimensions');
var {width} = Dimensions.get('window');
// 引入计时器... |
version https://git-lfs.github.com/spec/v1
oid sha256:c9a3fc4f65ef4131a1e2ab94032546a8f17b98404d3d5e481d4352c86fa9bb85
size 39705
|
var freebox = require('./config/freebox');
var app = require('./config/app');
var client = require('../freebox-os-client')(freebox);
client.trackAuthorizationProgress({
track_id: app.track_id
});
|
'use strict';
/**
* Module dependencies.
*/
var users = require('../../app/controllers/users.server.controller'),
setting = require('../../app/controllers/setting.server.controller');
module.exports = function(app) {
// Member Routes
app.route('/setting')
.get(setting.list)
// .post(users.requiresLogin, sett... |
define(["require", "exports"], function (require, exports) {
var DisplayType;
(function (DisplayType) {
DisplayType[DisplayType["UNKNOWN"] = 1] = "UNKNOWN";
DisplayType[DisplayType["STAGE"] = 2] = "STAGE";
DisplayType[DisplayType["CONTAINER"] = 4] = "CONTAINER";
DisplayType[Displ... |
;(function($) {
$('#open-web-app-install').on('click', function(e) {
e.preventDefault();
installOpenWebApp();
});
$('#chrome-app-install').on('click', function(e) {
e.preventDefault();
installChromeApp();
});
function installChromeApp() {
var crxUrl = locati... |
(function () {
'use strict';
angular
.module('nasaImagesApp.search', ['ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'search/search.html',
controller: 'SearchC... |
/**
* @author Josh Stuart <joshstuartx@gmail.com>
*/
var q = require('q');
var mongoose = require('mongoose');
var config = require('../../config/config');
var logger = require('./logger');
/**
* A DB util class that abstracts mongoose functions.
*
* @constructor
*/
function Db(options) {
options = options |... |
'use strict';
var util = require('./util');
var Request = require('./Request');
var WriteFifo8Response =
require('./WriteFifo8Response');
module.exports = WriteFifo8Request;
/**
* The write 8-bit FIFO request (code 0x42).
*
* A binary representation of this request varies in length and consists of:
*
* - a ... |
/* ===========================================================
* jquery-onepage-scroll.js v1.3.1
* ===========================================================
* Copyright 2013 Pete Rojwongsuriya.
* http://www.thepetedesign.com
*
* Create an Apple-like website that let user scroll
* one page at a time
*
* Credi... |
/*global Android, DesktopReaderControl */
// Code that is shared between ReaderControl.js and MobileReaderControl.js
(function(exports) {
"use strict";
exports.ControlUtils = {};
// polyfill for console object
exports.console = exports.console || {
log: function () { },
warn: function ... |
// Test search
var assert = require('assert');
var fs = require('fs');
var parse_calendar = require('../lib/parser').parse_calendar;
describe("iCalendar.parse", function() {
it('parses data correctly', function() {
var cal = parse_calendar(
'BEGIN:VCALENDAR\r\n'+
'PRODID:-//Bobs S... |
var notes = {
note0: {
id: "note0",
title: "Scrambling sequences",
tags: ['sequences'],
reference: "22 jun 2015 LP5E (Learning Python 5th ed.) p. 609",
body: "<br>Move the front item to the end on each loop iteration<br><br>S = 'spam'<br>for i in range(len(S)):<br> S = S[1:] + S[:1]<br> print(S, end=' ')<br><br... |
if (window.string)
window.string += ', and the second too'
else
window.string = 'first file failed to load'
|
function defaultToIndex(){
Util.makeItReady;
}
function aboutFunction(event){
$('.aboutMe').show;
$('article').hide;
$('.aboutMe').load('/aboutMe.html');
}
articlesController = {};
articlesController.category = function (ctx, next) {
var categoryData = function(data){
ctx.articles = data;
next();
... |
'use strict';
/**
* @module code-project/handler/choose-repository
*/
const Octokat = require('octokat');
/**
* Lists Github repositories that instructor could use as a seed for the project
* @param {Request} request - Hapi request
* @param {Reply} reply - Hapi Reply
* @returns {Null} responds with HTML page
... |
define(function (require) {
var Reflux = require('reflux');
var DemoActions = require('app/actions/demo.actions');
return Reflux.createStore({
listenables: [DemoActions],
items : [],
onAddItem: function (obj) {
this.items.push(obj);
this.update();
... |
'use strict';
var test = require('tap').test;
var kagawa = require('../index.js');
test('property configuration is accepted for an array of primitives', function(t) {
t.plan(1);
var schema = {
list: {
each: {
type: 'email'
}
}
};
var obj = {
list: ['one', 'two', 'three']
... |
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
locations: {
src: {
scriptsDir: 'source/js'
},
dist: {
scriptsDir: 'build/js'
},
tests: {
scriptsDir: 'tests'
}
},
co... |
/**
* @ignore
* load tpl from file in nodejs
* @author yiminghe@gmail.com
*/
var fs = require('fs');
var Path = require('path');
var iconv, XTemplate;
var env = process.env.NODE_ENV || 'development';
try {
iconv = require('iconv-lite');
} catch (e) {
}
try {
XTemplate = require('xtemplate');
XTemplate = XTem... |
var data = {}
var count = 0;
$('#message').hide();
data.downloadLink = function() {
dataSelection = []
dataSelection.push($('#datasets').val());
dataSelection.push($('select[name=year]').val());
dataSelection.push($('#monthly-detail select').val());
$('#dimensions select').each(function() {
... |
// Copyright (c) 2014 RazorFlow Technologies LLP
// 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, merg... |
import angular from 'angular';
import module from '../app.module';
describe('Controller: AppController', function() {
beforeEach(angular.mock.module(module.name));
beforeEach(angular.mock.module(function($provide) {
$provide.service('AppService', function() {
});
}));
beforeEach(inject(function($rootScope, $... |
const React = require('react');
const ReactDOM = require('react-dom');
const request = require('ajax-request');
const DefineDefinition = require('./DefineDefinition');
const RcE = React.createElement;
const DefineWord = React.createClass({
displayName: 'DefineWord',
getInitialState: function() {
return {
word:... |
// Generated by CoffeeScript 1.7.1
(function() {
var NoEmptyParamList;
module.exports = NoEmptyParamList = (function() {
function NoEmptyParamList() {}
NoEmptyParamList.prototype.rule = {
name: 'no_empty_param_list',
level: 'ignore',
message: 'Empty parameter list is forbidden',
de... |
/*global describe, it*/
'use strict';
var assert = require('assert');
var ArgumentParser = require('argcoffee').ArgumentParser;
describe('optionals', function () {
var parser;
var args;
it('test options that may or may not be arguments', function () {
parser = new ArgumentParser({debug: true});
parse... |
/**
* Multiplies a value by 2. (Also a full example of Typedoc's functionality.)
*
* ### Example (es module)
* ```js
* import { double } from 'typescript-starter'
* console.log(double(4))
* // => 8
* ```
*
* ### Example (commonjs)
* ```js
* var double = require('typescript-starter').double;
* console.log(d... |
'use strict';
const angular = require('angular');
const uiRouter = require('angular-ui-router');
import routes from './customerActor.routes';
export class CustomerActorComponent {
/*@ngInject*/
constructor($http, $scope, $location, lookupService) {
this.$http = $http;
this.actorid = lookupService.getActi... |
import Vue from 'vue';
import Vuex from 'vuex';
import { createFlashStore } from 'vuex-flash';
import templates from '../lib/templates';
Vue.use(Vuex);
export default new Vuex.Store({
plugins: [
createFlashStore({
variants: [
...templates.bulma.variants(),
...templates.uikit.variants(),
... |
var test = require('tape-catch'); // use tape-catch in common test cases
// var test = require('tape'); // use pure tape in case of unexpected exeption to locate it source
// 'npm test' in package.json pipes output to tap-notify and tap-dot => output must be raw tap
// 'node tests/test.js' => output can be decorated b... |
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import { terser } from 'rollup-plugin-terser'
import vue from 'rollup-plugin-vue'
import css from 'rollup-plugin-css-only'
import pkg from './package.json'
const name = "VueTinymce"
const sourcemap = true
pkg.browser =... |
'use strict';
var squareEuclidean = require('ml-euclidean-distance').squared;
var NodeSquare = require('./node-square'),
NodeHexagonal = require('./node-hexagonal');
var defaultOptions = {
fields: 3,
randomizer: Math.random,
distance: squareEuclidean,
iterations: 10,
learningRate: 0.1,
gr... |
var path = require('path');
var fs = require('fs.extra');
var dot = require('dot');
function Template(){
var that = this;
var templateDir = '';
var templateFunc = function(data) {return data;}
function loadTemplates(){
var currentFolder = process.cwd();
var parents = currentFolder.split(path.sep);
... |
var execSync = require('child_process').execSync;
// let it only run once
console.log('> Building files (lerna).')
try {
execSync(
'lerna run build',
(error, stdout) => console.log(stdout, error)
);
} catch(e) {
console.error(e.stdout.toString('utf8'));
process.exit(1);
}
console.log(' Done.')
|
const pkg = require('../package');
const paths = require('./paths');
const umdConfig = {
devtool: 'source-map',
output: {
library: `${pkg.name}`,
libraryTarget: 'umd',
path: paths.distUmd,
umdNamedDefine: true,
},
};
module.exports = umdConfig;
|
import { computed } from '@ember/object';
import ContextualHelp from './bs-contextual-help';
import layout from 'ember-bootstrap/templates/components/bs-popover';
/**
Component that implements Bootstrap [popovers](http://getbootstrap.com/javascript/#popovers).
By default it will attach its listeners (click) to th... |
var utils = require('../../utils');
const linz = require('../../../');
/**
* Multiselect list filter.
* @param {Array} list The list array.
* @param {Boolean} multiple Enable multiselect.
* @param {Object} options Filter options.
* @param {Boolean} options.parseNumber Optionally parse the value as a number (This ... |
export const SLACK_CLIENT_SECRET = process.env.GONI_SLACK_SECRET || 'client_secret';
|
define(['core/dom'], function (dom) {
/**
* Style
*/
var Style = function () {
// para level style
this.stylePara = function (rng, oStyle) {
var aPara = rng.listPara();
$.each(aPara, function (idx, elPara) {
$.each(oStyle, function (sKey, sValue) {
elPara.style[... |
import { __ } from 'embark-i18n';
const async = require('async');
const stringReplaceAsync = require('string-replace-async');
const {callbackify} = require('util');
class ListConfigs {
constructor(embark) {
this.embark = embark;
this.events = embark.events;
this.logger = embark.logger;
this.config = ... |
var path = require("path"),
express = require("express")
module.exports = {
setup: function () {
this.express.on("creation", this.attachConfiguration)
},
attachConfiguration: function (app) {
this.app = app
app.configure(this.configure)
app.configure("development", devel... |
var app;
var tmtopup;
var iframe;
Polymer({
is: "topup-tmtopup",
ready: function() {
tmtopup = this;
this.showtopup = true;
this.userid = app.user.id;
iframe = document.createElement("IFRAME");
iframe.style.display = "hidden";
iframe.setAttribute("src", "/assets... |
/**
* All labels are tags. Not all tags are labels.
*/
var Tag = Backbone.RelationalModel.extend({
localStorage: new Backbone.LocalStorage("tag"),
relations: [{
type: 'HasMany',
key: 'children',
relatedModel: 'Tag',
collectionType: 'TagSet',
reverseRelation: {
key: 'parent',
inc... |
// All code points in the Syriac block as per Unicode v5.0.0:
[
0x700,
0x701,
0x702,
0x703,
0x704,
0x705,
0x706,
0x707,
0x708,
0x709,
0x70A,
0x70B,
0x70C,
0x70D,
0x70E,
0x70F,
0x710,
0x711,
0x712,
0x713,
0x714,
0x715,
0x716,
0x717,
0x718,
0x719,
0x71A,
0x71B,
0x71C,
0x71D,
0x71E,
0x71F,
... |
'use strict'
import test from 'ava'
import nock from 'nock'
import 'babel-core/register'
import * as app from '../src/fetch'
const listing = [{
name: 'README.md',
download_url: 'https://raw.githubusercontent.com/lab-coop/lab-governance/master/README.md',
}]
const githubApi = nock('https://api.github.com')
.get... |
import { Bar } from '@vx/shape';
import React from 'react';
import { shallow } from 'enzyme';
import { FocusBlurHandler } from '@data-ui/shared';
import { XYChart, BarSeries } from '../../src';
describe('<BarSeries />', () => {
const mockProps = {
xScale: { type: 'time' },
yScale: { type: 'linear', includeZ... |
import Ember from 'ember';
const { Component, computed } = Ember;
const { not } = computed;
export default Component.extend({
editable: not('course.locked'),
courseObjectiveDetails: false,
courseTaxonomyDetails: false,
courseCompetencyDetails: false,
actions: {
save: function(){
var self = this;
... |
var leiphp = require('./');
leiphp.startServer('f:\\github\\tmp\\2013-12-17\\typecho').listen(3001); |
'use strict';
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var paths = {
scripts: ['src/app/**/*.js', '!src/app/**/*.test.js']
};
gulp.task('lint', function() {
return gulp.src(paths.scripts)
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
});
|
// Load environment variables
require('dotenv').load();
// Required modules
var _ = require('underscore');
var async = require('async');
var kijiji = require('kijiji-scraper');
var spreadsheet = require("google-spreadsheet");
var express = require('express');
var app = express();
// Globals
var sheet, creds, location... |
document.body.oncontextmenu = function() {
return false;
};
var start_map = [];
var final_map = [];
var maxCellsInLine = 15;
var minCellsInLine = 1;
var maxFinalMaps = 3;
var minRateMapSize = 0.9;
//Storage.clear('maps');
var visualise = {"visibility": "visible"};
var hide = {"visibility": "hidden"};
//________... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+relay
* @flow
* @format
*/
// flowlint ambiguous-object-type:error
'use strict';
const React = require('reac... |
version https://git-lfs.github.com/spec/v1
oid sha256:1894210fb9c310e0d6c04788c8caf9892df0e280a6bd74e1985378c04f9d4ea5
size 21664
|
import createStoreShape from '../utils/createStoreShape';
import shallowEqual from '../utils/shallowEqual';
import isPlainObject from '../utils/isPlainObject';
import wrapActionCreators from '../utils/wrapActionCreators';
import invariant from 'invariant';
const defaultMapStateToProps = () => ({});
const defaultMapDis... |
const settings = require('./settings')
let PaneAxis = null
// Return adjacent pane of activePane within current PaneAxis.
// * return next Pane if exists.
// * return previous pane if next pane was not exits.
function getAdjacentPane (pane) {
const parent = pane.getParent()
if (!parent || !parent.getChildren) re... |
// mobile-menu
(function() {
var $mobileMenus = $('.mobile-menu');
var animSpeed = 400;
if ($mobileMenus.isset()) {
$mobileMenus.each(function() {
var $mobileMenu = $(this);
var $items = $mobileMenu.find('.mobile-menu__item');
var $submenus = $mobileMenu.find('.mobile-menu__submenu');
$items.on('cli... |
var fs = require('fs');
var _ = require('lodash');
var crontab = require('crontab');
var gruntCrontab = module.exports = function gruntCrontab(grunt, options) {
options = options || {};
var pkg = grunt.file.readJSON('./package.json');
var target = options.target || 'default';
var namespace = options.namespac... |
export default normalizeCommit;
import get from "lodash/get.js";
import fixturizeCommitSha from "../fixturize-commit-sha.js";
import fixturizePath from "../fixturize-path.js";
import setIfExists from "../set-if-exists.js";
function normalizeCommit(scenarioState, response) {
const sha = response.sha;
const treeSh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.