content
stringlengths
10
4.9M
/** * Created by kdoherty on 7/8/15. */ public abstract class AbstractRequestSender { private String restAction; private String url; private boolean hasAddedParams = false; protected AbstractRequestSender(String restAction, String url) { this.restAction = restAction; this.url = url;...
<reponame>camiladuartes/Rest-API-Nearest-Promotions<gh_stars>0 import { Injectable } from '@nestjs/common'; import { CreatePromotionDto } from './dto/create-promotion.dto'; import { Promotion, PromotionDocument } from './entities/promotion.entity'; import { Model } from 'mongoose'; import { InjectModel } from '@nestjs/...
167 SHARES Facebook Twitter Linkedin Reddit The Vive Tracker, a ‘puck’-like device designed to attach to objects to track them in VR via the SteamVR Tracking system, went on sale this week after 1,000 units went out to developers earlier this year. One developer aptly demonstrated the tracking performance by juggling ...
<gh_stars>0 package fi.evident.enlight.utils; import java.io.File; public final class PathUtils { public static String extensionFor(String path) { return extensionFor(new File(path)); } public static String extensionFor(File file) { String name = file.getName(); int index = name....
def register(self): self.establish_connection() self.add_listeners() self.subscribe_to_topics(Constants.PRE_REGISTRATION_TOPICS_TO_SUBSCRIBE) registration_request = self.registration_builder.build() logger.info("Sending registration request") logger.debug("Registration request is {0}".format(reg...
package main import mgl "github.com/go-gl/mathgl/mgl64" // change this to mgl32 for 32 bit floats // epsilon is a "near zero" value. I'm not really using it mathematically correctly. const epsilon = 0.0001 // Below aliases are to make it easy to switch between 32 and 64 bit floats // V3 is a 3d vector. type V3 = mg...
module CharQq.Q where import CharQq.Prelude import qualified CharQq.Exp as Exp import qualified CharQq.Pat as Pat stringChar :: String -> Q Char stringChar = \ case [char] -> return char [] -> fail "Empty quotation" _ -> fail "More than one char in the quotation" stringCodepointExp :: String -> Q Exp stringCo...
<reponame>Licenser/event-listener<gh_stars>0 //! A simple mutex implementation. //! //! This mutex exposes both blocking and async methods for acquiring a lock. #![allow(dead_code)] use std::cell::UnsafeCell; use std::ops::{Deref, DerefMut}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{mpsc, Arc}; u...
import flattenedNavigationData from '../../autoGeneratedData/rootTopics.json' import isExternalLink from '../../src/utils/isExternalLink' /* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ chai.use(require('chai-string')) const ignore = [ 'mailto', // github responds wi...
/** * We are grouping events after applying a window. * * <p>The triggers specified in the window will produce each a pane per group of events (those * sharing the same key). This class holds together the metadata about a pane and group, so it can * be examined easily in the output. */ @DefaultCoder(AvroCoder.cla...
package me.alexisevelyn.crewmate.packethandler.packets.reliable; import me.alexisevelyn.crewmate.Main; import me.alexisevelyn.crewmate.Server; import me.alexisevelyn.crewmate.api.Game; import me.alexisevelyn.crewmate.api.GameCodeHelper; import me.alexisevelyn.crewmate.api.GameSettings; import me.alexisevelyn.crewmate....
use std::cmp::Ordering; use std::fmt; //GrailPair is a small struct which can be used for stability testing of the sort. #[allow(dead_code)] #[derive(Clone, Copy, Eq, Default)] pub(crate) struct GrailPair { pub key: isize, pub value: isize, } impl fmt::Debug for GrailPair { fn fmt(&self, f: &mut fmt::Form...
Despite hammering out the details late last year, Kodak still had to wait for the Bankruptcy court to greenlight its big patent sale. Today, that happened: Judge Allan Gropper has approved the $527 million deal between Kodak, Apple and Google -- giving the floundering photo company final permission to offload more than...
def is_ne(self, strategy_pair, support_pair): u = strategy_pair[1].reshape(strategy_pair[1].size, 1) row_payoffs = np.dot(self.payoff_matrices[0], u) v = strategy_pair[0].reshape(strategy_pair[0].size, 1) column_payoffs = np.dot(self.payoff_matrices[1].T, v) row_support_payoffs =...
// for all the workers, gathering their voting results. // in the format of <task_id, which_object_is_preferred>. void generate_sim_votes_taskID_who( const int& n, const int& w, bool **GT, const vector<vector<vector<int>>> & matrice, vector<vector <td_wieghts::client_vote>> & v_client_votes ){ if (v_client_votes.s...
Faith and Culture in the Time of Coronavirus The social experience of Covid-19 has already generated in many countries an impressive bibliography of multiple genres and in many fields. It is tempting to oppose this excess of analysis and reflection with the voice of Job. He rejected the words of his theological friend...
def publish_images(targets_file=None, target=None): if target: targets = [target] else: targets = get_targets(targets_file) for target in targets: publish_target(target)
package withjava; import java.util.Optional; public class UsingJavaOptional { public static Optional<String> some = Optional.of("abc"); public static Optional<String> none = Optional.empty(); }
package session import ( "errors" "fmt" "github.com/grestful/utils" ) type ISession interface { Close() bool Destroy(sid string) bool Gc(maxLeftTime int64) bool Open(savePath string) bool Read(sid string) map[string]interface{} Write(sid string, data map[string]interface{}) bool Error(sid string) error Set...
<reponame>shaneding/clx<gh_stars>100-1000 # Copyright (c) 2020, NVIDIA CORPORATION. # # 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 # # Unle...
0 SHARES Facebook Twitter Google Whatsapp Pinterest Print Mail Flipboard Bernie Sanders put on a clinic and completely stonewalled ABC’s News Jon Karl when he tried to get the Democratic candidate to personally attack Hillary Clinton. Video: https://youtu.be/Al4sVp7Rs2E Transcript via ABC’s This Week: KARL: Hey, w...
/** * Read the parameter in the specified shape. * * @param shape the shape to read (not null, unaffected) * @return the parameter value (&ge;0) or NaN if not applicable */ public float read(CollisionShape shape) { Validate.nonNull(shape, "shape"); if (shape instanceof Comp...
"""Julynter module""" import sys from ._version import __version__ if sys.version_info < (3, 5): from .oldcmd import main else: from .handlers import setup_handlers from .cmd import main def _jupyter_server_extension_paths(): """Register julynter server extension""" return [{ "module": "...
<reponame>ayinlaaji/pokedex<gh_stars>0 import React from "react"; import { Divider, List, Pagination } from "semantic-ui-react"; import PokemonItem from "@pokedex/components/molecules/PokemonItem"; import { Poke } from "@pokedex/typings/pokemon"; type Props = { totalPages: number; pokemons: Poke[]; handleItemCli...
def from_networkx(cls, G, layout_function, nodes=None, **kwargs): positions = layout_function(G, **kwargs) edges = G.edges() if nodes: idx_dim = nodes.kdims[-1].name xs, ys = zip(*[v for k, v in sorted(positions.items())]) indices = list(nodes.dimension_values...
import random def riffleShuffle(va, flips): nl = va for n in range(flips): #cut the deck at the middle +/- 10%, remove the second line of the formula for perfect cutting cutPoint = len(nl)/2 + random.choice([-1, 1]) * random.randint(0, len(va)/10) # split the deck left = nl[0:c...
/** * @author Christopher Butler */ public class DefaultCloseAction extends ViewAction { public DefaultCloseAction() { } public void actionPerformed(View view, ActionEvent evt) { DockingManager.close(view); } }
<filename>packages/db/src/books.spec.ts import { books } from "./books"; describe("books", () => { describe("quotes", () => { it("should all have a uniq id", () => { const uniqIds = new Set(); const ids = books.flatMap((b) => b.quotes || []).map((q) => q.id); ids.forEac...
def process_channel(processor: PostProcessor, start: datetime, stop: datetime, downloader=TimeSeriesDict.get) -> str: channel_file, filename = path2h5file(get_path(f'{processor.channel} {start}', 'hdf5')) logger.debug(f'Initiated hdf5 stream to {filename}') num_strides = (stop - start) // processor.stride_l...
#include "benchmark/benchmark.h" #include "binary-search-tree.h" void test_binary_tree_search (void) { int search_target = 8; std::string tree_elements = ""; BinarySearchTree *bst_tree = new BinarySearchTree(); BSTNode *head = bst_tree->create_node(1); BSTNode *node1 = bst_tree->create_node(2); ...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main (void){ char string[] = "test program for teii"; printf("%s\n", string); char *found = strstr(string,"dpii"); if (found){ printf("%s\n",found); found[0]='p'; found[1]='s'; found[2]='e'; found[3]='r'; } else printf("No match was found\...
package com.fundynamic.d2tm.game.controls; import com.fundynamic.d2tm.game.entities.Entity; import com.fundynamic.d2tm.game.entities.EntityRepository; import com.fundynamic.d2tm.game.entities.Player; import com.fundynamic.d2tm.game.map.Cell; import com.fundynamic.d2tm.game.rendering.Viewport; import com.fundynamic.d2t...
import { ObjectId } from "mongodb" /** * @description 음원의 도큐먼트 인터페이스 * @prop {ObjectId} audioId Document의 고유 아이디 * @prop {string} userId 유저 아이디 * @prop {string} url 음원 경로 * @prop {string} title 음원 제목 * @prop {string} filter 음원 필터 * @prop {number} views 음원 조회수 * @prop {number} duration 음원 길이 */ export interfac...
/** * A scriptable Diffusion subscriber. * <p> * Reads a list of actions from a configuration file and performs those actions at the user-specified times. * * @author adam */ public class Subscriber { // Do we want human or machine-readable statistics output? // Machine-readable is in the style of nmon, ...
/// Writing the hash move.toml to file fn store_manifest_checksum(ctx: &Context) -> Result<()> { let build_path = ctx.project_dir.join("build"); if !build_path.exists() { fs::create_dir_all(&build_path)?; } let path_version = build_path.join(HASH_FILE_NAME); if path_version.exists() { ...
Macular Sequelae Following Exudative Retinal Detachment After Laser Photocoagulation for Retinopathy of Prematurity. BACKGROUND AND OBJECTIVE To report a series of exudative retinal detachments (ERDs) following laser photocoagulation for retinopathy of prematurity (ROP). PATIENTS AND METHODS Retrospective case serie...
<reponame>phatblat/macOSPrivateFrameworks // // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #import "NSObject.h" @interface VCPGaborFilter : NSObject { struct Kernel **_filterBanks; int _numScales; int _numOrientations; ...
/// Return the the push shuffles in the execution plan, shuffle writer should be the root node fn find_push_shuffle(plan: &Arc<dyn ExecutionPlan>) -> Option<ShuffleWriterExec> { if let Some(shuffle_writer) = plan.as_any().downcast_ref::<ShuffleWriterExec>() { if shuffle_writer.is_push_shuffle() { ...
// WithConfig sets the OAuth configs on the Options struct func WithConfig(c config.OAuth) Option { return func(o *Options) { o.Config = c } }
<reponame>ogrisel/mahout /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * ...
/* * lane_detach -- detaches the currently held lane from the current thread */ unsigned lane_detach(PMEMobjpool *pop) { struct lane_info *lane = get_lane_info_record(pop); lane->nest_count -= 1; ASSERTeq(lane->nest_count, 0); return (unsigned)lane->lane_idx; }
def pre_spawn_start(self, user, spawner): if not self.enable_auth_state: return auth_state = yield user.get_auth_state() gh_user = auth_state.get("github_user") gh_token = auth_state.get("access_token") if gh_user: gh_id = gh_user.get("id") gh_org ...
/** * Creates instance of Round from string source * * @param line string with data * @return instance of Round */ public Round parseToRound(String line) { List<String> splitLine = Stream.of(line.split(";")).map(String::new) .collect(ArrayList::new, ArrayList::add, Array...
/** * Validate a war level override of the * java2ClassLoadingComplianceOverride flag to true with a * useJBossWebLoader = false * * @throws Exception */ public void testJava2ClassLoadingComplianceOverride() throws Exception { getLog().info("+++ Begin testJava2ClassLoadingComplianceOv...
def int_arg(v): try: return int(v) except ValueError: raise ViewExceptionRest( 'Invalid argument format. %s must be an integer.' % (repr(v),), 400 )
<filename>src/main/java/arekkuusu/implom/common/block/BlockKondenzator.java /* * Arekkuusu / Improbable plot machine. 2018 * * This project is licensed under the MIT. * The source code is available on github: * https://github.com/ArekkuusuJerii/Improbable-plot-machine */ package arekkuusu.implom.common.block; im...
import React from 'react'; import type { Text as RNText } from 'react-native'; import Icon, { IconProps } from './Component'; import type { ThemeProps } from '../../../theme'; const ThemedIcon = React.forwardRef< RNText, IconProps & Partial<ThemeProps<IconProps>> >((props, ref) => { return <Icon {...props} ref=...
/** * Used to be able to change the behaviour of the palette view pane * from being the content pane of a CoScrolledHorizontalFlowPanel to * be a ordinary panel in a srollpane. * This method should set m_palettePanel and return the CoPanel holding m_palettePanel * Creation date: (2001-10-30 10:52:12) * @return co...
/** * @author Sri Harsha Chilakapati */ class DictionaryJSO extends JavaScriptObject { protected DictionaryJSO() { } public static native DictionaryJSO create() /*-{ return {}; }-*/; public final native void define(String name, String property) /*-{ this[name] = property; ...
def begin_runs(self): self.keithley.write(":SOUR:VOLT:SWE:INIT") self.result = self.keithley.query(":READ?") self.yvalues = np.array(self.keithley.query_ascii_values(":FETC?")) self.curr = np.array(self.yvalues[0::2]) self.vso = np.array(self.yvalues[1::2])
def deepmac_proto_to_params(deepmac_config): loss = losses_pb2.Loss() loss.localization_loss.weighted_l2.CopyFrom( losses_pb2.WeightedL2LocalizationLoss()) loss.classification_loss.CopyFrom(deepmac_config.classification_loss) classification_loss, _, _, _, _, _, _ = (losses_builder.build(loss)) deepmac_f...
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE Fle...
<reponame>emilybache/GildedRose-Approval-Kata-sample-solution package com.gildedrose; import java.io.FileNotFoundException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; import java.util.ArrayList; import com.csvreader.CsvReader; /** * This tes...
{-# LANGUAGE RecordWildCards, DeriveGeneric, OverloadedStrings, DuplicateRecordFields #-} module FixMigration where import Database.MySQL.Base import Util hiding(prod_conn); import Lib; import Model import qualified Data.List as DL import Text.Parsec; import Data.Text as DT hiding(filter, map, all, head, zipWith) imp...
/* Copyright 2021 The GoPlus Authors (goplus.org) 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 to i...
Beyond the random phase approximation: Improved description of short-range correlation by a renormalized adiabatic local density approximation We assess the performance of a recently proposed renormalized adiabatic local density approximation (rALDA) for \textit{ab initio} calculations of electronic correlation energi...
#ifndef TERM_HTTPSERVER_H #define TERM_HTTPSERVER_H #include "list/list.h" #include <microhttpd.h> void termHttpServer(const char* state); void stopHttpServer(struct MHD_Daemon** d_ptr); #endif // TERM_HTTPSERVER_H
<gh_stars>0 import time import os import requests import json from datetime import datetime from flask_sqlalchemy import SQLAlchemy from intruo import Intruo, IntruoConfiguration, IntruoModules from flask import Flask, render_template, jsonify, request, send_file from nanoid import generate DEBUG_INTRUO = True templa...
def to_edges(l): it = iter(l) last = next(it) for current in it: yield last, current last = current
/// Performs type analysis for the given AST node. This annotates the node with a concrete type. fn analyze(&mut self, mut ast: Ast, root_node: NodeId) -> Ast { self.push_defers(); let _ = self.annotate_node(&mut ast, root_node, NodeContext::Statement); self.pop_defers(&mut ast); ast }
/** * Various utility functions for zip-files used by classes in this package. * @author fwiers * */ public class ZipUtil { private ZipUtil() {} /** * Searches for a zip-entry and returns it as an input-stream (backed by a byte-array). * @param entryNameStart null/empty or the first part of the name of th...
<filename>src/app/models/User.ts<gh_stars>1-10 export enum UserRole { Unclear = "Unclear", User = "User", Admin = "Admin", } export class User { public username: string; public role: UserRole; public token: string; constructor(json) { Object.assign(this,json); this.role = json.role as UserRole...
def _BrowseForDirectory(self, evt): default_path = self.GetPath() if os.path.exists(default_path): default_path = os.path.join(default_path, '..') else: default_path = '' dirname = wx.DirSelector(message='Pick an existing App Engine App', defaultPath=default_path...
#! /usr/bin/env python from __future__ import print_function import os import re import sys import subprocess #****************** template file ********************************** templateFile = open('templateForDropbox.txt', 'r') fileContents = templateFile.read(-1) print('--------------- TEMPLATE : --------------...
from django.contrib import admin from .models import Pet admin.site.register(Pet)
/** * Copy the contents on another semisparse array into this one * * @param from the source array */ public synchronized void putAll(SemisparseByteArray from) { byte[] temp = new byte[4096]; for (Range<UnsignedLong> range : from.defined.asRanges()) { long length; long lower = range.lowerEndpoint().l...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from __future__ import absolute_import, division, print_function import torch def decorate_batch(batch, device='cpu'): """Decorate the input batch with a proper device Parameters ---------- batch : {[torch.Tensor | list | di...
Image copyright ITV Image caption ITV has made a new version of Thunderbirds titled Thunderbirds Are Go The government is giving broadcasters including Channel 4 and ITV an extra £60m to help them make more home-grown children's programmes. The money will be targeted at commercial channels to help them compete with B...
// Log logs a message at any given level func Log(level string, message string, context Mapper) error { client, err := gotask.NewAutoClient() if err != nil { return err } payload := map[string]interface{}{ "level": level, "context": context.Map(), "message": message, } err = client.Call(phpLog, payload,...
def disableOverride(self,alarmlist) : action = DisableAction(None) action.performAction(self.comments,alarmlist)
FREQUENTLY ASKED QUESTIONS What does the weekend look like? You and your fellow students will start a company over the course of three days. We rent work space, invite approximately 40 students with a wide range of backgrounds, and provide food, drinks, snacks, and coffee. But most importantly, we give you everything ...
package consensus import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" consensusv1 "cosmossdk.io/api/cosmos/consensus/v1" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.Se...
<filename>src/Unit5/Lesson27/Code27_2.hs module Unit5.Lesson27.Code27_2 where main27_2 :: IO () main27_2 = do print (incMaybe successfulRequest) print (incMaybe failedRequest) incMaybe :: Maybe Int -> Maybe Int incMaybe (Just n) = Just (n + 1) incMaybe Nothing = Nothing successfulRequest :: Maybe Int successful...
<reponame>DarshanSudhakar/BugVilla<gh_stars>100-1000 import React from 'react'; import styled from 'styled-components/macro'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { notify } from 'react-notify-toast'; const StyledToastText = styled.div` display: flex; justify-content: center; ...
<filename>src/modules/auth/ro/auth.ro.ts import { ApiProperty } from '@nestjs/swagger' export class AuthRO { @ApiProperty() access_token: string }
import { Observable } from 'rxjs'; import { Movie } from '../models/movie'; export interface MediaServiceInterface { getMovies(): Observable<Movie[]>; getMovieByUuid(uuid: string): Observable<Movie>; }
A comparative evaluation of the effect of intravenous dexmedetomidine and clonidine on intraocular pressure after suxamethonium and intubation Background: In patients with penetrating eye injury and a full stomach, suxamethonium is still used for rapid sequence induction of anesthesia. But its use is associated with t...
""" GRMIPose (Google PoseNet) for COCO Keypoint, implemented in TensorFlow (Lite). Original paper: 'Towards Accurate Multi-person Pose Estimation in the Wild,' https://arxiv.org/abs/1701.01779. """ __all__ = ['GRMIPoseLite', 'grmiposelite_mobilenet_w1_coco'] import math import numpy as np import tensorflow as...
An appellate court Thursday upheld a penalty against Oregon bakery owners who refused to make a cake for a same-sex wedding almost five years ago. The owners of the since-closed Gresham bakery - Aaron and Melissa Klein - argued that state Labor Commissioner Brad Avakian violated state and federal laws by forcing them ...
// (C) Copyright <NAME>, <NAME>, <NAME>, Howard // Hinnant & <NAME> 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits ...
/** * Recursively count <code>ordinal</code>, whose depth is <code>currentDepth</code>, * and all its descendants down to <code>maxDepth</code> (including), * descendants whose value in the count arrays, <code>arrays</code>, is != 0. * The count arrays only includes the current partition, from <code>offs...
/** * Attempt to authenticate the user based upon their presented credentials. * This action uses the HTTP parameters of login_email, login_password, and * login_realm as credentials. * * <p>If the authentication attempt is successful then an HTTP redirect will be * sent to the browser redirecting them to their...
//Create a tracked object list // those stay constant for the entire length of the run TrackedObjectList::TrackedObjectList(const std::string &trackingBaseFrame) : detectCount_(0) , trackingBaseFrame_(trackingBaseFrame) { }
import { IDatePickerStrings } from './DatePicker.types'; import { defaultCalendarStrings } from '../../Calendar'; export const defaultDatePickerStrings: IDatePickerStrings = { ...defaultCalendarStrings, prevMonthAriaLabel: 'Go to previous month', nextMonthAriaLabel: 'Go to next month', prevYearAriaLabel: 'Go t...
/* GetSize Return the number of entries in the selected phonebook object that are actually used (i.e. indexes that correspond to non-NULL entries). Possible errors: org.bluez.obex.Error.Forbidden org.bluez.obex.Error.Failed */ func (a *PhonebookAccess1) GetSize() (uint16, error) { var val0 uint16...
// Copyright (c) 2016 CNRS and LIRIS' Establishments (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL$ // $Id$ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : <NAME> <<EMAIL>> // #ifndef GMAP_TEST_INSERTIONS_H #define GMAP_TEST_INSE...
/// <summary> /// If we determine that this till doesn't actually need a true escape continuation, then let's /// not spend CPU or memory at runtime creating or maintaining one! We do this by removing /// all of the NewTill/EndTill instructions that we generated, since there are no matching TillEsc /// instructions th...
<gh_stars>1-10 package vkutil type ObjectType string //go:generate stringer -type=ObjectType const ( OBJECT_USER ObjectType = "user" OBJECT_POST = "post" // — запись на стене пользователя или группы; OBJECT_COMMENT = "comment" // — комментарий к записи н...
def _search(self, key, node): i = 0 while i < len(node.keys) and key > node.keys[i]: i += 1 if i < len(node.keys) and key == node.keys[i]: return node, i elif node.leaf: return None, None else: return self._search(key, node.childs[i...
Ghostbusters Product FAQs The following are answers to the frequently asked questions for the GHOSTBUSTERS™ product line that we are currently developing. What items does ANOVOS intend to produce? Screen accurate full-size props in kit form (end user assembled and painted). Screen accurate full-size complete prop r...
def parse_pr(pr_txt: str) -> Dict[str, Union[dt.date, int, Dict[str, Any]]]: new_cases, new_deaths = _get_new_cases_deaths(pr_txt) hd_cases_deaths = _parse_hd_cases_deaths(pr_txt) return { const.DATE: _parse_date(pr_txt), const.NEW_CASES: new_cases, const.NEW_DEATHS: new_deaths, ...
package com.cscot.basicnetherores.api; import com.cscot.basicnetherores.BasicNetherOres; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.util.Identifier; import java.util.HashMap; import java.util.Map; public class ItemLists { //All Blocks are added to this list for regi...
/** * Exchange a number of `unleveraged_assets` for their equivalent in leveraged * assets. Track this change in MINTSTATE. * * Assumes the position was already approved by `mint_man` */ pub fn create_leveraged_position( storage: &mut dyn Storage, sender: &Addr, mint_count: Uint128, unleveraged_ass...
/** * <p>Add a chain of trusted certificates to this X509Store.</p> * * <p>The first certificate in the chain must be self-signed, and all * certificates must be CA certificates. The list must be ordered with the * root certificate in the first position and the leaf certificate in the * l...
Growth prediction methods: A review Growth prediction is an estimation of the amount of growth to be expected. In orthodontics the term refers to the estimation of amount and direction of growth of the bones of the craniofacial skeletal and overlying soft tissues. Successful prediction requires specifying both the amo...
<gh_stars>0 import { PartialType } from '@nestjs/mapped-types'; import { ChoreDto } from './create-chore.dto'; export interface UpdateChoreDto extends ChoreDto {}
<filename>src/day9.rs //! Link: https://adventofcode.com/2019/day/9 //! Day 9: Sensor Boost //! //! You've just said goodbye to the rebooted rover and left Mars when you receive //! a faint distress signal coming from the asteroid belt. It must be the Ceres monitoring station! //! //! In order to lock on to the sig...
/** * A {@link BoundLocation} holds location information for a bound of a type parameter of a class or * method: parameter index and bound index. It also handles type parameters themselves (not just the * bound part). It would be better named "TypeParameterLocation", or the two uses could be separated * out. */ pu...
import { generateId } from "../helpers/generateId"; import { Book } from "./Book"; import { Borrower } from "./Borrower"; export class Borrow { private id: string; private borrower: Borrower; private returnDate: Date; private borrowDate: Date; private borrowedBook: Book; constructor(options: BorrowOptions...
def parse_path_from_file(file_path): try: with codecs.open(file_path, encoding='utf-8', mode='r') as f: content = f.read() except IOError as e: log.warning('(Search Index) Unable to index file: %s, error: %s', file_path, e) return '' page_json = json.loads(content) pa...