code stringlengths 2 1.05M |
|---|
'use strict';
var fs = require('fs'),
path = require('path'),
events = require('events'),
_ = require('lodash'),
mkdirp = require('mkdirp'),
readTorrent = require('read-torrent'),
engine = require('./engine'),
homePath = process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'],
configPath =... |
'use strict';
const { InvalidSchemaError } = require('./errors')
/**
* Schema types.
* @type {Object}
*/
const types = {
ARRAY: 'array',
BOOLEAN: 'boolean',
NUMBER: 'number',
STRING: 'string'
}
/**
* Converter functions.
* @type {Object}
*/
const converters = {
[types.ARRAY] (val) {
return val.sp... |
const bunyan = require('bunyan');
const { partial } = require('lodash');
const {
dynamoOptions,
serviceName,
logLevel,
ProvisionedThroughput
} = require('./data.json');
const dynamo = require('./dynamo');
const logger = bunyan.createLogger({ name: `${serviceName}-awssdk`, level: logLevel });
const instance = dynam... |
/**
* jQuery Calx 2.2.8
*
* author : Xsanisty Developer Team <developers@xsanisty.com>
* Ikhsan Agustian <ikhsan017@gmail.com>
* website : http://www.xsanisty.com/project/calx2
* repository : https://github.com/xsanisty/jquery-calx
* license : MIT
*/
if(typeof(Zepto) == 'un... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper ../request ../core/maybe ../core/acc... |
$(function() {
var FADE_TIME = 150; // ms
var TYPING_TIMER_LENGTH = 400; // ms
var COLORS = [
'#e21400', '#91580f', '#f8a700', '#f78b00',
'#58dc00', '#287b00', '#a8f07a', '#4ae8c4',
'#3b88eb', '#3824aa', '#a700ff', '#d300e7'
];
// Initialize varibles
var $window = $(window);
var $usernameInpu... |
define(function (require, exports, module) {
'use strict';
var app = require('app');
var msgBus = require('msgbus');
var Backbone = require('backbone');
module.exports = Backbone.Layout.extend({
className: 'consent-form-message',
template: 'consent-form-message',
events: {... |
import test from 'tape';
import within from '.';
import { point } from '@turf/helpers';
import { polygon } from '@turf/helpers';
import { featureCollection } from '@turf/helpers';
test('within', function (t) {
t.plan(4);
// test with a single point
var poly = polygon([[[0, 0], [0, 100], [100, 100], [100, ... |
class StorybookController {
constructor($state, $scope, $mdSidenav, storeService) {
this.$state = $state;
this.$scope = $scope;
this.$mdSidenav = $mdSidenav;
const page = $state.params.state;
this.page = this.activePage = page ? page : 'preview';
this.components = storeService.getAllComponen... |
var alexa = require('alexa-app');
// Allow this module to be reloaded by hotswap when changed
module.change_code = 1;
// Define an alexa-app
var app = new alexa.app('guessinggame');
app.launch(function(req,res) {
var number = Math.floor(Math.random()*99)+1;
res.session('number',number);
res.session('gu... |
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
{
xhttp=new XMLHttpRequest();
}
xhttp.onreadystatechange=function(){
if (xhttp.readyState==4 && xhttp.status==200)
{
title=xhttp.responseXML.getElementsByTagName('Chart1')[0].childNodes;
}
}
xhtt... |
var assert = require("assert"),
paperclip = require("../.."),
template = paperclip.template,
stringifyView = require("../utils/stringifyView");
/*
var tpl = paperclip.template("abba")
*/
describe(__filename + "#", function () {
it("can embed a repeat component with a vanilla array", fun... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.0.5-master-437a308
*/
goog.provide('ng.material.components.list');
goog.require('ng.material.core');
/**
* @ngdoc module
* @name material.components.list
* @description
* List module
*/
angular.module('material.components.... |
import React, {Component, PropTypes} from 'react';
import {connect} from 'react-redux';
import DocumentMeta from 'react-document-meta';
import * as authActions from 'redux/modules/auth';
import {isLoaded as isAuthLoaded, load as loadAuth} from 'redux/modules/auth';
@connect(
state => ({user: state.auth.user}),
aut... |
const stats = {
hash: false,
timings: false,
builtAt: false,
assets: false,
chunks: true,
chunkRelations: true,
chunkOrigins: true,
entrypoints: true,
modules: false
};
/** @type {import("../../../").Configuration[]} */
module.exports = [
{
name: "production",
mode: "production",
entry: {
main: "./"
... |
'use strict';
angular.module('angular-3d-viewer', []); |
var scanner = require("./scanner");
var fs = require("fs");
function scanner_test() {
var time = new Date;
var str = fs.readFileSync('coms/typescript/index.js').toString();
var res = scanner(str);
res.forEach(a => a.data = str.slice(a.start, a.end))
console.log(res, new Date - time);
}
scanner_test(... |
function Tower(options) {
this.options = options || {};
this.x = options.x;
this.y = options.y;
this.height = options.height;
this.width = options.width || 80;
this.image = options.image || 'images/building1_crop.png';
}
Tower.prototype.draw = function(context) {
var img = new Image();
img.src = this.... |
version https://git-lfs.github.com/spec/v1
oid sha256:3480218c9a988f0619ba810221e6f53964cda8e9fc4bc54ff452e7aa296e857d
size 57951
|
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define(
[
'./utils'
],
function(utils) {
'use strict';
var actionSymbols = {
on: '<-',
trig... |
StartTest(function (t) {
t.plan(13)
//==================================================================================================================================================================================
t.diag("Using Class as Role")
Role('PseudoRole1', {
have : {
... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
/**
* Created by Papa on 10/16/2016.
*/
var Re... |
if (foo !== bar) {
// 1
}
|
'use strict';
module.exports = function(app) {
app.get('/', function* () {
this.body = {
cookieValue: this.cookies.get('foo', { signed: false }) || undefined,
cookiesValue: this.cookies.get('foo', { signed: false }) || undefined,
};
});
};
|
// JavaScript source code
function rendomArg(arg) {
var alfabetical = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';
var res = '';
var rendomNumber = function (m) {
return Math.floor((Math.random() * m));
}
var doit = true;
var i = 0;
while (doit) {
res += ... |
import styles from './DropdownLayout.scss';
import React from 'react';
import classNames from 'classnames';
import WixComponent from '../WixComponent';
import isEqual from 'lodash.isequal';
import isobject from 'lodash.isobject';
import trim from 'lodash.trim';
import isstring from 'lodash.isstring';
import has from 'l... |
/**
* Logging helper.
*
* MIT License
* Copyright (c) 2015 notrubp@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 th... |
import React, { Component } from 'react';
import Synthesizer from './components/synthesizer/Synthesizer';
require('./styles/base.scss');
class App extends Component {
render() {
return (
<section>
<Synthesizer />
</section>
);
}
}
export default App;
|
// var Groups, Questions;
Groups = new Meteor.Collection("groups");
Questions = new Meteor.Collection("questions");
Players = new Meteor.Collection("players");
Messages = new Meteor.Collection("messages");
TestCol = new Meteor.Collection("testcol");
if (Meteor.isClient) {
Template.groupList.helpers({
groups: f... |
// Generated by CoffeeScript 1.9.3
/**
* @package CleverStyle Music
* @category Web Components
* @author Nazar Mokrynskyi <nazar@mokrynskyi.com>
* @copyright Copyright (c) 2015, Nazar Mokrynskyi
* @license MIT License, see license.txt
*/
(function() {
Polymer({
'is': 'cs-controls'
});
}).call(t... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define(["require","exports"],function(b,a){Object.defineProperty(a,"__esModule",{value:!0});a.defaultIconElevationOffset=1;a.SUSPEND_RESUME_EXTENT_OPTIMISM=1.2}); |
function taggleService() {
'use strict';
var service = {
build: function (element, onTagAddCallback, onTagRemoveCallback) {
if (onTagAddCallback === null) {
onTagAddCallback = function () {};
}
return new Taggle(element, {
onTagAdd: ... |
$(document).ready(function()
{
var settings = {
url: "upload.php",
method: "POST",
allowedTypes:"jpg,png,gif,doc,pdf,zip",
fileName: "myfile",
multiple: true,
onSuccess:function(files,data,xhr)
{
alert(data);
$("#status")... |
//~ name a584
alert(a584);
//~ component a585.js
|
/**
* Created by SASi on 11-May-16.
*/
app.controller('newProjectsPageController', ['$scope', '$rootScope', '$routeParams', 'Projects',
function ($scope, $rootScope, $routeParams, Projects) {
$scope.project = "";
$scope.title = "";
$scope.description = "";
$scope.isNew = true;
... |
const {Patch} = require('superstring')
const {Emitter} = require('event-kit')
const Point = require('./point')
const Range = require('./range')
const DisplayMarkerLayer = require('./display-marker-layer')
const {traverse, traversal, compare, max, isEqual} = require('./point-helpers')
const isCharacterPair = require('./... |
import chai from 'chai';
import models from '../../../models/';
import { documentsTestSeed } from '../seeder';
const Documents = models.Documents;
chai.should();
describe('Model for Documents table', () => {
describe('case of already existing document', () => {
it('should return `unique violation error` if titl... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var XmlElementNames_1 = require("../Core/XmlElem... |
/*globals describe, it, require, before, global, $*/
var expect = require('chai').expect;
var jsdom = require('jsdom');
var jq = require('jquery');
var result = require('../tasks/task-1')();
var Handlebars = require('handlebars');
describe('Task #1 Tests', function () {
before(function (done) {
jsdom.env(... |
var child_process = require('child_process');
var path = require('path');
/** RegEx for testing for hex colors */
var hexColorRegEx = /^[A-Fa-f0-9]{6}$/;
/** Regex for testing what to substitute in selection */
var substitutionRegex = /(\#?)([A-Fa-f0-9]{6})(;?)/;
module.exports = {
activate: function () {
ato... |
'use strict';
module.exports = function (app) {
// Root routing
var files = require('../controllers/files.server.controller');
app.route('/api/files/upload')
.post(files.uploadImage);
app.route('/api/files/crop')
.post(files.crop);
};
|
if(!lt.util.load.provided_QMARK_('lt.plugins.coffee-script')) {
goog.provide('lt.plugins.coffee_script');
goog.require('cljs.core');
goog.require('lt.objs.command');
goog.require('lt.objs.command');
goog.require('lt.objs.tabs');
goog.require('lt.objs.tabs');
goog.require('lt.object');
goog.require('lt.object');
}
//# ... |
var fscope = require('../../');
module.exports = function () {
addEventListener('message', function (ev) {
postMessage(fscope.worker(ev.data));
});
};
|
export default (
env,
{ inline = false, builtin = true },
{ plugins = [], next }
) => {
const result = {
module: {
rules: [
{
test: /\.wasm$/,
},
],
},
};
// override Webpack default type
if (!builtin) {
result.module.rules[0].type = 'javascript/auto';
... |
qx.Class.define("testapp.Warnings1", {
extend: qx.core.Object,
construct(options) {
this.base(arguments);
let proxyOpts = {
proxyReqPathResolver(req) {
console.log(`proxyReqPathResolver: ${req.originalUrl}`);
return req.originalUrl;
},
proxyReqOptDecorator... |
'use strict';
var wascally = require('wascally');
var _ = require('underscore');
var topology = require('./topology');
var initialized = false;
// initialize handlers
var handlerNames = ['sendMail'];
_(handlerNames).each(function(handlerName) {
require('./handlers/' + handlerName);
});
exports.init = function(co... |
import { select } from 'd3-selection';
import { scaleIdentity } from 'd3-scale';
import { axisBottom, axisRight, axisLeft, axisTop } from '@d3fc/d3fc-axis';
import { dataJoin, isTransition } from '@d3fc/d3fc-data-join';
import { rebindAll, exclude, prefix } from '@d3fc/d3fc-rebind';
import store from './store';
import ... |
/// <autosync enabled="true" />
/// <reference path="../gulpfile.js" />
/// <reference path="lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js" />
/// <reference path="lib/jquery-validation/jquery.validate.js" />
/// <reference path="lib/jquery/jquery.js" />
/// <reference path="lib/hammer.js/hammer.js"... |
'use strict';
var mongoose = require('bluebird').promisifyAll(require('mongoose'));
var Schema = mongoose.Schema;
var AchievementSchema = new Schema({
title: String,
description: String,
date: Date
});
module.exports = mongoose.model('Achievement', AchievementSchema);
|
import React from 'react';
import styles from '../stylesheets/application.less';
export default function SearchStatus(props) {
const { queryInProgress, errorMessage, numReturnedResults } = props;
let progress, results;
if (queryInProgress) {
progress = <span id="runningQuery">Query running...</span>;
} el... |
import{ɵɵdefineInjectable,ɵɵinject,Injectable}from"@angular/core";import{Angulartics2}from"angulartics2";class Angulartics2Splunk{constructor(r){this.angulartics2=r,"undefined"==typeof sp&&console.warn("Splunk not found")}startTracking(){this.angulartics2.pageTrack.pipe(this.angulartics2.filterDeveloperMode()).subscrib... |
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import ButtonBase fr... |
export default o => Object.assign({}, o);
|
export default class ServiceAdapter {
constructor(service) {
this.service = service;
}
fetchAll(...args) {
return this.service.fetchAll(...args);
}
fetchOne(...args) {
return this.service.fetchOne(...args);
}
createItem(...args) {
return this.service.createItem(...args);
}
updateIt... |
(function($, window) {
//$.fn.serializeObject = function() {
// var o = {};
// var a = this.serializeArray();
// $.each(a, function() {
// if (o[this.name] !== undefined) {
// if (!o[this.name].push) {
// o[this.name] = [o[this.name]];
// ... |
import reducer from '../reducers/index'
import thunk from 'redux-thunk'
import createLogger from 'redux-logger'
import { createStore, applyMiddleware } from 'redux'
const logger = createLogger()
const createStoreWithMiddleware = applyMiddleware(thunk, logger)(createStore)
export default function configureStore () {
... |
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
Ember.MODEL_FACTORY_INJECTIONS = true;
var App = Ember.Application.extend({
modulePrefix: 'model-playground', // TODO: loaded via config
Resolver: Resolver
});
loadInitializers(App, 'model-playground');
function respo... |
(() => {
console.log('Test');
})();
|
/*
Ideally, this would have been created with something like Handlebars and precompiled. Underscores templates are
not really suited to 'complex' HTML. It could have been 'neater' by putting it in the HTML but, then your mixing
view and logic. Having it as a JS object also makes it reusable in other pages... |
import debounce from '../utils/debounce'
class Tada {
constructor (config) {
this.config = config
this.elements = []
}
setup (options) {
if (this.initialized) {
throw new Error('"setup" should be called before other methods.')
}
for (let key in options || {}) {
this.config[key] ... |
$(function(){$.widget("primeui.puilightbox",{options:{iframeWidth:640,iframeHeight:480,iframe:false},_create:function(){this.options.mode=this.options.iframe?"iframe":(this.element.children("div").length==1)?"inline":"image";
var a='<div class="pui-lightbox ui-widget ui-helper-hidden ui-corner-all pui-shadow">';
a+='<d... |
import React ,{Component} from 'react'
export default class Iframe extends Component {
static defaultProps={
url:'/'
}
render() {
return (
<section data-background-iframe={this.props.url}>
</section>
);
}
} |
'use strict';
var React = require('react'),
renderHTML = require('react-render-html'),
map = require('lodash/collection/map'),
filter = require('lodash/collection/filter'),
renderMixin = require('./mixins/render_mixin'),
contentMixin = require('./mixins/content_mixin'),
Viewport = require('./vi... |
module.exports = function (req, res){
var fs = require('fs')
,minify = require('minify')
,config = require('./config');
fs.readFile (__dirname + '/../dist/userKinect.js', function(err, data){
if (err) throw err;
var data = data.toString().replace(/{project}/g, req.query.proje... |
// Backbone.Wreqr (Backbone.Marionette)
// ----------------------------------
// v0.2.0
//
// Copyright (c)2013 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
//
// http://github.com/marionettejs/backbone.wreqr
Backbone.Wreqr = (function(Backbone, Marionette, _){
"use strict";
var Wreqr = {};... |
/*
*
* Clairvoyance reducer
*
*/
import { fromJS } from 'immutable';
import {
DEFAULT_ACTION,
SUBMIT_VALUES,
RESULT,
SUBMIT_VALUES_AS_HINT_SUCCESS,
SUBMIT_VALUES_AS_HINT_ERROR,
SUBMIT_VALUES_AS_HINT, LOAD_HINTS, LOAD_HINTS_ERROR, LOAD_HINTS_SUCCESS,
LOAD_DEFAULT_VALUES_ERROR, LOAD_DEFAULT_VALUES_SUCC... |
const blue = '#337ab7';
const style = {
divStyle: {width: 300, marginLeft: 'auto', marginRight: 'auto', paddingTop: 15, paddingBottom: 10, borderBottom: '1px solid black'},
center: {textAlign: 'center', marginRight: 'auto', marginLeft: 'auto'},
flatButton : {cursor: 'pointer', padding: 12, margin:20, minWidth: 100... |
import React from 'react';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { AppBar, Paper } from 'material-ui';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import reducer from './reducers';
import Lis... |
const commandParser = (commandText) => {
let receivedCommand = {
movie : "",
spoiler : ""
};
receivedCommand.movie = commandText.split(',')[0].replace('"','');
receivedCommand.spoiler = commandText.split(',')[1].replace('"','');
return receivedCommand;
}
module.exports = commandParser |
window.API = {};
window.DOJO = {};
//-----------------------------------
//
// http://<host>:<port>/index.html
// New window.DOJO.Setup
// -- Called first
//-----------------------------------
window.onload = function(e){
window.API.setup = new window.DOJO.Setup(window.API);
};
// Change any preset terms set in inp... |
var nijs = require('nijs');
exports.pkg = function(args) {
return args.stdenv().mkDerivation({
name : "wget-1.20.3",
src : args.fetchurl()({
url : new nijs.NixURL("mirror://gnu/wget/wget-1.20.3.tar.gz"),
sha256 : "0bh9ll078rxqnbx1r142p5h00drarzggc1isiqfdna05cg3czk1i"
}),
configureFlags ... |
(function routingClientInit(module) {
'use strict';
var moduleName = 'routing';
var getRegExSlashOrQueryString = function () {
return '((\/)|(\\?.*))?';
};
var getFullDomain = function (location) {
return location.protocol + '//' + location.host;
};
module.exports = {
... |
'use strict'
import { capitalize } from './capitalize'
import { chars } from './chars'
import { clean } from './clean'
import { count } from './count'
import { decapitalize } from './decapitalize'
import { insert } from './insert'
import { isBlank } from './isBlank'
import { join } from './join'
import { ltrim } from ... |
/**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './redux/create';
import ApiClient from './helpers/ApiClient';
import io from 'socket.io-client';
import... |
$(document).ready(function(){
var camera = $('#camera'),
photos = $('#photos'),
screen = $('#screen');
var template = '<a href="uploads/original/{src}" rel="cam" '
+'style="background-image:url(uploads/thumbs/{src})"></a>';
/*----------------------------------
Setting up the web camera
-----... |
// 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, Microsoft Open Technologies, Inc.
//
// All ri... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler","./support"],function(k,g,l,m,n){Object.defineProperty(g,"__esModule",{value:!... |
var bases = require('bases');
var crypto = require('crypto');
var Promise = require('bluebird');
exports.generateBase62 = function (length) {
var maxNum = Math.pow(62, length);
var numBytes = Math.ceil(Math.log(maxNum) / Math.log(256));
if (numBytes === Infinity) {
throw new Error('Length too large; caused o... |
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* WWW app integration/acceptance tests (just a few sample tests, not full coverage) */
/* */
/* These tests re... |
// Source : https://leetcode.com/problems/isomorphic-strings/
// Author : Dean Shi
// Date : 2015-06-16
/**********************************************************************************
*
* Given two strings s and t, determine if they are isomorphic.
*
* Two strings are isomorphic if the characters in s can be... |
import Immutable from 'immutable';
import { LOCATION_CHANGE } from 'react-router-redux';
let initialState;
initialState = Immutable.fromJS({
locationBeforeTransitions: null
});
// custom immutable-friendly reducer: https://github.com/gajus/redux-immutable
export const routerReducer = (state = initialState, action)... |
/**
* Created by Liara Anna Maria Rørvig on 08/08/2017.
*/
'use strict';
const dot = require( 'dot-object' );
const DEFAULT_OPTIONS_REQUIREMENTS = [
{
name : 'Discord',
location : 'tokens.discord',
validate : ( value ) => {
return typeof value === 'string' && val... |
/**
* Norwegian translation for bootstrap-datepicker
**/
;
(function ($) {
$.fn.datepicker.dates['no'] = {
days: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag'],
daysShort: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
daysMin: ['Sø', 'Ma', 'Ti', 'On', 'To', ... |
version https://git-lfs.github.com/spec/v1
oid sha256:de5fad55e59328f63bc2b4ea364008b050aa15d6fcea42a2ccd36a7e6fba99a3
size 842
|
(function() {
beforeEach(module('app'));
beforeEach(function() {
return this.addMatchers({
toEqualData: function(expected) {
return angular.equals(this.actual, expected);
}
});
});
describe('person service', function() {
var $httpBackend, personService;
personService = {};
... |
/*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-2-4
*/
(function( window, undefined ) {
// Can't do ... |
import React from 'react';
import { NavLink } from 'react-router-dom';
import AppBar from 'material-ui/AppBar';
import SelectedField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
class Header extends React.Component {
state = {
value: 1,
};
handleChange = (evt, index, value) =... |
'use strict';
var gulp = require('gulp'),
runSequence = require('run-sequence'),
notifier = require('node-notifier');
// Run all tasks needed for a build
// the 'clean' task completes first,
// then the 'distribute' tasks are run in parallel
// lastly the html files are copied
// note: - Using [run-sequence... |
/*
heatmap.jquery v1.0
https://github.com/msuz/heatmap.jquery
*/
; (function($) {
$.fn.heatmap = function(n, params) {
var $self = this;
var conf = $.extend({
'mode': 'default',
'min': 0.0,
'max': 1.0,
}, params);
var x = (n - conf.min) / (conf.max - conf.min);
var rgb = $s... |
// DEMO CONFIG (DO NOT DELETE THIS EXAMPLE):
/*const networks = {
mainnet: 1,
morden: 2,
ropsten: 3,
rinkeby: 4,
kovan: 42,
sokolPOA: 77,
corePOA: 99
}
export const CrowdsaleConfig = {
crowdsaleContractURL: '0x338f47C1AA1DBdB56DfEA17cc376C0b21f4fbDa2',
networkID: networks.sokolPOA,
showHeaderAndFoo... |
(function($){
//This function is used to extract render a map of all points that were tweeted from on a map
var mapMarkersView = new window.MapMarkersView();
mapMarkersView.collection.fetch();
})(jQuery); |
/**
* Settings
*/
var settings = {
scripts: true, // Turn on/off script tasks
polyfills: true, // Turn on/off polyfill tasks
styles: false, // Turn on/off style tasks
svgs: false, // Turn on/off SVG tasks
images: false, // Turn on/off image tasks
static: false, // Turn on/off static file copying
docs: tr... |
"use strict";
var cproc = require("child_process");
var through = require("through2");
var fs = require("fs-extra");
var log = require("fancy-log");
var PluginError = require("plugin-error");
var argsFor = require("./argsFor");
var validFor = require("./validFor");
var path = require("path");
var File = require("vinyl... |
//This file contains all functions used to control logic and actions on the webpage
var recommendedTeam = new Array();
var enemyTeam = new Array();
var classesMap = new Object(), Tank = 0, Healer = 0, Offense = 0, Defense = 0;
//AngularJS functions
(function () {
var app = angular.module('overwatch', []);
app.... |
const plugins = [
require("../../../../config/prettier-plugins/prettier-plugin-missing-comments/"),
];
run_spec({ dirname: __dirname, snippets: ["text"] }, ["missing-comments"], {
plugins,
});
|
/**
* This is our bogolisp namespace.
*/
var bogolisp = {};
/**
* Hey, it's HACKATHON
*/
String.prototype.in = function(str) {
return (str.indexOf(this) !== -1);
};
/*
* Convert a string into tokens. That's all. LEX IT!
*/
bogolisp.lex = function(str) {
var isString = typeof str === 'string';
if (!... |
import React from 'react';
import { useLocation } from '@reach/router';
import { Badge, CodeBlock, CodeBlockCode, debounce } from '@patternfly/react-core';
import * as reactCoreModule from '@patternfly/react-core';
import * as reactTableModule from '@patternfly/react-table';
import { css } from '@patternfly/react-style... |
if (require !== 'undefined') {
// var FirstLoad = require('./first-pageload.js');
}
var FixHeight = function (mainEl, footerEl) {
return {
before: function (ctx, next) {
mainEl.height($(window).height());
footerEl.addClass('invisible');
window.setTimeout(next, 50);
},
after: function (ctx, next) {
... |
import VueRouter from 'vue-router'
import Vue from 'vue'
Vue.use(VueRouter)
import Home from 'src/pages/Home'
import Video from 'src/pages/Video'
import Login from 'src/pages/Login'
import Register from 'src/pages/Register'
import Profile from 'src/pages/Profile'
import Upload from 'src/pages/Upload'
import User from... |
function starGame() { // The main function of the game Engine
let ctxObs=document.getElementById("obs").getContext("2d");
let allUpperSpikes = [];
let allDownSpikes = [];
const CANVAS_WIDTH = 900;
const CANVAS_HEIGHT = 450;
const canvas = document.getElementById("cMain");
let obstacleCanva... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.