text stringlengths 3 1.05M |
|---|
/*!
* Select2 4.0.13
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
;(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (t... |
import jwt from 'jsonwebtoken';
import chalk from 'chalk';
import models from "../models/index";
const User = models.User
const verifyToken = (req, res, next)=> {
const BearerToken = req.headers.authorization
if (typeof(BearerToken) !== undefined){
req.token = BearerToken.split(' ')[1]
next()
... |
# Copyright 2016-2020 Michel Koenen (Falcons)
# SPDX-License-Identifier: Apache-2.0
#!/usr/bin/env python3
#
import EnvironmentField
from EnvironmentField import *
myField=EnvironmentField.cEnvironmentField.getInstance()
#myPOI=EnvironmentField.poiInfo() #preprare myPOI structure
#myArea=EnvironmentField.areaInfo(... |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright 2021 The NiPreps Developers <nipreps@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... |
const tailwind = require('../tailwind')
module.exports = {
pathPrefix: '/', // Prefix for all links. If you deploy your site to example.com/portfolio your pathPrefix should be "/portfolio"
siteTitle: 'Mustafa Masvi', // Navigation and Site Title
siteTitleAlt: 'Mustafa', // Alternative Site title for SEO
siteT... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
# This is an automatically generated file.
# DO NOT EDIT or your changes may be overwritten
import base64
from xdrlib import Packer, Unpacker
from ..type_checked import type_checked
from .claim_claimable_balance_result_code import ClaimClaimableBalanceResultCode
__all__ = ["ClaimClaimableBalanceResult"]
@type_check... |
import styled from 'styled-components'
const Div=styled.div`
height: 100%;
display: flex;
flex-direction:column;
flex: 1;
overflow:hidden;
position:relative;
`
const MEContainer=styled.div`
background:#fff;
.btn{
background:#E9E9E9;
border-radius:.04rem;
padding... |
#!/usr/bin/env node
var symlinker = require('./symlinker.js');
var argv = require('optimist')
.usage("Usage: $0 file")
.demand(['_'])
.default('t', 'advanced-newline')
.alias('s', 'source')
.alias('d', 'destination')
.alias('c', 'create')
.alias('f', 'skip')
.alias('r', 'recreate')
.alias('i', 'ignore')
.al... |
"""
Defines:
- Cart3D(log=None, debug=False)
- read_cart3d(self, infilename, result_names=None)
- write_cart3d(self, outfilename, is_binary=False, float_fmt='%6.7f')
- flip_model()
- make_mirror_model(self, nodes, elements, regions, loads, axis='y', tol=0.000001)
- make_half_model(self, axis... |
# Custom Functions:
def list_print(subject, dest=None):
for dia in subject:
if dest is not None:
print(dia, file=dest)
else:
print(dia)
# Creating the data to be saved.
man = []
other = []
try:
data = open('sketch.txt')
for line in data:
try:
... |
module.exports = {
tasks: {
mkdir: {
dest: "dist"
}
}
};
|
/**
* Объекты для доступа к геокодерам Яндекс, Google и sypexgeo<br />
* © Evgeniy Malyarov http://www.oknosoft.ru 2014-2016<br />
* Created 16.04.2016
*
* @module geocoding
*/
/**
* ### Данные геолокации
* Объект предоставляет доступ к функциям _геокодирования браузера_, а так же - геокодерам _Яндекс_ и ... |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... |
'use strict';
const merge = require('webpack-merge');
const common = require('./webpack.common');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = merge(common, {
mode: 'production',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()],
},
});
|
# -*- coding: utf-8 -*-
"""
Created on Thu May 6 23:08:34 2021
@author: Administrator
"""
import glob
import os
import tensorflow as tf
from PIL import Image
# data_path='/data-input/pic2000'# windows里好像这个\\比较管用,与os相适配
data_path='I:\\zhangkunpeng\\bian_Cjin\\pic2000'# windows里好像这个\\比较管用,与os相适配
pic_list=... |
// @flow
import { TypeBacking } from './TypeBacking';
import { SchemaBacking } from './SchemaBacking';
import { assert, assertType } from './utils';
import { set } from '../../jsutils/lodash.custom';
const type = 'Object';
export class ObjectBacking extends TypeBacking {
constructor(backing: SchemaBacking, name: st... |
function delay(miliseconds = 1000) {
return new Promise((r) => {
setTimeout(() => {
r();
}, miliseconds);
});
}
async function timeLog() {}
function main(interval = 1000) {
let counter = 0;
setInterval(() => {
counter++;
if (counter % 10 === 0) {
return console.log(new Error("Rando... |
/* Magic Mirror
* Module: MMM-Spacecraft
*
* By Mykle1
*
*/
const NodeHelper = require('node_helper');
const request = require('request');
module.exports = NodeHelper.create({
start: function() {
console.log("Starting node_helper for: " + this.name);
},
getSpacecraft: functi... |
let connection;
const url = 'wss://ws-feed.gdax.com';
// set the action to be dispatched when data is received
export const setActions = (handleMatch, handleSnapshot, handleUpdate, handleTicker, handleDeleteOrder) => {
connection.onmessage = (event) => {
const data = JSON.parse(event.data);
switch (data.type... |
import unittest
from .main import search_duplicate_number
class TestSearchDuplicate(unittest.TestCase):
""" 重複アイテムを探索する関数のテスト
"""
def test_example(self) -> None:
"""
"""
test_case = [
{"arr": [1, 1, 2, 2, 3, 4, 5], "expected": {1, 2}},
{"arr": [1, 1, 1, 1,... |
// This file was procedurally generated from the following sources:
// - src/annex-b-fns/eval-global-skip-early-err-try.case
// - src/annex-b-fns/eval-global/direct-if-decl-else-stmt.template
/*---
description: Extension is not observed when creation of variable binding would produce an early error (try statement) (IfS... |
(function(Clazz
,Clazz_getClassName
,Clazz_newLongArray
,Clazz_doubleToByte
,Clazz_doubleToInt
,Clazz_doubleToLong
,Clazz_declarePackage
,Clazz_instanceOf
,Clazz_load
,Clazz_instantialize
,Clazz_decorateAsClass
,Clazz_floatToInt
,Clazz_floatToLong
,Clazz_makeConstructor
,Clazz_defineEnumConstant
,Clazz_exceptionOf
,Cla... |
import React, { Component } from 'react';
import NodeTriggerActionType from './NodeTriggerActionType';
import NodeTriggerArgumentTemplate from './NodeTriggerArgumentTemplate';
import NodeTriggerList from './NodeTriggerList';
import { initRestMethods } from "../../actions/nodeGroupTriggerActions"
import { connect } fro... |
import logging
import os
import pathlib
from pathlib import Path
ROOT_DIR = pathlib.Path(__file__).parent.absolute()
# if someone tried to log something before basicConfig is called, Python creates a default handler that
# goes to the console and will ignore further basicConfig calls. Remove the handler if there is o... |
module.exports = require('./cjs/get');
|
// Configure settings and attach camera
function configure() {
Webcam.set({
width: 320,
height: 240,
image_format: 'jpeg',
upload_name: 'file',
jpeg_quality: 90
});
Webcam.attach('#my_camera');
}
function take_snapshot() {
// take snapshot and get image data
... |
import React,{useState,useEffect} from 'react';
import { Link as RouterLink } from 'react-router-dom';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/styles';
import { Avatar, Typography } from '@material-ui/core';
import jwt_decode from 'jwt-decode'
const useS... |
const express = require('express');
const app = express();
const port = 3000;
app.use(express.static('public'));
app.listen(port,() => {
console.log(`服务已启动,访问地址 http://localhost:${port}/`);
}) |
import gql from 'graphql-tag';
import Wrapper from '../components/Layout/Wrapper';
import Body from '../components/Post/Body';
import { config } from '../config';
import graphQLClient from '../helpers/graphQLClient';
const GET_POST = gql`
query post($permlink: String!) {
post(permlink: $permlink) {
title
... |
import fs from 'fs'
import path from 'path'
import matter from 'gray-matter';
import remark from "remark";
import html from "remark-html";
const postsDirectory = path.join(process.cwd(), 'posts')
export function getSortedPostsData() {
// Get file names under /posts
const fileNames = fs.readdirSync(postsDirect... |
from collections import OrderedDict
from utils import *
import numpy as np
import chainer
import chainer.links as L
import chainer.functions as F
from chainer import Variable
import scipy.optimize
import gym.spaces
class Model(chainer.Chain):
def __init__(self, observation_space, action_space, env_spec, **kwargs... |
import logging
import json
import requests
from .user import User
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
log = logging.getLogger(__name__)
class Record:
"""
:param archer_instance - archer incstance object
:param json:
{'Id': ... |
; (function ($) {
"use strict";
$(document).ready(function () {
/**-----------------------------
* Navbar fix
* ---------------------------*/
$(document).on('click', '.navbar-area .navbar-nav li.menu-item-has-children>a', function (e) {
e.preventDefault();
... |
function Run_OnLoad(groupnames,PendingActions,Users,Allusers,onegroup) {
if (groupnames!=null){
var final_groupnames=array(groupnames);
RequestAccess(final_groupnames);
datalist(groupnames[0]);
}
if(PendingActions!=null){
var pending_actions=arrayPendingActions(PendingActions);
... |
import { makeStyles } from "@material-ui/core";
const useStyles = makeStyles((theme) => ({
commentSectionContainer: {
maxHeight: "100px",
border: "1px solid whitesmoke",
borderRadius: "5px",
display: "flex",
flexDirection: "column",
justifyContent: "flex-end",
... |
/*
* This file is part of the Sulu CMS.
*
* (c) MASSIVE ART WebServices GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
define(['app-config', 'config', 'sulucontent/components/content/preview/main'], function(AppConfig, Config, Preview) {
... |
import { useEffect, useMemo, useState } from 'react';
import { useDropzone } from 'react-dropzone'
const baseStyle = {
flex: 1,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
padding: '20px',
borderWidth: 2,
borderRadius: 10,
borderColor: 'rgb(107, 114, 128)',
bord... |
import math
import random
import numpy
from skimage.transform import downscale_local_mean
from aydin.util.log.log import lprint, lsection
class DataHistogramBalancer:
"""Training data balancer : Avoids having an excess of one class (y values) in the training data"""
def __init__(
self,
numb... |
/*******************************************************************************
* Copyright (c) 2015 IBM Corp.
*
* 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/li... |
"""
IRC color formatting.
helga.settings.SERVER['TYPE'] must be "irc".
TODO: support other chat protocols
"""
def red(text):
""" Return this text formatted red """
return '\x0304%s\x03' % text
def orange(text):
""" Return this text formatted orange (olive) """
return '\x0307%s\x03' % text
def br... |
const { Command } = require('discord.js-commando');
module.exports = class JoinCommand extends Command {
constructor(client) {
super(client, {
name: 'join',
aliases: ['join-channel', 'channel', 'voice'],
group: 'music',
memberName: 'join',
descrip... |
module.exports = {
'/product': require('./controllers/productCtrl'),
'/customer': require('./controllers/customerCtrl'),
'/transaction': require('./controllers/transactionCtrl')
};
|
import React from 'react'
import { Link } from 'gatsby'
const Header = ({ siteTitle }) => (
<div
style={{
background: 'teal',
marginBottom: '1.45rem',
}}
>
<div
style={{
margin: '0 auto',
maxWidth: 960,
padding: '1.45rem 1.0875rem',
}}
>
<h1 sty... |
import React, { useState } from 'react';
import { useDispatch } from 'react-redux';
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
} from 'reactstrap';
import { NavLink } from 'react-router-dom';
import { authConstants } from '../redux/constants';
export const Navigation = () => {
c... |
let map = new Map();
map.set('name', 'Pesho');
map.set('age', 20);
map.set('isMale', true);
console.log(map.get('name'));
map.set('age', 21);
map.set(1, 'One');
// Set object as key
let obj = {name: 'Gosho'};
map.set(obj, 'nagoshoobekta');
console.log(map.get(obj));
console.log(map);
// Iterate map
for (const [k... |
import React from 'react/addons';
import ReactMixin from 'react-mixin';
//import LocalStorageMixin from 'react-localstorage';
// Import stores
import ScoreStore from 'stores/ScoreStore';
import styles from './HighScores.scss';
class HighScores extends React.Component {
constructor(props) {
super(props);
... |
function grindTheBeans() {
return new Promise(resolve => {
setTimeout(() => {
console.log(`Done grinding the coffee...`);
resolve();
}, 2000);
});
}
function heatTheWater() {
return new Promise(resolve => {
setTimeout(() => {
console.log(`Done hea... |
import { SET_MESSAGE, CLEAR_MESSAGE } from "../actions/types";
const initialState = {};
// eslint-disable-next-line import/no-anonymous-default-export
export default function (state = initialState, action) {
const { type, payload } = action;
switch (type) {
case SET_MESSAGE:
return { message:... |
import { expect } from 'chai';
describe('multiplexEnsureState', () => {
it('should be tested', () => {
expect('a').to.equal('a');
});
});
|
import React, {useState, useEffect, useContext} from 'react';
import {Row, Column, Wrapper, WrapperImage, Divider, Div} from '../components/Sections'
import {H2, H3, H4, H5, Title, Separator, Paragraph} from '../components/Heading'
import {Colors, Button, Img, Anchor} from '../components/Styling'
import Card from '../c... |
import styled from 'styled-components';
export const MyMarker = styled.div`
width: 150px;
height: 100px;
padding: 5px 5px;
background: #414141;
display: flex;
align-items: center;
img {
width: 70px;
}
`;
|
!(function(undefined) {
var DEFAULTS,
GEO,
client,
circle,
marker,
map,
activeMapData,
keenMapData;
// DOM Elements
var appWrapperNode,
appMapAreaNode,
latNode,
lngNode,
radiusValueNode,
radiusUnitsNode,
timeframeStartNode,
time... |
import React from 'react';
import AccountSelect from './';
import configureMockStore from 'redux-mock-store';
import { Provider } from 'react-redux';
import { shallow } from 'enzyme';
const mockStore = configureMockStore();
const store = mockStore({});
describe('AccountSelect', () => {
it('should render correctly', ... |
import React from 'react'
import Router from 'next/router'
import Overdrive from 'react-overdrive'
import Modal from '../components/modal'
export default class extends React.Component {
static getInitialProps () {
return {
photos: new Array(15).fill(0).map((v, k) => k + 1)
}
}
constructor (props) ... |
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlug... |
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import './shell.js';
import './css_overview/css_overview-meta.js';
import './elements/elements-meta.js';
import './browser_debugger/browser_debugger-meta.j... |
const gulp = require('gulp');
const watch = require('gulp-watch');
const postcss = require('gulp-postcss');
const sass = require('gulp-sass');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
gulp.task('compileScss', function(){
return gulp.src('scss/app.scss')
.pipe(sass().on(... |
"""
This module extra functions/shortcuts to communicate with the system
(executing commands, etc.)
"""
import inspect
import os
import pwd
import re
import subprocess
from django.conf import settings
from django.utils.encoding import force_text
def exec_cmd(cmd, sudo_user=None, pinput=None, capture_output=True, **... |
import React from 'react';
import styled from 'styled-components';
import { StaticQuery, graphql } from 'gatsby';
import Img from 'gatsby-image';
import { Section, Container } from '@components/global';
const Cases = () => (
<StaticQuery
query={graphql`
query {
finance_easy: file(
source... |
import sys
import pprint
import re
class Generator:
def __init__(self, target_base_address = 0, src_base_address = 0, arch = 'x86', exclusions = None):
self.arch = arch
self.target_base_address = target_base_address
self.src_base_address = src_base_address
self.image_base_dif... |
import datetime
import os.path
import re
import setuptools
DEPENDENCIES = [
'SQLAlchemy',
'lxml',
'html5lib',
'hashids',
'pprintpp',
'aiohttp',
'aiodns',
'cssselect',
'aitertools',
'toml',
'docopt',
]
def _read(name):
with open(os.path.join(os.path.dirname(__file__),... |
import api from '../../api.js';
export const SchemeSelector = {
SCHEME: `:root${api.ns.attr.selector('theme')}, :root${api.ns.attr.selector('scheme')}`,
SWITCH_THEME: api.ns.selector('switch-theme'),
RADIO_BUTTONS: `input[name="${api.ns('radios-theme')}"]`
};
|
import React from 'react';
import { Platform } from 'react-native';
import { createStackNavigator, createBottomTabNavigator } from 'react-navigation';
import TabBarIcon from '../components/TabBarIcon';
import HomeScreen from '../screens/HomeScreen';
import MenuScreen from '../screens/MenuScreen';
import LinksScreen fr... |
(function() { const icons = {
"weather/aquarius": "M16.2 17.3L20 29l15.2-11.7L39 29.1 53.8 17l7 10.7 3.2-2.2-9.3-14.4L41 22.5l-3.8-11.6L22 22.6l-3.8-11.7L0 24.8l2.4 3.1 13.8-10.6zm38.5 18L41 46.5 37.1 35 22 46.6l-3.8-11.7L0 48.8 2.3 52l13.8-10.7L20 53l15.2-11.7L39 53.1 53.8 41l7 10.7 3.2-2.2-9.3-14.2z",
"weather/arie... |
export default {A:{A:{"2":"H E G qB","2561":"A B","2692":"D"},B:{"1":"EB M","2561":"9 C N I J K L"},C:{"1":"0 1 2 3 4 5 6 7 8 t u v w x y z FB HB DB AB IB JB KB LB MB NB OB PB QB","16":"nB","1537":"9 F q H E G D A B C N I J K L g R o S T U V W X Y Z a b c d e f CB h i j k l m n Q p O r s fB","1796":"SB gB"},D:{"1":"8 D... |
const { inspectItem } = require('./spy');
const { has, pipe, both } = require('ramda');
// Standard (borrowed from https://gist.github.com/Avaq/1f0636ec5c8d6aed2e45)
const I = x => x;
const K = x => () => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(... |
'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.createTable('Contacts', {
contactId: {
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV4,
primaryKey: true,
unique: true,
validate: {
isUUID: {
ar... |
'use strict';
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', inputStdin => {
inputString += inputStdin;
});
process.stdin.on('end', _ => {
inputString = inputString.trim().split('\n').map(string => {
retur... |
const router = require('express').Router();
const File = require('../models/file');
router.get('/:uuid', async (req, res) => {
try{
const file = await File.findOne({ uuid: req.params.uuid });
if(!file){
return res.render('download', { error: 'Link has been Expired.' });
... |
// noinspection JSUnresolvedVariable
let params = mp_ssv_monster_manager_params;
let monsterManager = {
addNew: function (containerId) {
let container = document.getElementById(containerId);
let tr = document.createElement('tr');
let properties = {
name: '',
hp: '1D... |
# Google Devices
#
# Listens for chromecast and home devices and monitors the ones it finds.
# New ones are added automatically and named using their friendly name
#
# Author: Dnpwwo, 2019
# Based on the Domoticz plugin authored by Tsjippy (https://github.com/Tsjippy)
# Huge shout out to Paulus Shoutsen... |
# -*-coding:utf-8 -*-
#
# Copyright (C) 2012-2015 Lianbi TECH Co., Ltd. All rights reserved.
# Created on 2015-03-09, by $USER
#
#
__author__ = 'Danny'
|
import { a, Button, makeStyles, Typography } from '@material-ui/core';
import React from 'react'
import FacebookIcon from '@material-ui/icons/Facebook';
import LinkedInIcon from '@material-ui/icons/LinkedIn';
import TwitterIcon from '@material-ui/icons/Twitter';
import InstagramIcon from '@material-ui/icons/Instagram';... |
/**
* jquery.ui.plupload.js
*
* Copyright 2013, Moxiecode Systems AB
* Released under GPL License.
*
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.button.js
* jquery.ui.progressbar.js
*
* ... |
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ng-zorro-antd/version",["exports","@angular/core"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"].... |
import React from "react";
import { Icon } from "components";
import filter from "lodash/filter";
import isUndefined from "lodash/isUndefined";
import { Screen } from "modules/common";
import { withStyles } from "@material-ui/core/styles";
import Label from "egov-ui-kit/utils/translationNode";
import { httpRequest } fr... |
const Prism = require('prismjs')
const { log } = require('saber-log')
const loadLanguages = require('./loadLanguages')
module.exports = (code, lang) => {
if (!lang) return Prism.highlight(code, {})
lang = lang.toLowerCase()
if (lang === 'vue') {
lang = 'html'
}
loadLanguages(lang)
const grammer = P... |
"use strict";
///<reference types="../../../../Core/Build/FudgeCore"/>
///<reference types="../../../../Aid/Build/FudgeAid"/>
var Flame;
///<reference types="../../../../Core/Build/FudgeCore"/>
///<reference types="../../../../Aid/Build/FudgeAid"/>
(function (Flame) {
var f = FudgeCore;
var fAid = FudgeAid;
... |
'use strict';
/**
* Dancing☆Onigiri (CW Edition)
* 旧バージョン定義変数・関数
*
* Source by tickle
* Created : 2019/11/19
* Revised : 2021/01/17 (v19.0.0)
*
* https://github.com/cwtickle/danoniplus
*/
// ユーザインタフェース
// カスタム側で変更できるようにletで定義している(v10以降のカラーコード類は互換関数以外の利用用途なし)
let C_CLR_DEFAULT = `#333333`;
let C_CLR_DEFAULTA ... |
"""The tests for the logbook component."""
# pylint: disable=protected-access,invalid-name
import logging
from datetime import (timedelta, datetime)
import unittest
from homeassistant.components import sun
import homeassistant.core as ha
from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_SERVICE,
EVENT_STA... |
module.exports = require("npm:stream-browserify@1.0.0/index.js"); |
#!/usr/bin/env python
#
# Copyright 2019 Rickard Armiento
#
# This file is part of a Python candidate reference implementation of
# the optimade API [https://www.optimade.org/]
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "... |
/**
* The MAC-48 address is six groups of two hexadecimal digits (0 to 9 or A to F),
* separated by hyphens.
*
* Your task is to check by given string inputString
* whether it's a MAC-48 address or not.
*
* @param {Number} inputString
* @return {Number}
*
* @example
* For 00-1B-63-84-45-E6, the output should... |
"use strict";
// Нужно написать функцию, принимающую строку
// в качестве аргумента и возвращающую количество гласных, которые содержатся в строке.
// Гласными являются «a», «e», «i», «o», «u».
// countValues('Hello');
// countValues('Bootcamp');
// Многоквартирный дом характеризуется следующими тремя показателями: э... |
console.log(Number.MAX_SAFE_INTEGER);
console.log(Number.MIN_SAFE_INTEGER);
var i = 1;
console.log(i);
i = i + ""; //oops
console.log(i + 1); //treats as a string
console.log(i - 1); //treats as a number
var k = "1";
k++; //treats as a number
console.log(k);
k = "1";
k += 1; //treats a... |
"use strict";
/*
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* ... |
"use strict";
var it = require('it'),
assert = require('assert'),
comb = require("../../index"),
Heap = comb.collections.Heap;
it.describe("comb.collections.Heap", function (it) {
var heap = new Heap();
it.should("throw an error when calling insert and remove methods", function () {
asser... |
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { animate, style } from '@angular/animations';
/** @type {?} */
export const COLLAPSE_ANIMATION_TIMING = '400ms cubic-bezier(0.4,0.0,0.2,1)';
/** @type {?} */
export cons... |
function main() {
let v3 = 0;
let v6 = 0;
let v11 = "undefined";
let v13 = "undefined";
let v16 = 0;
const v19 = [1337];
const v20 = {exec:v19};
const v22 = [13.37,13.37,13.37,13.37];
const v29 = [Function];
let v31 = "undefined";
let v35 = 0;
v35 = 10;
let v43 = 0;
const v44 = v22.splice(Object,1337,Function,v29,v20);... |
!function(n){n(".js-comments");function o(e,t){n(".js-modal-title").text(e),n(".js-modal-text").html(t),n("body").addClass("show-modal")}n(".js-form").submit(function(){var t=this;return n("#comment-form-submit").html('<svg class="icon spin"><use xlink:href="#icon-loading"></use></svg> Sending...'),n(t).addClass("disab... |
module.exports = [
'Formio',
'formioComponents',
'$interpolate',
function(
Formio,
formioComponents,
$interpolate
) {
return function(value, component) {
if (!value) {
return '';
}
if (!component || !component.type) {
return value;
}
var componentI... |
import React from 'react';
import createActions from './createActions';
import useAsyncReducer from '../../hooks/useAsyncReducer';
import reducer, { initialState } from './reducer';
export const CounterContext = React.createContext();
export const CounterProvider = ({ children }) => {
const [state, dispatch] = useA... |
from model.group import Group
def test_add_group(app, db, json_groups):
group = json_groups
old_groups = db.get_group_list()
app.group.create(group)
new_groups = db.get_group_list()
old_groups.append(group)
assert sorted(old_groups, key=Group.id_or_max) == sorted(new_groups, key=Group.id_or_max... |
import Upload from "./Upload.svelte";
export { Upload };
export default Upload; |
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):e.ReactAutocomplete=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){return function t(n,r,o){function i(l,s){if(!... |
var express = require('express'),
app = express(),
port = 3000;
app.use(express.static('public'));
var routes = require("./api/routes");
routes(app);
if (! module.parent) {
app.listen(port);
}
console.log("hey");
module.exports = app
console.log("Server running on port " + port);
|
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.17/esri/copyright.txt for details.
//>>built
require({cache:{"url:esri/dijit/metadata/types/arcgis/eainfo/templates/Hidden.html":'\x3cdiv data-dojo-attach-point\x3d"containerNode"\x3e\r\n\r\n \x3c!-- Geodatab... |
'use strict'
const BroccoliPluginAdapter = require('broccoli-plugin-adapter')
const Incrementer = require('./incrementer')
module.exports = class BroccoliVersion extends BroccoliPluginAdapter {
constructor(inputNodes, options) {
super(Array.isArray(inputNodes) ? inputNodes : [inputNodes], options)
... |
from unittest import TestCase
import math
import stats_test
import stats_test_correl_diff
class TestStatsTestCorrelDiff(TestCase):
def test_stats_test_correl_diff(self):
n1 = 80
n2 = 65
r1 = 0.538
r2 = 0.743
sigificance = 0.05
(is_reject, test_stat) = stats_test_co... |