code stringlengths 2 1.05M |
|---|
/**
* Created by jf on 15/10/27.
*/
import React from 'react';
import classNames from 'classnames';
class Mask extends React.Component {
static propTypes = {
transparent: React.PropTypes.bool
};
static defaultProps = {
transparent: false
};
render() {
const {transpare... |
const path = require("path");
function Module(name, baseDir) {
this.name = name;
this.dir = path.join(baseDir, name, "../");
this.file = path.join(baseDir, name) + ".js";
// Determine if the module name is relative.
if (name.indexOf("../") === 0 || name.indexOf("./") === 0) {
this.isRelative = true;
}... |
// START
var timeSinceLastRun = new Date().getTime();
var runInterval = 20;
function run() {
var diff = new Date().getTime() - timeSinceLastRun;
runInterval = runInterval * 0.8 + diff * 0.2;
timeSinceLastRun = new Date().getTime();
loop.step();
loop.update();
loop.debug();
loop.draw(... |
(function() {
"use strict";
var Flattener = function() {};
Flattener.prototype.flatten = function(nestedArray) {
//base case is an element that doesn't contain an array
var flat = [];
for(var i = 0; i < nestedArray.length; i++) {
if(Array.isArray(nestedArray[i])) {
... |
/**
* @author sunag / http://www.sunag.com.br/
*/
import { TempNode } from '../core/TempNode.js';
import { ConstNode } from '../core/ConstNode.js';
import { StructNode } from '../core/StructNode.js';
import { FunctionNode } from '../core/FunctionNode.js';
import { FunctionCallNode } from '../core/FunctionCallNode.js... |
$(document).ready(function(){
$(".playa").each(function(i){
var element = this;
var playa;
$(this).find(".playlist").each(function(){
if(this.value){
playa = Playa.setup(element.id, Playlist.initWithJSON(this.value));
}else{
playa = Playa.setup(element.id, Playlist.initWithHTM... |
/*!
* Hsiao-Notice 0.2.0 (http://www.fackyou.org)
* 自用JQuery轻量级提示插件
* Author:Delay.Hsiao <fuck@fackyou.org/547084615>
* Licensed under the MIT license
*/
$.notice=$.HsiaoNotice=function(a){var b={type:null,message:null,callback:function(){},timeout:1E3,context:"body",icon:""};init=function(){$(".dn-notice").remo... |
module.exports = function(cv) {
function reshapeRectAtBorders(rect, imgDim) {
const newX = Math.min(Math.max(0, rect.x), imgDim.cols)
const newY = Math.min(Math.max(0, rect.y), imgDim.rows)
return new cv.Rect(
newX,
newY,
Math.min(rect.width, imgDim.cols - newX),
Math.min(rect.heig... |
'use strict';
module.exports = {
set: function (v) {
this.setProperty('-webkit-print-color-adjust', v);
},
get: function () {
return this.getPropertyValue('-webkit-print-color-adjust');
},
enumerable: true
};
|
version https://git-lfs.github.com/spec/v1
oid sha256:f832da2ebdcff2d8947e890297160b79f8213f4e6fa4fcf5ab1ae42fb7d51243
size 193
|
(function () {
"use strict";
angular.module('facadu')
.directive('quickEditBubble', QuickEditDirective);
/////////////////
QuickEditDirective.$inject = ['PATHS'];
function QuickEditDirective(PATHS) {
//noinspection UnnecessaryLocalVariableJS
var directive = {
r... |
System.config({
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"es7.decorators",
"es7.classProperties",
"runtime"
]
},
paths: {
"*": "dist/*",
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
map: {
"aurelia-a... |
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
function printSprites(context) {
return {
inserted: context.insertedSprites.map((s) => s.owner.value.message),
kept: context.keptSprites.map((s) => s.owner.value.message),
remo... |
import Node from '../Node.js';
import extractNames from '../utils/extractNames.js';
function getSeparator ( code, start ) {
let c = start;
while ( c > 0 && code[ c - 1 ] !== '\n' ) {
c -= 1;
if ( code[c] === ';' || code[c] === '{' ) return '; ';
}
const lineStart = code.slice( c, start ).match( /^\s*/ )[0];
... |
(function(){
var ENV = '';
var defaultOptions = {
source: 'CDN',
firebaseURL: 'https://cdn.firebase.com/js/client/2.4.2/firebase.js',
firebaseRoot: 'https://eleme-flowchart.firebaseio.com/'
};
function loadScript(src, fn) {
var script = document.createElement('script');
script.src = src;
... |
import { MessageDispatcher } from './message.dispatcher';
import { Message } from './message';
describe(`MessageDispatcher`, () => {
const actionAllocator = {
actionA: {
fn: () => {
},
filter: (input) => !!input,
},
actionB: () => {
},
};
... |
import THREE from 'three';
export default class BrightnessShader {
constructor () {
return {
uniforms: {
"tDiffuse": { value: null },
"brightness": { type:"f", value: 1 },
},
vertexShader: `
varying vec2 vUv;
void main() {
vUv = uv;
gl_Positi... |
/*global m */
(function Deck(n) {
'use strict';
//
n.showCard = function (index) {
var deck = document.getElementById('listagram');
deck.showCard(index);
};
// declaring controller
n.model = function () {
this.id = m.prop('listagram');
};
// exporti... |
// declare a module
var myAppModule = angular.module('hiragana', []);
myAppModule.controller('ColorController', ['$scope', function($scope) {
$scope.reset = function(user) {
user.color = '069';
};
$scope.$watch('user.color', function(newValue, oldValue) {
$('footer').css('background-color', '#'+newValue)... |
const fs = require('fs');
const path = require('path');
const _ = require('lodash');
const mkdirp = require('mkdirp').sync;
const deps = require('./util/deps');
const git = require('./util/git');
const exec = require('./util/exec');
const link = require('./util/link');
const promise = require('./util/promise');
const... |
Dagaz.Controller.persistense = "session";
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:... |
$.deparam=function(params,coerce){var obj={},coerce_types={'true':!0,'false':!1,'null':null};$.each(params.replace(/\+/g,' ').split('&'),function(j,v){var param=v.split('='),key=decodeURIComponent(param[0]),val,cur=obj,i=0,keys=key.split(']['),keys_last=keys.length-1;if(/\[/.test(keys[0])&&/\]$/.test(keys[keys_last]))... |
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
],
// add yo... |
'use strict';
var React = require('react');
var Style = require('./style');
var Symbol = require('./PercentageSymbol');
var Application = React.createClass({
//Define propTypes only in development
getDefaultProps: function(){
return{
start: 0,
stop: 5,
step: 1,
empty: Style.empty,
... |
import React, { PropTypes } from "react";
import Todo from "./Todo";
class Todos extends React.Component {
constructor(props) {
super(props);
}
componentWillMount() {
if (typeof this.props.loadTodos === "function") {
this.props.loadTodos();
}
}
render() {
... |
//Loading the crypto module in node.js
var crypto = require('crypto');
//creating hash object
var hash = crypto.createHash('sha384');
//passing the data to be hashed
data = hash.update('nodejsera', 'utf-8');
//Creating the hash in the required format
gen_hash= data.digest('hex');
//Printing the output on the console
c... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("... |
module.exports = function(grunt) {
grunt.registerTask('test', [
'clean:tests',
'jshint:tests',
'karma:test'
]);
};
|
/**
* Detect if the device has a Touchscreen.
*
* @category Detect
* @return {Boolean} true or false
* @example
*
* hasTouchScreen();
* // => true|false
*/
function hasTouchScreen() {
return ('ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch) ? !0 : !1;
}
|
module.exports = {
options: {
branch: "gh-pages",
tag: "v<%= pkg.version %>",
message: "politespace <%= pkg.version %> [ci skip]"
},
src: [
"<%= pkg.config.dist %>/**/*",
"<%= pkg.config.test %>/**/*",
"<%= pkg.config.demo %>/**/*"
]
};
|
/////////////////////////////////////////////////
// Filename: stone.js
// Author: jerry_0824
// Email: 63935127#qq.com
// Phone: +86-155-8287-7999
// Date: 2016-05-27
// Time: 15:48
// Version: v1.0.2
/////////////////////////////////////////////////
function checkRepassword()
{
var str_password ... |
#!/usr/bin/env node
'use strict';
const Bot = require('./bot/Bot');
const ModuleGuildWars2 = require('./src/modules/guildwars2');
const ModuleSchedule = require('./src/modules/schedule');
const ModuleUtilities = require('./src/modules/utilities');
const ModuleFun = require('./src/modules/fun');
const bot = new Bot();... |
module.exports = function addU(x, y) { return x + y }
|
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('test-script-link', 'Unit | Serializer | TestScript_Link', {
needs: [
'serializer:test-script-link',
'model:meta',
'model:narrative',
'model:resource',
'model:extension'
]
});
test('it serializes records', function(assert) {
... |
/* eslint-disable no-console */
const express = require('express')
require('dotenv').config()
const config = require('./config.js')
// Define Routes
const index = require('./routes/index')
const app = express()
const PORT = process.env.PORT || 3000
// Middleware
app.use(express.static(config.Dir.dist))
// Use rout... |
'use strict';
/* eslint global-require:0 */
module.exports = require('./baseApi.js'); |
const mongoose = require("mongoose");
const config = require("../../config");
const {
EmployeeModel,
OrganisationModel,
RoleModel,
TableModel,
RoomModel,
PositionModel
} = require("./mongoModels");
mongoose.Promise = Promise;
mongoose.connect(config.mainMongo.url, config.mainMongo.options);
mongoose.conn... |
const fs = require('fs');
const join = require('path').join;
const rimraf = require('rimraf');
const assert = require('assert');
const root = join(__dirname, 'integrations');
function runIntegrations(basePath, version) {
this.timeout(5000);
const output = join(basePath, '_out');
rimraf.sync(output);
... |
'use strict';
var stores = require('./stores');
var simplememolap = (function () {
function getDimensionOffset(name, dimensions) {
for (var k = 0; k < dimensions.length; k++)
if (dimensions[k].name == name)
return k;
return -1;
}
... |
quail.lib.wcag2.Criterion = (function () {
// Provide default values for the assert objects
function aggregateParts (parts, defaultResult) {
var getResultPriority = quail.lib.wcag2.EarlAssertion.getResultPriority;
var outcome = {result: defaultResult};
$.each(parts, function (i, part) {
if (getR... |
const yayson = require('./yayson')
const legacyPresenter = require('./yayson/legacy-presenter')
const legacyStore = require('./yayson/legacy-store')
module.exports = function (options = {}) {
const { Store, Presenter, Adapter } = yayson(options)
return {
Store: legacyStore(Store),
Presenter: legacyPresente... |
App.sensor = (function() {
var config = { container: "status_indicator", channel: "sensor", user: "usgard" };
function init(configuration) {
config = Object.assign({}, config, configuration);
App.channel.init({identifiers: identifier(), functions: subscriptionFunctions()});
}
function identifier() {... |
var http = require("http"),
url = require("url"),
util = require("util"),
AWS = require("aws-sdk"),
dns = require("dns"),
Q = require("q"),
Marathon = require("./lib/marathon.js"),
utils = require("./lib/utils.js"),
debug = require("debug")("dns");
debug.marathon = require("debug")("dns... |
var express = require('express');
var path = require('path');
var fs = require('fs');
var preloader = require('../src/componentDataPreloader.js');
var app = express();
var clientPath = path.join(__dirname, '../client');
app.get('/', function(request, response) {
loadFile(request.path, function(err, html) {
if (... |
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['plugin:node/recommended'/*, 'plugin:prettier/recommended'*/],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
settings: {
node: {
tryExtensions: ['.js', '.json', '.ts', '.d.ts'],
},
},
rules... |
'use strict';
/**
* @ngdoc filter
* @name frontendApp.filter:rangoFecha
* @function
* @description
* # rangoFecha
* Filter in the frontendApp.
*/
angular.module('frontendApp')
.filter('rangoFecha', function() {
return function(input, range) {
var out = [];
console.log(range);... |
/*
* grunt-ringci
* https://github.com/dostokhan/grunt-ringci
*
* Copyright (c) 2016 Moniruzzaman Monir
* Licensed under the MIT license.
*/
'use strict';
const vm = require('vm');
const util = require('util');
module.exports = exportTask;
function exportTask(grunt) {
// Please see the Grunt documentation fo... |
import reduxCrud from 'redux-crud';
export default reduxCrud.reducersFor('transactions', {store: reduxCrud.STORE_MUTABLE});
|
twssApp.controller('navController', ['$scope', '$location','$window', '$http','Socket', function($scope, $location, $window, $http,Socket){
$scope.isActive = function(destination){
// console.log(destination);
// console.log($location.path());
return $location.path().indexOf(destination) > -1;
};
$scope.f... |
//=============================================================================
// ShowIncredibleActions.js
// ----------------------------------------------------------------------------
// Copyright (c) 2017 Tsumio
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
/... |
(function() {
var scene, camera, renderer, sprite, prevFrame = 0, keyboard = new Keyboard();
function createSprite(width, height, color) {
//var image = new THREE.ImageUtils.loadTexture(image);
var material = new THREE.MeshBasicMaterial({color: color});
var geometry = new THREE.BoxGeome... |
import * as tk from '../../ui/toolkit.js'
import * as workbench from '../workbench'
import * as cad_utils from '../cad-utils'
import Vector from '../../math/vector'
import {Matrix3, ORIGIN} from '../../math/l3space'
import {OpWizard, IMAGINE_MATERIAL, BASE_MATERIAL} from './wizard-commons'
export function ExtrudeWizar... |
require("requirish")._(module);
var hexy = require("hexy");
var should = require("should");
var path = require("path");
import crypto_utils from "lib/misc/crypto_utils";
var make_lorem_ipsum_buffer = require("test/helpers/make_lorem_ipsum_buffer").make_lorem_ipsum_buffer;
describe("Crypto utils", function () {
it... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
var _defineProperty3 = _interopRequireDefault(_define... |
/*global window*/
window.Observable = (function(){
'use strict';
var Observable = function(){
this.listeners = {};
};
Observable.prototype.on = function(event, callback){
this.listeners[event] = this.listeners[event] || [];
this.listeners[event].push(callback);
};
Observable.prototype.notify = function(eve... |
describe('Time For War', function() {
integration(function() {
describe('Time For War\'s ability', function() {
beforeEach(function() {
this.setupTest({
phase: 'conflict',
player1: {
inPlay: ['steward-of-law']
... |
// Copyright, 2013-2014, by Tomas Korcak. <korczis@gmail.com>
//
// 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, cop... |
'use strict';
/**
* Institutions resource that connects with Firebase
**/
angular.module('resources.donations',[])
.factory('donations',['$firebase', 'FBURL', function( $firebase, FBURL) {
var ref = new Firebase(FBURL + '/donations');
var donations = $firebase(ref).$asArray(); // it took me time to fi... |
import React from 'react';
import Circle from 'rc-progress';
import node from '../../images/node.svg';
const CirclePercentage = (props) => {
return (
<div className="circle-percentage">
<span><img className="im" src={node} alt="node" /></span>
<span>80%</span>
<Circle... |
import { combineReducers } from 'redux'
import publicReducer from './public'
import pagesReducer from './pages'
const rootReducer = combineReducers({
public: publicReducer,
pages: pagesReducer
})
export default rootReducer
|
ScalaJS.impls.scala_collection_GenTraversableViewLike$class__viewToString__Lscala_collection_GenTraversableViewLike__T = (function($$this) {
return ((("" + $$this.stringPrefix__T()) + $$this.viewIdString__T()) + "(...)")
});
ScalaJS.impls.scala_collection_GenTraversableViewLike$class__$init$__Lscala_collection_GenTra... |
'use strict';
var postCreationController = function($scope, $state, postService){
$scope.post = {
id: 0,
title: '',
content: '',
permalink: '',
author: '',
datePublished: ''
};
$scope.buttonText = "Create";
$scope.savepost = function(){
$scope.buttonText = "Saving...";
$scope.post.permalink = ang... |
// Eloquent JavaScript
// Run this file in your terminal using `node my_solution.js`. Make sure it works before moving on!
// Program Structure
// Write your own variable and do something to it.
var wuddup = 1;
wuddup = wuddup +1;
// Complete one of the exercises: Looping a Triangle, FizzBuzz, or Chess Board
var t... |
export function lazyload(x) {
let onscroll =throttle(function() {
let imgs = document.querySelectorAll('img');
let i = Array.prototype.filter.call(imgs,(ele)=>{
return ele.className == "lazyload";
})
i.forEach((element) => {
if(count(element)){
... |
var SubmitB = React.createClass({displayName: "SubmitB",
getInitialState: function(){
return{value: '', text: false, para: ''};
},
handleClick : function(e){
this.setState({value: this.refs['a'].state.text, text: this.refs['b'].state.text, para: this.refs['c'].state.value}, function () {
console.log(this.... |
/**
* Copyright 2014 Telerik AD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
export { default } from "@getflights/ember-mist-components/initializers/fragment-initializer";
|
const generators = require('yeoman-generator');
module.exports = generators.Base.extend({
constructor: function() {
generators.Base.apply(this, arguments);
},
prompting: function() {
var prompts = [
{
type: 'input',
name: 'projectName',
message: 'Your project name',
... |
const expect = require("chai").expect;
const it = require("mocha").it;
const describe = require("mocha").describe;
const forePath = process.argv.length === 4 ? process.argv[3] : "src/forejs";
console.log("Testing file: '" + forePath + "'");
const fore = require(require("path").join("../", forePath));
function delay(r... |
var nb = require('./index');
console.log('____________________________________________');
nb.attach(['bundles']);
nb.attach(['bundles1']);
var di = nb.container;
//console.log('-----------------------------');
console.log((di.___nb.getPluginList()).names);
console.log((di.___nb.getPluginList()).exp_list);
console.log... |
version https://git-lfs.github.com/spec/v1
oid sha256:c328cecd8fe62064e4240b088a3b891416781fc25b9a8ce46d92e125056ad71c
size 1599
|
/// <binding Clean='clean' />
var gulp = require("gulp"),
rimraf = require("rimraf"),
fs = require("fs");
eval("var project = " + fs.readFileSync("./project.json"));
var paths = {
bower: "./bower_components/",
lib: "./" + project.webroot + "/lib/"
};
gulp.task("clean", function (cb) {
rimraf(paths.... |
var highland = require('highland');
var lodash = require('lodash');
var vinylFile = require('vinyl-file');
var path = require('path');
function createDependenciesChangedStream(opts, di) {
var dest = opts.dest;
var matcher = opts.matcher;
var pathResolver = opts.pathResolver;
var comparator = opts.comparator;
... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
(function() {
var configureRequest, request;
request = require('request');
configureRequest = function(requestOptions, callback) {
var userAgent, _base;
requestOptions.proxy = false;
requestOptions.strictSSL = false;
userAgent = "VPNHT/" + (require('../package.json').version);
if (requestOpt... |
'use strict'
const assert = require('assert')
const transforms = require('./transforms')
const schema = require('./schemas')
module.exports = validate
function validate (apps) {
const valid = schema({apps: apps})
if (!valid) throw new Error(schema.errors[0].message)
const wilcards = apps.filter((app) => app.r... |
// 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 vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
(function() {
var app = angular.module('myApp');
app.controller('rerCtrl', ["$scope", "$http", "$interval", "myConfig",
function ($scope, $http, $interval, $config) {
var vm = this;
vm.trains = [];
function update() {
if ($config.rer.... |
const webpack = require('webpack');
const path = require('path');
const phaserModulePath = path.join(__dirname, '/node_modules/phaser-ce/');
const phaserPath = path.join(phaserModulePath, 'build/custom/phaser-split.js');
const pixiPath = path.join(phaserModulePath, 'build/custom/pixi.js');
const p2Path = path.join(pha... |
$(function() {
var $inputs = $('form input[required], form textarea[required], select[required]');
var displayFieldError = function($elem) {
var $fieldRow = $elem.closest('.form-row');
var $fieldError = $fieldRow.find('.field-error');
if (!$fieldError.length) {
... |
'use strict';
app.controller('OrganizerTasksCtrl',
function OrganizerTasksCtrl ($scope, organizerData, auth, $filter, $modal, $localStorage) {
$scope.showEditTaskForm = function (taskId) {
$modal.open({
templateUrl: 'views/edit-task.html',
controller: 'EditOrganizerTasksCtrl',... |
export const initialRequest = {
title: '<p>this is a title</p>',
title_text: 'this is a title',
description: '<p>this is a description!</p>',
description_text: 'this is a description',
task_status: '2 of 4 completed',
updated_at: '2015-05-15T12:31:04.428Z',
updated_by_name: 'Some User',
updated_by_path:... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _simpleAssign = _interopRequireDefault(require("simple-assign"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = Object.assign || _simpleAssign... |
NOTSET = {};
Helpers = {};
/**
* With `this` as a reactiveObj, applys a given mutator on a key path.
*/
Helpers.applyMutator = function (mutator, options, keyPath/*, arguments*/) {
options = options || {};
var self = this;
var node = Tracker.nonreactive(function () {
return self.get(keyPath, NOTSET);
})... |
'use strict';
//Admission applications service used to communicate Admission applications REST endpoints
angular.module('admission-applications').factory('AdmissionApplications', ['$resource',
function($resource) {
return $resource('admission-applications/:admissionApplicationId', { admissionApplicationId: '@_id'
... |
(function() {
'use strict';
angular
.module('govhack2015')
.controller('MapController', MapController);
/** @ngInject */
function MapController($http, $modal) {
var vm = this;
vm.zoom = 4;
vm.center = {
lat: -34.4516,
lng: 150.4445
};
vm.locations = [];
vm.data = ... |
//>>built
define("dojox/widget/nls/hu/ColorPicker",({huePickerTitle:"Árnyalat kiválasztó",saturationPickerTitle:"Telítettség kiválasztó"})); |
function format_size(text){
if (!text) {
return "0B";
}
var value = Number(text);
var isnegative = value < 0;
value = Math.abs(value)
if(value > 999999999)
return (isnegative ? "-" : "") + Math.round(parseFloat(value/1000000000)) + "GB";
else if(value > 999999)
return (isnegative ? "-" : "") +... |
var fs = require('fs')
, path = require('path')
, _ = require("lodash")
, Q = require("q")
var PLUGIN_NAME = 'BOWMAN-SCANNER';
/**
* TRANSFORM
*/
// Default regex to allow for single and double quotes
var RE_RESOURCE = /(?:url\(["']?(.*?)['"]?\)|src=["'](.*?)['"]|src=([^\s\>]+)(?:\>|\s)|href=["'](.*?)['"]|hr... |
'use strict';
describe('myApp.travel module', function() {
beforeEach(module('myApp.view2'));
var scope;
var rootScope;
var view2Ctrl;
var $httpBackend, requestHandler;
var $q;
beforeEach(inject(function($rootScope, $controller, _$q_){
rootScope = $rootScope;
scope = $rootScope.$new();
$q ... |
var fs = require("fs");
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var fecs = require('fecs-files');
var browserSync = require('browser-sync');
var watchify = require('watchify');
var browserify = require('browserify');
var gutil = require('gulp-util');
var sou... |
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
/*global desc, task, jake, fail, complete, directory*/
"use strict";
var lint = require("./build/util/lint_runner.js");
var nodeunit = require("./build/util/nodeunit_runner.js");
var karma = require("./build/util/karma_runner.j... |
// @flow
import React from 'react'
import { connect } from 'react-redux'
import { Image, View, StatusBar } from 'react-native'
import { Container, Content, Spinner, H1, Text, Icon, Button } from 'native-base'
import type { TMovieDetails } from '../utils/types'
type Props = {
details: TMovieDetails,
navigation: Obj... |
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | state label', function(hooks) {
setupRenderingTest(hooks);
test('it renders registered', async funct... |
version https://git-lfs.github.com/spec/v1
oid sha256:9022504515ea0eb0be83d18acac77a45f62ee85de55585ff59a3114d4f8f6d7e
size 14445
|
version https://git-lfs.github.com/spec/v1
oid sha256:1050f487538e55c28c0aa9b28c4f94ad3c9a29d118977ee30577ec1f64a0195f
size 226
|
/////////////////////////////////////////////////////////////////////
// Copyright (c) Autodesk, Inc. All rights reserved
// Written by Philippe Leefsma 2016 - ADN/Developer Technical Services
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is h... |
"use strict";
function hrefInfo(urlObj)
{
var minimumPathOnly = (!urlObj.scheme && !urlObj.auth && !urlObj.host.full && !urlObj.port);
var minimumResourceOnly = (minimumPathOnly && !urlObj.path.absolute.string);
var minimumQueryOnly = (minimumResourceOnly && !urlObj.resource);
var minimumHashOnly ... |
var path = require('path');
var rootPath = path.normalize(__dirname + '/../../');
module.exports = {
development:{
db:'mongodb://localhost/multivision',
rootPath:rootPath,
port:process.env.PORT || 3030
},
production:{
db:'mongodb://root:root@ds031962.mongolab.com:31962/multiv... |
import { cloneRegexp, isRegExp } from '../regexp'
describe('cloneRegexp', () => {
it('clones', () => {
const clone = cloneRegexp(/abc/i, { global: true })
expect(clone.source).toBe('abc')
expect(clone.global).toBe(true)
expect(clone.ignoreCase).toBe(true)
expect(clone.multiline).toBe(false)
})
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.