content
stringlengths
10
4.9M
<filename>packages/formula/src/index.ts /****************************************************** * Created by nanyuantingfeng on 2019-05-07 18:56. *****************************************************/ export * from './Formula' export * from './Calculator' export * from './types' export * from './helpers' export * f...
/** * Method that, given a SentenceBuilder with the string to process, * extracts the string, scans it looking for whitespace characters sequences * and requests either their deletion, * if they are at the very beginning or at the very end end of the string * or their their replacement with a b...
Image caption President Hollande (R) visited French troops in Kapisa after his election France says four of its soldiers have been killed and five others wounded in an attack in eastern Afghanistan. The Taliban said one of their suicide bombers carried out the attack on a Nato convoy in Kapisa province. Several Afgha...
<filename>src/Problem015.hs module Problem015 where factorial :: Integer -> Integer factorial 1 = 1 factorial n = n * factorial (n - 1) combination :: Integer -> Integer -> Integer combination n k = div (factorial n) (factorial k * factorial (n - k)) solve :: IO () solve = do let x = combination 40 20 putSt...
<reponame>kumv-net/vant-weapp<filename>packages/search/demo/index.ts<gh_stars>1-10 import { VantComponent } from '../../common/component'; VantComponent({ data: { value: '', }, methods: { onChange(e) { this.setData({ value: e.detail, }); }, onSearch() { if (this.data.v...
def is_new_issuer(cls, issuer_id): db = current.db s3db = current.s3db table = s3db.disease_hcert_data query = (table.issuer_id == issuer_id) & \ (table.deleted == False) row = db(query).select(table.id, limitby=(0, 1)).first() return False if row else Tru...
/** * this comparation is a little asymmetric, because perhapsWithoutNamespace * came from the class annotations and withNameSpace came from the * StaxReader in the XML. * * If the annotation has no namespace, it should be equal to a XML element * with the default namespace of the documen...
Transgender child Trinity -- (YouTube screen grab) In a stunning — and at times heartbreaking video — mothers of transgender children push back at the vitriol expressed toward the transgender community, while expressing their love for their children just the way they are. According to the video, called “Meet My Child...
/** Make a state transition from <em>active</em> to <em>waiting</em> within Agent Platform Life Cycle. This method adds a timeout to the other <code>doWait()</code> version. @param millis The timeout value, in milliseconds. @see jade.core.Agent#doWait() */ public void doWait(long millis) { if (Thread.curr...
package openstack import ( "strconv" "strings" "github.com/jackspirou/tfs/state" ) // ComputeInstanceV2 represents a openstack compute resource. type ComputeInstanceV2 struct { count int name string *state.ResourceState } // NewComputeInstanceV2 returns a OpenStackComputeInstanceV2. func NewComputeInstanceV2...
package golinters import ( "sync" "github.com/ashanbrown/forbidigo/forbidigo" "github.com/pkg/errors" "golang.org/x/tools/go/analysis" "github.com/golangci/golangci-lint/pkg/config" "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/go...
// Generate a random dense LP problem with the specified size and seed // For use in benchmarks. pub fn dense_seeded(rows: usize, cols: usize, seed: [u32; 4]) -> StandardForm { assert!(rows <= cols); let mut rng: XorShiftRng = SeedableRng::from_seed(seed); let a = loop { let mut a_data : Vec<f32> = ...
/** * Dummy.READER is required to migrate these 3 classes from Lucene 6 to 4: * SkrtWordTokenizer, SkrtSyllableTokenizer, SanskritAnalyzer; * More precisely, Lucene 6 has Analyzer and Tokenizer constructors taking no arguments, * that set the `input' member to the (private) Tokenizer.ILLEGAL_STATE_READER; * OTOH L...
// createESTemplate uses a Go text/template to create an ElasticSearch index // template. (This terminological conflict is mostly unavoidable). func createESTemplate(daemonUrl, indexTemplateName string, indexTemplateBodyTemplate []byte, numberOfReplicas, numberOfShards uint) error { u, err := url.Parse(daemonUrl) if ...
/** * Simple wrapper class to make Kams sortable * * Normally this would an inner class of a dialog, but this was extracted due * to multiple dialogs making use of it. * * @author James McMahon &lt;jmcmahon@selventa.com&gt; */ public final class KamOption implements Comparable<KamOption> { private final K...
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty o...
<reponame>azaddeveloper/api-snippets<gh_stars>1-10 // Install the Java helper library from twilio.com/docs/java/install import com.twilio.Twilio; import com.twilio.base.ResourceSet; import com.twilio.rest.taskrouter.v1.workspace.TaskQueue; public class Example { private static final String ACCOUNT_SID = "<KEY>"; p...
<filename>frontend_direct3d9/EntrypointD3D9.cc<gh_stars>0 // Copyright <NAME> 2008 - 2011. // Distributed under 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) #include "PchDirect3D9.h" #include "Direct3D9.h" #i...
import { encrypt } from '../../src/encryption/encrypt'; import { decrypt } from '../../src/encryption/decrypt'; test('should encrypt and decrypt', async () => { const phrase = 'vivid oxygen neutral wheat find thumb cigar wheel board kiwi portion business'; const password = '<PASSWORD>'; const encryptedText = awa...
ii = lambda : int(input()) mi = lambda : map(int,input().split()) li = lambda : list(map(int,input().split())) n,m = mi() alis = li() for i in range(n): alis[i] //= 2 ima = alis[0] & -alis[0] alis[0] //= ima for i in range(1,n): tmp = alis[i] & -alis[i] if ima != tmp: print(0) exit() ...
// Uint8 adds the field key with i as a uint8 to the *Event context. func Uint8(key string, value uint8) Field { return func(e *Event) { e.uint8(key, value) } }
A Concept Grounding Approach for Glove-Based Gesture Recognition Glove-based systems are an important option in the field of gesture recognition. They are designed to recognize meaningful expressions of hand motion. In our daily lives, we use our hands for interacting with the environment around us in many tasks. Our ...
//Set uses given function f to mock the PulseHandler.HandlePulse method func (mmHandlePulse *mPulseHandlerMockHandlePulse) Set(f func(ctx context.Context, pulse insolar.Pulse, originalPacket mm_network.ReceivedPacket)) *PulseHandlerMock { if mmHandlePulse.defaultExpectation != nil { mmHandlePulse.mock.t.Fatalf("Defa...
<reponame>Noah-Huppert/salt """ The service module for Slackware .. important:: If you feel that Salt should be using this module to manage services on a minion, and it is using a different module (or gives an error similar to *'service.start' is not available*), see :ref:`here <module-provider-overrid...
from flask import Flask, url_for, redirect, request, render_template, abort from werkzeug.contrib.fixers import ProxyFix from config import DEBUG_STATUS, HOST, PORT, GIT_REPO_SECRET from loader import DataStore from helper import hash_check # Initilize Flask App app = Flask(__name__) app.wsgi_app = ProxyFix(app.wsgi...
// GetScheduleProducer get producer by version and account name func (s *ScheduleProducersDatas) GetScheduleProducer(version uint32, name AccountName) (ProducerKey, error) { if version >= uint32(len(s.schedules)) { return ProducerKey{}, errors.New("no version found") } for _, sp := range s.schedules[version].produ...
def make_list(self, end_token=']'): out = [] while True: try: value = self.value_assign(end_token=end_token) out.append(value) self.separator(end_token=end_token) except self.ParseEnd: return out
def print_stats(stats): for key, val in stats.iteritems(): if key in stats_units.iterkeys(): print "metric %s %s %s %s" % (key, stats_to_inspect[key], val, stats_units[key]) else: print "metric %s %s %s" % (key, stats_to_inspect[key],...
// Parse the auto-version block from a manifest, if any. // // "hclBlock" and "autoVersionBlock" will be nil if there is no auto-version block present. // // "hclBlock" is the block containing the auto-version information. Its "Labels" field should be updated with the new versions, if any. func parseVersionBlockFromMan...
<filename>src/interfaces/IToken.ts /* Copyright (C) Wavy Ltd Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential */ import mongoose, { Document } from 'mongoose' export interface IToken extends Document { userId: mongoose.Schema.Types.ObjectId artistId: mongo...
/* Go-Pherit: A Learning Experience and personal SDK in Golang Copyright (c) 2020 <NAME> https://darksociety.io */ package main /* Exercise: Short declarations 1. Declare and print four variables using the short declaration statement. 2. Declare two variables using multiple short declaration 3. Declare two variables...
#include<bits/stdc++.h> #define PB push_back #define MP make_pair #define F first #define S second #define EPS 1e-9 #define MOD 1000000007 #define int long long using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; int32_t main(){ long double pi = acos(-1.0); int n; cin >> n; vector<pair<long do...
// // Created by <NAME> (EI) on 18/05/2018. // #include <sglib/mappers/threader/NodeMapper.h> // Public Methods... NodeMapper::NodeMapper(SequenceGraph &sg, uniqueKmerIndex &uki) : sg(sg), graph_kmer_index(uki) {} void NodeMapper::mapSequences(const std::string &filename) { query_seq_file = filename; map_se...
// This file is part of HemeLB and is Copyright (C) // the HemeLB team and/or their institutions, as detailed in the // file AUTHORS. This software is provided under the terms of the // license in the file LICENSE. #ifndef HEMELB_UNITTESTS_IO_XML_H #define HEMELB_UNITTESTS_IO_XML_H #include "io/xml/XmlAbstractionLay...
<reponame>riknoll/arcade-forest-fire namespace scene { //% block="start $effect effect at $location|| for $duration ms" //% location.shadow=variables_get //% location.defl=location //% duration.shadow=timePicker export function createParticleEffectAtLocation(location: tiles.Location, effect: effects...
The Ormoc motorboat tragedy in the Philippines last July 2015 which killed 62 passengers is a proof of how perilous our seas are. Expect accidents such as this would increase this coming rainy season. In a report on the Philippine Star, according to Anthony Lucero, OIC of PAGASA (Philippine Atmospheric, Geophysical and...
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be us...
Coordinated network scheduling: a framework for end-to-end services In multi-hop networks, packet schedulers at downstream nodes have an opportunity to make up for excessive latencies due to congestion at upstream nodes. Similarly when packets incur low delays at upstream nodes, downs stream nodes can reduce priority ...
def build(self) -> dict[str, type]: return {k: self._build(v) for k, v in self.type_hints.items()}
/** * Delete the documents which contains the value in the specified field. * * @param indexName * The name of the index * @param fieldName * The name of the field * @param values * A list of value * @throws IOException * @throws URISyntaxException */ public void ...
import torch import torch.nn as nn import torch.nn.functional as func from torch.distributions import Normal, Categorical from torch.distributions import kl_divergence def normal_kl_loss(mean, logvar, r_mean=None, r_logvar=None): if r_mean is None or r_logvar is None: result = -0.5 * torch.mean(1 + logvar - mean...
<filename>packages/ui/dnd/src/createDndPlugin.ts import { createPluginFactory } from '@udecode/plate-core'; export const KEY_DND = 'dnd'; export const createDndPlugin = createPluginFactory({ key: KEY_DND, handlers: { onDrop: (editor) => () => editor.isDragging as boolean, }, });
/** * This method writes the raw incoming bytes from Twilio to a local disk. You can * use this method to listen the raw audio file in any audio player that can play * .wav files. */ private void persistBytesToDisk(String streamSid) { try { Path tempFile = Files.createTempFile(st...
<filename>System/Library/PrivateFrameworks/DocumentManagerCore.framework/DOCTag.h /* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:43:51 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/DocumentManagerCore...
Induction of sister chromatid exchanges in Chinese hamster ovary cells by organophosphate insecticides and their oxygen analogs. Induction of sister chromatid exchanges (SCEs) in cultures of Chinese hamster ovary cells by 10 anticholinesterase organophosphate insecticides was investigated. The insecticides were two ph...
<gh_stars>0 package li.kazu.logic.hazard.functional; import java.util.ArrayList; import java.util.List; import li.kazu.logic.func.Function; public class FunctionalHazardCheck { public enum Mode { STATIC, DYNAMIC, } public static FunctionalHazardCheckResult checkFromTermNr(final Function func, int startTerm...
/** * Compute overlap of assignment * * @param entries Entries * @param getter Entry accessor * @param assign Assignment * @return Overlap amount */ protected <E extends SpatialComparable, A> double computeOverlap(A entries, ArrayAdapter<E, A> getter, long[] assign) { ModifiableHyperBoundingBo...
<filename>Code_Arduino/beamforming_code_gen.py #!/usr/bin/env python3 """This module is an Arduino beamforming code generator, designed to work with the CharlesLabs SG PCB (12 channel with M62429 for software amplitude control). It schedules the pin toggles to achieve the frequency and beam steering angle. The ...
<gh_stars>0 import sys from ..vault import vault as vault_ from .snag import SnagCli from .vault import VaultCli def snag(): args = sys.argv cli = SnagCli(args, vault_) sys.exit(cli.run()) def vault(): args = sys.argv cli = VaultCli(args, vault_) sys.exit(cli.run())
def pretrain_attention_with_random_spans(train_Xy, val_Xy, model, epochs=10, batch_size=16, cuda=True, tokenwise_attention=False, attention_acceptance='auc'): def _prepare_random_matched_spans(model, batch_instances, cuda): unk_idx = int(model.vectorizer.str_to_idx[SimpleInferenceVectorizer.PAD]) Is...
<reponame>hurryabit/qanban<filename>ui/src/Column.tsx import React from 'react'; import { Grid, Header, Card, Button, List, SemanticICONS } from 'semantic-ui-react'; import { Id, ContractState, Contract, PartyId, UpdateMessage } from 'qanban-types'; import ProposalButton from './ProposalButton'; type Props = { parti...
package co.dlg.test.utils.common; import javax.json.*; import java.io.BufferedReader; import java.io.FileReader; import java.io.StringReader; import java.util.List; public class JsonParser { public static void main(String[] args) { try { BufferedReader bufferedReader = new BufferedReader(new ...
use near_sdk::{ env, json_types::Base64VecU8, serde::Deserialize, serde_json, }; #[derive(Deserialize)] #[serde(crate = "near_sdk::serde")] struct Param { pub data: Base64VecU8, } #[no_mangle] pub extern "C" fn upload() { env::setup_panic_hook(); let input = env::input().unwrap(); let ...
<reponame>ingscarrero/nodeJS /** * @interface ICartItem * Represents a cart item data * */ interface ICartItem { /** * @public * @attribute * Document identifier for later reference. * @type {string} * @memberof ICartItem */ id: string; /** * @public * @attribut...
The New Zealand team has been built in its captain's image. When Brendon McCullum attacks, everyone follows. But it has been a long journey "No captain of recent times has built a team more in their own image" © Getty Images Brendon McCullum is a force. The ball is full, and he swings through the line. He changes th...
def root(a, n, p, showprocess): aint = int(int(a * 10**15) * 10 ** (p*n-15)) prev = (int((a+1) ** (1.0/n))+1) * 10 ** p if showprocess: print(num(prev, p)) while True: x = (prev * (n-1) + aint // (prev ** (n-1))) // n if showprocess: print(num(x, p)) if abs(x ...
/* !!! * So angepasst, dass bei doppelt auftretenden Eintraegen, der * alte Eintrag weiterhin markiert bleibt. Diese Massnahme soll * eigentlich nur verhindern, dass zufaellig zwei Eintraege * markiert sind, falls nach der Anwahl eines Eintrages ein zweiter * gleichlautender Eintrag hinzugefuegt wurde. * Was hier...
# Hearts on Air ## L.H. Cosway ### Contents Playlist Author Newsletter Introduction One Epic Night Part 1 Part 2 Hearts on Air Preface Prologue One. Two. Three. Four. Five. Six. Seven. Eight. Nine. Ten. Eleven. Twelve. Thirteen. Fourteen. Fifteen. Sixteen. Seventeen. Eighteen. Nineteen. T...
This article is about the Jewish educational system. For the private university, see Yeshiva University . For the website, see Yeshiva.co Yeshiva (; Hebrew: ישיבה, lit., "sitting"; pl. ישיבות, yeshivot or yeshivos) is a Jewish educational institution that focuses on the study of traditional religious texts, primarily ...
/* Sorts a vector in place using Bubble Sort. */ fn bubble_sort<T: num::Integer>(v: &mut Vec<T>) { for _ in 0..v.len() { for j in 0..v.len() - 1 { if v[j] > v[j + 1] { v.swap(j, j + 1); } } } }
import IgnoredInformations from "@/protocol/network/types/IgnoredInformations"; export default class IgnoredOnlineInformations extends IgnoredInformations { public playerId: number; public playerName: string; public breed: number; public sex: boolean; constructor(accountId = 0, accountName = "", pla...
/** * Create a watches message with a single watch on / * * @return a message that attempts to set 1 watch on / */ private ByteBuffer createWatchesMessage() { List<String> dataWatches = new ArrayList<String>(1); dataWatches.add("/"); List<String> existWatches = Collections.em...
The Role of Asynchronous Computer Mediated Communication on Enhancing Cultural Awareness This study investigates the effect of CMC participation on language learners' willingness to learn more about the target culture through study abroad. Also, it seeks to discern whether CMC activities improve language learners' sel...
/** * use root to run this test * * @author atlas * @date 2013-9-27 */ public class ClockTest2 { private class SleepThread extends Thread { // seconds private int sleepTime = 5; public SleepThread(int sleepTime) { super(); this.sleepTime = sleepTime; } public void run() { System.out.println...
<filename>packages/app/libs/render/src/template/index.ts export * from './nginxStreamConfig' export * from './nginxMainConfig'
def apply_gains_rgb(rgb, red_gains, blue_gains): red_gains = red_gains.squeeze(1) blue_gains = blue_gains.squeeze(1) rgb = rgb.permute(0, 2, 3, 1) green_gains = torch.ones_like(red_gains) gains = torch.stack([red_gains, green_gains, blue_gains], dim=-1) gains = gains[:, None, None, :] outs...
/** * @version $Revision$ $Date$ * @since 0.1 */ public final class MockActivationKey implements ActivationKey { private final String value; private final Date start; private final Date end; private String lock; public MockActivationKey(final String value, final Date start, final Date end) {...
import { GraphQLResolveInfo, Kind, SelectionSetNode } from 'graphql'; import { delegateToSchema } from '@graphql-tools/delegate'; import { WrapQuery } from '@graphql-tools/wrap'; export const resolveCartReferenceById = async ( args: any, context: Record<string, any>, info: GraphQLResolveInfo ) => { const cartI...
People often say the most beautiful cars come out of Italy. And there's solid evidence to back up this claim. All you need to do is take a look at Milanese coachbuilder Carrozzeria Touring Superleggera's Alfa Romeo Disco Volante Spyder to be convinced. You'll remember Touring's designs from the gorgeous Alfa 8C-based ...
/** * The auto activation char <code>'('</code> triggers the proposals. * Proposals are narrowed down according to the beginning of the entered text. * * When starting within a function name (<code>strg+space</code>) the offset is checked to the left. * If it finds any one of <code>(, '</code> or a blank the prop...
#include <bits/stdc++.h> using namespace std; using ll = long long; ll const M = 1e9 + 7; ll const N = 20; ll r[N+1], f[N+1]; ll ext_gcd(ll a, ll b, ll &x, ll &y) { if (!b) { x = 1, y = 0; return a; } ll ret = ext_gcd(b, a%b, x, y); ll t = x; x = y, y = t - a / b * y; return ret; } ll...
package com.linkedin.thirdeye.anomaly.api; import java.util.Properties; /** * */ public final class ResultProperties extends Properties { /** */ private static final long serialVersionUID = 5560598098803866408L; }
class Solution: """ @param: graph: A list of Directed graph node @return: Any topological order for the given graph. """ def topSort(self, graph): # write your code here graphdict = {} graphcount = {} output = [] for x in graph: graphdict[x] = [] ...
Media and Politics Aiming to examine political expressions and commentaries in the age of globalization, this study on media and politics looks into modern media available on the internet, such as Facebook, Twitter, and YouTube. It is found that modern media play a major role in political expressions and commentaries ...
/*---------------------------------------------------------------------------*/ // Author : hiyohiyo // Mail : <EMAIL> // Web : http://crystalmark.info/ // License : The modified BSD license // // Copyright 2002-2005 hiyohiyo, All rights reserved. /*---------...
/// Test manager. /// /// This class is implemented as a singleton. /// class Manager { public: inline TestList& getTestList(void) { return this->m_testlist; } int runAll(); int testCount() const { return m_testlist.size(); } static Manager& instance(void) { s...
def line_in_region(vcf_line, chrom, start, end): variant_chrom, variant_start = vcf_line.split()[0:2] variant_start = int(variant_start) - 1 return variant_chrom == chrom and variant_start >= start and variant_start <= end
<filename>BookDataStore.framework/BCCloudGlobalMetadataManager.h /* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/BookDataStore.framework/BookDataStore */ @interface BCCloudGlobalMetadataManager : NSObject <BCCloudDataSyncManagerDelegate, BCCloudGlobalMetadataManager> { BCCloudChangeToke...
// NewCreateAppParams maps an App to appstore.CreateAppParams func NewCreateAppParams(a app.App, adt audit.Audit) appstore.CreateAppParams { return appstore.CreateAppParams{ AppID: a.ID, OrgID: a.Org.ID, AppExtlID: a.ExternalID.String(), AppName: a.Name, AppDescription: a.D...
<gh_stars>0 package basicAgents; import java.util.ArrayList; import java.util.List; import basicClasses.MaterialStorage; import basicClasses.Order; import interactors.OrderDataStore; import jade.core.Agent; import jade.domain.FIPANames; import jade.lang.acl.MessageTemplate; import jade.proto.AchieveRERespo...
About 8,700 senior enlisted sailors Navy-wide will potentially be on the chopping block in December as the Navy — for the first time in two years — convenes a continuation board that will likely force hundreds of underperforming chiefs into early retirement. The board, which begins on Dec. 4, aims to clear out senior ...
<filename>app_error/error_test.go<gh_stars>0 package app_error import ( "reflect" "strings" "testing" ) func TestErrHandling(t *testing.T) { type args struct { typeS string } tests := []struct { name string args args wantErrType string }{ {name: "HogeErr", args: args{typeS: "hoge"}, wan...
<filename>08. Matrix/determinant of a matrix.cpp // C++ program to find Determinant of a matrix #include <iostream> using namespace std; // Dimension of input square matrix #define N 4 // Function to get cofactor of mat[p][q] in temp[][]. n is // current dimension of mat[][] void getCofactor(int mat[N][N], int temp[N...
// isEnvelopeCached checks if envelope with specific hash has already been received and cached. func (whisper *Whisper) isEnvelopeCached(hash common.Hash) bool { whisper.poolMu.Lock() defer whisper.poolMu.Unlock() _, exist := whisper.envelopes[hash] return exist }
// Notice is when a Notice is directed for this channel - forward the notice to each member func (c *Channel) Notice(client *Client, message string) { m := irc.Message{Prefix: client.Prefix, Command: irc.NOTICE, Params: []string{c.Name}, Trailing: message} c.SendMessageToOthers(&m, client) }
/** * Use this API to enable dnsnameserver of given name. */ public static base_response enable(nitro_service client, String ip) throws Exception { dnsnameserver enableresource = new dnsnameserver(); enableresource.ip = ip; return enableresource.perform_operation(client,"enable"); }
<filename>src/info/wm.rs use crate::util::Result; use std::{env::var, fs::read_to_string, path::Path}; pub fn get_wm_info() -> Result<String> { let home = var("HOME")?; let path = Path::new(&home).join(".xinitrc"); let file = read_to_string(&path).expect("no xinitrc"); let last = file.split(' ').last(...
<reponame>yigitbey/qubit-opencensus # Copyright 2017, OpenCensus Authors # # 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...
<reponame>silaev/mongodb-replica-set-examples<gh_stars>0 package com.github.silaev.mongodb.replicaset.examples; import com.github.silaev.mongodb.replicaset.MongoDbReplicaSet; import com.github.silaev.mongodb.replicaset.examples.util.MongoDBConnectionUtils; import com.github.silaev.mongodb.replicaset.examples.util.Wait...
def read_info(): scope = {} version_file = os.path.join(THIS_DIR, "physt", "version.py") with open(version_file, "r") as f: exec(f.read(), scope) return scope
I sometimes refer to the International Space Station as just “the space station”—and usually, in context, that’s OK. But not too many people are aware that there is another space station: Tiangong-1 (“Heavenly Palace 1”), a testbed spacecraft launched by the Chinese into low-Earth orbit in 2011. One person who knows a...
While we always strive to bring you factual and accurate blogs, videos, and listicles, sometimes errors slip by us. In our “13 Hedgehogs Who Need A Vacation” piece we published last week, there were eight mistakes that we would like to now correct. We apologize to our readers, and we promise more stringent oversight in...
#include <bits/stdc++.h> #ifdef lyosha #define files freopen("input.txt", "r", stdin); #else #define files //freopen("input.txt", "r", stdin); #endif using namespace std; const int mod = 1e9 + 7; const int N = 1000005; int p[N]; int fnd(int a){ if(a == p[a]) return a; return p[a] = fnd(p[a]); } vo...
<reponame>wwit-llt/binance-trader # -*- coding: UTF-8 -*- # @yasinkuyu # Define Python imports import os import sys import time import config import threading import math import logging import logging.handlers import json # from binance_f import RequestClient # from binance_f.constant.test import * # from binance_f.b...
Modelling age-related metabolic disorders in the mouse Ageing can be characterised by a general decline in cellular function, which affects whole-body homoeostasis with metabolic dysfunction—a common hallmark of ageing. The identification and characterisation of the genetic pathways involved are paramount to the under...
import assert from 'assert' import {CallContext, Result, deprecateLatest} from './support' import * as v1055 from './v1055' import * as v2028 from './v2028' import * as v9111 from './v9111' export class BountiesProposeBountyCall { constructor(private ctx: CallContext) { assert(this.ctx.extrinsic.name === 'bounti...
// gets the token value of a variable, after resolving. Token Evaluator::getVariableValue(Token var, VariableScope& scope, bool searchCache) { if (var.subtype() == VARIABLE) { return this->getVariable(var.value(), scope, searchCache).value(); } if (var.subtype() == LITERAL) return var; return nullvalToken; ...
/** * Test if a package private method gives us 1.1 + namespace in the XML * using bnd annotations */ @Component(name = "protected") static class PackageProtectedActivateMethod { @Activate protected void activatex(@SuppressWarnings("unused") ComponentContext c) {} }
/* * The component found a device and is querying to see if an INI file * specified any parameters for it. */ int opal_btl_openib_ini_query(uint32_t vendor_id, uint32_t vendor_part_id, opal_btl_openib_ini_values_t *values) { int ret; device_values_t *h; if (!initialized) { ...
// NewSimulatedBackendWithDatabase creates a new binding backend based on the given database // and uses a simulated blockchain for testing purposes. // A simulated backend always uses chainID 1337. func NewSimulatedBackendWithDatabase(database ethdb.Database, alloc core.GenesisAlloc, gasLimit uint64) *SimulatedBackend...