code stringlengths 2 1.05M |
|---|
var Particle = function(x, y, velx, vely, s, color) {
this.x = x;
this.y = y;
this.velx = velx;
this.vely = vely;
this.s = s;
this.color = color;
this.r = Math.random()*Math.PI*2;
this.rs = random(0, 0.4);
}
Particle.prototype.draw = function() {
c.save();
c.translate(this.x, this.y);
c.ro... |
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
toggle() {
this.toggleProperty('showModal');
}
}
});
|
import ShaderProgram from './gl/shader_program';
import shaderSources from './gl/shader_sources'; // built-in shaders
import GLSL from './gl/glsl';
import Geo from './geo';
import {StyleParser} from './styles/style_parser';
// Abstract light
export default class Light {
constructor (scene, config) {
this.... |
var express = require('express');
var path = require('path');
var favicon = require('static-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
//session Use
var session = require('express-session');
var RedisStore = require('connect-redis')(session);
var bodyParser = require('body-... |
let env = 'dev';
let hostMap = {
'dev': 'https://st-app.maxima-cars.com/api/v1'
};
let host = hostMap[env];
export {
env,
host
};
|
version https://git-lfs.github.com/spec/v1
oid sha256:b51546a4363147d771f3ccf22793da302513f20a2d1408be1d69d115eb7e1ff1
size 59060
|
import { Meteor } from 'meteor/meteor';
Meteor.methods({
randomMessage() {
if (!this.isSimulation) {
import { generateRandomMessage } from './message_generator';
return generateRandomMessage();
} else {
console.log('In the client stub - not doing anything ...');
}
}
})
|
import { convert as converter } from 'jcampconverter';
import { fromJSON } from '../Chromatogram';
export function fromJcamp(jcamp) {
const data = converter(jcamp, { chromatogram: true }).flatten[0].chromatogram;
return fromJSON(data);
}
|
// Deploy over FTP
//
// grunt-ftp-deploy: <https://github.com/zonak/grunt-ftp-deploy>
'use strict';
module.exports = {
dist: {
auth: {
host: 'server.com',
port: 21
},
src: '<%%= path.dist %>',
dest: '/path/to/destination/folder',
exclusions: [
'<%%= path.dist %>/.git*',
... |
'use strict';
/* Login Controller */
//controller for the content inside model template of login
mdlDirectTvApp.controller('LoginCtrl', ['$scope', '$http', 'AccountService', 'SocialService', 'Authentication', 'Sessions', 'Gigya', '$rootScope', '$route', 'configuration', '$location', '$filter', 'Vindicia', '$window', 'a... |
describe('hey', function () {
'use strict';
/** @type {Hey} */
var hey;
var $rootScope;
beforeEach(function () {
module('hey');
inject(function ($injector) {
hey = $injector.get('hey');
$rootScope = $injector.get('$rootScope');
});
});
describe('#listen()', function () {
... |
var fs = require('fs')
var url = require('url')
var qs = require('querystring')
var xhr = require('xhr')
var mustache = require('mustache')
// syntax highlighting
require('./node_modules/prismjs/themes/prism.css')
var prism = require('prismjs')
var templates = {
results: fs.readFileSync(__dirname + '/templates/resu... |
export { default } from 'ember-frost-list/components/frost-list-expansion'
|
module.exports = {
git: require('./git')
};
|
var os = require('os');
// Each Watchman client has a unique identifier
var hostname = os.hostname();
console.log(hostname);
|
'use strict';
var path = require('path');
var gulp = require('gulp');
var conf = require('./conf');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del']
});
gulp.task('partials', ['markups'], function () {
return gulp.src([
path.join(conf.paths.src, '/a... |
/*###############################################################################################*/
QUnit.module( '_.isBlank' );
QUnit.test( 'should return `true` for `false` boolean equivalents', function( assert ) {
assert.ok( _.isBlank(false) , 'false should be blank');
assert.ok( _.isBlank('') , 'emp... |
;(() => {
let link = ($scope, element, attrs, api) => {
api.$pristine = false;
};
angular.module('app')
.directive('noDirtyCheck', () => ({
restrict: 'A',
require: 'ngModel',
link: link,
scope: true,
}));
})();
|
var co = require('co'),
db = require('../').getClient({ servers: ['10.10.35.159:8098'], proto: 'http' });
co(function *() {
var devices = db.bucket('dmp', 'devices');
yield* devices.new('0010', { imei: ['859000000001'], idfa: ['ABCDE'] }).index({ foo: [1, 2], imei: ['859000000001'], idfa: ['ABCDE', 'FDE']... |
var expect = require('chai').expect;
var greetPackage = require('./greetPackageInfo.js');
describe('greetPackageInfo', function() {
it('should create a correct package greeting message if all options of packageInfo are defined', function() {
var packageInfo = {
name: 'test-package',
author: 'test-aut... |
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import UserMarkersComponent from "../../App/Components/Settings/UserMarkersComponent";
test('UserMarkersComponent renders correctly when not loading', () => {
const tree = renderer.create(
<UserMarkersComponent
userMar... |
var gulp = require('gulp');
//////////////////////////////
// Begin Lint Tasks
//////////////////////////////
require('./tasks/jshint')(gulp, [
'build/**/*.js',
'!build/**/*.min.js'
]);
//////////////////////////////
// Begin Test Tasks
//////////////////////////////
require('./tasks/karma')(gulp);
/////////////... |
var path = require('path');
var webpack = require("webpack");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var HtmlWebpackPlugin = require('html-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var autoprefixer = require('autoprefixer');
var argv = require('minimist')(proces... |
var shared = require('./lib/shared');
var TweetFilter = require('../lib/filter')
var filter = new TweetFilter(TweetFilter.getFiltersFromFiles("filters/english"))
var matches = [
'help me go vegan',
'help me become vegan',
'help me be vegan',
'i want to go vegan',
'i want to become vegan',
'i wa... |
var Vecmath = (function() {
'use strict';
function expAttVec(value, target, deltaTime, halfTime) {
var amount = 1.0 - Math.pow(0.5, deltaTime / halfTime);
value.lerp(target, amount);
}
function distPointRay(point, ray) {
var baseToPoint = point.clone().sub(ray.from);
var lenSq = baseToPoint.lenSq();
va... |
'use strict'
const {STRING, INTEGER, TEXT, ARRAY, FLOAT} = require('sequelize')
module.exports = db => db.define('magnet', {
quote: {
type: TEXT,
allowNull: false,
validate: {
notEmpty: true
}
},
price: {
type: INTEGER,
allowNull: false,
validate: {
isInt: true
}
},... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { getShows } from '../actions/index';
import { positionMap } from '../actions/index';
import { displayShowsList } from '../actions/index';
class CitiesList extends Component {
construct... |
function toggle_toc(){
var main = $('#main_div');
if($('#toggle_toc_icon').hasClass('icon-step-backward')){
$('#toggle_toc_icon').removeClass('icon-step-backward')
$('#toggle_toc_icon').addClass('icon-step-forward')
$('#sidebar_div').hide();
}else{
$('#toggle_toc_icon').removeClass('icon-step-for... |
"use strict";
// ------------------------------------------------------------------------------
// Requirements
// ------------------------------------------------------------------------------
var rule = require("./rules/expires");
var RuleTester = require("eslint").RuleTester;
// ----------------------------------... |
/* global cytoscape:true */
class CyGraphService {
/*@ngInject*/
constructor($mdDialog, workflowState, $filter) {
this.$mdDialog = $mdDialog;
this.workflowState = workflowState;
this.$filter = $filter;
}
createGraph(elements, domId) {
let cy = cytoscape({
con... |
"use strict";var exports=module.exports={};
var isObject = require('./_is-object.js')
, document = require('./_global.js').document
// in old IE typeof document.createElement is 'object'
, is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
return is ? document.createElem... |
module.exports = {
NODE_ENV: "\"production\"",
};
|
/* global describe:true, it:true, xit:true */
// Test setup:
import { expect, sinon } from '../../test-setup';
// Dependencies:
import path from 'path';
import { Directory } from '../structure/Directory';
import { File } from '../structure/File';
import { FileStructure } from '../structure/FileStructure';
import * as... |
let value
import {func1, func2} from 'a'
value = func1(1, func2('z'))
console.log(value) |
/*Generated By KISSY Module Compiler*/
config({
'editor/plugin/draft': {requires: ['json','editor','editor/plugin/local-storage','overlay','editor/plugin/menubutton']}
});
|
Template.avatar.helpers({
size: function () {
var valid = ['large', 'small', 'extra-small', 'extra-large'];
return _.contains(valid, this.size) ? 'avatar-' + this.size : '';
},
dimensions: function () {
var value;
if (this.size === 'large') value = 80;
else if (this.size === 'smal... |
var entityController = require('h-entity-controllers');
var Joi = require('joi');
module.exports =
[
{
method: 'GET',
path: '/api/models/statuses',
config: {
auth: false,
handler: entityController.queryRecords,
p... |
import { combineReducers } from 'redux';
import { home } from './home';
import { items } from './items';
import { user } from './user';
const rootReducer = combineReducers({
home,
items,
user,
});
export default rootReducer;
|
var _ = require('underscore');
var theValidator = require('the_validator');
module.exports = function (fig) {
fig = fig || {};
var validateGroup = function (properties, data) {
data = data || {};
var errors = {};
_.each(properties, function (property, name) {
var err = {};
if(property.properties) {
... |
/**
* @overview
* Provides a basic `ListItem` component to be used as children of
* `List` components.
*
* @since 0.4.0
*/
import React, { DOM, PropTypes } from 'react';
export const ListType = {
UNORDERED: 'UNORDERED',
ORDERED: 'ORDERED',
DEFINITION: 'DEFINITION'
};
const ListItemFactories = {
[ListT... |
var NAVTREEINDEX2 =
{
"game_local_8h_source.html":[1,0,0,6,3],
"game_main_8cpp.html":[1,0,0,2,0],
"game_main_8cpp_source.html":[1,0,0,2,0],
"game_main_8h.html":[1,0,0,2,1],
"game_main_8h_source.html":[1,0,0,2,1],
"game_title_8cpp.html":[1,0,0,2,2],
"game_title_8cpp_source.html":[1,0,0,2,2],
"game_title_8h.html":[1,0,0,... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _index = require('../../setDay/index.js');
var _index2 = _interopRequireDefault(_index);
var _index3 = require('../_lib/convertToFP/index.js');
var _index4 = _interopRequireDefault(_index3);
function _interopRequireDefault(obj) { r... |
'use strict'
const
electron = require('electron'),
{ipcMain} = require('electron'),
path = require('path'),
app = electron.app,
BrowserWindow = electron.BrowserWindow
let mainWindow
function createWindow () {
/**
* Initial window options
*/
mainWindow = new BrowserWindow({
height: 600,
wi... |
module.exports = {
externals: {
'react': 'React',
'react-dom': 'ReactDOM'
},
devtool: 'sourcemap',
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /(node_modules)/ },
{ test: /\.html$/, loader: 'html-loader', exclude: /(node_modules)... |
$(function () {
window.imagel = {};
imagel.initList = function () {
};
imagel.initNew = function () {
var $form = formty.getForm('form.main');
$form.$send.click(function (err, res) {
formty.post('/api/images', $form, function () {
location = '/';
});
return false;
});
... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('homestead-plant', 'Integration | Component | homestead plant', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// H... |
const $ = prop => {
const el = document.querySelector(prop);
return new Selector(el);
}
class Selector{
constructor(element) {
this.el = element;
}
get self() {
return this.el;
}
css(cssProp) {
// add a type check for the property provided => String
if (typeof cssProp != "string") throw Typ... |
const wpiCrawler = require('../');
wpiCrawler.fetch({
start: '2016-02-01',
end: '2016-02-03',
groupBy: 'komoditas',
})
.then((data) => {
console.log(data);
})
.catch(console.log);
|
var class_kluster_kite_1_1_node_manager_1_1_mock_1_1_mock_resource_migrator_dependent =
[
[ "MockResourceMigratorDependent", "class_kluster_kite_1_1_node_manager_1_1_mock_1_1_mock_resource_migrator_dependent.html#a784b0f759ce91aa44eca342b7260667c", null ],
[ "GetRedisKey", "class_kluster_kite_1_1_node_manager_1... |
/* eslint-disable no-console */
const path = require('path')
const webpack = require('webpack')
const shell = require('shelljs')
const ora = require('ora')
const chalk = require('chalk')
const runSeries = require('run-series')
const config = require('./config')
const webpackConfig = require('./webpack-configs/docs/pro... |
"use strict";
var AdditionalForm = FormWithModel.extend({
"_settings_page": null
, "events": _.extend({}, FormWithModel.prototype.events, {
"click a.go_back": "goBack"
})
});
AdditionalForm.prototype.initialize = function (options) {
this._settings_page = options.settings_page;
}
// Go back to... |
'use strict';
function randomToken(len) {
if (typeof crypto == "object" && crypto.getRandomBytes) {
// Chrome, Mozilla
var buf = new Uint8Array(len);
return btoa(crypto.getRandomValues(buf)).substr(0, len)
}
var str = '';
for (var n = 0; n < len; ++n) {
var v = Math.ran... |
'use strict';
angular
.module('homePage')
.component('homePage', {
templateUrl: 'home-page/home-page.template.html',
controller: ['$rootScope', '$scope', '$location', 'localStorageService',
function homePageController($rootScope, $scope, $location, localStorageService) {
/* View Vars */
... |
define(
[
'silly/SillyExercise',
'backbone',
'jquery'
],
function(
SillyExercise,
Backbone,
$
){
describe('SillyExercise', function(){
var model;
var view;
var generateExercise = function(){
model = new Backbone.Model();
view = new SillyExercise({
model: model
}... |
const HashFNV = require('hash.fnv.crypto')
const fnv = require('hash.fnv')
const hash = new HashFNV(0)
hash.update('a')
hash.update('b')
console.log(hash.digest('hex'))
const buffer = Buffer.from('ab')
console.log(Number(fnv(0, buffer, 0, buffer.length)).toString(16))
|
/* eslint-env jest */
import React from 'react';
import renderer from 'react-test-renderer';
import { Hints, Floats } from 'giu';
import Header from '../abHeader';
import $ from './jestQuery';
// https://github.com/facebook/react/issues/7386#issuecomment-238091398
jest.mock('react-dom');
describe('Header', () => {
... |
/* global exports, require */
'use strict';
var serviceRegistry = require('./../mdb/serviceRegistry');
// Logger
var log = require('../../common/logger')('ServicesResource');
/*
* Gets the service and checks if it is superservice. Only superservice can do actions about services.
*/
var doInit = function (targetServ... |
$(function() {
$('#inst-main').append(main());
$('#inst-param').append('<p>' + param() + '</p>');
$('#inst-init').append('<p>' + init() + '</p>');
$('#inst-fiscal').append('<p>' + fiscal() + '</p>');
$('#inst-shocks').append('<p>' + shocks() + '</p>');
$('#inst-results').append('<p>' + results(... |
/** @constructor */
MusicXMLAnalyzer.UploadView = function(){
var that = {},
$logMessages = null,
uploadMessageCounter = null,
$uploadModal = null,
$uploadDropzone = null,
$uploadSubmit = null,
$uploadClose = null,
gotValidFile = null,
uploadCounter = null,
/**
* Init function of UploadView
* @functi... |
import {connect} from 'react-redux';
import * as actionCreators from '../actions/employee.action';
import NewContact from '../views/demo/newcontact';
//Use this as the return type of mapStateToProps
export const mapStateToProps = state => {
return {
authenticate: state.userdata.isAuthenticate
}
};
ex... |
import babelConfig from './babel_config';
import banner from './banner';
export default {
entry: 'src/index.js',
plugins: [
babelConfig
],
targets: [{
dest: 'dist_mod/index.js',
format: 'umd',
moduleName: 'as',
sourceMap: false,
banner: banner
}]
}; |
version https://git-lfs.github.com/spec/v1
oid sha256:4aaea803a2a0a2f9e40acaac951d2bd5d779112740b419f91a22ba0afafd8a1b
size 493
|
import { inject } from "aurelia-framework"
import { AuthService } from "../../../services/auth-service"
@inject(AuthService)
export class SignUpCustomElement {
authService = null
constructor(authService) {
this.authService = authService
}
loginWithGoogle() {
const nonce = this.authSe... |
/**
* Created by Cristian on 30/01/2017.
*/
aplicacion.controller('ConsultasGPCtrl', [
'$scope',
'ConsultasFactory',
'$http',
'$cookies',
'limiteFactory',
function ($scope,ConsultasFactory, $http,$cookies,limiteFactory) {
//varibales
$scope.idUsuario = $cookies.get('UsuarioId')
$sc... |
/* Copyright 2011-2012 Carlos Guerreiro
* http://perceptiveconstructs.com
* Licensed under the MIT license */
'use strict';
var child_process = require('child_process');
var carrier = require('carrier');
module.exports = function(cb) {
var ready = /.*The server is now ready to accept connections on port.*/;
... |
version https://git-lfs.github.com/spec/v1
oid sha256:173bfcb5dfaac21beabde94951aa3f7c521c28d38680a9ddd3078227163b128b
size 1018
|
import GenreItem from './GenreItem'
export default GenreItem
|
export default Ember.Route.extend({
controllerName: 'rcruds.edit',
// renderTemplate: function() {
// this.render('rcruds.form');
// },
model: function() {
return this.store.createRecord('book');
},
deactivate: function () {
// this is meant to rollback a 'cancel'
// do... |
//目次
//ブラウザ判定、body,formのid,class付与
//ConfigManagerからid取得
//ID付与(IDがない場合)(nameが被った場合、単にiを付与する方が処理が軽い)
//事前コンバート
//ConfigManagerからclass取得
//ConfigManagerからvalidation取得
//new
//action
// window.onunload = function(){}
// if(window.name != "xyz"){
// location.reload();
// window.name = "xyz";
// }
jQuery.noConflict();
j... |
// HTTP CODES CONFIG
const HTTP_CODES_CONFIG = require('../app.config').HTTP_CODES_CONFIG;
/**
* @module {Function} Logout Controller
* @description This module is used to user logout. Available method: POST <Create>
* @param {RequestObject} req Required param to pass request object
* @param {ResponseObject} res ... |
Ext.define('Signout.store.Halls', {
extend: 'Ext.data.Store',
model: 'Signout.model.Hall'
});
|
/*
* An array identifier
* Access an array index
*/
module.exports = function(obj) {
if(obj.type !== 'ARRAY_IDENTIFIER') {
throw "This is not an array identifier!";
}
var parser = require('./expression.js');
return '$' + obj.name.value + "[" + parser(obj.index) + "]";
};
|
import '../../src/moment-business';
var DATE_FORMAT = 'YYYY-MM-DD';
var start, calculated;
describe('Adding weekdays', () => {
describe('when the count is not a number', () => {
beforeEach(() => {
start = moment.utc('2015-03-01', DATE_FORMAT);
});
it('should return the same moment', () => {
... |
var Manymatch = require('../Manymatch'),
util = require('util'),
assert = require('assert');
describe('Manymatch Tests', function() {
describe('Constructor', function() {
it('should return a Manymatch object with 1 minimatch', function() {
var mm = new Manymatch('/');
assert... |
test('Plane', function() {
var plane = Gear.Plane({
x: 1,
y: 1,
width: 1,
height: 1
});
ok(plane, 'Plane created');
ok(plane.x === 1, 'accessing x directly works');
ok(plane.y === 1, 'accessing y directly works');
ok(plane.width === 1, 'accessing width directly works');
ok(plane.height === 1, 'accessin... |
const ADD_EXTERNAL_REPORT = 'add_external_report'
// This function will take search params from the current URL, parse them, check if there are any params
// that are supported by Offering API, and it will append these query params to Offering API URL provided as an
// argument. It ensures that apiUrl won't get broken... |
// Karma configuration
// Generated on Fri Aug 07 2015 23:01:50 GMT+0100 (GMT Summer Time)
// Rather than repeating the Webpack config here, we can just import it and
// override the relevant settings.
var webpackConfig = require('./webpack.config');
webpackConfig.devTool = 'inline-source-map';
module.exports = funct... |
import { createFilter } from 'rollup-pluginutils';
import { resolve, dirname, relative } from 'path';
import alias from './processors/alias';
import copy from './processors/copy';
import exec from './processors/exec';
import hash from './processors/hash';
import read from './processors/read';
import ref from './proces... |
import React, { Component, PropTypes } from 'react';
import { Collapse, Button, CardBlock, Card,
Col, Form, FormGroup, Label, Input } from 'reactstrap';
import { envelope } from 'react-icons-kit/fa';
import SvgIcon from 'react-icons-kit';
Collapse.propTypes = {
isOpen: PropTypes.bool,
className: PropTypes.node,
... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M21 21V3H3v18h18zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"
}), 'InsertPhotoSharp'); |
GUIA = {};
$(function(){
$('#btn-pdfs').click(function(event) {
event.preventDefault();
var select = oTable._('tr', {"filter":"applied"});
for(var i in select) {
if(select[i][1] != 0) {
var dir = $(select[i][0]).attr('href')+'/pdf';
window.open(dir);
}
}
});
$('#btn-reset').click(function(eve... |
/**
* Created by ugo on 09/11/16.
*/
"use strict";
const app = require('../../../services/api-server/api-server');
var Person = app.models.Person;
var Outfit = app.models.Outfit;
var Garment = app.models.Garment;
var createPeopole = function () {
return new Promise(function (resolve, reject) {
Person.c... |
import Ember from 'ember';
import layout from '../templates/components/indie-table-header-cell';
const {
Component,
} = Ember;
export default Component.extend({
// Attributes
layout,
tagName: 'th',
classNames: [
'indie-table-header-cell',
'fw6',
'bb',
'b--black-10',
'tl',
'pb3',
... |
dc.errors = {};
dc.errors.Exception = function(msg) {
var _msg = msg != null ? msg : "Unexpected internal error";
this.message = _msg;
this.toString = function(){
return _msg;
};
};
dc.errors.InvalidStateException = function() {
dc.errors.Exception.apply(this, arguments);
}; |
"use strict";
const NanoTimer = require("nanotimer");
class NanoTimerTimer {
constructor() {
this.activeTimer = new NanoTimer();
this.startNew = this.startNew.bind(this);
this.stopActive = this.stopActive.bind(this);
this._onTick = this._onTick.bind(this);
}
startNew(opts) {
this.stopActive(... |
/*
* Copyright 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/* jshint node: true, devel: true */
'use strict';
const
bodyParser = require('body-parser'),
confi... |
"use strict";
export function createPublisher(server) {
return new ConfluencePublisher(server);
}
class Bingo {
}
class ConfluencePublisher{
constructor(server) {
this.server = server
}
debug() {
console.log("Publishing to server:", this.server);
}
}
|
(function () {
'use strict';
describe('Users Route Tests', function () {
// Initialize global variables
var $scope,
Authentication;
// We can start by loading the main application module
beforeEach(module(ApplicationConfiguration.applicationModuleName));
// The injector ignores leading ... |
var request = require('request'),
xml2js = require('xml2js-expat');
var Temboo = {
_req: function (username, password, domain, method, url, body, cb) {
console.log(url);
var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
request({
method: meth... |
"use strict";
var config_1 = require("../Config/config");
var path = require("path");
var bcrypt = require("bcryptjs");
var jwt = require("jsonwebtoken");
var _ = require("lodash");
var nodemailer = require("nodemailer");
var UsersController = (function () {
function UsersController(UsersData) {
this.UsersD... |
'use strict';
var DataScope = require('../src/DataScope');
var MutableStore = require('../src/MutableStore');
var Dispatcher = require('../src/Dispatcher');
var _ = require('../src/helper');
var chai = require('chai');
var expect = chai.expect;
describe('DataScope', function() {
var dispatcher = new Dispatcher();... |
const tz = require('tz-parser')
const raw = Buffer.from('$$B6869444005480041|91$GPRMC,194329.000,A,3321.6735,S,07030.7640,W,0.00,0.00,090216,,,A*6C|02.1|01.3|01.7|000000000000|20160209194326|13981188|00000000|32D3A03F|0000|0.6376|0100|7B20\r\n')
tz.parse(raw)
|
/*******************************************************************************
* Author :and TimeStamp :2015-10-26
******************************************************************************/
var nf = sm("do_Notification");
var app = sm("do_App");
var page = sm("do_Page");
var root = ui("$");
// //
var close = ... |
function mergeByProperty(array1, array2, prop) {
_.each(array2, function(array2object) {
var array1object = _.find(array1, function(array1object) {
return array1object[prop] === array2object[prop];
});
array1object ? _.extend(array1object, array2object) : array1.push(array2object);
});
return ... |
var mongoose = require('mongoose');
before('clearing database collections', function(done) {
mongoose.connect('mongodb://localhost:27017/testing123', function(err) {
if (err) done(err);
var x = Object.keys(mongoose.connection.collections).length;
var y = 0;
for (var i in mongoose.connection.collect... |
// @flow
import { Set } from 'immutable';
import { grantHaveMembers, grantHaveResources, grantHaveAttributes } from './grant';
import { all } from '../utils';
import type { Grant } from './grant';
import type { Members } from '../member';
export const getGrantsByMember = (grants: Grant) =>
(members: Members) => gr... |
'use strict';
const getDateString = require('../lib/methods/getDateString');
describe('getDateString', () => {
it('should return the current date timestamp as a string', () => {
expect(getDateString()).toBe(Date());
});
});
|
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M18 12.22V9l-5-2.5V5h2V3h-2V1h-2v2H9v2h2v1.5L6 9v3.22L2 14v8h9v-4c0-.55.45-1 1-1s1 .45 1 1v4h9v-8l-4-1.78zM20 20h-5v-2.04c0-1.69-1.35-3.06-3-3.06s-3 1.37-3 ... |
import { getInstallations } from 'testcafe-browser-tools'
import { execSync } from 'child_process'
import { getLog } from './get-log'
import merge from './merge'
import generateCustomMode from './generate_custom_mode'
import { getResetDomainConfig } from './reset_mode'
const getConfig = async (resolveConfig, options)... |
import React from 'react';
import PropTypes from 'prop-types';
import Text from '../Text';
import { colors } from '../../lib/styling';
import styles from './styles';
const Icon = ({ icon, ...props }) => (
<Text className="text" color={colors.white} {...props}>
<style jsx>{styles}</style>
<i className={`icon-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.