code stringlengths 2 1.05M |
|---|
var yaa = require('yaa');
var codec = require('../../../bin/index.js');
var runner = require('../../runner.js');
var testName = 'codec.json.decode';
var cases = [];
var input = {
'a': [3, 4],
'b': {
'e': 5,
'y': {
'a&j': 1
}
},
'c': "123"
};
var output = '{"a": [3, 4], "b": {"e": 5, "y": {"... |
+(function (factory) {
if (typeof exports === 'undefined') {
factory(webduino || {});
} else {
module.exports = factory;
}
}(function (scope) {
'use strict';
var push = Array.prototype.push;
var EventEmitter = scope.EventEmitter,
TransportEvent = scope.TransportEvent,
Transport = scope.Tra... |
'use strict';
var connectSSI = require('connect-ssi');
module.exports = {
grunt: {
connect: {
server: {
options: {
port: 9001,
base: './',
livereload: 4444,
debug: true,
open: true,
middleware: function(connect, options, middlewares) {
... |
/*! SmartAdmin - v1.5 - 2014-10-13 */if($(".tree > ul")&&!mytreebranch){var mytreebranch=$(".tree").find("li:has(ul)").addClass("parent_li").attr("role","treeitem").find(" > span").attr("title","Collapse this branch");$(".tree > ul").attr("role","tree").find("ul").attr("role","group"),mytreebranch.on("click",function(a... |
"use strict";
/*
* Copyright 2015 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the terms of the LICENSE file distributed with this project.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var classNames = require("classnames");
var React = req... |
'use strict';
module.exports = function(app, config) {
if (config.facebook) {
require('./facebook')(app, config.facebook);
}
if (config.google) {
require('./google')(app, config.google);
}
if (config.twitter) {
return require('./twitter')(app, config.twitter);
}
};
|
import React, { Component } from 'react'
import { Grid, Col, Row } from 'react-bootstrap'
/* re-export */
export { default as About } from './About'
export * from './Hobbies'
export { default as App } from './App'
export { default as Footer } from './Footer'
export { default as Header } from './Header'
export { defau... |
import React from 'react'; const House = (props) => <svg {...props} viewBox="0 0 24 24"><g><g><polygon points="6.00058581 10.9998 6 11 6 19.9998 11 19.9998 11 16.0009 13 16.0009 13 19.9998 18 19.9998 18 11 17.9994142 10.9998 18.0027466 10.9998 12.0003 4.9998 6.0003 10.9998"/></g></g></svg>; export default House;
|
/**
* Numpy like n-dimensional array proccessing class
* http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html
*
* @author pissang (https://github.com/pissang/)
*/
define(function(require) {
'use strict';
require('./kwargs');
var ArraySlice = Array.prototype.slice;
var global = window;
// Polyfill of T... |
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.ui.core.mvc.View.
sap.ui.define(['jquery.sap.global', 'sap/ui/base/ManagedObject', 'sap/ui/core/Co... |
'use strict';
angular.module('answers').controller('AnswersController', ['$scope', '$stateParams', '$location', 'Authentication', 'Answers',
function($scope, $stateParams, $location, Authentication, Answers) {
$scope.authentication = Authentication;
$scope.create = function() {
var answer = new Answers({
... |
/*
* @package Cyprass
* @subpackage Cyprass HTML
*
* Template Scripts
* Created by Themeturn
1. Fixed header
2. Site search
3. Main slideshow
4. Owl Carousel
a. Testimonial
b. Clients
c. Team
5. Back to top
6. Skills
7. BX slider
a. Blog Slider
... |
"use strict";
const yaml = require("js-yaml");
const _ = require("lodash");
const fs = require("fs");
const path = require("path");
const logger = require("log4js").getLogger("translations");
const utils = require("./utils");
const parseYaml = (file) => {
try {
return yaml.safeLoad(file.contents);
} catch (e... |
'use strict';
var getInstalled = require('../../../lib/component/getInstalled');
describe('component getInstalled', function () {
it('should get installed components', function (done) {
getInstalled()
.then(function (installed) {
var installedList = installed.map(function (component) {
r... |
(function(h,x){"object"===typeof module&&module.exports?module.exports=x(require("jquery")):x(h.jQuery)})(this,function(h){function x(a,c,d){a=h(a);(c=c||a.data("title"))||(c=a.attr("title"));if(c){var b=h('<div class="ssi-fadeOut ssi-fade ssi-tooltipText">'+c+"</div>").appendTo(d.$element);a.one("mouseleave",function(... |
/*
* This file is part of the Fxp package.
*
* (c) François Pluchino <francois.pluchino@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import AppPjax from '../app-pjax';
import '@fxp/jquery-table-select';
/**
* Add t... |
'use strict';
const fs = require('fs');
const path = require('path');
const util = require('util');
const assert = require('assert');
const extract = require('..');
const read = name => fs.readFileSync(path.join(__dirname, `fixtures/${name}`), 'utf8');
function isBlock(c) {
return c.type === 'BlockComment';
}
funct... |
/**
* Test sagas
*/
/* eslint-disable redux-saga/yield-effects */
import { take, call, put, select, cancel, takeLatest } from 'redux-saga/effects';
import { createMockTask } from 'redux-saga/lib/utils';
import { LOCATION_CHANGE } from 'react-router-redux';
import { paths } from 'config';
import request from 'utils/... |
import { status, json } from '../../../shared/helpers/fetch';
import steamAuth from 'electron-steam-openid';
export default function requestToken() {
var config = {
redirectUri: 'http://localhost'
};
const windowParams = {
alwaysOnTop: true,
autoHideMenuBar: true,
webPreferences: {
nodeInte... |
var mongoose = require('mongoose');
mongoose.connect('mongodb://mongo:dm4ever@ds028799.mlab.com:28799/discretka');
module.exports = mongoose.connection; |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var PaymentSchema = new Schema({
reference: String,
businessId: String,
customerId: String,
price: Number,
status: {
type: Boolean,
default: 0
}
});
module.exports = mongoose.model('Payment', PaymentSchema)... |
/**
* @intro: action的类型管理.
*
*/
// 设置用户信息和登录
export const SET_USER_INFO = 'SET_USER_INFO'
|
const { assert } = require('chai');
const { beginTests } = require('./dist/tests.umd');
const mod = require('../dist/keycode.cjs');
beginTests(mod, { test: it, assertEquals: assert.equal });
|
'use strict';
/* jasmine specs for controllers go here */
describe('PhoneCat controllers', function() {
describe('PhoneListCtrl', function(){
var ctrl, $httpBackend;
beforeEach(module('phonecatApp'));
beforeEach(inject(function(_$httpBackend_, $controller) {
$httpBackend = _$httpBackend_;
$... |
// Generated on 2013-08-24 using generator-webapp 0.2.7
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function(connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're... |
'use strict';
var _ = require('underscore');
AnalyzeAllCtrl.$inject = ['$scope', '$http', '$location', 'd3', 'format'];
AnalyzeFactionCtrl.$inject = ['$scope', '$http', '$location', '$routeParams', 'd3', 'format'];
module.exports = {
faction: AnalyzeFactionCtrl,
all: AnalyzeAllCtrl
};
function AnalyzeAllCtrl... |
$(function() {
var socket = io();
var commands = [
"/close",
"/connect",
"/deop",
"/devoice",
"/disconnect",
"/invite",
"/join",
"/kick",
"/leave",
"/mode",
"/msg",
"/nick",
"/notice",
"/op",
"/part",
"/query",
"/quit",
"/raw",
"/say",
"/send",
"/server",
"/slap",
"/topic... |
var structrocksdb_1_1CompactionJobInfo =
[
[ "CompactionJobInfo", "structrocksdb_1_1CompactionJobInfo.html#a96e41af9b2d9ea49ac699face8afb0df", null ],
[ "CompactionJobInfo", "structrocksdb_1_1CompactionJobInfo.html#a8d54f1c4b1aee7a12c32fd7beab9f1ef", null ],
[ "base_input_level", "structrocksdb_1_1Compactio... |
var api = require('groupme').Stateless;
var botID = process.env.BOT_ID || -1;
var accessToken = process.env.ACCESS_TOKEN || -1;
var logger = require('./log.js');
const PAD_LENGTH = 25;
function _postMessage(message) {
var botResponse, options, body;
logger.info('Message sent');
api.Bots.post(accessToken, bot... |
/*
*
* SubmitRealWorldExample actions
*
*/
import {
DEFAULT_ACTION,
SUBMIT_RESOURCE,
SUBMISSION_COMPLETE,
SUBMISSION_ERROR,
} from './constants';
export function defaultAction() {
return {
type: DEFAULT_ACTION,
};
}
export function submitResource({url, title, description, captcha }) {
return {... |
const { knex } = require('../config/db');
const userType = require('../types/user');
class UserModel {
static list() {
return knex.from('user').whereNot('user.status', userType.DELETED);
}
static get(userId) {
return knex
.select('id', 'name', 'status')
.from('user')
.whereNot('user.st... |
describe("toHaveBeenCalled", function() {
it("passes when the actual was called, with a custom .not fail message", function() {
var matcher = jasmineUnderTest.matchers.toHaveBeenCalled(),
calledSpy = jasmineUnderTest.createSpy('called-spy'),
result;
calledSpy();
result = matcher.compare(call... |
/**
* A simple Chartist plugin to put labels on top of bar charts.
*
* Copyright (c) 2015 Yorkshire Interactive (yorkshireinteractive.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Soft... |
import React, { Component } from "react"
import { Link } from "gatsby"
import Img from "gatsby-image"
import hex2rgba from "hex2rgba"
import { style } from "glamor"
import styles from "../shared/styles"
import MdArrowForward from "react-icons/lib/md/arrow-forward"
import ShowcaseItemCategories from "./showcase-item-ca... |
const snekfetch = require('snekfetch');
exports.run = (client, msg, args) => {
let [title, contents] = args.join(" ").split("|");
if(!contents) {
[title, contents] = ["Achievement Get!", title];
}
let rnd = Math.floor((Math.random() * 39) + 1);
if(args.join(" ").toLowerCase().includes("burn")) rnd = 38;
... |
/**
* @module environment
* @description
* Update the given environment
*/
const properties = require('./properties');
const keywords = require('./keywords');
const validators = require('../validators');
const formats = require('./formats');
const { keys } = require('./uri');
const { transformation } = require('./s... |
require("./coverage");
describe("The user", function () {
afterEach(uploadCoverage);
it("should be able to open the list of suppliers", function () {
browser.get("");
element(by.css(".navigation-link")).click(); // Open the modal
element(by.css("a[ui-sref=suppliers]")).click(); // Cli... |
var crypto = require('crypto');
var sodium = {};
exports.id = '3a';
// env-specific crypto methods
exports.crypt = function(lib)
{
sodium = lib;
}
exports.generate = function(){
var kp = sodium.crypto_box_keypair();
return Promise.resolve({key:kp.publicKey, secret:kp.secretKey})
}
exports.Local = function(pai... |
const utils = require('../utils')
module.exports = () => {
return async (ctx, next) => {
await next()
const events = ctx.state.outgoingEvents
const client = ctx.clients.LINE
const results = await Promise.all(
events.map(async e => {
if (e.event === 'whoami') {
const userProf... |
goog.provide('ngeo.mapDirective');
goog.require('goog.asserts');
goog.require('ngeo');
goog.require('ol.Map');
/**
* Provides a directive used to insert a user-defined OpenLayers
* map in the DOM. The directive does not create an isolate scope.
*
* Example:
*
* <div ngeo-map="ctrl.map"></div>
*
* See ou... |
var util = require("util");
var choreography = require("temboo/core/choreography");
/*
CreateIdentity
Create a new identity.
*/
var CreateIdentity = function(session) {
/*
Create a new instance of the CreateIdentity Choreo. A TembooSession object, containing a valid
set of Temboo creden... |
'use strict';
var assert = require('assert');
var yaml = require('../../');
var DEPRECATED_BOOLEANS_SYNTAX = [
'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
];
it('Dumper should not take into account booleans syntax from YAML 1.0/1.1 in noCompatMode', funct... |
// index.js
console.log('Hello, npm!'); |
"use strict";
/**
* Parses Command Arguments.
*
* @export
* @returns {IFacile}
*/
function parse() {
var ver = this._pkg.version;
return this;
}
exports.parse = parse;
//# sourceMappingURL=commands.js.map |
var expect = require("chai").expect;
var sinon = require("sinon");
var proxyquire = require("proxyquire");
var requestStub = sinon.stub();
var service = proxyquire("../lib/services/facebook.service", {
request: requestStub
});
var config = require("./../lib/config/services.config.json")['facebook'];
describe("Fac... |
// Static code to support GIS Feature CRUD
s3_gis_feature_crud = function(feature_type) {
if (feature_type === '') {
// Pass
} else if (feature_type == 1) {
// Point
// Hide the WKT input
$('#gis_location_wkt__row').hide();
$('#gis_location_wkt__row1').hide();
/... |
'use strict';
require('./_contact.scss');
module.exports = {
template: require('./contact.html'),
controller: ['$log', '$location', ContactController],
controllerAs: 'contactCtrl'
}
function ContactController($log, $location){
$log.log('ContactController()');
}
|
var PLAYER = {};
PLAYER.ticksPerBeat = 1200;
//PLAYER.delay0 = 1;
PLAYER.delay0 = 0.0;
PLAYER.isPlaying = false;
PLAYER.distPerSec = 0.2;
PLAYER.graphics = null;
PLAYER.scene = null;
PLAYER.graphicsScale = null;
PLAYER.muted = {};
PLAYER.midiObj = null;
PLAYER.loadedInstruments = {};
PLAYER.lastEventPlayTime = 0;
PLAY... |
'use strict';
module.exports = require('@esscorp/eslint').configs.backend;
|
import { expect } from 'chai';
import * as DateHelpers from '../../../imports/helpers/date';
import * as SubElements from '../../../imports/helpers/subElements';
import proxyquire from 'proxyquire';
import sinon from 'sinon';
import _ from 'underscore';
let MeetingSeriesSchema = {};
let Meteor = {
call: sinon.stub... |
/**
* Created by bogdanbiv on 8/24/14.
*/
define([
'intern!object',
'intern/chai!assert',
'dojo/request',
'public/components/dojox/calendar/Calendar',
'public/demos/calendar/utils'
], function (registerSuite, assert, request, calendar, utils) {
alert(JSON.stringify(calendar));
registerSuite({
name:... |
version https://git-lfs.github.com/spec/v1
oid sha256:193e020858b961763caecc34b9e8f573f3990659ca52da8e2aa67ff56a6e5dd0
size 11945
|
/*
* 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 ri... |
var _ = require('underscore'),
merge = require('deepmerge'),
path = require('path'),
yaml = require('js-yaml');
module.exports = function(env, fs) {
function addEnvVar(config, name, value, processor) {
if (value !== undefined) {
config[name] = processor ? processor(value) : value;
}
}
... |
angular.module('invertedIndex', ['indexTable', 'fileUpload', 'fileMenu', 'navBar', 'search'])
.controller('UploadController', ['$rootScope', '$scope', ($rootScope, $scope) => {
$rootScope.generatedIndex = [];
const readFile = (file) => {
return new Promise((resolve) => {
const reader = new File... |
const mongoose = require('../utils/mongoose-shim');
mongoose.models = {};
module.exports = {
InviteCode: require('./invite'),
Job: require('./job').default,
User: require('./user').default,
Project: require('./project'),
Config: require('./config'),
};
|
export default (() => {
let o;
return Jymfony.Component.VarExporter.Internal.Hydrator.hydrate(
o = [
(new ReflectionClass('Jymfony.Component.DateTime.Internal.RuleSet')).newInstanceWithoutConstructor(),
(new ReflectionClass('Jymfony.Component.DateTime.Internal.Rule')).newInstance... |
'use strict';
/*jshint asi: true*/
var test = require('tap').test
, util = require('util')
, fs = require('fs')
, customTheme = require('./fixtures/custom')
, cardinal = require('..')
function inspect (obj) {
return console.log(util.inspect(obj, false, 5, false))
}
var code = 'function foo() ... |
define([], function () {
angular.module('ntext', [])
.filter('ntext', function ($sce) {
return function (text) {
return $sce.trustAsHtml(text.replace("\n", '<br />'));
}
});
;
}); |
'use strict';
import React from 'react'
import ModuleContain from './component/module/moduleContain'
import {Link, Route} from 'react-router-dom'
import {links, routes} from './config'
const cn = require('classnames/bind').bind(require('./app.scss'))
const App = props =>
<div className={cn('app')}>
{/*<Nav... |
const fs = require('fs')
const path = require('path')
const yaml = require('js-yaml')
const prettify = require('prettify-xml')
const generatePictureList = require('../src/utils/generatePictureList.js')
const generateBlogList = require('../src/utils/generateBlogList.js')
const siteData = require('../src/utils/siteData.j... |
var gulp = require('gulp');
var less = require('gulp-less');
var lessJsonImport = require('../index');
gulp.src(['*/style.less'])
.pipe(lessJsonImport())
.pipe(less())
.pipe(gulp.dest(__dirname + '/dist')); |
"use strict";
if ( typeof theory === 'undefined' ) {
throw new Error('You must load theory.js first.');
}
/*
* Theory's navigate handling -- allows for navigation around object structures
* in a similar way to jQuery.
*
* @module theory
* @class t.navigate
*/
t.internal.navigate = t.creator({
theory: {
... |
describe('Controller: EditItemCtrl', function () {
// load the controller's module
beforeEach(module('barcodeCartBuilder', 'ionic', 'barcodeCartBuilder.services'));
var EditItemCtrl,
scope,
itemMock = {},
stateMock = {},
stateParamsMock = {};
var fakeBarcode1 = "123456... |
import {isEmpty} from 'lodash';
export default function addFolderFormValidate(values) {
const errors = {};
if (! values.sourceLanguage) {
errors.sourceLanguage = {id: 'field-source-language-required'};
}
if (isEmpty(values.targetLanguages)) {
errors.targetLanguages = {id: 'choose-at-least-one-target... |
/* @flow */
import { display } from '../display';
import { COLOR } from '../data/default';
import { DefineScale } from '../data/define';
import clip from '../clip/index';
export default function(settings: Object, _this: Global): GraghShape {
const draw = function() {
const canvas = _this.canvas;
const scale... |
var callStdLibFn = require("../utils/callStdLibFn");
module.exports = function(ast, comp, e){
if(ast.value.length < 1){
return e("string", "");
}
var compElm = function(elm){
if(elm.type === "String"){
return e("string", elm.value, elm.loc);
}
return callStdLibFn... |
/*
* The MIT License
*
* Copyright 2012 Luis Salazar <bp.lusv@gmail.com>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the right... |
exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.createTable('lookup', function (table) {
table.integer('id').primary();
table.string('description').notNullable();
}),
knex.schema.table('sample', function (table) {
table.integer('value').references('id').inTable('lookup');
})
... |
define(module, function(exports, require) {
var code = {
hex: [
'\u0000', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005', '\u0006', '\u0007', '\u0008', '\u0009', '\u000A', '\u000B',
'\u000C', '\u000D', '\u000E', '\u000F', '\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015', '\u0016', '\u0017... |
(function() {
'use strict';
angular
.module('portrack', ['ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ngResource', 'ngRoute', 'ui.bootstrap']);
})();
|
exports.config = {
namespace: 'castle',
generateDistribution: true,
bundles: [
{
components: [
'le-mirror',
'le-ascii-art'
]
}
]
};
exports.devServer = {
root: 'www',
watchGlob: '**/**'
}
|
//声明变量
//进度条显示层,背景层,方块绘制层,方块预览层
var loadingLayer,backLayer,graphicsMap,nextLayer;
var imglist = {};
var imgData = new Array(
{name:"backImage",path:"../1/images/backImage.png"},
{name:"r1",path:"../1/images/r1.png"},
{name:"r2",path:"../1/images/r2.png"},
{name:"r3",path:"../1/images/r3.png"},
{name:"r4",path:"../... |
var underscore = require('underscore');
/**
* Before creating any "SourceModel" that has a valid "hasOne" association with any other "TargetModel",
* automatically update the relating model if we haven't been specifically disabled.
*
* @param {Object} values the data originally provided to SourceModel.upda... |
var applicationConfig = require('../config.js').application;
module.exports = function(server, handler) {
server.route({
method: 'POST',
path: applicationConfig.apiUrl + 'login',
handler: handler
});
};
|
var Dictionary = require("@kaoscript/runtime").Dictionary;
module.exports = function() {
let foo = (() => {
const d = new Dictionary();
d.bar = "hello";
return d;
})();
}; |
const BaseStepWithPipeline = require('./basestepwithpipeline.js');
const SimpleStep = require('./simplestep.js');
const { EventNames } = require('../Constants');
const { EffectNames } = require('../Constants');
/**
D. Duel Timing
D.1 Duel begins.
D.2 Establish challenger and challengee.
D.3 Duel honor bid.
D.4 Reveal... |
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
// User Model
var User = require('../../models/user.server.model.js');
//possibly refactor to use userCtrl later - may need verifyUser method
//var userCtrl = require('../../controllers/user.server.controller');
module.exports... |
'use strict';
var DocBlock = require('./docBlock.js');
var marked = require('marked');
var fluf = require('fluf');
// marked.setOptions({
// renderer: new marked.Renderer(),
// gfm: true,
// tables: true,
// breaks: false,
// pedantic: false,
// sanitize: true,
// smartLists: true,
// ... |
/*
R: the following works to send & exec stuff from an iMac to an Espruino board ( original ) using an audio cable
This is what needs to be called on the iMac side of things ( see AST - AduioSerialTest [ using Espruino's team code ] ):
AST.audio_serial_write('digitalWrite(LED3, 1);\n', function(){ console.log... |
var app = angular.module(‘myApp', [‘ngRoute’]);
app.config(function($routeProvider) {
$routeProvider.when('/page1', {
templateUrl: 'templates/page1.html',
controller: 'page1Controller'
});
$routeProvider.otherwise({
redirectTo: '/'
}); |
//@flow
import type { InteractionsWithElement } from 'services/domEvents';
import { MouseMovementEventsForElementProvider } from './MouseMovementEventsForElementProvider';
export function getMouseMovementEvents(element : HTMLElement) : InteractionsWithElement {
const provider = new MouseMovementEventsForElementPro... |
/**
* hilojs 2.0.2 for standalone
* Copyright 2016 alibaba.com
* Licensed under the MIT License
*/
!function(n){n.Hilo||(n.Hilo={});var o=n.Hilo.Class,e=n.Hilo.util,i=o.create({constructor:function(n){n=n||{},e.copy(this,n,!0)},renderType:null,canvas:null,stage:null,blendMode:"source-over",startDraw:function(n){},d... |
export function fuzzyBinarySearch(elements, value, accessor) {
let lo = 0,
hi = elements.length - 1,
best = null,
bestValue = null;
while (lo <= hi) {
let mid = (lo + hi) >>> 1;
let midValue = accessor(elements[mid]);
if (bestValue === null || Math.abs(midValue - value) < Math.abs(be... |
angular.module("ehelseEditor",
["ui.router","ui.bootstrap","ngRoute","angularModalService", "checklist-model", "ngCookies","cfp.loadingBar","ngMessages", "angular-autogrow"])
.config(["$compileProvider", "$provide", function ($compileProvider, $provide) {
$compileProvider.debugInfoEnabled(false);
... |
// Copyright IBM Corp. 2014,2016. All Rights Reserved.
// Node module: generator-loopback
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
'use strict';
var url = require('url');
var chalk = require('chalk');
var generator = require('loopback-swagger');
... |
'use strict';
var paths = require('../options/paths.js');
var tslint = require('gulp-tslint');
var scsslint = require('gulp-scss-lint');
module.exports = function (gulp) {
gulp.task('lint:ts', function () {
return gulp.src(paths.src.typescript_lint)
.pipe(tslint())
.pipe(tslint.rep... |
/**
* Generic non bubling event system for core classes.
*/
(function() {
core.Class("lowland.base.Events", {
implement : [core.property.IEvent],
members : {
/**
* Fire event @type {String} on this class with special @value {var} and @old {var} parameter.
* This method is used by core property system to... |
var assert = require('assert')
, svgicons2svgfont = require(__dirname + '/../src/index.js')
, Fs = require('fs')
, StringDecoder = require('string_decoder').StringDecoder
, Path = require("path");
// Helpers
function generateFontToFile(options, done, fileSuffix) {
var codepoint = 0xE001
, dest = __dirnam... |
import React from 'react'
import { CreditCardForm } from './index'
import { DefaultExample, CustomExample } from './examples'
import { DocsPage } from 'storybook/docs-page'
export default {
title: 'Form/CreditCardForm',
component: CreditCardForm,
parameters: {
docs: {
page: () => (
<DocsPage
... |
let appKey='kid_HkPyH6eX7';
let appSecret='5110fa2733374292b1793f24a16abddd'
let hostUrl='https://baas.kinvey.com';
let masterSecret='9c397b386b744aa5afa3828a84f46899'
let requester={
register: payload=>{
return fetch(`${hostUrl}/user/${appKey}`,{
method:'POST',
headers:{
... |
var instagramPictures = new Array();
function refreshInstagram(){
$.get("getInstagram.php").done(function(data){
instagramPictures = new Array();
var instagramData = jQuery.parseJSON(data);
console.log("Amount of Instagrams: " + instagramData.length);
for (var i = 0; i < instagramData.length; i++) {... |
Ext.define('cat.view.Main', {
extend: "Ext.Map",
xtype: 'mapview',
id:'map11',
config: {
mapOptions: {
center: new google.maps.LatLng(26.6300, 92.8000),
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
zoom:6,
},
... |
var util = require('util');
var User = require('../entities/User');
var MainModel = require('../../../lib/main/main-model');
/**
* @author Macky Dieng
* @license MIT - http://opensource.org/licenses/MIT
* @copyright 2016 the author
*
* Represents a UserModel
* @constructor
*/
function UserModel() {
/**
* The coll... |
'use strict';
app.factory('organizerData', function ($resource, $http, $q) {
var url = 'http://localhost:9274/';
function parseErrors (serverError) {
var errors = [];
if (serverError && serverError.error_description) {
errors.push(serverError.error_description);
}
... |
const copyThemeDir = require('../../lib/copy-theme-dir')
exports.command = 'theme-init [dirName]'
exports.describe = 'Copy theme directory to working directory.'
exports.builder = yargs => {
yargs.options({
d: {
alias: 'destDir',
default: 'theme',
requiresArg: true,
describe: 'Path of d... |
var FiltersModule = angular.module('FiltersModule');
FiltersModule.filter('VisibilityToButtonStyleFilter', function ()
{
return function (input)
{
return input ? 'btn btn-danger' : 'btn btn-primary';
};
}); |
import $ from 'jquery';
import _ from 'underscore';
import People from './people';
export default class Area {
constructor(name) {
this.name = name;
this.people = new People;
}
load(people) {
_.each(people, (value, key) => {
this.people.addAge(value.age, value.man, value.female);
});
}
}... |
import { module, test } from 'qunit';
import { currentURL, visit } from '@ember/test-helpers';
import { find } from 'ember-native-dom-helpers';
import { setupApplicationTest } from 'ember-qunit';
const styleString = 'touch-action: manipulation; -ms-touch-action: manipulation; cursor: pointer;';
module('Acceptance | i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.