code stringlengths 2 1.05M |
|---|
var chai = require('chai');
var assert = chai.assert;
var mockery = require('mockery');
var sinon = require('sinon');
var travelScraperTestModule = '../../../server/webscrapers/travelScraper';
var lonelyPlanetUrl = "http://www.lonelyplanet.com";
var cheerioModuleStub = { load: function(){ } };
var cheerioDollarStub;
va... |
'use strict';
var Hoek = require('hoek');
// Declare internals
var internals = {};
internals.defaults = {};
exports = module.exports = internals.Connection = function(options) {
Hoek.assert(this.constructor === internals.Connection, 'No-op cache client must be instantiated using new');
this.settings = Hoek.... |
import { isCompanionAd } from './companion_ad';
import { isCreativeLinear } from './creative/creative_linear';
import { EventEmitter } from './util/event_emitter';
import { isNonLinearAd } from './non_linear_ad';
import { util } from './util/util';
/**
* The default skip delay used in case a custom one is not provide... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M22 6H12l-2-2H2v16h20V6zm-9 7v4h-2v-4H8l4.01-4L16 13h-3z" />
, 'DriveFolderUploadSharp');
|
import types from '../constants/actionTypes'
const initialState = {
isNavDrawerOpen: false,
snack: null,
}
export default function global(state = initialState, action) {
switch (action.type) {
case types.OPEN_NAVIGATION_DRAWER:
return {
...state,
isNavDrawerOpen: true,
}
case... |
import Ember from 'ember';
import { moduleForComponent, test } from 'ember-qunit';
import startApp from '../../helpers/start-app';
import hbs from 'htmlbars-inline-precompile';
var App;
moduleForComponent('advanced-form/simple-select', {
integration: true,
setup: function() {
App = startApp();
},
teardown... |
version https://git-lfs.github.com/spec/v1
oid sha256:d53a6e874df25ed2040564e60e6f16986b67feb1c62169e6bfa79a7867e35d2a
size 119661
|
const nodemailer = require('nodemailer'),
credentials = require('./credentials/Credentials'),
logger = require('./logger')
const EmailManager = {
// formatting shld be done prior to this
// returns false if not sent, true if sent
sendEmail: (subject, messageObject, formatter, callback) => {
con... |
// export individual components
import HelloWorld from './HelloWorld';
export {
HelloWorld
};
|
/**
* validate user account
*
* Password can NOT be tested at the server side,
* since it be sent with encrypted format.
*
*/
var checkUsername = function(value) {
var regex = /^[a-z0-9]+$/i;
if (! regex.test(value)) {
throw new Meteor.Error(ERROR_CODE_MATCH, 'error_invalid_type');
}
};
var checkPassw... |
const mysql = require('../utils/mysql_db.js');
const util = require('../utils');
/**
* 根据栏目分类ID查询栏目信息
*/
exports.queryCateById = function (id) {
return mysql.queryOne('select * from cms_category where id=?', [id]);
};
/**
* 根据栏目分类ID查询子栏目分类信息
*/
exports.queryChildrenCateById = function (id) {
return mysql.... |
module.exports = require("./lib/Device");
|
// Generated on 2014-12-31 using generator-angular 0.10.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Load grunt tasks a... |
'use strict'
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const autoIncrement = require('mongoose-auto-increment');
/**
* 小说章节。
*/
let chapterSchema = new Schema({
id: Number,
// 章节序号
serial: Number,
// 章节题目
title: String,
// 作者
author: String,
// 创建时间
createdAt: {
typ... |
var _ = require('lodash'),
utils = require('../utils');
var dataPrefix = '<tr><td><input type="checkbox" name="checkCtrl"></td>';
/**
* formats response data for client.
*/
// get the wanted fields values
function filterFields(values,fields){
var filterValues=[];
if(_.isArray(values)){
var length = val... |
import postcss from 'postcss';
const myPlugin = postcss.plugin('myPlugin', options => {
return css => {
css.walkDecls(decl => {
if (decl.prop === 'custom-background') {
decl.prop = 'background';
decl.value = decl.value.replace('💩','#7F4A1E');
const comment = postcss.commen... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
const Firebase = require('firebase');
const crypto = require('crypto');
const _ = require('lodash');
const mailer = require('./../mailer');
const config = require('./../config');
const fb = new Firebase(config.FB_DB);
const getDomainFromEmail = (email) => {
const email_string_array = email.split("@");
return '@' ... |
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function (Controller) {
"use strict";
return Controller.extend("standalone.unit.controller.BaseController", {
/**
* Convenience method for accessing the router.
* @public
* @returns {sap.ui.core.routing.Router} the router for this component
*/
... |
describe("About Functions", function() {
it("should declare functions", function() {
function add(a, b) {
return a + b;
}
expect(add(1, 2)).toBe(3);
});
it("should know internal variables override outer variables", function () {
var message = "Outer";
function getMessage() {
... |
'use strict';
var res = require('../lib/response');
var control = require('../Controls/controller');
var util = require('../lib/util');
var fs = require("fs");
var path = require('path');
var log4js = require('../config/log');
var args,slice = Array.prototype.slice;
var middleware = {};
var router = module.exports ... |
var AuthorSource = {
getAuthor:function(page=1,limit=10,params={}){
return new Promise(function(resolve,reject){
var url = "/api/author";
var param = {
"page": page,
"limit": limit,
"query": params
};
$.get(url, ... |
version https://git-lfs.github.com/spec/v1
oid sha256:8caff3f49234bae4d9109d6723197472b536f316a9299e6b96ac9b043ea37e7a
size 2785
|
version https://git-lfs.github.com/spec/v1
oid sha256:4e76245bf70b70d6a88d24e7857f76942daba172e8b9d83c5dfb9cee1d26eb09
size 962996
|
"use strict";
module.exports = function (grunt, options) {
return {
prod: { // Target
options: { // Target options
removeComments: true,
collapseWhitespace: true
},
files: [{
cwd: '<%= config.paths.build.dev_htdocs %>',
... |
// used as common object for all validators
export default (valid, message = '') => ({ valid, message });
|
jQuery(document).ready(function($) {
if (jQuery('#newsletter-dataTable').length > 0) {
var oTable;
// Add the events etc before DataTables hides a column
jQuery("thead input").keyup(function() {
//Filter on the column (the index) of this element
oTable.fnFilter(this.value, oTable.oApi._fnVisibleToColumnIn... |
/**
* This unit test file was auto generated via a gulp task.
* Any formatting issues can be ignored
*/
'use strict';
var _ = require('lodash'),
expect = require('must'),
lodashCollectionHelpers = require('./lodash-collection-helpers'),
bankUserInfoData = require('../test/bankUserInfo'),
userInfoData = require(... |
(function (window, factory) {
if (typeof define === 'function' && define.amd) {
define(['angular'], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = factory(require('angular'));
} else {
window.ngRequiredParams = factory(window.angular);
}
}(window, (angular) => ... |
const Realtime = require('../src/realtime')
const assert = require('assert')
describe('push', () => {
describe('registerWatch', () => {
it('should return the appropriate object containing the URL array and custom callback', () => {
let watchObj = Realtime.push.registerWatch('watch me!', ['url1', 'url2'], (... |
import IssuableFilteredSearchTokenKeys from 'ee_else_ce/filtered_search/issuable_filtered_search_token_keys';
import initIssuablesList from '~/issuables_list';
import projectSelect from '~/project_select';
import initFilteredSearch from '~/pages/search/init_filtered_search';
import issuableInitBulkUpdateSidebar from '~... |
import { createAction } from 'bouchon';
/**
* Actions
*/
const actions = {
get: createAction(),
};
/**
* Selectors
*/
export const selectors = {};
selectors.authors = () => state => state.library.paris.authors;
/**
* Specs
*/
export default {
name: 'authors',
endpoint: 'authors',
data: require('... |
/*
* Copyright (c) 2008-2011 Hasso Plattner Institute
*
*
* 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, m... |
import expect from 'expect';
import db from '../../app/models';
import helper from '../helper/test-helper';
describe('ROLE', () => {
let guestRole;
describe('Create Role', () => {
it('should create a role', (done) => {
db.Role.create(helper.guestRole)
.then((role) => {
guestRole = role... |
const Keeper = require('../models/Keeper');
const User = require('../models/User');
const async = require('async');
exports.getKeepersPage = (req, res) => {
let myModel = [];
let keeperMax = 0;
User.find({}).exec((err, users) => {
myModel = users;
let numRunningQueries = 0;
myModel.forEach((u) => {... |
define(function(require) {
var app = require('app');
var $ = require('jquery');
app.controller('AdminIndexController', function ($rootScope, $scope, $location,$anchorScroll) {
console.log('AdminIndexController');
});
}); |
// @flow
/**
* This file provides support to buildMathML.js and buildHTML.js
* for stretchy wide elements rendered from SVG files
* and other CSS trickery.
*/
import {LineNode, PathNode, SvgNode} from "./domTree";
import buildCommon from "./buildCommon";
import mathMLTree from "./mathMLTree";
import utils from "./... |
import React, { PropTypes } from 'react'
import classnames from 'classnames'
import { ListGroupItem, Button } from 'react-bootstrap'
import { FilePlayer } from 'voicebase-player-v2';
export default class UploadPreviewItem extends React.Component {
static propTypes = {
file: PropTypes.object.isRequired,
fileI... |
/**
* Created with JetBrains RubyMine.
* User: teamco
* Date: 11/24/12
* Time: 10:12 PM
* To change this template use File | Settings | File Templates.
*/
import {BaseElement} from '../../../modules/Element';
/**
* @extends BaseElement
* @class PageElement
* @type {PageElement}
*/
export class PageElement e... |
/**
* matter-js 0.14.2 by @liabru 2018-06-11
* http://brm.io/matter-js/
* License MIT
*/
/**
* The MIT License (MIT)
*
* Copyright (c) Liam Brummitt and contributors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the ... |
"use strict";
var mockito4js = getMockito4jsBuilder().build(getMockito4jsBuilder()); |
(function(g) {
"use strict";
g.load('gdata', '1');
var
body = document.body,
cal = document.getElementById('calendar'),
feed = 'https://www.google.com/calendar/feeds/4qc3thgj9ocunpfist563utr6g@group.calendar.google.com/public/full',
service,
months = [
'J... |
angular.module('UserModule').controller('AdministrationController', ['$scope', '$state','$http', 'toastr', function($scope,$state, $http, toastr){
$scope.me = window.SAILS_LOCALS.me;
if (!$scope.me.admin) $state.go('home');
$scope.recordSave = 'Запись успешно сохранена!';
// set-up loading state
$sc... |
var link=message.content(owner);
bot.setAvatar(link);
|
import React from 'react';
import { createRendererWithUniDriver, cleanup } from '../../../test/utils/unit';
import Subheader from './Subheader';
import { cardSubheaderDriverFactory } from './Subheader.uni.driver';
describe('Subheader', () => {
const render = createRendererWithUniDriver(cardSubheaderDriverFactory);
... |
'use strict';
const fs = require('fs');
const path = require('path');
const utils = require('./scripts/utils.js');
const parsers = require('./scripts/parse-blocks-scripts-properties.js');
parsers.parseBidiBrackets = require('./scripts/parse-bidi-brackets.js');
parsers.parseCaseFolding = require('./scripts/parse-case-f... |
'use strict';
var BaseRequest = require('./BaseRequest'),
util = require('util'),
iyzicoUtils = require('../utils'),
SubscriptionCustomer = require('./model/SubscriptionCustomer');
function CreateSubscriptionCustomerRequest(request) {
BaseRequest.call(this, iyzicoUtils.mergeObjects({
locale: r... |
/**
* Created by Papa on 5/28/2016.
*/
"use strict";
const LocalStoreConfig_1 = require("./LocalStoreConfig");
const DeltaStoreConfig_1 = require("./DeltaStoreConfig");
const index_1 = require("delta-store/lib/index");
const LocalStoreApi_1 = require("../localStore/LocalStoreApi");
const IdGenerator_1 = require("../l... |
/*!
* js-file-browser
* Copyright(c) 2011 Biotechnology Computing Facility, University of Arizona. See included LICENSE.txt file.
*
* With components from: Ext JS Library 3.3.1
* Copyright(c) 2006-2010 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
*/
/*!
* Ext JS Library 3.3.1
* Copyrigh... |
/**
* Popup script
*/
'use strict';
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/app-component';
/**
* Temporary solution.
* At least required for autocomplete component
* @see https://github.com/callemall/material-ui#react-tap-event-plugin
... |
//定义界面数据,主要用于设置语言,固定的id名叫iData
define({
header: [{
id: "inputData",
text: "输入数据"
}, {
id: "viewData",
text: "查看数据"
}],
card: {
inputData: {
top: {
title: "输入数据",
content: "将数据字符串粘贴到文本域内"
},
main: ... |
'use strict';
angular.module('shufabeitie.show', ['ngRoute', 'ksSwiper'])
.config(['$routeProvider',
function($routeProvider) {
$routeProvider.when('/shufa/:author/:fatie', {
templateUrl: 'show/show.html',
controller: 'ShowCtrl'
});
}
])
.directive('ksFatieImage', func... |
// ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
// Portions ©2008-2010 Apple Inc. All rights reserved.
// License: Licensed under MIT license (see license.js)
// ... |
'use strict';
const ghGot = require('gh-got');
function searchCommits(email, token) {
return ghGot('search/commits', {
token,
query: {
q: `author-email:${email}`,
sort: 'author-date',
// eslint-disable-next-line camelcase
per_page: 1
},
headers: {
accept: 'application/vnd.github.cloak-preview',... |
"use strict";
var myobj = {
myprop: 1,
'my-prop': 2,
"my'-prop": 3
};
|
// Imports.
var fs = require('fs');
var helpers = require('helpers');
var inherits = require('inherits');
/**
* Test Suite
* PLEASE, DO NOT TOUCH IT
*
* @package gina
* @author Rhinostone
*/
var TestSuite = function() {
var self = this;
this.root = __dirname;
var d = _(__dirname).split(/\//... |
/*!
* Material Design for Bootstrap 4
* Version: MDB FREE 4.16.0
*
*
* Copyright: Material Design for Bootstrap
* https://mdbootstrap.com/
*
* Read the license: https://mdbootstrap.com/general/license/
*
*
* Documentation: https://mdbootstrap.com/
*
* Getting started: https://mdbootstrap.... |
var parse = {
/*
* 解析模板为执行函数
*/
get: (function() {
var regmap = [
// if语句开始
{reg: /^if\s+(.+)/i, val: function(all, condition) {return 'if(' + condition + ') {';}},
// elseif 语句开始
{reg: /^elseif\s+(.+)/i, val: function(all, condition) {return '} else if(' + condition + ') {';}},
... |
// detect node for conditional import for jsonToFormData
const isNode = typeof process !== 'undefined' && process.versions && !!process.versions.node
if (isNode) {
// TODO : deal with node.js side for example using https://www.npmjs.com/package/form-data: fake one for now
}
export function jsonToFormData (jsonData) {... |
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return Ember.A([{
name: 'Frozen yogurt',
calories: 159,
fat: 6.0,
carbs: 24,
protein: 4.0,
sodium: 87,
calcium: 14,
iron: 1
}, {
name: 'Ice cream sandwich',
calories: 237,
... |
'use strict';
var _get = function get(_x4, _x5, _x6) { var _again = true; _function: while (_again) { var object = _x4, property = _x5, receiver = _x6; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = ... |
'use strict';
describe('myApp.items module', function() {
beforeEach(module('myApp.items'));
describe('items controller', function(){
it('should ....', inject(function($controller) {
//spec body
}));
});
}); |
/**
* Created by hbzhang on 10/5/15.
*/
//http://stackoverflow.com/questions/26523093/sync-control-flow-using-nodejs-async-waterfall-each-and-mysql
'use strict';
var najax = require('najax');
//var _ = require('lodash');
var async = require('async');
//var Agenda = require('agenda');
var schedule = require('node-s... |
@task *pollForChanges() {
while(true) {
yield pollServerForChanges();
if (Ember.testing) { return; }
yield timeout(5000);
}
}
|
/**
* Created by joehua on 7/6/15.
*/
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var baseModelPlugin = require('./../../utilities/base-model-plugin');
var ArticleSpintax = require('./article-spintax.model.js');
var ArticleSchema = new Schema({
code: String,
title: Stri... |
'use strict';
/* jasmine specs for filters go here */
describe('filter', function() {
beforeEach(module('opennms.filters'));
describe('interpolate', function() {
beforeEach(module(function($provide) {
$provide.value('version', 'TEST_VER');
}));
it('should replace VERSION', inject(function(in... |
import moment from 'moment';
export const calHeight = 270;
export const cellHeight = 20;
export const yearHeight = 32;
export const yearLength = +moment.duration(1, 'year');
export function linear(x0, y0, a) {
return {
y(x) {
return +y0 + (x - x0) * a;
},
x(y) {
return +x0 + (y - y0) / a;
... |
let config;
config = {
apiUrl: 'http://ergast.com/api/f1/',
dateFormat: 'yyyy/MM/dd'
};
export default config;
|
(function(){
/**
An Environment object holds <variable,value> pairs and
it has a link to the rest of the objects in the environment
chain. This link is used to look up "non-local" variable
references.
The Environment interface has methods for
1) Adding new <variable,value> pairs to this environme... |
var expect = require('expect.js')
, storageModule = require('../lib/storage/inMemory/storage');
describe('Storage', function() {
var storage;
describe('beeing not connected', function() {
describe('calling createStorage', function() {
describe('without a callback', function() {
... |
import Promise from 'pinkie';
import TestRun from '../test-run';
import TEST_RUN_STATE from './test-run-state';
import COMMAND_TYPE from '../test-run/commands/type';
import { UnlockPageCommand } from '../test-run/commands/service';
const TEST_RUN_ABORTED_MESSAGE = 'The test run has been aborted.';
export const TestRu... |
const _ = require('underscore');
const XlsxPopulate = require('xlsx-populate');
const tracesService = require('./traces.service')
const cfgService = require('./config.service');
const EXCEL_PATH = cfgService.getProperty('node').templates.excel;
exports.trxToExcel = trxToExcel;
/**
* @desc En base a una salida de una... |
'use strict'
var tap = require('tap')
var testVersion = '4'
process.env.API_VERSION = testVersion
var config = require('../config')
tap.equal(config.API_VERSION, testVersion, 'It supports API_VERSION through env')
|
/* setup.js */
import "babel-polyfill";
import JSDOM from "jsdom";
const Adapter = require("enzyme-adapter-react-15");
const { configure } = require("enzyme");
require("jsdom-global")();
configure({ adapter: new Adapter() });
|
/**
* Module dependencies
*/
var fs = require('fs');
var express = require('express');
var mongoose = require('mongoose');
var passport = require('passport');
var config = require('config');
var app = express();
var port = process.env.PORT || 3001;
// Connect to mongodb
var connect = function () {
var options =... |
!function(){"use strict";module.exports=require("./lib/React"),module.exports=require("./lib/ReactDOM")}(); |
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
NavigatorIOS,
} = React;
var Dashboard = require('./App/Views/Dashboard/index.ios.js');
var HackerNews = React.createClass({
render: function() {
return (
<NavigatorIOS
style={styles.container}
tintCo... |
/*Sorting an array means to arrange its elements in increasing order.
Write a script to sort an array.
Use the selection sort algorithm: Find the smallest element, move it at the first position,
find the smallest from the rest, move it at the second position, etc.
Hint: Use a second array */
console.log('===========... |
/**
* Created by qcplay on 7/9/15.
*/
var BlendTexture = defineFilter('qc.Filter.BlendTexture', qc.Filter, function(game) {
this.mixing = 0.5;
this.otherTexture = null;
this.vertexSrc = [
'attribute vec2 aVertexPosition;',
'attribute vec2 aTextureCoord;',
'attribute vec2 aOtherText... |
import {
GraphQLEnumType,
} from 'graphql';
export default new GraphQLEnumType({
name: 'MeteorMetricResolution',
description: 'TODO description',
values: {
RES_1MIN: {value: '1min'},
RES_30MIN: {value: '30min'},
RES_3HOUR: {value: '3hour'},
}
});
|
"use strict";
var should = require('should');
var rarity = require('../lib/');
describe('rarity.pad()', function() {
var EXPECTED_RESULT = "expectedResult";
var noop = function() {};
var shittyFunction = function(cb) {
process.nextTick(function() {
cb(EXPECTED_RESULT);
});
};
it("should fail... |
/**
* Various generic JavaScripts for Anqh.
*
* @package Anqh
* @author Antti Qvickström
* @copyright (c) 2010-2014 Antti Qvickström
* @license http://www.opensource.org/licenses/mit-license.php MIT license
*/
Anqh = Anqh || {};
// Google Maps Geocoder
Anqh.geocoder = null;
// Google Maps Map
Anqh.... |
//Because Browserify encapsulates every module, use strict won't apply to the global scope and break everything
'use strict';
//Require necessary modules
var System = require('./core/system.js');
//The initialize Module
var Intialize = function initializeSystem() {
var options = {
//Empty for now
};
... |
define([], function() {
return function() {
var container = document.querySelector( ".video-container" ),
baseFontSize = 14,
baseContainerWidth = 560;
container.style.fontSize = ( baseFontSize * ( container.offsetWidth / baseContainerWidth ) ) + "px";
};
});
|
var MediaFilter = function ($mdMedia) {
'use strict';
return function (input) {
return $mdMedia(input);
};
};
MediaFilter.$inject = ['$mdMedia'];
module.exports = MediaFilter;
|
'use strict';
/* eslint no-new-func: "off" */
const upperFirst = require('upper-case-first');
const { CAMEL_CASE_CONVENTION, PASCAL_CASE_CONVENTION, SNAKE_CASE_CONVENTION } = require('./fieldConventions/constants');
const conventionsFactory = require('./fieldConventions/conventionsFactory');
const BaseMapInstance =... |
var mongooseConnection = require('../../../config/mongoose-connection').open('test'),
mongoose = require('mongoose'),
ObjectID = require('mongodb').ObjectID,
TextLog = require('../../../models/textLog'),
should = require('should');
/*
* Mocha Test
*
* Tests are organized by having a "describe" and "it" meth... |
var proxy = require('../../model/linkProxy.js');
export function get(req, res, next) {
proxy.get(req,res);
}
|
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __assign = (this && this.__assign) || Object... |
'use strict'
/*****************************************************************
*
* Declare app level module which depends on views, and components
*
******************************************************************/
angular.module('app', [
'btford.socket-io',
'sqwk'
])
/*****************************************... |
/**
* Copyright (c) 2017-present, Liu Jinyong
* All rights reserved.
*
* https://github.com/huanxsd/MeiTuan
* @flow
*/
import React, { PureComponent } from 'react'
import { View, Text, StyleSheet, InteractionManager } from 'react-native'
import { WebView } from 'react-native-webview'
type Props = {
navigat... |
NetInfo = new Mongo.Collection("networking");
var pythonPath = "/path/to/bin/python";
var scriptPath = "/path/to/nettop.py";
var bytesToSize = function (bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
bytes = parseInt(bytes);
if (bytes == 0) return '0 Bytes';
var i = parseInt(Math.floor(Math.log(by... |
/** Copy own-properties from `props` onto `obj`.
* @returns obj
* @private
*/
/* global ReactEventBridge:false, internalInstanceKey:false */
// m-start
import options from './options';
import { ATTR_KEY } from './constants';
function getInternalInstanceKey() {
if (typeof internalInstanceKey !== 'undefined') {
r... |
export const ic_grade_twotone = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M17.11 10.83l-2.47-.21-1.2-.1-.47-1.11L12 7.13l-.97 2.28-.47 1.11-1.2.1-2.47.21 1.88 1.63.91.79-.27 1.17-.57 2.42 2.13-1.28 1.03-.63 1.03.63 2.1... |
// var Promise = require('bluebird');
// var request = require('request');
//
//
// var address = "https://api.github.com/repos/jThreeJS/jThree-Example";
//
// var co = require('co');
// co(function *() {
// var branchesUrl = address + "/branches"
//
// var masterUrl = (yield p(branchesUrl)).filter(function (o) {
/... |
var elixir = require('laravel-elixir');
require('laravel-elixir-angular');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some... |
var TestResponses = {
generic: {
status: 200,
responseText: 'ok'
},
events: {
status: 200,
responseText: JSON.stringify({
events: {
event1: 1,
event2: ['a','b','c']
}
})
},
messages: {
status: 200,
responseText: JSON.stringify({
events: {
statusmessage: [
{content:"Test 1"... |
/*
Re: NSColor to CGColor by j o a r
http://www.cocoabuilder.com/archive/message/cocoa/2006/11/12/174339
static CGColorRef CGColorCreateFromNSColor (CGColorSpaceRef
colorSpace, NSColor *color)
NSColor *deviceColor = [color colorUsingColorSpaceName:
NSDeviceRGBColorSpace];
float components[4];
[device... |
/**
* Uses wintersmith programatically to create a build.
*
* Duplicated here so the wintersmith version can be easily controlled
* via npm (and wintersmith does not need to be installed globally).
*/
var wintersmith = require('wintersmith')
var env = wintersmith('config.json')
env.build(function (err) {
if (... |
import 'babel-polyfill';
import { AppContainer } from 'react-hot-loader';
import React from 'react';
import {render} from 'react-dom';
import { browserHistory } from 'react-router';
import App from './app';
import './styles/main.scss';
import {buildCheckIfAuthed} from 'helpers/auth';
var configureStore = require('./sto... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.