text
stringlengths
3
1.05M
'use strict'; module.exports = [ 'ViewsProvider', function(ViewsProvider) { ViewsProvider.registerDefaultView('cockpit.navigation', { id: 'reports', label: 'Reports', pagePath: '#/reports', template: '<!-- nothing to show, but needed -->', controller: function() {}, access: [ 'Views', ...
goog.provide('goog.ui.DimensionPicker'); goog.require('goog.events.EventType'); goog.require('goog.math.Size'); goog.require('goog.ui.Control'); goog.require('goog.ui.DimensionPickerRenderer'); goog.require('goog.ui.registry'); goog.ui.DimensionPicker = function(opt_renderer, opt_domHelper) { goog.ui.Control....
import concat from 'lodash.concat' import { actionTypes } from './actions' export default (state = [], action) => { switch(action.type) { case actionTypes.ADD_CASE_ASSERTION: return concat(state, { caseIndex: action.caseIndex, shouldMessage: action.message, assertFn: action.assert...
var _Symbol$iterator = require("@babel/runtime-corejs3/core-js-stable/symbol/iterator"); _Symbol$iterator;
from module import time_utils class Game(object): # Class constructor def __init__(self, x, y, x2, y2, strategy, game_name, state=1): self.x = x # game window frame self.y = y # game window frame self.x2 = x2 # game window frame self.y2 = y2 # game window frame sel...
'use strict'; const blessed = require('@blessed/neo-blessed'); const getTheme = require('../../../utils/getTheme'); module.exports = function (screen, pkg) { const theme = getTheme(); const { border, style } = theme.box; const box = blessed.box({ top: '10%+1', left: 0, width: '100%', height: '1...
from setuptools import setup install_requires = [] tests_require = install_requires + ['pytest'] setup( name="aiotask_context", version="0.5.0", author="Manuel Miranda", author_email="manu.mirandad@gmail.com", description="Store context information inside the asyncio.Task object", classifiers=...
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import { Divider } from '@material-ui/core'; import Layout from '@components/Layout/Layout'; import Seo from '@components/Seo'; import Header from './components/Header'; import MyPriorities from './components/MyPriorities/MyPriorities'; ...
/** * @license * Copyright 2020 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.u2.filter', name: 'FilterView', extends: 'foam.u2.View', documentation: ` Filter View takes the properties defined in 'searchColumns' and creates a filter ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _nullthrows() { const data = _interopRequireDefault(require("nullthrows")); _nullthrows = function () { return data; }; return data; } function _terser() { const data = require("terser");...
/** * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ // Compressed version of core/ckeditor_base.js. See original for instructions. /* jshint ignore:start */ /* jscs:disable */ window.CKEDITOR...
/** * Auto-generated action file for "LaunchDarkly" API. * * Generated at: 2019-05-07T14:42:41.065Z * Mass generator version: 1.1.0 * * flowground :- Telekom iPaaS / launchdarkly-com-connector * Copyright © 2019, Deutsche Telekom AG * contact: flowground@telekom.de * * All files of this connector are licensed...
import http from 'http'; import ListenerInterface from './listener-interface.js'; import { Logger } from '../logger.js'; import HttpCaptor from '../utils/http-captor.js'; import { HTTP_HEADER_FORWARDED, HTTP_HEADER_HOST, HTTP_HEADER_X_FORWARDED_PORT, HTTP_HEADER_X_FORWARDED_PROTO, HTTP_HEADER_X_SCH...
function helix(number) { let rows = Number(number); let sequence = "ATCGTTAGGG"; let currentIndex = 0; for (let i = 0; i < rows; i++) { let currentRow = i % 4; if (currentIndex === sequence.length) { currentIndex = 0; } if (currentRow === 0) { co...
const navigation = require('./navigation'); const dragonForms = require('./dragon-forms'); module.exports = { company: 'Endeavor Business Media, LLC', navigation, dragonForms, identityX: { enabled: true, appId: '5df0e83705aa56c6f243fc30', }, homePageSections: [ { alias: 'equipment', name: 'Equi...
from __future__ import absolute_import import logging log = logging.getLogger(__name__) def _node_set_unschedulable(name, value, **kwargs): ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} action = 'cordon' if value else 'uncordon' unschedulable = _...
System.register(["./p-3369a689.system.js","./p-0ccc45cb.system.js","./p-71963b39.system.js","./p-8abcb78c.system.js"],(function(t){"use strict";var e,n,r,o;return{setters:[function(t){e=t.r;n=t.h;r=t.g},function(){},function(t){o=t.i},function(){}],execute:function(){var i=t("query_pages_router",function(){function t(t...
#!/usr/bin/env python from distutils.core import setup import tweetokenize setup( name='tweetokenize', version=tweetokenize.__version__, description='Regular expression based tokenizer for Twitter', author='Jared Suttles', url='https://github.com/jaredks/tweetokenize', packages=['tweetokenize']...
import _ from 'lodash'; // 已知至少兼容:Chrome、IE10+ export const fileDownload = (fileUrl, fileName, onPercent, onFinish) => new Promise(resolve => { const xhr = new XMLHttpRequest(); xhr.open('GET', fileUrl, true); xhr.responseType = 'blob'; xhr.addEventListener( 'progress', evt => { ...
var data=[['20020716',5.411], ['20020717',5.267], ['20020718',5.289], ['20020719',5.393], ['20020722',5.302], ['20020723',5.446], ['20020724',5.498], ['20020725',5.481], ['20020726',5.433], ['20020729',5.437], ['20020730',5.337], ['20020731',5.341], ['20020801',5.376], ['20020802',5.398], ['20020805',5.315], ['20020806...
var searchData= [ ['e',['e',['../a00162.html#ga4b7956eb6e2fbedfc7cf2e46e85c5139',1,'glm']]], ['epsilon',['epsilon',['../a00162.html#ga2a1e57fc5592b69cfae84174cbfc9429',1,'glm']]], ['epsilonequal',['epsilonEqual',['../a00163.html#gaca9443f217dc36587624247245522331',1,'glm::epsilonEqual(vecType&lt; T, P &gt; co...
/*\ title: $:/core/modules/widgets/set.js type: application/javascript module-type: widget Set variable widget \*/ (function(){ /*jslint node: true, browser: true */ /*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; var SetWidget = function(parseTreeNode,options...
import React from "react"; import {HashRouter, Redirect, Route, Switch} from "react-router-dom"; // components import Layout from "./Layout"; // pages import Error from "../pages/error"; import Login from "../pages/login"; // context import {useUserState} from "../context/UserContext"; export default function App() { ...
import React from 'react'; import PropTypes from 'prop-types'; class CreatePlaylist extends React.Component { constructor(props) { super(props); this.state = { title: '', description: '', }; this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(...
/** * Created by VILLARUEL on 5/9/2017. */ /** * Created by VILLARUEL on 5/9/2017. */ (function() { 'use strict'; angular.module('app.restaurant', [ 'app.core', 'app.widgets' ]); })();
define(['jquery', 'bootstrap', 'frontend', 'template', 'form'], function ($, undefined, Frontend, Template, Form) { var Controller = { index: function () { return false; }, details: function () { return false; } }; return Controller; });
macDetailCallback("70b3d5943000/36",[{"a":"510 Cottonwood Drive Milpitas CA US 95035","o":"Abbott Medical Optics Inc.","d":"2015-09-20","t":"add","s":"ieee","c":"US"}]);
export default "M5,2V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4H11V2H5M4,6H12V17H4V6M19,8V11.79L16.71,9.5L16,10.21L18.79,13L16,15.79L16.71,16.5L19,14.21V18H19.5L22.35,15.14L20.21,13L22.35,10.85L19.5,8H19M20,9.91L20.94,10.85L20,11.79V9.91M20,14.2...
import expect from "expect"; //import deepFreeze from "deep-freeze"; import Nodis from "../index"; import Promise from "bluebird"; describe("index test", () => { it("basic get set test", () => { let repo = new Nodis(); repo.set(["test"], true).then(() => { return repo.get(["test"]); }).then((resul...
class Solution: def romanToInt(self, s: str) -> int: symbols = { "I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000 } result = 0 i = 0 while i < len(s): if i == len(s)...
from setuptools import setup import setuptools setuptools.setup()
/** * GitHub v3 REST API * GitHub's v3 REST API. * * The version of the OpenAPI document: 0.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. * */ (function(root, factory) { if (typeof def...
/** * Created by 斌 on 2017/4/16. */ const mongoose = require('mongoose'); Schema = mongoose.Schema; var personSchema = Schema({ _id : Number, name : String, age : Number, stories : [{ type: Schema.Types.ObjectId, ref: 'Story' }] }); var storySchema = Schema({ _creator : { type: Number,...
const navbar = document.querySelector('.navbar', '.portfolio-button') const colorBarHeight = document.getElementsByClassName('color-bar'); const colorBarWrapper = document.querySelector('.color-bar') const carousel = document.querySelector('.carousel') const cells = carousel.querySelectorAll('.carousel-cell') const cel...
import React, { useEffect, useState } from 'react'; import { Form, Button, Alert } from 'react-bootstrap'; import { useMutation } from '@apollo/client'; import { ADD_USER } from '../utils/mutations'; // import { createUser } from '../utils/API'; import Auth from '../utils/auth'; const SignupForm = () => { // set in...
var Kibana = require('../../'); var devStatics = require('./dev_statics'); module.exports = function (settings) { var kibana = new Kibana(settings || {}, [devStatics]); return kibana.listen(); }; if (require.main === module) { module.exports(); }
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions Srl # 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.ap...
#magic 8 ball using list import random messages = ['it is certain' , 'its decidely so' , 'yes definatly', 'replay hazy try agin', 'ask again later' , 'concentrate and ask again later' , 'my reply is no', 'outlook not so good...
const path = require("path"); const fs = require("fs"); const getPublicUrlOrPath = require("react-dev-utils/getPublicUrlOrPath"); // Make sure any symlinks in the project folder are resolved: // https://github.com/facebook/create-react-app/issues/637 const appDirectory = fs.realpathSync(process.cwd()); const resolveAp...
from argparse import ArgumentParser, ArgumentTypeError import pathlib from . import __version__ as version def validate_path(file: str) -> pathlib.Path: '''Validate file path provided''' path = pathlib.Path(file) if not path.exists(): raise ArgumentTypeError("file does not exist.") if not path.is_file(): r...
var vm = new Vue({ el: '#app', data: { host: host, error_username: false, error_pwd: false, error_pwd_message: '请填写密码', username: '', password: '', remember: false }, methods: { // 获取url路径参数 get_query_string: function(name){ ...
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2017 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides class sap.ui.base.ObjectPool sap.ui.define(['./Object'], function(BaseObject) { "use strict"; /** * Creates an Obj...
#!/usr/bin/env python # by TR from obspy.core import UTCDateTime as UTC from sito.data import IPOC from sito.noisexcorr import (prepare, get_correlations, plotXcorrs, noisexcorrf, stack) from sito import util import matplotlib.pyplot as plt from sito.stream import read from multiprocessing ...
#!/usr/bin/env python # # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # 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 # n...
import React from 'react'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import ReviewList from './ReviewList'; import formatMoney from '../../lib/formatMoney'; const SingleProduct = props => { const id = Number(props.match.params.id); let product = {}; if (props.product...
module.exports = [ // see: https://github.com/tastejs/todomvc/issues/832 // chapling brunch does not mark items as completed via the completed CSS class 'TodoMVC - chaplin-brunch, No Todos, should hide #main and #footer', 'TodoMVC - chaplin-brunch, Mark all as completed, should allow me to mark all items as comple...
from .agg_awc import AggAwcDistributedHelper from .agg_awc_daily import AggAwcDailyAggregationDistributedHelper from .aww_incentive import AwwIncentiveAggregationDistributedHelper from .awc_infrastructure import AwcInfrastructureAggregationHelper from .awc_location import LocationAggregationDistributedHelper from .agg_...
/** * Created by 王平平 on 2017/3/23. * * @author: 王平平 * @github: https://github.com/zzmhot * @email: 812863096@qq.com * @Date: 2017/3/23 18:19 * @Copyright(©) 2017 by 王平平. * */ var mock = require('../mock/user') var uri = require('../../src/common/port_uri').port_user module.exports = function (apiRouter) { /...
const { MessageEmbed } = require('discord.js') module.exports = { name: 'choose', usage: '<options>', /** * @param {Client} client * @param {Message} message * @param {String[]} args */ run: async (client, message, args) => { if (message.content.includes(',')) { ...
var ComponentsEditors = function () { var handleWysihtml5 = function () { if (!jQuery().wysihtml5) { return; } if ($('.wysihtml5').size() > 0) { $('.wysihtml5').wysihtml5({ "stylesheets": ["../../assets/global/plugins/bootstrap-wysihtml5/wysiwyg-...
const Koa = require('koa') const bodyParser = require('koa-bodyparser') const logger = require('koa-logger') const views = require('koa-views') const router = require('./routes') const app = new Koa() app.use(bodyParser({ enableTypes: ['json', 'form', 'text'] })) app.use(logger()) app.use(views(`${__dirname}/view...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.GQLInputObjectType = exports.GQLEnumType = exports.GQLUnionType = exports.GQLInterfaceType = exports.GQLObjectType = exports.GQLScalarType = exports.GQLDeprecatedDirective = exports.GQLSkipDirective = exports.GQLIncludeDirective = e...
import html import re import os import requests import subprocess from telethon.tl.functions.channels import GetFullChannelRequest from telethon.tl.types import ChannelParticipantsAdmins from telethon import events from telegram import MAX_MESSAGE_LENGTH, ParseMode, Update from telegram.ext import CallbackContext, Co...
/* eslint-disable no-duplicate-case */ /* eslint-disable no-case-declarations */ import axios from 'axios'; import cookie from 'js-cookie'; const initialState = { startDate: 0, name: '', courses: [], day: [] }; // eslint-disable-next-line import/no-anonymous-default-export export default (state = initialStat...
const TYPES = { individuel: "#D6317D", préposé: "#D29E10", service: "#3174D6", }; const MandatairelistStyle = { bg: "white", justifyContent: "space-between", }; const columnStyle = (isMobileHidden, isTabletHidden) => { return { "@media screen and (max-width: 40em)": { display: isMobileHidden ? "...
""" test desispec.fluxcalibration """ from __future__ import division import unittest import copy import numpy as np #import scipy.sparse #from desispec.maskbits import specmask from desispec.frame import Frame from desispec.fluxcalibration import normalize_templates from desispec.fluxcalibration import FluxCalib f...
let router = require('express').Router(); let Utils = require('../services/utils'); let User = require('../models/user'); let Stream = require('../models/stream'); let Like = require('../models/like'); Utils.getRouteWithUser("/:stream/like", router, (req, res, user, err) => { Stream.findOne({watch_key: req.params....
var http = require('http'); http.get("http://nodejs.org/api/http.json", function(res) { console.log("Got response: " + res); res.on('data', function (chunk) { console.log('BODY: ' + chunk); }); }).on('error', function(e) { console.log("Got error: " + e.message); });
if (process.env.NODE_ENV !== 'production') { require('dotenv').config() } module.exports = class Stripe { constructor(stripePublicKey, stripeSecretKey) { this.stripeSecretKey = stripeSecretKey; this.stripePublicKey = stripePublicKey; this.stripe = require("stripe")(stripeSecretKey); } async creat...
import { DateTime } from "luxon"; export function formatDate(timestamp) { return new Intl.DateTimeFormat("en-US", { weekday: "long", year: "numeric", month: "long", day: "numeric", }).format(new Date(timestamp)); } export function formatDateTime(timestamp) { return new Intl.DateTimeFormat("en-US...
from django.http import HttpResponse from django.template.loader import select_template from regulations.generator import api_reader from regulations.generator.versions import fetch_grouped_history from regulations.views import utils def regulation_exists(label_id): client = api_reader.ApiReader() vr = clien...
/* * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. * * 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...
# Generated by Django 3.1.1 on 2020-09-12 17:38 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0009_auto_20200911_0600'), ] operations = [ migrations.AlterUniqueTogether( name='produ...
import { capitalize, isArray, isFunction } from 'lodash'; import chrome from 'ui/chrome'; import uiModules from 'ui/modules'; import filterTemplate from 'ui/chrome/config/filter.html'; import intervalTemplate from 'ui/chrome/config/interval.html'; export default function ($compile) { return class KbnTopNavControlle...
import {STORE_COMPANY_FINANCE} from '../AuthConnstant' const initialState = { response:{ status:false, message:'' } } export default function(state=initialState,action){ switch(action.type){ case STORE_COMPANY_FINANCE: return { ...state, ...
"""Everything to do with the MongoDB backend.""" from .collection import AsyncMongoCollection __all__ = ("AsyncMongoCollection",)
import React from 'react' import PropTypes from 'prop-types' import { Link, graphql, StaticQuery } from 'gatsby' import PreviewCompatibleImage from './PreviewCompatibleImage' class BlogRoll extends React.Component { render() { const { data } = this.props const { edges: posts } = data.allMarkdownRemark r...
const settings = { textbox: { borderRadius: '50%', }, main: { backgroundColor: 'blue', }, content: { header: { type: 'h1', content: 'HI THERE', }, }, }; export default settings;
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..utils import RobustFOV def test_RobustFOV_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=True,...
# This sample tests various forms of the 'with' statement. from typing import Any, Optional, TypeVar _T1 = TypeVar("_T1") class Class1(object): def __exit__( self, t: Optional[type] = None, exc: Optional[BaseException] = None, tb: Optional[Any] = None, ) -> bool: retu...
import React, {Component} from 'react'; import {connect} from 'react-redux'; import {Switch, Route, Redirect} from 'react-router'; import {examplePages, showcasePages, docPages} from '../../contents/pages'; import {toggleMenu} from '../actions/app-actions'; import Header from './header'; import Home from './home'; im...
import React, { Component } from 'react' import ExampleComponent from 'react-momo' export default class App extends Component { render () { return ( <div> <ExampleComponent text='Modern React component module' /> </div> ) } }
'use strict' var MIN = 49152 var MAX = 65535 module.exports = function uniqPort( string ) { if ( typeof string === 'number' ) { string += '' } else if ( typeof string !== 'string' ) { throw new TypeError( '`name` must be a string or a number' ) } for ( var i = 0, offset = 0; i < stri...
$(document).ready(function(){$(".product__img").click(function(t){t.preventDefault();var a=$(t.target).attr("src");$(".product__main-img").attr("src",a),$(t.target).addClass("active").siblings().removeClass("active")})}); //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInB...
const sequence = { _id: 1, get id() { return this._id++ } } const produtos = {} function salvarProduto(produto) { if(!produto.id) produto.id = sequence.id produtos[produto.id] = produto return produto } function getProduto(id) { return produtos[id] || {} } function getProdutos() ...
import {FETCH_MOVIE, FETCH_MOVIES, SEARCH_MOVIE, LOADING} from './types'; import axios from 'axios'; import {APIKey} from '../APIKeys'; export const searchMovie = text => dispatch => { dispatch({ type: SEARCH_MOVIE, payload: text }) }; let movies = [ {Title: "Fast & Furious 6", Year: "2013", i...
import React, { Component } from 'react' import { Route, Redirect } from 'react-router-dom' import { v4 as uuidv4 } from 'uuid' import _ from 'lodash' import tree from '~core/tree' import env from '~base/env-variables' import Loader from '~base/components/spinner' import Breadcrumbs from '~base/components/breadcrumbs'...
var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var path = require('path'); var SriPlugin = require('../index'); var htmlparser = require('htmlparser'); var fs = require('fs'); var select = require('soupselect').select; var expect = require('expect'); var tmp = require('tmp'); ...
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: Donny You(youansheng@gmail.com) import math import torch.nn as nn from collections import OrderedDict from models.backbones.module_helper import ModuleHelper model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resne...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestDocTypeLayout(unittest.TestCase): pass
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);retu...
import $ from 'jquery'; import '../filters/short_dots'; import booleanFieldNameIcon from './field_name_icons/boolean_field_name_icon.html'; import conflictFieldNameIcon from './field_name_icons/conflict_field_name_icon.html'; import dateFieldNameIcon from './field_name_icons/date_field_name_icon.html'; import geoPointF...
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ YUI.add('slider-base', function (Y, NAME) { /** * Create a sliding value range input visualized as a draggable thumb on a * background element. * * @module slider * @submodule slider-base */ var INVALID_VALUE = Y.Attribute.I...
import React, {Component} from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {fetchWeather} from '../actions/index'; class SearchBar extends Component { constructor(props){ super(props) this.state = { term: '' }; } onInputChange = (e) => { console.lo...
(this["webpackJsonpdsearch-console"]=this["webpackJsonpdsearch-console"]||[]).push([[34],{1124:function(e,t,a){"use strict";a.r(t);var r=a(2),n=a(0),o=a.n(n),c=a(38),i=a(598),l=a(170),s=a(676),d=a(677),u=a(683),p=a(684),f=a(682),b=a(681),m=a(716);t.default=Object(c.b)((function(e){return Object(r.a)({},e.indicesReducer...
var Roblox = Roblox || {}; $.fn.serializeObject = function () { var obj = {}; $.each(this.serializeArray(), function (_, o) { var name = o.name; var value = o.value; if (obj[name] === undefined) { obj[name] = value; } }); return obj; }; Roblox.Bundles = (function () { var selectors = { bundleName...
// https://docs.cypress.io/api/introduction/api.html const envs = ['dev', 'stg', 'prod', 'development', 'staging', 'production'] describe(`Default options for each env ${envs.toString()}`, () => { it('force env works', () => { cy.visit('/') envs.forEach((env) => { cy.get(`#${env}`) .should('ha...
""" Helper script which provides an integer number from a given range based on a hash of current directory name. This is used in continuous integration as a helper to provide ports to assign to services like Redis, Memcached when they are run on a per-test basis. E.g. in a Jenkins job, one could put as the run comman...
async function logout() { const response = await fetch("api/users/logout", { method: "post", headers: { "Content-type": "application/json" }, }); if (response.ok) { document.location.replace("/"); } else { alert(response.statusText); } } document.querySelector("#logout").addEventListener("cl...
import bus from '@calibur/bus' import { signApi } from '@calibur/api' import { isDev } from '@calibur/utils' import { loadMicroApp } from 'qiankun' import Cookies from 'js-cookie' const TOKEN_KEY = 'JWT-TOKEN' const User = class { constructor() { this.info = null this.isLogin = false this.checked = fals...
const path = require('path'); const favicon = require('serve-favicon'); const compress = require('compression'); const cors = require('cors'); const helmet = require('helmet'); const logger = require('./logger'); const feathers = require('@feathersjs/feathers'); const configuration = require('@feathersjs/configuration...
from typing import List, Union from django.db import models import uuid from django.db.models.query import QuerySet from author.models import * from django.contrib.auth.models import BaseUserManager, AbstractBaseUser # Create your models here. class Follower(models.Model): id = models.CharField(primary_key=True,...
Articles.define('node', Macro => [ { tag: 'p', html: `Appends a single child ${Macro.NODE}. This option is designed to add a single ${Macro.NODE} instance (one that is ready to be appended and does not need to be built from an <b>options</b> ${Macro.OBJECT}) as the contents o...
/* global jest, before, beforeEach, describe, it, expect */ import React from 'react'; import renderer from 'react-test-renderer'; import ErrorHandler from './ErrorHandler'; const ErrorComponent = () => { throw 'error'; }; describe('ErrorHandler component', () => { it('should not render when exception is thrown a...
from PIL import Image from pathlib import Path from typing import List from urllib.parse import quote import iiif_binder def load_images(path: Path, base: Path) -> List[iiif_binder.Image]: images = [] for image_path in path.glob("*.png"): img = Image.open(image_path) width, height = img.size ...
// Regular expression that matches all symbols in the `Cn` category as per Unicode v10.0.0: /[\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u05FF\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F\u086B-\u0...
import React from "react" import Avatar from "../avatar" import Icon from "../icon" export default () => { const socials = [ { icon: "fab fa-lg fa-github", url: "https://github.com/wuxiaobai24" }, { icon: "fas fa-lg fa-envelope-open", url: "wuxiaobai24:wuxiaobai24@foxmail.com" }, { icon: "fas fa-lg fa-rs...
let handler = async (m, { conn, usedPrefix }) => { if (m.isGroup) { if (!(isAdmin || isOwner)) { global.dfail('admin', m, conn) throw false } } let id = m.chat conn.absen = conn.absen ? conn.absen : {} if (!(id in conn.absen)) { await conn.sendButton(m...
const execa = require('execa'); const workdir = require('../utils/workdir'); module.exports = { command: 'run', describe: 'Run the local Ghost instance in the foreground', builder: {}, handler: function (args) { workdir.use(args); execa.sync(process.execPath, ['current/index.js'], {std...
import React from 'react' import PropTypes from 'prop-types' import Moment from 'react-moment' import 'moment-timezone' import QRCode from 'qrcode.react' import copy from 'copy-to-clipboard' import { showNotification } from 'notifications' import { FaAngleDown } from 'react-icons/lib/fa' import Value from 'componen...