text
stringlengths
3
1.05M
import { Platform, PermissionsAndroid, NativeModules, Linking, Alert, } from 'react-native'; import Geolocation from 'react-native-geolocation-service'; const Location = { openAppSettings() { if (Platform.OS === 'ios') { Linking.openURL('app-settings:'); } else { const {RNAndroidOpenSe...
"use strict"; function editNamesbase() { if (customization) return; closeDialogs("#namesbaseEditor, .stable"); $("#namesbaseEditor").dialog(); if (modules.editNamesbase) return; modules.editNamesbase = true; // add listeners document.getElementById("namesbaseSelect").addEventListener("change", updateInp...
// THIS FILE IS AUTO GENERATED import { GenIcon } from '../lib'; export function GiMailedFist (props) { return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M215.75 21.063c-1.306 0-2.582.045-3.813.125-1.964.127-3.778.385-5.5.718L171.47 82.5c4.257-1.103 8.72-1.688 13.31-1.68...
const fs = require("fs"); const sourceFileName = "2019_OrcamentoDespesa/2019_OrcamentoDespesa.zip.csv"; const targetFileName = "unf-inserts.sql"; const columnsTypes = "int int string int string int string int string int string int string string string int string int string int string double double double" .split(...
import logging import unittest from unittest import mock from opsgenie_sdk import SuccessResponse from src.alerter.alerts.system_alerts import ( OpenFileDescriptorsIncreasedAboveThresholdAlert) from src.channels_manager.apis.opsgenie_api import OpsgenieApi from src.channels_manager.channels.opsgenie import Opsgen...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2018-present mundialis GmbH & Co. KG 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 ...
'use strict'; var CoreObject = require('core-object'); var RSVP = require('rsvp'); var assert = require('./../helpers/assert'); var stubProject = { name: function(){ return 'my-project'; } }; describe('s3-index plugin', function() { var subject, mockUi, context, MockS3, plugin, s3Options, REVISIO...
const { getTags, getPosts, getTotalPages, categorizeDataByTag, appendPrevAndNextItemByTag, } = require('../scripts/utilities/headless'); const main = async () => { const posts = []; // Get number of pages. const wpPages = await getTotalPages(); // Get tags const tags = await getTags(); if (!wpPa...
import css from './preview.module.scss' import * as cx from 'classnames' import Print from './print.module.scss' import Text from './text' import Options from './options' import Slider from './slider' import Typography from './typography' import Badge from './badge' import Links from './links' import Description from '...
/* From Homey SDK 2.0 docs: The file device.js is a representation of an already paired device on Homey */ 'use strict'; const Homey = require('homey'); const weather = require('../../owm_api.js'); class owmLongterm extends Homey.Device { async onInit() { let name = this.getName() + '_' + this.getData()....
import AuthModule from './auth' import AuthController from './auth.controller'; import AuthComponent from './auth.component'; import AuthTemplate from './auth.html'; describe('Auth', () => { let $rootScope, makeController; beforeEach(window.module(AuthModule)); beforeEach(inject((_$rootScope_) => { $rootScope = ...
# ================================================================= # # Authors: Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com> # # Copyright (c) 2016 Ricardo Garcia Silva # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the...
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import * as React from 'react'; import { isFragment } from 'react-is'; import PropTypes from 'prop-types'; import * as ReactDOM from 'react-dom'; import ownerDocument fro...
export class AutoCompleteController { constructor(search, formatSuggestion = null) { this._search = search; this._formatSuggestion = formatSuggestion; } search(searchText) { return this._search(searchText) .then(results => { let suggestions = []; for (let result of results) { ...
describe("Unit: Testing Controllers", function() { beforeEach(module('app')); var expectedParams = {limit:50, skip:0}, scope, commoditiesData = { "count": 200, "commodities": [ { "_id": "5734d18b3dbaf9c32c313963", ...
from pygame.sprite import Sprite from gfx import GFX from time import time from config import CFG class PickupShield(Sprite): def __init__(self, position): """ Adds lives or score to player when touched, moves down the level. :param position: list x,y where pickup should spawn """...
/*jshint globalstrict:false, strict:false, maxlen: 500 */ /*global assertEqual, AQL_EXECUTE, assertTrue, fail */ //////////////////////////////////////////////////////////////////////////////// /// @brief tests for optimizer rules /// /// @file /// /// DISCLAIMER /// /// Copyright 2010-2014 triagens GmbH, Cologne, Ger...
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],(function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return(n+=1==t?"ka...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
"use strict"; const Benchmark = require("benchmark"); const benchmarks = require("beautify-benchmark"); const suite = new Benchmark.Suite(); const handlebars = require("./egg-handlebars"); const files = require("./expect/files.json"); const assets = require("./expect/assets.json"); const locale = require("./expect/loc...
import pytest import numpy as np from aegis.modules.reproducer import Reproducer reproducer = Reproducer(0.5, 0.1, "sexual") @pytest.mark.parametrize( "genomes,muta_prob,random_probabilities,expected", [ ( [[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]], [0.42], [[[0.01, 0.02, ...
// 26 / 06 / 2021 | 10:01 // CSS Shorcuts JS File // Author : Elias Faisal function qs(s) { return document.querySelector(s); } function qsa(s) { return document.querySelectorAll(s); } function ce(t) { return document.createElement(t); } //============== onresize = ()=>{ qs("#textContentHolder").styl...
const generateRandomIdString = prefix => Math.random().toString(36).replace('0.', prefix || ''); export default generateRandomIdString;
import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import { Line } from 'react-chartjs-2'; const LineChart = ({ data }) => { const [chartData, setChartData] = useState([data]); useEffect(() => { const onPageLoad = () => { setChartData({ labels: ['jan', 'aug',...
/* Copyright (c) 2019-2020 Digital Dream Labs. See LICENSE file for details. */ var { VectorBluetooth } = require("./vectorBluetooth.js"); var { RtsCliUtil } = require("./rtsCliUtil.js"); var { IntBuffer } = require("./clad.js"); var { RtsV2Handler } = require("./rtsV2Handler.js"); var { RtsV3Handler } = require("./rt...
describe('model', function() { var provider; beforeEach(module('ur.model', function(modelProvider) { provider = modelProvider; })); beforeEach(function() { jasmine.addMatchers({ toEqualData: function() { return { compare: function(actual, expected) { return {pass: ...
#!/usr/bin/env python import inspect import functools import sys import weakref import re from libmirheo import * from libmirheo import __file__ as _libmirheo_file # For `make make_and_copy`. __all__ = ["version", "tools", "_libmirheo_file"] # Global variable for the mirheo coordination class # Used in decorators ...
"""Extract signal processing features Reference: https://www.kaggle.com/gpreda/lanl-earthquake-eda-and-prediction """ import sys import numpy as np import pandas as pd from pathlib import Path from sklearn.linear_model import LinearRegression from tqdm import tqdm import competition as cc from common import stop_...
window.addEventListener('DOMContentLoaded', () => { document.forms[0].addEventListener('submit', e => { e.preventDefault(); const data = {}; document.forms[0].querySelectorAll('input').forEach(d => d.type != 'submit' ? data[d.name] = d.value : null); const xhr = new XMLHttpRequest();...
var callbackArguments = []; var argument1 = function (x) { callbackArguments.push(arguments) return x.length > 0; }; var argument2 = false; var argument3 = function (op) { callbackArguments.push(arguments) return InsertOp.isInsert(op); }; var argument4 = r_0; var argument5 = false; var argument6 = f...
var op = "shu"; function vexport(){ var exporter = new Exporter(); exporter.addLines(exporter.header); if(linkDB.length === 0 && l3DB.length === 0 && machineDB.length === 0){ // this.addLines("#何もない"); return; } /* Jailの作成 /jails/にjailnameディレクトリが存在しない場合はmkserver, mkrouterを用いてjailディレクトリを作成する。 */ if(ma...
const pathPrefix = `/pathPrefix` import * as catchLinks from "../catch-links" beforeAll(() => { global.__PATH_PREFIX__ = `` // Set the base URL we will be testing against to http://localhost:8000/pathPrefix window.history.pushState({}, `APP Url`, `${pathPrefix}`) }) afterAll(() => { // Set history back to ht...
const NotificationStore = { items: [], // here the notifications will be added add (notification) { notification.id = Date.now() this.items.push(notification) }, remove (notification) { this.items = this.items.filter(function(el) { return el !== notification }) }, clean () { if (t...
import React from 'react'; import PropTypes from 'prop-types'; import { SelectField } from 'components/inputs'; const EMPTY_VALUE = -1; const GenderField = ({ errors, handleChange, label }) => ( <SelectField name="gender" error={errors.gender} label={label} options={[{ value: EMPTY_VALUE, name: 'Se...
(function(){"use strict";if(typeof Date.dp_locales==='undefined'){Date.dp_locales={"texts":{"buttonTitle":"منتخب تاریخ ...","buttonLabel":"پر کلک کریں یا کلید درج کریں دبائیں یا اسپیس بار کیلنڈر کو کھولنے کے لئے","prevButtonLabel":"پچھلے مہینے پر جائیں","nextButtonLabel":"اگلے مہینے پر جائیں","closeButtonTitle":"بند کر...
'use strict' var split = require('split2') var Parse = require('fast-json-parse') var chalk = require('chalk') var levels = { default: 'USERLVL', 60: 'FATAL', 50: 'ERROR', 40: 'WARN', 30: 'INFO', 20: 'DEBUG', 10: 'TRACE' } var standardKeys = [ 'pid', 'hostname', 'name', 'level', 'time', 'v'...
from __future__ import generators, print_function import numpy as np from random import shuffle from scipy.io import loadmat class DataSet(object): def __init__(self, cfg): """Construct a DataSet. """ self.cfg = cfg self.all_walks = np.fliplr(np.loadtxt(cfg.walks_dir, dtype=np.in...
# -*- coding: utf-8 -*- import json import re import urllib.parse from ..base.multi_downloader import MultiDownloader class LinksnappyCom(MultiDownloader): __name__ = "LinksnappyCom" __type__ = "downloader" __version__ = "0.18" __status__ = "testing" __pyload_version__ = "0.5" __pattern__ =...
# Copyright 2019 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...
const fs = require('fs'); const path = require('path'); const { promisify } = require('util'); class Util { static init() { } //====================================== static response(data, message = '') { let typeData = (data.typeData) ? (data.typeData) : typeof data; message = message || data.messag...
import cornerstoneTools from 'cornerstone-tools'; import cornerstone from 'cornerstone-core'; import log from '../../log'; import getLabel from '../lib/getLabel'; import getDescription from '../lib/getDescription'; import getImageIdForImagePath from '../lib/getImageIdForImagePath'; import guid from '../../utils/guid'; ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* ************************************* */ /* Не забыть подключить инлайн exif.js */ /* ************************************* */ /* переворачивалка картинок */ const EXIF = window['EXIF']; /** * Пример качеста картинки */ exports.JPG_QUALIT...
/** * @license Copyright 2017 Google 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 applicable law or a...
#!/usr/bin/env node const http = require("http"); const options = { hostname: "webcode.me", port: 80, path: "/", method: "GET" }; let req = http.request(options, (res) => { console.log(`statusCode: ${res.statusCode}`); res.on("data", (d) => { process.stdout.write(d); }); }); req.on("error", (err) =>...
import pytest from ..result_spool_logger import ResultSpoolLogger class MockRecord: def __init__(self, msg): self.msg = msg self.exc_info = None self.exc_text = None self.stack_info = None def getMessage(self): return self.msg @pytest.mark.django_db class TestResult...
import mod1300 from './mod1300'; var value=mod1300+1; export default value;
module.exports = { norpc: true, testCommand: 'npm test', compileCommand: 'npm run compile', providerOptions: { "mnemonic": "tuition produce fat desk suggest case essence wreck warfare convince razor bless" }, skipFiles: [ 'ERC777', 'boomflow' ] }
# -*- coding: utf-8 -*- """ Created on Mon Jul 23 10:59:53 2018 @author: endy franklin this code predicts if a passenger would survive or not from the titanic ship wreck """ import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt dataset= pd.read_csv('train.csv') #...
$(document).ready(function() { $.getJSON("http://demos.fmeserver.com.s3.amazonaws.com/server-demo-config.json", function(config) { initialize(config.initObject); }); }); function initialize(initObject) { document.getElementById('dropdowns').style.display = 'none'; document.getElementById('mapPa...
from django.test import TestCase from django.test.utils import override_settings from django_seven.deprecated_rules.rules import NEW_URL_TEMPLATETAG_SYNTAX from tests.deprecation_rules.mixins import RuleCheckMixin class TestNewURLTemplateTagSyntaxRule(RuleCheckMixin, TestCase): @override_settings(DEPRECATED_RUL...
export { CircleManager } from './services/managers/circle-manager'; export { DataLayerManager } from './services/managers/data-layer-manager'; export { FitBoundsAccessor } from './services/fit-bounds'; export { AgmGeocoder } from './services/geocoder-service'; export { GoogleMapsAPIWrapper } from './services/google-map...
import EventEmitter from "eventemitter3"; import camelCase from "camelcase"; import { SystemProgram, } from "@solana/web3.js"; import Coder, { stateDiscriminator } from "../../coder"; import { getProvider } from "../../"; import { validateAccounts, parseIdlErrors } from "../common"; import { findProgramAddressSync, cre...
import { auth_actions } from '../actionsTypes/action_types' export const AuthReducer = (state, action) => { switch (action.type) { case auth_actions.LOGIN_SUCCESS: return { ...state, token: action.payload.token, user: { ...state.user, email: action.payload.data.email, firstname: action...
import csv from django.http import HttpResponse def export_as_csv_action(description="Export selected objects as CSV file", fields=None, exclude=None, header=True): """ This function returns an export csv action 'fields' and 'exclude' work like in django ModelForm 'header' is w...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open('requirements.txt', 'r') as f: install_reqs = [ s for s in [ line.strip(' \n') for line in f ] if not s.startswith('#') and s != '' ] setuptools.setup( name="tsfel", version="0...
from typing import List from pydantic import BaseModel # General Data Models class Labels(BaseModel): value: str confidence: float class Entities(BaseModel): text: str start_pos: int end_pos: int value: str confidence: float # Token Tagging Data Model class TokenTaggingRequest(BaseMod...
import { html } from 'lit-element'; import ColorUtils from '@/utils/color-utils'; /* Generates an schema object containing type and constraint info */ export default function setTheme(baseTheme, theme = {}) { let newTheme = {}; // Common Theme colors const primaryColor = theme.primaryColor ? theme.primaryColor ...
'use strict'; var SecurityGuard = require('../models/securityguard'); exports.list_all_sg= function(req, res, next) { SecurityGuard.find({}, function(err, sg) { if (err) res.status(400).send(err); res.json(sg); }); }; exports.create_sg = function(req, res, next) { var new_sg = new SecurityGuard(...
import React from "react" const Title = ({ title }) => { return ( <div className="text-center"> <h1>{title}</h1> </div> ) } export default Title
# -*- coding: utf-8 -*- """DNA Center Export Device list data model. Copyright (c) 2019-2020 Cisco and/or its affiliates. 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, incl...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
!function(){Function&&Function.prototype&&Function.prototype.bind&&(/MSIE [678]/.test(navigator.userAgent)||(window.__twttr&&window.__twttr.widgets&&window.__twttr.widgets.loaded&&window.twttr.widgets.load&&window.twttr.widgets.load(),window.__twttr&&window.__twttr.widgets&&window.__twttr.widgets.init||!function(t){fun...
/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang("codesnippet","ug",{button:"كود پارچىسى قىستۇرۇش",codeContents:"كود مەزمۇنى",emptySnippetError:"كود پارچىسى بوش قالمايدۇ",language:"تىل",title:"كود پا...
import { useStaticQuery, graphql } from 'gatsby' export function useAlgorithmsQuery() { const data = useStaticQuery(graphql` query { allMarkdownRemark( filter: { fields: { slug: { regex: "//algorithms//" } } } sort: { order: ASC, fields: frontmatter___number } ) { edges { ...
Input:: //// [/a/lib/lib.d.ts] /// <reference no-default-lib="true"/> interface Boolean {} interface Function {} interface CallableFunction {} interface NewableFunction {} interface IArguments {} interface Number { toExponential: any; } interface Object {} interface RegExp {} interface String { charAt: any; } interfa...
import { ApiService } from "@/utils/api.service"; import Vue from "vue"; export const RequestCodeService = { async sendCode(email) { const data = { email, }; try { const resp = await Vue.axios.post("/accounts/request-code/", data); let objResp = ApiService.getSuccessData(resp); re...
#!/usr/bin/python # # Copyright 2012 Google 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 b...
/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'af', { title: 'Toeganglikheid instruksies', contents: 'Hulp inhoud. Druk ESC om toe te maak.', l...
var reference_2_derivative_8cpp = [ [ "derivative", "reference_2_derivative_8cpp.xhtml#aeae8f44225b61c5a6b05fdfcd82ae3d1", null ], [ "derivative", "reference_2_derivative_8cpp.xhtml#ac5079d3fc0f7cf5f8dfb40b882cea1af", null ] ];
'use strict' var gulp = require('gulp') var config = require('../config') var $ = require('gulp-load-plugins')() var del = require('del') gulp.task('clean', function () { return del([config.directories.dist.base]) }) gulp.task('main:images', function () { return gulp.src(config.directories.src.images + '/**/*')...
# Copyright (c) 2010-2022, InterDigital # All rights reserved. # See LICENSE under the root folder. # Compute Chamfer Distance loss for MinkowskiEngine sparse tensors import torch import sys import os from pccai.optim.pcc_loss import PccLossBase sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file...
// SideBar.js import React, {Component} from 'react'; export default class SideBar extends Component { constructor(props){ super(props); } render(){ return ( <aside className="main-sidebar"> <section className="sidebar"> {/* ...
$(document).ready(function () { $(".clickable1").click(function () { $(".toggle1").toggle(); $(".click1").toggle(); }); $(".clickable2").click(function () { $(".toggle2").toggle(); $(".click2").toggle(); }); $(".clickable3").click(function () { $(".toggle3").toggle(); $(".click3").to...
file = open('teste.txt', 'r')
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_...
module.exports = [ { test: 'single type', expected: { "a": { headers: ["1", "2", "3"], hlength: 3, values: [ ["1", "2", "tres"], ["1", "2", "tres"], ], vlength: 2 } }, cfg: { types: true, }, input: ` #type-a,1,2,3 ty...
// Copyright 2008 The Closure Library 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 // // Unl...
import { addGenErrorHandler } from '../../errors/handler.js' import { validate } from '../../validation/validate.js' // Custom data validation middleware // Check that newData passes config validation // E.g. if a model is marked as `required` or `minimum: 10` in the // config, this will be validated here export const...
# Downloads an image from a remote HTTP server and saves it to a local file from robograph.datamodel.base import graph from robograph.datamodel.nodes.lib import files, value, http def scraper_image(img_url, target_path): url = value.Value(value=img_url) client = http.Get(mime_type='image/png', ) writer =...
/* Copyright 2012 Mozilla Foundation * * 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...
from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from bfrs import views from bfrs.api import v1_api from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.contrib.auth import views as au...
#! /usr/bin/python import os import sys #Global Variables argv = " ".join(sys.argv).split(", ") VERSION = argv[1] properties = { "server-name": argv[2], "gamemode": argv[3], "difficulty": argv[4], "level-name": argv[5], "level-seed": argv[6], "allow-cheats": argv[7], "max-players": argv[8], ...
const chalk = require('react-dev-utils/chalk'); console.log( ` ██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███████╗███████╗██████╗ ██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗██╔════╝██╔════╝██╔══██╗ ██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║███████╗█████╗ ██████╔╝ ██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ...
include.module( 'tool-help', [ 'tool', 'widgets', 'tool-help.panel-help-html'], function ( inc ) { "use strict"; /* jshint -W040 */ Vue.component( 'help-widget', { extends: inc.widgets.toolButton, } ) Vue.component( 'help-panel', { extends: inc.widgets.toolPanel, temp...
chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.message === "clicked_browser_action") { var firstHref = $("a[href^='http']").eq(0).attr("href"); console.log(firstHref); chrome.runtime.sendMessage({"message": "open_new_tab", "url": firstHref}); } ...
# -*- coding: utf-8 -*- """Console script for msg_parser.""" import os.path import sys from argparse import Action from argparse import ArgumentParser from argparse import ArgumentTypeError from argparse import FileType from pprint import pprint from modules.app_email.lib.msg_parser import MsOxMessage class FullPat...
import events from 'utils/events' import DomComponent from 'abstractions/DomComponent/DomComponent' import Bubble from 'components/dom/Bubble/Bubble' import store from 'utils/store' import orders from 'controllers/orders/orders' let ID = 0 export default class GameGUI extends DomComponent { didInit () { this.bi...
# Tag an array of IP Addresses to keep import boto3 import botocore client = boto3.client('ec2') eip_in_use = [] eip_unused = [] for address in client.describe_addresses()['Addresses']: if 'AssociationId' in address.keys(): eip_in_use.append(address) else: eip_unused.append(address) def tag...
import { expect } from 'chai'; import sinon from 'sinon'; import { lasti, stringify, hasSubstr, getYesNo, emptyDevice, emptyVolume, } from '../../src/utilities.js'; describe('general utilities', function() { describe('lasti', function(){ it('should return the last index of an array', function(done) {...
import { run } from '@ember/runloop'; import { module, test } from 'qunit'; import startApp from '../../tests/helpers/start-app'; module('Acceptance | toggles', function(hooks) { hooks.beforeEach(function() { this.application = startApp(); }); hooks.afterEach(function() { run(this.application, 'destroy'...
$(document).ready(function() { var table = $('#datatable').DataTable(); // Cargar datos CATEGORIA table.on('click', '.editBtnCategory', function(e) { e.preventDefault(); $tr = $(this).closest('tr'); if ($($tr).hasClass('child')) { $tr = $tr.prev('.parent'); } ...
const Base = require('./base.js'); const moment = require('moment'); const generate = require('nanoid/generate'); const Jushuitan = require('jushuitan'); module.exports = class extends Base { /** * 获取支付的请求参数 * @returns {Promise<PreventPromise|void|Promise>} */ // 测试时付款,将真实接口注释。 在小程序的services/pay....
export class Control { constructor(reference, key) { if (reference[key] === null || reference[key] === undefined) { throw new Error('Control has no value'); } this.type = 'text'; this.reference = reference; this.key = key; this.labelValue = key; this.options = {}; this.initialVa...
""" Django settings for webapplication project. Generated by 'django-admin startproject' using Django 3.1.3. 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/ ...
/***************************************************************** jQuery Validate扩展验证方法 (linjq) *****************************************************************/ $(function(){ // 判断整数value是否等于0 jQuery.validator.addMethod("isIntEqZero", function(value, element) { value=parseInt(value); retur...
// THIS FILE IS AUTO GENERATED import { GenIcon } from '../lib'; export function AiOutlineDelete (props) { return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 1024 1024"},"child":[{"tag":"path","attr":{"d":"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64...
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;function indexInParent(t){for(var e=t.parentNode.childNodes,i=0,n=0;n<e.length;n++){if(e[n]==t)return i;1==e[n].nodeType&&i++}return-1}function eq(t){return t>=0&&t<this.length?this[t]:-1}function preventDefault(t){(...
'use strict'; function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else {...
import React, { Component } from 'react'; import { Container, Grid , Image, Button} from 'semantic-ui-react'; class Home extends Component { render(){ return( <div> <Container> <Grid centered columns={1} className="logo_wraper bgContainer"> <div className="overflow_hidd...