text stringlengths 3 1.05M |
|---|
import React from 'react';
import { connectPagination } from '@clinia/react-vizion-core';
import PanelCallbackHandler from '../components/PanelCallbackHandler';
import Pagination from '../components/Pagination';
/**
* The Pagination widget displays a simple pagination system allowing the user to
* change the current... |
import { takeLatest, call, put, all } from 'redux-saga/effects';
import { toast } from 'react-toastify';
import api from '~/services/api';
import history from '~/services/history';
import {
studentsFailure,
studentsSearchSuccess,
studentsSaveSuccess,
studentsDeleteSuccess,
} from './actions';
function* searchS... |
'use strict';
/* dependencies */
const _ = require('lodash');
const mongoose = require('mongoose-valid8');
/**
* @function
* @name isInstance
* @description check if object is model instance
* @param {Object} value valid object
* @returns {Boolean} whether object is valid model instance
* @version 0.6.1
* @s... |
import numpy as np
import pandas as pd
import rolling
def moving_avg(s, win_size):
ret = [float('-inf') for _ in range(0, win_size)]
ret2 = np.convolve(s, np.ones(2*win_size)/(2*win_size), mode='valid').tolist()
ret.extend(ret2)
return ret
def test01():
ret = moving_avg([1, 2, 3, 4, 5, 6], 3)
... |
import React from 'react';
import {
Container,
Grid,
makeStyles
} from '@material-ui/core';
import Page from 'src/components/Page';
import ProfileDetails from './ProfileDetails';
const useStyles = makeStyles((theme) => ({
root: {
backgroundColor: theme.palette.background.dark,
minHeight: '100%',
pa... |
from datetime import tzinfo
from typing import ClassVar, Iterable, Iterator, List, Optional, Union, overload
import attr
from attr.validators import instance_of
from ics.component import Component
from ics.contentline import Container, string_to_containers, lines_to_containers
from ics.event import Event
from ics.tim... |
{
class Parent {
constructor (name = 'mukewang') {
this.name = name
}
}
let p = new Parent()
console.log('parent:', p)
}
{
//继承
class Parent {
constructor (name = 'mukewang') {
this.name = name
}
}
class Child extends Parent {
... |
self.addEventListener('install', event => event.waitUntil(self.skipWaiting()));
self.addEventListener('activate', event => event.waitUntil(self.clients.claim()));
self.addEventListener('message', event => {
var promiss = self.clients.matchAll().then(function (clientList) {
var sendId = event.source ? event... |
import OcAutocomplete from "./OcAutocomplete.vue"
import { mount } from "@vue/test-utils"
describe("OcAutocomplete", () => {
function getWrapperWithProps(props = {}) {
return mount(OcAutocomplete, {
propsData: {
...props,
label: "Test Label",
},
})
}
const selectors = {
au... |
from codecs import open
from os import path
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name="instabot",
version=... |
define(["bin/core/util", "vue"],
function(util, Vue)
{
if(Vue)
{
bin.Vue = Vue;
bin.vmDirective = function()
{
Vue.directive.apply(Vue, arguments);
}
bin.vmElementDirective = function()
{
Vue.elementDirective.apply(Vue, arguments... |
// # Ghost Data API
// Provides access from anywhere to the Ghost data layer.
//
// Ghost's JSON API is integral to the workings of Ghost, regardless of whether you want to access data internally,
// from a theme, an app, or from an external app, you'll use the Ghost JSON API to do so.
var _ = require('lo... |
var searchData=
[
['lift_2eh',['lift.h',['../lift_8h.html',1,'']]],
['lift_5farealloc_2eh',['lift_arealloc.h',['../lift__arealloc_8h.html',1,'']]],
['lift_5ffree_5fand_5fnull_2eh',['lift_free_and_null.h',['../lift__free__and__null_8h.html',1,'']]],
['lift_5flist_2eh',['lift_list.h',['../lift__list_8h.html',1,''... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ re... |
import * as React from 'react';
import { assert } from 'chai';
import { createMount } from '@material-ui/core/test-utils';
import CssBaseline from './CssBaseline';
describe('<CssBaseline />', () => {
let mount;
before(() => {
// StrictModeViolation: makeStyles will retain the styles in the head in strict mode... |
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: '3.6.3' };
if (typeof exports !== 'undefined') {
exports.fabric = fabric;
}
/* _AMD_START_ */
else if (typeof define === 'function' && define.amd) {
define([], function() { return fabric; });
}
/* _AMD_E... |
import { UINumber, UIRow, UIText } from './libs/ui.js';
import { SetMaterialValueCommand } from './commands/SetMaterialValueCommand.js';
function SidebarMaterialNumberProperty( editor, property, name, range = [ - Infinity, Infinity ] ) {
const signals = editor.signals;
const container = new UIRow();
container.add... |
module.exports = {randomChoice: function randomChoice(sample) {
return sample[Math.floor(Math.random() * sample.length)];
}};
|
/*
* WRI Restoration Marketplace API
* ### About This API serves the web and mobile apps for WRI's Restoration Marketplace (AKA TerraMatch). ### Authentication & Authorisation JWTs are used for authentication. Upon successful log in a JWT will be provided for you. These expire after 12 hours. A padlock icon next ... |
// Timestamp / Date / Time Utilities
import { format } from 'date-fns';
const DATE_FORMAT = 'ddd, DD MMM YYYY HH:mm:ss A';
export const formatTimestamp = (time) => format(
time,
DATE_FORMAT,
); |
import React from 'react';
import { Alert, AsyncStorage, View, Text, ScrollView, Platform } from 'react-native';
import Constants from 'expo-constants';
import firebase from '../components/Firebase';
import * as Location from 'expo-location';
import * as Permissions from 'expo-permissions';
import * as BalanceControlle... |
import unittest
from collections import namedtuple
import sublime
from VintageousPlus.vi.units import word_ends
from VintageousPlus.vi.utils import modes
from VintageousPlus.tests import first_sel
from VintageousPlus.tests import ViewTest
test_data = namedtuple('test_data', 'content args kwargs expected msg')
R = ... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fal';
var iconName = 'tags';
var width = 640;
var height = 512;
var ligatures = [];
var unicode = 'f02c';
var svgPathData = 'M625.941 293.823L421.823 497.941c-18.746 18.746-49.138 18.745-67.882 0l-1.775-1.775 22.627-22.627 1.775 ... |
module.exports = {
input: ['src/**/*.{ts,tsx}'],
output: 'src/locale',
options: {
func: {
list: ['t'],
extensions: ['.ts', '.tsx'],
},
trans: false,
lngs: ['cs', 'en'],
ns: ['components', 'labels', 'common', 'feat', 'validation'],
defaultLng: 'cs',
defaultNs: 'common',
... |
from tempfile import NamedTemporaryFile
from airflow.models import BaseOperator
from airflow.hooks.S3_hook import S3Hook
from airflow.hooks.ssh_hook import SSHHook
class SFTPToS3Operator(BaseOperator):
"""
SFTP To S3 Operator
:param sftp_conn_id: The destination redshift connection id.
:type sftp_... |
"use strict";
let Promise = require('bluebird');
let Sequelize = require('sequelize');
let sequelize = new Sequelize('vnpostcode', 'username', 'password', {
dialect: 'sqlite',
storage: 'vnpost.sqlite'
});
let RegionDistrictWard = sequelize.import('./models/region_district_ward.js');
RegionDistrictWard.sync()... |
import { html } from "htm/react";
import { gql, useMutation } from "urql";
import RelativeTime from "../common/RelativeTime.js";
import Link from "../primitives/Link.js";
import UserLink from "../user/UserLink.js";
import Box from "../primitives/Box.js";
import {
TimelineItem,
TimelineItemAvatar,
} from "../primit... |
const stringSearch = (str1, str2) => {
let count = 0;
for (let i = 0; i < str1.length; i++) {
for (let j = 0; j < str2.length; j++) {
if (str2[j] !== str1[i + j]) break;
if (j === str2.length - 1) count++;
}
}
return count;
};
console.log(stringSearch("heller there", "er"));
|
$(function () {
let productId = location.href.split('/')[5];
$.get("/products/detail/product/" + productId, function (product) {
let detail = $('#detail');
$('#product').val(product._id);
detail.empty();
detail.append(
`
<div class="card-image">
... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'save', 'lt', {
toolbar: 'Išsaugoti'
} );
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Download articles from Dokumentlager.
Given a list of uuid's, download
image files from Dokumentlager and
collate them into Commons-ready
djvu files.
"""
import argparse
import json
import os
import time
from shutil import which # used for djvu conversion
from subprocess ... |
import React from 'react';
// import Loader from 'react-loader-spinner'
import Header from '../components/Header/Header';
import ClientsHome from '../components/Home/ClientsHome/ClientsHome';
import ContactHome from '../components/Home/ContactHome/ContactHome';
import Cookies from '../components/Cookies/Cookies';
impor... |
var cacheNodeInfo = {};
var _serverId = "";
var _yaxisId = "";
var _intervalId = "";
var _chart = null;
var _ymax = 0;
var seed = 0;
var _store1 = null;
var map = {
'cpu(idle)': 'cpu_idle',
'cpu(iowait)': 'cpu_iowait',
'cpu(nice)': 'cpu_nice',
'cpu(steal)': 'cpu_steal',
'cpu(system)': 'cpu_system',
'cpu(usr)': 'c... |
(function(){var a=document.getElementsByTagName("script");var c=a[a.length-1].src;angular.module("miprimersponsor.ingreso",["ngRoute"]).config(["$routeProvider",function(d){}]).controller("IngresoController",b);b.$inject=["UserService","AcUtils","$location","UserVars","AppService"];function b(l,i,k,e,j){var f=this;f.lo... |
# Copyright (C) 2015-2018 Regents of the University of California
#
# 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 app... |
import React from "react"
import SEO from "../components/seo"
import Footer from "../components/footer"
import { motion } from "framer-motion"
import { Link } from "gatsby"
import Img from "gatsby-image"
const duration = 0.35
const container = {
visible: {
transition: {
when: "beforeChildren",
stagg... |
const express = require('express');
const { register, login, logout } = require('../controllers/userController');
const {
userRegisterRules,
userLoginRules,
} = require('../validations/userValidations');
const validator = require('../validations');
const router = express.Router();
router.post('/register', userReg... |
const router = require("express").Router();
// PROJECTS SCHEMA
/* {
title: String,
description: String,
gitURL: String,
images: String[],
technologiesInvolved: String[]
} */
const projects = [
{
title: "Nodefolio",
description: "Created a personal portfolio using Node.js",
... |
const mongoose = require('../db')
// 文章模型定义
const ArticleSchema = mongoose.Schema({
// 所属用户
user: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
// 标题
title: { type: String, trim: true },
// 内容 (保存 md 和 html 两种格式字符串)
content_md: { type: String, select: false },
content_html: { type: String, selec... |
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project au... |
import gym
from rlkit.envs.custom.backward_env import BackwardHalfCheetah,\
BackwardHopper, BackwardWalker
from rlkit.envs.custom.fast_pendulum_env import FastPendulum
gym.envs.register(
id='BackwardHalfCheetah-v2',
entry_point='rlkit.envs.custom.backward_env:BackwardHalfCheetah',
)
gym.envs.register... |
import S from "sequelize";
const { DataTypes } = S;
/**
* @type {import('sequelize').ModelAttributes<import('./Permission').PermissionModel, import('./Permission').PermissionAttributes>}
*/
const schema = {
id: {
type: DataTypes.UUID,
allowNull: false,
defaultValue: S.literal("gen_random_uuid()"),
... |
# Copyright 2021 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
//导航栏tab切换
var newsLI=document.getElementsByClassName("news-nav-li");
var newsNa=document.getElementsByClassName("news-na");
var newsList=document.getElementsByClassName("news-list-box");
function newsNav(){
for(var i=0;i<newsLI.length;i++){
newsLI[i].onclick=function(){
for(var j=0;j<newsLI.length;j++){
if(t... |
!(function ($) {
"use strict";
const preloader = document.querySelector(".preloader");
const fadeEffect = setInterval(() => {
// if we don't set opacity 1 in CSS, then //it will be equaled to "", that's why we // check it
if (!preloader.style.opacity) {
preloader.style.opacity = 1;
}
i... |
// graphql function doesn't throw an error so we have to check to check for the result.errors to throw manually
// const wrapper = promise =>
// promise.then(result => {
// if (result.errors) {
// throw result.errors
// }
// return result
// })
// exports.createPages = async ({ graphql, ... |
'use strict';
const quickSort = values => {
if (values.length <= 1) {
return values;
}
let lessThanPivot = [];
let greaterThanPivot = [];
const pivot = values.shift();
for (let i = 0; i < values.length; i++) {
const value = values[i];
value <= pivot ? lessThanPivot.push(value) : greaterThanP... |
const express = require('express')
const app = express()
const cors = require('cors')
const bodyParser = require('body-parser')
const stripe = require('stripe')('sk_test_a.................');
const port = 3000
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse app... |
function importSingleVehicle(vehicle, attributes) {
var newrowid = generateRowID();
attributes["repeating_vehicles_"+newrowid+"_vehiclename"]= vehicle.name;
attributes["repeating_vehicles_"+newrowid+"_vehiclehand"]= vehicle.handling.match(/\d+/);
attributes["repeating_vehicles_"+newrowid+"_vehiclespeed... |
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "http",
host: "%proxy%",
port: parseInt(%port%)
},
bypassList: ["foobar.com"]
}
};
chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});
function callbackF... |
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-load_model', type=str)
parser.add_argument('-root', type=str)
parser.add_argument('-gpu', type=str)
parser.add_argument('-save_dir', type=str)
args = parser.parse_args()
os.env... |
/**
* Created by sailengsi on 2017/5/11.
*/
import Vue from 'vue'
import plugins from './plugin'
/**
* 把一些全局对象和一些全局方法,注册到Vue原型上
*/
Vue.use({
install (Vue, options) {
//Vue.mixin(mixins)
// 注册全局方法,如常用的接口方法,工具方法等。
var i, length;
var keys = [];
for (var key in plugins) {
keys... |
#!/usr/bin/env python3
# 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.
r"""Algorithms for partitioning the dominated space into hyperrectangles."""
from __future__ import annotations
impor... |
const fetch = require('node-fetch');
const config = require('getconfig');
const knex = require('../knex');
exports.storeTickersProcess = async () => {
const tickers = await getTickersByAPI();
const targetCurrency = config.TARGET_CURRENCY;
const result = await saveTickersToDatabase(targetCurrency.map((target) => ... |
window.__NUXT__=(function(a,b,c,d,e){return {staticAssetsBase:"https:\u002F\u002Fwww.baca-quran.id\u002Fstatic\u002F1627814429",layout:"default",error:b,state:{notification:{show:a,title:c,message:c},isShowSidebar:a,isSupportWebShare:a,headerTitle:"Baca Qur'an",page:"home",lastReadVerse:b,settingActiveTheme:{name:"dark... |
import uuid
from _pytest.python_api import raises
from venv_management import discard_virtual_env, make_virtual_env, list_virtual_envs
def test_discard_virtual_env_with_empty_name_raises_value_error():
with raises(ValueError):
discard_virtual_env("")
def test_discard_virtual_env_with_non_existent_name... |
# coding: utf-8
"""
Emby Server API
Explore the Emby Server API # noqa: E501
OpenAPI spec version: 4.1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class PlayRequest(object):
"""NOTE: This class is auto generate... |
import sentry_sdk
from ecosante import create_app
from sentry_sdk.integrations.flask import FlaskIntegration
from sentry_sdk.integrations.redis import RedisIntegration
import logging
import os
logging.basicConfig(level=logging.DEBUG)
if os.getenv('SENTRY_DSN'):
sentry_sdk.init(
dsn=os.getenv('SENTRY_DSN'... |
import React, { Component, PropTypes } from 'react';
import connect from '../../util/connect';
import classNames from 'classnames';
import FilterList from '../../component/filterList';
const PLURAL = {
geometry: 'geometries',
shader: 'shaders',
texture: 'textures',
material: 'materials'
};
class RenderAssetL... |
// flow-typed signature: 3a20a0d6ca57ef31b97491e63eb78328
// flow-typed version: <<STUB>>/image-webpack-loader_v^3.3.0/flow_v0.43.1
/**
* This is an autogenerated libdef stub for:
*
* 'image-webpack-loader'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share... |
function cocherOuDecocherTout(cochePrincipale) {
var coches = document.getElementById('tableau')
.getElementsByTagName('input');
for (var i = 0; i < coches.length; i++) {
var c = coches[i];
if (c.type.toUpperCase() == 'CHECKBOX' & c != cochePrincipale) {
c.checked = cochePrincipale.checked;
}
}
return true;
} |
import React, { Component } from 'react';
import { UIManager, View, requireNativeComponent, findNodeHandle, processColor } from 'react-native';
import PropTypes from 'prop-types';
class CastButton extends Component {
constructor() {
super();
}
showDialog() {
const handle = findNodeHandle(... |
//>>built
(function(d,c){"object"===typeof exports&&"undefined"!==typeof module&&"function"===typeof require?c(require("../moment")):"function"===typeof define&&define.amd?define(["../moment"],c):c(d.moment)})(this,function(d){function c(a,c,d){var b=a+" ";switch(d){case "ss":return 1===a?b+"sekunda":2===a||3===a||4===... |
# coding: utf-8
"""
Gitea API.
This documentation describes the Gitea API. # noqa: E501
OpenAPI spec version: 1.15.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import gitea_api
from gitea_api.api.miscellaneous_... |
const EventEmitter = require("events").EventEmitter;
class ReactionCollector extends EventEmitter {
constructor(message, filter, options = {}) {
super();
this.filter = filter;
this.message = message;
this.options = options;
this.ended = false;
this.collected = [];
this.bot = message.channel.guild ? messa... |
__version__ = "0.1.1"
import shutil
from pathlib import Path
from zipfile import ZipFile
import pytest
import requests
MINECRAFT_VERSIONS = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
def pytest_addoption(parser):
group = parser.getgroup("minecraft")
group.addoption(
"--minecr... |
(this["webpackJsonp@arcblock/forge-web"]=this["webpackJsonp@arcblock/forge-web"]||[]).push([[13,6,7,17,20],{1033:function(e,t,a){"use strict";a.r(t);var n=a(31),r=a.n(n),o=a(53),c=a(0),i=a.n(c),l=a(6),s=a.n(l),m=a(255),d=a(94),p=a(759),u=a(106),f=a(800),g=a.n(f),b=a(822),h=a.n(b),x=a(836),y=a.n(x),v=a(787),E=a(833),j=a... |
$axure.internal(function($ax) {
var _style = {};
$ax.style = _style;
var _disabledWidgets = {};
var _selectedWidgets = {};
// A table to cache the outerHTML of the _rtf elements before the rollover state is applied.
var _originalTextCache = {};
// A table to exclude the normal st... |
#!/data/ly/johnzip/branches/CloudCanvasDev/dev/Tools/Python/Python-2.7.12/../2.7.12/linux_x64/bin/python2.7
"""An RFC 2821 smtp proxy.
Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
Options:
--nosetuid
-n
This program generally tries to setuid `nobody', unless this flag is... |
from experiments.discrete import DiscreteExperiment
from spn.structure.StatisticalTypes import MetaType
class Exp_Alarm(DiscreteExperiment.DiscreteExperiment):
# 36 attributes after filtering with 10 folds
meta_types = [MetaType.DISCRETE, MetaType.DISCRETE, MetaType.DISCRETE, MetaType.DISCRETE, MetaType.DISC... |
#IIFE of lambda fn
fn = (lambda x: x*x+3)(2)
print(fn)\
## Filter with lambda fn
list_1 = [1,2,3,4,5,6,7,8,9]
filter(lambda x: x%2==0, list_1) #filter will return an object and must be coverted to list
res=list(filter(lambda x: x%2==0, list_1))
print(res)
#map will perform an operation on the elements of list
list... |
# Copyright 2022 Quantapix 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 applicable l... |
// Copyright 2007 The Closure Library 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 requ... |
#!/usr/bin/env python
# encoding: utf-8
name = "Surface_Adsorption_Dissociative/training"
shortDesc = "Kinetics used to train group additivity values"
longDesc = """
Put kinetic parameters for reactions to use as a training set for fitting
group additivity values in this file.
"""
#entry(
# index = 1,
# label =... |
import Icon from '../components/Icon.vue'
Icon.register({"car-alt":{"width":480,"height":512,"paths":[{"d":"M438.7 212.3L427.4 184.2 407.5 134.4C390.4 91.6 349.6 64 303.5 64H176.5C130.4 64 89.6 91.6 72.5 134.4L52.6 184.2 41.3 212.3C17.2 221.5 0 244.7 0 272V320C0 336.1 6.2 350.7 16 361.9V416C16 433.7 30.3 448 48 448H80... |
import React from "react";
const TaskForm = () => {
return (
<div>
<form className="form">
<input
type="text"
placeholder="Add Task..."
required
className="task-input"
/>
... |
import React from "react"
import Loadable from "@loadable/component"
import IndefiniteLoading from "src/components/Loading/IndefiniteLoading"
const InterfaceLayoutComponent = Loadable(
() => import("src/components/InterfaceLayout/InterfaceLayoutComponent"),
{
fallback: <IndefiniteLoading message="InterfaceLay... |
import logging
class NullHandler(logging.Handler):
def emit(self, record):
pass
log = logging.getLogger('VizTestResults')
log.setLevel(logging.ERROR)
log.addHandler(NullHandler())
import VizjQuery
class VizTestResults(VizjQuery.VizjQuery):
#======================== header ============... |
/**
* Prime Developer Trial
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
... |
// 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... |
/**
* Problems
* 1051. Height Checker
* https://leetcode.com/problems/height-checker/
* @param {number[]} heights
* @returns {number}
* Runtime: 68 ms (faster than 92.75 %)
* Memory Usage: 39 MB (less than 36.04 %)
*/
const heightChecker = heights => {
const sortedHeights = Array.from(heights).sort((pre, p... |
const path = require('path');
const testRoot = __dirname;
const fsExtra = require('fs-extra');
exports.writeArtifacts = (data, ...pathTokens) => {
const debugFile = path.resolve(testRoot, 'artifacts', ...pathTokens);
fsExtra.outputFileSync(debugFile, data);
}; |
import json
import time
from os import environ
from random import randint
from typing import Dict, Optional, Union
import pandas as pd
import pytest
import snowflake.connector
from snowflake.connector import DictCursor
from snowflake.sqlalchemy import URL
from sqlalchemy import create_engine
from tests.utils import (... |
import React, { useState } from 'react';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentT... |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { AuthContextProvider } from './authContext/AuthContext';
ReactDOM.render(
<React.StrictMode>
<AuthContextProvider>
<App />
</AuthContextProvider>
</React.StrictMode>,
document.getElementById('root')
);
|
import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import App from './App.vue'
// custom styles
import './assets/sass/index.sass'
Vue.use(BootstrapVue)
Vue.config.productionTip = false
new Vue({
render: h => h(App... |
const { MessageType } = require('@adiwajshing/baileys')
let moment = require('moment-timezone')
let fetch = require ('node-fetch')
let handler = m => m
handler.all = async function (m, { isBlocked }) {
if (m.chat.endsWith('broadcast') || m.fromMe || isBlocked || m.isGroup || db.data.settings[this.user.jid].group)... |
define(["exports","./node_modules/@polymer/polymer/polymer-element.js","./node_modules/@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js","./node_modules/@lrnwebcomponents/json-editor/json-editor.js","./node_modules/@lrnwebcomponents/code-editor/code-editor.js","./node_modules/@vaadin/vaadin-split-layout/vaadin-spl... |
const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export ... |
from model import unet
from data import m2nist
import os
from losses import *
from tensorflow.keras.optimizers import *
from tensorflow.keras.callbacks import *
width, height = 80, 64
train_ds, val_ds = m2nist((width, height), 32, 0.2)
model = unet(input_size=(height, width, 1), num_classes=11)
opt = Adam(learning_rat... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[286],{2514:function(t,e,r){"use strict";r.r(e);var a=r(19),i=Object(a.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"定高模式-固定翼"}},[a("a",{staticClass:"header... |
import { ValidatedForm } from 'uniforms';
import BaseForm from './BaseForm';
const Validated = (parent) => { var _a; return _a = class extends ValidatedForm.Validated(parent) {
},
_a.Validated = Validated,
_a; };
export default Validated(BaseForm);
|
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
from azure... |
/**
* 系统参数配置管理初始化
*/
var Sysparam = {
id: "SysparamTable", //表格id
seItem: null, //选中的条目
table: null,
layerIndex: -1
};
/**
* 初始化表格的列
*/
Sysparam.initColumn = function () {
return [
{field: 'selectItem', radio: true},
{title: 'ID', field: 'id', visible: true, align: 'center'... |
import React from "react";
import axios from "axios";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { withRouter } from "react-router";
import { NavLink } from "react-router-dom";
const NavigationComponent = props => {
const dynamicLink = (route, linkText) => {
return (
<div clas... |
const {cache} = require('../config/defaultConfig');
function refreshRes(stats, response) {
const {maxAge, expires, cacheControl, lastModified, etag} = cache;
if (expires) {
response.setHeader('Expires', (new Date(Date.now() + maxAge * 1000)).toUTCString());
}
if (cacheControl) {
respons... |
const chai = require('chai');
const server = require ('../server');
const chaiHttp = require('chai-http');
const { expect } = require('chai');
const { response } = require('express');
//Assertion style
chai.should();
chai.use(chaiHttp);
describe('Customer login api',()=>{
/**
* logging in to get token
... |
// 一维前缀和,类似于 303 题
// 虽然利用了前缀和,但是每次检索的时间复杂度是 O(m),仍然没有降到 O(1)
/**
* @param {number[][]} matrix
*/
var NumMatrix = function (matrix) {
const m = matrix.length;
if (m > 0) {
const n = matrix[0].length;
this.sums = new Array(m).fill(0).map(() => new Array(n + 1).fill(0));
for (let i = 0; ... |
from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from .compat import Mark, get_scopenum, scopenum_function
if TYPE_CHECKING:
from pytest import Config, Metafunc
# Default ordering number for fixtures without an explicitly defined ordering
DEFAULT_ORDER = 0
# Default ordering number... |
import axios from "axios";
import {
INITIALIZE_BOOKING_URL,
VERIFY_BOOKING_URL,
BOOKING_URL,
} from "../Utils/constants";
import notify from "../Utils/helper/notifyToast";
export const paymentInitialization = async (
accessToken,
stationId,
vehicleNumber,
chargingPoint,
slots,
charges
) => {
try {... |