code stringlengths 2 1.05M |
|---|
"use strict";
const fs = require('fs');
const extend = require('extend');
const yaml = require('js-yaml');
const mustache = require('mustache');
class Message {
/**
* Create a new message object.
* @param meta The message metadata.
* @param body The message body.
*/
constructor(meta, body) {
this.m... |
angular.module('myApp.directive').directive('bodyView', ['appConfig', function(appConfig){
return {
restrict: 'A',
templateUrl: 'build/html/body-view.html',
controller: 'BodyViewController'
};
}])
.controller('BodyViewController',['$scope', function($scope){
... |
(function (_tf) {
_tf.module('test', {
setup: function() {
},
teardown: function() {
}
});
test("error message giving inappropriate storage argument", 6, function() {
try {
DOMTE.render(function t13 () {});
ok(true);
} catch(error) {
throw new Error('This error should not happen: '+ error... |
/**
* Created by Ron on 14-5-7.
*/
require(['viewmodel/editAccount','knockout'],function(editAccount,ko){
var editAccount = new editAccount();
ko.applyBindings(editAccount);
});
|
'use strict';
var octobat = require('octobat');
if (octobat.DEFAULT_HOST === 'api.octobat.com') {
console.log('ok');
}
|
var BackgroundClass = Quill.import('attributors/class/background');
var ColorClass = Quill.import('attributors/class/color');
let SizeStyle = Quill.import('attributors/style/size');
let HistoryModule = Quill.import('modules/history');
Quill.register(BackgroundClass, true);
Quill.register(ColorClass, true);
Quill.regi... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... |
import rp from 'request-promise';
const USER_AGENT = 'apollo-accounts-server';
export default ({ access_token }, { key, secret }) =>
rp({
uri: 'https://api.github.com/user',
qs: {
access_token,
client_id: key,
client_secret: secret,
},
headers: {
'User-Agent': USER_AGENT,
... |
module.exports = {
id: 'a',
className: 'a box',
template: require('./template.html'),
data: {
msg: 'I am component A!'
}
} |
'use strict';
var sinon = require('sinon'),
sinonChai = require('sinon-chai'),
Bot = require('../../lib/botfarmd/bot');
describe('Bot', function () {
var client, test_bot;
beforeEach(function () {
client = {
disconnect: sinon.spy(),
connect: sinon.spy()
},
test_bot = new Bot(client);
... |
// projector: a simple jQuery slideshow plugin
//
// Copyright 2014 P'unk Avenue LLC
//
// Complete docs here: http://github.com/punkave/jquery-projector
(function( $ ) {
$.fn.projector = function(options) {
this.each(function(i, el) {
var $el = $(this);
// grab only the FIRST instance of data-slide... |
define(['app'], function(app) {
return app.controller('CountriesIndexController', ['$scope', '$http', function ($scope, $http) {
$scope.countries = $http.get('/api/v2013/countries', { cache : true }).then(function(result){
return $scope.countries = result.data;
});
}]);
}); |
import Ember from 'ember';
import {
moduleForComponent,
test
} from 'ember-qunit';
const { run } = Ember;
moduleForComponent('md-badge', {
unit: true
// Specify the other units that are required for this test
// needs: ['component:foo', 'helper:bar']
});
test('badge renders', function(assert) {
assert.e... |
var count=0;
Vue.component('box', {
template: '<div class="item">{{ elem.name }}<br>{{ elem.id }}</div>',
props: ['elem']
});
var vm = new Vue({
el: "#main",
data: {
list:[
{name:"John", id:25},
{name:"Joao", id: 7},
{name:"Albert", id: 12},
{name:"Jean", id: 100}],
selected: null,
sortOptio... |
app.controller('resetController', ['$stateParams', 'toastr', '$rootScope', '$scope', '$http', '$window', 'appConstants' , 'authService',
function($stateParams, toastr, $rootScope, $scope, $http, $window, appConstants, authService) {
$scope.reset = function(){
var data = {"email" : $scope.email};
... |
'use strict';
// Configuring the Travel agencies module
angular.module('travel-agencies').run(['Menus',
function(Menus) {
// Add the Travel agencies dropdown item
Menus.addMenuItem('topbar', {
title: 'Travel agencies',
state: 'travel-agencies',
type: 'dropdown'
});
// Add the dropdown list item
Me... |
const {addSetting} = require('../../utils.js');
module.exports = addSetting({
key: 'default_content_visibility_tiers',
value: '[]',
type: 'array',
group: 'members'
});
|
import React from "react";
import "./DeprecationNotice.css";
const DeprecationNotice = () => (
<div className="deprecation">
<b>* Note:</b> The CSS color function here is deprecated. As of late 2020
there is a new spec. This site will be updated someday. See{" "}
<a href="https://github.com/tylergaw/colo... |
module("atom.cookie");
test("atom.cookie", function runTest()
{
var cookie = atom.cookie;
equal(1, 1, "ok");
cookie.set("test1", "value1");
cookie.set("test2", "value2");
notEqual(document.cookie.indexOf("test1=value1"), -1);
notEqual(document.cookie.indexOf("test2=value2"), -1);
equal(cookie.get("test1"), ... |
/**
* @license wysihtml5 v0.4.0pre
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2012 XING AG
* Licensed under the MIT license (MIT)
*
*/
var wysihtml5 = {
version: "0.4.0pre",
// namespaces
commands: {},
dom: {},
quirks: ... |
angular.module('digestHud', [])
.provider('digestHud', ['$provide', function($provide) {
'use strict';
function WatchTiming(key) {
this.key = key;
this.reset();
}
WatchTiming.prototype.reset = function() {
this.watch = 0;
this.handle = 0;
this.overhead = 0;
this.total = 0;
this.cy... |
// Notification base class
export default class Notification {
// constructor() {}
}
|
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
/*
Author: Mike Adair madairATdmsolutions.ca
Richard Greenwood rich@greenwoodmap.com
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
$Id: Proj.js 2956 2007-07-09 12:17:52Z steven $
*/
/**
* Namespace: Proj4js
*
* Proj4js is a JavaScript library to transform point coordinates ... |
import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './stepper.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
|
const gulp = require('gulp');
const sizeReport = require('gulp-sizereport');
const path = require('path');
const config = require('../config');
gulp.task('sizeReport', () =>
gulp
.src(path.join(config.root.dist, 'assets/**/*.+(css|js)'))
.pipe(sizeReport()));
|
/*
*
* WorkoutList actions
*
*/
import {
DEFAULT_ACTION,
ADD_WORKOUT_ACTION,
ADD_LIFT_ACTION,
CHANGE_NEW_LIFT_ACTION,
SELECTED_LIFT_ACTION,
} from './constants';
export function defaultAction() {
return {
type: DEFAULT_ACTION,
};
}
export function addWorkoutAction(workout) {
return {
type... |
var lz = require('../')
var _ = require('lodash')
var wu = require('wu').wu
var assert = require('assert')
var data = require('./_data').a
var even = function (n) {
return n % 2 === 0
}
function _lodash() {
return _.first(_.filter(data, even))
}
function _lz() {
return new lz(data).filter(even).head()
}
fun... |
/**
* Created by cshao on 1/7/16.
*/
"use strict";
var debugServer = require('debug')('csboilerplate:server');
var MongoClient = require('mongodb').MongoClient;
var ObjectID = require('mongodb').ObjectID;
var url = 'mongodb://localhost:27017/csboilerplate';
var utils = require('./utils');
MongoClient.connect(url... |
/**
* Created by Vadym Yatsyuk on 02/03/16
*/
import React from 'react'
export default class Modal extends React.Component {
render() {
return (
<div className="modal-container">
<div className="modal">
<h3>{ this.props.text }</h3>
<button onClick={ this.props.onClick }>Ok</b... |
// COPYRIGHT
var shim = require('./browser-shim');
var extra = require('./extra');
exports.provide = shim.provide;
exports.shimHttp = extra.shimHttp;
exports.
|
function validBraces(braces) {
const len = braces.length;
for (let index = 0; index < (len / 2); index++) {
braces = braces.replace('{}', '').replace('()', '').replace('[]', '');
}
return braces.length === 0;
}
/*******************************/
const isValidStr = (s: string): boolean => {
if (s === null... |
const { Match } = require("./erm")
const { match, make, not, _ } = Match
const assert = value => expect(value).toBeTruthy()
const assertEqual = (left, right) => expect(left).toBe(right)
describe("erm-js", () => {
describe("Match", () => {
it('should have member #match', () => {
expect(match).t... |
(function (app) {
var invitationController = function ($scope, emailService, translationService, $timeout, $location) {
var _sendInvitation = function () {
emailService.sendEmail($scope.friendsEmail, $scope.message).then(function (results) {
$scope.sendInvitationSuccessfully = ... |
import React from 'react';
import Markdown from 'react-markdown';
import { formatLocations } from './Job';
import companyImageProps from '../propTypes/companyImage';
const InfoBox = props => (
<section id="careeropportunity">
<div className="container">
<div className="row">
<div className="col-md-... |
/*
Room list item
*/
import React from 'react';
import { Components, registerComponent, getSetting } from 'meteor/vulcan:core';
import { Link } from 'react-router';
import { FormattedMessage } from 'meteor/vulcan:i18n';
const RoomsItem = ({room, currentUser}) =>
<div className="rooms-item">
<div className="... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _isEvent = _interopRequireDefault(require("./isEvent"));
var getSelectedValues = function getSelectedValues(options) {
var result = [];
if (options) {
... |
#!/usr/bin/env node
var http = require('http');
var childProcess = require('child_process');
var argv = require('minimist')(process.argv.slice(2));
var port = argv.port || 1515;
var concurrency = argv.concurrency || 3;
var timeout = Number(argv.timeout) * 1000 || 150000;
var activeProcessesCount = 0;
var command = a... |
/*jslint browser: true*/
/*jslint plusplus: true */
/*global window, console */
var AlienSand = (function() {
/*
* ============================================================================
* requestAnim
* ============================================================================
* ... |
/*! jQuery UI - v1.10.4 - 2014-03-23
* http://jqueryui.com
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
jQuery(function(t){t.datepicker.regional.gl={closeText:"Pechar",prevText:"<Ant",nextText:"Seg>",currentText:"Hoxe",monthNames:["Xaneiro","Febreiro","Marzo","Abril","Maio",... |
'use strict';
const mongoose = require('mongoose'),
serverUrl = 'mongodb://localhost/',
dbName = 'db'
var schemaproduct = require('../schema/schemaproduct'),
mongo = mongo || {}
//console.log(`${serverUrl}${dbName}`)
mongo.connection = ()=> {
mongoose.connect(serverUrl + dbName, (err)=> err ? 0 : 1)
}
mongo.... |
'use strict';
// Declare app level module which depends on filters, and services
angular.module('HTML5Player', [
'ui.bootstrap',
'ngRoute',
'HTML5Player.filters',
'HTML5Player.services',
'HTML5Player.directives',
'HTML5Player.controllers'
]).
config(['$routeProvider', function($routeProvider) {
$routePr... |
version https://git-lfs.github.com/spec/v1
oid sha256:220bd88fad411995bede9bbab7a352f43c6cf60554874052e24ff9313e7594c8
size 3518
|
import * as React from 'react';
import { styled } from '@material-ui/core/styles';
import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/core/Slider';
const Separator = styled('div')(
({ theme }) => `
height: ${theme.spacing(3)};
`,
);
con... |
import { testId } from "../utils";
export const add = () => {
cy.get(testId("add-menu")).within(() => {
cy.get("button")
.contains("Add")
.click()
.get("button")
.contains("Confirmation question")
.click();
});
};
|
import React from 'react';
import renderer from 'react-test-renderer';
import WelcomeScreen from '../';
jest.mock('electron', () => {
return {
remote: {
require: () => {
return {
dialog: {
}
};
}
}
};
});
describe('WelcomeScreen', () => {
it('renders corr... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
'use strict';
module.exports = {
db: {
type: 'pouchdb',
name: 'reg'
},
protocol: 'http',
hostname: 'localhost',
port: 9090,
storagePath: __dirname + '/../.storage/',
debug: false
};
|
/**
* Module dependencies
*/
var _ = require('lodash')
, path = require('path')
, util = require('util')
, consolidate = require('./consolidate');
/**
* Marshal relevant parts of sails global configuration,
* issue deprecation notices, etc.
*
* @param {Sails} sails
*/
module.exports = function configu... |
var mainFunction = (function()
{
document.addEventListener("deviceready", onDeviceReady, false);
function getLocation()
{
if(navigator.geolocation)
{
var options = { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true };
navigator.geolocation.getCurrentPosition(onSuccess, onError, options);
}
el... |
/* A set of stateless functions implementing aspects of the perceptron learning process. */
define(function () {
'use strict';
function countCorrectlyClassified(elements, classifications){
return elements.reduce(function(count, element, i){
if(element.class === classifications[i]){
... |
const rolesController = require('../../controllers').rolesController;
module.exports = (app) => {
/**
* List all roles in the system..
*/
app.get('/api/roles', rolesController.list);
};
|
(function () {
'use strict';
angular.module('gestionBayres.confirmar', ['ngRoute',['bower_components/ac-angular-stocks/ac-confirmar-pedidos.js',
'bower_components/ac-angular-stocks/ac-pago-proveedores.js']])
.controller('ConfirmarController', ConfirmarController);
ConfirmarController.$... |
adsApp.controller('AdminEditProfileController', ['$scope', 'messaging', 'UserResource', 'TownsResource', '$routeParams', '$location',
function ($scope, messaging, UserResource, TownsResource, $routeParams, $location) {
$scope.emailPattern = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@... |
import React from 'react';
import PropTypes from 'prop-types';
import { Button as UIButton } from 'semantic-ui-react';
const Button = ({label, float, size, color, icon, onClick, ...args}) => {
function onButtonClick(ev) {
ev.preventDefault();
onClick({...args});
};
return (
<UIButton
classNam... |
/**
* The copyright in this software is being made available under the BSD License,
* included below. This software may be subject to other third party and contributor
* rights, including patent rights, and no such rights are granted under this license.
*
* Copyright (c) 2013, Dash Industry Forum.
* All rights re... |
$(document).ready(function () {
$.getUrlParam = function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null)
return unescape(r[2]);
return null;
}
var originParam = $.param;
$._buildParamByKey = function (pKey, o... |
/**
* Created by daiyingheng on 16/9/6.
*/
import alt from '../alt';
class ArticleListActions {
constructor() {
this.generateActions(
'getArticleListSuccess',
'getArticleListFail',
'deleteArticleSuccess',
'deleteArticleFail'
);
}
getArticleList() {
$.ajax({ url: '/api/artic... |
class testController{
Hello = `Welcome to AngularJS ${angular.version.full} Carma - StarterKit`
constructor(){
}
}
export default testController
|
export { ar } from './bs-moment/i18n/ar';
//# sourceMappingURL=locale.js.map |
import { ElasticsearchStorageHandler } from "./../../src/index"
import assert from "assert"
import equal from 'deep-equal'
import util from 'util'
import elasticsearch from 'elasticsearch'
const connectionParams = {
host: "http://127.0.0.1:9200"
};
describe('Storage handler', function() {
this.timeout(20000);
... |
goog.module('test_files.interface.interface');var module = module || {id: 'test_files/interface/interface.js'};/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* Used by implement_import.ts
* @record
*/
function Point() { }
exports.Point = Point;
function Point_tsickle_Closure_... |
/**
* @license Highstock JS v9.3.2 (2021-11-29)
* @module highcharts/indicators/momentum
* @requires highcharts
* @requires highcharts/modules/stock
*
* Indicator series type for Highcharts Stock
*
* (c) 2010-2021 Sebastian Bochan
*
* License: www.highcharts.com/license
*/
'use strict';
import '../../Stock/I... |
let fs = require('fs')
let path = require('path')
let filenames = fs.readdirSync(path.join(__dirname, 'examples'))
let info = filenames.reduce((acc, val) => {
let file = require(path.join(__dirname, 'examples', val))
acc[val.split('.')[0]] = file
return acc
}, {})
fs.writeFileSync(
path.join(__dirname... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
function eventsList() {
this.events = []; //array of events contained in the list
this.tempEvents = [];
this.acc... |
const data = require('./../database/get_data');
module.exports = {
method: 'GET',
path: '/getUsers',
handler: (request, reply) => {
data.getHomeOwnersBasic((dbErr, res) => {
if (dbErr) {
reply('Sorry, no users found in the database');
return;
}
reply(res);
});
},
};
|
setDefaults({
weekMode: 'fixed'
});
function BasicView(element, calendar, viewName) {
var t = this;
// exports
t.renderBasic = renderBasic;
t.setHeight = setHeight;
t.setWidth = setWidth;
t.renderDayOverlay = renderDayOverlay;
t.defaultSelectionEnd = defaultSelectionEnd;
t.renderSelection = renderSelect... |
'use strict';
process.env.NODE_ENV = 'test';
const assert = require('chai').assert;
const exec = require('child_process').exec;
const { suite, test } = require('mocha');
const knex = require('../../knex');
suite('Database Migrations Should Be Run', function () {
before( done => {
knex.migrate.latest()
... |
'use strict'
const fuzzysearch = require('fuzzysearch')
module.exports = new FuzzySearchStrategy()
function FuzzySearchStrategy () {
this.matches = function (string, crit) {
if (string === null) {
return false
}
return fuzzysearch(crit.toLowerCase(), string.toLowerCase())
}
}
|
'use strict';
routing.$inject = ['$urlRouterProvider', '$locationProvider'];
export default function routing($urlRouterProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('/home');
} |
// # Date Helper
// Usage: `{{date format="DD MM, YYYY"}}`, `{{date updated_at format="DD MM, YYYY"}}`
//
// Formats a date using moment-timezone.js. Formats published_at by default but will also take a date as a parameter
const {SafeString, i18n} = require('./proxy');
const moment = require('moment-timezone');
modul... |
"use strict";
if(typeof Placeholdem === 'function') {
if (document.querySelectorAll( '[placeholder]' ).length) {
Placeholdem( document.querySelectorAll( '[placeholder]' ) );
};
}
jQuery(document).ready(function() {
//menu
if (jQuery().superfish) {
jQuery('ul.sf-menu').superfish({
delay: 700,
animati... |
var useful = require('../lib/useful.js')
var config = require('../package')
var path = require('path')
var moment = require('moment')
var url = require('url')
var xlmns = {
'xmlns:content': "http://purl.org/rss/1.0/modules/content/" ,
'xmlns:wfw': "http://wellformedweb.org/CommentAPI/",
'xmlns:dc': "http://purl.... |
'use strict';
/* https://github.com/angular/protractor/blob/master/docs/toc.md */
describe('my app', function() {
it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
browser.get('index.html');
expect(browser.getLocationAbsUrl()).toMatch("/view1");
});
desc... |
import React from 'react'
import PropTypes from 'prop-types'
import { Form, Button, Row, Col, Icon } from 'antd'
import { SearchGroup } from 'components'
const Search = ({
field,
keyword,
addPower,
onSearch,
onAdd,
}) => {
const searchGroupProps = {
field,
keyword,
size: 'large',
select: tr... |
/**
* Created by anantsingh on 7/26/2014.
*/
'use strict';
|
var FieldType = require('../Type');
var moment = require('moment');
var util = require('util');
var utils = require('keystone-utils');
var addPresenceToQuery = require('../../utils/addPresenceToQuery');
var DateType = require('../date/DateType');
/**
* Date FieldType Constructor
* @extends Field
* @api public
*/
f... |
/* eslint-disable */
module.exports = require('./dist/transform');
|
'use strict';
// Asynchronous map (iterate parallel)
// items - <Array>, incoming
// fn - <Function>, to be executed for each value in the array
// current - <any>, current element being processed in the array
// callback - <Function>
// err - <Error> | <null>
// value - <any>
// done - <Func... |
"use strict";
function PipeOutput (msg) {
this.queue = [msg];
};
PipeOutput.prototype.isEmpty = function () {
return this.queue.length === 0;
};
PipeOutput.prototype.push = function (envelope, msg) {
if (envelope.part) {
throw new Error("Attempt to push Part output onto a PipeOutput");
}
this.queue.pu... |
const bubbleTxt = require('../helpers/bubbleTxt.js')
const addEdge = require('../core/addEdge.js')
/**
* add implementation phase edges
*
* @param {object} cy cytoscape instance
* @param {string} srcNode source node
* @param {string} trgNode target node
*/
module.exports = function addComponent (cy, srcNode, trg... |
'use strict';
var Promise = require('bluebird'),
utils = require('../utils/stylesheet'),
_ = require('underscore');
module.exports = function getTemplatedStylesheet(templateString) {
var template = _.template(templateString);
return function generateSpritesheet(layout, options) {
var scaledLa... |
/**
* @author alteredq / http://alteredqualia.com/
*/
zen3d.Clock = function(autoStart) {
this.autoStart = (autoStart !== undefined) ? autoStart : true;
this.startTime = 0;
this.oldTime = 0;
this.elapsedTime = 0;
this.running = false;
}
Object.assign(zen3d.Clock.prototype, {
start: function() {
this.star... |
/*!
* filename: ej.culture.en-GB.min.js
* version : 19.4.0.55
* Copyright Syncfusion Inc. 2001 - 2022. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prose... |
// Adding a helper to trigger events from Prototype
Element.prototype.triggerEvent = function(eventName)
{
if (document.createEvent)
{
var evt = document.createEvent('HTMLEvents');
evt.initEvent(eventName, true, true);
return this.dispatchEvent(evt);
}
if (this.fireEvent) {
return this.fireEv... |
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// javascript 라이브러리 로딩(setting)
// bower 가져온 라이브러리 복사.(bower.json 에서 main파일들 자동복사)
bower: {
dev: {
base: 'bower_components', /* the path to the bower_components directory */
... |
var events = require('events');
var util = require('util');
var Queue = require('./queue');
function _noop() {};
/**
* Creates a new bi-directional message channel between two endpoints utilizing message queues.
* @param bus
* @param name
* @param local
* @param remote
* @constructor
*/
function Channel(bus, n... |
// player.js
//
// Contains all of the constructs for creating and rendering a player from a sprite sheet.
//
// Author: Christian Hughes
module.exports = (function() {
var _sprite = {};
var _spriteSheet = new Image();
var _frameIndex;
var _tickCount;
var _ticksPerFrame;
var _numberOfFrames;
var _width;... |
/* eslint-env node */
module.exports = {
useYarn: true,
scenarios: [
{
name: 'ember-1.13',
bower: {
dependencies: {
'ember': '~1.13.0'
},
resolutions: {
'ember': '~1.13.0'
}
},
npm: {
devDependencies: {
'ember-source':... |
afterEach(function() {
localStorage.clear();
});
describe('Lockr.set', function () {
it('saves a key-value pair in the localStorage', function () {
Lockr.set('test', 123);
expect(localStorage.getItem('test')).toEqual('{"data":123}');
});
it('should save a hash object in the localStorage', function (... |
/**
* Copyright (C) 2014 Shu Ding
*
* 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 to use, copy, modify, merge, publish, ... |
/*
Clone a function
Copied mostly from this stackoverflow thread:
http://stackoverflow.com/questions/1833588/javascript-clone-a-function
*/
module.exports = function(fn) {
var toClone = fn.__isClone
? fn.__clonedFrom
: fn;
var tmp = function() { return toClone.apply(this, arguments); };
tmp... |
/**
@ngdoc function
@name Metadata.ConfigurationParam
@description
A configuration param stores a raw property, which is normally attached to a Konga structure element (i.e. {@link Metadata.Application applications}, {@link Metadata.Entity entities} and {@link Metadata.Field fields}). Configuration is interpreted into... |
'use strict';
var fs = require('fs');
var path = require('path');
var tmp = require('../helpers/tmp');
var chai = require('chai');
var expect = chai.expect;
var conf = require('ember-cli/tests/helpers/conf');
var sh = require('shelljs');
var ng ... |
define(["knockout", "style/border", "style/box"], function (ko, Border, Box) {
function BorderBox(all, side, bottom, left) {
Box.call(this, Border, all, side, bottom, left);
this.$ = ko.computed(function () {
var l = this.left.$(),
r = this.right.$(),
t = this.top.$(),
b =... |
export function getFormattedDate(date = new Date()) {
const year = date.getFullYear();
const day = _getFormattedDatePart(date.getDate());
const month = _getFormattedDatePart(date.getMonth() + 1);
const hours = _getFormattedDatePart(date.getHours());
const minutes = _getFormattedDatePart(date.getMin... |
var GATE_WIDTH = 20;
var GATE_HEIGHT = 30;
var PORT_WIDTH = 15;
var PORT_HEIGHT = 12;
var WIRE_X_OFFSET = PORT_WIDTH / 2;
var WIRE_Y_OFFSET = PORT_HEIGHT / 2;
var BOT_HEIGHT = 40;
var BOT_WIDTH = 40;
var BOT_SPEED = 1;
var BUMPER_WIDTH = 20;
var BUMPER_HEIGHT = 5;
var BUMPER_SPACING = 2;
var THRUST_WIDTH = BUMPER_WIDTH... |
var pagecontrol = require('./pages.js');
module.exports = function (app) {
// Data responses
//Product
app.get('/pages/filter', pagecontrol.filter);
app.get('/pages/:id', pagecontrol.get);
app.get('/pages', pagecontrol.get);
app.post('/pages/:id', pagecontrol.update);
app.post('/pages', pag... |
var global = Function('return this')();
var println = function(msg) { console.log(msg); }
var SailsWrapper = SailsWrapper || require('./sails.js');
var localizable = localizable || require('./localizable.js');
var IntlMessageFormat = IntlMessageFormat || require('intl-messageformat')
if (!global.Intl) {
global.Intl = ... |
/*
* convert srt content to a json representation for each line, s
* ee examples folder in this module, `srtJson.json`
* examle output
[
[
{
"startTime": 4.5,
"endTime": 6.17,
"id": "1",
"text": "QUESTION: ma come hai\n"
},
{
"startTime": 6.17,
"endTime": 9.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.