text stringlengths 3 1.05M |
|---|
( function(){
// JlinkEXE Interfaces
// Documentation Source: https://www.segger.com/admin/uploads/productDocs/UM08001_JLink.pdf
const Promise = require("bluebird");
const spawn = require('child_process').spawn;
const utils = require('./utils');
let debug = false;
function JLinkError( message ){
this.const... |
Module.register("MMM-LunarDate", {
defaults: {
template: `
<p>
<br/>%LUNAR_YEAR_S60_C%年 %LUNAR_MONTH_S60_C%月(%LUNAR_LEAPMONTH_K%%LUNAR_MONTH_K%) %LUNAR_DAY_S60_C%日(%LUNAR_DAY_K%)
<br/>Day of %LUNAR_DAY_STEM_COLOR% %LUNAR_DAY_BRANCH_ZODIAC%
<br/>Month of %LUNAR_MONTH_STEM_COLOR% %LUNA... |
function consoleLevel(x) {
for (var i = 0; i < 12; ++i) {
console.log(x[i * 2]);
console.log(x[i * 2 + 1]);
}
}
function fillPacmanLevel(x) {
var ll;
var newLevel = [];
var PacLevel = document.getElementById("paclevel");
for (var i = 0; i < x.length; ++i) {
ll = x[i].spl... |
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as authenticateActions from '../../actions/authenticateActions';
import LoginComponent from '../../components/pages/Login/Login';
import * as globalAction from '../../actions/globalAction';
export con... |
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import Home1 from './components/Firstpage/pages/Home';
import SignUp from './components/Firstpage/pages/SignupPage';
import Pricing from './components/Firstpage/pages/PricingPage';
import Footer from './components/Firstpage/components/Footer/Foo... |
module.exports = {
compilers: {
solc: {
version: "0.5.16",
docker: true,
settings: {
optimizer: {
enabled: true,
runs: 200
},
evmVersion: "istanbul"
}
}
}
};
|
export default function hasBindingUnderPath(path, rootPath, name) {
if (!name) return false;
let binding = path.scope.getBinding(name);
function ok(path, candidates = [], constantViolation = false) {
if (constantViolation && !path.isVariableDeclarator()) {
return false;
}
if (path.findParent(p... |
var isTablet = Ti.App.VCC.isTablet;
L = function(key, hint, isNoRemoveRetrunCode) {
var str = hint === undefined ? Ti.Locale.getString(key) : Ti.Locale.getString(key, hint);
if (str === null) {
str = '';
}
if (!Ti.App.VCC.isAndroid && 0) {
var i = 1;
while (str.indexOf('%' + i + '$') >= 0) {
s... |
# 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... |
/**
* This file is part of PerSE. PerSE is a visual analytics app for
* event periodicity detection and analysis.
* Copyright (C) 2015 Brian Swedberg
*/
define([], function () {
var data = {};
/**
* This class acts as an abstract class for all data sets that are used by the app. This is needed t... |
#!/usr/bin/env python3
# Copyright (c) 2015-2019 The Cedicoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test processing of unrequested blocks.
Setup: two nodes, node0+node1, not connected to each other. No... |
/*
* Copyright (c) 2020. Stephan Mahieu
*
* This file is subject to the terms and conditions defined in
* file 'LICENSE', which is part of this source code package.
*/
//import {DateUtil} from '../common/DateUtil.js';
//import {XmlUtil} from '../common/XmlUtil.js';
'use strict';
browser.runtime.onMessage.addLi... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod){if("object"==("undefined"===typeof exports?"undefined":babelHelpers.typeof(exports))&&"object"==("undefined"===typeof module?"undefined":babelHelpers.typeof(module)))// CommonJS... |
module.exports = function (wallaby) {
return {
files: ['src/**/*.ts', '!src/**/__tests__/*.ts'],
tests: ['src/**/__tests__/*.ts'],
env: {
type: 'node',
runner: 'node'
},
testFramework: 'jest',
compilers: {
'**/*.ts?(x)': wallaby.compilers.typeScript({
typescript: requ... |
import React, { useState } from 'react'
import classNames from 'classnames'
import S from './UrlFetch.module.scss'
export default function UrlFetch({ userInput, setUserInput, setLoadingError }) {
const [url, setUrl] = useState('')
const fetchUrl = async (url) => {
let response;
try {
response = awai... |
import React from 'react'
import styled from 'styled-components'
import { injectIntl } from 'gatsby-plugin-intl'
import { useIntl } from 'gatsby-plugin-intl'
import { translateObject, translateId } from '../utils/translate'
import { useSiteMetadata } from '../hooks/use_site_metadata'
import Layout from '../components/... |
define(["require","exports","tslib","rondo/v1/store/bind_action_creators","rondo/v1/store/store"],(function(e,r,t,o,s){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),t.__exportStar(o,r),t.__exportStar(s,r)}));
//# sourceMappingURL=index.min.js-vflcrdpff.map |
/*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
;(function(h) {
function F(a, b, d) {
var c = a[0],
e = /er/.test(d) ? m : /bl/.test(d) ? s : l,
f =
d == H
? {
checked: c[l],
... |
import importlib
from django import VERSION
from django.conf import settings as django_settings
_cache = {}
class VersionsSettings(object):
"""
Gets a setting from django.conf.settings if set, otherwise from the
defaults defined in this class.
A magic accessor is used instead of just defining modul... |
// String
// creating a string
const school = "cod3r";
// It will give me the letter that is in index 4 (fourth letter counting from scratch)
console.log(school.charAt(4));
// taking the value inside the ask or unicode table
console.log(school.charCodeAt(3));
// When I have the digit and I want to know at what ind... |
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... |
// flow-typed signature: e9493bfa389f64f8aa87b1a7783b7baa
// flow-typed version: <<STUB>>/eslint-plugin-prettier_v^2.3.1/flow_v0.47.0
/**
* This is an autogenerated libdef stub for:
*
* 'eslint-plugin-prettier'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to s... |
"""mongotest URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... |
// Theirs
import React from 'react'
import HTML5Backend from 'react-dnd-html5-backend'
import { DragDropContext } from 'react-dnd'
import domtoimage from 'dom-to-image'
import ReadFileDropContainer, { DATA_URL, TEXT } from 'dropperx'
// Ours
import Page from '../components/Page'
import Button from '../components/Butto... |
from django.conf.urls import url
from wagtail.wagtailusers.views import users
urlpatterns = [
url(r'^$', users.index, name='index'),
url(r'^add/$', users.create, name='add'),
url(r'^([^\/]+)/$', users.edit, name='edit'),
]
|
# Back Scraper for New York Appellate Divisions 2nd Dept.
# CourtID: nyappdiv_2nd
# Court Short Name: NY
# Author: Andrei Chelaru
# Reviewer:
# Date: 2015-10-30
from juriscraper.opinions.united_states_backscrapers.state import ny
class Site(ny.Site):
def __init__(self, *args, **kwargs):
super(Site, self)... |
import request from '@/utils/request'
// 登录方法
export function register(username, password, code, uuid) {
const data = {
username,
password,
code,
uuid
}
return request({
url: '/system/user/register',
method: 'post',
data: data
})
}
// 获取用户详细信息
export function getInfo() {
return r... |
module.exports = {
all: `
select ap.class, ap.x, ap.y, ap.z, g.name as guild_name, g.guildid as guild_id, c.char_name, c.id as char_id, b.owner_id from buildings as b
left outer join actor_position as ap on b.object_id = ap.id
left outer join guilds as g on g.guildid = b.owner_id
left outer join chara... |
// contacts.js
import async from 'async'
import AWS, {
Config,
CognitoIdentityCredentials
} from 'aws-sdk';
import {
CognitoUserPool,
CognitoUserAttribute,
AuthenticationDetails,
CognitoUser
} from 'amazon-cognito-identity-js';
module.exports = (app, config, partials) => {
AWS.config.region... |
import React, { Component } from "react";
import "./blogPage.css";
import Loading from "../../WidgetsUI/Loading/loading";
import Moment from "react-moment";
import { connect } from "react-redux";
import { getBlog } from "../../actions/blog_actions";
import { bindActionCreators } from "redux";
import LikesHandler from ... |
import { __decorate } from "tslib";
import { padNumber, toInteger, isNumber } from '../util/util';
import { Injectable } from '@angular/core';
import * as i0 from "@angular/core";
import * as ɵngcc0 from '@angular/core';
export function NGB_DATEPICKER_PARSER_FORMATTER_FACTORY() {
return new NgbDateISOParserFormatte... |
import os
import sys
import importlib
from functools import partial, update_wrapper, wraps
import numpy as np
import addons
import json
__all__ = []
def parameterize(func):
@wraps(func)
def decorator(*args, **kwargs):
return lambda x: func(x, *args, **kwargs)
return decorator
@parameterize
def ex... |
var baseFlatten = require('../internal/baseFlatten'),
bindCallback = require('../internal/bindCallback'),
pickByArray = require('../internal/pickByArray'),
pickByCallback = require('../internal/pickByCallback'),
restParam = require('../function/restParam');
/**
* Creates an object composed of the pick... |
splinterlands.Player = class {
constructor(data) {
Object.keys(data).forEach(k => this[k] = data[k]);
this.league = new splinterlands.League(data.rating, data.league);
this.next_tier = (!this.league.is_max_league) ?
new splinterlands.League(null, data.league+1) :
new splinterlands.League(null, d... |
'use strict';
document.addEventListener('DOMContentLoaded', function () {
console.log('Hello Bulma!');
});
var app = new Vue({
el: '#app',
data: {
itemsInCart: [],
isActive: false,
items: [
{
imgSrC: "https://source.unsplash.com/TD4DBagg2wE/4889×3728",
name: "Mighty Toraja",
... |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="synthetic_data",
version="1.0.0",
author="Karan Bhanot",
author_email="bhanotkaran22@gmail.com",
description="Package that enables generation of synthetic data",
long_description=long_... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const pip_services3_commons_node_1 = require("pip-services3-commons-node");
const pip_services3_rpc_node_1 = require("pip-services3-rpc-node");
class SmsHttpClientV1 extends pip_services3_rpc_node_1.CommandableHttpClient {
constructor(conf... |
const path = require('path')
module.exports = {
pathPrefix: '/arcon',
plugins: [
{
resolve: "smooth-doc",
options: {
name: 'Arcon',
slug: 'arcon',
title: 'Hej',
author: 'Arcon Developers',
description: 'State-first Streaming Applications in Rust',
sit... |
export const policyStatus = [
{
id: 0,
'zh-TW': '已提交',
'zh-CN': '已提交',
'en': 'Submitted'
},
{
id: 1,
'zh-TW': '核保中',
'zh-CN': '核保中',
'en': 'Pending'
},
{
id: 5,
'zh-TW': '反邀约',
'zh-CN': '反邀约',
'en': 'Counteroffer'
},
{
id: 2,
'zh-TW': '已生效',
'zh-... |
import copy
import logging
from decimal import Decimal
import pandas as pd
from great_expectations import DataContext
from great_expectations.checkpoint import Checkpoint
from great_expectations.core.batch import BatchRequest, RuntimeBatchRequest
from great_expectations.core.util import (
convert_to_json_serializ... |
/* **************************************************************
* Synapse - Desktop Client
* @author Marco Fernandez Pranno <mfernandezpranno@gmail.com>
* @licence MIT
* @link https://github.com/SynapseNetwork/Synapse-Desktop
* @version 1.0
* ****************************************************... |
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
var cleanCss = require('gulp-clean-css');
var del = require('del');
const htmlmin = require('gulp-htmlmin');
const cssbeautify = require('gulp-cssbeautify');
var gulp = require('gulp');
const npmDist = require('gulp-npm... |
/*! For license information please see vendors.e78137d0.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[216],{5026:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},2784:(e,t,n)=>{"use strict";function r(e,t){for(var... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
from django.conf import settings
from channels.generic.websocket import AsyncJsonWebsocketConsumer
class TeamConsumer(AsyncJsonWebsocketConsumer):
##### WebSocket event handlers
async def connect(self):
"""
Called when the websocket is handshaking as part of initial connection.
"""
... |
import React from 'react';
import PropTypes from 'prop-types';
import { gettext } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
import { Modal, ModalHeader, ModalBody, ModalFooter, Input, Button } from 'reactstrap';
class CreateGroupDialog extends React.Component {
constructor(... |
// @flow
require('now-env');
import AWS from 'aws-sdk';
import shortid from 'shortid';
import _ from 'lodash';
import Raven from 'shared/raven';
import sanitize from 'sanitize-filename';
import UserError from './UserError';
const IS_PROD = process.env.NODE_ENV === 'production';
import type { FileUpload, EntityTypes }... |
##########################################################################
#
# Configure different suites here
#
##########################################################################
# A suite is an assemblage of variables to plot in one or more sub-plots
# along with some configuration and meta-data about the va... |
class Log {
/**
* Constructor
*
* @param {string} appName
* @param {object} server of Kibana/Investigate
* @param {string} place where instantiated
*/
constructor(appName, server, place) {
this.appName = appName;
this.server = server;
this.place = place;
}
/**
* Info message
*
* @... |
$(document).ready(function () {
// Build the chart
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Browser market shares January, 20... |
import math
from typing import Callable, Optional
import chex
import jax.numpy as jnp
import numpy as np
import jax
SquaredMatrixElement = Callable[[chex.Array], chex.Numeric]
def kallen_lambda(a, b, c):
return a**2 + b**2 + c**2 - 2 * a * b - 2 * a * c - 2 * b * c
def _rambo_init(key: chex.Array, n: int, ba... |
// Copyright (c) 2021, Framras AS-Izmir and contributors
// For license information, please see license.txt
frappe.ui.form.on('UBL TR ShipmentStage', {
// refresh: function(frm) {
// }
});
|
define(function(require,exports,module){
var $ = require('jquery');
var ajax = {
init: function(options,okFn,errFn,btn){
var self = this;
if (btn) {
btn = $(btn);
if (btn.hasClass('btn-disabled')) {
return;
}
btn.add... |
const { App } = require('@slack/bolt');
const { config } = require('dotenv');
config();
const app = new App({
token: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
});
/**
* Messages can be listened for, using specific words and phrases.
* Note: your Slack app *must* be subscribed... |
/**
* @license Apache-2.0
*
* Copyright (c) 2022 The Stdlib Authors.
*
* 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 a... |
/*global module*/
/*jshint
camelcase: false
*/
module.exports = function ( grunt ) {
'use strict';
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
return {
options: {
mangle: ('<%= projectconfig.release.uglify.mangle%>' === 'true'),
beautify: ('<%= projectconfig.release.uglify.beautify%>' === 'true'),
p... |
N=int(input())
c=1
while c<=N:
c=c+1
if c%2==0:
print("%d^2 = %d" %(c,c**2))
|
var anime_id =location.search.slice(1);
fetch("https://api.jikan.moe/v3/anime/"+anime_id+"/episodes")
.then(res => res.json())
.then(data => {
console.log(data);
document.getElementById("dataEpisodes").innerHTML += `<a href="anime.html?${anime_id}" class="back"><i class="fas fa-arrow-alt-circle-left"><... |
from typing import Any, Iterator, Optional
from tilecloud import Tile, TileStore
class FindFirstTileStore(TileStore):
def __init__(self, tilestores: Iterator[TileStore], **kwargs: Any):
TileStore.__init__(self, **kwargs)
self.tilestores = tilestores
def get_one(self, tile: Tile) -> Optional[... |
import { selectTask } from "./stats.js";
export class Task extends window.HTMLElement {
constructor(task) {
super();
const myStorage = window.localStorage;
const tasks = document.getElementById("tasks");
const shadow = this.attachShadow({ mode: "open" });
const wrapper = document.createElement... |
//Ext.onReady(function() {
//import { NgZone } from '@angular/core';
//import { Router } from '@angular/router';
var ExtGridshowingroupsmenuitemComponent_1;
import * as tslib_1 from "tslib";
import { Host, Optional, SkipSelf, Component, ElementRef, forwardRef } from '@angular/core';
import { EngBase } from './eng-base'... |
if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
if (!__coverage__['build/aui-node-html5/aui-node-html5.js']) {
__coverage__['build/aui-node-html5/aui-node-html5.js'] = {"path":"build/aui-node-html5/aui-node-html5.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13"... |
# Copyright (c) 2015 EMC Corporation.
# 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... |
var permissions = function() {
var hPermissions = [];
var sCommands;
var aPush = function(t) {
if(!hPermissions.includes(t)) {
hPermissions.push(t);
}
};
var aDelete = function(t) {
for( var i = 0; i < hPermissions.length; i++){
if ( hPermissions... |
const {jsdoc2md} = require("../lib/util");
const {promisify} = require("util");
const fs = require("fs");
module.exports = (config, target) => {
return async () => {
return promisify(fs.writeFile)(
target,
await jsdoc2md(config)
);
};
};
|
"use strict";
const testUtils = require("../../../../lib/utils/test-utils");
const utils = require("./utils");
describe("Check that only no transaction was accepted", () => {
it("should have no transaction accepted", async () => {
const response = await testUtils.GET("transactions");
testUtils.exp... |
'use strict';
const http = require('http');
const url = require('url');
const ws = require('ws');
/**
* Minimum viable WebSocket server for Node.js that works through the Primus
* interface.
*
* @runat server
* @api private
*/
module.exports = function server() {
this.service = new ws.Server(Object.assign({
... |
/////////////////////////////////////////////////////////////////////////
// 通达信语法 webapi 处理类
//
var HQChart=require('./jscommon/umychart.node');
////////////////////////////////////////////////////////////////////////////
// symbol:[] 股票列表
// code: 脚本
// args: 脚本参数 (可选)
// maxdatacount: 日线数据计算多少天 (可选... |
module.exports = [
{
name: 'Script',
lang: 'js',
content: `
User.delete('1;2;3;4')
`,
},
{
name: 'Resultado',
lang: 'Promise',
content: `
{
"amount": 4
}
`,
},
] |
"use strict";
const fs = require("fs");
const { Transform, pipeline } = require("stream");
// Use a 3rd party package to work with CSV data
const parseCsv = require("csv-parse");
const stringify = require("csv-stringify");
const { logPretty, ConsoleColor } = require("./utils");
// Backpressure is built in to node.js... |
#
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# 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 ... |
/* global describe expect it beforeEach */
import queryAction from '../../../src/actions/query'
import {
watchEvent,
unWatchEvent,
watchEvents,
unWatchEvents
} from '../../../src/actions/query'
import {
unsetWatcher
} from '../../../src/utils/query'
let spy, unWatch
const dispatch = () => {
}
describe('Actio... |
/* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2007-2008 1&1 Internet AG, Germany, http://www.1und1.de
License:
MIT: https://opensource.org/licenses/MIT
See the LICENSE file in the project'... |
"use strict";
// Release 1.02 5 OPC Unified Architecture, Part 8
// HasProperty Variable Definition String PropertyType Optional
// HasProperty Variable ValuePrecision Double PropertyType Optional
// Clients may read or write DataItems, or monitor them for value changes. The services needed for
// these ... |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
class virwox (Exchange):
def descri... |
/* eslint-env es6 */
/* eslint-disable lines-around-comment */
/* global loadRelativeToScript */
loadRelativeToScript( "../qunit/qunit.js" );
QUnit.on( "runStart", () => {
print( "Running tests..." );
} );
QUnit.on( "testEnd", ( testEnd ) => {
if ( testEnd.status === "todo" ) {
return;
}
testEnd.errors.forEach(... |
"""
Functions that ignore NaN.
Functions
---------
- `nanmin` -- minimum non-NaN value
- `nanmax` -- maximum non-NaN value
- `nanargmin` -- index of minimum non-NaN value
- `nanargmax` -- index of maximum non-NaN value
- `nansum` -- sum of non-NaN values
- `nanmean` -- mean of non-NaN values
- `nanvar` -- variance of... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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 a... |
import * as settings from './settings.js';
let _hostname;
let _rules = [];
let _operation = "add";
let _selectedIndex = -1;
const days = ["Sunday", "Monday", "Teusday", "Wednesday", "Thursday", "Friday", "Saturday"];
let UIButtonAddRule = document.getElementById("ruleFormSubmit");
let UIInputRuleEndTime = document.ge... |
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['r... |
import React, { useEffect, useState } from "react";
import styled from "styled-components";
function Home() {
const [headerHeight, setheaderHeight] = useState();
useEffect(() => {
setheaderHeight(document.querySelector("header").offsetHeight + 10);
}, []);
const [productData, setproductData] = useState();... |
import torch
from .base_assigner import BaseAssigner
from .assign_result import AssignResult
from ..geometry import bbox_overlaps
class MaxIoUAssigner(BaseAssigner):
"""Assign a corresponding gt bbox or background to each bbox.
Each proposals will be assigned with `-1`, `0`, or a positive integer
indica... |
import { wrapper } from './Footer.module.css';
export default function Layout() {
return (
<footer>
<div className={wrapper}>
<h3>THANKS FOR VISITING</h3>
<p>© 2021 #ReactMarathon.</p>
</div>
</footer>
);
} |
(function(){var MutationObserver,Util,WeakMap,__bind=function(fn,me){return function(){return fn.apply(me,arguments);};},__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item)return i;}return-1;};Util=(function(){function Util(){}
Util.prototype.extend=function(custom,defa... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.db.models import AutoField
from django.forms import ValidationError, ModelForm
from django.http import HttpResponseRedirect
from django.shortcuts import... |
import { useEffect, useState, React } from "react";
import TopContent from "./TopContent";
import RelatedContent from "./RelatedContent";
import Review from "./Review/Review";
import { useParams } from "react-router-dom";
import "../../../css/detail.css";
export default function Detail() {
const { product_id } = us... |
"""Unit test package for hermod."""
|
import request from './request1'
export function getSelf () {
return request({
method: 'GET',
url: '/app/v1_0/user'
})
} |
module.exports =
/******/ (function(modules, runtime) { // webpackBootstrap
/******/ "use strict";
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/... |
import React from 'react';
import Drawer from '..';
import { render, fireEvent } from '../../../tests/utils';
describe('Drawer', () => {
const getDrawer = props => (
<Drawer visible getContainer={false} {...props}>
Here is content of Drawer
</Drawer>
);
it('render correctly', () => {
const { c... |
const PlayerAction = require('./PlayerAction');
const { EventNames } = require('../Constants');
class DrawAction extends PlayerAction {
setDefaultProperties() {
this.amount = 1;
}
setup() {
super.setup();
this.name = 'draw';
this.effectMsg = 'draw ' + this.amount + ' cards'... |
var server = require('ws').Server;
var wss = new server({ port: 5001 });
wss.on('connection', function (ws) {
ws.send('welcome to the cyber chat');
setInterval(() => {
ws.send('Series received ' + Date.now());
}, 100);
ws.on('message', (message) => {
console.log(message)
... |
/* eslint-disable no-unused-vars */
import React from 'react'
import useUser from '../../hooks/use-user'
import User from "./user"
import Suggestions from "./suggestions"
const Sidebar = () => {
const {user: {fullName ,username , userId}} = useUser();
return (
<>
<div className="p-4">
... |
/*! ramp-theme-fgp-int 10-07-2015 14:25:04 : v. 5.5.0-9
*
* RAMP GIS viewer - Groundhog; Sample of an implementation of RAMP with Intranet Theme
**/
define(["ramp/graphicExtension","ramp/eventManager","dojo/topic","dojo/dom-construct","utils/util"],function(a,b,c,d,e){"use strict";return{onFeatureSelect:function(... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { TabView, TabPanel } from '../../components/tabview/TabView';
import { CodeHighlight } from '../codehighlight/CodeHighlight';
import { useLiveEditorTabs }from '../liveeditor/LiveEditor';
export class DropdownDoc extends Componen... |
const path = require('path')
const { IMAGES, FONTS } = require('../utils/patterns.js')
const debug = require('@ff0000-ad-tech/debug')
const log = debug('DM:plugins:assets-config-default')
const get = (DM, sourceContext, outputContext) => {
return {
aggregators: [
{
entry: 'build',
filter: {
type: ... |
// THIS FILE IS AUTO GENERATED
var GenIcon = require('../lib').GenIcon
module.exports.GiChessBishop = function GiChessBishop (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M406.02 476.915h-300v-60h300v60zm-83.46-181H189.48v17.65h133.08v-17.65zm11.78-77.69a20... |
'use strict';
// Special Handling to inform users about reporting plugins correctly
module.exports.isReportingPlugin = name => {
return name === 'sentry';
};
module.exports.PLUGIN_INFOS = {
sentry: {
headline: {
en: 'ATTENTION: Error reporting via Sentry will be activated on next start of ... |
'use strict';
class InlineChunkHtmlPlugin {
static inlinedTagInfos = new Map()
.set('script', {
sourceTagName: 'script',
targetTagName: 'script',
predicate: _tag => true,
getAssetName: tag => tag && tag.attributes && tag.attributes.src,
})
.set('link', {
sourceTagName: 'link... |
from functools import wraps
import magma as m
from magma.bitutils import seq2int
from mantle import And, NAnd, Or, NOr, XOr, NXOr, LSL, LSR, Not, Invert, UDiv, SDiv, UMod, SMod, Mul
from mantle import ASR
from mantle import EQ, NE, ULT, ULE, UGT, UGE, SLT, SLE, SGT, SGE
from mantle import Mux
from .arith import Add, S... |