content
stringlengths
10
4.9M
/** * Created by einandartun on 6/15/18. */ public class TedPodCastsVO { private String podCastId; private String title; private String imageUrl; private String description; private List<SegmentsVO> segments; public String getPodCastId() { return podCastId; } public String g...
package AutumnRecruitment.chap1; /** * @Classname Ex15 * @Description TODO * @Date 2019/9/21 10:51 * @Created by 14241 */ public class Ex15 { public static int[] histogram(int[] a, int M) { int[] result = new int[M]; for (int i = 0; i < M; i++) { if (a[i] >= 0 && a[i] < M) { ...
<filename>components/DateCreate/story.tsx import styled from '@emotion/styled'; import { Story } from '@storybook/react'; import { DateCreate } from '.'; import { Language } from '../../config/locale'; export default { title: 'Date Create', }; const StoryWrapper = styled.div` padding: 1.5rem; display: flex; f...
def summarize(self, sent: str, lemma_func: Callable[[str], str]=None, keep_stop_words: bool=True, scoring_func: Callable[[EmojiSummarizationResult], float]=None) -> EmojiSummarizationResult: if lemma_func is None: lemma_func = self.lemma...
def mutabletree(f): pass
__version__ = "0.1.0" __version_info__ = tuple([int(num) for num in __version__.split('.')])
<filename>src/extension/kernel/provider.ts import { NotebookDocument, notebooks, NotebookCell, NotebookCellOutput, NotebookCellOutputItem, workspace, WorkspaceEdit, NotebookController, ExtensionContext, Disposable } from 'vscode'; import { Client } from '../kusto/client'; import ...
mod kafka; pub use self::kafka::Kafka;
<reponame>gabehollombe-aws/aws-doc-sdk-examples // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 // snippet-start:[ses.go.list_addresses] package main // snippet-start:[ses.go.list_addresses.imports] import ( "fmt" "github.com/aws/aws-sdk-go/aws" "git...
/* Copyright 2019 matrix-appservice-discord 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 in writing...
<reponame>MDecker-MobileComputing/Ionic_AbkVerz /** * Ein Objekt dieser Klasse kapselt ein Paar von Abkürzung (Key) und Array mit * zugehörigen Bedeutungen (Value für Key). */ export class AbkBedeutung { constructor( public abkuerzung : string, public bedeutungen: string[] ) {} }
// Copyright 2015 <NAME> and <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "flag" "github.com/cpmech/gofem/fem" "github.com/cpmech/gofem/inp" "github.com/cpmech/gosl/io" ) func main() ...
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or ...
<filename>pkg/model/ingress/ingress_table.go package ingress import ( "strings" "github.com/containerum/chkit/pkg/model" ) var ( _ model.TableRenderer = Ingress{} _ model.TableItem = Ingress{} ) func (ingress Ingress) RenderTable() string { return model.RenderTable(ingress) } func (ingress Ingress) TableH...
<filename>driver/unpack_test.go package driver_test import ( "bytes" "errors" "io" "io/ioutil" "os" "path/filepath" "code.cloudfoundry.org/groot-windows/driver" "code.cloudfoundry.org/groot-windows/driver/fakes" hcsfakes "code.cloudfoundry.org/groot-windows/hcs/fakes" "code.cloudfoundry.org/lager" "code.cl...
/** Asserts that generic class names are parsed correctly */ public void testParseGenericClassNames() throws Exception { CodeEntityBase root = parseTestFile("generictypes.cs"); CodeEntityBase namespace = root.getChildren().get(0); assertTypeAndFqName(namespace, NAMESPACE, "GenericsTestLibrary"); assertEquals(7,...
#ifndef MONTE_CARLO_SEARCH_TREE #define MONTE_CARLO_SEARCH_TREE #include "node.hpp" #include <random> #include <chrono> #include <algorithm> #include <cmath> #include <mpi.h> // It may not work for Windows; try something like: // #include "C:\Program Files (x86)\IntelSWTools\mpi\2019.0.117\intel64\include\mpi.h" // ...
<gh_stars>1-10 /* DWARF 2 section names. Copyright (C) 1990-2021 Free Software Foundation, Inc. This file is part of GDB. 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 versi...
// do is used to issue the http request with client to TapPay server and parse the http.Response func (c *client) do(req *http.Request) ([]byte, error) { rawResp, err := c.httpClient.Do(req) if err != nil { return nil, err } defer rawResp.Body.Close() var b []byte buf := bytes.NewBuffer(b) if _, err = io.Copy(...
<filename>Leetcode/67_Add_Binary.cpp // Question link : https://leetcode.com/problems/add-binary/ #include<bits/stdc++.h> using namespace std; class Solution { public: string addBinary(string a,string b){ // l1 = length of string a // l2 = Length of string b int l1=a.size(),l2=b.size(),carry=0; string ...
/** * Returns {@code true} if all the specifications defined in the given {@link ParamsSchema} * exist in this parameters schema, and if they are all identical as defined by * {@link ParamSpec#equals(Object)}. * * @param otherSchema * The whole schema to add. * @return <ul>...
<gh_stars>1-10 #define KUSEG 0x00000000 #define KSEG0 0x80000000 #define KSEG1 0xA0000000 #define KSEG2 0xC0000000 #define PAGE_SIZE 0x1000 #define PAGE_SHIFT 0xC #define CPUADDR 0xFFFFE000
use crate::key; use crate::value::*; use chain_crypto::{Ed25519Extended, PublicKey}; use imhamt::{Hamt, InsertError, UpdateError}; use std::collections::hash_map::DefaultHasher; pub type AccountAlg = Ed25519Extended; /// Possible errors during an account operation #[derive(Debug, Clone, PartialEq, Eq)] pub enum Ledge...
module UnitB.Expr ( module Logic.Expr , module Logic.Expr.Printable , Expr, ExprP, RawExpr , raw ) where import Logic.Expr hiding (Expr,ExprP,RawExpr) import qualified Logic.Expr import Logic.Expr.Printable type Expr = DispExpr type RawExpr = Logic.Expr.Expr type ExprP = Either [String] Expr raw ::...
#ifndef KMEANSML_H #define KMEANSML_H 1 double *new_init_DOUBLE( int n ); void init_INT( int n, int array[] ); void init_DOUBLE( int n, double array[] ); void init_array2D_DOUBLE ( int d, int c, double *arr[] ); void kmeans( int no_of_dimension, int no_of_sample, int no_of_cluster, int it_max, int it_num, doubl...
def pr_filter_list_layout(list_id, item_id, resource, rfields, record): record_id = record["pr_filter.id"] item_class = "thumbnail" raw = record._row T = current.T resource_name = raw["pr_filter.resource"] resource = current.s3db.resource(resource_name) crud_strings = current.response.s3.cru...
<reponame>ku-fpg/arduino-lab<filename>firmware/HaskinoFirmwareShallow/HaskinoFirmware.h #ifndef HaskinoFirmwareH #define HaskinoFirmwareH #define FIRMWARE_MAJOR 0 #define FIRMWARE_MINOR 6 #endif /* HaskinoFirmwareH */
// Construct the ZKP that the commitment contains 0,or +/-c public void construct() { if(val == null) throw new RuntimeException("Must commit to a value first" + "before constructing the proof!"); commitment = new BigInteger[1]; if(val != null)...
// Calls to C land // // When entering C land, the rbp, & rsp of the last Java frame have to be recorded // in the (thread-local) JavaThread object. When leaving C land, the last Java fp // has to be reset to 0. This is required to allow proper stack traversal. void MacroAssembler::set_last_Java_frame(Register java_thr...
package com.telRan.Manager; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; public class NavigationHelper extends HelperBase { public NavigationHelper(WebDriver wd) { super(wd); } public void clickLoginButton(){ click(By.xpath("//ul[@class='menu-btns']//button[@type=...
<gh_stars>10-100 /* FMI Interface for Model Exchange and CoSimulation Version 2 This file is part of FMICodeGenerator (https://github.com/ghorwin/FMICodeGenerator) BSD 3-Clause License Copyright (c) 2018, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, ar...
After reached +20000% in just two weeks on Bittrex, Monaco launches today the new Mobile App to bring cryptocurrencies to every Wallet. The Monaco app allows users to spend bitcoin and ether conveniently in everyday life. The App is avalable in the App Store and the Play Store Downloading the app you can pre-registe...
CLASSIFICATION OF STRAWBERRY FRUIT SHAPE BY MACHINE LEARNING Abstract. Shape is one of the most important traits of agricultural products due to its relationships with the quality, quantity, and value of the products. For strawberries, the nine types of fruit shape were defined and classified by humans based on the sa...
<filename>backend/src/routes/rFuncionario.ts<gh_stars>0 import { Router } from 'express'; import vFuncionario from '../validators/vFuncionario'; import cFuncionario from '../controllers/cFuncionario'; const funcionariosRoutes = Router(); funcionariosRoutes.post('/funcionarios', vFuncionario.validarCadastroFuncionario...
/// Returns a module function bodies builder. pub fn code_section( &mut self, ) -> Result<(&ModuleResources, ModuleFunctionBodiesBuilder), String> { self.ensure_section_in_order(ModuleSection::FunctionBodies)?; let Self { res, bodies, .. } = self; let res = &*res; let builder...
<reponame>kentwait/contagion package contagiongo // import ( // "fmt" // "testing" // ) // func TestNewGenotype(t *testing.T) { // defer func() { // if err := recover(); err != nil { // t.Fatalf(UnexpectedErrorWhileError, "calling NewGenotype constructor", err) // } // }() // sequence := []uint8{0, 1, 1, ...
As millions of Americans file their income tax returns, their chances of getting audited by the IRS have rarely been so low. The number of people audited by the IRS in 2016 year dropped for the sixth straight year, to just over 1 million. The last time so few people were audited was 2004. Since then, the U.S. has adde...
/** * Clear out the contents of the bag, both on disk and in memory. * Any attempts to read after this is called will produce undefined * results. */ @Override public void clear() { synchronized (mContents) { mContents.clear(); if (mSpillFiles != null) { ...
def partitions(self, on: str) -> Dict[str, pd.DataFrame]: partitioned_by = set(self._obj[on]) if len(partitioned_by) < 2: raise errors.SnowFrameInternalError( msg=( f"Found one distinct value, '{list(partitioned_by)[0]}' " f"within '{on...
<filename>src/Function/typecheck/typecheck.ts import { RuntimeType } from "RuntimeType" const typecheck = (f: Function, type: RuntimeType) => { return (...varargs: any[]) => { let lastArg = null let currentType = type try { for (const argument of varargs) { las...
package soccar.physics.models; import org.jbox2d.collision.shapes.PolygonShape; import org.jbox2d.dynamics.Body; import org.jbox2d.dynamics.BodyDef; import org.jbox2d.dynamics.FixtureDef; import soccar.physics.Game; /** * @author Marc */ public class Wall implements Updateable { private Body body; // The Box2D...
// Spin off a thread to periodically clean up expired component locks. func (s *SmD) CompReservationCleanup() { go func() { for { xnames, err := s.db.DeleteCompReservationsExpired() if err != nil { s.LogAlways("CompReservationCleanup(): Lookup failure: %s", err) time.Sleep(10 * time.Second) } else {...
def simulation_decoder(dct: Dict[str, Any]) -> Dict[str, Any]: if "guid" in dct: dct["guid"] = UUID(dct["guid"]) if "type" in dct and "data" in dct: factory = BaseElement.factory[dct["type"]] return factory(**dct["data"]) return dct
/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); cx = (TextView)findViewById(R.id.txtcx); cy = (TextView)findViewById(R.id.txtcy); cz = (TextView)fi...
import { Component, OnInit } from '@angular/core'; import * as d3 from 'd3'; @Component({ selector: 'app-makingbarchart', templateUrl: '../../common/common.html', styleUrls: ['../../common/common.css'] }) export class MakingbarchartComponent implements OnInit { private code: string; constructor() { } ngO...
import math import numpy as np class ErrorClass(object): def __init__(self, x_opt=None, f_opt=None): self.is_x_opt = False self.is_f_opt = False self.f_opt = None self.x_opt = None if f_opt!=None: self.f_opt = f_opt self.is_f_opt = True s...
n=int(input()) ar=sorted(list(map(int,input().split()))) arr=[] hs=[0]*(100+5) for i in range(n//2): arr.append(ar[i*2]) hs[i*2]=1 for i in range(n-1,-1,-1): if(hs[i]!=1): arr.append(ar[i]) print(*arr)
def publish_results(self, dist_dir, use_basename_prefix, vt, bundle_dir, archivepath, id, archive_ext): name = vt.target.basename if use_basename_prefix else id bundle_copy = os.path.join(dist_dir, '{}-bundle'.format(name)) absolute_symlink(bundle_dir, bundle_copy) self.context.log.info( 'created ...
import * as path from 'path'; import { TextDocument } from 'vscode'; import { ReadonlyDocument } from '../../project/readOnlyDocument'; var assert = require('chai').assert; let project_path = path.join(__dirname + "\\..\\..\\..\\test_case\\pdfMarkups.lsp"); suite("ReadonlyDocument Tests", function () { let doc: Rea...
def FindItForCrash(stacktrace_list, callstack, component_to_regression_dict, component_to_crash_revision_dict): if not component_to_regression_dict: result = GenerateAndFilterBlameList(callstack, component_to_crash_re...
def from_webmias(query, webmias): assert isinstance(query, Query) assert isinstance(webmias, WebMIaSIndex) response = webmias.query(query) assert isinstance(response, _Element) response_text = etree.tostring(response, pretty_print=True).decode("utf-8") assert isinstance(r...
def diff( self, datablock: T.ID, key: Union[int, str], datablock_property: T.Property, context: Context ) -> Optional[DeltaReplace]: if datablock is None: return DeltaReplace(DatablockRefProxy()) value = read_attribute(datablock, key, datablock_property, None, context) as...
// BUG: Diagnostic contains: remove @Bar1 // BUG: Diagnostic contains: remove @Bar2 public class TestClass2 { // BUG: Diagnostic contains: remove @Bar1 // BUG: Diagnostic contains: remove @Bar2 private int n; // BUG: Diagnostic contains: remove @Bar1 // BUG: Diagnostic contains: r...
/** * Method to add a node category. * * @param nodeCategory Node category to add. */ public void addNodeCategory(final String nodeCategory) { List<String> _nodeCategories = this.getNodeCategories(); boolean _contains = _nodeCategories.contains(nodeCategory); boolean _not = (!_contains); if...
import solveutils import scramble import cube.vectors as vc import numpy as np BUFFERORDER = { "corner": ["UFR", "UFL", "UBL", "UBR", "DFR", "DFL", "DBR"], "edge": ["UF", "UB", "UR", "UL", "DF", "DB", "FR", "FL", "DR", "DL", "BR"], } PSEUDOS = { "UFR": ("UF", "UR"), "UFL": ("UF", "UL"), "UBR": ("U...
package io.flowing.retail.kafka.order.process; import java.util.Collections; import java.util.Map; import java.util.UUID; import io.camunda.zeebe.spring.client.annotation.ZeebeWorker; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import io.flowing.ret...
// MockCookieGenerator for further tests class MockCookieGenerator : public CookieGenerator { public: MockCookieGenerator() {} MOCK_CONST_METHOD1(GenerateCookie, StatusOr<string>(pid_t pid)); private: DISALLOW_COPY_AND_ASSIGN(MockCookieGenerator); }
def refresh(self): self.update_datetime() self.plane_name = self.choice_plane_var.get() self.inp_dt.update( from_date=self.from_date, to_date=self.to_date, plane_name=self.plane_name, var_to_update=self.choice_math_val.get() ) self.update_state...
#include<bits/stdc++.h> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int n; cin>>n; int arr1[n+1], arr2[n+1]; for(int i=1;i<=n;i++) cin>>arr1[i]; for(int i=1;i<=n;i++) cin>>arr2[i]; int rota[n+1]...
// It's not really easy to write a full up general tester for this. // Even the simplest commands on Linux have dozens of system calls. // The Go assembler should in principle let us write a 3 line assembly // program that just does an exit system call: // MOVQ $exit, RARG // SYSCALL // But that's for someone else to d...
/** * Test ThriftClientConfigParser parse method to check whether it * reads the correct xml filed values. * * @throws Exception */ @Test public void testThriftClientConfigParser() throws Exception { URL configFileUrl = ThriftClientConfigParserTest.class.getResource("/thrift-client-...
/** * Check if the provided transfer is prepared for deletion. * * @param pTransfer The transfer to check. * * @return TRUE if the transfer is prepared for deletion. */ public boolean isTransferDeleted(ITransferInformation pTransfer) { boolean result; LOGGER.debug("Obtainin...
#!/usr/bin/python3 import simplejson from loguru import logger from tornado.gen import coroutine from tornado.concurrent import run_on_executor from .BaseRequestHandler import BaseRequestHandler from utils import unloadRequestParams, Success from configs import default_get_response class Main(BaseRequestHandler): ...
import string from typing import Literal from torch.utils.data import ConcatDataset, DataLoader, SequentialSampler from aligner.data.multi_source_sampler import RoundRobinMultiSourceSampler def _create_sample_data_loader(mode: Literal["min_size", "max_size_cycle"]) -> DataLoader: dataset1 = string.ascii_lowerca...
/* * @lc app=leetcode.cn id=305 lang=rust * * [305] 岛屿数量 II */ // @lc code=start struct UnionFind { count: usize, sz: Vec<usize>, id: Vec<usize>, land: Vec<bool>, } impl UnionFind { pub fn new(size: usize) -> UnionFind { UnionFind { count: 0, sz: vec![1usize; si...
/** * Resolver that uses the "on demand" import statements. */ public static class ImportOnDemandResolver extends AbstractResolver { private Set<String> importStmts; /** * Creates a {@link ImportOnDemandResolver} * * @param pmdClassLoader * the ...
S = input() T = input() # print(S, T) # # ない場合はTを分解し、それらの文字列が存在するかを確認 # for i in range(1, len(T)): # # 分解文字列 # for j in range(i+1): # subTs= T[j:len(T)-i+j] # if subTs in S[j:len(T)-i+j]: # print(i) # exit() # print(subTs) # # 全てない場合は全文字を書き換える # print(len(T)) # ない場合は、文字列の類似数を算出する def similar...
#include <eepp/window/cengine.hpp> #include <eepp/system/cpackmanager.hpp> #include <eepp/system/cinifile.hpp> #include <eepp/graphics/ctexturefactory.hpp> #include <eepp/graphics/cfontmanager.hpp> #include <eepp/graphics/cglobalbatchrenderer.hpp> #include <eepp/graphics/cshaderprogrammanager.hpp> #include <eepp/graphi...
<filename>pkg/processor/HostMatcher_test.go<gh_stars>1-10 package processor import ( "github.com/stretchr/testify/assert" "net/http" "testing" ) func Test_HostMatcher_Append(t *testing.T) { var rule = HostMatchRule{ Host: "example.com", HostFilter: "mytest.local", } var matcher = NewHostMatcher() as...
import { ISlashCommand, SlashCommandContext } from "@rocket.chat/apps-engine/definition/slashcommands"; import { SkypeCallingApp } from "../SkypeCallingApp"; import { IRead, IModify, IHttp } from "@rocket.chat/apps-engine/definition/accessors"; import { shareLink } from "../lib/ShareLink"; export class SkypeCallingSen...
import React from "react"; import NextLink from "next/link"; import styled from "@emotion/styled"; import { linkHoverEffect } from "./LongStoryExternalLink"; import smoothScrollTo from "../../../utils/smoothScrollTo"; import navLinks from "../../../data/navLinks"; const Link = styled.a` text-decoration: none; ${li...
package vib.app.module; import ij.ImagePlus; import vib.NaiveResampler; public class ResampleLabels extends Module { public String getName() { return "ResampleLabels"; } protected String getMessage() { return "Resampling label"; } protected void run(State state, int index) { if (index < 0) new Label().runOn...
def register(func: Callable, name: Optional[str] = None, sort_value: int = 0) -> Callable: package_name, _, plugin_name = func.__module__.rpartition(".") package_name = _PLUGINS["__aliases__"].get(package_name, package_name) file_path = pathlib.Path(sys.modules[func.__module__].__file__) _PLUGINS["__pac...
pub mod day_4_module { use std::env; use std::fs; #[derive(Clone, Debug)] struct Board { board : Vec<Vec<i32>> } fn sum_board(numbers : &[i32], board : &Board) -> i32 { let mut total_sum = 0; // println!("----Test board {:?}", board.board); for row in &b...
New album, Mister Mellow, is out now via Stones Throw Records. There’s no way I could describe Washed Out’s music better than the description on his Facebook page. Washed Out is Ernest Greene, a young guy from Georgia (via South Carolina) who makes bedroom synthpop that sounds blurred and woozily evocative, like someo...
<reponame>toby3d/telegram package telegram import ( "bytes" "io" "log" "mime/multipart" "net" "path" "path/filepath" "strings" "time" json "github.com/json-iterator/go" "github.com/kirillDanshin/dlog" http "github.com/valyala/fasthttp" ) // Bot represents a bot user with access token getted from @BotFath...
<gh_stars>0 #include <eputils.h> #include <fx2regs.h> #include <fx2macros.h> #include <delay.h> #include <gpif.h> #include <fx2lafw.h> #include <gpif-acquisition.h> __bit gpif_acquiring; static void gpif_reset_waveforms(void) { int i; /* Reset WAVEDATA. */ AUTOPTRSETUP = 0x03; AUTOPTRH1 = 0xe4; AUTOPTRL1 = 0x00...
// Copyright 2019-2023 The Liqo 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 by applicable law or ag...
UCLA cornerback Fabian Moreau, who suffered a chest injury during the school's pro day on Tuesday, had surgery Wednesday evening to repair a torn pectoral muscle, a source told ESPN. The defensive back suffered the injury while working on the bench press. NFL Network first reported the news. Fabian Moreau should be ...
string=input() if len(string)==0: print(string) else: A=[] for i in range(len(string)//2): A.append(string[i*2]) A.append(string[len(string)-1]) A.sort() print("+".join(A))
78 Healthcare workers and bloodborne pathogen exposure incidents Introduction Healthcare workers are at risk of infection caused by bloodborne pathogens, particularly hepatitis B (HBV), hepatitis C (HCV) and human immunodeficiency virus (HIV) due to sharps injuries and skin and mucous membrane contacts with blood or o...
import redis userMap = {} tsize = 0 gtsize = 0 r = redis.StrictRedis(host='X.X.X.X', port=XXXX, db=0, password='<PASSWORD>') print r #Add verdification of acccess_key and user and cluster to be onboarded access_key = "" user = "" target_cluster = "" userkey = access_key + "_user_agl" userhash = { "epoch": ...
I Said No Research is an always already whole-self endeavour. As researchers we do not get to choose what parts of us to leave behind at home when we go to work; this is especially clear in the doing of fieldwork. Additionally, what happens in “the field” does not stay there. In fact that is the point. We move between...
<filename>logdevice/common/configuration/ZookeeperConfig.h /** * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <chro...
package cronsifter import ( "bytes" "fmt" "os" "path" "time" ) // Simple logger for writing to a file. This is heavily // based on https://github.com/siddontang/go-log. // SimpleLogger is a basic logging struct that provide log rotating. type SimpleLogger struct { file *os.File filename string maxBytes...
/* * 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 (the * "License"); you ...
/** * Represents a prediction of the value of a categorical target. The prediction is not just a single category * value, but a probability distribution over all known category values. * * @see NumericPrediction */ public final class CategoricalPrediction extends Prediction { /** "counts" can be fractional, or ...
import { ValidateNested } from 'class-validator'; import { Output } from 'src/common/dtos/output.dto'; import { Category } from '../category.entity'; export class AllCategoriesOutput extends Output { @ValidateNested() results?: Category[]; }
//balances the avl search tree and it's nodes that are inputted into the function void balanceAVLTree(avlTreeInit *tree) { avlNodeInit *tempRoot = NULL; tempRoot = balanceAVLNode(tree->avlRoot); if(tempRoot != tree->avlRoot) { tree->avlRoot = tempRoot; } }
/** * Returns the text string with all characters equal to letter replaced with * '#'. * * @param letter character to replace * @return text string with all characters equal to letter replaced with '#' */ public String mark(char letter) { String s3 = ""; for (int i = 0; i ...
Role of interactions in a dissipative many-body localized system Recent experimental and theoretical efforts have focused on the effect of dissipation on quantum many-body systems in their many-body localized (MBL) phase. While in the presence of dephasing noise such systems reach a unique ergodic state, their dynamic...
/** * @param args the command line arguments */ public static void main(String[] args) { Calendar calendar = new GregorianCalendar(); System.out.println("Current time: " + new Date()); System.out.println("Year: " + calendar.get(Calendar.YEAR) + ", Month: " + calendar.g...
<reponame>Abq-Tool-Shed/Capstone-Abq-Tool-Shed import {Tool} from "../interfaces/Tool"; import {connect} from '../database.utils'; import {RowDataPacket} from "mysql2"; export async function selectToolByToolId(toolId: string) : Promise<Tool|null> { try { const mySqlConnection = await connect(); con...
import { BinaryView, Frag, Read, Write } from "@ot-builder/bin-util"; import { Assert } from "@ot-builder/errors"; import { GsubGpos } from "@ot-builder/ot-layout"; import { Data, Sigma } from "@ot-builder/prelude"; import { Tag, UInt24 } from "@ot-builder/primitive"; export const FeatureParams = { read(view: Bina...
def discover(cls): self = cls() globus_alias = 'raw-ephys' ra, rep, rep_sub = (GlobusStorageLocation() & {'globus_alias': globus_alias}).fetch1().values() smap = {'{}/{}'.format(s['water_restriction_number'], s['session_date']).r...
<reponame>zealoussnow/chromium // Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_SSL_HTTPS_ONLY_MODE_UPGRADE_INTERCEPTOR_H_ #define CHROME_BROWSER_SSL_HTTPS_ONLY_MODE_UPGRADE_INTERC...
/** * Return true if should traverse given url. * * @throws MalformedURLException */ public boolean traverseIt(FaeUtil faeUtil, String urlFrom, int depth, int urlNum, int cnt, String url) throws MalformedURLException { boolean traverseIt = true; String msg = null; if (depth > faeUtil.DEPTH) { trave...
import { getRepository } from 'typeorm'; import { Resolvers } from '../resolvers-types.generated'; import { Context } from '../../context'; import { User } from '../../database/entity/User'; import { Department } from '../../database/entity/Department'; import errors from '../../utils/errors'; import { UserType } from ...
Israeli government enjoined from disclosing personal account information to the IRS One disadvantage of United States citizenship is that all income from whatever source, worldwide, is subject to taxation. This is true regardless of how one obtains American citizenship; indeed, there are many "accidental Americans" wh...
const ConfigFilePaths = { // sizes: }