code stringlengths 2 1.05M |
|---|
(function(){
'use strict';
angular
.module('users')
.controller('EmailChangeCtrl', ['$rootScope', '$scope', '$state', '$location', '$translate', 'restFulService', 'config', 'errorService', function($rootScope, $scope, $state, $location, $translate, restFulService, config, errorService){
$scope.show = {
... |
import Vue from 'vue'
import * as types from './mutation-types'
export default {
[types.PUT] (state, { key, value }) {
Vue.set(state, key, value)
},
[types.REMOVE] (state, { key }) {
Vue.delete(state, key)
},
[types.SYNC] (state, { records }) {
// Delete existing keys - Cognito datastore is the... |
'use strict';
describe('Service: scenarioFactory', function () {
// load the service's module
beforeEach(module('testerApp'));
// instantiate service
var scenarioFactory;
beforeEach(inject(function (_scenarioFactory_) {
scenarioFactory = _scenarioFactory_;
}));
it('should do something', function (... |
const _ = require('lodash');
module.exports = () => (hook) => {
const sequelize = hook.app.get('sequelize');
const eventId = hook.result.id;
const quotasToAdd = hook.data.quota.map(quota => _.merge(quota, { eventId }));
const quotaModel = hook.app.get('models').quota;
return sequelize.transaction(t => {
... |
'use strict';
/**
* @ngdoc function
* @name teamDjApp.controller:AboutCtrl
* @description
* # AboutCtrl
* Controller of the teamDjApp
*/
angular.module('teamDjApp')
.controller('AboutCtrl', function ($rootScope) {
$rootScope.activetab = 'about';
});
|
module("Unit - Party",{
setup: function(){
var mod = this;
Ember.run(this,function(){
var appController = App.__container__.lookup("controller:application") ;
mod.appC = appController ;
mod.store = appController.store ;
resetTests(mod.store).then(function(){
mod.baseParty = mod... |
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../../..'
export const run = editor => {
Editor.delete(editor, { reverse: true })
}
export const input = (
<editor>
<block>Hello</block>
<block>
<block>
<cursor />
world!
</block>
</block>
</editor>
)
e... |
/*******************************************************************************
* bars coming out from a circle
*/
function VizRadialBars(variant) {
this.dampen = true;
this.hasVariants = true;
this.variants = [[false], [true]];
this.vary(variant);
}
VizRadialBars.prototype.resize = function() {}
VizRadialB... |
processGoogleToken({"newToken":"AE3Dx9aK3LQnhKzNv0kv9PYihJmwErt6SUKSiCdFy2nuPqU9RIHm72lwytcOh_wVXg","validLifetimeSecs":86400,"freshLifetimeSecs":86400,"1p_jar":"2018-1-31-12","pucrd":"CgwIABAAGAMgACgAOAESAhgH"}); |
// line comment
// line comment with prefix space
/**
* block comment
*/
function test () {
var a = 'ok'
var error
}
|
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { isBlank } from '@ember/utils';
export default Route.extend({
/**
Service that get current project contexts.
@property currentProjectContext
@type {Class}
@default service()
*/
currentProjectConte... |
var searchData=
[
['incomelinks',['incomeLinks',['../classDAGraphNode.html#abdf9c01751f27d2294ce2bd00f197778',1,'DAGraphNode']]]
];
|
import layout from '../templates/components/input-for';
import FormControl from './form-control';
import Ember from 'ember';
const {
get,
set,
isPresent,
computed
} = Ember;
export default FormControl.extend({
layout,
classNameBindings: ['hasValue'],
init() {
this._super(...arguments);
let fi... |
"use strict";
(function () {
var app = angular.module("storeProducts", []);
app.directive("productTitle", function () {
return {
restrict: "A",
templateUrl: "product-title.html"
}
});
app.directive("productDescription", function () {
return {
restrict: "E",
templateUrl: "p... |
var diff = require('../');
var left = {
left: 'yes',
right: 'no',
};
var right = {
left: {
toString: true,
},
right: 'no',
};
console.log(diff(left, right)); // eslint-disable-line no-console
|
/*
* This file is part of the hyyan/woo-poly-integration plugin.
* (c) Hyyan Abo Fakher <tiribthea4hyyan@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
(function ($, document, HYYAN_WPI_VARIABLES) {
/**
* Cons... |
ml.module('three.extras.objects.ImmediateRenderObject')
.requires('three.Three',
'three.core.Object3D')
.defines(function(){
/**
* @author alteredq / http://alteredqualia.com/
*/
THREE.ImmediateRenderObject = function ( ) {
THREE.Object3D.call( this );
this.render = function ( renderCallback ) { };
}... |
const initialState = {
types: [],
running: [],
performatives: []
}
const reduce = (state = initialState, action) => {
switch (action.type) {
case 'ADD_TYPES':
return {
...state,
types: [...state.types, ...action.types]
};
case 'ADD_RUNNING':
return ... |
module.exports = require('material-ui/Dialog');
|
'use strict';
const chai = require('chai');
const Sequelize = require('@sequelize/core');
const Op = Sequelize.Op;
const expect = chai.expect;
const Support = require('../support');
const DataTypes = require('@sequelize/core/lib/data-types');
const dialect = Support.getTestDialect();
const _ = require('lodash');
con... |
// Generated by CoffeeScript 1.10.0
var EsyFile;
EsyFile = (function() {
function EsyFile() {}
EsyFile.prototype["delete"] = function(filepath) {
var file;
if (File(filepath)) {
file = File(filepath);
}
return file.remove();
};
EsyFile.prototype.append = function(filepath, content) {
... |
'use strict';
module.exports = {
'+': 'Pass',
'-': 'Fail',
'~': 'SoftFail',
'?': 'Neutral'
};
|
import config from './config/env';
import Promise from 'bluebird';
import logger from './config/logger';
// import csv from 'fast-csv';
import fs from 'fs';
import request from 'request';
// import rp from 'request-promise';
import cheerio from 'cheerio';
import _ from 'lodash';
import moment from 'moment';
function d... |
window.theme = window.theme || {};
/* ================ SLATE ================ */
window.theme = window.theme || {};
theme.Sections = function Sections() {
this.constructors = {};
this.instances = [];
$(document)
.on('shopify:section:load', this._onSectionLoad.bind(this))
.on('shopify:section:unload', t... |
'use strict';
// Test specific configuration
// ===========================
module.exports = {
// MongoDB connection options
mongo: {
uri: 'mongodb://localhost/conversionrobot-test'
}
}; |
window.ProseMirror = require("prosemirror/dist/edit").ProseMirror
require("prosemirror/dist/menu/menubar") // Load menubar module
require( "prosemirror/dist/markdown/to_markdown" )
require( "prosemirror/dist/markdown/from_markdown" )
window.ProseMirrorUtils = {};
window.ProseMirrorUtils.defaultschema = require( "prosem... |
const SHADERS = require('../chunks/index.js')
module.exports = /* glsl */ `
precision highp float;
${SHADERS.math.PI}
${SHADERS.sky}
${SHADERS.rgbm}
${SHADERS.gamma}
${SHADERS.encodeDecode}
uniform vec3 uSunPosition;
varying vec2 vTexCoord0;
uniform bool uRGBM;
void main() {
//Texture coordinates to Normal is Ba... |
var Q = require("q");
var quin = require("../quin");
var testGroup = {
setUp: function (callback) {
callback();
},
tearDown: function (callback) {
callback();
},
"wrap() returns a wrapper function when supplied a promise": function (test) {
var one = Q.denodeify(oneInput);
... |
import estap from '../../lib';
const test = estap();
estap.disableAutorun();
test('should pass', t => {
t.pass();
});
|
import { connect } from 'react-redux'
import SignUpForm from '../components/SignUpForm'
import { signUpUser } from '../actions/SignUpFormActions'
const mapStateToProps = (state, ownProps) => {
return {}
}
const mapDispatchToProps = (dispatch) => {
return {
onSignUpFormSubmit: (name) => {
event.preventDe... |
/**
* @author xialeistudio<home.xialei@gmail.com>
*/
window.onload = function() {
cc.game.onStart = function() {
cc.view.adjustViewPort(true);
cc.view.setDesignResolutionSize(320, 504, cc.ResolutionPolicy.SHOW_ALL);
cc.view.resizeWithBrowserSize(true);
//load resources
cc.LoaderScene.preload(
[
'res... |
'use strict';
/** Load Node.js modules. */
var fs = require('fs');
/** Load other modules. */
var _ = require('lodash-compat');
/** Used to minify variables and string values to a single character. */
var minNames = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
minNames.push.apply(minNames, minNa... |
Ember.TEMPLATES["unit-controllers"] = Ember.Handlebars.compile(
'<div class="unit-controllers">{{render "rendered" someModel className="asd"}}</div>'
);
//--------------------------------------------------------------------------
module("templates - controllers - full environment", {
setup: function() {
var ... |
'use babel'
import util from 'util'
import { exec } from 'child_process'
import applescript from 'applescript'
import { Errors } from './constants'
const runscript = (file) => new Promise((resolve, reject) => {
applescript.execFile(file, (error, result) => {
if (error) { reject(error) }
try {
if (res... |
/*!
* CanJS - 2.2.5
* http://canjs.com/
* Copyright (c) 2015 Bitovi
* Wed, 22 Apr 2015 15:03:29 GMT
* Licensed MIT
*/
/*can@2.2.5#view/elements*/
var can = require('../util/util.js');
require('./view.js');
var doc = typeof document !== 'undefined' ? document : null;
var selectsCommentNodes = doc && function () {... |
import Resolver from 'ember/resolver';
var CustomResolver = Resolver.extend({
moduleNameLookupPatterns: Ember.computed(function() {
var defaults = this._super();
return defaults.concat([
this.podBasedComponentsInResource
]);
}),
podBasedComponentsInResource: function(parsedName) {
var podP... |
import Element from '../../../shared/Element';
import Elements from '../../../shared/Elements';
import link from '../../../shared/link';
import { isNormalElement } from '../../../shared/helper';
export function createElements(elements, parent) {
elements.forEach(
element => appendElement(element, parent)
... |
(function () {
'use strict';
angular
.module('mainApp', []);
})(); |
const Rebase = require('../../../src/rebase');
const React = require('react');
const ReactDOM = require('react-dom');
const firebase = require('firebase');
require('firebase/firestore');
var dummyCollection = require('../../fixtures/dummyCollection');
var firebaseConfig = require('../../fixtures/config');
describe('g... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var informationCircled = exports.informationCircled = { "viewBox": "0 0 512 512", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "path", "attribs": { "d": "M480,253C478.3,129.3,376.7,30.4,253,32S30.4,135.3,32,259c1.7,123.... |
var webpack = require('webpack');
var path = require('path');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://127.0.0.1:3000', // WebpackDevServer host and port
'webpack/hot/only-dev-server',
'./src/js/index.js' // Your appʼs entry point
],
output: {
path: path.jo... |
import { expect } from 'chai';
import request from '../src/reqwest-fetch';
/* eslint func-names: 0 */
/* eslint prefer-arrow-callback: 0 */
describe('reqwest-fetch', function () {
it('should accept json response', function () {
this.timeout(10000);
const test = request({ url: 'https://o.hahoo.cn/test.json' }... |
$.extend( $.fn, {
// http://jqueryvalidation.org/validate/
validate: function( options ) {
// If nothing is selected, return nothing; can't chain anyway
if ( !this.length ) {
if ( options && options.debug && window.console ) {
console.warn( "Nothing selected, can't validate, returning nothing." );
}
... |
var db = require('../models');
function index(req, res) {
db.User.find({}, function(err, allUsers) {
//TODO: handle the errors.
// TODO: Send this array as a json object
res.json(allUsers);
});
}
function create(req, res) {
// TODO: Consider creating an obect literal then passing in t... |
// WebHelp 5.10.001
var garrSortChar=new Array();
var gaFtsStop=new Array();
var gaFtsStem=new Array();
var gbWhLang=false;
garrSortChar[0] = 0;
garrSortChar[1] = 1;
garrSortChar[2] = 2;
garrSortChar[3] = 3;
garrSortChar[4] = 4;
garrSortChar[5] = 5;
garrSortChar[6] = 6;
garrSortChar[7] = 7;
garrSortChar[8] = 8;
garrS... |
import { buildUrl, contentUrl, profileUrl } from 'shared/util/url_factory';
import gql from 'graphql-tag';
import { memo } from 'react';
import { useQuery } from '@apollo/client';
const CONTENT_AND_USER_QUERY = gql`
query ContentAndUserQuery($username: String!, $name: String!) {
fetchContentHead(username: $user... |
angular.module('VoltronApp.services', []).
factory('voltronAPIservice', function($http)
{
var voltronAPI = {};
function createRequest(requestType, data) {
return {type: "request", request: requestType, data: data}
}
voltronAPI.request = function(request) {
return $http({
me... |
define("#base/0.9.2/attrs-debug", ["./util"], function(require, exports) {
// Attrs
// -----------------
// Thanks to:
// - http://documentcloud.github.com/backbone/#Model
// - http://yuilibrary.com/yui/docs/api/classes/AttributeCore.html
// - https://github.com/berzniz/backbone.getters.sett... |
var MNote = (function() {
function MNote(label) {
if (label == '' || label == null) {
label = 'Note';
}
var uiElement = document.createElement('span');
$(uiElement).addClass('MNote').css({
'transform' : MNumber.random(-8, 8)
}).html(label);
return uiElement;
};
return MNote;
})();
|
/**
* @author mrdoob / http://mrdoob.com/
* @author ryg / http://farbrausch.de/~fg
* @author mraleph / http://mrale.ph/
* @author daoshengmu / http://dsmu.me/
*/
THREE.SoftwareRenderer = function ( parameters ) {
console.log( 'THREE.SoftwareRenderer', THREE.REVISION );
parameters = parameters || {};
var can... |
class msvidctl_msvidaudiorendererdevices_1 {
constructor() {
// IMSVidAudioRenderer Item (Variant) {get}
this.Parameterized = undefined;
// int Count () {get}
this.Count = undefined;
}
// void Add (IMSVidAudioRenderer)
Add(IMSVidAudioRenderer) {
}
// void Rem... |
/**
* Created by Administrator on 2015/1/6.
*/
var grunt = require("grunt");
var htmlConverter = require("../tasks/lib/text").init(grunt);
describe("Test JSON Converter",function(){
it("should convert JSON to cmd module",function(){
var code = JSON.stringify({test:"test",value:1,number:2.2});
var ... |
/*global jQuery:true*/
(function($, window){
"use strict";
function MaxlengthInput( el ){
var self = this;
this.el = el;
this.$el = $(el);
// prevent double init
if( this.$el.data( "MaxlengthInput" ) ){
return;
}
this.$el.data( "MaxlengthInput", this);
this.maxlength = this.$el.attr("maxlength... |
'use strict';
// This file is auto-generated using scripts/doc-sync.js
/**
* Visible page viewport
*
* @param {number} scrollX X scroll offset in CSS pixels.
* @param {number} scrollY Y scroll offset in CSS pixels.
* @param {number} contentsWidth Contents width in CSS pixels.
* @param {number} cont... |
version https://git-lfs.github.com/spec/v1
oid sha256:3027fc57c3d0f37949a71c0e7f6cecae9198b13aa8ac666d1a752323b776547f
size 97712
|
var myWindow = {
screenX: window.screenX,
screenY: window.screenY,
location: window.location.pathname,
screenW: window.screen.width,
screenZ: window.screen.height,
render: function() {
var ele = document.getElementById("location");
ele.value = this.location;
ele = document.getElementById("sx");
ele.valu... |
import { module, test } from 'qunit';
import { setupApplicationTest } from 'travis/tests/helpers/setup-application-test';
import jobPage from 'travis/tests/pages/job';
import topPage from 'travis/tests/pages/top';
import signInUser from 'travis/tests/helpers/sign-in-user';
import { enableFeature } from 'ember-feature-f... |
var net = require('net');
var HOST = '128.197.50.236';
var PORT = 55000;
var n=1;
var client = new net.Socket();
var RollingSpider = new require('rolling-spider');
var quad = new RollingSpider({
logger: console.log
});
var flying = false;
var inFlip = false;
var land = false;
var count=0;
var prevControls;
qu... |
import React from 'react';
import classes from 'classnames';
import Feed from 'src/components/Feed';
import equip from './equip';
const Content = ({ isFetching, posts, postCount, lastUpdated }) => (
<div>
{isFetching && posts.length === 0 &&
<h2>Loading...</h2>
}
{!isFetching &&... |
import path from 'path'
import webpack from 'webpack'
import UglifyJsPlugin from 'uglifyjs-webpack-plugin'
const config = {
mode: process.env.NODE_ENV,
entry: [
'./src/index.js'
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: process.env.NODE_ENV === 'production' ? 'threesixty.min.js'... |
import { normalizeToInterval } from './format.js'
import { client } from '../plugins/Platform.js'
export const FOCUSABLE_SELECTOR = [
'a[href]:not([tabindex="-1"]):not(.q-focus__clone)',
'area[href]:not([tabindex="-1"]):not(.q-focus__clone)',
'input:not([disabled]):not([tabindex="-1"]):not(.q-focus__clone)',
'... |
var express = require('express');
var router = express.Router();
// use auth_token cookie to secure the angular /app files
//TODO this needs to be reworked since someone could spoof
//a legitimate cookie named auth_token. Need to actually verify
//the cookie
router.use('/', function (req, res, next) {
if (!req.cooki... |
var mongoose = require("../../database/");
var UserSchema = mongoose.Schema({
username: String,
password: String,
lastLoginTime: Date,
createTime: Date,
userType: String, // admin,normal
projectList: [
{
_id: Object,
name: String
}
]
});
module.exports = UserSchema; |
define(['angular'], function(angular) {
'use strict';
return angular.module('biomsef.filter', [ ]);
});
|
export const ic_picture_in_picture_alt_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M19 11h-8v6h8v-6zm-2 4h-4v-2h4v2zm4-12H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V4.98C23 3.88 22.1 3 21 3zm0 16.... |
/**
* Controller module.
* This is the unique master controller, with tiny controllers for each view.
* Our project is not large scaled, so our controllers can all stay together
* happily like a family.
* @module shell
*/
'use strict';
var helpers = require('./helpers');
var model = require('./model');
// var p... |
Ext.define("Com.GatotKaca.ERP.module.Personal.view.grids.Experience",{extend:"Com.GatotKaca.ERP.module.HumanResources.view.grids.Experience",alias:"widget.gridprexperience",id:"gridprexperience",title:"Experiences",store:"Com.GatotKaca.ERP.module.Personal.store.Experience"}); |
'use strict';
const chalk = require('chalk');
const inquirer = require('inquirer');
const labels = require('./labels');
module.exports = {
multipleWordsInput: (input) => {
// node index.js add Super Mario World returns Super Mario World
return input.splice(3).join(' ');
},
calculateGames: (games) => {
return... |
var os = require('os');
var url = require('url');
var http = require('http');
var attempt = require('attempt');
var log4js = require('log4js');
var logger = log4js.getLogger();
var healthcheck = require('serverdzen-module');
var config = require('config');
var argv = process.argv.slice(2);
if (!argv || argv.... |
var formatLocale = d3_format.formatLocale({decimal: ".", thousands: " ", grouping: [3], currency: ["R", ""]});
var formats = {
currency: formatLocale.format("$,.0f"),
percent: function(n) {
if (n === null)
return "";
else
return formatLocale.format(",.1f")(n) + "%";
},
num: function(n, name... |
// change these variables
var data_source_name = "";
// end changes
if(a=="view"){
(function (u,c,p,a,r,q) {
if (!utag.ut) utag.ut = {};
r = function (w, x, y, z) {
// read cookie
x = w + "=";
y = document.cookie.split(';');
for (var i = 0; i < y... |
import ValidationHandler from 'src/handler/ValidationHandler.js'
import { EventMapping } from 'src/helper/EventMapping.js'
//import jquery from 'jquery'
import jquery from 'libs/jquery-3.4.1.dev.js';
import { CharacterClassOptions } from 'src/model/page/CharacterClassOptions.js'
import { ArraySet } from 'src/model/Ar... |
const watson = require('watson-developer-cloud');
const API_KEY = '1b72f2aaaf9d29cd93d4805592c8991c828f9169'; // Put API key here
// Connect to Watson Alchemy Language service
if (API_KEY) {
var alchemy = watson.alchemy_language({
api_key: API_KEY
});
} else {
console.error('Could not connect to A... |
const webpack = require('webpack')
const express = require('express')
const path = require('path')
const webpackDevMiddleware = require('webpack-dev-middleware')
const webpackConfig = require('../build/webpack.config.js')
const config = require('../project.config.js')
const compiler = webpack(webpackConfig)
const ser... |
import Expr from './Expr'
export default class ColorByWavelengthExpr extends Expr {
constructor(value, $loc) {
super('colorByWavelength', $loc)
this.value = value
}
_evaluateInternal(e) {
return e.evalColorByWavelength(this)
}
}
|
import React, { Component, PropTypes } from 'react';
/*** Third Party Components ***/
import Dialog from 'react-toolbox/lib/dialog';
import { Button, IconButton } from 'react-toolbox/lib/button';
import Icon from 'react-fa';
import style from './style.scss';
class NavButton extends Component {
constructor(props)... |
import clone from "clone";
const initialState = {
busy: false
};
export default function(state = initialState, action) {
const { type, payload } = action;
switch (type) {
case "BUSY": {
const newState = clone(state);
newState.busy = payload;
const stateCopy = { ...state };
return newState;
}
}
re... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.Types.ObjectId;
/**
* Connect Mongodb
*/
mongoose.connect('mongodb://localhost/speedyfx');
/**
* Schemas
*/
var UserSchema = new Schema({
uid: { type: String, required: true, trim: true, index: { unique: true, dropDups: ... |
import 'rxjs/add/operator/combineLatest';
import 'rxjs/add/operator/take';
import 'rxjs/add/operator/skip';
import 'rxjs/add/operator/withLatestFrom';
import 'rxjs/add/operator/concat';
import 'rxjs/add/operator/share';
export default function(...observables) {
return source => {
const published = source.share()... |
(function ($, window) {
$.fn.twitterify = function (options) {
return this.each(function () {
new window.twitterify.Twitterifier(this, options)
.init()
.load();
});
};
}(jQuery, window));
|
'use strict';
/**
* Module dependencies
*/
var flipflopsPolicy = require('../policies/flipflops.server.policy'),
flipflops = require('../controllers/flipflops.server.controller');
module.exports = function(app) {
// Flipflops Routes
app.route('/api/flipflops').all(flipflopsPolicy.isAllowed)
.get(flipflops... |
(function (angular) {
"use strict";
angular
.module("Cerberus.TemplateEditor")
.controller("Cerberus.TemplateEditor.Controller.ComponentEditor.Navigation.Link", function () { });
})(window.angular); |
'use strict'
import React, { PropTypes } from 'react';
import { Button } from 'antd';
import { Link } from 'react-router';
import * as actions from '../action/note'
class Notes_item extends React.Component{
onDeleteNote (event) {
event.preventDefault()
this.props.onDeleteNote(this.props.note._id)
}
ren... |
Package.describe({
summary: "Sentinel role based authorization."
});
Package.on_use(function (api) {
var both = ['client', 'server'];
api.use(['coffeescript', 'underscore', 'accounts-base'], both);
api.add_files('sentinel.litcoffee', both);
api.export && api.export('Sentinel');
});
|
/*
*
* ToolPage reducer
*
*/
import { fromJS } from 'immutable';
import {
DEFAULT_ACTION,
REAL_WORLD_EXAMPLE,
CONTRIBUTED_BY,
LEARN_MORE,
SET_CHOSEN_SECTION,
RESET_TOOL_STATE,
SET_EXPAND_ALL
} from './constants';
const initialState = fromJS({
expandAll: false,
chosenSection: REAL_WORLD_EXAMPLE,
... |
'use strict';
const DateRange = require('../../../api/lib/DateRange');
const moment = require('moment');
describe('DateRange', () => {
describe('constructor', () => {
it('should assign properties correctly', () => {
var from = new Date();
var to = new Date();
var result = new DateRange(from, ... |
//This snippet is a sample of using a JavaScript client library to access a public API
//require the https module to enable a connection to the https protocol URL of the public API
let http = require('http');
let key = require('./modules/auth.js');
let _key = key;
let location = 'Lagos';
//Use the GET method to send... |
taskName = "Problem3.DeepCopy";
function Main(bufferElement) {
function createDeepCopy(obj) {
if (obj === null || typeof obj !== 'object') {
return obj;
}
var copy = obj.constructor();
for (var prop in obj) {
copy[prop] = createDeepCopy(obj[prop]);
... |
var HTTP = require("q-io/http");
HTTP.read('http://localhost:1337')
.then(JSON.parse)
.then(function(response) {
console.log(response);
})
.done();
|
(function () {
// The default state core singleton for {@link SceneJS.View} nodes
var defaultCore = {
type:"view",
stateId:SceneJS._baseStateId++,
scissorTestEnabled:false
};
var coreStack = [];
var stackLen = 0;
SceneJS_events.addListener(
SceneJS_events.SCENE... |
"use strict";
define(['dou', 'build/ComponentRegistry'],
function (dou, ComponentRegistry) {
describe('ComponentRegistry', function () {
var componentRegistry;
var specs = [ {
type: 'A',
name: 'Component A',
description: 'description for Component A',
defaults: {
attr1: '... |
'use strict';
var git = require('../')
console.log('git.short() => ' + git.short());
// 75bf4ee
console.log('git.long() => ' + git.long());
// 75bf4eea9aa1a7fd6505d0d0aa43105feafa92ef
console.log('git.branch() => ' + git.branch());
// master
// console.log('git.tag() => ', git.tag());
// console.log('git.log() =>... |
import { message } from 'antd'
import { changePasswordAction } from '../request/password'
export const changePassword = (data, cb) => (dispatch, getState) => {
dispatch(changePasswordAction(data)).then(action => {
action.data.body.opResult == '1' ?
message.success('密码修改成功!') :
message.error('密码修改失败,请重试... |
// https://github.com/jgthms/bulma/issues/238 thanks!
document.getElementById("nav-toggle").addEventListener("click", toggleNav);
function toggleNav() {
var nav = document.getElementById("nav-menu");
var className = nav.getAttribute("class");
if(className == "nav-right nav-menu") {
nav.class... |
var gulp = require('gulp'),
watch = require('gulp-watch'),
run = require('gulp-run'),
sourcemaps = require('gulp-sourcemaps'),
rename = require('gulp-rename'),
mochify = require('mochify'),
to5 = require('gulp-6to5');
gulp.task('6to5', function() {
return gulp.src('**/*.es6')
.pipe(sourcemaps.init())... |
/**
* TPPLeague Admin Commands
* TPPLeague - https://tppleague.me/
*
* This command namespace is used internally by the client to communicate
* for the Adventure Builder / TPPLeague Administration room(s).
*
* For the API, see chat-plugins/COMMANDS.md
*
* @license MIT license
*/
/* global Rooms */
'use str... |
/**
Data comes from a docker inspect command output
*/
function Container(data)
{
for (d in data) {
this[d] = data[d];
}
}
Container.prototype.name = function()
{
return this.Name.ltrim('/');
}
Container.prototype.shortName = function()
{
return this.name();
}
Container.prototype.shortId ... |
/* globals mocha, chai */
import {jml, glue, nbsp, $, $$, body} from '../src/jml.js';
mocha.setup('bdd');
mocha.globals(['jml', 'glue', 'nbsp']);
window.jml = jml;
window.glue = glue;
window.nbsp = nbsp;
window.$ = $;
window.$$ = $$;
window.body = body;
window.assert = chai.assert;
window.expect = chai.expect;
|
let webpack = require('webpack');
let path = require( 'path');
const AssetsPlugin = require('assets-webpack-plugin');
let projectRoot = process.cwd();
let assetsPath = path.join(projectRoot, "public", "build");
let publicPath = `/build/`;
let host = "0.0.0.0";
let config = {
devServer: {
inline: true,
ho... |
import * as types from '../../mutation-types'
import lazyLoader from './lazyLoader'
const state = {
items: [
{
name: 'Home',
path: '/',
meta: {
label: ['主頁面'],
link: 'Home.vue',
icon: ['fas', 'home'],
permission: 99
},
components: lazyLoader('Home')
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.