text stringlengths 3 1.05M |
|---|
mainTableColsCc = [{
checkbox: true
}, {
field: '',
title: '期數'
}, {
field: '',
title: '款項'
}, {
field: '',
title: '款項名稱'
}, {
field: '',
title: '百分比'
}, {
field: '',
title: '金額(建物)'
}, {
field: '',
title: '金額(土地)'
},];
$(function() {
let $tableCC = $("#tableCC")... |
import torch
import torch.nn as nn
import torch.nn.functional as F
# from .BasicModule import BasicModule
from IPython import embed
def activation(act_type='prelu'):
if act_type == 'prelu':
act = nn.PReLU()
elif act_type == 'relu':
act = nn.ReLU(inplace=True)
else:
raise NotImplem... |
import keras
from keras.models import Model
from keras.layers import Dense, Dropout, Activation, Flatten, Input
from keras.layers import Conv2D, MaxPooling2D
from keras.layers.merge import add
from keras import regularizers
# Import resnet from keras
from keras.applications.resnet50 import ResNet50
def resnet8(img_w... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HisJhcisModel = void 0;
const dbName = process.env.HIS_DB_NAME;
const maxLimit = 100;
class HisJhcisModel {
check() {
return true;
}
getTableName(knex) {
return knex
.select('TABLE_NAME')
... |
import React, { Component } from 'react';
import Button from 'bee-button';
var AcButton = class extends Component {
static defaultProps = {
className: '',
onClick: {},
colors:'default',
}
render() {
let btn = 'button'
const { className, onClick } = this.props;
... |
var dp = new DayPilot.Calendar("dp");
// view
dp.startDate = "2021-03-25";
dp.viewType = "Week";
// event creating
dp.onTimeRangeSelected = function (args) {
var name = prompt("New event name:", "Event");
if (!name) return;
var e = new DayPilot.Event({
start: args.start,
end: args.end,
... |
/*!
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.3-master-90b64fe
*/
goog.provide('ngmaterial.components.tabs');
goog.require('ngmaterial.components.icon');
goog.require('ngmaterial.core');
/**
* @ngdoc module
* @name material.components.tabs
* @description
*
* Tabs... |
module.exports = BarChart;
function BarChart() {}
BarChart.prototype.view = __dirname;
BarChart.prototype.init = function() {
var model = this.model;
model.setNull("data", []);
model.setNull("width", 200);
model.setNull("height", 100);
model.set("layout", []);
this.transform()
};
BarChart.prototype.creat... |
import os
import sys
import cherrypy
import subprocess
import logging
import time
from . import confs
from cherrypy.lib.static import serve_file
INDEX_HTML = '<html><body></body></html>'
CERT_PATH = ''
logger = logging.getLogger('dummytls')
class Root:
@cherrypy.expose
def index(self):
return INDEX_... |
const ListUsers = async() => {
const token = await Login.recuperarUsuario();
const apiCall = await fetch(`${host}:${port}/user/list-users`, {
method: 'get',
headers: {
"Accept": "*/*",
"Content-type": 'application/json',
"Authorization": `Bearer ${token}`
... |
import unittest
from biothings_explorer.resolve_ids.bioentity import BioEntity
CDK2_DB_IDs = {
"NCBIGene": ["1017"],
"HGNC": ["1771"],
"SYMBOL": ["CDK2"],
"name": ["cyclin dependent kinase 2"],
}
RILUZOLE_DB_IDS = {
"CHEMBL.COMPOUND": ["CHEMBL744"],
"name": ["Riluzole", "RILUZOLE"],
"PUBCH... |
import vaex.encoding
import numpy as np
import pyarrow as pa
@vaex.encoding.register('blobtest')
class encoding:
@staticmethod
def encode(encoding, data):
return {'someblob': encoding.add_blob(data['someblob'])}
@staticmethod
def decode(encoding, data):
return {'someblob': encoding.get... |
"""
Wrap the value of a nested dictionary
with a new field {"v": value}
"""
from typing import Dict
import copy
def wrap_value(d):
# type: (Dict) -> Dict
"""Wrap the value field
Add a new field "v", which
contains the actual value
under the key.
Args:
d (dict): input dictionary
... |
(function (exports,ui_vue) {
'use strict';
BX.ready(BX.delegate(function () {
var nodes = document.querySelectorAll('.vue-contragent-actions');
if (nodes && nodes.length) {
for (var i in nodes) {
if (Object.hasOwnProperty.call(nodes, i)) {
var _nodes$i, _nodes$i$datas... |
// eslint-disable-next-line no-unused-vars
import { CommonFieldTypes, Manifest } from '@sitecore-jss/sitecore-jss-dev-tools';
/**
* This is the data template for an individual _item_ in the Styleguide's Content List field demo.
* @param {Manifest} manifest Manifest instance to add components to
*/
export def... |
import sys, logging, os, random, math, open_color, arcade
#check to make sure we are running the right version of Python
version = (3,7)
assert sys.version_info >= version, "This script requires at least Python {0}.{1}".format(version[0],version[1])
#turn on logging, in case we have to leave ourselves debugging messa... |
class RepositoryFetchFailed(Exception):
"""
Raised when upstream Git repo cannot be reached.
"""
|
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'list', 'en', {
bulletedlist: 'Insert/Remove Bulleted List',
numberedlist: 'Insert/Remove Numbered List'
});
|
const path = require("path");
const HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config();
module.exports = {
contracts_build_directory: path.join(__dirname, "client/src/contracts"),
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: ... |
const connection = require("../database/connection");
module.exports = {
async index(request, response) {
const ong_id = request.headers.authorization;
const incidents = await connection("incidents")
.where("ong_id", ong_id)
.select("*");
return response.json({ incidents });
}
... |
var Accessory = require('../').Accessory;
var Service = require('../').Service;
var Characteristic = require('../').Characteristic;
var uuid = require('../').uuid;
// here's a fake hardware device that we'll expose to HomeKit
var MOTION_SENSOR = {
motionDetected: false,
getStatus: function() {
//set the boole... |
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Site Configurations", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially('Site Configurations', [
// insert a new Site Con... |
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-03 18:12
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('boards', '0011_board_has_to_be_fetched'),
]
operatio... |
import React from 'react';
import { Container, Typography } from '@material-ui/core';
import Helmet from 'react-helmet';
import '../styles/layout.css';
const NotFoundPage = () => <Container style={ {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
minHeight: '100%',
textAlign: 'cen... |
'use strict';
const path = require('path');
const child_process = require('child_process');
process.env.NODE_ENV = 'test';
process.env.CONF_DIR = path.join(__dirname, '../../src/config');
process.env.SETTINGS_PATH = path.join(process.env.CONF_DIR, 'settings.yml');
process.env.NODE_CMD = 'node';
delete process.env.HTTP... |
/*!
* Quasar Framework v1.14.0
* (c) 2015-present Razvan Stoenescu
* Released under the MIT License.
*/
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):((e=e||self).Quasar=e.Quasar||{},e.Quasar.lang=e.Quasar.lang||{},e.Quasar.lan... |
/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.gfx.shape"]){dojo._hasResource["dojox.gfx.shape"]=true;dojo.provide("dojox.gfx.shape");dojo.re... |
# $Id: core.py 8367 2019-08-27 12:09:56Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Calling the ``publish_*`` convenience functions (or instantiating a
`Publisher` object) with component names will result in default
behavior. For custom beha... |
#!/usr/bin/env python
# sorry, this is very ugly, but I'm in python 2.5
import sys
sys.path.insert(0,"../..")
from dot11 import Dot11, Dot11Types, Dot11ManagementFrame, Dot11ManagementReassociationRequest
from ImpactDecoder import RadioTapDecoder
from binascii import hexlify
import unittest
class TestDot11Management... |
import torch
print(torch.cuda.is_available()) |
import { emphasize } from "@material-ui/core/styles/colorManipulator";
export default (theme) => ({
root: {
flexGrow: 1
},
input: {
display: "flex",
padding: 0,
},
valueContainer: {
display: "flex",
flex: 1,
alignItems: "center",
},
chip: {
margin: `${theme.spacing.unit / 2}px... |
# -*- encoding: utf-8 -*-
# report template
# template for html
html_general = """
<html>
<head>
<title>BBScan Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
body {width:960px; margin:auto; margin-top:10px; background:rgb(200,200,200);}
p {color: #666;}
h2 {co... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... |
/*
* Document : login.js
* Author : pixelcave
* Description: Custom javascript code used in Login page
*/
var Login = function() {
// Function for switching form views (login, reminder and register forms)
var switchView = function(viewHide, viewShow, viewHash){
viewHide.slideUp(250);
... |
//// [callSignatureWithoutReturnTypeAnnotationInference.ts]
// Call signatures without a return type should infer one from the function body (if present)
// Simple types
function foo(x) {
return 1;
}
var r = foo(1);
function foo2(x) {
return foo(x);
}
var r2 = foo2(1);
function foo3() {
return foo3();
}
... |
import tensorflow as tf
from text import symbols
def create_hparams(hparams_string=None, verbose=False):
"""Create model hyperparameters. Parse nondefault from given string."""
hparams = tf.contrib.training.HParams(
################################
# Experiment Parameters #
###... |
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/layout"
import Image from "../components/image"
import SEO from "../components/seo"
import About from "../components/about";
import Experience from "../components/experience";
import Social from "../components/social";
import "... |
import React from "react"
import styles from "../styles/layout.module.css"
function Spacer() {
return (
<div className={styles.arrows}>
<div className={styles.arrow} />
<div className={styles.arrow} />
</div>
)
}
export default Spacer
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { ... |
import { isSchema, isInterfaceType, GraphQLInterfaceType, GraphQLUnionType, graphql, getNullableType, getNamedType, isListType, isAbstractType, isObjectType, isEnumType } from 'graphql';
import { buildSchemaFromTypeDefinitions } from '@graphql-tools/schema';
import { mapSchema, MapperKind } from '@graphql-tools/utils';... |
module.exports = {
// capture :: Url -> Width -> CaptureResult
capture: require('./capture'),
// compare :: CaptureResult -> CaptureResult -> Diff
compare: require('./compare'),
// gallery :: CaptureResult -> CaptureResult -> Diff -> HTML
gallery: require('./gallery')
}
|
var data = {
"body": "<path d=\"M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2a2 2 0 0 0-2 2H8a4 4 0 0 1 4-4a4 4 0 0 1 4 4a3.2 3.2 0 0 1-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10c0-5.53-4.5-10-10-10z\" ... |
import Vue from 'vue';
import { mapActions } from 'vuex';
import Translate from '../vue_shared/translate';
import ImportProjectsTable from './components/import_projects_table.vue';
import { parseBoolean } from '../lib/utils/common_utils';
import store from './store';
Vue.use(Translate);
export default function mountI... |
'use strict';
var Events = require('./events');
module.exports = {
_testSupportedProps: function _testSupportedProps(props) {
var i,
el = document.createElement('div');
for (i in props) {
if (props.hasOwnProperty(i) && el.style[i] !== undefined) {
return props[i];
}
}
},
... |
define(function (require) {
var d3 = require("d3");
return function (_) {
if (typeof _ === "function") { return _; }
if (typeof _ === "string") {
if (_ === "time") { return d3[_].scale(); }
if (_ === "time.utc") { return d3.time.scale.utc(); }
return typeof d3.scale[_] === "function" ? d3... |
import {
generateUUID,
errLog
} from './utils'
/**
* 根据选择器类型确定 maps
*/
function initmaps () {
switch (this.type) {
case 'date':
this.maps = [this.yearMap, this.monthMap, this.dayMap]
break
case 'month':
this.maps = [this.yearMap, this.monthMap]
break
case 'time':
... |
"""
Take an observation datafile, clean it, and
organize data for use in afterglow code.
Observation data used from Mooley (et al? year?):
col 1: Observation time [s]
col 2: Frequency label (radio, optical, xray)
col 3: Observed flux [mJy]
col 4: Flux uncertanty [mJy]
col 5: Observed frequency [GH... |
import ErrorSaveModal from './ErrorSaveModal'
export default ErrorSaveModal
|
import React from 'react';
import ReactDOM from 'react-dom';
var Text = React.createClass({
render: function() {
return (
<label>{this.props.label}</label>
<input
type="text"
value={this.state.value }
/>
);
... |
# Copyright 2008-2018 Univa Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
from django.utils.translation import gettext_lazy as _
DEBUG = False
INSTALLED_APPS = [
# django modules
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sit... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pytils import numeral
# sum_string объединяет в себе choose_plural и in_words
# т.е. передаются и количество, и варианты названия объекта
# а на выходе получаем количество объектов в правильной форме
# параметры:
# 1) amount, количество (только целое)
# 2) gender, п... |
events.listen("recipes", function (event) {
//╔════════════════════════════════════════╗
//║ WOODEN HOPPERS ║
//╚════════════════════════════════════════╝
// event.replaceInput(
// { id: "woodenhoppers:oak_hopper" },
// Oak Hopper
event.remove({ output: "woodenhoppers:oak_hopper" ... |
'use strict'
/*
The MIT License(MIT)
Copyright(C) 2014 by Stefan Thies, Igor Likhomanov
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
... |
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueMultiselect=e():t.VueMultiselect=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};r... |
// -*- Mode: JavaScript; tab-width: 2; indent-tabs-mode: nil; -*-
// vim:set ft=javascript ts=2 sw=2 sts=2 cindent:
var Visualizer = (function($, window, undefined) {
var fontLoadTimeout = 50; // 5 seconds
var DocumentData = function(text) {
this.text = text;
this.chunks = [];
this.spans =... |
const { escapeMarkdown } = require('discord.js');
const { oneLine, stripIndents } = require('common-tags');
const ArgumentUnionType = require('../types/union');
/** A fancy argument */
class Argument {
/**
* @typedef {Object} ArgumentInfo
* @property {string} key - Key for the argument
* @property {string} [lab... |
(function(){function e(e){for(var t=e.length;t--;)"number"==typeof e[t]&&(e[t]=Math.round(e[t])-.5);return e}var t=Highcharts,n=t.Chart,i=t.addEvent,r=t.removeEvent,o=t.createElement,a=t.discardElement,s=t.css,l=t.merge,c=t.each,u=t.extend,d=Math.max,p=document,h=window,f=void 0!==p.documentElement.ontouchstart,g=t.get... |
# Copyright 2021 Red Hat, 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 required by... |
import Vue from 'vue'
import QIcon from '../icon/QIcon.js'
import QResizeObserver from '../observer/QResizeObserver.js'
function getIndicatorClass (color, top) {
return `absolute-${top ? 'top' : 'bottom'}${color ? ` text-${color}` : ''}`
}
export default Vue.extend({
name: 'QTabs',
provide () {
return {
... |
import React from "react";
import { StyleSheet, Text, View } from "react-native";
const VideoDownloader = () => {
return (
<View>
<Text></Text>
</View>
);
};
export default VideoDownloader;
const styles = StyleSheet.create({});
|
import os
from PIL import Image
import config
from utils.tiles.adapters import get_adapter
class TilesScrapeTask:
def __init__(self, coord, zoom, adapter):
self.coord = coord
self.zoom = zoom
self.adapter = adapter
print(self.coord.get_tiles_count(19))
def __call__(self, r... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
const { ipcRenderer } = require('electron')
import Vue from 'vue'
import Vuex from 'vuex'
import sharedMutations from 'vuex-shared-mutations'
import App from './components/App.vue'
import 'bootstrap/dist/css/bootstrap.min.css'
import './style.css'
import $ from 'jquery'
window.$ = $
Vue.use(Vuex)
let ids = ipcRend... |
/**
* Tw2ScalarKey2
* @property {number} time
* @property {number} value
* @property {number} leftTangent
* @property {number} rightTangent
* @property {number} interpolation
* @constructor
*/
function Tw2ScalarKey2()
{
this.time = 0;
this.value = 0;
this.leftTangent = 0;
this.rightTangent = 0;
... |
import * as amountFields from './AmountFields.test.js'
import * as gasEditor from './GasEditor.test.js'
import * as testUtils from '../../testUtils'
import { Simulate } from 'react-testing-library'
import SendMETForm from '../dashboard/SendMETForm'
import React from 'react'
const element = <SendMETForm tabs={<div />} ... |
$(document).ready(function(){
//导航栏,鼠标移上去后,icon切换
$(".menu li,.fastTouch").mouseover(function(){
var src=$(this).find('img').attr('src');
if(src.indexOf('-active')<1)
{
var type=src.substr(-4,4);
var newImg=src.substring(0,src.length-4)+"-active"+type;
$(thi... |
/*
Copyright 2011, AUTHORS.txt (http://ui.operamasks.org/about)
Dual licensed under the MIT or LGPL Version 2 licenses.
*/
OMEDITOR.plugins.add('docprops',{init:function(a){var b=new OMEDITOR.dialogCommand('docProps');b.modes={wysiwyg:a.config.fullPage};a.addCommand('docProps',b);OMEDITOR.dialog.add('docProps',this.p... |
#!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... |
var queue = require('app/db/lib/queue');
module.exports = {
up: function (db) {
return queue(db.sequelize, 'query', [
`ALTER TABLE public."user" ADD verification_code VARCHAR(36) NULL`,
`ALTER TABLE public."user" ADD verified BOOLEAN DEFAULT FALSE NOT NULL`
]);
},
down: function (db) {
return queue(db.... |
import type Validator from '../src/core/validator';
import type ErrorBag from '../src/core/errorBag';
declare type ResultObject = {
valid: boolean,
data: Object
};
declare type Rule = (value: any, params: any[]) => boolean | ResultObject | Promise<boolean | ResultObject>;
declare type ValidationResult ... |
import _ from 'lodash';
import iterateJsdoc from '../iterateJsdoc';
export default iterateJsdoc(({
jsdoc,
report,
utils,
}) => {
if (utils.avoidDocs()) {
return;
}
const targetTagName = 'example';
const functionExamples = _.filter(jsdoc.tags, {
tag: targetTagName,
});
if (!functionExamples... |
import {SET_CURRENCY} from "../actionTypes";
const initialState = {
currencyHashMap: {}
};
export default function(state = initialState, action) {
switch (action.type) {
case SET_CURRENCY:{
//console.log("SET_MODULE: The content to be updated: ",action);
//console.log("Current MODULE ",modules);
console.... |
'use strict'
const parser = require('./parser')
const commandAlias = require('./command-alias')
const errCode = require('err-code')
module.exports = (command, ctxMiddleware) => {
// Apply command aliasing (eg `refs local` -> `refs-local`)
command = commandAlias(command)
return new Promise((resolve, reject) => ... |
var express = require('express');
var router = express.Router();
var items = [];
router.get('/', function(req, res) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Content-Type', 'text/plain; charset="utf-8"');
res.status(200).json(items);
});
router.post('/', function(req, res) {
items.push(re... |
// Source: https://drafts.csswg.org/css-color/#valdef-color-rebeccapurple
const cssColors = {
aliceblue: [240, 248, 255],
antiquewhite: [250, 235, 215],
aqua: [0, 255, 255],
aquamarine: [127, 255, 212],
azure: [240, 255, 255],
beige: [245, 245, 220],
bisque: [255, 228, 196],
black: [0, 0, 0],
blanchedalmond: [... |
/* eslint-disable no-use-before-define */
'use strict';
const toIterator = base => {
if (!base[Symbol.iterator]) {
throw new TypeError('Base is not Iterable');
}
return base[Symbol.iterator]();
};
class Iterator {
constructor(base) {
this.base = toIterator(base);
}
[Symbol.iterator]() {
retu... |
/*
* Copyright 2019 American Express Travel Related Services Company, 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 r... |
import React from 'react'
import { withRouter } from 'react-router-dom'
import { FormControl, InputGroup, Button } from 'react-bootstrap'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSearch } from '@fortawesome/free-solid-svg-icons'
class SearchSummoner extends React.Component {
cons... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4317ec2c"],{"4fe8":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"payback-page-content"},[a("div",{staticClass:"header-content"},[a("page-title",{attrs:{title:e.pageName}})]... |
'use strict';
var should = require('should'),
request = require('supertest'),
path = require('path'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Card = mongoose.model('Card'),
express = require(path.resolve('./config/lib/express'));
/**
* Globals
*/
var app,
agent,
credentials,
... |
/**
* Options:
* <ul>
* <li>anchor: the element to which the menu must be anchored, in a responsive
* view.</li>
* <li>backText: the text to be printed on back items in submenus.</li>
* <li>backCssClass: the CSS class to be applied to back items in submenus.</li>
* <li>responsiveWidth: the screen width under whi... |
// @flow
import * as React from 'react'
import { matchPath } from 'react-router-dom'
import { graphql } from 'react-apollo'
import gql from 'graphql-tag'
import { mapProps } from 'recompose'
import { Subscribe } from 'unstated'
import { mockBlock, mockRound, mockProtocol } from '@livepeer/graphql-sdk'
import { ToastNot... |
import FWCore.ParameterSet.Config as cms
hltEle32WPTightBestGsfChi2L1SeededFilter = cms.EDFilter("HLTEgammaGenericFilter",
absEtaLowEdges = cms.vdouble(0.0, 1.479),
candTag = cms.InputTag("hltEle32WPTightBestGsfNLayerITL1SeededFilter"),
doRhoCorrection = cms.bool(False),
effectiveAreas = cms.vdouble(0.... |
# Generated by Django 3.2.9 on 2021-11-30 12:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cafeapp', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='item',
name='name',
field... |
homework_complete = True
day_of_week = 'Saturday'
if (homework_complete == True) and (day_of_week == 'Tuesday'):
print('You can watch cartoons!')
elif day_of_week == 'Saturday':
print('You can watch cartoons, but you must complete your homework by Sunday night!')
else:
print("You can't watch cartoons until... |
import { __assign } from "tslib";
import * as React from 'react';
import { StyledIconBase } from '../../StyledIconBase';
export var ShoppingBasket = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
};
return (React.createEl... |
const Translator = require('@uppy/utils/lib/Translator')
const ee = require('namespace-emitter')
const cuid = require('cuid')
const throttle = require('lodash.throttle')
const prettyBytes = require('@uppy/utils/lib/prettyBytes')
const match = require('mime-match')
const DefaultStore = require('@uppy/store-default')
con... |
export default function Users() {
return <h2>Users</h2>;
}
|
/*! DataTables 1.10.20
* ©2008-2019 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary DataTables
* @description Paginate, search and order HTML tables
* @version 1.10.20
* @file jquery.dataTables.js
* @author SpryMedia Ltd
* @contact www.datatables.net
* @copyright Copyright 2... |
import os
import requests
OAUTH_URL_GOOGLE = "https://accounts.google.com/o/oauth2/token"
class OAuth(object):
def __init__(self, client_id, client_secret, refresh_token, **kwargs):
self.client_id = client_id
self.client_secret = client_secret
self.refresh_token = refresh_token
s... |
document.addEventListener('DOMContentLoaded', DocumentReady, false);
function DocumentReady() {
// Handling form submit
var form = document.querySelector('form');
form.onsubmit = function(event) {
event.preventDefault();
var queryString = serializeForm(form);
// console.log('submitting', queryString... |
//exercise 007
function somar() {
var txtn1 = document.getElementById('txtn1');
var txtn2 = document.getElementById('txtn2');
var num1 = Number.parseFloat(txtn1.value);
var num2 = Number.parseFloat(txtn2.value);
s = num1 + num2;
result.innerHTML = `Resultado: ${num1} + ${num2} = <strong>${s}</st... |
/*jslint browser: true, for: true, long: true, unordered: true */
/*global window console demonstrationHelper */
(function () {
// Create a helper function to remove some boilerplate code from the example itself.
const demo = demonstrationHelper({
"responseElm": document.getElementById("idResponse"),
... |
import React from "react";
import Button from "components/Button";
import IconText from "elements/IconText";
export default function Footer() {
return (
<footer>
<div className="container">
<div className="row">
<div className="col-auto" style={{ width: 350 }}>
<IconText />
... |
'use strict';
const stripAnsi = require('strip-ansi');
const { expect } = require('chai');
module.exports = {
errors: {
field: {
invalidPropertyWithSuggestion: function (invalid, valid) {
return result => {
expect(result.code).to.eql(1);
expect(result.stdout).not.to.be.empty();... |
'use strict'
/* eslint-disable no-unused-expressions */
let chai = require('chai')
let expect = require('chai').expect
let nock = require('nock')
let sinon = require('sinon')
let sinonChai = require('sinon-chai')
chai.should()
chai.use(sinonChai)
let cli = require('heroku-cli-util')
let childProcess = require('child_... |
import React from "react"
import { Link } from "gatsby"
import { rhythm, scale } from "../utils/typography"
const Layout = ({ location, title, children }) => {
const rootPath = `${__PATH_PREFIX__}/`
let header
if (location.pathname === rootPath) {
header = (
<h1
style={{
...scale(1.... |
# coding: utf8
"""
题目链接: https://leetcode.com/problems/implement-strstr/description.
题目描述:
Implement strStr().
Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Example 1:
Input: haystack = "hello", needle = "ll"
Output: 2
... |
/* global jQuery:true */
/*
* Fuel UX Tree
* https://github.com/ExactTarget/fuelux
*
* Copyright (c) 2014 ExactTarget
* Licensed under the BSD New license.
*/
// -- BEGIN UMD WRAPPER PREFACE --
// For more information on UMD visit:
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
(function umdFacto... |