content
stringlengths
10
4.9M
<reponame>Hfutsora/vscode-unwrap import * as vscode from 'vscode'; export function activate(context: vscode.ExtensionContext) { let disposable = vscode.commands.registerTextEditorCommand('unwrap.toUnwrap', toUnwrap); context.subscriptions.push(disposable); } const wrapPairs = [ ['\'', '\''], ['"', '"'], ['...
Reducing the Computational Cost of Inverse Scattering Problems With Evolutionary Algorithms In an inverse scattering problem, the constituent parameters of a scatterer are identified from the scattered field. In this paper, we use the real-coded clonal selection algorithm (RCSA) along with an iterative absorbing bound...
/** * Adds a descriptor to this description. * @param name the name of the parameter. * @param displayName the localizable display name for this parameter. * @param shortDescription a short localizable description for this parameter. * @return the parameter descriptor created by the call. */ public Paramet...
Finite Difference Modeling of the Temperature Profile during the Biodrying of Organic Solid Waste Biodrying is a complex process that is very useful in the treatment of solid waste, where variables, such as temperature, thermal conductivity and the moisture content of organic matter, oxygen concentration in the pore s...
//===- TypeSerializer.h -----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
/** * Creates a new similar XML element. */ @Nonnull public XMLElement createElement(String name) { XMLElement elem = createElement(); elem.setName(name); return elem; }
<gh_stars>100-1000 import { SpyObject } from '../../spyobject'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { SinonStub } from 'sinon'; export class MockActiveModal extends SpyObject { dismissSpy: SinonStub; constructor() { super(NgbActiveModal); this.dismissSpy = this....
<filename>src/main/java/com/alipay/api/domain/KoubeiTradeTicketTicketcodeCancelModel.java package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 口碑凭证码撤销核销 * * @author auto create * @since 1.0, 2018-05-21 11:32:59 */ public class KoubeiTradeTicket...
Right before our discussion, a hair/makeup person offered to trim the scruff that’s on the back of my neck. I laughed and said, “Who’s gonna be looking at the back of my neck.” And then I saw this photo. My Lunch With Ev and the Birth of New Media Dave Pell Blocked Unblock Follow Following Mar 24, 2016 In the early ...
Genital-Sparing Cystectomy versus Standard Urethral-Sparing Cystectomy Followed with Orthotopic Neobladder in Women with Bladder Cancer: Incidence and Causes of Hypercontinence with an Ultrastructure Study of Urethral Smooth Muscles. BACKGROUND Bladder cancer in women is an indication for radical cystectomy (RC) when ...
def build_lr_clf(init_settings=None): if not init_settings: init_settings = { 'C': 0.3, 'l1_ratio': 0.6, 'tol': 1e-04, 'n_job': -1, 'bal': True, 'max_iter': 2000, 'solver': 'liblinear'} if init_settings['l1_ratio'] < 1 and init_settings['l1_ratio'] > 0: retur...
/* * Make qgroup codes to skip given qgroupid, means the old/new_roots for * qgroup won't contain the qgroupid in it. */ static inline void btrfs_set_skip_qgroup(struct btrfs_trans_handle *trans, u64 qgroupid) { struct btrfs_delayed_ref_root *delayed_refs; delayed_refs = &trans->transaction->delayed_refs; W...
""" Module contains tools for collecting data from various remote sources """ import numpy as np import datetime as dt import urllib from zipfile import ZipFile from StringIO import StringIO from pandas import DataFrame, read_csv def DataReader(name, data_source=None, start=None, end=None): """ Imports da...
<gh_stars>0 import { Controller, Get, Post, Body, Param, Delete, Put, HttpStatus, Res, Header, HttpCode, UseGuards, Req } from '@nestjs/common'; import { PostService } from './post.service'; import { CreatePostDto } from './dto/create-post.dto'; import { UpdatePostDto } from './dto/update-post.dto'; import { JwtAuthGua...
from qdl import * from models import * dq_i = 1e-2 dq_v = 1 dq_ia = 1e-1 dq_wr = 1e-1 freq = 100.0 duty = 0.5 i0 = 0.0 v0 = 0.0 Vs = 10.0 sys = System(qss_method=QssMethod.LIQSS1) ground = GroundNode("ground") source = LimBranch("source", l=0.01, r=0.01, e0=Vs, i0=i0, dq=dq_i) converter = Converter("converter"...
/* pinPWM(pin_t pin) * This method accepts a pin type and returns the pwm controller for said pin. * -It does run a sanity check on the pin.group and pin.pin values */ int CY8C95X0::pinPWM(pin_t pin) { if( (pin.group >= group_c) || (pin.pin >= pin_c) ) return 255; byte tbl60[8][8] = { {7,5,4,1,7,5,3,1}, {6,4,2,0...
/** * Test write on the end of a Device. * * @throws Exception * These should never be thrown. */ @Test public final void testReadWriteEnd() throws Exception { address = device.getBlockCount() - TEST_DATA_SIZE; device.write(address, testData); byte[] res...
package com.sample.models; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.SequenceGenerato...
def SSNMF(self, modelNum, ssnmf_tol, lamb, ka, itas, print_results=0): print("\nRunning SSNMF for Model {}.".format(modelNum)) self.ssnmf_tol = ssnmf_tol self.modelNum = modelNum self.opt_ka = ka self.opt_lamb = lamb self.opt_itas = itas eval_module = Evaluation(t...
<reponame>kometa-dev/MITK #include <boost/thread/locks.hpp> #include "../include/QmitkSynchronizeSelectedData.h" boost::recursive_mutex QmitkSynchronizeSelectedData::m_mutex; SlotType QmitkSynchronizeSelectedData::m_imageChange; SlotType QmitkSynchronizeSelectedData::m_segmentationChange; boost::signals2::connection...
NAVI MUMBAI: Gharapuri Island , a Unesco world heritage site known for the famous Elephanta Caves , has been plunged into darkness for almost a month now. The island, barely 10km from the Mumbai coast, has never received electricity since Independence and is now grappling with the breakdown of one its two generators.Th...
Expression of phosphorylated extracellular signal-regulated kinase at the invasive front of hepatic colorectal metastasis Raf-1 kinase inhibitory protein (RKIP), an endogenous inhibitor of the extracellular signal-regulated kinase (ERK) pathway, suppresses metastasis in a number of cancer types, including colorectal c...
<reponame>bigswitch/BeaconMirror /** * Beacon component to find shortest paths based on dijkstra's algorithm */ package net.beaconcontroller.routing.dijkstra; import java.util.HashMap; import java.util.LinkedList; import java.util.PriorityQueue; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.s...
def eval(self, path, scaler_path, le_path, model_path, train_unknown): scaler = self.deserialize_scaler(scaler_path) le = self.deserialize_label_encoder(le_path) self.model = self.deserialize_model(model_path) self.summarize_eval_data(self.model, scaler, le, path, train_unknown)
""" magic info """ # noqa # A player must learn a spell before casting it, either by being taught the # spell or by examining a scroll. Once learned a spell is not forgotten. # The player must also type in the chant for a spell to cast it, which means # the player must also find out what the chant is. import pprint ...
If you wondered whether Donald Trump‘s style has been moderated to the point where he’s losing his touch, wonder no more. His new interview with The Washington Post is chock full of the kind of sentiments that have fired people up over Trump (for better or worse) since last year. But the one that stands out in particu...
The actress laments that, despite her two Academy Awards, she only got offers to play "a nice mom." Despite bringing new opportunities in the short term, the sheen of an Oscar victory can sometimes only last so long. Just ask two-time winner Dianne Wiest. The 66-year-old actress, who begins previews Tuesday for off-B...
<filename>brotab/tests/test_integration.py import os import signal import threading from http.server import BaseHTTPRequestHandler from http.server import HTTPServer from subprocess import Popen from subprocess import check_output from unittest import TestCase from urllib.parse import parse_qs from urllib.parse import ...
Music Which Beatle Wrote It? Revolver Edition. Our latest quiz, for the 50th anniversary of the landmark album. Brow Beat George Martin, the Beatles Producer and “Fifth Beatle,” Is Dead at 90 Brow Beat The Book That Inspired “Imagine” Culturebox Teen Spirit What was so important about the Beatles’ appearances on The...
/** * * @author Lasse Steenbock Vestergaard * @author Abe Pazos (changes) * * This class is responsible for handling all events * relating to the websocket server * */ @WebSocket public class WebsocketServerEvents { public Session session; public WebsocketServerController ctrl; public Webso...
<reponame>maresb/quetz import os import shutil import uuid from datetime import date from unittest import mock from urllib.parse import quote from pytest import fixture from quetz.authorization import Rules from quetz.db_models import ( ApiKey, Channel, ChannelMember, Package, PackageMember, P...
NEW: Marijuana Decriminalization Bill before Senate Committee Today A bill that that would decriminalize small amounts of marijuana will come before the Senate Judiciary Committee today. The bill, which is sponsored by Sen. Josh Miller, D-Cranston, Warwick, would make possession of an ounce or less of pot a civil off...
/** * Convert a string into an {@link ThemeEnvironment}. * * @param env An environment string * @return A matching {@link ThemeEnvironment} or {@link ThemeEnvironment#PRODUCTION} if no match was found */ public static ThemeEnvironment fromString(String env) { if (env != null) { ...
This is a rush transcript. Copy may not be in its final form. JUAN GONZÁLEZ: On Wednesday, on the second day of confirmation hearings for President-elect Donald Trump’s pick to lead the Justice Department, Alabama Senator Jeff Sessions, he faced unprecedented criticism—but only one Republican on the committee remained...
<filename>server/src/main/java/org/cloudfoundry/identity/uaa/oauth/OpenIdSessionStateCalculator.java package org.cloudfoundry.identity.uaa.oauth; import org.apache.commons.codec.digest.DigestUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.xml.bind.DatatypeConverter; import java.nio.chars...
It’s finally here: the end of an anime era is upon the fandom, and the Internet is full of feels. After more than a decade on air, Naruto Shippuden is coming to a quiet close tomorrow with its 500th episode. The touching epilogue story arc will wrap with a massive wedding ceremony for Konoha’s most unpredictable ninja....
use super::KeyAgreement; use crate::error::SecioError; use rand_core::OsRng; pub use x25519_dalek::EphemeralSecret as EphemeralPrivateKey; use x25519_dalek::PublicKey; /// Generates a new key pair as part of the exchange. /// /// Returns the opaque private key and the corresponding public key. pub fn generate_agreemen...
import { Schema } from './schema'; import { BuilderContext } from '@angular-devkit/architect'; import { PluginSpec } from 'semantic-release'; import { isObject } from 'util'; const GITLAB_PACKAGE_NAME = '@semantic-release/gitlab'; const GITHUB_PACKAGE_NAME = '@semantic-release/github'; export function platformPlugin(...
def kron_mpmath(a: Matrix, b: Matrix) -> Matrix: ar, ac = a.rows, a.cols br, bc = b.rows, b.cols c = zeros(ar * br, ac * bc) for i in range(ar): for j in range(ac): c_ = a[i, j] * b for ii in range(br): for jj in range(bc): c[i*br+ii, j...
/** * @author Filip Hrisafov */ @IssueKey("2352") @WithClasses({ TheDto.class, TheModel.class, TheModels.class, TheModelMapper.class, TheModelsMapper.class, }) public class Issue2352Test { @ProcessorTest public void shouldGenerateValidCode() { TheModels theModels = new TheModels()...
use std::convert::TryFrom; use std::fmt; use crate::{format::FourCC, fraction::Fraction}; use crate::{v4l_sys, v4l_sys::*}; #[derive(Debug)] /// Format description as returned by [`crate::v4l2::vidioc::VIDIOC_ENUM_FRAMEINTERVALS`] pub struct FrameInterval { pub index: u32, pub fourcc: FourCC, pub width: u...
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #import "NSObject.h" #import "NSSecureCoding.h" @class NSDictionary; @interface AXMVisionFeatureFaceLandmarks : NSObject <NSSecureCoding> { BOOL _is3DLandmarks; NSDictionary *_...
def revertPage(self, revision, comment=u''): _ = self.request.getText if not self.request.user.may.revert(self.page_name): raise self.RevertError('not allowed') elif revision is None: raise self.RevertError('cannot revert to current rev') else: revstr ...
Why Macro Practice Matters ABSTRACT This article asserts that macro practice is increasingly important in today’s rapidly changing and complex practice environment. It briefly explores the history of macro practice in U.S. social work, summarizes its major contributions to the profession and to U.S. society, and provi...
use std::io::{self, Read}; use std::collections::{HashMap, HashSet}; type PointMap = HashMap<Point, i32>; type PointSet = HashSet<Point>; #[derive(Eq, PartialEq, Hash, Clone)] struct Point { x: i32, y: i32 } fn main() { let mut input = String::new(); io::stdin().read_to_string(&mut input).unwrap(); ...
On 7 October 2016, The Washington Post released audio of then-presidential candidate Donald Trump having a lewd conversation with Access Hollywood’s Billy Bush in 2005. In it, Trump can be heard making several comments, such as “I don’t even wait. And when you’re a star, they let you do it. You can do anything” and “Gr...
def replace_with(self, replacement, occurences=0, multiline=False): if multiline: flag = MULTILINE else: flag = 0 return substring( self.regex, replacement, self.data, count=occurences, flags=flag )
def calculate_features(binary, im_red, dimensions, all_segs_info=None): vol = binary.sum() xyz = np.argwhere(binary) if len(xyz) < 2: warnings.warn("Empty segment found") return {lab: np.nan for lab in ["Volume", "Red Total Intensity", "Red Intensity Var.", "Red Max. Intensity", ...
a,b = map(str,input().split()) g = b l = [] c = 0 while True: if str(b)[-1] == '1': b = str(b)[0:-1] l.append(b) else: if (int(b)/2).is_integer(): b = str(int(int(b)/2)) l.append(b) else: print('NO') break if int(...
It seems like the one question that's on every marriage-seeker's mind is, "Where do I meet someone?" I've heard people tell me stories filled with frustration of going to dinner after dinner, party after party, and a variety of speed dating, singles, and networking events with the expectation of meeting someone, and wa...
def _euclidean_distances_upcast(X, Y, batch_size=None): backend = get_backend() n_samples_X = X.shape[0] n_samples_Y = Y.shape[0] n_features = X.shape[1] if issparse(X): distances = backend.zeros(shape=(n_samples_X, n_samples_Y), dtype=_get_string_dtype(X)) ...
/** * @author Stefan Neidig */ public class LoadInitialDataInteractorImpl implements LoadInitialDataInteractor { @Inject PokemonDatastore pokemonDatastore; @Inject public LoadInitialDataInteractorImpl() { } @Override public Flowable<Pokemon> execute(int pokemonId) { return pokemonDatastore.getPokemon(p...
package models import ( "github.com/astaxie/beego/orm" "time" ) func (a *FinancialProfit) TableName() string { return FinancialProfitTBName() } //查询的类 type FinancialProfitQueryParam struct { BaseQueryParam Name string `json:"name"` StartTime int64 `json:"startTime"` //开始时间 EndTime int64 `json:"endTim...
<reponame>impira/yugabyte-db /* * Copyright 2021 YugaByte, Inc. and Contributors * * Licensed under the Polyform Free Trial License 1.0.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://github.com/YugaByte/yugabyte-db/blob/m...
package main import ( "github.com/gregunz/Peerster/blockchain" "github.com/gregunz/Peerster/logger" "github.com/gregunz/Peerster/models/packets/packets_gossiper" "github.com/gregunz/Peerster/models/vector_clock" "github.com/gregunz/Peerster/utils" ) func main() { bcf := blockchain.NewBCF() for !bcf.MineOnce() ...
def generateMappingTemplate(AxAnalysis): source_module = AxAnalysis.getModuleByName("source") source_inputs = OrderedDict() for submodule in source_module._submodules: AxIn = submodule._input for requirement in AxIn._values: if requirement["name"] not in source_inputs: ...
<reponame>ebi-uniprot/UniProtBE package org.uniprot.api.support.data.configure.controller; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; import static org.springframework.http.HttpHeaders.ACCEPT; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; import ...
A still from the CONQ web series, which has been now been removed from Youtube UPDATE (Sept 13): CONQ creator Lucky Kuswandi has responded to this article and wished to clarify several points. You can read his comments at the end of the story. In a country where homosexuality is generally a taboo subject and 89.3% of...
<filename>src/containers/progressPanel/interface.tsx import BookModel from "../../model/Book"; export interface ProgressPanelProps { currentEpub: any; currentBook: BookModel; percentage: number; locations: any; flattenChapters: any; } export interface ProgressPanelState { displayPercentage: number; curre...
// GetView - Get a view of the file // filePosition - file position where the view starts // size - size of the view (in bytes) // returns - pointer to the view void* BinaryFile::GetView(size_t filePosition, size_t size) { void* pBuf = MapViewOfFile(m_hndMapped, ...
<reponame>srcclr/sapling-frontend import React from 'react'; import BasicTooltip from './BasicTooltip'; function ClientBadge({ hexColor = '', client, hideInitial = false, tooltip, animate = false }) { const { email = '' } = client; const initial = email.charAt(0); return ( <div> <BasicTooltip t...
import numpy as np import ngmix from ..mfrac import measure_mfrac def test_measure_mfrac_neg_bbox(): rng = np.random.RandomState(seed=100) cen = (201-1)/2 mfrac = rng.uniform(size=(201, 201), low=0.2, high=0.8) x = rng.uniform(size=3, low=50, high=150) y = rng.uniform(size=3, low=50, high=150) ...
// -1 for default scope of Alloy @SuppressWarnings("resource") public static Stream<Arguments> allAlloyFiles() throws Exception { Stream<Arguments> allFiles = null; for (String folder : sigFolders) { Stream<Arguments> inThisFolder = Files .find(Paths.get(folder), Integer.MAX_VALUE, (filePath, fileAt...
import React, {useState} from 'react'; import {useSMap} from "./hooks"; import {LoaderApiConfig} from './types'; export type SMapProviderProps<T> = T & { loadingElement?: React.ReactNode; loaderApiConfig?: LoaderApiConfig | null; } const SMapProvider = <T extends {}>(Component: React.ComponentType<T>) => ...
<gh_stars>1-10 /* Copyright (c) <2009> <Newton Game Dynamics> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any pu...
package seedu.address.model.util; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Arrays; import java.util.Set; import java.util.stream.Collectors; import seedu.address.model.ReadOnlyResidenceTracker; import seedu.address.model.ResidenceTracker; import seedu.address.model.booki...
package com.yangdb.fuse.unipop.controller.promise.converter; /*- * #%L * fuse-dv-unipop * %% * Copyright (C) 2016 - 2019 The YangDb Graph Database Project * %% * 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...
Candidate Genes and Stable QTL for Grain Yield and Seed Size in Durum Wheat Background: In wheat grain yield is expressed as the product of different components. Among these, thousand kernels weight (TKW) reects the combination of several grain related traits including grain length (GL), grain width (GW) and area. Gra...
<filename>tools.go //+build tools package consulapi import _ "github.com/gojuno/minimock/v3"
/** * build a log event for an exception including the full stack trace * * @param ex The exception to build a log event * @return The log event builder */ public LogBuilder withException(Exception ex) { this.withName("Exception:" + ex.getMessage()); StringWriter sw = new String...
def inserir(self, chave): self.heap_size += 1 if len(self.lista) < self.heap_size: self.lista.append(chave) else: self.lista[self.heap_size - 1] = chave i = self.heap_size - 1 while i > 0 and self.lista[MaxHeap.pai(i)] < chave: self.lista[i] = ...
<gh_stars>10-100 # Keypirinha: a fast launcher for Windows (keypirinha.com) import keypirinha_util as kpu import os.path import json from ._base import Bookmark, BookmarksProviderBase class ChromeProviderBase(BookmarksProviderBase): localappdata_dir = None def __init__(self, *args): super(...
package com.thinkgem.jeesite.modules.front.frontUtils; import java.io.IOException; import java.util.Properties; import org.apache.log4j.Logger; public class PropertiesReaderUtil { public static final Logger logger = Logger.getLogger(PropertiesReaderUtil.class); private static final PropertiesReaderUtil onlyOne =...
// ToTestCase loads testcase path and convert to *TestCase func (path *TestCasePath) ToTestCase() (*TestCase, error) { tc := &TCase{} casePath := path.GetPath() err := builtin.LoadFile(casePath, tc) if err != nil { return nil, err } err = convertCompatTestCase(tc) if err != nil { return nil, err } tc.Confi...
<commit_msg>Disable autoconfiguration for basic unit tests <commit_before>package org.marsik.elshelves.backend.test.config; import org.marsik.elshelves.backend.app.spring.NoAutoscan; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplicati...
/** * Moves the servo sending the duty cycle via PWM * * @param servo the servo you want to move */ public void run(AdafruitServo servo) { if (mPwm == null) { return; } mPwm.setPwmFreq(servo.getFrequencyHz()); if (DEBUG) { Log.d(LOG_TAG, "Duty ...
module Data.Aeson.Validation.Internal.ShallowField ( ShallowField(..) , fieldSchemaL ) where import Data.Aeson.Validation.Internal.Prelude import Data.Aeson.Validation.Internal.Types fieldSchemaL :: Lens' ShallowField Schema fieldSchemaL f (ShallowField a b c) = (\c' -> ShallowField a b c') <$> f c
and comedian Chris Rock have both grown increasingly prominent over the past quarter-century (Cornwell, Palmer, Guinther, & Davis, 2005; Silverman & Fisher, 2001; Webster, 2007a,b; “The Time 2008 Top 100,” 2008). This may not be mere coincidence. While evolutionary psychology (EP) has blossomed because of its unique ab...
#include <stdio.h> int main(){ int n, high = 0, value, lenght = 0, lenght_max = 0; scanf("%d", &n); for (int day = 1; day <= n; ++day){ scanf("%d", &value); if (value >= high){ high = value; lenght++; if (lenght > lenght_max){ l...
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/messagebus/emptyreply.h> #include <vespa/messagebus/errorcode.h> #include <vespa/messagebus/routing/errordirective.h> #include <vespa/messagebus/routing/retrytransienterrorspolicy.h> #i...
/** * Small view model holding attributes around files */ public class FileDetailsViewModel { public static final BigDecimal ONE_KB = BigDecimal.valueOf(1024L); private long formInputId; private String filename; private BigDecimal filesizeKbytes; public FileDetailsViewModel(FileEntryResource fi...
/** * Request to create a table for a specific class. */ public class CreateRequest<T> extends Request<T> { /** * Constructs a new create request. * @see Request#Request(Class) */ public CreateRequest(Class<T> type) { super(type); } /** * Constructs a new create request with custom columns. * @see Re...
/** * Find the YAML-based properties file, depends on the configuration, * the object to return can be a Map, a list or a custom Object * @return property structure */ public static Object findProperties(File file) { Yaml parser = new DefaultYamlFactory().newYaml(); Object foo = nul...
<gh_stars>0 import { Injectable } from '@angular/core'; import { CanActivate, Router } from '@angular/router'; import { Observable } from 'rxjs'; import * as fromStore from './../../cart/store'; import { CartService } from '../../cart/services/cart.service'; import { skipWhile, map, switchMap } from 'rxjs/operators';...
package com.wei.you.zhihu.spider.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.wei.you.zhihu.spider.service.IZhihuRecommendationService; import com.wei.you.zhihu.spider.service.client.ZhihuRecommendationClient; /** * 分析知乎Reco...
/** * Delay by a random time between 3/4 and 5/4 * delay milliseconds. */ protected void randomlyDelay(int delay) { try { if (0 < delay) { int millis = rnd.nextInt(delay / 2) + 3 * delay / 4; LOG.debug("Starting wait for {} milliseconds", millis); ...
// A stress test designed to create a race where one thread is closing the port as another thread is // performing an object_wait_async using the same port handle. TEST(PortStressTest, CloseWaitRace) { constexpr zx::duration kTestDuration = zx::msec(100); srand(4); auto WaitAsyncLoop = [](std::atomic<bool>* keep_...
package de.fynn.sco.core.view.player.inventorys; public class CustomInventoryAPIHook { }
Jemele Hill was suspended by ESPN after violating the company’s social media policy. (AP) ESPN has announced that it has suspended Jemele Hill, currently co-host of the 6 p.m. weekday “SportsCenter”, affectionately called “The Six,” for two weeks after a second violation of the company’s social media policy. ESPN's S...
{-# LANGUAGE UndecidableInstances #-} -- see below {-# LANGUAGE UndecidableSuperClasses #-} -- see below -- {-# OPTIONS_GHC -Wno-unused-imports #-} -- TEMP -- | Functor category classes module Category where import qualified Prelude as P import Prelude hiding (id,(.),curry,uncurry) import GHC.Types (Constraint) imp...
#ifdef _WINDOWS #include <Windows.h> #else #include <signal.h> #endif //_WINDOWS #include <atomic> #include <functional> std::atomic_bool running{ true }; bool registerTerminationHandler() { #ifdef _WINDOWS return SetConsoleCtrlHandler( [](auto) { running = false; return TRUE; }, TRUE...
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
/** * Used by controllers as a JSON response object in case of system errors/exceptions. * The model includes messages for the error and it's root cause, an appropriate * HTTP status code for any possible exception and the stacktrace as a string. * * Created by manos on 15/9/2017. * * @see ComparisonsController#...
<filename>proto/game/talent.pb.go<gh_stars>0 // Code generated by protoc-gen-go. DO NOT EDIT. // source: game/talent.proto package game import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fm...
/** * Waits for a locator to be told to stop. * * @throws InterruptedException thrown if the thread is interrupted */ public void waitToStop() throws InterruptedException { boolean restarted; do { DistributedSystem ds = this.myDs; restarted = false; this.server.join(); if (t...
<gh_stars>0 // Copyright 2021 Fastly, Inc. pub mod dnstap { #![allow(clippy::module_inception)] #![allow(rustdoc::bare_urls)] include!(concat!(env!("OUT_DIR"), "/dnstap.rs")); } pub mod framestreams_codec; pub mod util;
"Other countries make all these airy-fairy promises that never come to anything," Mr Abbott said. Prime Minister Tony Abbott said the difference between Australia and the rest of the world was that "when we make commitments to reduce emissions we keep them". Credit:Andrew Meares Australia is the only developed country ...
def read_from_font_cache(cache_file_name: str) -> (dict, dict): dir_dict = {} with open( file=cache_file_name, mode='r', encoding='utf-8', ) as f: name_dict = json.load(f) for font_name in name_dict: dir_dict[name_dict[font_name]] = font_name return name_dict,...
Well, you may have to wait awhile, unless you’re among Goldman Sachs’ circle of elite customers who were given the investment opportunity Sunday night — an indication of other possible big moves that Goldman and Facebook might make down the line. Those outside that rarefied group could get the chance if the social netw...
<filename>www/src/pages/index.tsx import React from 'react'; import {Link} from 'gatsby'; import RuiGrid from '@rhythm-ui/grid-react'; import RuiButton from '@rhythm-ui/button-react'; import Layout from '../templates/Feature'; class IndexPage extends React.Component { private _canvas: HTMLCanvasElement | null = nul...