code stringlengths 2 1.05M |
|---|
/**
* Menu configuration
**/
define({
// Define differents menus
menus : {
Main : {
id : 'main_menu',
name : '',
// Define different(s) screen(s) of menu
screens : [
{
buttons: [
{
id : 'main_menu_play',
text : 'Play',
action : 'Play',
// act... |
var config = {
PAGES: './pages/',
API: 'http://localhost:8080/api/',
TEMPLATES: './templates/',
COMPONENTS: './components/'
};
function setupRoutes() {
// Routing Table
var routes = {
'': getPage('home'),
'projects': ProjectController.get,
'projects/:projectId': ProjectC... |
export * from './client'
|
import http from 'http';
export const convertDataIntoJSON = (data, resolve, reject) => {
try {
resolve(JSON.parse(data.join('')));
} catch (error) {
reject(error);
}
};
export default (method, path) => {
return new Promise((resolve, reject) => {
const request = http[method.toLowerCase()];
req... |
var express = require('./express');
var app = express();
app.get('/',function(req,res){
res.end('welcome to homepage');
});
app.get('/about',function(req,res){
res.end('welcome to about page');
})
app.get("*",function(req,res){
res.end("404");
})
app.listen(3000); |
'use strict';
angular.module('riplive')
/**
* Load all news with a specific tag.
* Paginate the result, pushing the data into $scope.posts.
* Load additional news when user scrolls down the page.
*
* @param {Object} $scope
* @param {Object} $routeParams
* @param {Object} newsService
* @param {O... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({widgetLabel:"\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",enter:"\u0625\u062f\u062e\u0627\u0644 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u06... |
module.exports = (function() {
function isJson(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
return {"isJson" : isJson }
})() |
version https://git-lfs.github.com/spec/v1
oid sha256:d1a2cb4a21b780f61f03b7735f313af32fe83610e4265322e6b7b512d150206c
size 1009
|
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'tr',
classNames: ['top aligned'],
index: null,
link: null,
validationRules: null,
bindAttributes: ['index', 'link', 'validationRules'],
actions: {
removeLink: function (link) {
this.sendAction('removeLink', link);
... |
'use strict'
const description = 'Kill a daemon jsreport process'
const command = 'kill'
exports.command = command
exports.description = description
exports.builder = (yargs) => {
return (
yargs
.usage(
[
`${description}\n`,
`Usage:\n\njsreport ${command} [uidOrp... |
/**
* Created by mattia on 15.07.15.
*/
var ballotApp = angular.module('ballotApp', []);
ballotApp.controller('QuestionCtrl', function ($scope) {
}); |
// This is a karma config file. For more details see
// http://karma-runner.github.io/0.13/config/configuration-file.html
// we are also using it with karma-webpack
// https://github.com/webpack/karma-webpack
var path = require('path')
var merge = require('webpack-merge')
var baseConfig = require('../../build/webp... |
var express = require('express');
var router = express.Router();
var url=require("url");
var cnode=require("../spider/cnode");
/* GET home page. */
router.get('/', function(req, res, next) {
var queryObj=req.query;
var requestUrl="http://cnodejs.org/";
if(queryObj.tab && queryObj.page){
requestUrl+="?tab="+q... |
'use strict';
var State = require('./state');
var state = {
reset: reset
};
function reset() {
clearProperties();
setProperties(State());
}
reset();
module.exports = state;
function clearProperties() {
Object.keys(state).forEach(function (key) {
if (key === 'reset') {
return;
... |
/**
* Invoice.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
products : {
colllection : 'invoiceProduct',
via : 'invoice'
... |
{
var result = "";
for (var value of iterator) {
result += value;
}
return result;
}
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 University of California San Diego
* Author: Jim Robinson
*
* 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, incl... |
/* ===================================================
* bootstrap-transition.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you ... |
/*! jQuery Expander - v0.1.0 - 2014-03-30
* https://github.com/AndreScheffer/jquery-expander
* Copyright (c) 2014 Andre Scheffer; Licensed MIT */
(function($) {
"use strict";
var Expander = function() {};
Expander.prototype = {
_init: function(elements, options) {
// Override default ... |
var searchData=
[
['drawingtype',['DrawingType',['../class_convay_1_1_win_forms_game_1_1_settings_form.html#a7918e2a1b1587472aa065d4db7a13537',1,'Convay::WinFormsGame::SettingsForm']]]
];
|
import { sleep } from './sleep.js';
export default {
html: `
<p>loading...</p>
`,
test({ assert, target }) {
return sleep(50).then(() => {
assert.htmlEqual(target.innerHTML, `
<p>the answer is 42</p>
<p>count: 1</p>
`);
});
}
};
|
//================================================================
// RS_EmbossingButtonStyleEx.js
// ---------------------------------------------------------------
// The MIT License
// Copyright (c) 2015-2019 biud436
// ---------------------------------------------------------------
// Free for commercial and non co... |
var path = require('path')
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var CopyWebpackPlugin = require('copy-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-pl... |
var namespace_meta_1_1_exceptions =
[
[ "ContainerExceptions", "namespace_meta_1_1_exceptions_1_1_container_exceptions.html", "namespace_meta_1_1_exceptions_1_1_container_exceptions" ],
[ "MovementExceptions", "namespace_meta_1_1_exceptions_1_1_movement_exceptions.html", "namespace_meta_1_1_exceptions_1_1_movem... |
import checkProperty from 'src/support/check/checkProperty';
describe(
'checkProperty', () => {
let done;
let expectToEqual;
let expectToNotEqual;
beforeEach(() => {
global.browser = {
getCssProperty: jest.fn(() => {}),
getAttribute: jest... |
'use strict';
var directivesModule = require('./_index.js');
/**
* @ngInject
*/
function scrollOnClick() {
return {
restrict: 'A',
scope: {
scrollTo: "@"
},
link: function(scope, $elm,attr) {
$elm.on('click', function() {
$('html,body').an... |
import EventEmitter from 'events';
const eventCenter = new EventEmitter();
if (eventCenter.setMaxListeners) {
eventCenter.setMaxListeners(20);
}
export { eventCenter };
export const SYNC_EVENT = 'recharts.syncMouseEvents';
|
require('./src/server.js').start();
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const deferable_path_1 = require("./deferable-path");
const rxjs_1 = require("rxjs");
function RepresentationToObject(representation) {
const subject = new rxjs_1.BehaviorSubject(new deferable_path_1.DeferablePath(-1, rxjs_1.Observable.fro... |
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
/* eslint no-console: "off" */
/* eslint global-require: "off" */
/* eslint no-param-reassign: ["error", { "props": false }] */
const path = require('path');
const less = require('./utils/less');
const autoprefixer = require('./utils/... |
var http = require('http');
var url = process.argv[2];
var bl = require('bl');
http.get(url, function(res) {
res.pipe(bl(function(err, data) {
console.log(data.length);
console.log(data.toString());
}));
});
|
'use strict';
const fs = require('fs');
const { get } = require('https');
const { Readable, PassThrough } = require('stream');
const should = require('should/as-function');
const { async: mime, BUFFER_LENGTH } = require('../');
const fixtures = `${__dirname}/fixture`;
function chunkSync(path) {
const fd = fs.openS... |
Ext.define('PlanningColumnDropController', {
extend: 'Rally.ui.cardboard.plugin.ColumnDropController',
alias: 'plugin.planningcolumndropcontroller',
_addDragZone: function() {
var column = this.cmp;
Ext.create('Ext.dd.DragZone', this.getDndContainer(), {
ddGroup: column.ddGroup,... |
// Actions
export const SHOW_MESSAGE = 'FlashMessages/SHOW_MESSAGE';
export const HIDE_MESSAGE = 'FlashMessages/HIDE_MESSAGE';
const defaultState = {
message: null
};
// Reducer
export default function reducer(state = defaultState, action) {
switch (action.type) {
case SHOW_MESSAGE:
return... |
(function($) {
var setDataSwitch = {
dragStart: "start.draggable",
drag: "drag.draggable",
dragStop: "stop.draggable",
maxHeight: "maxHeight.resizable",
minHeight: "minHeight.resizable",
maxWidth: "maxWidth.resizable",
minWidth: "minWidth.resizable",
... |
'use strict';
/**
* Controller for SpecificationType
**/
specificationTypeModule.controller('SpecificationTypeCtrl', ['SpecificationType', '$scope', '$routeParams', '$http', '$location', '$cookies', 'MessageHandler', 'restURL', function(SpecificationType, $scope, $routeParams, $http, $location, $cookies, MessageHan... |
//Contents of the file to be obfuscated.
var input = null;
var fields = null;
var file = null;
var piiData = [];
var anonymousData = [];
function loadFile(files) {
if (files.length < 1 && !file) {
alert("Please choose at least one file to parse.");
return
}
//Set accessible variable.
f... |
message = message.concat(from("Seattle State!"));
if(!Console) Console = console;
Console.log(message);
|
import {
defaultAction,
} from '../actions';
import {
DEFAULT_ACTION,
} from '../constants';
describe('PostsPage actions', () => {
describe('Default Action', () => {
it('has a type of DEFAULT_ACTION', () => {
const expected = {
type: DEFAULT_ACTION,
};
expect(defaultAction()).toEqu... |
/**
* Module dependencies.
*/
var net = require('net'),
ajfabriq = require('../../'),
resolver = require('./resolver'),
downloader = require('./downloader'),
harvester = require('./harvester');
var host = ajfabriq.createLocalHost();
/**
* Application configuration.
*/
var app ... |
define(function(require) {
var template = require('text!frontend/templates/perfil.html'),
Usuario = require('frontend/models/Usuario'),
ErrorHelper = require('frontend/helpers/ErrorHelper'),
Publicaciones = require('frontend/collections/Publicaciones'),
PublicacionView = require('frontend/view... |
var classtesting_1_1internal_1_1_castable =
[
[ "Castable", "classtesting_1_1internal_1_1_castable.html#a705d519a227d38ff5c174905316f62c4", null ],
[ "operator Base", "classtesting_1_1internal_1_1_castable.html#ac60b2e7885f3b09defb829eddaa0afd9", null ]
]; |
app.factory('authFactory', ($q, $http) => {
return {
login(user) {
console.log("email", user.email);
console.log("pass", user.password);
return $q.resolve(firebase.auth().signInWithEmailAndPassword(user.email, user.password))
},
getUserId() {
return firebase.auth().curr... |
/* jslint node: true */
/* jshint node: true */
/* eslint no-extra-parens: { "nestedBinaryExpressions": false } */
'use strict';
////////////////////////////////////////////////////////////
//
// Ymd -- Date support for Page-A-Day. Ensures timezone differences don't affect results.
//
// Supports input and output in... |
"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... |
import * as HNservice from './../services/HNservice';
import {
FETCH_HN_SUCCESS,
FETCH_HN_FAILURE,
FETCH_HN_REQUEST,
SHOW_NEXT_PAGE,
SHOW_PREV_PAGE
} from './../constants/ActionTypes';
export const fetchHNSuccess = (hn) => {
return {
type: FETCH_HN_SUCCESS,
items: hn
}
}
export const fetchHNFailure = (er... |
function init() {
var app = angular.module('ClientApp', ['sharedFactories', 'helperDirectives', 'ui.bootstrap-slider', 'ui.bootstrap']);
/**
* The active window.
* Use this to switch between windows.
* See client-switch.html for valid values.
* Event to update this variable: 'activeWindowCh... |
var _ = require("underscore");
var FilmService = function(){
this.getFilm = function(name){
return _.find(this.FilmList, function(item){
return item.name === name;
});
};
this.getFilmList = function(id){
if (id){
var item = _.findWhere(this.FilmList, {id: Number(id)});
if (item) {
return {name:... |
export const images = {
phase1: require('../src/assets/phase1.png'),
phase2: require('../src/assets/phase2.png'),
phase3: require('../src/assets/phase3.png'),
phase4: require('../src/assets/phase4.png'),
phase5: require('../src/assets/phase5.png')
};
|
/**
* ES6 Object.assign shim
* Based on https://github.com/es-shims/es6-shim
*/
(function(){
'use strict';
var isObject = function (obj) {
return obj && typeof obj === 'object';
};
if(!Object.assign) {
Object.defineProperty(Object, 'assign', {
value: function(target, sou... |
/**
* index.js
* @authors Wangmengcn (eclipse_sv@163.com)
* @date 2016-07-15 18:05:51
* @version $Id$
*/
// 连接socket.io服务器
var socket = io.connect('http://localhost:' + 3000);
// 绘制逐时🚀数据
var dom = document.getElementById("piemonitor");
var senderdom = document.getElementById("senderPie");
var recverdom = document.... |
var MainController = app.controller('Preview', ['$scope', function($scope) {
// enter $scope.variables here
$scope.resume = JSON.parse(localStorage.resume);
$scope.getTheme = function() {
if (theme = localStorage.theme) {
console.log(theme + " was used");
return theme;
} else {
... |
var word_cards={
init : function(){
try{
this.drop();
localStorage.myWords="[]";
}
catch(e){
return false;
}
return true;
},
drop : function(){
try{
delete localStorage.myWords;
}catch(e){
return false;
}
return true;
},
add : function(obj){
var my_words=localStorage.getItem("... |
'use strict';
var api = {
req: function(method, url, data, callback) {
if (!callback) {
callback = data;
data = null;
}
$.ajax({
url: url,
data: data,
type: method,
success: function(data) {
callback(null, data);
},
error: function(xhr, status, err... |
'use strict';
var should = require('should');
var uuid = require('node-uuid');
var init = require('./init');
describe('Couchbase CRUD', function () {
var db;
var connector;
var Person;
var persons;
before(function (done) {
init.getDataSource(null, function (err, res) {
if (err) return done(err)... |
/*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2018-01-20T17:24Z
*/
( function( global, factory ) {
"use strict";
if ( t... |
import { ServerConnection, MemoryStore, Log, parseId } from '@logux/core'
import { LoguxNotFoundError } from '@logux/actions'
import { createNanoEvents } from 'nanoevents'
import { promises as fs } from 'fs'
import { fileURLToPath } from 'url'
import { join, dirname } from 'path'
import UrlPattern from 'url-pattern'
im... |
/** @license React vundefined
* react.profiling.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function(){'use strict';(function(c,y){"object"===typeof exports&&"undefine... |
$(document).ready(function() {
$('#media').carousel({
pause: true,
interval: false,
});
});
// // .nav>li:hover>a:after
// $(".nav>li:hover>a").after("<i class='fa fa-chevron-up' aria-hidden='true'></i>");
// $(".nav>li>a").after("<i class='fa fa-chevron-down' aria-hidden='true'></i>");
$(doc... |
import React from 'react';
import { renderToString } from 'react-dom/server';
import dedent from 'dedent';
import App from './App';
export default {
renderApp: ({ SkuProvider }) =>
renderToString(
<SkuProvider>
<App />
</SkuProvider>,
),
renderDocument: ({ app, bodyTags, headTags }) =... |
!function (a, b) {
"function" == typeof define && (define.amd || define.cmd) ? define(function () {
return b(a)
}) : b(a, !0)
}(this, function (a, b) {
function c(b, c, d) {
a.WeixinJSBridge ? WeixinJSBridge.invoke(b, e(c), function (a) {
g(b, a, d)
}) : j(b, d)
}
... |
/*
* grunt-underscore-compiler
*
*
* Copyright (c) 2014 bubkoo
* Licensed under the MIT license.
*/
'use strict';
var _ = require('underscore');
module.exports = function (grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: http://gruntjs.com/creating-tasks
... |
/* global logger */
export default io => {
io.on('connection', socket => {
logger('Socket connection started')
logger(socket.id)
socket.on('newMessage', payload => {
logger('Fire: NEW MESSAGE EVENT')
logger(payload)
socket.broadcast.to(payload._conversat... |
var app = angular.module("relationshipService", []);
/**
* Relationship Service Provider
*/
app.factory('$relationshipService', function($http, config, $authenticationService) {
// Query cache
var cache = {
full_count: 0,
pagination: {
offset: 0,
limit: config.limit
... |
/*!
* pure-form - v@version@
* Pure JS drop in replacement for the HTML FORM using JSON Schemas
* https://github.com/john-doherty/pure-form
* @author John Doherty <www.johndoherty.info>
* @license MIT
*/
(function (base, window, document) {
'use strict';
// check if we're using a touch screen
var is... |
// ==UserScript==
// @name dc4in.com bypass
// @description Bypass the adfly links on dc4in.com
// @namespace hansen-i-nate@gmail.com
// @match http://*.dc4in.com/*
// @match https://*.dc4in.com/*
// @version 1.4
// @grant none
// @license MIT License (Expat); opensource.org/licenses/... |
'use strict'
//Articles service used for communicating with the articles REST endpoints
angular.module('articles').factory('Articles', ['$resource',
function($resource) {
return $resource('articles/:articleId', {
articleId: '@_id'
}, {
update: {
method: 'PUT'
}
})
}
])
|
define([
'./auth.controller',
'./logout-link.directive',
'angular-ui-router',
'@shared/alt-auth'
], function(authController, logoutLinkDirective) {
return {
init: function(module) {
/* @ngInject */
module.config(function($stateProvider) {
$stateProvide... |
require("kaoscript/register");
var Helper = require("@kaoscript/runtime").Helper;
module.exports = function() {
var exec = require("./type.fusion.export.nrt.ks")().exec;
const match = exec();
console.log(match.input);
console.log(Helper.toString(match[0]));
console.log(match[0]);
}; |
/*
* This file is part of the dozoisch/paginator
*
* (C) 2013 Hugo Dozois-Caouette
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @author dozoisch
* @version 1.2.3
* @url github.com/dozoisch/paginator
*
* @param {object... |
'use strict';
//Setting up route
angular.module('pictures').config(['$stateProvider',
function($stateProvider) {
// Pictures state routing
$stateProvider.
state('listPictures', {
url: '/pictures',
templateUrl: 'modules/pictures/views/list-pictures.client.view.html'
}).
state('createPicture', {
url:... |
/**
* window.c.ProjectReminder component
* A component that displays a clickable project reminder element.
* The component can be of two types: a 'link' or a 'button'
*
* Example:
* view: {
* return m.component(c.ProjectReminder, {project: project, type: 'button'})
* }
*/
import m from 'mithril';
import... |
/**
* Module dependencies
*/
var util = require( './util' );
var assert = require( 'assert' );
/**
* site.settings
*/
describe( '[whitelist] wpcom.site.settings', function() {
// Global instances
var wpcom = util.wpcom();
var site = wpcom.site( util.site() );
var settings = site.settings();
var current_settin... |
/**
*
* InitQuizzHeading
*
*/
import React from 'react';
import styles from './styles.css';
function InitQuizzHeading({ validated, vocabs, onResult, onContinue }) {
const resultBtn = validated &&
<input type="button" value="Résultat du Quizz précédent" className={styles.button} onClick={onResult} />;
const ... |
/*
Copyright (c) 2013, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var path = require('path'),
fs = require('fs'),
existsSync = fs.existsSync || path.existsSync,
CAMEL_PATTERN = /([a-z])([A-Z])/g,
YML_PATTERN = /\.ya... |
/* global describe, it, beforeEach */
import chai from 'chai'
import sinon from 'sinon'
import chaiAsPromised from 'chai-as-promised'
import sinonChai from 'sinon-chai'
import mochaSinon from 'mocha-sinon'
import fallbackOnTimeout from '../src/fallback-on-timeout'
chai.use(chaiAsPromised)
chai.use(sinonChai)
mochaSin... |
/**
* Created by g.kosharov on 28.8.2016
*/
import passport from 'passport'
import User from '../models/user'
export function getUser(req, res) {
console.log("User from request: " + JSON.stringify(req.user));
if (req.user && req.user.username) {
User.findOne({username: req.user.username}, (err, dat... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var turnOrder = require('./turn-order-e73db595.js');
var base = require('./base-bdd9c13b.js');
var master = require('./master-da8352aa.js');
var io = _interopDefault(require('socket.io-clie... |
module.exports.safe = true;
/*
Purpose:
Sleeps (delays) for a specified number of milliseconds. This can be used to simulate more realistic
user traffic. Can be combined with the "random" pipe for a non-deterministic pause.
Example:
delay: 500
*/
var _ = require("lodash");
var verror = require("verror");
var P... |
/*
* jsCalendar extension
* DatePicker v1.1.1
*
*
* MIT License
*
* Copyright (c) 2021 Grammatopoulos Athanasios-Vasileios
*
* 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... |
//third step
'use strict';
//guestbooks service used for communicating with the guestbooks REST endpoints
angular.module('guestbooks').factory('Guestbooks', ['$resource',
function($resource) {
return $resource('api/guestbooks/:guestbookId', {
guestbookId: '@_id'
}, {
update: {
method: 'put'
}
});
... |
/*------------------------------------------------------------------------------------------------\
Initialize summary control.
\------------------------------------------------------------------------------------------------*/
export function init(chart) {
//set the initial summary status
chart.co... |
import { ScrollRoute } from 'utils';
import template from '../templates/app';
class AppRoute extends ScrollRoute {
expectedAddresses() {
return [':docs.app'];
}
addressesHandlers() {
return [function(){}];
}
expectedOutlets() {
return ['app'];
}
init() {
thi... |
var dictToParams = function (dict) {
var params = [];
for (var param in dict) {
var key = param;
var value = dict[param];
var pair = key.toString() + '=' + value.toString();
params.push(pair);
}
var paramString = "?" + params.join("&");
return window.encodeURI(paramString);
}
var ajax = function (route,... |
var passport = require('passport');
var BnetStrategy = require('passport-bnet').Strategy;
var BNET_ID = process.env.BNET_ID;
var BNET_SECRET = process.env.BNET_SECRET;
// Use the BnetStrategy within Passport.
passport.use(new BnetStrategy({
clientID: config.bnet.clientID,
clientSecret: config.bnet.clientSecret... |
var primaryDomains = [
"aol.com",
"btinternet.com",
"gmail.com",
"googlemail.com",
"hotmail.co.uk",
"hotmail.com",
"icloud.com",
"live.co.uk",
"live.com",
"me.com",
"msn.com",
"outlook.com",
"yahoo.co.uk",
"yahoo.com"
];
var secondaryDomains = [
"arnet.com.ar",
"att.net",
"bellsouth.n... |
//Problem 6. Point in Circle
//Write an expression that checks if given point P(x, y) is within a circle K({0,0}, 5).
//{0,0} is the centre and 5 is the radius
var x = [0,-5,-4,1.5,-4,100,0,0.2,0.9,2];
var y = [1,0,5,-3,-3.5,-30,0,-0.8,-4.93,2.655];
var radius = 5;
var inside;
console.log('Is in circle(radius=5, cent... |
export { default } from 'ae-select/components/ae-select'; |
import person from "../person.json";
import express from "express";
const app = express();
app.set("port", (process.env.PORT || 5000));
app.get("", function(request, response, next) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
});
app.get("/people", fu... |
const BaseElementCommand = require('./_baseElementCommand.js');
/**
* Simulates a context-click(right click) event on the given DOM element. The element is scrolled into view if it is not already pointer-interactable. See the WebDriver specification for element [interactability](https://www.w3.org/TR/webdriver/#eleme... |
module.exports = function drop (a, b) {
a.forEach(x =>
b.forEach(y => {
if (x === y) {
a[a.indexOf(x)] = null
}
})
)
return a.filter(x => {
if (x === 0) {
return true
} else {
return x
}
})
}
|
import bodyParser from 'body-parser'
import express from 'express'
import User from '../db/schema/User'
export default express()
.use(bodyParser.json()) // Parses application/json
.use(bodyParser.urlencoded({ extended: true })) // Parses application/x-www-form-encoded
.get('/:id/profile',... |
import { timer, now } from "d3-timer";
export default class Timer {
constructor() {
this.shouldAnimate = true;
this.subscribers = [];
this.loop = this.loop.bind(this);
this.timer = timer(this.loop);
}
bypassAnimation() {
this.shouldAnimate = false;
}
resumeAnimation() {
this.shouldA... |
/*!
* DevExtreme (dx.messages.sl.js)
* Version: 20.2.9 (build 21259-1136)
* Build date: Thu Sep 16 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
"use strict";
! function(root, factory) {
if ("function" ... |
(function (app) {
'use strict';
app.registerModule('curriculums');
app.registerModule('curriculums.admin');
app.registerModule('curriculums.admin.routes', ['ui.router', 'core.routes', 'curriculums.admin.services']);
app.registerModule('curriculums.admin.services');
app.registerModule('curriculums.services'... |
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Readable$" }] */
'use strict';
const EventEmitter = require('events');
const https = require('https');
const http = require('http');
const net = require('net');
const tls = require('tls');
const { randomBytes, createHash } = require('crypto');
const { Reada... |
(function () {
'use strict';
angular
.module('customers.admin.routes')
.config(routeConfig);
routeConfig.$inject = ['$stateProvider'];
function routeConfig($stateProvider) {
$stateProvider
.state('admin.customers', {
abstract: true,
url: '/customers',
template: '<ui... |
/* */
"format cjs";
(function(process) {
!function(b, c, a) {
"use strict";
!function(b) {
function __webpack_require__(c) {
if (a[c])
return a[c].exports;
var d = a[c] = {
exports: {},
id: c,
loaded: !1
};
return b[c].call(d.expor... |
var devConfig = require('./webpack.config.js');
var strip = require('strip-loader');
var stripLoader = {
test: [/\.jsx?$/, /\.es6$/],
exclude: '/node_modules/',
// strips out specific code snippets
loader: strip.loader('console.log')
};
devConfig.module.loaders.push(stripLoader);
module.exports = devConfig; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.