code stringlengths 2 1.05M |
|---|
var loadJSON = function(path, success, error){
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function()
{
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
if (success)
success(JSON.parse(xhr.responseText));
... |
describe('Cookies functions', function() {
var assert = chai.assert;
var cookies = Utilities.cookies;
it('should save value as base64 string to cookie', function(done) {
cookies.set('hey', 'ya');
assert.include(document.cookie, 'hey=InlhIg==');
done();
});
it('should get... |
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": "standard",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"quotes": [
"error",
... |
import { hasRootPathPrefixInString, transformRelativeToRootPath } from './helper';
import CallExpressionTester from './call-expression-tester';
const replacePrefix = (path, opts = [], sourceFile) => {
const paths = 'paths' in opts ? opts.paths : opts;
const options = [].concat(paths);
for (let i = 0; i < option... |
var http = require("http").createServer(handler); // on req - hand
var io = require("socket.io").listen(http); //socket library
var fs = require("fs"); // variable for file system for providing html
var firmata = require("firmata");
console.log("Starting the code");
var board = new firmata.Board("/dev/ttyACM0", func... |
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);
client.api
... |
/**
* Created by wanpeng on 2017/10/25.
*/
import React, {PureComponent} from 'react'
import {connect} from 'react-redux'
import {Link, Route, withRouter, Switch} from 'react-router-dom'
import {
Button,
Table,
Row,
Col,
Card,
} from 'antd'
import {selector, ScoreType} from './redux'
import moment from 'mom... |
import config from '../config'
import { entry, output, resolve } from './options/_common'
import { plugins } from './options/_plugins'
import { preLoaders, loaders, eslint, postcss, sassLoader } from './options/_loaders'
const webpackConfig = {
name: 'client',
target: 'web',
devtool: config.compiler_devtool,
... |
import Vue from 'vue';
import {AgGridVue} from '@ag-grid-community/vue';
import {AllCommunityModules} from '@ag-grid-community/all-modules';
import '@ag-grid-community/core/dist/styles/ag-grid.css';
import '@ag-grid-community/core/dist/styles/ag-theme-alpine.css';
import 'styles.css';
let rowIdSequence = 100;
func... |
var express = require('express');
var app = express();
var methodOverride = require('method-override');
var pg = require('pg');
var passport = require('passport');
var morgan = require('morgan');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var session = require('express-sessio... |
/**
* The ModisLayerPresenter.
*
* @return ModisLayerPresenter class
*/
define(['underscore', 'mps', 'map/presenters/PresenterClass'], function(
_,
mps,
PresenterClass
) {
'use strict';
var ModisLayerPresenter = PresenterClass.extend({
init: function(view) {
this.view = view;
this._super(... |
// libs
import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import map from 'lodash/map';
// actions
// sagas
import {sagas as jobsSagas} from 'modules/Jobs';
// selectors
import {orderedJobsSelector} from 'modules/Jobs/selectors';
// components
class HomePage extends React.Component {
stati... |
export { default } from 'ember-mdl/components/mdl-spinner'; |
$(document).foundation();
$("a.magellan-link").smoothScroll({offset: -60, speed: 1000});
|
/*
* grunt-file-writer
* https://github.com/aboritskiy/grunt-file-writer
*
* Copyright (c) 2014 aboritskiy
* Licensed under the MIT license.
*/
'use strict';
var FileParser = require('../lib/FileParser');
var FileWriter = require('../lib/FileWriter');
module.exports = function(grunt) {
// Please see the Gr... |
$(function () {
var optsDate = {
format: 'Y-m-d', // รูปแบบวันที่
formatDate: 'Y-m-d',
timepicker: false,
closeOnDateSelect: true,
}
var setDateFunc = function (ct, obj) {
var minDateSet = $("#startDate_ManageNews").val();
var maxDateSet = $("#endDate_... |
'use strict';
angular.module('myApp.other', ['ngRoute'])
.controller('otherCtrl', ['$scope','$http','$location','$log','$routeParams','$cookies'
,function($scope,$http,$location,$log,$routeParams,$cookies) {
$scope.delCookie = function(kind) {
$cookies.remove('webProv'+kind);
if (kind == "History") { $... |
export const bubbleSortConcept = (array = [4, 3, 2, 1]) => {
array = array.slice();
for (let i = 0; i < array.length; i++) {
for (let j = 0; j < array.length - 1; j++) {
if (array[j] > array[j + 1]) {
[array[j], array[j + 1]] = [array[j + 1], array[j]];
}
}
}
return array;
}
export ... |
/*global io, define */
(function (root, factory) {
'use strict';
// AMD
if (typeof define === 'function' && define.amd) {
define([
'ko.ninja.baseStorage',
'underscore'
], factory);
// Non-AMD
} else {
factory(root.ko.ninjaBaseStorage, root._, root.k... |
// Archivist bindings for the MysqlVault API
function Archive(vault) {
this.vault = vault;
}
module.exports = Archive;
Archive.prototype.list = function (api, topic, partialIndex, options, cb) {
var partialKey = api.createKey(topic, partialIndex);
var cols = api.index;
var sort = options && options.sort;
var ... |
"use strict"
/*-----import [xxx.js]-----*/
import { myName, myAge, myfn, myClass } from "./common.js";
class Es6Test {
testMap() {
var m = new Map([['Michael', 95], ['Bob', 75], ['Tracy', 85]]);
console.log(m.get('Michael'));
var m = new Map(); // 空Map
m.set('Adam', 67); // 添加新的key-value
m.set('... |
var group__flexio__hal =
[
[ "flexio_shifter_t", "group__flexio__hal.html#structflexio__shifter__t", [
[ "index", "group__flexio__hal.html#a7c73ef4731b891698fa8f470dcc29602", null ],
[ "timer", "group__flexio__hal.html#ac4b80c8be2f7b482aa7313a058a736c9", null ],
[ "pin", "group__flexio__hal.html#a... |
// COPYRIGHT © 2017 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute... |
/* jshint scripturl:true */
import { expect } from 'chai';
import {
describeComponent,
it
} from 'ember-mocha';
import hbs from 'htmlbars-inline-precompile';
import Ember from 'ember';
const {run} = Ember,
// we want baseUrl to match the running domain so relative URLs are
// handled as expected (b... |
l.keyboard = new Object() // Group the keyboard functions
l.keyboard.enable = function()
{
document.body.setAttribute('onkeydown', 'l.keyboard.pressed(event)')
document.body.setAttribute('onkeyup', 'l.keyboard.cancel(event)')
}
l.keyboard.pressed = function(event)
{
if (event.keyCode == 27)
{
... |
var whatwedo_select2 = {
empty: '-- leer --',
init: function() {
$('select').each(function(i, elem) {
whatwedo_select2.initElement(elem)
});
},
initElement: function(elem) {
if($(elem).is('[data-disable-interactive]')) return;
if($(elem).is('[data-ajax-select]... |
/*globals describe, beforeEach, afterEach, it*/
/*jshint expr:true*/
var nock = require('nock'),
should = require('should'),
sinon = require('sinon'),
testUtils = require('../utils'),
xmlrpc = require('../../server/data/xml/xmlrpc'),
events = req... |
import React, { Component, PropTypes } from 'react';
import Link from '../Link';
import cx from 'classnames';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from '../App/App.scss';
import RaisedButton from 'material-ui/RaisedButton';
import baseTheme from 'material-ui/styles/baseThemes/lig... |
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
StatusBar,
Platform
} from 'react-native';
import Logo from '../common/Logo';
import Button from '../common/Button';
export default class AppointmentScheduled extends Component {
_openMain() {
this.props.navigator.pop();
}
... |
define(['character', 'exceptions'], function(Character, Exceptions) {
var Player = Character.extend({
MAX_LEVEL: 10,
init: function(id, name, kind) {
this._super(id, kind);
this.name = name;
// Renderer
this.nameOffsetY = -10;
... |
document.addEventListener('DOMContentLoaded', function() {
const acc = document.getElementsByClassName("expandButton");
let i;
for (i = 0; i < acc.length; i++) {
acc[i].onclick = function(){
let panel = this.nextElementSibling;
if (panel.style.display === "block") {
panel.... |
/*! UIkit 3.2.4 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
typeof define === 'function' && define.amd ? define('uikitcountdown', ['uikit-util... |
import { USER_LOGIN_REQUEST, USER_LOGIN_SUCCESS } from '../actions/types'
import { userLoginSuccess, userLoginFailure } from '../actions/creators'
import { ajax } from 'rxjs/observable/dom/ajax';
import { Observable } from 'rxjs/Observable';
import { replace } from 'react-router-redux'
import 'rxjs/add/operator/mergeMa... |
import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import compose from 'recompose/compose';
import withHandlers from 'recompose/withHandlers';
import Drawer from '@material-ui/core/Drawer';
import MenuList from '@material-ui/core/MenuList';
import MenuItem from '@m... |
const JobRunner = require('./job-runner');
/**
* @param {Object} options
* @module Pool
*/
const Pool = function constructor(options = {}) {
/**
* _options
* @type {Object}
* @private
*/
this._options = {
maxParallelJobs: options.maxParallelJobs || 5
};
/**
* @type {Array} _queue
* @p... |
import { LoggerContext } from "../logging/logger-context";
import { ParameterContainer } from "../core/parameter-container";
export class Project {
constructor() {
this.loggerContext = new LoggerContext();
this.parameterContainer = new ParameterContainer();
}
}
|
initSidebarItems({"struct":[["LineStrip","A list of lines connected together stored in RAM."],["LineStripAdjacency","A list of lines connected together, with adjacency information, stored in RAM."],["LinesList","A list of lines stored in RAM."],["LinesListAdjacency","A list of lines, with adjacency information, stored ... |
var validator = require('validator').sanitize;
var path = require('path');
var und = require('../../services/underscore');
var helper = require('../../services/Helper');
var dataProvider = null;
var smtpProvider = null;
module.exports = function (app, database, smtp) {
this.dataProvider = database;
this.smtpPr... |
var System = require("../../lib/system.js");
var pledge = require("../../lib/pledge.js");
var crypto = require('crypto');
var sha1 = crypto.createHash('sha1');
module.exports = (function() {
var redis = System.redis;
function __encrypt(pass, seed) {
for(var i=0; i<24; ++i) pass = sha1.update(seed + p... |
var debug = require('debug')('aws-deploy:task:check-application-status');
var async = require("async");
var AWS = require('../aws-sdk');
var _ = require('lodash');
var db = require('../db');
var cache = require('../cache');
var log = require('../log');
var EB = new AWS.ElasticBeanstalk();
function checkApplicationSt... |
// Regular expression that matches all symbols in the `Buhid` script as per Unicode v5.2.0:
/[\u1740-\u1753]/; |
export default function demo () {
return (function foo() {
return (() => {
return (function bar() {
return (() => this.bar)();
}).call({bar: 222});
})();
}).call({foo: 111});
} |
'use strict';
//
// Get and temperature from connected sensors.
//
// @chamerling
//
var fs = require('fs');
var W1_FILE = '/sys/bus/w1/devices/w1_bus_master1/w1_master_slaves';
function parseHexData(data) {
var arr = data.split(' ');
if (arr[1].charAt(0) === 'f') {
var x = parseInt('0xffff' + arr[1].toStr... |
import superagent from 'superagent';
import config from '../config';
const methods = ['get', 'post', 'put', 'patch', 'del'];
function formatUrl(path) {
const adjustedPath = path[0] !== '/' ? '/' + path : path;
if (__SERVER__) {
// Prepend host and port of the API server to the path.
return 'http://localho... |
var app = angular.module('app', ['$strap.directives']).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/track', {
templateUrl: 'partials/track.html',
controller: 'TrackerController'
}).
when('/scatterplot', {
templateUrl: 'partials/scatter.html',
controller: 'ScatterplotC... |
/**
* Cesium - https://github.com/AnalyticalGraphicsInc/cesium
*
* Copyright 2011-2017 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/l... |
// Karma configuration
// Generated on Fri Sep 11 2015 21:41:29 GMT-0700 (PDT)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/k... |
export const mutation = {
createBook(title: String!, author: String!, libraryId: ID!): Book
}
export const resolver = {
createBook(root, args, context) {
return context.prisma.createBook({
title: args.title,
author: args.author,
owner: {
connect: { id: args.libraryId },
},
})
},
}
|
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:i-c-s-soft-s-t-o-r-m-n-e-t-security-permition-l', 'Unit | Route | i c s soft s t o r m n e t security permition l', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function(assert) {
... |
'use strict'
const _ = require('lodash');
const debug = require('debug')('roas-restql:common');
function switchByType (param, callbacks) {
callbacks = callbacks || {}
const {
object, array, string, bool, number, defaults
} = callbacks;
let callback;
switch (typeof param) {
case 'object':
... |
Hash.implement({
sum:function(){
var base=0;
this.each(function(val){base+=val; });
return base;
},
toQueryList: function(base){
var queryList= [];
Hash.each(this, function(value, key){
if (base) key = base + '[' + key + ']';
var result;
switch ($type(value)){
... |
export const LOAD = 'xkcd/LOAD';
export const LOAD_SUCCESS = 'xkcd/LOAD_SUCCESS';
export const LOAD_FAIL = 'xkcd/LOAD_FAIL';
export function getLast() {
return {
types: [LOAD, LOAD_SUCCESS, LOAD_FAIL],
promise: (client) => client.get('/api/proxy', { params: {
url: 'http://xkcd.com/info.0.json',
}})... |
// jquery.daterangepicker.js
// author : Chunlong Liu
// license : MIT
// www.jszen.com
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery', 'moment'], factory);
} else if (typeof exports === 'object' && typeof module ... |
$( document ).ready( bp_init );
$( window ).resize( bp_init );
function bp_init () {
bp_draw();
}
function bp_draw () {
var innerWidth = window.innerWidth;
var innerHeight = window.innerHeight;
var bp_container = document.getElementById("bp-container");
var bp_holder = document.getElementById("bp-holder"... |
var should = require('should'), // eslint-disable-line no-unused-vars
utils = require('./utils'),
thisCheck = require('../lib/checks/090-template-syntax');
describe('090 Template syntax', function () {
describe('canary', function () {
const options = {checkVersion: 'canary'};
it('should ou... |
const Election = require('../models/election');
const Vote = require('../models/vote');
const errors = require('../errors');
const env = require('../../env');
const redisClient = require('redis').createClient(6379, env.REDIS_URL);
const Redlock = require('redlock');
const redlock = new Redlock([redisClient], {});
cons... |
NEWSBLUR.ReaderProfileEditor = function(options) {
var defaults = {
width: 800
};
this.options = $.extend({}, defaults, options);
this.model = NEWSBLUR.assets;
this.profile = this.model.user_profile;
this.runner();
};
NEWSBLUR.ReaderProfileEditor.prototype = new NEWSBLUR... |
var http = require('http'),
https = require('https'),
request = require('request'),
cheerio = require('cheerio');
var shorthandProperties = {
"image": "image:url",
"video": "video:url",
"audio": "audio:url"
}
module.exports = function(url, cb, options){
exports.getHTML(url, function(err, html){
if (err) re... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{597:function(n,e,o){"use strict";o.r(e),e.default="const {Scene} = spritejs;\nconst {Mesh3d, shaders} = spritejs.ext3d;\nconst container = document.getElementById('container');\nconst scene = new Scene({\n container,\n displayRatio: 2,\n});\nconst layer = scen... |
/*
* grunt-umblocalize
* https://github.com/clausjensen/grunt-umblocalize
*
* Copyright (c) 2016 Claus
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
... |
(function( app ) { 'use strict';
const Colors = { };
// 'colors' is an array of {color: #XXX or #XXXXXX, weight: real}
Colors.mix = function( colors ) {
let c = 0;
let m = 0;
let y = 0;
let k = 0;
let w = 0;
for ( let i = 0; i < colors.length; i += 1 )
... |
import { expect } from 'chai';
import Lexer, { Token, TokenDefinition } from '../../src/lexer/lexer';
import { EOF } from '../../src/constants';
describe('TokenDefinition class', () => {
it('should generate a state machine with token defs', () => {
const tokenDef = new TokenDefinition('anA', /a/);
... |
(function() {
'use strict';
angular
.module('socialprofileApp')
.directive('jhSort', jhSort);
function jhSort () {
var directive = {
restrict: 'A',
scope: {
predicate: '=jhSort',
ascending: '=',
callback: '&'
... |
const path = require('path')
const cpuCount = require('os').cpus().length
const verifyPorts = require('./verifyPorts')
function getPack(dir, opt, env) {
// reload package.json
const packPath = path.join(dir, 'package.json')
delete require.cache[packPath]
const originalPackage = require(packPath)
const pack = Obje... |
class CellViewer {
constructor (){
this._colors = this.colorScheme();
this.initColorSchemeLookup();
this.isPixelRenderer = false;
this.pxDensity = pixelDensity();
}
renderCell(tmpCell, tmpX, tmpY, cellWidth, cellHeight){
if (this.isPixelRenderer) {
this.renderCellViaPixels(tmpCell, tmpX... |
var pull = require("pull-stream");
var unwind = require("pull-unwind");
var _ = require("underscore");
var spawn = module.exports = pull.Through(function (read, throughCreator, onSpawn) {
var ended
return unwind()(function (end, cb) {
if (end || ended) return cb(end || ended);
onSpawn && onSpawn();
cb... |
//game.HeroDeathManager = Object.extend({
// init: function(x, y, settings) {
// this.alwaysUpdate = true;
// },
// update: function() {
// if (game.data.player.dead) {
// me.game.world.removeChild(game.data.player);
// me.state.current().resetPlayer(10, 0);
// }
// ... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
d: "M3 2h8v2H3zM6 11h2V7h3V5H3v2h3zM12.4036 20.1819l7.7781-7.7781 1.4142 1.4142-7.778 7.778z"
}), h("circle", {
cx: "14.5",
cy: "14.5",
r: "1.5"
}), h("circle", {
cx: "19.5",
cy:... |
export const component = {
"conditional": {
"eq": "",
"when": null,
"show": ""
},
"tags": [
],
"type": "panel",
"components": [
{
"tags": [
],
"type": "textfield",
"conditional": {
"eq": "",
"when": null,
"show": ""
},
"validate":... |
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
qunit = require('gulp-qunit');
gulp.task('test', function() {
return gulp.src('./qunit/test-runner.html')
.pipe(qunit());
});
gulp.task('lint', function() {
return gulp.src(['./js/*.js', '!./js/jquery*.js'])
.pipe(jshint())
... |
"use strict";
var helpers = require("../../helpers/helpers");
exports["America/Dawson"] = {
"guess:by:offset" : helpers.makeTestGuess("America/Dawson", { offset: true, expect: "America/Whitehorse" }),
"guess:by:abbr" : helpers.makeTestGuess("America/Dawson", { abbr: true, expect: "America/Whitehorse" }),
"1918"... |
var EcommerceProductsEdit = function () {
var handleImages = function() {
// see http://www.plupload.com/
var uploader = new plupload.Uploader({
runtimes : 'html5,html4',
browse_button : document.getElementById('tab_images_uploader_pickfiles'), // you can pass in i... |
import swc from 'rollup-plugin-swc'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import nodeEsm from '@trigen/browserslist-config/node-esm'
import node from '@trigen/browserslist-config/node'
import pkg from './package.json'
const extensions = ['.js', '.ts']
const external = _ => /node_modules/.test(_) &&... |
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
destroy: function(user) {
user.deleteRecord();
user.save();
},
sortBy: function(property) {
if (Ember.isEqual(this.get('sortProperties')[0], property)) {
this.set('sortAscending', !this.get('sortAsce... |
angular.module( 'twitch.clips.manager' ).controller( 'manager', [ '$scope', '$sce', '$timeout', 'clipboard', 'settingsStorage', function ( $scope, $sce, $timeout, clipboard, settingsStorage ) {
// List of all clips
$scope.clips = [];
// Need reload flag
var needsReload = false;
// List of filtered... |
import { createSelector } from '@reduxjs/toolkit';
import { initialState } from './reducer';
const selectWalkDomain = state => state.walk || initialState;
const selectFiles = createSelector(
[selectWalkDomain],
pageState => pageState.listing.files,
);
const selectPath = createSelector(
[selectWalkDomain],
pa... |
const fs = require("fs");
const should = require("should/as-function");
const loader = require("../");
const simpleTest = (name, ext) => {
ext = ext || 'js';
let src = fs.readFileSync("test/fixtures/"+name+".src."+ext, "utf8");
let dest = fs.readFileSync("test/fixtures/"+name+".dest."+ext, "utf8");
sr... |
// http://phpjs.org/
function rawurlencode (str) {
// http://kevin.vanzonneveld.net
// + original by: Brett Zamir (http://brett-zamir.me)
// + input by: travc
// + input by: Brett Zamir (http://brett-zamir.me)
// + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + input by: Michael G... |
/**
* Expose a function that must be called when the library is loaded.
* And also a helper function.
*/
module.exports = videoElementsHandler;
module.exports.observeVideo = observeVideo;
/**
* Dependencies.
*/
var
debug = require('debug')('iosrtc:videoElementsHandler'),
MediaStreamRenderer = require('./MediaS... |
"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... |
"use strict";
let datafire = require('datafire');
let openapi = require('./openapi.json');
module.exports = datafire.Integration.fromOpenAPI(openapi, "google_doubleclickbidmanager"); |
const asgard_config = require('../../src/asgard-configurator');
const internals = {};
describe('test/unit/asgard-configurator-test.js', () => {
describe('createConfigFromEnvVars', () => {
describe('having all variables defined in env object', () => {
let variables;
beforeEach(() => {
varia... |
import React from 'react'
import { Field } from 'redux-form'
import { MenuItem, RaisedButton } from 'material-ui'
import TextField from '../../ReduxForm/TextField'
import SelectField from '../../ReduxForm/SelectField'
import ImageUpload from '../../ImageUpload'
const styles = {
form:{
display:'flex',
... |
'use strict';
define(['ChoPidoTurnos', 'services/usersService'], function(ChoPidoTurnos) {
ChoPidoTurnos.controller('RequestPasswordRecoveryCtrl', ['usersService', function (usersService) {
var _this = this;
this.$onInit = function() {
this.alerts = [];
};
this.requestRecovery = function() {
... |
// install : cordova plugin add https://github.com/ohh2ahh/AppAvailability.git
// link : https://github.com/ohh2ahh/AppAvailability
angular.module('ngCordova.plugins.appAvailability', [])
.factory('$cordovaAppAvailability', ['$q', function ($q) {
return {
check: function(urlScheme) {
var q =... |
//** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09')
//** v1.1 (April 7th, 09'):
//** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page ... |
import React from 'react';
import './MusicSingle.scss';
const renderCredits = ({
byComposed,
byMastered,
byMixed,
byPerformed,
byProduced,
}) => {
if (
byComposed &&
byMastered &&
byMixed &&
byPerformed &&
byProduced &&
byComposed === byMastered &&
byComposed === byMixed &&
... |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1600, height: 800}; // Default si... |
export const SELECT_SUBREDDIT = 'SELECT_SUBREDDIT';
export const INVALIDATE_SUBREDDIT = 'INVALIDATE_SUBREDDIT';
export const REQUEST_POSTS = 'REQUEST_POSTS';
export const RECEIVE_POSTS = 'RECEIVE_POSTS'; |
/**
* Diagnosis model events
*/
'use strict';
var EventEmitter = require('events').EventEmitter;
var Diagnosis = require('../../sqldb').Diagnosis;
var DiagnosisEvents = new EventEmitter();
// Set max event listeners (0 == unlimited)
DiagnosisEvents.setMaxListeners(0);
// Model events
var events = {
'afterCreate... |
"use strict";
const { expect } = require("chai");
const { SourcePos } = $pos;
const { ErrorMessageType, ErrorMessage, StrictParseError } = $error;
describe("#toString", () => {
it("should return a string representation of the error", () => {
const pos = new SourcePos("main", 6, 28);
const msgs = [
Er... |
function extractHostname(url) {
var hostname;
//find & remove protocol (http, ftp, etc.) and get hostname
if (url.indexOf("://") > -1) {
hostname = url.split('/')[2];
}
else {
hostname = url.split('/')[0];
}
//find & remove port number
hostname = hostname.split(':')[0];... |
var
cheerio = require('cheerio'),
parserUtil = require('../parser_util.js'),
path = require('path'),
scraper = require('../scraper.js').createScraper(path.basename(__filename, '.js'))
;
scraper.url = 'http://www.praha8.cz/Kontejnery-na-elektrozarizeni';
// district used for validation of conta... |
/* istanbul ignore file */
// @ts-check
const Mat = require('./mathMatrix.js').mat
const tools = require('./tools/index')
const $M = require('./math.js')
/**
* @description 雅克比迭代
* @param {*} input
* @param {*} epsilon
* @param {*} iterations
*/
function jacobi (input, epsilon = 1e-10, iterations = ... |
/**
* Author: Jeff Whelpley
* Date: 7/14/14
*
* Testing hashing functions
*/
var name = 'utils/hash';
var taste = require('../../pancakes.taste.js')();
var hash = taste.flapjack(name);
describe('UNIT ' + name, function () {
describe('generateHash()', function () {
it('should generate something... |
/*! ponies-rocks 03-09-2014 */
|
const mix = require('laravel-mix');
require('laravel-mix-merge-manifest');
mix.setPublicPath('../../public').mergeManifest();
mix.js(__dirname + '/Resources/assets/js/app.js', 'js/v1.js')
.sass( __dirname + '/Resources/assets/sass/app.scss', 'css/v1.css');
if (mix.inProduction()) {
mix.version();
} |
/*!
* mukla <https://github.com/tunnckoCore/mukla>
*
* Copyright (c) 2016 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)
* Released under the MIT license.
*/
'use strict'
var test = require('assertit')
var mukla = require('./index')
var capture = require('capture-stream')
test('should throw Ty... |
'use strict';
var _oadfParserSeltec3Pdf = require('../lib');
var _oadfParserSeltec3Pdf2 = _interopRequireDefault(_oadfParserSeltec3Pdf);
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
func... |
const express = require('express');
const path = require('path');
const port = process.env.PORT || 8080;
const app = express();
app.use(express.static(__dirname));
app.get('*', (req,res)=>{
res.sendFile(path.resolve(__dirname, 'index.html'));
});
app.listen(port);
console.log("Server running");
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.