code stringlengths 2 1.05M |
|---|
version https://git-lfs.github.com/spec/v1
oid sha256:bfe73232377909f40756350fbb789ac5626485431111afcf8863defb2af912a8
size 15196
|
var path = require('path')
var autoprefixer = require('autoprefixer')
module.exports = {
entry: './src/index.js',
output: {
path: __dirname + '/build',
publicPath: '/build/',
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
r... |
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import DigestEmail from './digest_email';
import fs from 'fs';
import juice from 'juice';
import Immutable from 'immutable';
import { jsdom } from 'jsdom';
import { exec } from 'child_process';
function render(callback) {
const salesStats = Im... |
require(["h","../../nested/morenesting/i.js"],function(h,i){
window.__global.g = h + "ggg" + i;
});
module.exports = "g done"; |
import React, { Component } from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import RaisedButton from 'material-ui/RaisedButton';
import authActions from '../../../Auth/AuthActions';
class HomePage extends Component {
/**
* Class constructor.
*/
construc... |
/*jslint browser: true */
/*global SOG */
/**
* @namespace browser
*/
SOG.utils.namespace('SOG.browser.artboard');
/**
* Makes the canvas word. Uses
* {{#crossLink "browser.points"}}points{{/crossLink}}.
*
* @class artboard
* @static
*/
SOG.browser.artboard = (function (points) {
'use strict';
var context,... |
() => {
const [startDate, setStartDate] = useState(new Date());
return (
<DatePicker
selected={startDate}
onChange={(date) => setStartDate(date)}
showYearPicker
dateFormat="yyyy"
yearItemNumber={9}
/>
);
};
|
/**
* DocuSign REST API
* The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
*
* OpenAPI spec version: v2.1
* Contact: devcenter@docusign.com
*
* NOTE: This class is auto generated. Do not edit the class manually and submit a new issue inste... |
/**
* INSPINIA - Responsive Admin Theme
*
* Main directives.js file
* Define directives for used plugin
*
*
* Functions (directives)
* - sideNavigation
* - iboxTools
* - minimalizaSidebar
* - vectorMap
* - sparkline
* - icheck
* - ionRangeSlider
* - dropZone
* - responsiveVideo
* - chatSlimSc... |
import { get } from 'ember-metal/property_get';
import { set } from 'ember-metal/property_set';
import EmberComponent from '../component';
import layout from '../templates/empty';
/**
@module ember
@submodule ember-views
*/
/**
The internal class used to create text inputs when the `{{input}}`
helper is used with... |
/*!
* Snail UI Resizable @VERSION
* Depends:
* snail.ui.core.js
* snail.ui.mouse.js
* snail.ui.widget.js
*/
(function( $, undefined ) {
function num(v) {
return parseInt(v, 10) || 0;
}
function isNumber(value) {
return !isNaN(parseInt(value, 10));
}
$.widget("sn.resizable", $.sn.mouse, {
version: "@VERSION"... |
/*
* Copyright (C) 2013 Vanderbilt University, All rights reserved.
*
* AUTO GENERATED CODE FOR PROJECT CyPhyLight
*/
"use strict";
define(['underscore',
'js/Utils/METAAspectHelper'], function (_underscore,
METAAspectHelper) {
var _metaID = 'CyPhyLight... |
var yAxisIndex;
//add prepend ability
Element.prototype.prependChild = function(child) { this.insertBefore(child, this.firstChild); };
Date.setLocale('en');
//A default configuration
//Should change to more d3esque methods e.g. http://bost.ocks.org/mike/chart/
Gneiss.defaultGneissChartConfig = {
container: "#char... |
/**
* auth.js
*
* Functions for making api calls for authentication
*/
'use strict';
/* jslint browser: true */
var lib = require('../lib'), // I have no idea why this shouldn't be '../lib'
request = require('superagent');
var url = 'http://localhost:3000/';
module.exports = {
register: function regi... |
/*
//Event Listeners
//this is the imperative version of the program
//Create DIV element
var div = document.createElement('DIV');
//Set height of element
div.style.height = "100vh";
//Append Element to DOM
document.body.appendChild(div);
//Add Event listener to Element. Moving the mouse sends an event to the callba... |
// Common Webpack configuration used by webpack.config.development and webpack.config.production
const path = require('path');
const webpack = require('webpack');
const webpackConfig = require('../utils/webpack-config')();
const helpers = require('../utils/helpers');
const CleanWebpackPlugin = require('clean-webpack-pl... |
/*
* Globalize Culture tg-Cyrl-TJ
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in t... |
function addvalueToAutoComplete(elementID,autocompleteName,parmName,checked){
var src=$("#"+autocompleteName).autocomplete('option','source');
src=addvalueToSrc(elementID,parmName,src);
$("#"+autocompleteName).autocomplete('option','source',src);
}
function addvalueToSrc(elementID,parmName,src,checked){
... |
require.config({
urlArgs: 'cb=' + Math.random(),
packages: [{
name: 'streamhub-backbone',
location: 'lib/streamhub-backbone'
},{
name: 'streamhub-slidesjs',
location: '.'
}],
paths: {
jquery: 'lib/jquery/jquery',
underscore: 'lib/underscore/underscore'... |
describe('date parser', function() {
var dateParser;
beforeEach(module('ui.bootstrap.dateparser'));
beforeEach(inject(function (uibDateParser) {
dateParser = uibDateParser;
}));
function expectParse(input, format, date) {
expect(dateParser.parse(input, format)).toEqual(date);
}
describe('with c... |
window.Setting = Backbone.Model.extend({
idAttribute: 'name',
defaults: {
name: "",
value: ""
}
});
window.SettingCollection = Backbone.Collection.extend({
url: "../api/setting",
model: Setting
}); |
// @flow
import { Map } from '../MapView';
const $fragmentRefs: any = null;
const $refType: any = null;
const data = coordinates => ({
id: '1',
coordinates,
$refType,
$fragmentRefs,
});
const oldTown = data({
lat: 50.08566,
lng: 14.4195,
});
const vysehrad = data({
lat: 50.06,
lng: 14.42,
});
const r... |
'use strict';
const _ = require('lodash'),
express = require('express'),
tools = require('../tools');
module.exports = (config, manager) => {
const router = express.Router();
router.get('/', getScaling);
router.patch('/', updateScaling);
return router;
////////////
function getSc... |
'use strict';
module.exports = function(mObjectName){
return '<tns:paramsDescribeMObject>' +
'<objectName>' + mObjectName + '</objectName>' +
'</tns:paramsDescribeMObject>';
};
|
var express = require('express')
var app = express()
app.get('/', function(request, response) {
response.send('Welcome to the homepage!');
});
app.get('/about', function(request, response) {
response.send('Welcome to the about page!');
});
app.get("*", function(request, response) {
response.send("404 error!");
}... |
import { createDevTools} from 'redux-devtools';
import { render } from 'react-dom';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
import SliderMonitor from 'redux-slider-monitor';
import React from 'react'
import { Provider } from 'react-redux';
const DevTo... |
( function () {
var React = require( 'react' ),
Main = require( './main/Main.js' );
var remote = window.require( 'remote' );
window.React = React;
React.render( <Main />, document.getElementById('app') );
} )();
|
module.exports = [
// Singular:
// 1. ich
{ "word": "ich", "translation": "me" },
// 2. du
{ "word": "du", "translation": "you" },
// 3.1 er
{ "word": "Jangles der Mondaffe", "translation": "Jangles the moon monkey" },
// 3.2 sie
{ "word": "ihre Katze Whiskers", "translation": "her cat Whiskers" },... |
/*
* Angular JS Multi Select
* Creates a dropdown-like button with checkboxes.
*
* Project started on: Tue, 14 Jan 2014 - 5:18:02 PM
* Current version: 4.0.0
*
* Released under the MIT License
* --------------------------------------------------------------------------------
* The MIT License (MIT)
*
* Co... |
/*
JavaScript autoComplete v1.0.4
Copyright (c) 2014 Simon Steinberger / Pixabay
GitHub: https://github.com/Pixabay/JavaScript-autoComplete
License: http://www.opensource.org/licenses/mit-license.php
Heavily edited by Adam Chyb 2016
*/
var autoComplete = (function() {
// "use strict";
funct... |
/*globals Handlebars, Metamorph:true */
/*jshint newcap:false*/
/**
@module ember
@submodule ember-handlebars
*/
import EmberHandlebars from "ember-handlebars-compiler"; // EmberHandlebars.SafeString;
var SafeString = EmberHandlebars.SafeString;
import Ember from "ember-metal/core"; // Ember.K
var K = Ember.K;
var... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M17 4h3v16h-3zM5 14h3v6H5zm6-5h3v11h-3z"
}), 'SignalCellularAlt'); |
/* global describe, beforeAll, afterAll, it, expect */
/* eslint prefer-arrow-callback: 0 */
'use strict';
const Promise = require('bluebird');
const oddcast = require('oddcast');
const AWSTransport = require('../lib/oddcast-aws-transport');
const SQS_OPTIONS = {
accessKeyId: '',
secretAccessKey: '',
region: '',
... |
'use strict';
(function() {
// Billings Controller Spec
describe('Billings Controller Tests', function() {
// Initialize global variables
var BillingsController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deleting t... |
'use strict';
import {
forOwn
}
from 'lodash';
class SubscriptionWrapper {
constructor(subscription) {
forOwn(subscription.toObject(), (n, key) => {
this[key] = n;
});
this._subscription = subscription;
}
get(key) {
/* istanbul ignore if */
if (!this._subscription.meta) {
retur... |
'use strict'
module.exports = {
flags: 'command',
desc: 'Attempts to (re)apply its own dir',
setup: sywac => sywac.commandDirectory('../cyclic'),
run: argv => {}
}
|
import socketIO from 'socket.io';
import notificationLogic from'../../models/notification';
import cloudWatchLogs from '../logger/logger_messages';
let IOPort = process.env.IO_PORT || 8082;
exports.initNotificationService = (app) => {
let server = app.listen(IOPort);
let socket = socketIO.listen(server);
... |
/**
* @author chenx
* @date 2015.1.4
* copyright 2015 Qcplay All Rights Reserved.
*
* action 属性基类
*/
var Prop = qc.Prop = function(action, path, propertyId) {
var self = this;
// action instance
self.action = action;
self.path = path;
self.propertyId = propertyId;
// 属性列表
self.pr... |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
// flowlint ambiguous-object-type:error
'use strict';
import type {
NormalizationOperati... |
function zeros(dimensions) {
var array = [];
for (var i = 0; i < dimensions[0]; ++i) {
array.push(dimensions.length == 1 ? 0 : zeros(dimensions.slice(1)));
}
array[dimensions[0]/2][dimensions[1]/2] = 1;
return array;
}
setInterval(function (){
slider= document.getElementById("myRange... |
import axios from 'axios';
export const API_URL = 'https://api.ledgerwallet.com/blockchain/v2/btc';
export function getBitcoin(address: string) {
const url = API_URL + '/addresses/' + address + '/transactions?noToken=true';
return axios.get(url);
}
|
let {expect} = require('chai');
let dom = require('../lib/dom');
let html = `<input type = "text" disabled /><input type = "password" disabled/>`;
let win;
let $;
describe('enable()', function() {
this.timeout(5000);
before(done => {
dom(html).then(vars => {
[win, $] = vars;
done();
}).catch... |
/*
Checks IAM Users, Groups and Roles for managed policy attachments. Wildcard * is supported.
Options: (Object)
* `allow`: (Array[String]) List of allowed ARNs (whitelist, wildcard * can be used)
* `deny`: (Array[String]) List of denied ARNs (blacklist, wildcard * can be used)
*/
"use strict";
var _ = require("loda... |
var isFunction = require("core.is_function");
var ObjectProto_toString = Object.prototype.toString,
FunctionProto_toString = Function.prototype.toString,
reNative = RegExp("^" +
String(ObjectProto_toString)
// escape regexp characters
.replace(/[.*+?^${}()|[\]\/\\]/g, '\\$&')
... |
/**
* @module app.draw.featurePopupDirective
*/
/**
* @fileoverview Provides a feature popup directive.
*/
import appModule from '../module.js';
/**
* @param {string} appFeaturePopupTemplateUrl URL to the directive template.
* @return {angular.Directive} The Directive Definition Object.
* @ngInject
*/
const e... |
'use strict';
const expect = require('chai').expect,
MySQLAdapter = require('../../lib/adapters/mysql');
describe('MySQL adapter', function() {
it('is defined', function() {
expect(MySQLAdapter).to.be.defined;
});
it('can be instantiated', function() {
expect(function() { new MySQLAdapter(); }).not.t... |
/**
* A bunch of global variables for our calculator application
*/
var display = "0";
var pendingOperation = "";
var leftVariable = "";
/**
* Functions triggered by button presses
*/
function buttonPressed(number) {
addToDisplay(number);
}
function buttonSubstractPressed() {
pendingOperation = "substract"... |
/* global module, require */
module.exports = function (grunt) {
'use strict';
/* jshint maxstatements: false */
/* jshint camelcase: false */
// load grunt tasks from package.json
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
bower: {
install: {
op... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import CardList from "../../common/cardList/CardList";
import theme from "../../../theme/theme";
import { getIconName } from "../../../routes/main/clubFeed/helper";
export default class ClubMembersCard extends Component {
static propTypes... |
/**
* Assemble <http://assemble.io>
*
* Copyright (c) 2014, Jon Schlinkert, Brian Woodward, contributors.
* Licensed under the MIT License (MIT).
*/
var collection = require('../lib/collection');
var expect = require('chai').expect;
var grunt = require('grunt');
var path = require('path');
var _ = require('lodash... |
/*
* jquery-nude-templates
* https://github.com/jesseluoto/jquerytempla
*
* Copyright (c) 2014 Jesse Luoto
* Licensed under the MIT license.
*/
(function($) {
// Collection method.
$.fn.nude = function(variables) {
return this.each(function() {
// Do something awesome to each selected element.
... |
import Lexer from './Lexer'
import functions from '../models/functions'
export default class LatexLexer extends Lexer {
constructor(mathString) {
super(mathString)
}
next_token() {
this.prev_col = this.col
this.prev_line = this.line
if (this.pos >= this.text.length) {
return { type: 'EOF'... |
(function (tree) {
tree.mixin = {};
tree.mixin.Call = function (elements, args, index) {
this.selector = new(tree.Selector)(elements);
this.arguments = args;
this.index = index;
};
tree.mixin.Call.prototype = {
eval: function (env) {
var mixins, args, rules = [], match = false;
for (va... |
import { dirname, relative, sep } from 'path';
import {
ensureDotSlash,
filterMatchingPaths,
formatPath,
removeExtension,
} from './fileHelpers';
const renameLiteral = (j, newName) =>
path => {
j(path).replaceWith(() => j.literal(newName));
};
export default function importDeclarationTransform(file, a... |
'use strict';
/**
* @ngdoc service
* @name nashaLeptaApp.FirebaseLink
* @description
* # FirebaseLink
* Constant in the nashaLeptaApp.
*/
angular.module('nashaLeptaApp')
.constant('FirebaseLink', 'https://popping-heat-1147.firebaseio.com');
|
require("consoloid-framework/Consoloid/Widget/JQoteTemplate");
require('consoloid-framework/Consoloid/Widget/Widget');
require('consoloid-console/Consoloid/Ui/Dialog');
require('consoloid-framework/Consoloid/Test/UnitTest');
require('../AbstractDialog');
require('../../Error/UserMessage');
describeUnitTest('Tada.Git.... |
module.exports = function (email) {
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
} |
// All code points in the Miscellaneous Mathematical Symbols-B block as per Unicode v8.0.0:
[
0x2980,
0x2981,
0x2982,
0x2983,
0x2984,
0x2985,
0x2986,
0x2987,
0x2988,
0x2989,
0x298A,
0x298B,
0x298C,
0x298D,
0x298E,
0x298F,
0x2990,
0x2991,
0x2992,
0x2993,
0x2994,
0x2995,
0x2996,
0x2997,
0x2998,
... |
import { assert } from '../../_setup'
describe('LinkedCollection#remove', function () {
it('should remove an item from the collection', function () {
this.UserCollection.createIndex('age')
const user = this.UserCollection.add({ id: 1, age: 30 })
const user2 = this.UserCollection.add({ id: 2, age: 31 })
... |
lucid.html.base.tags.inputEmail = function(factory){
this.factory = factory;
lucid.html.base.tags.input.apply(this, arguments);
this.tag = 'input';
this.allowedAttributes.push('autocomplete');
this.allowedAttributes.push('size');
this.parameters = ['name', 'value', 'required', 'placeholder'];
this.attributes['ty... |
$(document).ready(function(){
$('a').each(function() {
var a = new RegExp('/' + window.location.host + '/');
if(!a.test(this.href)) {
$(this).click(function(event) {
event.preventDefault();
event.stopPropagation();
window.open(this.href, '_blank');
});
}
});... |
steal('can','./init.ejs', function(can, initView){
/**
* @class candd/details
* @alias Details
*/
return can.Control(
/** @Static */
{
defaults : {}
},
/** @Prototype */
{
init : function(){
this.element.html(initView({
message: "Hello World from Details"
}));
}
});
}); |
/**
* This file is part of the RedKite CMS Application and it is distributed
* under the GPL LICENSE Version 2.0. To use this application you must leave
* intact this copyright notice.
*
* Copyright (c) RedKite Labs <info@redkite-labs.com>
*
* For the full copyright and license information, please view the LICEN... |
'use strict';
const BundleTracker = require('webpack-bundle-tracker');
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const Manife... |
/**
* Created by Nguyen on 27/2/2015.
*/
'use strict';
angular.module('myApp.question', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/question', {
templateUrl: 'question/question.html',
controller: 'QuestionCtrl'
});
}])
... |
var host = window.geocloud_host || "";
window.__ = function (string) {
if (typeof gc2i18n !== 'undefined') {
if (gc2i18n.dict[string]) {
return gc2i18n.dict[string];
}
}
return string;
};
if (typeof $ === "undefined") {
document.write("<script src='http://ajax.googleapis.com/... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.0.0
*/
goog.provide('ng.material.components.tooltip');
goog.require('ng.material.core');
/**
* @ngdoc module
* @name material.components.tooltip
*/
angular
.module('material.components.tooltip', [ 'material.core' ])
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getBlocks = getBlocks;
exports.generateCode = generateCode;
exports.compile = compile;
var _template = require('./template');
var _template2 = _interopRequireDefault(_template);
var _style = require('./style');
var _style2 = _... |
function KeyboardInputManager() {
this.events = {};
this.listen();
}
KeyboardInputManager.prototype.on = function (event, callback) {
if (!this.events[event]) {
this.events[event] = [];
}
this.events[event].push(callback);
};
KeyboardInputManager.prototype.emit = function (event, data) {
var callback... |
var mod = require('module').prototype;
var originalCompile = mod._compile;
var esprima = require('esprima');
var enabled = false;
var getContainingAyncblock = function(node, asyncblockVarName){
if(asyncblockVarName == null){
return null;
}
var parent = node;
while(parent !== null){
i... |
var User = require('../models/userModel.js');
var _ = require('lodash');
var signToken = require('../../auth/auth').signToken;
exports.params = function(req, res, next, id) {
User.findById(id)
.select('-password')
.exec()
.then(function(user) {
if (!user) {
next(new Error('No user with that... |
//! pattern /(\s|query)\(.*?\)\.prev\(/
define('query.prev', ['query'], function (query) {
query.fn.prev = function () {
var list = [];
if (this.length) {
var node = this[0].previousElementSibling;
if (node) {
list.push(node);
}
return ... |
require('newrelic');
var Server = require('./server/server');
var configName = `${__dirname}/config/default.json`;
if (process.env.config) configName = require('path').resolve(process.cwd(), process.env.config);
var server = new Server(configName);
server.start();
|
import Server from '../services/Server';
import User from '../models/User';
import React, { Component, View, ProgressBarAndroid, StyleSheet, ToastAndroid, Text, AsyncStorage, PropTypes } from 'react-native';
import { MKButton, MKTextField } from 'react-native-material-kit';
export default class LoginView extends Compo... |
version https://git-lfs.github.com/spec/v1
oid sha256:ac1b43337dbd26721835219d4891bf0fc39b61ae00639be2f6303830e4d660e0
size 1505
|
import angular from 'angular';
import {CostsReportsDetailComponent} from './costs-reports-detail.component';
import {CostsReportsFormComponent} from './costs-reports-form.component';
import {CostsReportsListComponent} from './costs-reports-list.component';
// Main section component names
export const CostsReportsDeta... |
/*!
* multilang-apidocs <https://github.com/nknapp/multilang-apidocs>
*
* Copyright (c) 2015 Nils Knappmeier.
* Released under the MIT license.
*/
var multilangApidocs = require('../../')
var _ = require('lodash')
var path = require('path')
var fs = require('fs')
var outputDir = path.resolve(__dirname, '..', '..... |
function foo() {
a();
function bar() {}
b();
} |
var app = app || {};
(function(){
app.TestButton = React.createClass({displayName: "TestButton",
handleClick: function() {
this.props.submitTestTask(this.props.btnType);
},
render: function() {
return ( React.createElement("button", {onClick: this.handleClick,
... |
const {ipcRenderer} = require('electron')
const {runInThisContext} = require('vm')
// Check whether pattern matches.
// https://developer.chrome.com/extensions/match_patterns
const matchesPattern = function (pattern) {
if (pattern === '<all_urls>') return true
const regexp = new RegExp(`^${pattern.replace(/\*/g, '... |
import App from '../containers/App';
if (typeof System === 'undefined') {
var System = {
import: (m) => {
return new Promise((resolve,reject)=> {
resolve(require(m));
})
}
}
}
function errorLoading(err) {
console.error('Dynamic page loading failed', err);
}
function loadRoute(cb) {
return (module... |
/*
* dashboard script for futurgo vehicle
* extends Vizi.Script
*/
FuturgoDashboardScript = function(param)
{
param = param || {};
Vizi.Script.call(this, param);
this.enabled = (param.enabled !== undefined) ? param.enabled : true;
this.backgroundColor = param.backgroundColor || '#ff0000';
this.textColor ... |
import test from 'ava';
import getUnit from './';
test('Should be a function', t => {
t.is(typeof getUnit, 'function');
t.end();
});
test('Should return normal units', t => {
t.is(getUnit('5m'), 'm');
t.is(getUnit('300cm'), 'cm');
t.is(getUnit('2CM'), 'CM');
t.end();
});
test('Should return the right unit wh... |
var f = function(a, b) {
var g = b.bind(f, 2);
g();
console.log(g);
}
f(1, function(x) {
console.log(x);
}) |
/**
* @author Anthony Pizzimenti
* @desc Checks whether a parameter exists and is of the desired type.
* @param {*} param Paramter to check.
* @param {string} type Desired type.
* @returns {boolean}
* @private
*/
function _paramExist (param, type) {
return typeof param === type && param !== undefined && ... |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2012, Ajax.org B.V.
* 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 of so... |
/**
* @module Application
*/
define([
'prompts/Prompt',
'require.text!templates/prompts/prompt-rdng.html'
], function(Prompt, DesktopTemplate) {
/**
* @class PromptRdng
* @extends {Prompt}
*/
var PromptRdng = Prompt.extend({
/**
* @method initialize
* @param {O... |
/**
* Creates/updates tabs and waits for process finished (returns Promise)
* Saves initial and final urls.
*/
const thenChrome = require('then-chrome');
// map of tabs that are currently loading (waiting "complete" status)
const tabs = new Map();
/**
* Creates new tab
* @param {Object} info
* @returns {Promis... |
$(document).ready(function(){
$.ajax({
url : "simulatedAnnealing.js",
dataType: "text",
success : function (data) {
$("#simulatedAnnealingCode").html(data);
}
});
var annealingCanvas;
var text,line,background;
var w,h;
var two;
var sa;
var x = 0; // Current Index
var f; // The objective function
... |
(function () {
'use strict';
angular.module('myApp.directives')
.directive('d3TimeSeries', [function () {
return {
restrict: 'EA',
scope: {
data: "=",
label: "@",
onClick: "&"
},
... |
import Ember from 'ember';
import HistoryTable from '../../mixins/compostPileHistoryTable'
const {
computed
} = Ember;
export default Ember.Component.extend(HistoryTable, {
columns: computed(function() {
return [{
label: 'Date',
valuePath: 'date',
width: '250px',
}, {
label: 'Tempe... |
// app.controller("YoutubeCtrl", ["$scope", "$http", function($scope, $http) {
// // $scope.tracks = [1, 2, 3];
// $scope.submit = function() {
// $http.post("/youtube/search").success(function(data){
// console.log(data)
// })
// }
// }]);
|
class GameOfLife {
constructor (props) {
this.grid = {}
this.offsets = [-1, 0, 1]
if (props) {
this.minX = props.minX
this.minY = props.minY
this.maxX = props.maxX
this.maxY = props.maxY
}
}
setAlive (coords) {
if (... |
import { defineMessages } from 'react-intl'
/* eslint-disable max-len */
export default defineMessages({
chain: 'Chain',
network: 'Network',
host: 'Host',
section_basic_title: 'Basic',
section_autopilot_title: 'Autopilot',
section_autopilot_tooltip:
'Autopilot automates the process of finding, funding ... |
var request = require('request');
var crypto = require('crypto');
var key = '*********';
var secret = '***********';
var timestamp = Date.now().toString();
console.log(timestamp)
var method = 'GET';
var path = '/v1/me/getpositions?product_code=FX_BTC_JPY';
var text = timestamp + method + path;
console.log(text)
var s... |
'use strict';
angular.module('auth.bearer-token').provider('authBearerTokenStorage', ['authBearerTokenHttpInterceptorProvider',
function authBearerTokenStorageProvider(authBearerTokenHttpInterceptorProvider) {
this.$get = ['$localStorage', '$log', '$rootScope', 'authBearerTokenEvents', 'authBearerTokenCookieName... |
'use strict';
module.exports = {
port: 443,
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/testproject',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/an... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('v... |
'use strict';
var chalk, fs, inArray, sortPrompts, yeoman, yosay;
yeoman = require('yeoman-generator');
chalk = require('chalk');
yosay = require('yosay');
fs = require('fs');
inArray = function(value, array) {
var val, _i, _len;
for (_i = 0, _len = array.length; _i < _len; _i++) {
val = array[_i];
if ... |
/// <reference path="../../../Scripts/endgate.d.ts" />
/// <reference path="SmokePoof.ts" />
// Wrap in module to keep code out of global scope
var AudioHandling;
(function (AudioHandling) {
var SmokePoofManager = (function () {
function SmokePoofManager(_mouse, _scene, _onClickSound) {
var _thi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.