text stringlengths 3 1.05M |
|---|
//// [tests/cases/compiler/es6ImportNamedImportNoNamedExports.ts] ////
//// [es6ImportNamedImportNoNamedExports_0.ts]
var a = 10;
export = a;
//// [es6ImportNamedImportNoNamedExports_1.ts]
import { a } from "es6ImportNamedImportNoNamedExports_0";
import { a as x } from "es6ImportNamedImportNoNamedExports_0";
//// [... |
function checkid() // Used in room details - admin
{
var xmlhttp;
var id=document.getElementById("mid").value;
if (id != "")
{
document.getElementById("checkloading").innerHTML=" <img src='images/loading.gif'/>";
if (window.XMLHttpRequest) // code for IE7+, Firefox,... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云(BlueKing) available.
Copyright (C) 2017 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 with the License.
You may obt... |
var searchData=
[
['offset',['offset',['../structarm__compute_1_1_c_l_quantization.xhtml#adaa6aafa40524cb5b286e22b87a8da4f',1,'arm_compute::CLQuantization::offset()'],['../structarm__compute_1_1_uniform_quantization_info.xhtml#a97bd6c077f3c7769f575b82988b9b668',1,'arm_compute::UniformQuantizationInfo::offset()']]],
... |
import {LOGIN_USER, REGISTER_USER,AUTH_USER, LOGOUT_USER} from '../_actions/types'
const initialState = {
userData:{
id: "",
email: "",
isAdmin: false,
isAuth: false,
role: "None"
}
}
export default function(prevState = initialState, action){
switch (action.type) {
... |
/*********************************************
* samples/yIndexedDB/js/yloader.js
* YeAPF 0.8.62-214 built on 2019-06-03 17:33 (-3 DST)
* Copyright (C) 2004-2019 Esteban Daniel Dortta - dortta@yahoo.com
* 2019-06-03 17:33:26 (-3 DST)
* First Version (C) 2014 - esteban daniel dortta - dortta@yahoo.com
* Purp... |
import Vue from 'vue'
describe('Router node', () => {
it('Sets globals correctly', () => {
window.Vue = undefined
global.Vue = Vue
require('../src/router.js')
})
})
|
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel appli... |
!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"... |
# -*- coding: utf-8 -*-
import re
from setuptools import setup
from setuptools import find_packages
REQUIRES = [
'six>=1.9.0',
'blinker>=1.3',
]
def find_version(fname):
"""Attempts to find the version number in the file names fname.
Raises RuntimeError if not found.
"""
version = ''
wi... |
export function toExcelfile(response) {
console.log(response.headers['content-disposition'])
var filename =
response.headers['content-disposition'] &&
response.headers['content-disposition']
.split(';')[1]
.split('filename=')[1]
if (filename) {
filename =
... |
import React from 'react'
import { Link } from 'gatsby'
import Layout from '../components/layout'
import Head from '../components/head'
const IndexPage = () => {
return (
<Layout>
<Head title="Home" />
<h1>Hello!</h1>
<h2>I'm Alexis, a full-stack developer living in Northern New Jersey </h2>
... |
const INITIAL_STATE = {
isSignedIn: null,
authToken: null
}
export default (state = INITIAL_STATE, action) =>{
switch(action.type){
case "SET_TOKEN":
return {...state, authToken: action.payload};
case "RESET_TOKEN":
return {...state, authToken: null};
default... |
const Engine = Matter.Engine;
const World = Matter.World;
const Bodies = Matter.Bodies;
let engine;
let world;
var ball;
var ground;
var con;
var ball2;
var con2;
function setup() {
createCanvas(400,400);
engine = Engine.create();
world = engine.world;
var ball_options = {
restitution: 0.8
}
... |
import { Matrix } from './matrix';
describe('Matrix', () => {
test('extract row from one number matrix', () => {
expect(new Matrix('1').rows[0]).toEqual([1]);
});
xtest('can extract row', () => {
expect(new Matrix('1 2\n3 4').rows[1]).toEqual([3, 4]);
});
xtest('extract row where numbers have diffe... |
import colorama
'''
Fore: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET.
Back: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET.
Style: DIM, NORMAL, BRIGHT, RESET_ALL
'''
switcher = {
'r':colorama.Fore.RED,
'bk':colorama.Fore.BLACK,
'b':colorama.Fore.BLUE,
'g':colorama.Fore.G... |
"""Unit tests for the events module."""
from collections import namedtuple
from datetime import datetime
from io import BytesIO
import logging
import os
import sys
import time
import pytest
from pydicom.dataset import Dataset
from pydicom.tag import BaseTag
from pydicom.uid import ImplicitVRLittleEndian
from pydicom... |
const browserSync = require('browser-sync');
const veamsConfig = require('../../../veams-cli.json');
const bs = browserSync.create().init({
proxy: 'localhost:' + veamsConfig.ports.server,
port: veamsConfig.ports.app,
notify: false,
logSnippet: false,
open: false,
ghostMode: {
click: false,
form: false,
scr... |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements a Composition class to represent compositions,
and a ChemicalPotential class to represent potentials.
"""
import collections
import numbers
import string
from itertools import combin... |
var callbackArguments = [];
var argument1 = function (a, b) {
callbackArguments.push(arguments)
i++;
if (i <= 4) {
arr.push(a + 3);
}
;
return b;
};
var argument2 = {"9":"","82":"","1.2046085457251676e+308":25,"*":"","":607,"1.6976496892495883e+308":460};
var argument3 = "}W1";
var ... |
// define filters here
// filter to get ceiling value
(function() {
'use strict';
angular
.module('evalai')
.filter('ceil', ceil);
function ceil() {
return function(input) {
return Math.ceil(input);
};
}
angular.module('evalai')
.filter('forma... |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { ExplanatoryNote } from './';
import { withKnobs, text, boolean } from '@storybook/addon-knobs';
const html = `
<div>
<p>ExplanatoryNote body</p>
<p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</p>
</div>`;
const s... |
module.exports = {
setupFiles: ['./jest-setup.ts'],
moduleFileExtensions: ['js', 'ts'],
moduleNameMapper: {
'@pebula/(.*)': '<rootDir>/../$1'
},
rootDir: '.',
testEnvironment: 'node',
testRegex: '\.spec.ts$',
transform: {
'^.+\\.(t)s$': 'ts-jest'
},
modulePathIgnorePatterns: ['<rootDir>/cjs... |
import { LocalStarStorage } from "../LocalStarStorage.js";
import { ScheduleList } from "../ScheduleList.js";
const scheduleListElement = document.getElementById("schedule");
const scheduleList = new ScheduleList(
scheduleListElement,
new LocalStarStorage(localStorage)
);
scheduleList.startDownload();
// SIG... |
import {api, track, LightningElement} from 'lwc';
export default class QuickChoiceCpe extends LightningElement {
_builderContext;
_values;
@track inputValues = {
displayMode: {value: null, valueDataType: null, isCollection: false, label: 'Display the choices as:'},
isResponsive: {value: nu... |
/**
* 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.
*/
import React, {useState} from 'react';
import clsx from 'clsx';
import {
useThemeConfig,
useAnnouncementBar,
MobileSecondaryM... |
"use strict";
/**
* @license
* Copyright 2017 Google 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... |
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ?
'/neil-vue-ui-website/' : '/'
} |
import React, {Component, PropTypes} from 'react';
import {DragDropContext} from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import { Link } from 'react-router';
import List from './List';
class KanbanBoard extends Component {
render() {
let cardModal=this.props.children && React.cloneE... |
export default function(ig) {
ig.Loader = ig.Class.extend({
resources: [],
gameClass: null,
status: 0,
done: false,
_unloaded: [],
_drawStatus: 0,
_intervalId: 0,
_loadCallbackBound: null,
init: function( gameClass, resources ) {
this.gameClass = gameClass;
this.resources = resources;
this._load... |
from email import policy
from email.parser import BytesParser
class objectview(object):
def __init__(self, d):
self.__dict__ = d
|
import { dosvg, enumerate } from './helpers.js'
import ShaderCanvas from './ShaderCanvas.js'
const EPSILON = 1e-6
const notNull = x => x < -EPSILON || x > EPSILON
const ceil = (x, step = 1) => Math.ceil(x / step) * step
const enumerateCeil = (min, max, step) => enumerate({ min:ceil(min, step), max:ceil(max, step), s... |
const { Message } = require('discord.js')
module.exports = {
name : 'removerole',
aliases : ['r-role'],
run : async(client, message, args) => {
//lets use parameters (optional)
/**
* @param {Message} message
*/
//so firstly we will check whether the author of the m... |
/*! =========================================================
*
* Material Kit Free - V1.1.0
*
* =========================================================
*
*
* _oo0oo_
* o8888888o
* 88" . "88
* (| -_- |)
* ... |
'use strict';
var assert, isObjectBrace;
assert = require('assert');
isObjectBrace = require('../index');
describe('IS-OBJECT-BRACE', function() {
describe('#isObjectBrace()', function() {
it('should return false, when passed {}', function() {
assert.equal(true, isObjectBrace({}));
});
it('should... |
# from django.shortcuts import render
from rest_framework import generics, authentication, permissions
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
from .serializers import UserSerializer, AuthTokenSerializer
class CreateUserView(generics.CreateAPIView):
... |
(function(d){ const l = d['sr-latn'] = d['sr-latn'] || {}; l.dictionary=Object.assign( l.dictionary||{}, {"%0 of %1":"%0 of %1","Align cell text to the bottom":"Poravnajte tekst ćelije prema dole","Align cell text to the center":"Poravnajte tekst ćelije u sredinu","Align cell text to the left":"Poravnajte tekst će... |
var BaseObject, DependenciesExt, Dependency, _, log, parse, rek, semver,
slice = [].slice,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { thi... |
export function createToken() {
return { Authorization: localStorage.getItem("token") }
}
|
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err;... |
#!/usr/bin/python
"""
Pygame script to test that the algorithm works.
"""
import sys
import pygame
from pygame.locals import *
import gjk
pygame.init()
SCREEN = pygame.display.set_mode((800, 600))
CLOCK = pygame.time.Clock()
BLACK = ( 0, 0, 0)
WHITE = (255, 255, 255)
BLUE = ( 0, 0, 255)
GREEN = ( 0, 255... |
"""
Django settings for price_comparison_gp3 project.
Generated by 'django-admin startproject' using Django 3.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
... |
# Copyright 2018 The Face-MagNet 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 applic... |
/*
* @flow
* Copyright (C) 2018 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/
import * as React from 'react';
import {withCatalystContex... |
import React from 'react'
import axios from 'axios'
class PersonList extends React.Component {
state = {
personDetail: [],
isLoading: true
}
componentDidMount() {
let pathname = this.props.location.pathname.substr(1).split('/')[1]
axios.get(`https://jsonplaceholder.typicode.com/users/${pathname}... |
const path = require("path");
/** @type {import("../../../../").Configuration} */
module.exports = {
snapshot: {
managedPaths: [path.resolve(__dirname, "node_modules")]
},
plugins: [
compiler => {
compiler.hooks.done.tap("Test", ({ compilation }) => {
const fileDeps = Array.from(compilation.fileDependenc... |
var chai = require('chai');
var sinonChai = require('sinon-chai')
var expect = chai.expect
chai.use(sinonChai)
var sinon = require('sinon');
var path = require('path');
var fse = require('fs-extra');
var config = require('../../../../src/cli').config
config.set({root: path.join(process.cwd(), 'tests', 'unit', 'fixture... |
var assert = require('assert');
var normalizeNewline = require('normalize-newline');
var read = require('read-file-relative').readSync;
var createReport = require('./utils/create-report');
it('Should produce a basic report', function () {
var report = createReport(true);
var expecte... |
!function(e){function r(r){for(var n,p,l=r[0],a=r[1],f=r[2],c=0,s=[];c<l.length;c++)p=l[c],Object.prototype.hasOwnProperty.call(o,p)&&o[p]&&s.push(o[p][0]),o[p]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(i&&i(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r... |
# Do not edit. bazel-deps autogenerates this file from dependencies.yaml.
def list_dependencies():
return [
# duplicates in org.scala-lang:scala-library promoted to 2.12.6
# - org.scalacheck:scalacheck_2.12:1.13.5 wanted version 2.12.0
# - org.typelevel:cats-core_2.12:1.4.0 wanted version 2.... |
const joinPath = require('path').join
const shell = require('shelljs')
const regex = /[^\/]+/g
const projectPath = shell.pwd().stdout
const match = projectPath.match(regex)
const projectDir = match.pop()
module.exports = {
/**
* Default Salesforce DX project source path
* @default config.projectPath + '/force... |
const course11tydata = require('../../../../_utils/course-11tydata.js');
module.exports = course11tydata('forms');
|
var mongoose = require('mongoose');
var deepPopulate = require('mongoose-deep-populate')(mongoose);
var CommentSchema = new mongoose.Schema( {
body : String,
author : String,
upvotes : { type: Number, default: 0 },
date : { type: Date },
post : { type: mongoose.Schema.Types.Objec... |
import { getDefaultMutations, getDefaultTypes } from '../../src/index'
describe('getDefaultMutations', () => {
test('should be defined', () => {
expect(getDefaultMutations).toBeDefined()
})
test('should be a function', () => {
expect(getDefaultMutations).toEqual(expect.any(Function))
})
test('shoul... |
//>>built
define("dojox/lang/aspect/memoizer",["dijit","dojo","dojox"],function(_1,_2,_3){
_2.provide("dojox.lang.aspect.memoizer");
(function(){
var _4=_3.lang.aspect;
var _5={around:function(_6){
var _7=_4.getContext(),_8=_7.joinPoint,_9=_7.instance,t,u,_a;
if((t=_9.__memoizerCache)&&(t=t[_8.targetName])&&(_6 in t)){... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
// generated by genversion
exports.version = '1.29.4';
//# sourceMappingURL=version.js.map |
/**
* @file 基础 webpack 配置文件,开发环境和生产环境公用的
* @author brandonxiang(1542453460@qq.com)
*/
/* eslint-disable no-console */
const webpack = require('webpack');
const path = require('path');
const utils = require('./utils');
const config = require('../config');
const vueLoaderConfig = require('./vue-loader.conf');
const ... |
import os
import sys
from flask import Flask, send_from_directory
from annotator.annotator import Annotator
from os import fspath
from flask.helpers import safe_join
from flask import json, jsonify
import config
annotator = Annotator()
app = Flask(__name__)
def _getSafeImagePath(filename):
filename = fspath(fil... |
window.console.log('Hello from Password Layout 👋.')
|
import sys
from Bio import SeqIO
idfile, fafile = sys.argv[1:]
fa = SeqIO.index_db("{}.db".format(fafile))
with open(idfile) as fh:
for line in fh:
seqid = line.strip()
s = fa[seqid].seq
print(s)
|
const Promise = require('bluebird');
const EagerOperation = require('./EagerOperation');
const { isMsSql } = require('../../../utils/knexUtils');
const { asArray, flatten, chunk } = require('../../../utils/objectUtils');
const { Type: ValidationErrorType } = require('../../../model/ValidationError');
class WhereInEag... |
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
const Hexagon = forwardRef(({ color, size, ...rest }, ref) => {
return (
<svg
ref={ref}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
width={size}
height={size}
fill={color}
{...rest}... |
var NumeralFont = require("fontclock.font.js");
const DIM_20x58 = [20, 58];
const DIM_30x58 = [30, 58];
const DIM_40x58 = [40, 58];
const DIM_50x58 = [50, 58];
class DigitNumeralFont extends NumeralFont {
constructor() {
super();
// dimension map provides the dimesions of the character for
... |
# -*- encoding: utf-8 -*-
#
# Copyright © 2020 Mergify SAS
#
# 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 applicabl... |
define(["exports","./when-54c2dc71","./Check-6c0211bc","./Math-1124a290","./Cartesian2-36f5627e","./Transforms-441ed215","./ComponentDatatype-a26dd044","./AttributeCompression-b0deedfd"],function(e,S,u,f,b,T,o,C){"use strict";function t(e,t){u.Check.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=ne... |
const MySQL_db = (require('../utils/db')).MySQL_db
class GoodsModel {
static async goodsNos2goodsNames(list) {
let sql = `select goodsName from goods where goodsNo in (`
for(let i=0; i<list.length-1; i++) {
sql += `${list[i]},`
}
sql += `${list[list.length-1]})`
let data = await MySQL_db(sql)
return da... |
from __future__ import print_function
import numpy as np
import netCDF4 as nc
from .base_grid import BaseGrid
class WoaGrid(BaseGrid):
def __init__(self, grid_def, calc_areas=True):
with nc.Dataset(grid_def) as f:
x_t = f.variables['lon'][:]
y_t = f.variables['lat'][:]
... |
import { NotImplementedError } from '../extensions/index.js';
/**
* Given a number, replace this number with
* the sum of its digits until we get to a one digit number.
*
* @param {Number} n
* @return {Number}
*
* @example
* For 100, the result should be 1 (1 + 0 + 0 = 1)
* For 91, the result should be 1 (9 +... |
import {
NativeModules
} from 'react-native';
const PromptAndroid = NativeModules.PromptAndroid;
export type PromptType = $Enum<{
/**
* Default alert with no inputs
*/
'default': string,
/**
* Plain text input alert
*/
'plain-text': string,
/**
* Secure text inp... |
define(function (require, exports, moudles) {
var $ = require('jquery');
var template = require('template');
var $baseRoot=$("#baseRoot");
var baseRoot=$baseRoot.attr("href");
var url=baseRoot+"/projects.json?size=16";
$.ajax({
url:url,
dataType:"jsonp",
jsonp:"jsoncallback",
... |
import requests
homepage_url = 'https://www.rogers.com'
login_submit_url = 'https://www.rogers.com/siteminderagent/forms/login.fcc'
class RogersSession(requests.Session):
"""
A sub-class of requests.Session that automatically logs into the My
Rogers account, setting up the session with access to the acco... |
#!/usr/bin/env python3
import argparse
import os
import resource
import re
from operator import itemgetter
from collections import deque
from multiprocessing import Pool
import pysam
import networkx as nx
import numpy as np
cigar_re = re.compile(r'(\d+)([M|I|D|N|S|H|P|=|X]{1})')
query_consuming = [
pysam.CINS,
... |
import { setAccounts } from './accounts'
import { setTransactions } from './transactions'
import { clearLoginForm } from './loginForm'
import { clearSignupForm } from './signupForm'
export const setCurrentUser = user => {
return {
type: "SET_CURRENT_USER",
user
}
}
export const login = credentials => {
return ... |
# Copyright 2020 Huawei Technologies Co., Ltd.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 ap... |
import {render, screen} from '@testing-library/react';
import '@testing-library/jest-dom'
import React from 'react';
import Header from './Header';
test('renders Emoji Search', () => {
render(<Header />);
const textElement = screen.getByText(/Emoji Search/i);
expect(textElement).toBeInTheDocument();
})
|
import macro from 'vtk.js/Sources/macro';
import vtkViewNode from 'vtk.js/Sources/Rendering/SceneGraph/ViewNode';
import vtkMath from 'vtk.js/Sources/Common/Core/Math';
const { vtkDebugMacro } = macro;
// ----------------------------------------------------------------------------
// vtkOpenGLRenderer methods
// ----... |
'use strict';
const ShufflerConst = {
ShufflerId: {
MIN: 1,
MAX: 100000
},
ErrorCode: {
ERROR_INVALID_ID: 'ERROR_SHUFFLER_INVALID_ID',
ERROR_INVALID_STRING_ID: 'ERROR_SHUFFLER_INVALID_STRING_ID',
ERROR_REQUIRED_ID: 'ERROR_SHUFFLER_REQUIRED_ID',
ERROR_OVERFLOW... |
// Get object of URL parameters
//var allVars = $.getUrlVars();
// Getting URL var by its nam
//var byName = $.getUrlVar('name');
$.extend({
getUrlVars: function () {
var vars = [], hash;
//https://localhost:44344/Content/mobile-drawing-app/#siteplan?driveid=016178507&siteid=016004269&l... |
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('... |
define({"topics" : [{"title":"Data Drift Alert Triggers","shortdesc":"\n <p class=\"shortdesc\"></p>\n ","href":"datacollector\/UserGuide\/Alerts\/RulesAlerts_title.html#concept_rj4_y4g_q5","attributes": {"data-id":"concept_rj4_y4g_q5",},"menu": {"hasChildren":false,},"tocID":"concept_rj4_y4g_q... |
import React, { Component } from 'react'
import Modal from 'react-modal'
import Sidenav from './Sidenav'
Modal.setAppElement('#root')
class Parameters extends Component {
constructor(props) {
super(props)
this.state = {
open: false,
view: 'Library',
version: thi... |
import ctypes
import json
from virus_total_apis import PublicApi as VirusTotalPublicApi
from ctypes.wintypes import DWORD, HANDLE, LPWSTR
API_KEY = ''
k_handle = ctypes.WinDLL("Kernel32.dll")
d_handle = ctypes.WinDLL("DNSAPI.dll")
def integer(obj):
rv = {}
for k, v in obj.items():
if isinstance(v, b... |
/* global hexo */
'use strict';
const { basename } = require('path');
var _ = require('lodash');
var cheerio = require('cheerio');
var lunr = require('lunr');
require('es6-promise').polyfill();
require('isomorphic-fetch');
var localizedPath = ['docs', 'api'];
function startsWith(str, start) {
return str.substring... |
from collections import OrderedDict
from typing import Callable, Dict, List, Optional, Tuple, Union
from flytekit.common import constants as _common_constants
from flytekit.common.utils import _dnsify
from flytekit.core.base_task import PythonTask
from flytekit.core.condition import BranchNode
from flytekit.core.conte... |
from collections import namedtuple
setting_nt = namedtuple('Setting', 'vietnamese english')
sett_level_nt = namedtuple('SettingLevel', 'vietnamese english level')
emp_contract_nt = namedtuple('EmpContract', 'vietnamese english is_full_time')
RELIGION = (
setting_nt('Không', 'None'),
setting_nt('Phật giáo', '... |
import controller from './blocks.controller';
import template from './blocks.html';
export default {
controller,
template,
bindings: {
addStorage: '<',
attachStorage: '<',
createSnapshot: '<',
deleteStorage: '<',
detachStorage: '<',
editStorage: '<',
guideUrl: '<',
help: '<',
... |
'use strict';
let angular = require('angular');
module.exports = angular
.module('spinnaker.fastpropterties.scope', [
require('./scopeAppSelector.directive'),
require('./scopeRegionSelector.directive'),
require('./scopeStackSelector.directive'),
require('./scopeClusterSelector.directive'),
requi... |
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue');
window.Swal = require('sweetalert2')... |
'use strict';
// Setting up route
angular.module('classes').config(['$stateProvider',
function ($stateProvider) {
// Classes state routing
$stateProvider
.state('classes', {
abstract: true,
url: '/classes',
template: '<ui-view/>'
})
.state('classes.list', {
u... |
import unittest
import pytest
from datetime import datetime, timedelta as td, datetime as dt
import arrow
from ics.event import Event
from ics.icalendar import Calendar
from ics.parse import Container
from .fixture import cal12, cal13, cal15, cal16, cal17, cal18, cal19, cal20, cal32
CRLF = "\r\n"
class TestEvent(uni... |
/*
* The `deleteTodoById` route handler definition is broken down into several functions from which
* the final handler function is composed. This approach allows unit tests to target specific
* parts of the function with ease.
*
* In this test file, the route handler will be tested from bottom up – testing specific pa... |
function callbacksFor(object) {
let callbacks = object._promiseCallbacks;
if (!callbacks) {
callbacks = object._promiseCallbacks = {};
}
return callbacks;
}
/**
@class EventTarget
@for rsvp
@public
*/
export default {
/**
`EventTarget.mixin` extends an object with EventTarget methods. For
... |
"use strict";
const people = require("./people");
let is_open = false;
// the asset map is a map of all retrieved images and YouTube videos that are
// memoized instead of being looked up multiple times.
const asset_map = new Map();
function render_lightbox_list_images(preview_source) {
if (!is_open) {
c... |
/**
* Reducer - index
* 汇总
*/
import {combineReducers} from 'redux';
import {routerReducer} from 'react-router-redux';
import modal from './modal';
import user from './user';
export default combineReducers({
modal,
user,
routing: routerReducer
}); |
const jwt = require('jsonwebtoken');
const { User } = require('../models')
const validateJWT = async (req, res, next) => {
if (req.method == 'OPTIONS') {//OPTIONS is the first part of the preflighted request. This is to determine if the actual request is safe to send.
next();//allows us to move to the next... |
// adapted from https://github.com/andys8/vscode-jest-snippets/blob/master/snippets/snippets.test.js
const cssSnippets = require("../snippets/css-snippets.json");
const reactSnippets = require("../snippets/react-snippets.json");
const allSnippets = [cssSnippets, reactSnippets];
const unique = (xs) => [...new Set(xs)... |
from enum import Enum
class GetContactsDepth(str, Enum):
VALUE_0 = "0"
VALUE_1 = "1"
# The SevDesk API might use "0" for null-enums
NULL = "0"
def __str__(self) -> str:
return str(self.value)
|
import { LEADERS } from '../shared/leaders';
export const Leaders = (state = LEADERS, action) => {
switch (action.type) {
default:
return state;
}
}; |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvg... |