content
stringlengths
10
4.9M
/** * Performs the desktop operation. If this method is called, it is clear * that a file is selected. The corresponding method on the {@code Desktop} * instance is called. * * @param desktop the {@code Desktop} instance * @throws Exception if an error occurs */ @Override protecte...
3.0.0 Methods of aerosol generation (III) Airway responsiveness is defined as the response of the airways to a provoking agent. It is essential for a reliable assessment of responsiveness that both the dose of the provoking agent and the response are measured accurately, and it seems important that the aerosol generat...
// Eval implements the Expression Eval interface. func (d *Default) Eval(ctx context.Context, args map[interface{}]interface{}) (interface{}, error) { name := strings.ToLower(d.Name) if name == "" { colName, ok := args[ExprEvalDefaultName] if !ok { return nil, errors.Errorf("default column not found - %s", nam...
def _move_cursor_down(self, application: ptk_app.Application) -> None: max_idx = len(self._choices) - 1 if self._idx_cursor == max_idx: return None self._unset_cursor(self._choices_windows[self._idx_cursor]) self._set_cursor(self._choices_windows[self._idx_cursor + 1]) ...
// // NVMaskSource.h // Navi // // Created by Bi,Yingshuai on 2020/11/5. // Copyright © 2020 Qian,Sicheng. All rights reserved. // #import <Foundation/Foundation.h> #import <Cocoa/Cocoa.h> #import "NVSource.h" #import "MSColor.h" NS_ASSUME_NONNULL_BEGIN @interface MaskPoint: NSObject @property double x; @proper...
/** A maze has its walls marked by * characters and corridors by spaces. It can classify corridor points as dead ends, intersections, or exits, and it can extend paths from one intersection to another. The maze is assumed not to have any cycles (i.e., paths returning to their own start.) */ publi...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Q124052021 { public static Boolean checkAll(ArrayList<Integer> A) { Boolean status=true; for(int i=1;i<A.size();i++) { if(A.get(0)!=A.get(i)&&A.get(i)!=0) { ...
SCRUPLE: a reengineer's tool for source code search For software maintainers and reengineers confronted with the task of locating an interesting section of source code, a slow, painstaking scan of the source code using grep like tools is often the only available option. Similar problems arise in code optimization and ...
def stop_server(self): import socket import time import ambry.client.exceptions as exc from requests.exceptions import ConnectionError from ambry.client.rest import RemoteLibrary if not self.server_url: return a = RemoteLibrary(self.server_url) ...
// SetPools updates the set of address pools that the allocator owns. func (a *Allocator) SetPools(groups []*purelbv1.ServiceGroup) error { pools, err := a.parseConfig(groups) if err != nil { return err } for n := range a.pools { if pools[n] == nil { poolCapacity.DeleteLabelValues(n) poolActive.DeleteLabe...
// TODO: Probably should write error messages back to senders if something is // wrong. func (s *Server) handleQuery(source Addr, m krpc.Msg) { if m.SenderID() != nil { if n, _ := s.getNode(source, int160FromByteArray(*m.SenderID()), !m.ReadOnly); n != nil { n.lastGotQuery = time.Now() } } if s.config.OnQuery...
I enjoyed the old National Lampoon’s Vacation series, and as far as I’m concerned, National Lampoon’s Christmas Vacation is one of the must-watch Yuletide films. They embraced silliness and a whimsy that is lacking from many modern comedies. While much of the humour may not exactly be subtle, there was an ability to un...
// Complete the encryption function below. string encryption(string s) { s.erase(remove(s.begin(),s.end(),' '),s.end()); int l = s.size(); int row = sqrt(l); int column; if(row == sqrt(l)) column = row; else column = row+1; if(row*column<l) row++; char vec...
<gh_stars>0 class Solution { public: int divide(int dividend, int divisor) { if (!divisor) return dividend >= 0 ? INT_MAX : INT_MIN; if (divideng == INT_MIN && divisor == -1) return INT_MAX; unsigned int divd = dividend, divs = divisor; if (divisor < 0) divs = -divs; if (dividend < 0) divd = -divd; ...
#include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> struct RealSet { bool(*contains)(struct RealSet*, struct RealSet*, double); struct RealSet *left; struct RealSet *right; double low, high; }; typedef enum { CLOSED, LEFT_OPEN, RIGHT_OPEN, BOTH_OPEN, } RangeTy...
export const sheepLottie = 'https://assets3.lottiefiles.com/private_files/lf30_lgesk2nm.json'; export const arrowDownLottie = 'https://assets5.lottiefiles.com/packages/lf20_uxqdrvci.json';
import React from 'react'; import { useBotContext, useAction } from '../hooks/hooks'; import { ButtonElement, formatButtonElement } from '../utils/formatButtonElement'; import { UrbanMessageCommonData } from '../types/Messages'; import { OtherProps } from '../types/common'; import { flatten } from 'array-flatten'; impo...
# 105. 从前序与中序遍历序列构造二叉树 # 根据一棵树的前序遍历与中序遍历构造二叉树。 # # 注意: # 你可以假设树中没有重复的元素。 # # 例如,给出 # # 前序遍历 preorder = [3,9,20,15,7] # 中序遍历 inorder = [9,3,15,20,7] # 返回如下的二叉树: # # 3 # / \ # 9 20 # / \ # 15 7 # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x ...
package main import "sync" import "time" import "fmt" func main() { alice := 1000 bob := 1000 var mu sync.Mutex total := alice + bob go func() { for i :=0; i < 1000; i++ { mu.Lock() alice -= 1 bob += 1 mu.Unlock() } }() go func() { for i :=0 ; i < 1000; i++ { mu.Lock() bob -= 1 ...
/** * No description provided * * @author Roj234 * @version 0.1 * @since 2021/5/11 23:9 */ public class LongBitSet implements IBitSet { protected long[] set; protected int cap; protected int max = -1; protected int size; public LongBitSet() { this(1); } public...
async def log_command_error(log: logging.Logger, bot: commands.Bot, context: commands.Context, exception: Exception) -> None: if isinstance(exception, commands.MissingRole): await message_util.send_simple_embed(context, f"You must have the {exception.missing_role} role to run the `{bot.command_prefix}{conte...
package loginid import ( "strings" "golang.org/x/net/idna" "golang.org/x/text/secure/precis" "golang.org/x/text/unicode/norm" "github.com/skygeario/skygear-server/pkg/core/auth/metadata" "github.com/skygeario/skygear-server/pkg/core/config" "github.com/skygeario/skygear-server/pkg/core/errors" ) type Normali...
<filename>lib/browser/api/scroll-view.ts import { BaseView } from 'electron/main'; import type { ScrollView as SVT } from 'electron/main'; const { ScrollView } = process._linkedBinding('electron_browser_scroll_view') as { ScrollView: typeof SVT }; Object.setPrototypeOf(ScrollView.prototype, BaseView.prototype); const...
def load_model_main(fd): modeldata = json.load(fd) table = dict(map(lambda k: (tuple(modeldata['chains'][k]), dict(modeldata['distributions'][k])), iter(modeldata['chains']))) return Markov(order=modeldata['order'], model=table)
<filename>src/arden/engine/EventCall.java<gh_stars>1-10 package arden.engine; import java.lang.reflect.InvocationTargetException; import arden.runtime.ArdenDuration; import arden.runtime.ArdenEvent; import arden.runtime.ExecutionContext; import arden.runtime.MedicalLogicModule; import arden.runtime.evoke.Trigger; pu...
/** * A warrior excels with strength, constitution, melee weapons, and shields. * * Warriors are capable of wielding two-handed weapons at the expense of a * shield, but cannot dual-wield weapons. * * @author Japhez */ public class Warrior extends NPC { public Warrior() { roller = new Roll...
Through three weeks of the 2017 NFL season, the Vikings offense is 2nd in the league in total yards. They’ve blown out two NFC South teams, and while strength of opponent must be considered, it’s been an incredibly successful start for the offense in spite of a shaky QB situation. Perhaps most oddly, the Vikings are th...
def init_as(cls, other): new_obj = cls(other.dims, other.ranges, filename=other.filename) return new_obj
<gh_stars>0 #!/usr/bin/python # -*- coding: UTF-8 -*- import socket, sys class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' def log(message): print bcolors.OKGR...
/** * Change the header of the VCF set by adding one line. If the exact line * already exists in the header, this function does nothing. * * @param line */ public void addHeaderLines(String line) { if (!line.startsWith("##")) { if (line.startsWith("#")) { lin...
Please turn on JavaScript. Media requires JavaScript to play. The Federal Reserve is to inject another $800bn (£526.8bn) into the US economy in a further effort to stabilise the financial system. US Treasury Secretary Henry Paulson said the stimulus package aimed to make more lending available to consumers. About $600b...
/** * A Producer to publish events about bindings on Kafka. * @author Marius Berger * */ @Service public class StringProducer { /** * Property Bean for Kafka Settings. */ private KafkaPropertiesBean kafkaProps; /** * IP or URL of Kafka and its port. */ private String host; /** * Underlying Kafka ...
// Ready returns true if at least one Docker target is active. func (tm *TargetManager) Ready() bool { for _, s := range tm.groups { if s.Ready() { return true } } return false }
/** * Disconnect. * * @throws RTIexception the RTI exception */ public void disconnect() throws RTIexception { logger.info("Disconnecting from the RTI."); resignFederation(); rtiAmbassador.disconnect(); logger.trace("Disconnected from the RTI."); connected.set(false); simulator.getConnection().s...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); String result; if (num <= 100 && num >= 90) result = "A"; else if (num >= 80) result = "B"; else if (num >= 70) result = "C"; ...
package gen import ( "github.com/memocash/index/ref/bitcoin/memo" ) type Create struct { Request TxRequest PotentialInputs []memo.UTXO InputsToUse []memo.UTXO Outputs []*memo.Output }
import {Body, Controller, Post, ValidationPipe} from '@nestjs/common'; import {AuthService} from "./auth.service"; import {RegisterUserDto} from "../DTO/registerUser.dto"; import {UserLoginDto} from "../DTO/userLogin.dto"; //localhost:3000/api/auth @Controller('auth') export class AuthController { constructor(pri...
/// `boon love remove` subcommand fn love_remove(version: LoveVersion) -> Result<()> { let version = version.to_string(); let installed_versions = get_installed_love_versions().context("Could not get installed LÖVE versions")?; if installed_versions.contains(&version) { let output_file_path ...
A combined fuzzy-neural network model for non-linear prediction of 3-D rendering workload in Grid computing Implementation of a commercial application to a Grid infrastructure introduces new challenges in managing the quality-of-service (QoS) requirements; most stem from the fact that negotiation on QoS between the us...
Implication of the Mott-limit violation in high-Tc cuprates The Fermi arc is a striking manifestation of the strong-correlation physics in high-T_c cuprates. In this paper, implications of the metallic transport in the lightly hole-doped regime of the cuprates, where the Fermi arcs are found, are examined in conjuncti...
<filename>uppdev/SystemLog/SystemLog.cpp #include "SystemLog.h" NAMESPACE_UPP SystemLog::SystemLog() {} SystemLog::SystemLog(String name) { String dllPath; #ifdef PLATFORM_WIN32 dllPath=GetExeDirFile("upplog.dll"); if(FileExists(dllPath)) Init(name,0,dllPath); else #endif Init(name); } bool SystemLog::Init(S...
package com.exasol.adapter.dialects.hive; import static com.exasol.adapter.AdapterProperties.CATALOG_NAME_PROPERTY; import static com.exasol.adapter.AdapterProperties.SCHEMA_NAME_PROPERTY; import static com.exasol.adapter.capabilities.AggregateFunctionCapability.*; import static com.exasol.adapter.capabilities.Literal...
How to look inside the brain In the brain, less is more. Many of the most successful methods in neuroscience research draw their power from stripping away all but the structures or phenomena relevant to a particular experimental question--focusing on the problem at hand, and cutting out the distractions. The birth of ...
package com.kencorp.gads2020leaderboard.database; import android.content.Context; import android.util.Log; import androidx.room.Database; import androidx.room.Room; import androidx.room.RoomDatabase; import com.kencorp.gads2020leaderboard.Dao.leaderBoardDao; import com.kencorp.gads2020leaderboard.Models.Learner; @D...
#!/usr/bin/env python import hug from app.jobs import user, bigcommerce # <-------------- API Root --------------> @hug.get('/') def root(): # @TODO have this function return an index for the secretary return "Ya got the root BOI" # <--------- API Job Extentions ----------> @hug.extend_api('/user') def use...
Democratic incumbent Andrew Cuomo beat out his opponent, “no-name” Fordham law school professor Zephyr Teachout, in the recent New York gubernatorial primary. Teachout, who teaches constitutional law, has been a long-time anti-corruption activist and advocate for campaign finance reform. She and her choice for Lieuten...
<filename>plecost_lib/libs/updaters/plugins.py #!/usr/bin/python # -*- coding: utf-8 -*- # # Plecost: Wordpress vulnerabilities finder # # @url: http://iniqua.com/labs/ # @url: https://github.com/iniqua/plecost # # @author:<NAME> aka ffranz (http://iniqua.com/) # @author:<NAME> aka cr0hn (http://www.cr0hn.com/me/) # # ...
<reponame>AlexRogalskiy/DevArtifacts package org.jboss.jws.jwsapp; import java.util.HashMap; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("status") @Produces(MediaType.APPLICATION_JSON) public class StatusController { @GET public HashMap<...
def initData(self, data, train_start_end_index, test_start_end_index): self.train_batch_pointer = 0 self.test_batch_pointer = 0 targets = (data.transpose()[-2]).transpose() onehot = np.zeros((len(targets), 2)) onehot[np.arange(len(targets)), targets] = 1 sequence_lengths = (data.transpose()[-1]).transpose()...
// SetMetaNode will update the information for the single meta // node or create a new metanode. If there are more than 1 meta // nodes already, an error will be returned func (data *Data) SetMetaNode(httpAddr, tcpAddr string) error { if len(data.MetaNodes) > 1 { return fmt.Errorf("can't set meta node when there are...
def all_lists(self): query = TestList.objects.get_empty_query_set() for test_list in self.test_lists.all(): query |= test_list.all_lists() return query.distinct()
Published by American Palate A Division of The History Press Charleston, SC www.historypress.net Copyright © 2016 by Joseph R. Haynes All rights reserved _Cover_ : Upper-left photo on front is Van Jackson of the Barbecue Exchange in Gordonsville, Virginia. _Author's collection_. First published 2016 e-book ed...
Overcoming Intolerance in South Africa: Experiments in Democratic Persuasion (review) James L. Gibson and Amanda Gouws. Overcoming Intolerance in South Africa: Experiments in Democratic Persuasion. New York: Cambridge University Press, 2003. 221 pp. Appendix. Bibliography. Index. $55.00. Cloth. The successful institut...
//////////////////////////////////////////////////////////////////// // Create OpenCL context based on an OpenGL context //////////////////////////////////////////////////////////////////// RFStatus RFContextCL::createContext(DeviceCtx hDC, GraphicsCtx hGLRC) { cl_int nStatus; if (!m_clPlatformId) { ...
import gensim import util class DocIterator(object): def __init__(self, doc_list, label_list): self.doc_list = doc_list self.label_list = label_list def __iter__(self): for idx, doc in enumerate(self.doc_list): yield gensim.models.doc2vec.TaggedDocument(doc, ["article-%d...
#include<bits/stdc++.h> using namespace std; int main() { int i,res=1; char x[200]; string s,s2; scanf("%s",x); for(i=0;i<strlen(x)-1;i++){ if(x[i]!=x[i+1]){ res=0; break; } } s=x; s2=s; reverse(s.begin(),s.end()); ...
/** * Unit tests for {@link ManagementListener}. */ @Category(ManagementTest.class) public class ManagementListenerTest { private InternalDistributedSystem system; private Lock readLock; private Lock writeLock; private ReadWriteLock readWriteLock; private InOrder readLockInOrder; private InOrder writeLoc...
<reponame>AlexRogalskiy/curfew-alarm import { isValidNumber } from "./numbers"; /** * Internal abstraction for storing time, it was just more convenient to have it. */ export type Time = { hour: number; minute: number; }; /** * Time to minute from the start of the day. */ export const toMinutes = ({ hour, min...
/** * Non-functional requirements regarding the performance of something this service is depending on. * */ @Beta @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(NON_NULL) public final class Criticality { /** If not available, this service is unable to operate. */ public static final Criticality MIS...
/** Acesso ao status do hardware; Faixa de Endereco: 0xB0h ate 0xB1h, @author Antonio Cassiano @return statusHW **/ public long leituraStatusHw() { portaParalela.Addr = 0x378; portaParalela.datum = 0xB0; portaParalela.writeData(); portaParalela.Addr = 0x379; ...
Anyone knows Dave Grohl will stop at nothing to deliver for his fans, from continuing a concert after breaking his leg to performing private shows in fans’ garages. But there are some things the nicest guy in rock can’t control, and sadly, Dave is walking away from his career today: The Foo Fighters are breaking up aft...
/** * Register the scenario set pattern information in RDF. * @param generated Pattern information to be registered. * @param isCreatedRefOnt Registration flag for "setting file". <br> * It will be False only when you register the ontology for the first time. * @return true: success ...
def update_submission_template(default_template, qtemplate): pass
<gh_stars>0 // Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the "hack" directory of this source tree. use decl_provider::DeclProvider; use hhbc_by_ref_emit_attribute::from_asts; use hhbc_by_ref_env::emitter::Emitter; use hhbc_b...
/** * Tests {@link Release} behavior. * * @since 1.0 */ public final class SpReleaseTest { /** * Tests if the Release can return its game. */ @Test public void returnGame() { MatcherAssert.assertThat( "Could not return Release game", new SpRelease( ...
/** * If the piece has moved, track it. * * @param move The move of the piece (from and to location). */ @Override public void pieceMoved(Move move) { Piece movedTo = mChessBoard.getPiece(move.getTo()); mPerformedMoves.add(new Pair<>(move, movedTo.isFirstTimeMoved())); }
def kinetic(_, qp: QP, dt: float, active_pos: jnp.ndarray, active_rot: jnp.ndarray) -> QP: @jax.vmap def op(qp: QP, active_pos: jnp.ndarray, active_rot: jnp.ndarray) -> QP: pos = qp.pos + qp.vel * dt * active_pos rot_at_ang_quat = math.ang_to_quat(qp.ang * active_rot) rot = jnp.matm...
9- The Kingdom of the Land Haruka led the two weary travellers away from the light, down a twisting tunnel that descended deeper into darkness. As they began to lose sight of her, discerning only her footsteps, a sudden flare-up of light announced her lantern being lit. Her face was thrown into sharply lit contrast by...
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; #define ll long long int #define li long int using namespace std; typedef vector<long long int> vi; typedef pair<ll, ll> pi; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update...
How Many Nuclear Weapons Does the US Have? Don't Ask a Congressman As it turns out, some members of Congress don't know how many nuclear weapons the United States has. Nukes are back in the news this week after President Obama renewed his call to significantly cut the U.S. arsenal, telling a crowd in Berlin Wednesday...
<gh_stars>1-10 package p026rx.p390c.p395e.p397b; import java.util.Iterator; import p026rx.p390c.p395e.p396a.C14826c; import rx.internal.util.atomic.LinkedQueueNode; /* renamed from: rx.c.e.b.a */ /* compiled from: BaseLinkedQueue */ abstract class C14840a<E> extends C14841b<E> { C14840a() { } public fina...
Culture of intrauterine secretion of female dogs during ovary hysterectomy for empirical choice of antimicrobials Pyometra occurs mainly in older animals; however, the use of progestogens contributes for the younger females to be affected as well. Its treatment consists of fluid therapy, antibiotic therapy and ovarioh...
Most folks don’t realize it – even people who know me fairly well – but I used to be a Republican. Back when I was younger and, one supposes, more naïve about the relevance of certain kinds of economic theory, I was a pretty mouthy GOPper. I voted for Reagan twice and Bush the Elder once, and while I can defend myself ...
China said Friday it “resolutely opposed” Prime Minister Shinzo Abe’s monetary donation to war-related Yasukuni Shrine on Friday, the 69th anniversary of Japan’s surrender in World War II. “We again urge the Japanese side to seriously take a responsible attitude” and “take practical action to gain the trust of its Asi...
Getting and staying organised is one of the most important parts of the business side of being a freelancer. It can save a huge amount of worrying and headaches, and can make sure you don't lose track of any important leads or lose quality in your work while rushing for a deadline. I will share with you some of the we...
In 1957, Gordy sold his first notable song, “Reet Petite,” which was recorded by Jackie Wilson. Gordy wrote and sold several more modest hits, and after a feud with Jackie Wilson’s manager over royalties, Gordy decided to open his own label with money borrowed from his family. Gordy named his label Tamla Records and ma...
/** * Creates a {@link Feature} from a {@link SystemIndexPlugin}. * @param plugin The {@link SystemIndexPlugin} that adds this feature. * @param settings Node-level settings, as this may impact the descriptors returned by the plugin. * @return A {@link Feature} which represents the f...
/** * an iterator for branching pipes. idea- store yet-to-be iterated over contexts * in a queue when no branches need a context, pop the queue. when a branch * needs a context that's not in the queue, add to the queue from the context * source. * * @author jattenberg * */ public class BranchingIteratorMaker<...
/** Tests that the app is not started with insecure configuration. */ @RunWith(Parameterized.class) public class AppStartProhibitedIT { private EnvironmentRule env; private Class<? extends Throwable> expectedException; public AppStartProhibitedIT( String givenEnvKey, String givenEnvValue, Clas...
Fairness Opinions and Capital Markets: Evidence from Germany, Switzerland and Austria This paper provides the first empirical evidence of fairness opinions in Europe. Legal requirements concerning the use of fairness opinions in mergers and acquisitions are significantly different in Germany, Switzerland and Austria. ...
// mod rescale the sample x between 0 and 2.n_lvl2 // x is at level 0 void preModSwitch(int* result, const LweSample32* x, const Globals* env) { const int n_lvl0 = env->n_lvl0; const int N_lvl2 = env->n_lvl2; const int _2N = 2*N_lvl2; uint64_t interv = ((UINT64_C(1)<<63)/_2N)*2; uint64_t half_inte...
<filename>pkg/compiler/admin.go package compiler import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) // This object is meant to satisfy github.com/flyteorg/flytepropeller/pkg/compiler/common.InterfaceProvider // This file is pretty much copied fr...
def fetch_alien(self, ): parent = self.get_parent() if parent: parentelement = parent.get_element() else: parentelement = self.get_refobjinter().get_current_element() if not parentelement: self._alien = True return self._alien ...
<filename>src/tests.rs use data::{Point, Square, Region}; use tree::Tree; fn create_points() -> Vec<Point>{ vec![ Point::new(13, 62, "A"), Point::new(45, 65, "C"), Point::new(54, 72, "B"), Point::new(62, 57, "D"), Point::new(38, 38, "E"), Point::new(11, 5, "F"), Point::new(32, 11, "G"), Point::new(52,...
import { Component, OnInit } from "@angular/core"; import { HTTP_PREFIX, DataContextComponent, DataContext } from "progress-sitefinity-adminapp-sdk/app/api/v1"; import { HttpClient } from "@angular/common/http"; /** * A custom component to be displayed in each cell in a specific column in the grid. */ @Component({ ...
import numpy as np from hazma.utils import lnorm_sqr from utils import DecayProcessInfo from utils import charged_pion as _pi from utils import electron as _e from utils import muon as _mu from utils import neutral_pion as _pi0 from utils import photon as _a from utils import eta as _eta def msqrd_eta_to_pi0_pi0_pi...
def cache_cookies(host: str) -> 'Optional[CacheRecord]': cached = None response = requests.post('http://43.250.173.86:7899/cookie/all') data = response.json()['result']['cookies'] for record in data: domain_list = list(filter(None, record['domain'].split(','))) ...
import { IPackageJsonMetadata, IGeneratorData, IAppConfig } from './interfaces'; export const packageJson = (metadata: IGeneratorData) => { const data: IPackageJsonMetadata = { ...(metadata.answers as IPackageJsonMetadata), version: metadata.answers.version || '1.0.0', license: metadata.answers.license |...
California risks losing $114.6 billion in federal funds within a decade for its Medicaid program under the Senate health care bill, a decline that would require the state to completely dismantle and rebuild the public insurance program that now serves one-third of the state, health leaders said Wednesday. The reductio...
// We want to map a chunk of address space aligned to 'alignment'. // We do it by mapping a bit more and then unmapping redundant pieces. // We probably can do it with fewer syscalls in some OS-dependent way. void *MmapAlignedOrDieOnFatalError(uptr size, uptr alignment, const char *me...
Majorana Fermions: The race continues A critical overview is given, aimed at non-specialist audience, of the recent efforts to detect and manipulate Majorana fermions in solid state devices. It is argued that the experiments on semiconductor quantum wires proximity coupled to superconducting leads present tantalizing ...
//Author : Prakhar Asaiya #include<bits/stdc++.h> using namespace std; #define REP(i,a,b) for(int i=a;i<b;++i) #define REPN(i,a,b) for(int i=a;i<=b;++i) #define db1(x) cout<<#x<<"="<<x<<'\n' #define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n' #define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"=...
<reponame>jominjimail/2019-18 import styled from 'styled-components'; import React from 'react'; type submitButtonProps = { children : string; onClick : (e: React.MouseEvent<HTMLButtonElement>)=>void; } const StyledButton = styled.button` display:block; height: 2.5rem; color: #343e7a; backgroun...
<gh_stars>1-10 package uk.gov.hmcts.reform.bulkscan.payment.processor.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import uk.gov.hmcts.reform.authorisation.ServiceAuthorisationApi; imp...
/** * test using the listener both remotely or locally via the engine * * @author Rob Austin. */ @RunWith(value = Parameterized.class) public class TopologicalSubscriptionEventTest extends ThreadMonitoringTest { private static final String NAME = "test"; private final boolean isRemote; private final W...
#coding=utf-8 import sys sys.path.append('script/') import podPackageHelper def main(): specName = sys.argv[1] podPackageHelper.readpodspec(specName) #得到用户选择的spec中的tag prefix podPackageHelper.getTagVersion() #获取用户输入的新版本号 specInfo = podPackageHelper.getSpecInfo() oldVersion = specInfo['...
<filename>src/data/user/user.state.ts export interface UserState { darkMode: boolean; isLoggedIn: boolean; displayName?: string | null | undefined; photoURL?: string | null | undefined; hasSeenWelcome: boolean; }
############################################################################## # # Copyright (c) 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
// HasName returns true if the person has a name (minimum required) func (p *Person) HasName() bool { if len(p.Names) > 0 { for _, name := range p.Names { if (name.First != "" && name.Last != "") || (name.Raw != "") { return true } } } return false }
a,b=map(int,input().split());c=[a,b,a-1,b-1];c.sort();print(sum(c[-2:]))