code stringlengths 2 1.05M |
|---|
// Generated on 2014-04-12 using generator-chromeapp 0.2.7
'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 task... |
/*
* _______ _____ _____ _____
* |__ __| | __ \ / ____| __ \
* | | __ _ _ __ ___ ___ ___| | | | (___ | |__) |
* | |/ _` | '__/ __|/ _ \/ __| | | |\___ \| ___/
* | | (_| | | \__ \ (_) \__ \ |__| |____) | |
* |_|\__,_|_| ... |
"use strict";
/* jshint camelcase: false */
/* jshint expr: true */
var chai = require('chai')
, Sequelize = require('../../index')
, Promise = Sequelize.Promise
, expect = chai.expect
, Support = require(__dirname + '/../support')
, DataTypes = require(__dirname + "/../../lib/data-types")
, di... |
const fs = require('fs')
const path = require('path')
const _ = require('lodash')
var input = fs.readFileSync(path.join(__dirname, 'input.txt'), { encoding: 'utf-8', flag: 'r' }).split('\r\n')
var compiled = _.map(input, line => {
return _.map(line.split(' '), v => {
var n = Number(v)
return isNaN(v) ? v : ... |
/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
... |
exports = module.exports = function(app, models) {
var add = function(req, res) {
var doc = new models.Revenue(req.body);
doc.save(function(err) {
if (err) return res.send(err);
res.send({});
});
};
var remove = function(req,res){
var id = req.params.id;
models.Revenue.findByIdAndRemove(i... |
var main = function(){
$modal = $('.modal-frame');
$overlay = $('.modal-overlay'); /* Need this to clear out the keyframe classes so they dont clash with each other between ener/leave. Cheers. */
$modal.bind('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e){
if... |
/*
* Copyright (c) 2012-2014 André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertTrue, assertFalse
} = Assert;
// 25.3.2.1, 25.3.2.2: configurable mixed up for GeneratorFunction.length and GeneratorFunction.pro... |
version https://git-lfs.github.com/spec/v1
oid sha256:7a33875ecbaf3da063f54c2e6b2f118f54c430b53ace853a5d28d79321fef194
size 763
|
var expect = require('expect.js');
var Entries = require('../../lib/hariko/entries');
describe('Entries', function () {
describe('.ensure', function () {
it('should be save in class property', function () {
var entries = new Entries();
var rawData = [
{
file: 'api/app-GET.json',
... |
import Component from '@ember/component';
import layout from '../templates/empty-component';
export default Component.extend({
tagName:'',
showComponent:false,
layout
});
|
/*
* @file advanced-client.js
* @author Ryan Lee
*/
'use strict';
/*jshint node:true*/
var queue = require('bull');
var Promise = require('bluebird');
var q = queue('advanced');
var array = new Array(10);
Promise.each(array, function (val, i) {
return q.add({'emailId' : i});
}).then(function () {
console.lo... |
/**
* jQuery.DropdownReplacement
* Copyright (c) 2010 Mikhail Koryak - http://notetodogself.blogspot.com
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
* Date: 07/07/10
*
* @projectDescription Full featured dropdown replacement
*
* Dependancies:
* jquery 1.4.2+ [required]... |
'use strict';
(function(module) {
function About (aboutData) {
Object.keys(aboutData).forEach(key => this [key] = aboutData[key]);
}
About.all = [];
About.prototype.toHtml = function() {
let renderAbout = Handlebars.compile($('#about-template').text());
return renderAbout(this);
};
$.getJSON('/data/about.json'... |
quail.tableLayoutMakesSenseLinearized = function (quail, test, Case) {
test.get('$scope').find('table').each(function () {
if (!quail.isDataTable($(this))) {
test.add(Case({
element: this,
status: 'failed'
}));
}
});
};
|
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [m... |
export default {
gameWidth: 512,
gameHeight: 384,
localStorageName: 'grandmagoeshard'
}
|
'use strict';
exports.BattleStatuses = {
trickroom: {
effectType: 'PseudoWeather',
duration: 5,
durationCallback: function (source, effect) {
if (source && source.hasItem('trickyrock')) {
return 8;
}
if (source && source.hasAbility('persistent')) {
return 7;
}
return 5;
},
onStart: fu... |
// ==UserScript==
// @name HRK tlk.io Autoref Helper
// @namespace HRK
// @version 0.7
// @description insert your ref link at yourref, go to https://tlk.io/hrk, enable script, let it run!
// @author Tackyou
// @match *tlk.io/hrk*
// @license https://raw.githubusercontent.com/Tackyou/... |
var BasicGame = BasicGame || {};
// 100% of the browser window - see Boot.js for additional configuration
if (navigator.isCocoonJS) {
BasicGame.game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, '');
} else {
BasicGame.game = new Phaser.Game(640... |
'use strict';
// Albums controller
angular.module('albums').controller('AlbumsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Albums',
function($scope, $stateParams, $location, Authentication, Albums) {
$scope.authentication = Authentication;
// Create new Album
$scope.create = f... |
function runPrologQuery( data, callback ) {
var db = data.split( '\n' );
var rules = [];
for ( var i in db ) {
var prologRule = db[ i ];
if ( !prologRule || prologRule == "" || prologRule[ 0 ] == '%' || prologRule[ 0 ] == '#' ) {
continue;
}
var parsedR... |
import { CardTypes } from '../../Constants.js';
const DrawCard = require('../../drawcard.js');
const AbilityDsl = require('../../abilitydsl');
class EarthBecomesSky extends DrawCard {
setupCardAbilities() {
this.reaction({
title: 'Bow a character that just readied',
when: {
... |
module.exports = {
credentials:"aws-credentials.json",
bucketName:"ctdata-graphics",
patterns:[
"**/static/js/*.js",
"**/static/css/*.css",
"**/static/data/*.*",
"**/index.html",
"LICENSE",
"README.md"
]
}
|
var GeoPackage = GeoPackageAPI.GeoPackage
, GeoPackageManager = GeoPackageAPI.GeoPackageManager
, GeoPackageConnection = GeoPackageAPI.GeoPackageConnection
, GeoPackageTileRetriever = GeoPackageAPI.GeoPackageTileRetriever
, TileBoundingBoxUtils = GeoPackageAPI.TileBoundingBoxUtils
, BoundingBox = GeoPackageAP... |
var express = require('express');
var router = express.Router();
var bodyParser = require('body-parser');
var employees = [{
"id": 1,
"name": "Ram",
"country": "US",
"designation": "CTO",
"color": "blue",
"joiningDate": "1288323623006"
},
{
"id": 2,
"name": "Prabhu",
"country": "Indi... |
// https://developers.getbase.com/docs/rest/reference/line_items
var extend = require('extend');
var readonly = ['id', 'name', 'sku', 'description', 'creator_id', 'created_at', 'updated_at'];
module.exports = function(client, model) {
function Item(data) {
return model(this, data, readonly);
}
extend(... |
var path = require('path');
var moment = require('moment');
var thinky = require('../configurations/thinky');
var type = thinky.type;
var r = thinky.r;
var NotificationFeed = thinky.createModel('NotificationFeed', {
id: type.string(),
type: type.string(),
actor: type.string(),
target: type.string(),
... |
Meteor.methods({
"errorsMeta.changeState": function(appId, errorName, errorType, status) {
// latency compensation stub for "errorsMeta.changeState" method
return ErrorsMeta.upsert({
appId: appId,
name: errorName,
type: errorType,
}, {
$set: {
status: status
}
});... |
const path = require('path');
/**
* @callback isPrivacyDisabledFn
* @param {string} privacyFlag - the flag to be looked up
* @returns {boolean}
*/
const isPrivacyDisabled = function isPrivacyDisabled(privacyFlag) {
if (!this.get('privacy')) {
return false;
}
// CASE: disable all privacy featur... |
import createBrowserHistory from 'history/createBrowserHistory'
export default createBrowserHistory(); |
'use strict';
var config = require('./config.json');
var _ = require('underscore');
_.str = require('underscore.string');
// Mix in non-conflict functions to Underscore namespace if you want
_.mixin(_.str.exports());
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
... |
module.exports = {
functions: {}
}; |
const R = require("ramda");
const indexBy = R.reduceBy((acc, elem) => elem, null);
const defaultState = {};
export default (state = defaultState, action) => {
switch (action.type) {
case "LOAD_EVENTS":
const newEvents = indexBy(e => e._id, action.events);
return {
...state,
...newEv... |
/**
* https://github.com/freeze-component/vue-popper
* */
import Popper from 'popper.js';
export default {
props: {
placement: {
type: String,
default: 'bottom'
},
boundariesPadding: {
type: Number,
default: 5
},
reference: O... |
// objective:
// Solve by creating a new array, then loop through one of the
// arrays and add each element with the corresponding element
// in the other array, then store this sum in the new array.
// solution:
const assert = require("assert");
function ArrayMatching(strArr) {
const arr1 = strArr[0].replace(/[[]]... |
import {Meteor} from 'meteor/meteor';
import {Auth} from '../../auth.js';
import {Datastores} from '../datastores.js';
import {DatastoreFields} from '../datastore_fields.js';
import {DatastoreRows} from '../datastore_rows.js';
import {DatastoreDataTypes} from '../datastore_data_types.js';
import {DatastoreDataTypeFie... |
// avg case O(n^2) | best case O(n) | worst case O(n^2)
var InsertionSort = function(arr) {
var swap = function(indexOne, indexTwo) {
var temp = arr[indexOne];
arr[indexOne] = arr[indexTwo];
arr[indexTwo] = temp;
};
if (arr.length > 1) {
arr.forEach(function(value, index)... |
// MOBILE ROUTER CONFIG
Router.configure({
layoutTemplate: "layout",
loadingTemplate: "loading",
notFoundTemplate: "notfound",
waitOn: function() {
var latLng = latLng = {lat: 37.774936, lng: -122.415463};
if (Session.get("latLng") && Session.get("latLng") !== null) {
latLng = Session.get("latLng"... |
(function () {
// Trigger scroll event after scrolling
window.scrollWithEvent = function (y) {
window.scrollTo(0, y);
window.dispatchEvent(new CustomEvent('scroll'));
}
// IE Polyfill for CustomEvent
// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
if ( typeof window.Cus... |
var propertiesToObject = require('java.properties.js').default;
var properties = '# i18n messages \n\
user.edit.title = Edit User\n\
user.followers.title.one = One Follower\n\
user.followers.title.other = All {{count}} Followers\n\
button.add_user.title = Add a user\n\
button.add_user.text ... |
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
Comment = new Schema({
user: {
type: Schema.Types.ObjectId,
ref: 'User',
required: true
},
on: {
kind: String,
doc: {
... |
'use strict';
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else {... |
module.exports = require('./lib/options');
|
(function($) {
//testing
$.fn.trukutru = function(options) {
var input = this;
var warning_no_values_sent = "Trukutru Livesearch Warning: No values sent on initialization. Please verify you are sending a correct array on the 'values' option.";
var warning_incorrect_json_format = "Tr... |
/*!
* jQuery Autocompleter
* jquery.autocomplete.js
* http://code.google.com/p/jquery-autocomplete/
* Copyright 2011, Dylan Verheul
* Licensed under the MIT license
*/
/*!
* Modified by Sean Ren for Idlebook with extra options and tweaks
*/
(function($) {
/**
* Autocompleter Object
* @param... |
/* global */
import './common'
var ko = require('knockout')
var Model = require('./PledgeYourSupport')
var model = new Model()
ko.applyBindings(model)
import accordion from './accordion.js'
accordion.init(false, -1, model)
document.querySelector('form')
.addEventListener('submit', (event) => {
event.preventD... |
#!/usr/bin/env node
var RTH = require('../..');
var fs = require('fs');
var config = JSON.parse(fs.readFileSync("./wallet.json", "utf8"));
var opt = process.argv.splice(2)
if(opt.length !== 5){
console.log("%s exchange pair type price amount", process.argv[1])
console.log(" exchange = wallet name");
conso... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mongoose = require('mongoose');
var _mongoose2 = _interopRequireDefault(_mongoose);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_mongoose2.default.Promise = global.Promise; /**
... |
export default String('\n\
uniform vec3 diffuse;\n\
uniform float opacity;\n\
\n\
#include <common>\n\
#include <packing>\n\
#include <color_pars_fragment>\n\
#include <map_particle_pars_fragment>\n\
#include <fog_pars_fragment>\n\
#include <shadowmap_pars_fragment>\n\
#include <logdepthbuf_pars_fragment>\n\
#include <... |
'use strict';
module.exports.run = function (test, Heap) {
test('should insert items into the heap', function (t) {
var heap = new Heap();
heap.insert(1, null);
heap.insert(2, null);
heap.insert(3, null);
heap.insert(4, null);
heap.insert(5, null);
t.deepEqual(heap.size(), 5);
});
te... |
"use strict";
var Note = function(data)
{
this.data = data;
};
Note.prototype.toJSON = function()
{
return JSON.parse(JSON.stringify(this.data));
};
Note.prototype.getId = function()
{
return this.data.id;
};
Note.prototype.getTitle = function()
{
return this.data.title || '';
};
Note.prototype.getDescription ... |
var take = require('../lib/assertions').take();
var currentWeekNumber = require('current-week-number');
exports.fromExcelValue = function (value) {
take(value).ifTypeIs('number');
return new Date((value - (25567 + 2)) * 86400 * 1000)
};
exports.findWeek = function (date) {
return currentWeekNumber(date)
... |
{"filter":false,"title":"claim-list.js","tooltip":"/models/claim-list.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":6,"column":17},"end":{"row":6,"column":17},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrap... |
'use strict';
/**
* @ngdoc function
* @name buttonmenApp.controller:LobbyController
* @description
* # LobbyController
* Controller of the buttonmenApp
*/
angular.module('buttonmenApp').controller('LobbyController', function ($scope, $location, ChatService) {
// should these move to a service with state
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var forms_1 = require("@angular/forms");
var lang_1 = require("../util/lang");
exports.lte = function (lte) {
return function (control) {
if (!lang_1.isPresent(lte))
return null;
if (lang_1.isPresent(forms_1.Val... |
/**
* Created by Jaya on 4/27/2015.
*/
var main = function(){
var parent = document.getElementById("left");
var child = document.getElementById("main");
parent.removeChild(child);
var child = document.getElementById("search");
parent.removeChild(child);
var parent = document.getElementById... |
'use strict';
/* eslint max-params: 'off', no-negated-condition: 'off' */
const Stats = require('./Stats');
class Aggregator {
/**
* Creates an instance of Aggregator.
* @memberof Aggregator
*/
constructor() {
this._overallStats = {};
this._projectStats = {};
this._repoStats = {};
}
/*... |
'use strict';
var extend = require('xtend/mutable');
var q = require('component-query');
var doc = require('get-doc');
var Cookies = require('js-cookie');
var ua = require('ua-parser-js');
// IE < 11 doesn't support navigator language property.
/* global navigator */
var userLangAttribute = navigator.language || navi... |
var sonos = require('sonos');
module.exports = function() {
console.log('AirSonos Diagnostics');
console.log('node version\t', process.version);
console.log('operating sys\t', process.platform, '(' + process.arch + ')');
console.log('\nSearching for Sonos devices on network...');
sonos.search(function(device, m... |
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils... |
var chai = require('chai');
var chaiHttp = require('chai-http');
var server = require('../src/server/app');
var knex = require('../db/knex');
var should = chai.should();
chai.use(chaiHttp);
//Do beforeeach because it won't get to after each if there's an error
beforeEach(function(done) {
knex.migrate.ro... |
import domElementHelper from '../element-helper'
export const createEvent = eventName => {
if (!domElementHelper.canUseDom()) return {}
const event = new Event(eventName, { bubbles: true })
return event
}
|
'use strict';
describe('Directive: facebookCheck', function () {
// load the directive's module
beforeEach(module('GarageCommerceApp'));
var element,
scope;
beforeEach(inject(function ($rootScope) {
scope = $rootScope.$new();
}));
it('should make hidden element visible', inject(function ($compi... |
version https://git-lfs.github.com/spec/v1
oid sha256:6102cdf2b064ff94cc5e1458ec220210c6be0a96dee26a726ebd14a179a5084b
size 802
|
"use strict";
var path = require('path');
var cluster = require('cluster');
var Loader = function (opt_options) {
this.options = opt_options;
};
Loader.prototype.getSupportedCommands = function () {
return ['run', 'start', 'stop', 'restart', 'worker', 'console'];
};
Loader.prototype.run = function (opt_cmd) {
va... |
$(document).ready(function(){
$('#main').hide();
$('.secondary').hide();
$('#start').click(function(){
$('#main').show('slow')
$('.secondary').show('slow')
$('#breeder_boxes').hide();
$(this).fadeOut('slow')
});
$('#slower').click(function(){
evolution.speed*=2});
$('#faster').click(function(){
... |
'use strict';
require('./_login.scss');
module.exports = {
template: require('./login.html'),
controller: ['$log', '$location', 'authService', '$uibModal', '$window', LoginController],
controllerAs: 'loginCtrl',
bindings: {
close: '&',
modal:'&',
dismiss: '&'
}
};
function LoginController($log, ... |
import React from "react"
import { css } from "@emotion/core"
const myCss = css`
table {
text-align: right;
border: none;
}
th,
td {
border: none;
}
thead tr td {
font-weight: bold;
border-bottom: solid 0.1rem var(--primary-light-color);
}
.highlight {
background: yellow;
}
... |
export default from "./lib"; |
import fs from 'fs';
export default function fileExists(filePath) {
try {
return fs.statSync(filePath).isFile();
} catch (err) {
return false;
}
}
|
require('consoloid-server/Consoloid/Server/Service');
require('consoloid-framework/Consoloid/Test/UnitTest');
require('../../AbstractServerSideService');
require('../Fetch');
describeUnitTest('Tada.Git.Command.Fetch', function() {
var
command,
repo;
beforeEach(function() {
repo = {
fetch: sinon.... |
module.exports.GET = function (req, res) {
res.html('not found');
};
module.exports.POST = function (req, res) {
res.html('not found');
};
module.exports.PUT = function (req, res) {
res.html('not found');
};
|
(function() {
'use strict';
angular.module('animeitems')
.service('ListService', ListService);
ListService.$inject = ['moment', '$q'];
function ListService(moment, $q) {
var service = {
checkForTagless: checkForTagless,
concatenateTagArrays: concatenateTagArrays,
findWithAttr: findWithAttr,
getCommo... |
//This is to be able to use offsetX in firefox
var normalizeEvent = function(event)
{
if(!event.offsetX)
{
var target = event.target || event.srcElement;
var rect = target.getBoundingClientRect();
event.offsetX = event.clientX - rect.left;
event.offsetY = event.clientY - rect.top;
}
return even... |
'use strict'
const Schema = use('Schema')
class UsersTableSchema extends Schema {
up () {
this.create('users', table => {
table.increments()
table.string('username', 80).notNullable().unique()
table.string('email', 254).notNullable().unique()
table.string('password', 60).notNullable()
... |
'use strict'
const browserslist = require('browserslist')
const format = require('./format')
const fs = require('fs-extra')
const paths = require('./paths')
const semver = require('semver')
const pkg = require(paths.pkg)
const useYarn = fs.existsSync(paths.yarnLock)
// We use the engines.node field in the package.js... |
!function() {
var api = this.associated || require('./')
if (typeof document == 'undefined') {
ok('exists', !!api, true)
return console.log('Open index.html')
}
function status(message) {
document.querySelector('[data-status]').innerHTML = message
}
function ok(id, actual, correct) {
if (... |
/**
* @overview datejs
* @version 1.0.0-beta-2014-03-25
* @author Gregory Wild-Smith <gregory@wild-smith.com>
* @copyright 2014 Gregory Wild-Smith
* @license MIT
* @homepage https://github.com/abritinthebay/datejs
*/
/*
2014 Gregory Wild-Smith
@license MIT
@homepage https://github.com/abritinthebay/datejs
2... |
import React from 'react';
import { assert } from 'chai';
import { spy } from 'sinon';
import { createShallow, createMount, unwrap } from '@material-ui/core/test-utils';
import Grow from '../Grow';
import Popper from './Popper';
const PopperNaked = unwrap(Popper);
describe('<Popper />', () => {
const defaultProps =... |
'use strict';
/* global document, window */
const stateFromOptions = require('./state.js').stateFromOptions;
const Animation = require('./animation.js');
const createState = require('./state.js').createState;
const utils = require('./utils.js');
const Engine = {
runningAnimations: [],
completedAnimations: [],
tr... |
const Koa = require('koa');
const app = new Koa();
// koa-router start
const Router = require('koa-router');
let user = require('./appApi/User.js');
let router = new Router();
router.use('/user', user.routes());
// koa-router end
// koa-bodyparser start
const bodyParser = require('koa-bodyparser');
// koa-bodyparse... |
// XXX from Underscore.String (http://epeli.github.com/underscore.string/)
var startsWith = function(str, starts) {
return str.length >= starts.length &&
str.substring(0, starts.length) === starts;
};
var endsWith = function(str, ends) {
return str.length >= ends.length &&
str.substring(str.length - ends.le... |
var Trader = module.exports;
/**
* Gets all geolists
* @param params
* @param cb
* @returns {*}
*/
Trader.getGeolists = function(params, cb) {
return this._request('geo_radius_lists', 'get', params, cb);
};
/**
* Creates a new geoList
* @param params
* @param cb
* @returns {*}
*/
Trader.postGeolist = funct... |
define({
root: ({
_widgetLabel: "Analysis",
executeAnalysisTip: "Click an analysis tool to execute",
noToolTip: "No analysis tool is configured!",
jobSubmitted: "submitted.",
jobCancelled: "Canceled.",
jobFailed: "Failed",
jobSuccess: "Succeeded.",
executing: "Executing",
cancelJob... |
import Ember from 'ember';
export default Ember.Controller.extend({
headerMessage: 'Coming Soon',
responseMessage: '',
fullname: '',
emailAddress: '',
city: '',
group_ride: 0,
days_week: '',
isEmailValid: Ember.computed.match('emailAddress', /^.+@.+\..+$/),
isDisabled: Ember.computed.empty('emailAdd... |
javascript:(function(){require(["function-widget-1:share/util/service/createLinkShare.js"]).prototype.makePrivatePassword=function(){return prompt("请输入自定义的密码","1234")}})();
|
/*!
* 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/stache/mustache_core*/
define([
'can/util/library',
'can/view/utils',
'can/view/mustache_helpers',
'can/view/live',
'can/elements',
'can/view/scope',
... |
var assert = require("assert");
var middleware = require('..');
var express = require('express');
var should = require('should');
var request = require('supertest');
var Promise = require('bluebird');
describe('middleware initialize', function () {
it('check bigpipe expose', function (done) {
var app = ex... |
$(function(){
var opened_index = null;
function open_item(grid, i) {
grid = $(grid);
var rows = grid.find('.content-details');
var items = grid.find('.content-details-item');
if (i < 0 || items.length <= i) return;
rows.hide();
items.hide();
var item = $(items[i]);
var row = item.par... |
'use strict'
angular.module('spBlogger.posts.controllers',[]);
angular.module('spBlogger.posts.controllers',[]).controller('PostController', ['$scope', 'Post', function($scope, Post){
$scope.posts = Post.query();
}]).controller('PostDetailsController',['$state', '$scope', 'Post', '$stateParams', function($state,... |
$(document).ready(load_modules);
$(document).on('turbolinks:load', load_modules);
function load_modules() {
$('.ui.dropdown').dropdown();
$('.ui.dropdown.pointing').dropdown({
on: 'hover'
});
$('select.dropdown').dropdown();
$('.message .close').on('click', function() {
$(this).closest('.message').fa... |
import EmberView from "ember-views/views/view";
import run from "ember-metal/run_loop";
import EmberObject from "ember-runtime/system/object";
import { compile } from "htmlbars-compiler/compiler";
import { equalInnerHTML } from "../helpers";
var view;
function appendView(view) {
run(function() { view.appendTo('#qun... |
var expect = require('expect.js');
var config = require('./config');
var API = require('../');
describe('valid appid', function () {
var api = new API(config.appid, config.appsecret);
before(function (done) {
api.getAccessToken(done);
});
it('createTmpQRCode should ok', function (done) {
api.createTmp... |
var chart = jui.include("chart.builder");
var time = jui.include("util.time");
var dataSource = [
{ date: new Date(1994,2,1), l: 24.00, h: 25.00, o: 25.00, c: 24.875, v: 2762800 },
{ date: new Date(1994,2,2), l: 23.625, h: 25.125, o: 24.00, c: 24.875, v: 1467200 },
{ date: new Date(1994,2,3), l: 26.25, h: ... |
/**
* 查询文件或文件夹属性
*
* @author youmoo
* @since 2016/11/24
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.config = undefined;
exports.default = stat;
var _fetch = require('../util/fetch');
var _fetch2 = _interopRequireDefault(_fetch);
function _interopRequireDefault(obj)... |
import React from 'react'
import PropTypes from 'prop-types'
import styles from './ValidationPopup.scss'
const ValidationPopup = ({ error, active }) => {
return (
<div className={`${styles.validationPopup} ${active ? styles.show : styles.hide}` }>
<p className={styles.bold}>Password must have</p>
<u... |
/*
* The MIT License (MIT)
* Copyright (c) 2020 Karl STEIN
*/
import { ERROR_VALIDATION } from '../errors';
class ValidationError extends Error {
/**
* Creates a validation error.
* @param {Object} errors
* @param {string} message
* @param {string} reason
*/
constructor(errors = {}, message = 'O... |
const express = require('express');
const app = express();
const http = require('http').Server(app);
const io = require('socket.io')(http);
const port = process.env.PORT || 1500;
app.use(express.static(__dirname + '/public'));
var bots = [];
function botStatus(data) {
var myColor = data.color;
if... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.