text
stringlengths
3
1.05M
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from rlpy.Representations import TileCoding from rlpy.Domains import GridWorld, InfiniteTrackCartPol...
/* Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'preview', 'tt', { preview: 'Карап алу' } );
module.exports = { re: [ /^https?:\/\/www\.npr\.org\/sections\//i, /^https?:\/\/www\.npr\.org\/\d{4}\/\d{2}\/\d{2}\/\d+\//i ], mixins: ["*"], getLink: function(cheerio) { var $button = cheerio('button[data-embed-url*="npr.org/player/embed/"]'); var rel = [CONF...
ManageIQ.angular.app.component('cloudVolumeBackupForm', { templateUrl: '/static/cloud_volume_backup/volume_select.html.haml', controller: cloudVolumeBackupFormController, controllerAs: 'vm', bindings: { 'recordId': '@', }, }); cloudVolumeBackupFormController.$inject = ['miqService', '$http', '$scope']; ...
# ------------------------------------------------------------------------------ # Program: The LDAR Simulator (LDAR-Sim) # File: LDAR_sim_sens # Purpose: Sensitivity analysis wrapper # # Copyright (C) 2018-2021 Intelligent Methane Monitoring and Management System (IM3S) Group # # This program is free s...
exports.init = (struct) => init(struct); /** * struct : { * uuid_store : infra/uuid_store * document_store : infra/document_store * } * * returns { * start: async (session_id) => register new session. throw error if already registered * } */ const init = ({uuid_store, document_store}) => { const start...
var Generator = require('yeoman-generator'); const to = require('to-case'); const recast = require('recast'); const updateConfigs = function(params) { // Load config file const ast = recast.parse(params.configs); // Filter themeConfig property const themeConfig = ast.program.body[0].expression.right.properties...
console.log("Functions"); /* function functionName(param if any) { ........body of the function } */ function hello() { console.log("hello from a function"); } hello(); let greet = function() { console.log("I am a function greet function"); } greet(); //function with params let welcome = function(name="...
angular.module('ngTygaSoft.services.Product', []) .factory('$tygasoftProduct', function ($ionicPopup, $cordovaBarcodeScanner, $tygasoftCommon, $tygasoftMC, $tygasoftLogin) { var ts = {}; ts.InitEvent = function ($scope) { $scope.onSearch = function () { ts.GetProducts($scope); };...
const express = require('express'); const helmet = require('helmet'); const cors = require('cors'); const authRouter = require('../auth/authRouter'); const usersRouter = require('../users/usersRouter'); const plantsRouter = require('../plants/plantsRouter'); const authenticator = require('../auth/authenticator'); cons...
(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[4759],{379:function(e){"use strict";e.exports=JSON.parse('{"layout":"constrained","backgroundColor":"#78d8f8","images":{"fallback":{"src":"/static/671c9291b62b681bece26fa64dfc33ef/6be3f/inventory.jpg","srcSet":"/static/671c9291...
import pytest from mesh.generic.dijkstra import findShortestPaths class TestTDMAComm: def setup_method(self, method): pass def test_findShortestPaths(self): """Test Dijkstra path algorithm with different mesh graphs.""" ## Diamond pattern startNode = 3 numNodes...
import unittest import os from tempfile import TemporaryDirectory from configparser import ConfigParser from dotenv import load_dotenv from mop.azure.utils.create_configuration import ( change_dir, create_baseline_configuration, TESTVARIABLES, TESTINGPATH, CONFVARIABLES, OPERATIONSPATH ) from ...
module.exports = { siteMetadata: { title: `Thea Olivia`, description: `My Portfolio Website`, author: `@theaolivia`, menuLinks: [ { name: 'home', link: '/' }, { name: 'portfolio', link: '/portfolio' }, { name: 'contact', ...
from django.contrib import admin from django.urls import path, include from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView urlpatterns = [ path('api/v1/', include('shipments.urls'), name='shipments'), path('admin/', admin.site.urls), path('schema/', Spectacula...
/* Copyright (c) 2011 Martin Ruenz 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, publish, distribute,...
import {fromEvent} from './fromEvent' import {makeIsStrictlyInRootScope} from './select' let matchesSelector try { matchesSelector = require(`matches-selector`) } catch (e) { matchesSelector = () => {} } const eventTypesThatDontBubble = [ `load`, `unload`, `focus`, `blur`, `mouseenter`, `mouseleave`, ...
# Copyright 2015 Metaswitch Networks # # 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 in w...
module.exports = function (router) { router.get('/start/v12/helm-login', function (req, res) { // pull in the url parameters var service = req.param('service') var serviceName = req.param('serviceName') var devMode = req.param('devMode') var returnUrl = req.param('returnUrl'...
/* Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 4 Version: 4.4.0 Author: Sean Ngu Website: http://www.seantheme.com/color-admin/admin/ */ var handleDataTableSelect = function() { "use strict"; if ($('#data-table-select').length !== 0) { $('#data-table-select')....
const models = require('../models'); const Op = require('sequelize').Op; module.exports = { async getHome(req, res) { // Get 30 random shows const numShows = 255; let ids = []; for (let i = 0; i < 30; i++) { // generate random number const id = Math.floor(Mat...
var input = []; function addIngredient() { var node = document.createElement("LI"); node.className = "" entry = document.getElementById("current-input").value; input.push(entry) var entryText = document.createTextNode(entry); node.appendChild(entryText); entry = ""; document.getElementById("i...
var keypather = require('../index')(); describe('has', function () { describe("keypather.has(obj, 'foo.bar')", keyInObject("foo.bar", true)); describe("keypather.has(obj, '['foo'].bar')", keyInObject("['foo'].bar", true)); describe("keypather.has(obj, 'foo['bar']')", keyInObject("foo['bar']", true)); describe(...
from typing import Tuple, List from json import dumps as jsondumps import pytest from pytest_mock import MockerFixture from locust.exception import StopUser from grizzly.exceptions import RestartScenario from grizzly.types import RequestMethod from grizzly.tasks import UntilRequestTask, RequestTask from grizzly_extr...
"use strict"; /** * @module botbuilder-choices */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ Object.defineProperty(exports, "__esModule", { value: true }); const findValues_1 = require("./findValues"); /** * Mid-level search function for recognizing a choi...
/** * You can customize the initial state of the module from the editor initialization * ```js * const editor = grapesjs.init({ * keymaps: { * // Object of keymaps * defaults: { * 'your-namespace:keymap-name' { * keys: '⌘+z, ctrl+z', * handler: 'some-command-id' * }, * .....
import Icon from '../components/Icon.vue' Icon.register({"video":{"width":576,"height":512,"paths":[{"d":"M336.2 64H47.8C21.4 64 0 85.4 0 111.8V400.2C0 426.6 21.4 448 47.8 448H336.2C362.6 448 384 426.6 384 400.2V111.8C384 85.4 362.6 64 336.2 64zM525.6 101.7L416 177.3V334.7L525.6 410.2C546.8 424.8 576 409.9 576 384.4V1...
from collections import defaultdict from itertools import count from django.conf.urls.defaults import patterns, url from django.http import Http404 class StatsAdminMixin(object): """Mixin for the AdminSite object that adds a new view for viewing registered statistics pages. """ index_template = 'stat...
# -*- coding: utf-8 -*- # Scrapy settings for tutorial project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/to...
import React from 'react'; import { Box, Grid, Grommet } from 'grommet'; import { grommet } from '../../../themes'; export const BorderGrid = () => ( <Grommet theme={grommet}> <Box pad="small" gap="small" align="start"> <Grid pad="small" border> true </Grid> <Box direction="row-respons...
import { Matrix3, Matrix4, Vector3 } from '../../../src/Three'; import { VolumeSlice } from '../misc/VolumeSlice.js'; /** * This class had been written to handle the output of the NRRD loader. * It contains a volume of data and informations about it. * For now it only handles 3 dimensional data. * See the webgl...
// Copyright (c) 2017-2018 dirigeants. All rights reserved. MIT license. const { Command } = require('klasa'); module.exports = class extends Command { constructor(...args) { super(...args, { aliases: ['choose', 'decide'], description: 'Makes a decision for you given some choices.', usage: '<choices:str> ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # torchtext documentation build configuration file, created by # sphinx-quickstart on Thu Nov 16 01:05:05 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # ...
'use strict'; const assert = require('assert'); const strapi = require('../lib/'); /** * No need to test everything about Koa middleware. * We just need need to make sure that they all are * correctly required and loaded inside `strapi`. */ describe('middleware', () => { before(function(done) { ...
import copy from .base import (BaseModel, SourceMixin, LinkMixin, ContactDetailMixin, OtherNameMixin, IdentifierMixin) from .schemas.post import schema as post_schema from .schemas.person import schema as person_schema from .schemas.membership import schema as membership_schema from .schemas.organiza...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = require('babel-runtime/helpers/createClass'); var _createClass3 = _interopReq...
import React from "react"; import { Redirect } from "react-router"; import { useParams, Link } from "react-router-dom"; import SearchEvents from "./SearchEvents"; const EventPageInCommunity = ({ newEventId, newEventFormWasSubmitted }) => { const { url } = useParams(); return newEventFormWasSubmitted ? ( <Re...
// @flow import { APIBASE } from 'utils' import { logout } from 'routes/Auth/modules/auth' import update from 'immutability-helper' import request from 'superagent' import { socket } from 'socket' import { setTicketRepliesSeen, storeNewReply, storeNewTicket, userStartedTypingTicket, userStoppedTypingTicket } from './...
/* * Upbit Open API * ## REST API for Upbit Exchange - Base URL: [https://api.upbit.com] - Official Upbit API Documents: [https://docs.upbit.com] - Official Support email: [open-api@upbit.com] * * OpenAPI spec version: 1.1.6 * Contact: ujhin942@gmail.com * * NOTE: This class is auto generated by the swagger cod...
""" asyncio 实现的协程池 asyncio为python原生支持 调用时需要引入 import asyncio 还有另外一个版本的实现 asyncPoolGevent 为 Gevent实现协程 """ # -*- coding:utf-8 -*- import asyncio import queue from concurrent.futures import ThreadPoolExecutor class 协程池(object): """ 1. 支持动态添加任务 2. 支持停止事件循环 3. 支持最大协程数:maxsize 4. 支持进度条 5. 实时获取...
# # 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 not...
# Copyright (c) Open-MMLab. All rights reserved. import numpy as np from mmcv._ext import flow_warp_c from mmcv.arraymisc import dequantize, quantize from mmcv.image import imread, imwrite from mmcv.utils import is_str def flowread(flow_or_path, quantize=False, concat_axis=0, *args, **kwargs): """Read an optical...
const express = require('express'); const exercise_type = require('../models/exercise_type'); const app = express.Router(); //get all app.get("/getTypes", (req, res, next) => { exercise_type.getAll() .then(x => res.send(x)) .catch(next) }); //get exercise type by id app.get("/:id", (req, res,next) => { ...
import { all, fork } from 'redux-saga/effects'; import { watchFetchRepos } from './repos/reposSagas'; export default function* sagas() { yield all([fork(watchFetchRepos)]); }
import IFormError from '@inkline/inkline/src/components/FormError'; import AttributesProviderMixin from '@inkline/inkline/src/mixins/components/providers/AttributesProviderMixin'; import ClassesProviderMixin from '@inkline/inkline/src/mixins/components/providers/ClassesProviderMixin'; import InjectParentFormProviderMi...
# coding=utf-8 """ Module holding tools for ee.ImageCollections """ import ee import ee.data if not ee.data._initialized: ee.Initialize() def fill_with_last(collection): """ Fill masked values of each image pixel with the last available value :param self: the self that holds the images that will be ...
import re class PhysicalInfo(object): def set_date(self, date): if not isinstance(date, str): raise ValueError("date should be a string") t = date.split("-") if len(t) != 3: raise ValueError("date should be in MM-DD-YYYY format") #if re.search(r'[^0-9\...
from unittest.mock import Mock import pytest from returns.result import Failure, Result, Success from kamui.core.entity.stream import KSQLStream from kamui.core.use_case.failure import FailureDetails, BusinessFailureDetails from kamui.core.use_case.stream.get_ksql_streams import ( GetKSQLStreams, GetKSQLStrea...
(() => { const config = new Map(); config.set("bulmaJS.initAttribute", "data-bulma-js-init"); config.set("bulmaJS.elementIdPrefix", "bulma-js-"); config.set("navbar.burger", true); config.set("navbar.dropdown", true); config.set("dropdown", true); config.set("tabs", true); config.set("wi...
function HelloWorld(){console.log("HelloWorld")}module.exports=HelloWorld; HelloWorld(); function greeter(e){return"Hello, "+e} //# sourceMappingURL=maps/main-d3744663d9.js.map
'use strict'; //Menu service used for managing menus angular.module('core').service('Menus', [ function () { // Define a set of default roles this.defaultRoles = ['user', 'admin']; // Define the menus object this.menus = {}; // A private function for rendering decision var shouldRender = f...
YUI.add("axis-time",function(e,t){e.TimeAxis=e.Base.create("timeAxis",e.Axis,[e.TimeImpl],{_getLabelByIndex:function(e,t){var n=this.get("minimum"),r=this.get("maximum"),i,s;return t-=1,i=(r-n)/t*e,s=n+i,s},_getLabelData:function(e,t,n,r,i,s,o,u,a){var f,l,c=[],h=[],p,d=s;a=a||this._getDataValuesByCount(u,r,i);for(l=0;...
// 细胞阵列的渲染 function drawCellArray() { var xStep = width/colNum; var yStep = height/rowNum; var xBias = xStep/2; var yBias = yStep/2; for(var c=0;c<colNum;c++) { for(var r=0;r<rowNum;r++) { var cell = Cells[c][r]; x = c*xStep + xBias; y = r*yStep + yBias; var diameter = cell*xStep; fill(255); ...
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{ /***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js": /*!**********************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js ***! \***********************...
major = 1 minor = 0 patch = 1
import yaml def load_yaml(path): """ Reads a YAML file and converts its contents into a Python datatype. """ with open(path, 'r') as f: data = yaml.load(f.read()) return data
import updateMetaInfo from './src/metaOperate/updateMetaInfo' import {VUE_META_KEY_NAME} from './src/common/constants' let VueMetaInfo = () => { } VueMetaInfo.install = function (Vue) { Vue.mixin({ beforeCreate () { // 如果组件内设置了 vueMeta 信息 if (this.$options[VUE_META_KEY_NAME] !== undefined) { ...
import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; import Icon from 'react-native-vector-icons/MaterialIcons'; import * as CartActions from '../../store/modules/cart/actions'; import { formatPrice } from '../../util/format'; import colors from '../../styles/colors'; import { Body, ...
import numpy as np import os MEDIA_DIR = "" VIDEO_DIR = "" VIDEO_OUTPUT_DIR = "" TEX_DIR = "" TEXT_DIR = "" def initialize_directories(config): global MEDIA_DIR global VIDEO_DIR global VIDEO_OUTPUT_DIR global TEX_DIR global TEXT_DIR video_path_specified = config["video_dir"] or config["video...
/* * @flow */ const ERR_ACTION_VALUE_NOT_DEFINED :string = 'invalid parameter: action.value is required and must be defined'; const ERR_ACTION_VALUE_TYPE :string = 'invalid parameter: action.value is the incorrect type'; const ERR_INVALID_ACTION :string = 'invalid parameter: action must be a valid SequenceAction'; c...
"use strict"; var _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.GlueUserDefinedFunction = exports.glueUserDefinedFunctionResourceUrisToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function glueUserDefinedFunctionResourceUrisToTerraf...
/** * @fileoverview Implements wysiwyg editor clipboard manager * @author NHN FE Development Lab <dl_javascript@nhn.com> */ import $ from 'jquery'; import util from 'tui-code-snippet'; import domUtils from './domUtils'; import WwPasteContentHelper from './wwPasteContentHelper'; import WwTablePasteHelper from './wwT...
import { textStyle } from "../theme/style"; const Text = props => ( <div style={props.style ?? textStyle.body}>{props.children}</div> ); export default Text;
import React from "react"; import Svg, { Path } from "react-native-svg"; const PinterestSquare = ({ color, ...props }) => ( <Svg viewBox="0 0 64 64" {...props}> <Path d="M0 4c0-2.2 1.8-4 4-4h56c2.2 0 4 1.8 4 4v56c0 2.2-1.8 4-4 4H4c-2.2 0-4-1.8-4-4V4zm50.8 17.3C49.5 11.9 40.1 7 30.1 8.2c-7.9.9-15.7 7.3-16.1...
import request from '@/utils/httpRequest' const CONFIG_API = { login: request.adornUrl('/sys/login'), password: request.adornUrl('/sys/user/password') } /** * @name 注册 * @param {*} data * */ export function password (data) { return request({ url: CONFIG_API.password, method: 'post', data: request...
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from os.path import join, abspath, dirname BASE_DIR = dirname(dirname(abspath(__file__))) from .common import * # noqa from .local import * # noqa DATABA...
from django.apps import AppConfig class SoundscapesConfig(AppConfig): name = 'soundscapes'
import CompaniesPage from '@/pages/companies.vue' import { delay, mockAjax, mountTestPage } from '../util' describe('contact-list.vue', () => { let companiesPage = null const COMPANIES_DATA = require('../../fixtures/companies-data.json') beforeEach(async () => { companiesPage = await mockAjax({ 'GET ...
const jwt = require('jsonwebtoken') const auth = (req, res, next) => { try { const token = req.header('x-auth-token') if (!token) return res .status(401) .json({ msg: 'No authentication token, access denied' }) const verified = jwt.verify(token, process.env.TOKEN_SECRET) if (!ver...
import{LitElement as e,html as t,css as i}from"../../../lit-element/lit-element.js";import"./hax-toolbar-menu.js";import"../../simple-tooltip/simple-tooltip.js";import"../../../@polymer/paper-item/paper-item.js";import"../../../@polymer/neon-animation/neon-animation.js";class HaxContextItemMenu extends e{static get sty...
// All symbols in the Mathematical Operators block as per Unicode v3.2.0: [ '\u2200', '\u2201', '\u2202', '\u2203', '\u2204', '\u2205', '\u2206', '\u2207', '\u2208', '\u2209', '\u220A', '\u220B', '\u220C', '\u220D', '\u220E', '\u220F', '\u2210', '\u2211', '\u2212', '\u2213', '\u2214', '\u2215', '...
import express from 'express'; import userCtrl from '../controllers/user.controller'; import authCtrl from '../controllers/auth.controller'; const router = express.Router(); router.route('/api/users').get(userCtrl.list).post(userCtrl.create); router.route('/api/users/:userId').get( authCtrl.requireSignin, us...
import ratelimit from 'express-rate-limit'; import express from 'express'; import dotenv from 'dotenv'; import helmet from 'helmet'; import fs from 'fs'; dotenv.config(); // Add keys/private data to process.env // Import routes import routeRedditGimme from './routes/reddit/gimme.js'; import routeMinecraftStatus from...
var texto = document.getElementById("text"); var imagenes = []; imagenes["Cauchin"] = "cerdo.png"; imagenes["Pokacho"] = "pollo.png"; imagenes["Tocinauro"] = "vaca.png"; imagenes["Ferozin"] = "lobo.png"; class Pakiman { constructor(nombre, vida, ataque) { this.imagen = new Image(); this.nombre = ...
"""Implement an ArgParser for main.py .""" import argparse def options(): """Construct the central argument parser, filled with useful defaults. """ parser = argparse.ArgumentParser(description='Argparser for main decision boundary code') # Training details parser.add_argument('--lr', default=0.1...
const rule = 'no-unnamed-scenarios'; const {flatMapScenarios} = require('../utils/gherkin'); const createError = ({name, location}) => name ? [] : [{ type: 'rule', message: 'Missing Scenario name', rule: rule, location: location, }]; const noUnNamedScenarios = flatMapScenarios(createError); module.exports = ...
"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[6594],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return u}});var o=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Objec...
'use strict' const Joi = require('joi') const BaseJsonService = require('../base-json') const resourceSchema = Joi.object({ downloads: Joi.number().required(), file: Joi.object({ size: Joi.number().required(), sizeUnit: Joi.string().required(), }).required(), testedVersions: Joi.array(), rating: Joi...
import glob from "glob"; import { promisify } from "util"; import uuidv4 from "uuid/v4"; import sizeOf from "image-size"; import { spriteTypeFromNumFrames } from "../helpers/gbstudio"; const FRAME_SIZE = 16; const globAsync = promisify(glob); const sizeOfAsync = promisify(sizeOf); const loadSpriteData = async filena...
/** * Kendo UI v2017.1.223 (http://www.telerik.com/kendo-ui) * Copyright 2017 Telerik AD. All rights reserved. ...
//>>built define("dojox/data/GoogleSearchStore",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/declare","dojo/_base/query","dojo/dom-construct","dojo/io/script"],function(_1,_2,_3,_4,_5,_6){ _1.experimental("dojox.data.GoogleSearchStore"); var _7=_3("dojox.data.GoogleSearchStore",null,{constructor:function(_8){ if(...
/*global angular*/ angular.module('nodedemoApp').factory('Data', function ($cookies) { var publicVars = {}; publicVars.avaliableVersions = [{ number: 7, name: "Red Hat Enterprise Linux 7" }, { number: 6, name: "Red Hat Enterprise Linux 6" }, { number: 5, ...
import React from 'react'; import { Link } from 'react-router-dom'; import Main from '../layouts/Main'; const Index = () => ( <Main description={"Ani Petrosyan's personal website."} > <article className="post" id="index"> <header> <div className="title"> <h2 data-testid="heading"><...
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{366:function(t,s,a){"use strict";a.r(s);var n=a(44),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"async和await的使用指南"}},[a("a",{staticClass:"h...
const axios = require('axios'); const Dev = require('../models/Dev'); const parseStringAsArray = require('../utils/parseStringAsArray'); const { findConnections, sendMessage } = require('../websocket'); module.exports = { async index(req, res) { const devs = await Dev.find(); return res.json(devs); }, ...
var headerBg = document.getElementById('sec1'); window.addEventListener('scroll', function(){ headerBg.style.opacity = 1 - +window.pageYOffset/700+''; });
import React from "react"; import { connect } from "react-redux"; import { fetchData } from "../store"; class Home extends React.Component { componentDidMount( ) { if ( this.props.circuits.length <= 0 ) { this.props.fetchData( ); } } render( ) { const { circuits } = thi...
const path = require('path') var prod = process.env.NODE_ENV === 'production' module.exports = { wpyExt: '.wpy', cliLogs: !prod, build: {}, resolve: { alias: { '@': path.join(__dirname, 'src') }, aliasFields: ['wepy', 'weapp'], modules: ['node_modules'] }, compilers: { sass: { ...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/droid/component/shared_armor_module_1.iff" result.attribut...
from . import ClientImporting from . import ClientImportOptions from . import ClientImportFileSeeds from . import ClientPaths from . import ClientThreading from . import HydrusConstants as HC from . import HydrusData from . import HydrusExceptions from . import HydrusGlobals as HG from . import HydrusNATPunch from . im...
function tizenSystemInfo(title) { var messageWin = require('ui/handheld/tizen/tizenToast'), alertWin = require('ui/handheld/tizen/tizenAlert'), Tizen = require('tizen'), gBatteryListener; function getSystemProperty(property, callback, onError) { try { Tizen.SystemInfo.getPropertyValue(property, callback);...
// node server.js // 1. 导入http模块 const http = require('http'); // 2. 导入文件模块 const fs = require('fs'); // 3. 导入路径模块 const path = require('path'); const url = require('url'); // 4. 创建服务器 const server = http.createServer(); // 5. 监听客户端请求 server.on('request', function (req,res) { console.log('=========================...
from http.client import HTTPException import requests, json from django.shortcuts import render, redirect from administer.models import Nodes from django.db import connection from administer import context_processors, helper from hdfs.models import Hdfs from django.http import JsonResponse from django.contrib import m...
import request from '@/utils/request' export function typeEdit(data){ return request({ url:'/article/typeedit', method:'post', data }) } export function typeInfo(data){ return request({ url:'/article/typeinfo', method:'post', data }) } export function type...
'use strict'; /** * Home module for displaying home page content. */ angular .module('app.userList', [ 'ngRoute' ]) .config(function($routeProvider) { $routeProvider .when('/', { title: 'User List Page', template: '<user-list></user-list>' ...
import styled from 'styled-components'; const FormContainer = styled.form` display: flex; flex-direction: column; width: 350px; font-size: 18px; margin-top: 20px; label { margin-top: 10px } input { height: 35px; font-size: 18px; padding: 5px 10px; } input[type="submit"] { mar...
#!/usr/bin/env python3 # from .vcham import * # from .mctdh import *
'use strict'; const secure = require('../secure'); const controllers = require('../controllers'); module.exports = (express) => { // Get all channels express.get('/channels/all', secure(controllers.channels.all)); // Say to channel express.post('/channels/say', secure(controllers.channels.say)...
export * from './colors'; export * from './fonts'; export * from './generator';
/** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ import * as tslib_1 from "tslib"; import { Directive, ElementRef, HostBinding, HostListener } from '@angular/core'; import { BsDropdownState } from './bs-dropdown.state'; var BsDropdownToggleDirective = /** @class */ (function () { f...