text stringlengths 3 1.05M |
|---|
import Vue from 'vue'
import VueLazyload from '../src'
import genLazyCore from '../src/lazy'
import assert from 'assert'
describe('VueLazyload.js Test Suite', function () {
it('install', function () {
Vue.use(VueLazyload)
const vm = new Vue()
assert(vm.$Lazyload, 'has $Lazyload')
})
it('_valueFormat... |
var Visitor=require("./"),nodes=require("../nodes"),utils=require("../utils"),Normalizer=module.exports=function(o,e){e=e||{},Visitor.call(this,o),this.hoist=e["hoist atrules"],this.stack=[],this.map={},this.imports=[]};Normalizer.prototype.__proto__=Visitor.prototype,Normalizer.prototype.normalize=function(){var o=thi... |
import math
try:
# see if Swampy is installed as a package
from swampy.TurtleWorld import *
except ImportError:
# otherwise see if the modules are on the PYTHONPATH
from TurtleWorld import *
def square(t, length):
"""Draws a square with sides of the given length.
Returns the Turtle to the st... |
#!/usr/bin/python
"""
replacement for runtest target in Makefile
arg 1: test dir or test file
"""
import os
import os.path
import platform
import sys
import subprocess
import time
winsfx = ".exe"
testsfx = "_test.cpp"
debug = False
batchSize = 25
def usage():
sys.stdout.write('usage: %s <path/test/dir(/files)>... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '@kbn/test/jest';
import { AutoFollowPatternE... |
"""Support for iTach IR devices using a Python library."""
import logging
import asyncio
# from .pyitachip2ir.pyitachip2ir import ITachIP2IR
# from .pyitachip2ir import pyitachip2ir
from .pyitachip2irasync import pyitachip2irasync
import voluptuous as vol
from homeassistant.components import remote
from homeassistan... |
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
// because our static HTML file contains references to other
// static files (e.g., CSS), we must tell Express where to find them
app.use(express.static('public'));
// every time we rece... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.com/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import Header from "./header"
import "./layout.css"
cons... |
var stompClient = null;
function setConnected(connected) {
$("#connect").prop("disabled", connected);
$("#disconnect").prop("disabled", !connected);
if (connected) {
$("#conversation").show();
}
else {
$("#conversation").hide();
}
$("#greetings").html("");
}
function connec... |
module.exports = config => {
config.set({
mutator: 'javascript',
mutate: ['lib/**/*.js', 'templates/**/*.js'],
packageManager: 'yarn',
reporters: ['html', 'clear-text', 'progress'],
testRunner: 'jest',
transpilers: [],
coverageAnalysis: 'off'
});
};
|
import { parseCondition } from '../../form-renderer/condition';
describe('parseCondition', () => {
let condition;
let values;
let positiveResult;
let negativeResult;
beforeEach(() => {
condition = undefined;
values = {};
positiveResult = { visible: true, result: true };
negativeResult = { vi... |
const path = require('path'),
ReadableStream = require('stream').Readable,
crypto = require('crypto'),
minimatch = require('minimatch'),
Manifest = require('./manifest');
const nameReg = /(\{name\})/g,
hashReg = /(\{hash\})/g,
extReg = /(\{ext\})/g,
urlReg = /^https?::/;
/**... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import fs from 'fs';
import path from 'path';
import gl... |
import {loadJSONFile} from "./utility";
const getTopics = () => {
return loadJSONFile('topics.json').sort();
};
export default getTopics;
|
// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
/**
* @license Highcharts JS v4.0.4 (2014-09-02)
*
* (c) 2009-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
// JSLint options:
/*global Highcharts, HighchartsAdapter, document, window, navigator, setInterval, clearInterval, clear... |
#============================================
# Common Functions
#============================================
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from math import log10, floor
from decimal import Decimal
def checkSubset(list1, list2): # Check if a nested list is a subset of another... |
var assert = require('assert');
var R = require('..');
describe('flip', function() {
it('returns a function which inverts the first two arguments to the supplied function', function() {
var f = function(a, b, c) {return a + ' ' + b + ' ' + c;};
var g = R.flip(f);
assert.strictEqual(f('a',... |
import { assert } from '@ember/debug';
// reads addon config stored in meta element
function readAddonConfig(appInstance) {
let config = appInstance.resolveRegistration('config:environment');
let addonConfig = config['ember-cli-content-security-policy'];
// TODO: do not require policy to be stored in config obj... |
"use strict";
exports.__esModule = true;
var CONSTRUCTOR_TAGS = [
'[object ArrayBuffer]',
'[object Boolean]',
'[object DataView]',
'[object Date]',
'[object Array]',
'[object Float32Array]',
'[object Float64Array]',
'[object Set]',
'[object Symbol]',
'[object Map]',
'[object ... |
/* global angular */
(function(){
angular.module('googlechart')
.directive('agcOnMouseover', agcOnMouseoverDirective);
function agcOnMouseoverDirective(){
return {
restrict: 'A',
scope: false,
require: 'googleChart',
link: function(scope, ele... |
import json
import os
from datetime import date, timedelta
from itertools import chain
from time import strftime
from copy import deepcopy
SEQUENCE_DIRECTORY = '/home/bialkali/data/{}/sequences/'
TIMING_CHANNEL = 'Trigger@D15'
def zero_sequence(dt):
return {'dt': dt, 'type': 's', 'vf': 0}
def value_to_sequence... |
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
utils.load('test/inspector/wasm-inspector-test.js');
let {session, contextGroup, Protocol} =
InspectorTest.start('Tests stepping through wasm scrip... |
/**
* Copyright 2012-2016 Craig Campbell
*
* 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 agree... |
# Copyright 2019 The TensorFlow 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 applica... |
#pylint: disable=C0301,W0212,C0103,W0201
"""
Defines the Real/Complex Forces created by:
FORCE = ALL
NX Case Control Block Description
=============== ========== ===========
FORCE OEF1 Element forces or heat flux (linear elements only)
FORCE OEF1X Element forces ... |
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/alpinejs/dist/module.esm.js":
/*!**************************************************!*\
!*** ./node_modules/alpinejs/dist/module.esm.js ***!
\**************************************************/
/***/ ((__unused_webpac... |
module.exports={A:{A:{"2":"K C G E A B EB"},B:{"2":"D w Z I M H"},C:{"1":"0 1 3 5 6 7 8 v z x","2":"XB AB F J K C G E A B D w Z I M H N O P Q R S T U V W X Y y a b c d e f L h i j k l m n o p q r s t u VB PB"},D:{"1":"0 1 3 5 6 7 8 s t u v z x BB JB DB FB ZB GB HB","2":"F J K C G E A B D w Z I M H N O P Q R S T U V W X... |
const { findTwoSum2020AndMultiply, findThreeSum2020AndMultiply } = require("../day01")
test("findTwoSum2020AndMultiply", () => {
expect(findTwoSum2020AndMultiply(
[
"1721",
"979",
"366",
"299",
"675",
"1456",
],
)).toBe(514579)
})
test("findThreeSum2020AndMultiply", () ... |
var searchData=
[
['data',['data',['../a00013.html#a3f2c67dc864c6b6e705710853b5568ef',1,'gli::image::data()'],['../a00013.html#aec236abf7eac8ff4eec54eda033b9288',1,'gli::image::data() const '],['../a00013.html#a310f3ca6b342ecbcb22d0acc4eb3ae57',1,'gli::image::data()'],['../a00013.html#a22b0feffbc4e89ad8fae247eb142485... |
// login function
function login() {
// customer Id
var id = document.getElementById("customerId").value;
// customer password
var password = document.getElementById("customerPassword").value;
console.log(id + "!" + password);
} |
import { useState } from 'react';
export default initialVal => {
const [value, setValue] = useState(initialVal);
const handleChange = e => {
setValue(e.target.value);
};
const reset = () => {
setValue("")
};
return [value, handleChange, reset];
} |
/* @flow */
import {
RULE_TYPE,
KEYFRAME_TYPE,
isNestedSelector,
isMediaQuery,
isSupport,
} from 'fela-utils'
import cssifyDeclaration from 'css-in-js-utils/lib/cssifyDeclaration'
import isPlainObject from 'isobject'
import { CSSLint } from 'csslint'
import type { StyleType } from '../../../flowtypes/StyleT... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/Components/My/Interviews/_Id/Question.vue?vue&type=script&lang=js&":
/*!***************************************************************************... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-16 09:25
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0008_auto_20180216_0935'),
]
operations = [
migrations.RemoveField(
... |
/// Copyright (c) 2009 Microsoft Corporation
///
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
/// that the following conditions are met:
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
/// ... |
const fs = require('fs');
const { gitDescribe } = require('git-describe');
const buzzAboutPackage = require('./package.json');
const assetsPackage = require('@mn-pollinators/assets/package.json');
const { Octokit } = require("@octokit/rest");
function formatContributor(contributor) {
return {
username: contribut... |
/*
* MIT License
*
* Copyright (c) 2016 yanbo
*
* 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, m... |
// Copyright 2004-present Facebook. All Rights Reserved.
const tsc = require('typescript');
const tsConfig = require('./tsconfig.json');
module.exports = {
process(src, path) {
if (path.endsWith('.ts') || path.endsWith('.tsx')) {
return tsc.transpile(src, tsConfig.compilerOptions, path, []);
... |
from bonobo.nodes.io.base import Writer
from bonobo.constants import NOT_MODIFIED
from bonobo.config.configurables import Configurable
from bonobo.config import Option, use_context
from collections import OrderedDict
import requests
import json
import logging
_logger = logging.getLogger(__name__)
@use_context
class ... |
# 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 writing, ... |
// This object is imported into the documentation site. An example for the documentation site should be part of the pull request for the component. The object key is the kabob case of the "URL folder". In the case of `http://localhost:8080/components/app-launcher/`, `app-launcher` is the `key`. The folder name is creat... |
// Left in comments from forked repo (starter code)
const router = require('express').Router();
const { Category, Product } = require('../../models');
// The `/api/categories` endpoint
router.get('/', (req, res) => {
// find all categories
// be sure to include its associated Products
Category.findAll({include:... |
var a=1;
var b=1;
var nombre="Carlos"
var apellido="Garcia"
alert (nombre+" "+apellido)
|
// connects require constructor functions and modules
const inquirer = require('inquirer');
const Enemy = require('./Enemy');
const Player = require('./Player');
// constructor function for the game logic
function Game() {
// current player and enemy will be defined in initializeGame().
this.roundNumber = 0;
t... |
module.exports = {
env: {
browser: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
},
plugins: [
'react',
],
rules: {
'react/jsx-filename-extension': 'off',
'import/prefer-defaul... |
module.exports = {
title: '莫斯文化馆',
/**
* @type {boolean} true | false
* @description Whether fix the header
*/
fixedHeader: false,
/**
* @type {boolean} true | false
* @description Whether show the logo in sidebar
*/
sidebarLogo: false
}
|
import numpy as np
import torch
import torch.nn.functional as F
import torch.utils.data
from path import Path
from models import PoseExpNet
from tqdm import tqdm
from scipy.misc import imresize
from inverse_warp import pose_vec2mat
import argparse
parser = argparse.ArgumentParser(description='Script for attacking sfm ... |
'use strict';
module.exports = ConsoleStream
//common options: NA
//this will be invoked like a constructor, but really returns the reference below.
function ConsoleStream(opts){
process.stdin.resume()
process.stdin.setEncoding('utf8')
return process.stdin
}
|
const { Command } = require("discord.js-commando");
const { RichEmbed } = require("discord.js");
const fs = require("fs");
const moment = require("moment");
require("moment-duration-format");
const path = require("path");
module.exports = class WarnCommand extends Command {
constructor(client) {
super(client, {
... |
const Twit = require('twit');
const { getFileContent } = require('../helpers');
const { twitterKeys } = require('../../config/twitter');
const { channels } = require('../../config/bot');
const { db } = require('../database/models');
const { sendMessageToChannel } = require('./Discord');
const twitterClients = twitterK... |
import apiFetch from "utils/api_fetch";
import * as ruleTypes from "components/rules/rule_types";
function deactivateEndpoint(id, ruleType) {
switch(ruleType) {
case ruleTypes.FIXED_COMMISSION_RULE:
return `v1/rules/commission/fixed/${id}/deactivate`;
case ruleTypes.FIXED_INTERCHANGE_FEE_RULE:
re... |
// Production steps of ECMA-262, Edition 6, 22.1.2.1
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
var isCallable = function (fn) {
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
};
var toInteger = function (value) {
var n... |
// In production, we register a service worker to serve assets from local cache.
// 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 the "N+1" visit to a page, since previously... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[1223],{"R+GF":function(e,t,r){"use strict";var n=r("VHp3");r("O9pe"),r("17x9");var o,a=(o=r("q1tI"))&&"object"==typeof o&&"default"in o?o.default:o,c=a.createElement("path",{d:"M20,6a9.9272,9.9272,0,0,0-3.9968.8394,9.9758,9.9758,0,0,1,2.2451,1.36,8,8,0,1,1,0,15.6016,... |
/**
* @file webpack.common.js
* ----------
* File Created: Saturday, 8th June 2019 11:18:55 am
* Last Modified: Saturday, 8th June 2019 3:22:02 pm
* Modified By: kangkai (kakcool@qq.com)
* ----------
* @author kangkai
* @description webpack公共的配置信息
*/
const MiniCssExtractPlugin = require('mini-css-e... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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
# ... |
/**
* dojo - A version of dojo.js framework that ported to running on skylarkjs.
* @author Hudaokeji, Inc.
* @version v0.9.0
* @link https://github.com/skylark-integration/dojo/
* @license MIT
*/
define({"days-standAlone-short":["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],"months-format-narrow":["J","F","M","A","M... |
"use strict"
const MainStore = require("mainStore.js")
const Endpoints = require("endpoints.js")
let Common = module.exports
module.exports.fetchEx = function(key, pathParams, queryParams, options) {
return fetch(Endpoints.buildUrl(key, pathParams, queryParams), options).then((response) => {
return respo... |
import React from "react";
import { Link } from "react-router-dom";
import { makeStyles } from "@material-ui/core/styles";
import { useDispatch } from "react-redux";
import Drawer from "@material-ui/core/Drawer";
import CssBaseline from "@material-ui/core/CssBaseline";
import List from "@material-ui/core/List";
import ... |
/*! layer-v3.1.0 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn... |
#!/usr/bin/env python
from __future__ import print_function, unicode_literals
import argparse
from bs4 import BeautifulSoup
import datetime
import os
import requests
import six
from six.moves.urllib.parse import urljoin, urlparse
import sys
IMAGE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif']
URL_FORMAT = 'https://a... |
$(function() {
renderJobs();
bindStopButtons();
bindStopLeaderButtons();
bindResumeButtons();
bindStopAllButton();
bindResumeAllButton();
});
function renderJobs() {
$.get("server/jobs", {ip : $("#server-ip").text()}, function (data) {
$("#jobs tbody").empty();
for (var i = ... |
import {
AsyncStorage,
} from 'react-native';
export default class Settings {
static SETTINGS_STORE_NAME = '@SettingsStore'
// API URL including the trailing slash
static HUB_API_URL = null
static async getHubApiUrl() {
return await AsyncStorage.getItem(this.SETTINGS_STORE_NAME + ':hubApiUrl')
}
s... |
# you may need to install:
# pip3 install websocket-server
import sys, getopt
import logging
from websocket_server import WebsocketServer
from Panel import Panel
import json
import socket
class PanelServer(object):
def __init__(self):
self.host = None
self.port = 13254
self.server = None
self.isSecure = ... |
import {Server, DataSource} from './DataSource'
export default DataSource(Server('students/results/list'))
|
// @internal
export class AkitaError extends Error {
constructor(message) {
super(message);
}
}
// @internal
export function assertStoreHasName(name, className) {
if (!name) {
console.error(`@StoreConfig({ name }) is missing in ${className}`);
}
}
//# sourceMappingURL=errors.js.map |
function inventory(input = []) {
let inputArr = input.slice();
let heroes = [];
while (inputArr.length > 0) {
let line = inputArr.shift();
let tokens = line.split(' / ');
let hero = { name: tokens[0], level: Number(tokens[1]), items: tokens[2].split(', ') };
// let name... |
import React from 'react'
import RMDBLogo from '../../images/tmdb.svg';
import TMDBLogo from '../../images/poweredby.jpeg';
import { Link } from 'react-router-dom';
const Header = () =>(
<div className="Header">
<div className="Hcontent">
<img src={RMDBLogo} alt="rmdb-logo" classNa... |
/*!
* Ext JS Library 3.0.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
/**
* @class Ext.direct.PollingProvider
* @extends Ext.direct.JsonProvider
*
* <p>Provides for repetitive polling of the server at distinct {@link #interval intervals}.
* The initial request... |
"""
Django settings for Sentiment project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathl... |
export default 'in a few seconds'; |
export class DashboardFactory {
createDashboard(dashboardData) {
const { id, type } = dashboardData;
return {
id,
type,
title: dashboardData.attributes.title,
description: dashboardData.attributes.description,
panels: JSON.parse(dashboardData.attributes.panelsJSON),
timeTo... |
import assert from 'assert'
import {extractAskCalls, extractFunction} from "../../helpers/TransformationCode";
describe('Transformation Code Extraction', ()=> {
it('extracts & transforms raw javascript for the transform function', ()=> {
const raw = ` \n function transform(test) { return { me: ()=> {}} } `
a... |
var url= 'https://xz.3z.cc/',
host= 'https://wxapp.00k.cn/';
module.exports = {
ver: '1.1.0',
key: 'qXynXF0VwvmKUmRGoC6l4zg5RqCZ0Lhn',
pt: 3,
appid: 0,
apiList: {
baiduMap: 'https://api.map.baidu.com/geocoder/v2/',
eye: host+'wxxcx/homezone/recommed',
release: host +'wxxcx/newsale_list/newsal... |
{
if (__DEV__ && element != null && typeof element.type === "string") {
validateProperties(element.type, element.props, debugID);
}
}
|
exports.TvsApi = require('./TvsApi.js').TvsApi
exports.Tvs = require('./Tvs.js').Tvs
|
const { MessageEmbed } = require('discord.js');
const filename = require('path').basename(__filename).split(".")[0]
exports.run = async (client, message, args, level) => {
if(!args[0]) return message.channel.send(`Invalid arguments. Give me a question!`)
const responses = ["No", "Do not ask me that again please... |
/*
* @project: TERA
* @version: Development (beta)
* @license: MIT (not for evil)
* @copyright: Yuriy Ivanov (Vtools) 2017-2020 [progr76@gmail.com]
* Web: https://terafoundation.org
* Twitter: https://twitter.com/terafoundation
* Telegram: https://t.me/terafoundation
*/
var ArrChildProcess = [];
var WebProces... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Button from '@material-ui/core/Button';
import ListSubheader from '@material-ui/core/ListSubheader';
import { ListItem, ListItemText } from '@material-ui/core';
import { useNavigate } fr... |
#!/usr/bin/env python
import cPickle
from itertools import combinations, product
import networkx as nx
import sys
import sqlite3
sys.path.append("/usr/local/src/MFEprimer")
sys.path.append("/usr/local/src/MFEprimer/chilli")
import chilli
from chilli.chilli import int2DNA
import pdb
def mismatch(word, letters, num_... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.11.0-rc1-master-d74f93a
*/
!function(e,t,o){"use strict";function r(e,t){e.decorator("$$rAF",["$delegate",d]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("red").backgroundPalette("grey")}functi... |
# -*- coding: utf-8 -*-
# file: extract_shufflenetv2_weight.py
# brief: YOLOv3 implementation based on PyTorch
# author: Zeng Zhiwei
# date: 2019/11/12
import os
import sys
import torch
import argparse
import numpy as np
sys.path.append('.')
import shufflenetv2
from collections import OrderedDict
impor... |
import React from 'react';
import ErrorLayout from '../../layout/error_layout/ErrorLayout';
import { DASHBOARD_PATH } from '../../../routes/Slugs';
import { Button } from 'antd';
import { Link } from 'react-router-dom';
const Page403 = () => {
return (
<ErrorLayout status={403} subTitle="Sorry, you are not... |
describe('Util', function () {
describe('#parseParamString', function () {
it('parses a valid query string to a object', function () {
var testUrl = '?key=value&bool';
var expected = {
key: 'value',
bool: true
};
expect(L.Util.parseParamString(testUrl)).to.eql(expected);
});
it('parses a inv... |
import os
from .base import SourceTestCase
HOST = os.environ.get('MONGODB_HOST', 'localhost')
PORT = os.environ.get('MONGODB_PORT', 27017)
class TestCase(SourceTestCase):
generator = 'mongodb'
output_name = 'chinook_mongodb.json'
def generate(self):
client = self.module.Client(database='chinook... |
Search.setIndex({docnames:["index","overview","proton","proton.handlers","proton.reactor","proton.utils","tutorial","types"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sp... |
'use strict';
// cargamos el modulo de express
var express = require('express');
// crear una app de express que es lo mismo que una instancia.
var app = express(); // Podemos ver que express es un closure
// le vamos a decir que escuche peticiones en /
// app.get te dice que se ponga a escuchar por la ruta y le ti... |
import Util from '../libs/util';
export default {
methods: {
//节日列表
getFestivalList(params) {
return Util.get('other/holidayList', params).then(res => {
var result = res.data
return result.data
})
},
//新增节日
AddFestivalApi(params) {
return Util.post('other/addHoliday', params).then(res => {
... |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.dagre=f()}})(f... |
"undefined"==typeof WeakMap&&!function(){var defineProperty=Object.defineProperty,counter=Date.now()%1e9,WeakMap=function(){this.name="__st"+(1e9*Math.random()>>>0)+(counter++ +"__")};WeakMap.prototype={set:function(key,value){var entry=key[this.name];return entry&&entry[0]===key?entry[1]=value:defineProperty(key,this.... |
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool... |
import request from '@/utils/request'
export function roleList(params) {
return request({
url: '/role',
method: 'get',
params:params
})
}
export function roleAdd(params) {
return request({
url: '/role',
method: 'post',
data:params
})
}
export function roleUpdate(params) {
return reque... |
$(document).ready(function(){
$("tbody tr .getdata").on('click',function() {
var id = $(this).find('input[type="hidden"]').val();
var year_id = $('#year').val();
var td = $(this);
$.ajax({
type:'GET',
url:window.location.href+'/getdata',
data:{department_id:id,year_id:year_id},
success: functio... |
// @flow
import { getGravatarURL } from '@jitsi/js-utils/avatar';
import { JitsiParticipantConnectionStatus } from '../lib-jitsi-meet';
import { MEDIA_TYPE, shouldRenderVideoTrack } from '../media';
import { toState } from '../redux';
import { getTrackByMediaTypeAndParticipant } from '../tracks';
import { createDefer... |
/*
* Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)
*
* 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... |
from django.db import models
class Source(models.Model):
name = models.CharField(unique=True, max_length=255)
class ThumbnailMeta(models.Model):
source = models.ForeignKey(Source, related_name='thumbnails')
size = models.CharField(max_length=64)
name = models.CharField(unique=True, max_length=255)
... |
function getError(option, xhr) {
const msg = `cannot post ${option.action} ${xhr.status}`;
const err = new Error(msg);
err.status = xhr.status;
err.method = 'post';
err.url = option.action;
return err;
}
function getBody(xhr) {
const text = xhr.responseText || xhr.response;
if (!text) {... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthMiddleware = void 0;
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
const ... |
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode: 'development',
entry: './assets/index.js',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [{ test: /\.js$/, exclude: /node_modules/, loader: 'b... |
/*!
* Font Awesome Free 5.7.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
!function() {
"use strict";
var c = {}, h = {};
try {
"undefined" != typeof window && (c = window), "undefined" != ... |