code stringlengths 2 1.05M |
|---|
#!/usr/bin/env node
/*
Terminal Kit
Copyright (c) 2009 - 2021 Cédric Ronvel
The MIT License (MIT)
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 lim... |
var setFileOverlayHandler = function(id) {}
var imageHook = function (e, data) {
if(data.result.status === "success") {
$('input[name=profileImage').val(data.result.content);
$('.playsHideAndSeek').hide('slow');
}
else {
console.log("error" + data.result.content);
}
};
|
const express = require('express');
const app = express();
const routers = require('./routers');
routers.init(app);
app.listen(8000, function() {
let addr = this.address();
console.log('Start Listen->%s:%s', addr.address, addr.port)
}); |
function solve(args) {
var numbers = args[1]
.split(' ')
.map(Number)
.filter(function (a) {
return +a === +args[2];
}).length;
console.log(numbers);
}
solve([ '8', '28 6 21 6 -7856 73 73 -56', '73' ]); |
/**
*
* search query results manager
*
* @param {type} _
* @param {type} utilities
* @param {type} EventsLibrary
* @param {type} searchQueriesResultsCollection
* @param {type} tracksManager
* @param {type} TracksCollection
* @param {type} async
*
* @returns {_L17.Anonym$2}
*/
define([
'underscore',
... |
import * as ActionTypes from './action-types';
export const searchFlightStarted = () => ({
type: ActionTypes.SEARCH_FLIGHT_STARTED,
payload: {}
});
export const searchFlightFailed = (payload) => ({
type: ActionTypes.SEARCH_FLIGHT_FAILED,
payload
});
export const searchFlightCompleted = (payload) => ({
... |
var fs = require("fs");
var file = "page.html";
var content = fs.readFileSync(file, {
encoding: "utf8"
});
var data = {
file: file,
content: content
};
fs.writeFileSync("page.json", JSON.stringify(content)); |
import Promise from 'bluebird'
import { merge } from 'ramda'
import runTest from '../../test/runTest'
const findOptions = {
connect: {
api_key: 'abc123',
},
method: 'GET',
body: {
api_key: 'abc123',
},
}
test('client.transfers.find', () => {
const find = runTest(merge(findOptions, {
subject: ... |
define(function() {
return window.getComputedStyle;
}); |
/* global createSelect2 */
$(document).ready(function() {
createSelect2('#user_per_page', {
width: '70px',
minimumResultsForSearch: 20,
});
createSelect2('#user_default_view', {
width: '100px',
minimumResultsForSearch: 20,
});
createSelect2('#user_default_character_split', {
width: '250... |
(function( $ ) {
$.widget("smartclassroom.treeview", {
version: "1.0.0",
options: {
onNodeClick: function(node){},
onNodeCollapsed: function(node){},
onNodeExpanded: function(node){}
},
_create: function(){
var that = this, element =... |
export { default } from 'modal-components/components/form-label'; |
// UAParser.js v0.6.16
// Lightweight JavaScript-based User-Agent string parser
// https://github.com/faisalman/ua-parser-js
//
// Copyright © 2012-2013 Faisalman <fyzlman@gmail.com>
// Dual licensed under GPLv2 & MIT
(function (window, undefined) {
'use strict';
//////////////
// Constants
/////////... |
/**
* Importamos el módulo ab-pasarelaAbanca
*/
const abAbanca = require('ab-pasarelaAbanca');
/**
* Crea una instancia de abAbanca con los datos estáticos
*/
const abanca = new abAbanca(cyphKey, MerchantID, AcquirerBIN, TerminalID, Cifrado, TipoMoneda, Exponente, Pago_soportado, Idioma, tpvUrl);
/**
* Devuelve un... |
'use strict';
/* Directives */
app.directive('ensureUnique', ['RestFul', function (RestFul) {
return {
require: 'ngModel',
link: function (scope, elm, attrs, ctrl) {
scope.$watch(attrs.ngModel, function () {
if ((attrs.ensureUnique !== '') && (attrs.... |
'use strict';
//Agegroups service used to communicate Agegroups REST endpoints
angular.module('agegroups').factory('Agegroups', ['$resource',
function($resource) {
return $resource('agegroups/:agegroupId', { agegroupId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]); |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash');
/**
* Extend user's controller
*/
module.exports = _.extend(
require('./users/authentication.js'),
require('./users/authorization.js'),
require('./users/password.js'),
require('./users/profile.js'),
require('./users/create.js')
);
|
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Web Client
* Copyright (C) 2007, 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a ... |
$(document).ready(function() {
/**** Global Variables *******/
var objects = new Array('ball','banana','cup','flower','glass');
var currentDragObject; //store the id of current drag object selected
var currentDropObject; //store the id of current drop object selected
var dropNumber; //current drop Area ... |
version https://git-lfs.github.com/spec/v1
oid sha256:758594af7f95ef916f6fecca9e438a190cdbb157dc29923b7d9cfada6de561d4
size 2543
|
/*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* 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... |
export default function(server) {
server.createList('car', 10);
server.createList('part', 10, { car_id: 1 });
// Seed your development database using your factories. This
// data will not be loaded in your tests.
// server.createList('contact', 10);
}
|
$('#input-form2').one('submit',function(){
var inputq11 = encodeURIComponent($('#input-q11').val());
var inputq12 = encodeURIComponent($('#input-q12').val());
var inputq13 = encodeURIComponent($('#input-q13').val());
var inputq14 = encodeURIComponent($('#input-q14').val());
var inputq15 = encodeURI... |
'use strict';
var StakeController = {};
/**
* Module dependencies.
*/
var util = require('../utilities/util'),
stakeService = require('../services/stake');
module.exports = StakeController;
StakeController.fnReadByID = function(req, res) {
var id = req.params.id || req.body.id;
var promise = stakeSer... |
// This is the proper way to start a javascript library
(function() {
// This makes the arguments variable behave the way we want it to and a few
// other things. For more info:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
'use strict';
// This allows us to use our "_" anywhere. In... |
import { ms } from "../src/milsymbol";
ms.reset();
import { app6b } from "stanagapp6";
import verify from "./letter-sidc";
ms.setStandard("APP6");
import { air as icons } from "../src/lettersidc";
ms.addIcons(icons);
export default verify(ms, "APP-6 B Air", app6b.WAR.AIRTRK);
|
'use strict';
var fs = require('fs');
var path = require('path');
var Sequelize = require('sequelize');
var env = process.env.NODE_ENV || 'development';
var config = require(__dirname + '/../bin/config.json')[env];
var sequelize = new Sequelize('postgres:/Southwind');
var db = {};
// if (c... |
const coap = require('coap')
,request = coap.request
,bl = require('bl')
,req = request({hostname: 'localhost',port:5683,pathname: '',method: 'POST'});
req.setOption('Block2', [new Buffer('1'),new Buffer("'must'"), new Buffer('23'), new Buffer('12')]);
req.setHeader("Accept", "application... |
'use strict';
var React = require('react')
var subscribeUIEvent = require('subscribe-ui-event')
/*
* <_Resize_ onResize={this.handleResize} throttle='raf' />
*/
class _Resize_ extends React.Component {
constructor() {
super()
this.resize = null
this.resizeStart = null
this.resizeEnd = null
}
... |
module.exports = [
{ a: true,
b: true,
c: true,
e: true,
f: true,
g: true,
h: true,
i: true,
j: true,
k: true,
l: true,
m: true,
n: true,
o: true,
p: true,
q: true,
r: true,
s: true,
t: true,
u: true,
}
];
|
/*
* blogdown
*
* Copyright (c) 2013 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
var RESET = '\x1B[0m';
var NORMAL = '\x1B[0;';
var BOLD = '\x1B[1;';
var WHITE = '37m';
var YELLOW = '33m';
var RED = '31m';
function wrap(fn, prefix, color) {
return function () {
var args = Arra... |
/**
* Created by Maurice on 6/17/2015.
*/
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('mocha', function() {
return gulp.src('test/index-tests.js', { read: false }).pipe(mocha());
});
gulp.task('watch', function() {
gulp.watch('**/*.js', ['mocha']);
});
gulp.task('default', ['mocha... |
let pieceToFunc = {
'pawn': pawnMoveCheck,
'knight': knightMove,
'bishop': bishopMove,
'rook': rookMove,
'queen': queenMove,
'king': kingMove
}
let threatCheck = {
'pawn': pawnThreat,
'knight': knightMove,
'bishop': bishopMove,
'rook': rookMove,
'queen': queenMove,
'king': kingMove
}
function i... |
//= require jquery
//= require ./jquery.ui.widget
//= require ./jquery.iframe-transport
//= require ./jquery.fileupload
//= require ./upload
//= require ./image_picker
//= require ./fullscreen
//= require ./Markdown.Converter
//= require ./Markdown.Editor
//= require ./editor
|
;(function () {
'use strict';
angular.module('app')
.controller('NutzungDirectiveController', NutzungDirectiveController);
NutzungDirectiveController.$inject = ['$scope'];
function NutzungDirectiveController($scope) {
let vm = this;
vm.nutzung = $scope.nutzung;
vm.zu... |
var compose = require('ksf/utils/compose')
var _Evented = require('ksf/base/_Evented')
var delegateGetSet = require('./utils/delegateGetSet');
var getSet = require('./utils/getSet')
var onOffEvent = require('./utils/onOffEvent')
module.exports = compose(_Evented, function(ratioWH, content) {
this._ratio = ratioWH
... |
/* LG.js
* Event
* Dependant: core
*/
(function($lg, window) {
if(!$lg) {
return;
}
var lg = $lg.proto;
$lg.event = {
eventStore : {},
eventObj : function(event) {
if(event.lg_fixed === $lg.expando) {
return event;
}
var newevent = {
lg_fixed : $lg.expando,
originalEvent : ev... |
import { Config } from "loco-js-model";
Config.protocolWithHost = "http://localhost:3000";
|
var express = require('express');
var router = express.Router();
var filter = require('./passport.js');
var Page = require('../db/page');
router.post('/', function (req, res, next) {
filter.authorize(req, res, function (req, res) {
var itemId = req.body.itemId;
var type = req.body.type;
var... |
$(function() {
$('.votes span').click(function(e) {
e.preventDefault();
var url, element = $(this);
if ($(this).data('type') == 'question') {
url = '/app_dev.php/question/vote/';
} else if ($(this).data('type') == 'answer') {
url = '/app_dev.php/answer/vote... |
import _ from 'underscore'
export default class Sync {
static checkMatches (payload) {
const storage = SyncStorage.getStored()
let notification = false
if (storage.matches.length) {
payload.matches.forEach(function (match) {
const storedMatch = _.findWhere(storage.matches, {_id: match._id}... |
import initialState from './initialState';
import {LOAD_LIBRARIES_SUCCESS} from '../actions/';
export default function libraryReducer(state = initialState.library, action) {
switch (action.type) {
case LOAD_LIBRARIES_SUCCESS :
{
return action.payload;
}
default:
return state;
}
}
|
var regex = /\/xyz/gi; |
const Config = require('../../models/config');
describe('config model', () => {
it('requires name', done => {
const config = new Config();
config.validate()
.then(() => done('expected error'))
.catch(() => done());
});
it('validates with required fields', done => {
const config = new Con... |
(function () {
'use strict';
var coordToWGS84 = function(coord) {
var wgs_coord = {
"latitudeRef" : coord.latitude > 0 ? "N" : "S",
"latitude" : [[Math.floor(Math.abs(coord.latitude)),1]],
"longitudeRef" : coord.longitude > 0 ? "E" : "W",
"longitude": [[Math.floor(Math.abs(coord.longitud... |
import * as lamb from "../..";
describe("throttle", function () {
var value = 0;
var foo = jest.fn(function () {
++value;
});
var now = Date.now();
jest.spyOn(Date, "now")
.mockReturnValueOnce(now)
.mockReturnValueOnce(now + 10)
.mockReturnValueOnce(now + 50)
... |
(function(){
'use strict';
angular.module('topFive.search', []);
})();
|
import { parser as saxParser } from 'sax';
function isAllowedType(type) {
switch(type) {
case 'text': case 'opentag': case 'closetag': case 'doctype':
case 'processinginstruction': case 'attribute': case 'comment':
case 'opencdata': case 'closecdata': case 'opennamespace':
case 'closenamespace': case... |
'use strict';
var chai = require('chai-stack');
var prepare = require('../lib/prepare-db');
var rc = require('../lib/redis-client');
var t = chai.assert;
suite('prepare-db');
before(function (done) {
prepare(done);
});
test('prepare(cb) creates namespaces hash if does not exist', function (done) {
rc.hgetall('n... |
/**
* Created by gurpreet.singh on 04/22/2015.
*/
'use strict';
app.factory('CrudService', ['$http','$q', 'RestangularCustom', function ($http,$q, Restangular) {
return{
getById : function(baseUrl, id){
return Restangular.one(baseUrl, id).get();
},
getAll : function(baseUrl){
return Restang... |
var AMDFormatter = require('es6-module-transpiler-amd-formatter');
var PlsLoadFormatter = module.exports = function PlsLoadFormatter() {
AMDFormatter.call(this);
};
PlsLoadFormatter.prototype = Object.create(AMDFormatter.prototype);
PlsLoadFormatter.prototype.constructor = PlsLoadFormatter;
PlsLoadFormatter.prot... |
var webpack = require('webpack');
var config = require('./webpack.config');
var statsConfig = require('./statsConfig');
config.resolve.alias = {
'react': 'preact-compat',
'react-dom': 'preact-compat'
};
config.entry = './src/DonutChartWebComponent.js';
config.output.filename = 'DonutChartWebComponent.js';
web... |
var Transformer = require('tree-transformer');
var VisitorAsync = require('tree-visitor-async');
var _visitNode = VisitorAsync.prototype._visitNode;
module.exports = TransformerAsync;
function TransformerAsync() {}
TransformerAsync.prototype = new VisitorAsync();
TransformerAsync.prototype._visitNodes = function (n... |
// Generated by CoffeeScript 1.6.3
(function() {
var DateRange, moment;
moment = (typeof require !== "undefined" && require !== null) && !require.amd ? require("moment") : this.moment;
/**
* DateRange class to store ranges and query dates.
* @typedef {!Object}
*
*/
DateRange = (function() {
... |
(function() {
'use strict';
var Counter = Jedo.createUI({
model: function() {
return {
count: 0
};
},
template: function() {
return (
'<div class="counter-ui">' +
'<span class="count"><%= count %></span>' +
'</div>'
);
}
});
// render UI
var _Counter = Co... |
import React, { Component, PropTypes } from 'react';
import { Table } from 'antd';
import * as pageConfigs from 'pageConfigs';
import { connect } from 'react-redux';
import * as tableActions from 'reducers/table';
import { bindActionCreators } from 'redux';
import { Link } from 'react-router';
class AjaxTable extends ... |
'use strict';
var _ = require('lodash');
var Holodeck = require('../../../../holodeck');
var Request = require('../../../../../../lib/http/request');
var Response = require('../../../../../../lib/http/response');
var Twilio = require('../../../../../../lib');
var client;
var holodeck;
describe('ConnectApp', functio... |
var assert = require("assert"), doT = require("../doT");
describe('doT', function(){
var basictemplate = "<div>{{!it.foo}}</div>",
basiccompiled = doT.template(basictemplate),
definestemplate = "{{##def.tmp:<div>{{!it.foo}}</div>#}}{{#def.tmp}}",
definescompiled = doT.template(definestemplate);
descri... |
chrome.tabs.onCreated.addListener(function(){
chrome.storage.sync.get('limit', function(settings){
var tabLimit = settings.limit;
chrome.tabs.query({'currentWindow': true, 'active': true}, function(tabs){
var activeTabURL = tabs[0].url
chrome.tabs.query({'currentWindow': true}, function(tabs){
... |
$ = jQuery = require('jquery'); // unfortunately bootstrap requires jquery to be acesable globally :(
var React = require('react');
var Home = require('./components/homePage');
var About = require('./components/about/aboutPage');
var Header = require('./components/common/header');
var Authors = require('./components/au... |
import Sprite from './Sprite'
/**
* Crate class.
*/
export default class Crate extends Sprite {
}
|
version https://git-lfs.github.com/spec/v1
oid sha256:1829dcc9a5e12eb1392952062be20d728ee3704aed4e950ba9b56854746173d6
size 7182
|
cm.define('Com.TagsInput', {
'modules' : [
'Params',
'Events',
'Langs',
'Structure',
'DataConfig',
'Stack'
],
'require' : [
'Com.Autocomplete'
],
'events' : [
'onRender',
'onAdd',
'onRemove',
'onChange',
... |
Template.StartingList.rendered = function(evt, template) {
var currentPlayerId,
currentGameId;
$('ol.starting').droppable({
activeClass: 'active',
hoverClass: 'hover',
drop: function(event, ui) {
currentPlayerId = Session.get('sPlayerId');
currentGameId = Session.get('sGameId');... |
/* */
'use strict'
var qs = require('qs')
, querystring = require('querystring')
function Querystring (request) {
this.request = request
this.lib = null
this.useQuerystring = null
this.parseOptions = null
this.stringifyOptions = null
}
Querystring.prototype.init = function (options) {
if (this.lib) {... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Word Schema
*/
var WordSchema = new Schema({
name: {
type: String,
default: '',
required: 'Please fill Word name',
trim: true
},
created: {
type: Date,
default: Date.now
},
user: {
t... |
(function (){
const ObjecExtends = (source, add) => {
Object.keys(add).forEach(addProperty => {
source[addProperty] = add[addProperty];
});
};
const selector = (sel, ele) => {
ele = ele || document;
if (typeof(sel) !== 'string') {
return [sel];
} else {
return Array.prototype.slice.call(ele.queryS... |
'use strict';
(function(angular) {
var oauth2 = angular.module('OAuth2', ['ngCookies']);
// @include ../interceptor.js
// @include ../auth.js
})(angular);
|
'use strict';
var Logger = require('../lib/logger.js');
var path = require('path');
// setup config
var logger = new Logger(path.join(__dirname, 'config.json'));
logger.on('log', function (level, message) {
console.log('logged: ' + message + ' with level of: ' + level);
});
module.exports = logger;
|
/**
* Main file
* Pokemon Showdown - http://pokemonshowdown.com/
*
* This is the main Pokemon Showdown app, and the file you should be
* running to start Pokemon Showdown if you're using it normally.
*
* This file sets up our SockJS server, which handles communication
* between users and your server, and also s... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
crypto = require('crypto'),
validator = require('validator');
/**
* A Validation function for local strategy properties
*/
var validateLocalStrategyProperty = function (property) {
return ((this.provi... |
/**
* @param object Global Cockpit namespace
* @param object jQuery
*/
;( function( cockpit, $ ) {
$( document ).ready( function(){
$(".cockpit_metaboxes").parent().addClass('cockpit_tab_metaboxes')
// tabbed content
$(".cockpit_tabcontent").hide();
$(".cockpit_tabcontent:first").show();
$("ul.c... |
import Utils from '../utils'
function updateBinding (el, { value, modifiers }, ctx) {
if (!value) {
ctx.update()
return
}
if (typeof value === 'number') {
ctx.offset = value
ctx.update()
return
}
if (value && Object(value) !== value) {
console.error('v-back-to-top requires an object... |
/*
* GET home page.
*/
var conf = require('../config'), logger = require('tracer')[conf.log.strategy](conf.log.setting);
exports.index = function(req, res, next) {
logger.debug('index');
res.render('index', {
title : 'Express'
})
}; |
import Direction from 'Pool/Direction.js';
export default class Ball
{
constructor(color, position)
{
this.color = color;
this.position = position;
this.acceleration = 0.01;
this.direction = new Direction(Math.random() * 360);
}
getColor()
{
return this.color;
}
getPosition()
{
... |
/*
SITOA - Make Partition from Material - Gergely Wootsch 07/09/2015.
Adds Arnold Visibility and Matte properties to a partition created based on selected material(s).
The partition is overridden by the material by d efault or if specified below, creates a localised override ('makelocal = true').
*/
var makelocal = tr... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{MLPm:function(n,w,o){}},[["MLPm",2]]]);
//# sourceMappingURL=light.591ee81e63053ad31983.js.map |
/* */
(function(process) {
"use strict";
var schedule;
var noAsyncScheduler = function() {
throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
};
if (require("./util").isNode) {
var version = process.versions.node.split(".").map(Number);
schedule = (vers... |
//http://stackoverflow.com/a/14760377
String.prototype.paddingLeft = function (paddingValue) {
return String(paddingValue + this).slice(-paddingValue.length);
};
//Horde of Torque methods and other helpers that are super useful
getWord = function(text, word) {
return text.split(" ")[word];
};
getWordCount = function... |
var axios = require('axios');
var _ = require('lodash');
var moment = require('moment');
var utilities = module.exports = {
checkResponseStatus: function(res) {
if (res.status !== 200) {
throw new Error(res);
} else {
return res;
}
},
massageResponseData: function(data) {
return d... |
"autocall";function $_GET(){for(var o=window.location.search.substr(1).split("&"),n={},t=0;t<o.length;t++){var e=o[t].split("=");n[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return n} |
'use strict'
var format_if_necessary = require('./format_if_necessary')
var R = require('ramda')
module.exports = R.curry(function (space_replacement, data, header) {
var to_grab = header.toLowerCase().replace(/ /g, space_replacement)
return format_if_necessary(header)(data[to_grab]) })
|
/**
* @author mrdoob / http://mrdoob.com/
*/
import {
BufferGeometry,
DefaultLoadingManager,
FileLoader,
Float32BufferAttribute,
Group,
LineBasicMaterial,
LineSegments,
Material,
Mesh,
MeshPhongMaterial,
NoColors,
Points,
PointsMaterial,
VertexColors
} from "../../../build/three.module.js";
var OBJLoa... |
angular.module('gamilms_controller', [])
.controller('InstanceCtrl', ['$scope', '$uibModalInstance', 'snackbar', function($scope, $uibModalInstance, snackbar) {
$scope.share = function() {
snackbar.create("Hello World!!");
};
$scope.ok = function() {
$uibModalInstance... |
var util = require('util');
var fs = require('fs');
var _ = require('underscore');
var Stream = require('stream');
// my lib
var Replacer = require('./replace-text');
var GrepReplaceTextInFile = function (opts) {
var validReplacers = _.isArray(opts.replacers) && _.every(opts.replacers, function (replacer) {
retu... |
define(['jquery', 'Leaflet', 'text!templates/location.html', 'text!templates/fave-row.html', 'common', 'favorites', 'Handlebars'],
function($, L, html, html_row, common, favorites, Handlebars) {
'use strict';
$(document).ready(function() {
var $apply_button = $('#faves-contact'),
... |
var structuredClone = require('./structured-clone');
var HELLO_INTERVAL_LENGTH = 200;
var HELLO_TIMEOUT_LENGTH = 60000;
function IFrameEndpoint() {
var listeners = {};
var isInitialized = false;
var connected = false;
var postMessageQueue = [];
var helloInterval;
function postToParent(message) {
// Se... |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp",
"fr-ca",
{
title: "Instructions d'accessibilité",
contents: "Contenu de l'aide. Pour fermer cette fenêtre, appuy... |
global.path = __dirname;
var app = require('./backend');
app.run(); |
var fileName;
function OracleRecorder(recordRTCOptions){
//Constructor of a recorder that requires RecordRTC and recordRTCOptions which are mono 44,1kHz by default
if(typeof recordRTCOptions == "undefined"){
recordRTCOptions = {type: 'audio',
bufferSize: 16384,
sampleRate: 44100,
leftChannel: ... |
/**
* @file 脚本支持
* @author hejieye
* @time 2019-05-16
* @version 2.2.0
*/
define(function (require) {
var $ = require('zepto');
var customElem = require('customElement').create();
var busUid = '';
// var httpPath = 'https://mipp.iask.cn';
var httpPath = 'https://m.iask.sina.com.cn';
var fetchJso... |
'use strict';
var assert = require("assert");
var hypersort = require('../src/hypersort').hypersort;
var gsUtils = require('./gsUtils').gsUtils; // FixMe: Not sure why the .peopleMaker is needed
var peopleMaker = require('./testUtils').peopleMaker; // FixMe: Not sure why the .peopleMaker is needed
describe('Testing... |
import React from 'react'
import codegen from 'codegen.macro'
import {isPreact} from './constants'
let PropTypes
/* istanbul ignore next */
if (isPreact) {
if (!React.PropTypes) {
PropTypes = () => PropTypes
const allTypes = [
'array',
'bool',
'func',
'number',
'object',
... |
import hash from 'string-hash'
import { join, basename } from 'path'
import babelLoader from 'babel-loader'
// increment 'd' to invalidate cache
const cacheKey = 'babel-cache-' + 'd' + '-'
const nextBabelPreset = require('../../babel/preset')
const getModernOptions = (babelOptions = {}) => {
const presetEnvOptions ... |
/**
* Created by Administrator on 2017/4/29.
*/
var comName = GetQueryString("comName");
$("#entry_unit").click(function () {
var comName = GetQueryString("comName");
// alert(comName);
var entryType = "UNIT"
var workState = "KEEP"
var state = "1"
var condition = {
comName:comName,
... |
//비동기 데이터 수신 등에 사용
function RequestData (ctx) {
}
RequestData.prototype.readKey = function (keys, callback) {
this.readKeyRoutine(typeof keys == "string" ? [keys] : keys, callback);
}
RequestData.prototype.getValue = function (key, defaultValue) {
}
RequestData.prototype.readKeyRoutine = function (key... |
describe('Utilities and RNG', function () {
var number;
describe('standard rng', function () {
beforeEach(function () {
// Loops in tests... don't judge me.
});
it('should create a number', function () {
expect(randomNumberGenerator()).toEqual(jasmine.any(Numb... |
var EasyAssess = require('../easyassess.application');
EasyAssess.app.IqcClosedFormController = function($scope,$state,$stateParams) {
this.initialize.apply(this, arguments);
};
EasyAssess.app.IqcClosedFormController .prototype = EasyAssess.extend({
_initialize: function($scope,$state,$stateParams) {
f... |
/*
* Copyright (c) 2017, Feedeo AB <hugo@feedeo.io>.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
describe('Server', () => {
let subject
let serverful
before(() => {
serverful = td.object([])
serverful.Serverful = td.co... |
TestCase("Croaker.MappingAdvancedParses.Tests", {
testParseWithoutMembers: function() {
var mapper = new croaker.Mapper(),
module = mapper.map(this.entryNoMembers);
assertThat(module.namespaces[0].types[0].members, empty());
assertThat(module.namespaces[0].types[0].members.length, 0);
},... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.