code stringlengths 2 1.05M |
|---|
/**
* Created by RSC on 05.04.2016.
*/
myApp.factory('HomeWatchFactory', function ($http, $q, $rootScope, $log) {
return {
getFhemJsonList: function (name, type) {
var url = '';
if ($rootScope.config.connection.isDebug) {
url = 'json/homewatch/data/' + name + '.j... |
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bowercopy: {
options: {
clean: false
},
glob: {
files: {
'static/libs/js': [
'sprintf/dist/*.js',
'mo... |
import _ from 'lodash'
import Vue from 'vue'
import test from 'ava'
import FlexTableColumn from '../../src/components/FlexTableColumn.vue'
Vue.config.productionTip = false
test('has a mounted hook', (t) => {
t.true(_.isFunction(FlexTableColumn.mounted))
})
test('has data as function', (t) => {
t.true(_.isFunctio... |
export const plus = (f, l) => {
let next = {};
if (typeof l === 'number') {
next.low = l;
next.high = 0;
} else if (typeof l === 'object') {
if (l.high && l.low && l.unsigned) {
next = l;
} else {
throw new Error('Not a uint64 data');
}
}
return {
high: f.high + next.high,
... |
'use strict';
var maxBot = 11;
var mode;
var mw = {};
var mwId;
function getMwId() {
mwId = $.url().segment(4);
}
function isNewMicroworld() {
return ($.url().segment(3) === 'new');
}
function showStatusTableOptions() {
var behaviour_name = $(this).attr('id');
var behaviour_type = $(this).text();
... |
/* =====================================================
file.js
======================================================== */
(function($){ // jQuery no conflict
'use strict';
/* - - - - - - - - - - - - - - - - - - - - - - - - - - -
Section
- - - - - - - - - - - - - - - - - - - - - - - - - - - - */
console.lo... |
var q = require("./quasi");
exports.ps = function (opt) {
opt = opt || {};
var strokeWidth = opt.strokeWidth || "0.015";
if (opt.color) console.error("The ps module does not support the `color` option.");
// PS header
var ret = [
"%%!PS-Adobe-1.0 "
, "%%%%BoundingBox: -1 -1 76... |
print('this is a');
print(__FILE__, __LINE__, __DIR__);
load('./b.js'); // 不能简单的加载同目录的 b,因为 engine.get(FILENAME) 未变 |
import PropTypes from 'prop-types';
export const validAxisType = PropTypes.oneOf([
'category',
'linear',
'logarithmic',
'datetime'
]);
export const validChartType = PropTypes.oneOf([
'area',
'arearange',
'areaspline',
'areasplinerange',
'bar',
'boxplot',
'bubble',
'candlestick',
'column',
... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Line = require('./Line');
Line.Angle = require('./Angle');
Line.BresenhamPoints = require('./BresenhamPoints');
L... |
'use strict';
// User routes use users controller
var users = require('../controllers/users');
module.exports = function(app, passport) {
app.route('/logout')
.get(users.signout);
app.route('/users/me')
.get(users.me);
// Setting up the users api
app.route('/register')
.post(... |
'use strict';
// Disable eval and Buffer.
window.eval = global.eval = global.Buffer = function() {
throw new Error("Can't use eval and Buffer.");
}
const Electron = require('electron')
const IpcRenderer = Electron.ipcRenderer;
var Urlin = null; // element of input text
window.addEventListener('load', ()=> {
... |
var roshamboApp = angular.module('roshamboApp', []),
roshambo=
[
{
name:'Rock',
src:'img/rock.png'
},
{
name:'Paper',
src:'img/paper.png'
},
{
name:'Scissors',
src:'img/scissors.png'
}
],
roshamboMap=roshambo.reduce(function... |
"use strict";
module.exports = {
"wires.json": {
":path/": `./path-`,
},
"path-test.js"() {
module.exports = `parent`;
},
"/child": {
"wires-defaults.json": {
":path/": `./defaults-`,
},
"wires.json": {
":path/": `./child-`,
},... |
/**
* highcharts-ng
* @version v0.0.13 - 2016-10-04
* @link https://github.com/pablojim/highcharts-ng
* @author Barry Fitzgerald <>
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports){
module.export... |
angular.module("uiSwitch",[]).directive("switch",function(){return{restrict:"AE",replace:!0,transclude:!0,template:function(n,e){var s="";return s+="<span",s+=' class="switch'+(e['class']?" "+e['class']:"")+'"',s+=e.ngModel?' ng-click="'+e.disabled+" ? "+e.ngModel+" : "+e.ngModel+"=!"+e.ngModel+(e.ngChange?"; "+e.ngCha... |
var assert = require('assert')
var parse = require('../').parse
function addTest(arg, bulk) {
function fn_json5() {
//console.log('testing: ', arg)
try {
var x = parse(arg)
} catch(err) {
x = 'fail'
}
try {
var z = eval('(function(){"use strict"\nreturn ('+String(arg)+'\n)\n})()... |
/**
* options.js
*
* A test helper to detect which html-snapshots options to use
*
* phantomjs
* If a global phantomjs is defined, decorates html-snapshots options to specify that global
* In some test environments (travis), local phantomjs will not install if a global is found.
*/
const spawn = require("chil... |
/*
* Copyright (c) 2012-2014 André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertSame,
assertDataProperty,
assertBuiltinConstructor,
assertBuiltinPrototype,
} = Assert;
function assertFunctionProperty(obj... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.0.0-rc5-master-76c6299
*/
goog.provide('ng.material.components.backdrop');
goog.require('ng.material.core');
/*
* @ngdoc module
* @name material.components.backdrop
* @description Backdrop
*/
/**
* @ngdoc directive
* @na... |
const errors = require('@tryghost/errors');
const should = require('should');
const sinon = require('sinon');
const fs = require('fs-extra');
const moment = require('moment');
const Promise = require('bluebird');
const path = require('path');
const LocalFileStore = require('../../../../../core/server/adapters/storage/L... |
import UnexpectedHtmlLike from 'unexpected-htmllike';
import React from 'react';
import REACT_EVENT_NAMES from '../reactEventNames';
const PENDING_TEST_EVENT_TYPE = { dummy: 'Dummy object to identify a pending event on the test renderer' };
function getDefaultOptions(flags) {
return {
diffWrappers: flags.exactl... |
// Generated by CoffeeScript 1.7.1
(function() {
var $, CSV, ES, TEXT, TRM, TYPES, alert, badge, create_readstream, debug, echo, help, info, log, njs_fs, rainbow, route, rpr, urge, warn, whisper;
njs_fs = require('fs');
TYPES = require('coffeenode-types');
TEXT = require('coffeenode-text');
TRM = require(... |
"use strict";
var request = require(__dirname + "/request");
var db = require(__dirname + "/db");
/**
* Steam utils
*/
var steamapi = {};
/**
* Request to our api
* @param {string} type
* @param {string[]} ids
* @param {function} callback
*/
steamapi.request = function (type, ids, callback) {
if (!ids.len... |
//THREEJS RELATED VARIABLES
var scene,
camera, fieldOfView, aspectRatio, nearPlane, farPlane,
gobalLight, shadowLight, backLight,
renderer,
container,
controls;
//SCREEN & MOUSE VARIABLES
var HEIGHT, WIDTH, windowHalfX, windowHalfY,
mousePos = { x: 0, y: 0 },
oldMousePos = {x:0, y:0},
... |
var class_redis_cache_test =
[
[ "__construct", "class_redis_cache_test.html#ae22c12eb0d136f444b6c9c0735f70382", null ],
[ "testArray", "class_redis_cache_test.html#a76100cea2dba0b01bfffb70a193dfb9f", null ],
[ "testGet", "class_redis_cache_test.html#afb35249bbbb21b7eac20b12d6f5a8739", null ],
[ "testHa... |
import { Widget, startAppLoop, Url, History } from 'cx/ui';
import { Timing, Debug } from 'cx/util';
import { Store } from 'cx/data';
import Routes from './routes';
import 'whatwg-fetch';
import "./index.scss";
let stop;
const store = new Store();
if(module.hot) {
// accept itself
module.hot.accept();
// re... |
import React from 'react';
import { default as TriggersContainer } from './TriggersContainer';
import { mount } from 'enzyme';
const emptyDispatch = () => null;
const emptyActions = { setGeoJSON: () => null };
describe('(Container) TriggersContainer', () => {
it('Renders a TriggersContainer', () => {
const _com... |
window.NavigationStore = function() {
function isSet(menu) {
return localStorage["navigation_" + menu] !== undefined;
}
function fetch(menu) {
return localStorage["navigation_" + menu] == "true" || false;
}
function set(menu, value) {
localStorage["navigation_" + menu] = value;
}
return {
... |
import { describe, it, beforeEach, afterEach } from 'mocha';
import { expect } from 'chai';
import startApp from 'my-app/tests/helpers/start-app';
import { run } from '@ember/runloop';
describe('Acceptance | foo', function () {
let application;
beforeEach(function () {
application = startApp();
});
after... |
let mongoose = require('mongoose')
let userSchema = mongoose.Schema({
// userModel properties here...
local: {
email: {
type: String,
required: true
},
password: {
type: String,
required: true
}
},
facebook: {
id: ... |
Photos = new orion.collection('photos', {
singularName: 'photo',
pluralName: 'photos',
link: {
title: 'Photos'
},
tabular: {
columns: [
{data: 'title', title: 'Title'},
{data: 'state', title: 'State'},
//ToDo: Thumbnail
orion.attributeColumn('markdown', 'body', 'Content'),
... |
import browserSync from 'browser-sync';
import config from '../../config';
import middlewaresStack from '../middlewares_stack';
import apiMiddleware from '../middlewares/api';
import mockMiddleware from '../middlewares/mock';
export default () => {
const port = process.env.PORT;
const middlewares = apiMiddleware()... |
'use strict';
module.exports.name = 'cssnano/postcss-minify-font-values';
module.exports.tests = [{
message: 'should unquote font names',
fixture: 'h1{font-family:"Helvetica Neue"}',
expected: 'h1{font-family:Helvetica Neue}'
}, {
message: 'should unquote and join identifiers with a slash, if numeric',... |
function Tw2VectorSequencer()
{
this.name = '';
this.start = 0;
this.value = vec3.create();
this.operator = 0;
this.functions = [];
this._tempValue = vec3.create();
}
Tw2VectorSequencer.prototype.GetLength = function () {
var length = 0;
for (var i = 0; i < this.functions.length; ++i)... |
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var header = require('gulp-header');
var footer = require('gulp-footer');
// Build Task
gulp.task('default', function() {
gulp.src([ "src/... |
var myTimeout = 12000;
Storage.prototype.setObject = function(key, value) {
this.setItem(key, JSON.stringify(value));
};
Storage.prototype.getObject = function(key) {
var value = this.getItem(key);
return value && JSON.parse(value);
};
// Обеспечиваем поддержу XMLHttpRequest`а в IE
var xmlVersions = new Array(
... |
/*! YAD - v1.0.0 - 82bbc70 - 2014-12-02
* Yahoo Personalised Content Widget
* Copyright (c) 2014 ; Licensed */
(function(){var f=window.document,e={Error:function(a){this.message=a},Bootstrap:function(a,b,c){this.widgetInitialisationStartedAt=this.timeSinceNavigationStart();this.snippetLoadedAt=c?this.timeSinceNav... |
/**
* grunt-webfont: fontforge engine
*
* @requires fontforge, ttfautohint 1.00+ (optional), eotlitetool.py
* @author Artem Sapegin (http://sapegin.me)
*/
module.exports = function(o, allDone) {
'use strict';
var fs = require('fs');
var path = require('path');
var temp = require('temp');
var async = require... |
'use strict';
var fs = require('fs'),
path = require('path');
// path.basename('/foo/bar/baz/asdf/quux.html', '.html') = quux
// path.dirname('/foo/bar/baz/asdf/quux.html') = /foo/bar/baz/asdf/
// path.parse('/home/user/dir/file.txt')
// returns
// {
// root : "/",
// dir : "/ho... |
var NULL = null;
function NOP() {}
function NOT_IMPLEMENTED() { throw new Error("not implemented."); }
function int(x) {
return x|0;
}
function pointer(src, offset, length) {
offset = src.byteOffset + offset * src.BYTES_PER_ELEMENT;
if (typeof length === "number") {
return new src.constructor(src.buffer, o... |
var _ = require('../../util')
var handlers = {
text: require('./text'),
radio: require('./radio'),
select: require('./select'),
checkbox: require('./checkbox')
}
module.exports = {
priority: 800,
twoWay: true,
handlers: handlers,
/**
* Possible elements:
* <select>
* <textarea>
* <... |
var classes = [
{
"name": "Hal\\Report\\Html\\Reporter",
"interface": false,
"methods": [
{
"name": "__construct",
"role": null,
"public": true,
"private": false,
"_type": "Hal\\Metric\\FunctionMetric... |
(function() {
'use strict';
var jhiAlert = {
template: '<div class="alerts" ng-cloak="">' +
'<div ng-repeat="alert in $ctrl.alerts" ng-class="[alert.position, {\'toast\': alert.toast}]">' +
'<uib-alert ng-cloak="" type="{{alert.type}}" close="alert.cl... |
const test = require('tape')
const Queue = require('./Queue')
test('peek on empty queue', assert => {
const queue = new Queue()
assert.strictEqual(queue.peek(), null)
assert.end()
})
test('enqueue items to the queue', assert => {
const queue = new Queue()
queue.enqueue('foo')
queue.enqueue('bar')
assert... |
var EVENTS, ProxyClient, _r, bindSocketSubscriber, getSystemAddresses, io, mazehallGridRegister;
_r = require('kefir');
io = require('socket.io-client');
EVENTS = require('./events');
ProxyClient = function(server, hosts) {
server.on('listening', function() {
return bindSocketSubscriber(server, hosts);
});
... |
var Router = require('restify-router').Router;
var db = require("../../../../db");
var ProductionOrderManager = require("dl-module").managers.sales.ProductionOrderManager;
var resultFormatter = require("../../../../result-formatter");
var passport = require('../../../../passports/jwt-passport');
const apiVersion = '1.0... |
var Icon = require('../icon');
var element = require('magic-virtual-element');
var clone = require('../clone');
exports.render = function render(component) {
var props = clone(component.props);
delete props.children;
return element(
Icon,
props,
element('path', { d: 'M3 21h2v-2H3v2zM5 7H3v2h2V7zM3 17... |
define(['./alasqlportfoliodividenddata', './monthstaticvalues', './bankdatadividend', './dateperiod'], function(alasqlportfoliodividenddata, monthstaticvalues, bankdatadividend, dateperiod) {
var gridData = [];
var gridId;
var months = monthstaticvalues.getMonthWithLettersValues();
var currentMonth = n... |
/* eslint-disable global-require */
// polyfills and vendors
if (!window._babelPolyfill) {
require('babel-polyfill')
}
|
const iNaturalistAPI = require( "../inaturalist_api" );
const ControlledTerm = require( "../models/controlled_term" );
const Observation = require( "../models/observation" );
const Project = require( "../models/project" );
const Taxon = require( "../models/taxon" );
const User = require( "../models/user" );
const obse... |
/**
* @author Adam Meadows <adam.meadows@gmail.com>
* @copyright 2015 Adam Meadows. All rights reserved.
*/
'use strict';
/* eslint-disable max-nested-callbacks */
let $ = require('jquery');
let main = require('aiw-ui');
describe('main', () => {
let $container;
beforeEach(() => {
$container = $(... |
import {Sample} from './sample'
import {context} from './init_audio'
let instanceIndex = 0
export class SampleOscillator extends Sample{
constructor(sampleData, event){
super(sampleData, event)
this.id = `${this.constructor.name}_${instanceIndex++}_${new Date().getTime()}`
if(this.sampleData === -1){
... |
'use strict';
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(actua... |
import { Client } from 'discord.js';
import { isFunction, isRegExp, isString } from 'lodash/lang';
import CommandRegistry from '../command/CommandRegistry';
import Dispatcher from './dispatcher/Dispatcher';
import ServiceContainer from './services/ServiceContainer';
/**
* @external {ClientOptions} https://discord.js.... |
// This code is largely borrowed from: github.com/louischatriot/nedb-to-mongodb
// This code moves your data from NeDB to MongoDB
// You will first need to create the MongoDB connection in your /routes/config.json file
// You then need to ensure your MongoDB Database has been created.
// ** IMPORTANT **
// There are ... |
var React = require('react'),
cx = require('classnames'),
constants = require('./constants');
var Preloader = React.createClass({
propTypes: {
size: React.PropTypes.oneOf(constants.SCALES),
active: React.PropTypes.bool,
colors: React.PropTypes.array
},
getDefaultProps() {
return {
... |
let userDao = require('../dao/userDao'),
articleDao = require('../dao/articleDao'),
commentDao = require('../dao/commentDao'),
starDao = require('../dao/starDao'),
messageDao = require('../dao/messageDao'),
voteDao = require('../dao/voteDao'),
settings = require('../config/settings'),
tools ... |
/* @flow */
import * as React from 'react';
import cn from 'classnames';
import { StyleClasses } from '../theme/styleClasses';
type Props = {
// An optional inline-style to apply to the overlay.
style: ?Object,
// An optional css className to apply.
className: ?string,
// Boolean if this divider should be in... |
var windowHeight = $(window).height();
var menuBarHeight = $('#codeplayer-menubar').height();
$('.codeplayer-code-container').css('height', (windowHeight - menuBarHeight) + 'px');
$('.codeplayer-toogle').click(function() {
$(this).toggleClass('codeplayer-selected');
var codeContainerDiv = '#codeplayer-' + $(thi... |
var randomBytes = require('mz/crypto').randomBytes;
module.exports = function* trace(next) {
this.id = yield randomBytes(24);
var ctx = this;
var req = this.req;
var res = this.res;
// request start
this.trace('time.start');
// request end
req.once('end', this.trace.bind(this, 'time.... |
(function() {
'use strict';
angular.module('cd.app.registerForm')
.controller('RegisterFormController', RegisterFormController);
/* @ngInject */
function RegisterFormController ($location, StepsService) {
var $ctrl = this;
$ctrl.selectedPlatform = JSON.parse(localStorage.g... |
'use strict';
function fixImports() {
let editor = atom.workspace.getActiveTextEditor()
if (editor) {
// fixImports(editor)
// editor.selectLinesContainingCursors()
}
}
module.exports = {
fixImports,
};
|
var $iterators = require('./es6.array.iterator')
, redefine = require('./_redefine')
, global = require('./_global')
, hide = require('./_hide')
, Iterators = require('./_iterators')
, wks = require('./_wks')
, CORRECT_SYMBOL = require('./_correct-symbol')
, ITE... |
/**
* Copyright (c) 2014 Famous Industries, Inc.
*
* 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, m... |
import React, { Component, PropTypes } from 'react';
import Select from 'react-select';
import { omit } from 'lodash';
import classNames from 'classnames';
import styles from './styles.scss';
import chevronIcon from '../../../assets/images/icons/chevron-down.svg';
export const THEMES = { OLD: 'old', INTERNAL: 'interna... |
Notify = function(text, callback, close_callback, style) {
var time = '10000';
var $container = $('#notifications');
var icon = '<i class="fa fa-info-circle "></i>';
if (typeof style == 'undefined' ) style = 'warning'
var html = $('<div class="alert alert-' + style + ' hide">' + icon + " " + text + '</div>... |
import React from 'react';
import Link from 'gatsby-link';
import { BlogPostContent, BlogPostContainer, TagList } from '../utils/styles';
import { arrayReducer } from '../utils/helpers.js';
export default function TagsPage({
data
}) {
const { edges: posts } = data.allMarkdownRemark;
const categoryArray = arrayR... |
/* -*- javascript -*- */
"use strict";
import {StageComponent} from 'aurelia-testing';
import {bootstrap} from 'aurelia-bootstrapper';
import {LogManager} from 'aurelia-framework';
import {ConsoleAppender} from 'aurelia-logging-console';
import {customMatchers} from '../helpers';
describe('ui-icon', () => {
let com... |
//
// This software is released under the 3-clause BSD license.
//
// Copyright (c) 2015, Xin Chen <txchen@gmail.com>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions o... |
import uglify from 'rollup-plugin-uglify'
import buble from 'rollup-plugin-buble'
export default {
entry: 'js/index.js',
dest: 'public/bundle.js',
format: 'iife',
plugins: [buble(), uglify()],
}
|
function filterSinceSync(d) {
var isValid = typeof d === 'number' ||
d instanceof Number ||
d instanceof Date;
if (!isValid) {
throw new Error('expected since option to be a date or a number');
}
return file.stat && file.stat.mtime > d;
};
module.exports = filterSinceSync; |
var expect = require('chai').expect;
var sinon = require('sinon');
var ColumnShifter = require('component/grid/projection/column-shifter');
var Base = require('component/grid/projection/base');
var Response = require('component/grid/model/response');
describe('projection ColumnShifter', function () {
it('update shou... |
'use strict';
let TimeseriesShowController = function($scope, $controller, $timeout,
NpolarApiSecurity, NpolarTranslate,
npdcAppConfig,
Timeseries, TimeseriesModel, TimeseriesCitation, google, Sparkline) {
'ngInject';
let ctrl = this;
ctrl.authors = (t) => {
return t.authors.map(a => {
return ... |
var should = require('should');
var npg = require('../core/npg').npg;
var config = require('./_test_config_npg');
var request = ({body: {phrase: "111"}});
describe('NPG w/ config', function () {
it('should using fixed key', function () {
config.useFixedKey.should.be.ok;
});
it('should return correct answer',... |
/**
* LICENSE : MIT
*/
"use strict";
(function (mod) {
if (typeof exports == "object" && typeof module == "object") {
mod(require("codemirror"));
}
else if (typeof define == "function" && define.amd) {
define(["codemirror"], mod);
}
else {
mod(CodeMirror);
}
})(function... |
/**
* @name Evemit
* @description Minimal and fast JavaScript event emitter for Node.js and front-end.
* @author Nicolas Tallefourtane <dev@nicolab.net>
* @link https://github.com/Nicolab/evemit
* @license MIT https://github.com/Nicolab/evemit/blob/master/LICENSE
*/
;(function() {
'use strict';
/**
* Eve... |
(function() {
//###########################################################################################################
var CND, Multimix, alert, badge, debug, dec, decG, echo, help, hex, hexG, info, isa, log, name, nameO, nameOG, rpr, type_of, types, urge, validate, warn, whisper;
CND = require('cnd');
r... |
/**
* Checks if a given DOM property of an element has the expected value. For all the available DOM element properties, consult the [Element doc at MDN](https://developer.mozilla.org/en-US/docs/Web/API/element).
*
* @example
* this.demoTest = function (browser) {
* browser.expect.element('body').to.have.propert... |
const rangeParser = require(`parse-numeric-range`)
module.exports = language => {
if (!language) {
return ``
}
if (language.split(`{`).length > 1) {
let [splitLanguage, ...options] = language.split(`{`)
let highlightLines = [],
numberLines = false,
numberLinesStartAt
// Options can be... |
import ruleError from './ruleError'
// Tags that have no associated components but are allowed even so
const componentLessTags = [
'mj-all',
'mj-class',
'mj-selector',
'mj-html-attribute',
]
export default function validateTag(element, { components }) {
const { tagName } = element
if (componentLessTags.i... |
class dximagetransform_microsoft_crblinds_1 {
constructor() {
// short bands () {get} {set}
this.bands = undefined;
// int Capabilities () {get}
this.Capabilities = undefined;
// string Direction () {get} {set}
this.Direction = undefined;
// float Duration ... |
'use strict';
var webpack = require('webpack');
var cfg = {
entry: './src/main.jsx',
output: {
path: __dirname + '/dist',
filename: 'main.js',
},
externals: {
yaspm: 'commonjs yaspm'
},
target: process.env.NODE_ENV === 'web' ? 'web' : 'node-webkit',
module: {
loaders: [
{
t... |
/**
* Created by ff on 2016/10/25.
*/
require('./style.css');
var vm = avalon.define({
$id:'map'
})
module.exports = vm; |
'use strict';
const _ = require('lodash');
const path = require('path');
/**
* Special settings for use with serverless-offline.
*/
module.exports = {
prepareOfflineInvoke() {
// Use service packaging for compile
_.set(this.serverless, 'service.package.individually', false);
return this.serverless.p... |
let widget = document.getElementsByClassName('markdownx-widget')[0];
let element = document.getElementsByClassName('markdownx');
let element_divs = element[0].getElementsByTagName('div');
let div_editor = element_divs[0];
let div_preview = element_divs[1];
let navbar_bar = document.getElementsByClassName('markdownx-to... |
module.exports = {};
var app_data = {};
function initCharts()
{
$(document).ready(function() {
$.get(app_data.config.analytics_data_route, function(analytics_data) {
data = analytics_data.data;
max_val = analytics_data.highest_value;
var parseDate = d3.time.format('%Y%m%d').parse;
data.... |
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
jasmine.getEnv().clearReporters(); // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter({ // add jasmine-spec-reporter
spec: {
displayPending: true,
},
summary: {
displayDuration: true,
}
})); |
const webpack = require('atool-build/lib/webpack');
module.exports = function (webpackConfig, env) {
webpackConfig.babel.plugins.push('transform-runtime');
webpackConfig.babel.plugins.push(['import', {
libraryName: 'antd',
style: 'css' // if true, use less
}]);
// Support hmr
if (env === 'developmen... |
'use strict';
describe('Controllers Tests ', function () {
beforeEach(module('solrpressApp'));
describe('SessionsController', function () {
var $scope, SessionsService;
beforeEach(inject(function ($rootScope, $controller, Sessions) {
$scope = $rootScope.$new();
Sessi... |
Template.registerHelper("itemTypes", function() {
return [
{label: i18n.t('choose'), value: ''},
{label: i18n.t('offer'), value: 'offer', icon: 'icon gift'},
{label: i18n.t('need'), value: 'need', icon: 'icon fire'},
{label: i18n.t('wish'), value: 'wish', icon: 'icon wizard'},
... |
// --------------------------------------------------------------------------------------------------------------------
//
// cloudfront-config.js - config for AWS CloudFront
//
// Copyright (c) 2011 AppsAttic Ltd - http://www.appsattic.com/
// Written by Andrew Chilton <chilts@appsattic.com>
//
// License: http://open... |
var GlobezGame = GlobezGame || {};
GlobezGame.Boot = function() {};
GlobezGame.Boot.prototype = {
preload: function() {
console.log("%cStarting Fish Vs Mines", "color:white; background:red");
this.load.image("loading", "assets/sprites/loading.png");
this.load.image("logo", "assets/sprites/logo.png");
},... |
$("nav span").mouseenter(function(){$("nav").removeClass("closed")}),$("nav").mouseleave(function(){$("nav").addClass("closed")}),$("nav a").click(function(){var o=$(this).parent().index();console.log(o),$("html,body").animate({scrollTop:$(".section-container > section").eq(o).offset().top},500)}),$(window).scroll(func... |
'use strict';
describe('nothing', () => {
it('should do nothing', () => {
//
});
});
|
import { setData } from '@progress/kendo-angular-intl';
setData({
name: "pt-CH",
identity: {
language: "pt",
territory: "CH"
},
territory: "CH",
numbers: {
symbols: {
decimal: ",",
group: " ",
list: ";",
percentSign: "%",
... |
define(function(require) {
var Checker = require("checkers/controller/Checker"),
GameBoard = require("checkers/controller/GameBoard"),
GameSpace = require("checkers/controller/GameSpace");
var instance = null;
function GameBoardUtil() {
}
var getInstance = function... |
import { LOCAL_STORAGE_REMOVE_ITEM, LOCAL_STORAGE_SET_ITEM } from './actionTypes'
import createMiddleware from './middleware'
describe('middleware', () => {
let removeItem
let setItem
let middleware
let next
let store
beforeEach(() => {
removeItem = jest.fn()
setItem = jest.fn()
middleware = c... |
jQuery.each(param_obj, function (index, value) {
if (!isNaN(value)) {
param_obj[index] = parseInt(value);
}
});
function Portfolio_Gallery_Full_Height(id) {
var _this = this;
_this.container = jQuery('#' + id + '.view-full-height');
_this.hasLoading = _this.container.data("show-loa... |
import s from './Callouts.css';
import React, { PropTypes } from 'react';
import numbro from 'numbro';
function diversityAtParityOrGreater(conf) {
return conf.diversityPercentage >= 50;
}
function confFromCurrentYear(conf) {
return conf.year == (new Date()).getFullYear();
}
function diversityAccumulator(accumula... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.