text stringlengths 2 1.05M |
|---|
module.exports = require('prop-types');
|
export const headers = {
Accept: 'text/plain',
};
const errorElem = document.querySelector('.error');
const clearError = () => {
errorElem.textContent = '';
};
export function fetchThen(resp) {
if (resp.ok) {
clearError();
} else {
console.error('fetch request failed: ', resp);
errorElem.textContent = `A ... |
import _account from './account.svg';
import _angleBottom from './angle-bottom.svg';
import _angleDown from './angle-down.svg';
import _angleEnd from './angle-end.svg';
import _angleLeft from './angle-left.svg';
import _angleRight from './angle-right.svg';
import _angleStart from './angle-start.svg';
import _angleTop f... |
import Highlighter from "../../components/highlighter";
const exampleRequest = `
GET https://api.vatcomply.com/currencies HTTP/1.1
`.trim();
const exampleResponse = `
{
"EUR": {
"name": "Euro",
"symbol": "€"
},
"USD": {
"name": "US Dollar",
"symbol": "$"
},
"JPY": {
"name": "Japanese Yen... |
const connection = require('../models');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const passport = require('passport');
const LocalStrategy = require('passport-local').Strategy;
const register = async (req, res)=>{
const saltRounds = 10;
const salt = bcrypt.genSaltSy... |
var gulp = require( 'gulp' ),
minifycss = require( 'gulp-minify-css' ),
sass = require( 'gulp-sass' ),
imagemin = require( 'gulp-imagemin' ),
uglify = require( 'gulp-uglify' ),
minifyHTML = require( 'gulp-minify-html' ),
rename = require( 'gulp-rename' ),
notify = require( 'gulp-notify... |
macDetailCallback("78c95e000000/24",[{"d":"2020-08-27","t":"add","s":"ieee-oui.csv","a":"2600 Millercreek Rd Traverse City MI US 49684","c":"US","o":"Midmark RTLS"}]);
|
const { encode, decode, extract } = require('./data.js');
const { push, replace } = require('./forward.js');
const pop = require('./pop.js');
const relaunch = require('./relaunch.js');
const init = require('./init.js');
module.exports = {
encode,
decode,
extract,
push,
replace,
pop,
relaunch,
init,
};
|
const express = require("express");
const router = express.Router();
const Admin = require("../models/Admin");
const { setToken } = require("../utilities/jwtHelpers");
const { authAdmin } = require("../utilities/routeAuth");
/**
* Register new admin
* @route POST api/admin
*/
router.post("/", async (req, res) => {... |
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
... |
// Increase timeout since e2e tests take longer
jest.setTimeout(30000);
describe('index.js', () => {
beforeAll(async () => {
await page.goto('http://localhost:3000');
});
it('renders /', async () => {
await expect(page).toMatch('Hello World!');
});
});
|
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
'use st... |
import * as React from 'react';
import { Spinner } from 'office-ui-fabric-react/lib/Spinner';
import { Stack } from 'office-ui-fabric-react/lib/Stack';
import { Label } from 'office-ui-fabric-react/lib/Label';
export var SpinnerLabeledExample = function () {
return (React.createElement(Stack, { gap: 20, maxWidth: 2... |
import React, { PureComponent } from "react";
import classNames from "classnames";
import PropTypes from "prop-types";
import Check from "./check";
import X from "./x";
import { pointerCoord } from "./util";
export class Toggle extends PureComponent {
constructor(props) {
super(props);
this.handleClick = this... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// ***************************************************************
// - [#] indicates a test step (e.g. # Go to a page)
// - [*] indicates an assertion (e.g. * Check the title)
// - Use element ID when selec... |
import {requestAnimationFrame, cancelAnimationFrame} from 'base/utils'
import Playback from 'base/playback'
import template from 'base/template'
import Styler from 'base/styler'
import Events from 'base/events'
import noOpStyle from './public/style.scss'
import noOpHTML from './public/error.html'
export default class ... |
'use strict';
const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const roles = require('../../docs/roles.json');
const schema = mongoose.Schema({
username: { type: 'String', required: true, unique: true },
password: { type: 'String', required: true },
em... |
import Head from 'next/head';
import { useRouter } from 'next/router';
import { Box, Container, Grid, Typography } from '@mui/material';
import { AccountProfile } from '../components/account/account-profile';
import {UserReports} from "../components/reports/user-reports"
import { DashboardLayout } from '../components/d... |
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... |
load("jstests/replsets/rslib.js");
var NODE_COUNT = 2;
/**
* Prepare to call testReadPreference() or assertFailure().
*/
var setUp = function() {
var configDB = st.s.getDB('config');
configDB.adminCommand({enableSharding: 'test'});
configDB.adminCommand({shardCollection: 'test.user', key: {x: 1}});
... |
import interval from "./interval";
import {durationMinute} from "./duration";
var utcMinute = interval(function(date) {
date.setUTCSeconds(0, 0);
}, function(date, step) {
date.setTime(+date + step * durationMinute);
}, function(start, end) {
return (end - start) / durationMinute;
}, function(date) {
return da... |
//
// Scripts
//
/* --------------------------------------------------------------------------------------
* Name : Wicodus - HTML Template
* File : scripts.js
* Author : ScanThemes
* Author URI : scanthemes@gmail.com
*
* All Rights Reserved.
* --------------------------------... |
import FileSystemUtilities from "./FileSystemUtilities";
import PackageUtilities from "./PackageUtilities";
import ExitHandler from "./ExitHandler";
import progressBar from "./progressBar";
import Repository from "./Repository";
import logger from "./logger";
const DEFAULT_CONCURRENCY = 4;
export default class Comman... |
import { renderDefault } from './TabFocusTrap.int.render'
describe('<TabFocusTrap />', () => {
describe('Snaphot', () => {
test('must match renderDefault()', () => {
expect(global.renderToJSON(renderDefault())).toMatchSnapshot()
})
})
})
|
var test = require('tap').test
var run = require('../index').run
var getCommand = require('../index').getCommand
var execCommand = require('../index').execCommand
test('empty flags - default port', function (t) {
var testCommand = getCommand('php-dir', '8000')
t.is(typeof testCommand, 'string')
t.is(testComman... |
import CharacterPlatform from './CharacterPlatform';
import {fetchDataFromURLS} from '../helper/APIManipulation';
const DetailsPlatform = ({item, closeHandler, updateExposedData}) => {
const exposeComplexProp = (propName, validateValue) => {
fetchDataFromURLS(validateValue.split(','))
.then(re... |
import { parse } from './parse'
//TO-DO : DRY , mathematical functions
export const calculate = (inputValue, btc, mode) => {
const values = {
amount: parse(inputValue.coinAmount.value),
buy: parse(inputValue.buyValue.value),
sell: parse(inputValue.sellValue.value),
buyFee: parse(inputValue.buyFee.valu... |
const express = require('express');
const bodyParser = require('body-parser');
const fs = require('fs');
const app = express();
const mongoose = require('mongoose');
const appConfig = require('./config/appConfig');
const socketLib = require('./app/libs/socketLib');
mongoose.set('useCreateIndex', true);
app.use(bodyPar... |
import routes from "../../routes";
const fetchProducts = async (categoryNumber, pageNum) => {
try {
return await fetch(
// `http://localhost:5000/api/products/${this.categoryNumber}/${pagenum}`
`${routes.URL}/${routes.API_PRODUCTS}/${categoryNumber}/${pageNum}`
)
.then(res => res.json())
... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
// const db = require('../models');
let workouts = [];
let exercises = [];
let myChart;
function populateChart() {
const reversed = workouts.slice().reverse();
const reversedExercises = exercises.slice().reverse();
let sum = 0;
const labels = reversed.map((t) => {
const date = new Date(t.date);
retur... |
import instance from '@/api/index.js'
const urlPrefix = '/v1/'
export default {
ciList (params) {
return instance({
method: 'get',
url: `${urlPrefix}cidata/`,
params: params
})
},
getCiById(id){
return instance({
method: 'get',
url: `${urlPrefix}cidata/description/${id}`,... |
/*
* Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
// @flow
import Issue from '../models/issue';
import User from '../models/user';
import Label from '../models/label';
import { GitHubClientInterface, type GitHubClientResponse } from '../lib/github_client';
type Props = {|
client: GitHubClientInterface,
|};
export default class IssueStore {
client: GitHubClient... |
import React from 'react';
import { observer } from 'mobx-react-lite';
import { NumberField, Form, SelectBox, TextArea, TextField, Password } from 'choerodon-ui/pro';
import { Modal } from 'choerodon-ui';
const { Option } = SelectBox;
const { Sidebar } = Modal;
export default observer(({ dataSet, onOk, onCancel }) => ... |
/**
* User: Alex Goldring
* Date: 8/4/2014
* Time: 20:52
*/
/**
*
* @param {function|function[]} [options]
* @constructor
*/
function Script(options) {
if (options instanceof Array) {
this.scripts = options;
} else if (typeof options === "function") {
this.scripts = [options];
} el... |
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2016, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version ... |
import React, { useContext, useEffect } from 'react';
import Headroom from 'react-headroom';
import { Link } from 'gatsby';
import classNames from 'classnames';
import logo from '../../../static/logos/pn-logo-48.png';
import MobileNavLinks from '../MobileNavLinks/MobileNavLinks';
import MobileNavContext from '../../con... |
//Logout Routes
const express = require( 'express');
const router = express.Router( );
const db = require(__dirname + '/../modules/database');
// GET
router.get('/logout', (request, response) =>{
request.session.destroy( (error) => {
if(error) {
throw error
}
response.redirect('/login');
})
})
module.... |
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
const { handle } = wasm_bindgen;
const instance = wasm_bindgen(wasm);
/**
* Fetch and log a request
* @param {Request} request
*/
async function handleRequest(request) {
await instance;
return await handle(KV_FROM_RUST, ... |
/*
* Copyright (c) 2006-2007 Erin Catto http:
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose,
* includin... |
/**
* Given matrix, a rectangular matrix of integers,
* just add up all the values that don't appear below a "0".
*
* @param {Array<Array>} matrix
* @return {Number}
*
* @example
* matrix = [
* [0, 1, 1, 2],
* [0, 5, 0, 0],
* [2, 0, 3, 3]
* ]
*
* The result should be 9
*/
function getMatrixElementsSum... |
#!/usr/bin/env node
/**
* Module dependencies
*/
var tradedoubler = require('./')
, nomnom = require('nomnom');
var opts = nomnom
.script('tradedoubler-lookup')
.nocolors()
.option('id', {
abbr: 'i',
required: true,
help: 'Tradedoubler api token'
})
.option('keywords', {
abbr: 'k',
r... |
import React, { useState, useEffect, useMemo } from 'react';
import { useDispatch } from 'react-redux';
import { Link } from 'react-router-dom';
import { addMonths, format } from 'date-fns';
import pt from 'date-fns/locale/en-US';
import { Form, Input } from '@rocketseat/unform';
import ReactSelect from '../Rea... |
/*
Author: Jeremy Espinosa
File Name: requestData.js
Description:
1. Requesting the data to the backend (PHP) and retrieve the converted data into json
2. Passing the data to the Handlebar Template
3. Then initialize the callback function most of it are initialization of functions / pl... |
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distribu... |
var _ = require('underscore'),
fs = require('fs-extra'),
glob = require('glob'),
path = require('path'),
yaml = require('js-yaml');
// Please see the Grunt documentation for more information regarding task
// creation: http://gruntjs.com/creating-tasks
module.exports = function(grunt) {
var root = p... |
import angular from 'angular';
import IconNG from '../icon-ng/icon-ng';
import '../error-message-ng/error-message-ng.scss';
/**
* @name Error Message Ng
* @category Legacy Angular
* @description Displays an error message.
* @example
<example name="Error Message Ng">
<file name="index.html" disable-auto-siz... |
var searchData=
[
['r',['r',['../structmpcdi_1_1_n_o_d_e.html#ae38b650a5d7fb7a8bc1318148e3f80ec',1,'mpcdi::NODE']]],
['read',['Read',['../classmpcdi_1_1_pfm_i_o.html#a2a1e7120cfbd2594e0adf867c11de970',1,'mpcdi::PfmIO::Read(std::string fileName, mpcdi::PFM *&pfm)'],['../classmpcdi_1_1_pfm_i_o.html#af694b93cc37e6... |
// install : cordova plugin add de.appplant.cordova.plugin.printer
// link : https://github.com/katzer/cordova-plugin-printer
angular.module('ngCordova.plugins.printer', [])
.factory('$cordovaPrinter', ['$q', function ($q) {
return {
isAvailable: function () {
var d = $q.defer();
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _Flex = _interopRequireDefault(require("../Flex"));
function _interopRequireDefault(... |
// eslint-disable-next-line
import { UserLayout, BasicLayout, PageView, BlankLayout } from '@/layouts'
// market 市场管理,暂时去掉
import { index, account, set, application, code, robot, order } from '@/core/icons'
const RouteView = {
name: 'RouteView',
render: (h) => h('router-view')
}
export const asyncRouterMap = [
... |
var NAVTREEINDEX9 =
{
"a00170.html#a04f5873776c784cafd55b4ac05b4b757":[3,0,1,185,4],
"a00170.html#a2743c4c486e80127e8eca591ee3ffbed":[3,0,1,185,1],
"a00170.html#a35453b054509f5679a29a06b59340cf1":[3,0,1,185,5],
"a00170.html#a3b3777f359b34892f33784d73cb62234":[3,0,1,185,3],
"a00170.html#a4d27f5d0beaa35e1e4a5f0ef8974c5a6... |
// @flow
import * as React from 'react'
import {NoticeView} from './notice'
export default function LoadingView({text = 'Loading…'}: {text?: string}) {
return <NoticeView spinner={true} text={text} />
}
|
const ringA4C4 = [3,7,10,14,18,21,25,28,32,36,39,43,46,50,54,57,61,64,68,72,75,79,82,86,90,93,97,100,104,108,111,115,118,122,126,129,133,136,140,144,147,151,154,158,162,165,169,173,176,180,183,187,191,194,198,201,205,209,212,216,219,223,227,230,234,237,241,245,248,252,255,259,263,266,270,273,277,281,284,288,291,295,299... |
/*
Copyright 2019 XbyOrange
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/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distribut... |
import {normalizeToRangeMaxInclusive} from 'utils/normalize';
import {PI, NEGATIVE_PI, DEGREES_PER_RADIAN} from 'utils/constants';
export function degreesToRadians(degrees) {
return degrees / DEGREES_PER_RADIAN;
}
export function radiansToDegrees(radians) {
return radians * DEGREES_PER_RADIAN;
}
/* Takes an ... |
(this.webpackJsonpfrontend=this.webpackJsonpfrontend||[]).push([[0],{20:function(e,t,s){"use strict";s.r(t),t.default=s.p+"static/media/HanaSong.8d3adcd4.mp3"},21:function(e,t,s){"use strict";s.r(t),t.default=s.p+"static/media/HanaSongOgg.f36fdb62.ogg"},22:function(e,t,s){"use strict";s.r(t),t.default=s.p+"static/media... |
/**
* 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.
*
* @generated SignedSource<<245720bff73f3e2e779d093660d18a9c>>
* @flow
* @lightSyntaxTransform
* @nogrep
*/
/* eslint-disabl... |
;
(function() {
window.require(["ace/snippets/d"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();
... |
/*
YUI 3.12.0 (build 8655935)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('dd-drop', function (Y, NAME) {
/**
* Provides the ability to create a Drop Target.
* @module dd
* @submodule dd-drop
*/
/**
* Provi... |
var Blockly = {}; Blockly.Msg={}; module.exports = function(){ // This file was automatically generated. Do not modify.
'use strict';
Blockly.Msg["ADD_COMMENT"] = "コメントを追加";
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "変数 '%1' は関数 '%2' の定義の一部であるため、削除できません";
Blockly.Msg["CHANGE_VALUE_TITLE"] = "値を変える:";
Bl... |
// grunt-protoc
// ==========
// * GitHub: https://github.com/chobie/grunt-protoc
// * Copyright (c) 2014 Shuhei Tanuma
// * Licensed under the MIT license.
module.exports = function (grunt) {
var proc = require('child_process')
, _ = grunt.util._
, f = require('util').format
, log = grunt.... |
// Require modules
const express = require('express')
const router = express.Router()
const db = require(__dirname + '/../modules/db')
const helper = require(__dirname + '/../modules/helpers')
// Route for create new post
router.route('/newpost')
.get( (req, res) => {
// Check if user is logged in
if ( signed... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _createIcon = require('./util/createIcon');
var _createIcon2 = _interopRequireDefault(_createIcon);
function _interopRequireDefault(obj) { return obj && o... |
const jwt = require("jsonwebtoken");
const issue = ({ payload, expiresIn }) => {
const token = jwt.sign(payload, process.env.JWT_SECRET, {
expiresIn: expiresIn,
});
return token;
};
module.exports = {
issue,
};
|
/* eslint-disable */
/* tslint:disable */
import PropTypes from 'prop-types';
import React from 'react';
const Recurring = ({size, ...props}) => (
<svg viewBox="0 0 20 20" fill="currentColor" width={ size || "20" } height={ size || "20" } {...props}>
<path d="M16.1935 2C16.6211 2 16.9677 2.34662 16.9677 2.77419V5... |
// Gruntfile.js
// our wrapper function (required by grunt and its plugins)
// all configuration goes inside this function
module.exports = function(grunt) {
// ===========================================================================
// CONFIGURE GRUNT ==========================================================... |
const URL = require("./url.js");
const io = require("io-promise");
const path = require("path");
const config = require ('../config.js');
let References = {};
const refsets = { normative: [], informative: [] };
// load the white list
let WHITELIST = [];
io.read(path.resolve(config.basedir, "url-whitelist.txt")).t... |
"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... |
const { assert } = require('chai')
const _Promise = require('../promise.js').default
describe('Promise.race', () => {
it('Throw TypeError when not passing paramter', (done) => {
_Promise.race().catch((e) => {
assert.instanceOf(e, TypeError)
done()
})
})
it('Always pending when passing empty ... |
const mongoose = require('mongoose');
const friendSchema = new mongoose.Schema({
firstName: String,
lastName: String,
gender: String,
language: String,
email: String,
age: Number,
contacts: [{firstName: String, lastName: String}]
});
export default mongoose.model('Friend', friendSchema);
|
import React, { PropTypes } from 'react';
import { Link, IndexLink, browserHistory } from 'react-router';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as navbarActions from '../../actions/navbarActions';
import MenuItem from 'material-ui/MenuItem';
import Drawer from 'mate... |
// key: blockHeight, value: native token transfers
const transfersMap = {};
function addTransfer(height, transfer) {
if (!transfersMap[height]) {
transfersMap[height] = [transfer];
} else {
transfersMap[height].push(transfer);
}
}
function addTransfers(height, transfers = []) {
if (!transfersMap[heigh... |
/*!
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.6
*/
goog.provide('ngmaterial.components.gridList');
goog.require('ngmaterial.core');
/**
* @ngdoc module
* @name material.components.gridList
*/
GridListController['$inject'] = ["$mdUtil"];
GridLayoutFactory['$inject'] ... |
#!/usr/bin/env node
"use strict";
module.exports = function () {
return "$themes: (\n dark: (\n bgColorTheme: #000000\n ),\n light: (\n bgColorTheme: #ffffff\n ) \n);";
};
|
/**
* 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.
*
* @format
* @flow strict-local
* @emails oncall+draft_js
*/
'use strict';
const onBeforeInput = require('editOnBeforeInput');
... |
const express = require('express');
const path = require('path');
const app = express();
const port = process.env.PORT || 8080;
// sendFile will go here
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, '/index.html'));
});
app.listen(port);
console.log('Server started at http://localhost:' +... |
export default class Emitter {
constructor() {
this.listeners = {};
this.allListeners = [];
}
fire(name) {
var i;
for (i = 0; i < this.allListeners.length; i++) {
this.allListeners[i](...arguments);
}
if (!(name in this.listeners)) return;
... |
var $ = require('jquery')
function GetMovies($ct) {
this.$ct = $ct
this.start = 0
this.$icon = $ct.siblings('.update-icon')
this.canGetMovies = true
// 对于搜索区域要绑定事件
if ($ct.parent().hasClass('search')) {
var $search_bar = this.$search_bar = $ct.siblings('.search-bar')
this.$input = $search_bar.chil... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvg... |
import React from 'react'
import PropTypes from 'prop-types'
import exact from 'prop-types-exact'
class Button extends React.Component {
render() {
const type = this.props.type || 'button'
return (
<button type={type} title={this.props.tooltip} className={this.props.className} onClick=... |
// test derivative
import assert from 'assert'
import math from '../../../src/bundleAny'
const OperatorNode = math.OperatorNode
const ConstantNode = math.ConstantNode
const SymbolNode = math.SymbolNode
const derivative = math.derivative
describe('derivative', function () {
function derivativeWithoutSimplify (expr, ... |
//
// 3: [ ]-----[ ]--------- NIL
// 2: [ ]-----[ ]-----[ ]- NIL
// 1: [ ]-----[ ]-[ ]-[ ]- NIL
// Level 0: [ ]-[ ]-[ ]-[ ]-[ ]- NIL
// [#] [#] [#] [#] [#]
// |
// + content (object)
// + distance (number)
// + links (array)
//
import as... |
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var port = process.env.PORT || 3001;
http.listen(port, function()
{
console.log('Listening on: ' + port);
});
io.on("connection", function(socket)
{
// --------------- TEMPORARY INITCONNECT IMPLEMENTAT... |
module.exports = class CallCustomParam {
constructor(paramName,paramValue,isUpdated){
this.Name=""
this.Value =""
this.IsUpdated=true
if(paramName.constructor.name=="Object" && paramName.Name&& paramName.Name.length>0 ){
this.Name=paramName.Name
this.SetParamV... |
import React from 'react'
import { graphql } from 'gatsby'
import Layout from '../components/layout'
import SEO from '../components/seo'
import Img from "gatsby-image"
import { Box, Flex } from 'rebass'
import Section from '../components/section'
import Topic from '../components/topic'
import Card from '../components/c... |
// Get the image and insert it inside the modal - use its "alt" text as a caption
var imageViewer_modal = $('.imageViewer-modal');
var img = document.getElementById("myImg");
var modalImg = $("#imageViewer-img");
var captionText = document.getElementById("imageViewer-caption");
// Get the <span> element that closes th... |
({
handleEventinCustomNamespaceWithGlobalAccess : function(cmp, event) {
cmp.set("v.message1",event.getParam("message"));
},
handleEventinInternalNamespaceWithGlobalAccess : function(cmp, event) {
cmp.set("v.message2",event.getParam("message"));
},
handleEventinOtherCustomN... |
import React, { Component } from 'react';
import Button from '../../components/button';
class HomeScreen extends Component {
render() {
return (
<div className="homeScreen">
<Button />
</div>
);
}
} |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Notes = undefined;
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = require('babel-runtime/helpers/classCallChe... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.10/esri/copyright.txt for details.
//>>built
define(["require","exports","../lib/DefaultVertexAttributeLocations","./sources/resolver"],function(d,a,c,b){Object.defineProperty(a,"__esModule",{value:!0});a.col... |
import React from 'react'
import { Table, TableHead, TableRow, TableCell, makeStyles } from '@material-ui/core'
const useStyles = makeStyles(theme => ({
table: {
marginTop: theme.spacing(3),
'& thead th': {
width: 'auto',
fontWeight: '600',
color: 'white',
... |
'use strict';
module.exports = {
'name': 'bitXor',
'category': 'Bitwise',
'syntax': ['bitXor(x, y)'],
'description': 'Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first b... |
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const t="SweetAlert2:",y=e=>e.charAt(0).toUpperCase()+e.slice(1),i=e=>Array.prototype.slice.call(e),a=e=>{console.warn("".conca... |
var spawn = require('child_process').spawn;
// Child will use parent's stdios
spawn('ls', [], { stdio: 'inherit' });
// Spawn child sharing only stderr
spawn('ls', [], { stdio: ['pipe', 'pipe', process.stderr] });
// Open an extra fd=4, to interact with programs present a
// startd-style interface.
spawn('ls', [], {... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","sr",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Опште",items:[{name:... |
/*
* Copyright (c) 2013-2015 node-coap contributors.
*
* node-coap is licensed under an MIT +no-false-attribs license.
* All rights not explicitly granted in the MIT license are reserved.
* See the included LICENSE file for more details.
*/
var coap = require('../')
, parse = require('coap-packet').pa... |
// ------- Imports -------------------------------------------------------------
import logger from 'winston';
// ------- Internal imports ----------------------------------------------------
import { Incident } from '../models/Incident';
// ------- IncidentsService -------------------------------------------------... |
export class Clerk {
constructor(credit = 100, transactions) {
this._credit = credit;
this._transactions = transactions;
}
calculateBalance() {
let balance = 0;
this._transactions.getAll().forEach(transaction => {
switch (transaction.type) {
case 'deposit':
balance += trans... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.