text stringlengths 3 1.05M |
|---|
import express from "express";
import compression from "compression";
import helmet from "helmet";
import favicon from "serve-favicon";
import logger from "morgan";
import dotenv from "dotenv";
import renderPage from "./renderPage";
var https = require('https')
// Load environment variables from .env file
dotenv.confi... |
/**
* GitHub v3 REST API
* GitHub's v3 REST API.
*
* The version of the OpenAPI document: 0.0.5
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
... |
import React from 'react'
import bg from "./bg.jpg"
const Home = () => {
return (
<div>
{
!localStorage.getItem("jtoken") ?
window.location.href = "/login" : null
}
<div
style={{
backgroundImage: `li... |
define("maq-metadata-dojo/dojox/mobile/TabBarButtonHelper", [
"dojo/query"
], function(query) {
var TabBarButtonHelper = function() {};
TabBarButtonHelper.prototype = {
create: function(widget, srcElement){
// Fix for #705.
// The TabBarButton widget's startup logic registers an onclick
// handler on one of ... |
/* Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */
!function(e){var t=function(){};e.extend(t.prototype,{name:"autosuggest",options:{prefill:"",allowDuplicates:true,inputName:"term[]",resultsHighlight:true,addButtonText:"Add"},initialize:function(t,i){this.options=e.extend({},this.options,... |
import mohawk
from django.conf import settings
from django.urls import reverse
from django.test import override_settings
from rest_framework import status
from urllib import parse
from api.cases.enums import CaseTypeEnum
from api.cases.models import CaseType
from api.core.requests import get_hawk_sender
from api.lice... |
import React, { Component } from 'react';
import microsoft from '../../images/microsoft.png';
import uss from '../../images/uss.png';
import pageload from '../../images/pageload.png';
import mediastream from '../../images/mediastream.png';
import frontendmasters from '../../images/frontendmasters.png';
import codescho... |
require('dotenv').config();
const jwt = require('jsonwebtoken');
const privateKey = process.env.PK;
module.exports = async (req, res, next) => {
const token = req.get('Authorization');
if (!token) {
req.isAuth = false;
return next();
}
let decodedToken;
try {
decodedToken = await jwt.verify(toke... |
var M1 = eval("module M { } M");
var M2 = eval("module M { } M");
assertEq(M1 === M2, false);
|
// @flow
import DOM from '../../util/dom';
import { bezier, bindAll } from '../../util/util';
import window from '../../util/window';
import browser from '../../util/browser';
import { Event } from '../../util/evented';
import assert from 'assert';
import type Map from '../map';
import type Point from '@mapbox/point... |
export { default as EffectiveOriginExt } from "./EffectiveOriginExt.js"
export { default as EffectivePosExt } from "./EffectivePosExt.js"
|
"""Test for the MNE BIDS updating of BIDS datasets."""
# Authors: Adam Li <adam2392@gmail.com>
#
# License: BSD-3-Clause
import json
import os.path as op
from pathlib import Path
import pytest
import numpy as np
import mne
from mne.io.constants import FIFF
from mne.datasets import testing
from mne.utils import requir... |
/*
* This file is part of the nivo project.
*
* Copyright 2016-present, Raphaël Benitte.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React, { useRef, useEffect } from 'react'
import { withContainer, useDimensions, useThe... |
# ##
# Copyright 2016-2021 Hewlett Packard Enterprise, Inc. All rights reserved.
#
# 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 req... |
import handler from './libs/handler-lib';
import dynamoDb from './libs/dynamodb-lib';
export const main = handler(async (event, context) => {
const params = {
TableName: process.env.tableName,
KeyConditionExpression: 'score > 0',
};
const result = await dynamoDb.scan(params);
// Return the matching l... |
// 代入演算子
let i = 0;
// 算術演算
i = 10 + 3; // → 13
i = 10 - 3; // → 7
i = 10 * 3; // → 30
i = 10 / 3; // → 3.3333333333333335
i = 10 % 3; // → 1
i = 10 ** 3; // → 1000
// 代入+算術演算
console.log(i); // → 1000
i += 3; // → 1003
i -= 3; // → 1000
i *= 3; // → 3000
i /= 3; ... |
const info = () => 'Welcome to Golb API.';
const findMany = async (
where,
{ skip, take, orderBy },
schemaContext,
collectionName
) => {
const collection = await schemaContext.findMany({
where,
skip,
take,
orderBy,
});
const count = await schemaContext.count({ where });
let res = {};
... |
var table = $('.table').DataTable({
dom: 'Bfrtip',
responsive: true,
"aaSorting": [],
/* "columnDefs": [
{"orderable": false, "targets": 0}
],*/
/* "columnDefs": [
{
"targets": [ 1,2,3 ],
"visible": false,
"searchable": true
... |
/**
* Auto-generated action file for "Vimeo" API.
*
* Generated at: 2019-05-07T14:44:41.143Z
* Mass generator version: 1.1.0
*
* flowground :- Telekom iPaaS / vimeo-com-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector are licensed under the Apa... |
macDetailCallback("00d00d000000/24",[{"d":"2000-09-08","t":"add","a":"CORPORATION\nONE MICROMEERITICS DRIVE\nNORCROSS GA 30093-1877\n","c":"UNITED STATES","o":"MICROMERITICS INSTRUMENT"},{"d":"2001-10-24","t":"change","a":"CORPORATION\nONE MICROMEERITICS DRIVE\nNORCROSS GA 30093-1877\n","c":"UNITED STATES","o":"MICRO... |
r"""Importing this file must **not** initialize CUDA context. test_distributed
relies on this assumption to properly run. This means that when this is imported
no CUDA calls shall be made, including torch.cuda.device_count(), etc.
torch.testing._internal.common_cuda.py can freely initialize CUDA context when imported.... |
jQuery(document).ready(function() {
jQuery('.tabs .tab-links a').on('click', function(e) {
var currentAttrValue = jQuery(this).attr('href');
// Show/Hide Tabs
jQuery('.tabs ' + currentAttrValue).show().siblings().hide();
// Change/remove current tab to active
jQuery(this... |
/**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* This file was added automatically by CKEditor builder.
* You may re-use it at any time to build CKEditor again.
*
* If you would like to build CKEdi... |
import math
import numpy
def prune_nodes(points, cells):
# Only points/cells that actually used
uvertices, uidx = numpy.unique(cells, return_inverse=True)
cells = uidx.reshape(cells.shape)
points = points[uvertices]
return points, cells
def get_triangle_volumes(pts, cells):
# Works in any d... |
from builtins import str
from builtins import range
import fixtures
from vnc_api.vnc_api import *
from tcutils.util import retry, get_random_name
from time import sleep
from tcutils.services import get_status
from vm_test import VMFixture
from svc_hc_fixture import HealthCheckFixture
try:
from webui_test import *
e... |
//@ts-check
import WhereClause from "../whereclause/WhereClause";
import OrderbyTypes from "./OrderbyTypes";
import Querylang07CommandCreator from "./Querylang07CommandCreator";
import { createOrGetSheet, getHeaderValues } from "../spreadsheetUtils";
import { createColumnProfilesFromNames } from "../columns";
import _ ... |
import React from 'react';
import styled from 'styled-components';
const ResultCount = styled.div`
background-color: rgba(217, 217, 217, 0.5);
.openSans {
font-family: 'Open Sans', sans-serif;
}
.fs-16 {
font-size: 16px;
}
.lh-40 {
line-height: 40px;
}
.fw-bold {
font-weight: bold;
}
.innerWrap... |
const qs = require('querystring')
const RuleSet = require('webpack/lib/RuleSet')
const id = 'vue-loader-plugin'
const NS = 'vue-loader'
class VueLoaderPlugin {
apply (compiler) {
// add NS marker so that the loader can detect and report missing plugin
if (compiler.hooks) {
// webpack 4
compiler.... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... |
import warnings
from itertools import product
import numpy as np
from ._c99_config import _have_c99_complex
from ._extensions._dwt import idwt_single
from ._extensions._swt import swt_max_level, swt as _swt, swt_axis as _swt_axis
from ._extensions._pywt import Wavelet, Modes, _check_dtype
from ._multidim import idwt2... |
import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:preprint', 'Unit | Adapter | preprint', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
let adapter = this.subject();
asse... |
import React from "react"
export default ({ width = 102, height = 28 }) => (
<svg
width={width}
height={height}
viewBox="0 0 147 40"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<radialGradient
id="a"
cy="0%"
r="100.11%"
gradientTransform="matrix(0 .9989 -1.152 0... |
const AbilityDsl = require('../../abilitydsl');
const DrawCard = require('../../drawcard.js');
class ShapeTheFlesh extends DrawCard {
setupCardAbilities() {
this.whileAttached({
effect: [
AbilityDsl.effects.cardCannot('honor'),
AbilityDsl.effects.addKeyword('cove... |
#: Use "yield from" instead of yield inside of a for loop
# yield-from
seq = range(10)
for x in seq:
yield x
# ==>
seq = range(10)
yield from seq
|
import fs from 'fs-extra';
import loaderUtils from 'loader-utils';
import generateLoaderContent from '../generateLoaderContent';
import isLocaleFile, { localeFilter } from '../isLocaleFile';
import isLoaderFile, { noChunks } from '../isLoaderFile';
module.exports = function localeLoader(content) {
const callback = t... |
d2hStoreMenuItems("TX__2446", [["Documents/expertise.htm", "right", "Expertise"],["Documents/expertise1.htm", "right", "Expertise"]]); |
#!/usr/bin/env node
"use strict";
process.stdin.resume();
process.stdin.setEncoding('ascii');
var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;
process.stdin.on('data', function (data) {
input_stdin += data;
});
process.stdin.on('end', function () {
input_stdin_array = input_stdin... |
import React, {Component} from 'react';
import {Image, Text, Slide, Heading} from "spectacle";
import Completable from '../../assets/completable.png'
export default class CompletableSlide extends Component {
render() {
return (
<Slide>
<Heading size={4}>Completable</Heading>
... |
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import {
disableSelectAll,
snackBarOpen,
} from '/imports/ui/redux/actions';
import RecyclePage from '../Recycle';
const mapStateToProps = (state) => ({
selectImages: state.selectCounter.selectImages,
counter: state.selectCount... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ddf383ec"],{"014b":function(e,t,n){"use strict";var a=n("e53d"),r=n("07e3"),i=n("8e60"),o=n("63b6"),s=n("9138"),c=n("ebfd").KEY,l=n("294c"),u=n("dbdb"),f=n("45f2"),d=n("62a0"),m=n("5168"),p=n("ccb9"),_=n("6718"),v=n("47ee"),h=n("9003"),b=n("e4ae"),g=n("f... |
"""
Faça um programa que leia um número qualquer e mostre
o seu fatorial.
"""
numero = int(input('Digite um número inteiro: '))
n = 1
fatorial = 1
while n <= numero:
fatorial = fatorial * n
n += 1
print('{}! = {}'.format(numero, fatorial))
fatorial = 1
for i in range(1, numero+1):
fatorial = fatorial * i
p... |
/** @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @externs
*/
/**
* @typedef {{
* timestamp: number,
* id: number,
* type: string,
* fromAdaptation: boolean,
* bandwidth: ?number
* }}
*
* @property {number} timestamp
* The timestamp the choice was mad... |
// 三角函数:
// cosh(..)
// 双曲余弦函数
// acosh(..)
// 双曲反余弦函数
// sinh(..)
// 双曲正弦函数
// asinh(..)
// 双曲反正弦函数
// tanh(..)
// 双曲正切函数
// atanh(..)
// 双曲反正切函数
// hypot(..)
// 平方和的平方根(也即:广义勾股定理)
// 算术:
// cbrt(..)
// 立方根
// clz32(..)
// 计算 32 位二进制表示的前导 0 个数
// expm1(..)
// 等价于 exp(x) - 1
// log2(..)
// 二进制对数(以 2 为底的对数)
// log10(..)... |
import { gql } from 'graphql.macro';
export default gql`
mutation Register(
$email: String!
$password: String!
$name: String!
$paymentMethodToken: String,
$planName: String
$billingType: BillingType
) {
register(
email: $email
password: $password
name: $name
paym... |
const SCREEN_WIDTH = window.innerWidth;
const SCREEN_HEIGHT = window.innerHeight;
const VIEW_ANGLE = 45;
const ASPECT = SCREEN_WIDTH / SCREEN_HEIGHT;
const NEAR = 1;
const FAR = 10000;
let scene;
let camera;
let renderer;
let axisHelper;
let gridHelper;
let orbit;
let stats;
let lights;
let mesh;
let bones;
let skele... |
import {Dialog} from "primereact/dialog";
import {DataView} from "primereact/dataview";
import UpdateAssigneeRow from "./UpdateAssigneeRow/UpdateAssigneeRow";
import {useCallback, useState} from "react";
import axios from "axios";
export default function UpdateAssigneeDialog({ item, anonymousId, members, updateI... |
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globa... |
import React from 'react';
import { Link } from 'react-router-dom';
import Main from '../layouts/Main';
import Cell from '../components/Projects/Cell';
import data from '../data/projects';
const Projects = () => (
<Main
title="Projects"
description="Learn about S A Saharukh's projects."
>
<article cl... |
(function () {
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var inf... |
const mimcHash = require('./mimc');
const shaHash = require('./sha256');
module.exports = {
shaHash,
mimcHash,
};
|
/**
* These types of initializers are called in the middle of the initialization process.
* They are not allowed to depend on another initializers to suppress circular references.
*/
import initComponentHelper from 'src/app/init/component-helper.init';
import initHttpClient from 'src/app/init/http.init';
import init... |
import datetime
from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
class RenewBookForm(forms.Form):
renewal_date = forms.DateField(help_text="Enter a date between now and 4 weeks (default 3).")
def clean_renewal_date(self):
... |
import {CallBuilder} from "./call_builder";
export class OperationCallBuilder extends CallBuilder {
/**
* Creates a new {@link OperationCallBuilder} pointed to server defined by serverUrl.
*
* Do not create this object directly, use {@link Server#operations}.
* @see [All Operations](https://www... |
/**
* Created by Raph on 29/11/2015.
*/
/*$( window ).resize(function() {
var largeur = $(document).width();
if(largeur<720) {
//alert("ok");
//responsive(largeur);
}
});
function responsive(caca)
{
$("#LoginWindow, #footer1").stop();
$("#LoginWindow, #footer1").animate({
w... |
/*
* Copyright (c) 2015 Intel Corporation.
*
* 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 the rights to use, copy, modify, merge, ... |
#!/usr/bin/env node
/**
* Copyright (c) 2017-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 direct... |
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @file Increse and decrease indent commands.
*/
(function () {
var listNodeNames = { ol: 1, ul: 1 },
isNotWhitespaces = CKEDITOR.dom.walker.whitespace... |
"use strict";
var _ = require('lodash');
var Promise = require('bluebird');
var InMemoryAdapter = (function () {
function InMemoryAdapter() {
this.db = {};
}
InMemoryAdapter.prototype.get = function (id) {
return Promise.resolve(this.db[id]);
};
/**
* insert a record
*/
... |
class nginxTask extends nodefony.Task {
constructor(name, command) {
super(name, command);
this.builder = new nodefony.Builder(this.cli);
this.skeleton = path.resolve(__dirname, "skeletons", "nginx", "nginx.skeleton");
this.location = path.resolve("config", "nginx");
this.confName = `${this.kerne... |
# Copyright (c) 2012 OpenStack Foundation
#
# 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 ... |
var AppCalendar = function() {
return {
//main function to initiate the module
init: function() {
this.initCalendar();
},
initCalendar: function() {
if (!jQuery().fullCalendar) {
return;
}
var date = new Date();
... |
/**
* TencentBlueKing is pleased to support the open source community by making
蓝鲸智云PaaS平台社区版 (BlueKing PaaSCommunity Edition) available.
Copyright (C) 2017-2018 THL A29 Limited,
a Tencent company. All rights reserved.
Licensed under the MIT License (the "License");
you may not use this file except in compliance ... |
module.exports = new Date(2033, 10, 15)
|
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'undo', 'gl', {
redo: 'Refacer',
undo: 'Desfacer'
});
|
import Cookies from 'js-cookie'
const TokenKey = 'admin'
export function getToken() {
return Cookies.get(TokenKey)
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
}
export function removeToken() {
return Cookies.remove(TokenKey)
}
export function removeCookieRoutes() {
return Cookies... |
// Copyright (c) Microsoft. All rights reserved.
import React, { Component } from "react";
import { EMPTY_FIELD_VAL } from 'components/shared/pcsGrid/pcsGridConfig';
import { TimeRenderer } from '../timeRenderer/timeRenderer';
import { Indicator } from 'components/shared';
export class LastTriggerRenderer extends Co... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[357],{1229:function(e,t,a){e.exports=a.p+"assets/img/px4_sitl_overview.d8cf146a.png"},1345:function(e,t,a){e.exports=a.p+"assets/img/px4_simulator_messages.e08a4130.png"},1579:function(e,t,a){"use strict";a.r(t);var o=a(19),r=Object(o.a)({},(function(){var e=this,t=e... |
import pytest
from django.core.management import call_command
from metarecord.models import Action, Function, Phase, Record
from metarecord.models.bulk_update import BulkUpdate
def _prepare_structural_element(obj, cls, user, user_2):
obj.created_by = user
obj.modified_by = user_2
obj.save(update_fields=[... |
webpackJsonp([63],{"/IIi":function(e,t,o){"use strict";function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}Object.defineProperty(t,"__esModule",{value:!0});var s=o("oOyB"),n=function(e){return e&&e.__esModule?e:{default:e}}(s);t.default={name:"button-d... |
(function () {
'use strict';
angular
.module('app')
.controller('Home.IndexController', Controller)
.controller('Home.SidebarController', SidebarController)
.controller('Home.AdminUsersController', AdminUsersController)
.controller('Home.AllUsersController', AllUsersCon... |
import { dispatch as d3_dispatch } from 'd3-dispatch';
import { select as d3_select } from 'd3-selection';
import { services } from '../../services';
import { t } from '../../util/locale';
import {
utilGetSetValue,
utilNoAuto,
utilRebind
} from '../../util';
export function uiFieldTextarea(field) {
v... |
import vsComponent from './vsNavbar';
import vsComponent2 from './vsNavItem';
import vsComponent3 from './vsNavGroup';
import vsComponent4 from './vsNavbarTitle';
import vsComponent5 from './vsNavbarItems';
export default Vue => {
Vue.component(vsComponent.name, vsComponent);
Vue.component(vsComponent2.name, vsCom... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AssetReverseDetail(object):
def __init__(self):
self._amount = None
self._assign_item_id = None
self._batch_no = None
self._goods_status = None
self._succe... |
import matplotlib.pyplot as plt
import numpy as np
import xlrd
def readdata():
with xlrd.open_workbook('data.xlsx') as workbook :
table = workbook.sheet_by_name('Sheet1')
x1 = table.col_values(0)[1:]
x2 = table.col_values(1)[1:]
label = table.col_values(2)[1:]
return x1,x2,l... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
"use strict";
var core_1 = require('@angular/core');
var async_1 = require('../../facade/async');
var collection_1 = ... |
"""Test RainMachine diagnostics."""
from homeassistant.components.diagnostics import REDACTED
from tests.components.diagnostics import get_diagnostics_for_config_entry
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_rainmachine):
"""Test config entry diagnostics."""
assert await get_d... |
$(document).ready(function() {
$('#normal').resizable({
handleSelector: '.splitter',
resizeHeight: false
});
var input = $('#text');
input.val('Suzy has had a bad day. Luckily, Sarah was there to hug Suzy! I am glad Suzy has such a good friend.');
input.focus();
input.prop('sele... |
// prefer default export if available
const preferDefault = m => m && m.default || m
exports.components = {
"component---src-pages-404-js": require("gatsby-module-loader?name=component---src-pages-404-js!/Users/ankur/work/wbfilms/src/pages/404.js"),
"component---src-pages-about-js": require("gatsby-module-loader?n... |
function nextDay(year, month, day) {
if(year % 2 == 0) {
if(month % 2 !== 0) {
if(day == 30) {
day = 1;
month += 1;
} else {
day += 1;
}
} else if(month % 2 === 0) {
if(day == 28 || day == 29 || day == 31... |
import React from "react";
import Widget from "admin/components/Widget";
const Biography = () => {
return (
<Widget styleName="gx-card-profile">
<div className="ant-card-head">
<span className="ant-card-head-title gx-mb-2">Biography</span>
<p className="gx-text-grey gx-fs-sm gx-mb-0">A litt... |
/**
* TODO storage工具
*
* @author Mr.He
* 2021/4/22 18:47
* e-mail crabapples.cn@gmail.com
* qq 294046317
* pc-name mrhe
*/
export default {
getToken: () => sessionStorage.getItem('token'),
setToken: (token) => sessionStorage.setItem('token', token),
getUserInfo: () => JSON.parse(sessionStorage.get... |
// Validates with [jshint]
// The playground site includes JSHint and provides linting as you enter code.
//
// Uncomment the line below to see what happens:
// Error Test
/* jshint strict: true */
(function() {
'use strict';
function setup() {
var valueX = document.getElementById('value-x');
... |
import sessionStore, {rest_url} from "./SessionStore";
import {fetchJson} from "./helpers";
import {EventEmitter} from "events";
import dispatcher from "../dispatcher";
/** Class representing a flux store for the LPWAN Network Type domain */
class NetworkTypeStore extends EventEmitter {
/** Create a store */
c... |
from typing import List
from seedsigner.models import Seed
from seedsigner.models.seed import InvalidSeedException
from seedsigner.models.settings_definition import SettingsConstants
class SeedStorage:
def __init__(self) -> None:
self.seeds: List[Seed] = []
self.pending_seed: Seed = None
... |
// maximal 100 und minimal 10 sind für die Summe
let max = 100;
let min = 10;
//Hier wird erst die summe brechnet und dann der summand1 danach den summand2!
// minussummand ist der minimal wert für summand1
let minsummand = 1;
// erstellt eine Zufallszahl zwischen 10-100
function zufall(min,max){
return Mat... |
const { compose } = require('ramda');
const { renameKeys } = require('ramda-adjunct');
const transformTxInfo = require('../_common/transformTxInfo');
module.exports = compose(
transformTxInfo,
renameKeys({ lease_id: 'leaseId' })
);
|
const mongoose = require('mongoose')
const Schema = mongoose.Schema
const representativeCommitteeSchema = new Schema({
representative: { type: Schema.Types.ObjectId, ref: 'Reps' },
committee: { type: Schema.Types.ObjectId, ref: 'Committee' }
})
representativeCommitteeSchema.index({ representative: 1, committee: 1... |
var TZFE = function(length) {
this.score = {
now: 0,
max: 0,
}
this.status = {
success: false,
false: false,
}
this.value = this.arrayInit(length)
this.length = length
this.backupData = []
this.merge = []
this.new = []
}
TZFE.prototype.saveScore = fun... |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... |
const isV8flags = require('./is-v8flags');
module.exports = function (flags, argv) {
if (!argv) {
argv = process.argv;
}
var args = [argv[1]];
argv.slice(2).forEach(function (arg) {
var flag = arg.split('=')[0];
if (isV8flags(flag, flags)) {
args.unshift(arg);
} else {
args.push(arg... |
/*
* Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope tha... |
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2017,
sourceType: "module"
},
extends: [
"plugin:@typescript-eslint/recommended"
],
rules: {
}
}; |
import cc from 'camelcase';
import reducer, { INITIAL_STATE, EMPTY_ITEM } from 'common/state/preference/reducer';
import actions from 'common/state/preference/actions';
describe('initial state', () => {
it('returns the initial state', () => {
expect(reducer(undefined, {})).toEqual(INITIAL_STATE);
});
});
cons... |
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'save', 'eu', {
toolbar: 'Gorde'
} );
|
# (c) Copyright 2013-2015 Hewlett Packard Enterprise Development LP
# All Rights Reserved.
#
# Copyright 2012 OpenStack Foundation
#
# 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 Licen... |
const express = require('express');
const app = express();
const server = require('http').Server(app);
const log = require('node-consolog').getLogger('test');
const oled = require('pi-gadgets').oled;
const port = process.env.PORT || 7777;
let display, sleepRef;
app.use(express.json());
// Get status
app.get('/status'... |
import React, { useContext } from 'react';
import AppContext from '../../context/AppContext';
import TextArea from '../../shared/TextArea';
import { hexToRgb, formatDisplayURL } from '../../utils';
const styles = {
header: {
position: 'absolute',
left: 0,
right: 0,
zIndex: 0,
flexDirection: 'col... |
import _plotly_utils.basevalidators
class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="fillcolor", parent_name="box", **kwargs):
super(FillcolorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... |
import numpy as np
import pandas
from pandas.util.testing import assert_almost_equal, assert_frame_equal
import modin.pandas as pd
from modin.pandas.utils import to_pandas
random_state = np.random.RandomState(seed=42)
# Size of test dataframes
NCOLS = 2 ** 6
NROWS = 2 ** 8
# Range for values for test data
RAND_LOW =... |
# Generated by Django 2.2.1 on 2019-05-06 07:18
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Contest',
fields=[
... |