content
stringlengths
10
4.9M
<gh_stars>10-100 #![feature(test)] #[cfg(test)] mod tests { extern crate test; use std::rc::Rc; use test::{black_box, Bencher}; /// /// A length function that takes ownership of the input variable /// fn length(s: String) -> usize { s.len() } /// /// The same length...
Structures, Systems and Organizational Communication Processes in Franchises in times of crisis: the Spanish case. Current economic crisis together with the Internet revolution has had direct impacts on the franchise sector of Spain: in particular on its unique communication network. The aim of this research is to ana...
// StartServices reloads, restarts, or starts ATS as necessary, // according to the changed config files and run mode. // Returns nil on success or any error. func (r *TrafficOpsReq) StartServices(syncdsUpdate *UpdateStatus) error { serviceNeeds, err := checkReload(r.Cfg.RunMode, r.getPluginPackagesInstalled(), r.chan...
# Copyright (c) 2020 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import signac project = signac.init_project('lj-signac-example') sps = [{ 'epsilon': 1.0, 'sigma': 1.0, 'kT': kT, 'tau': 0.1, 'r_cut': 3.0, } fo...
import { ApolloError } from '@apollo/client'; import { Button, Grid, makeStyles, Typography } from '@material-ui/core'; import clsx from 'clsx'; import { isPlainObject } from 'lodash'; import React, { isValidElement, ReactNode } from 'react'; import { getErrorInfo } from '../../api/error.types'; import { ButtonLink, St...
Did you ever think you’d hear Nebraska being bandied about as a “toss up” state in a Presidential election? Mitt Romney won the state by 23 points in 2012. Well thanks to Donald Trump, Nebraska has now gone from a Solid Republican state to a Toss Up in the latest Cook Report scorecard ratings. That’s not all of it. T...
Lost in Translation: Detecting Tax Shelter Activity in Financial Statements Whether financial statements of public U.S. corporations provide sufficient information to the public to determine a corporation's tax payment to the U.S. Treasury and its involvement in "tax shelter" transactions has been much debated since t...
Shipping Shipping rates vary. USA: Ground shipping in the US is $3.50 and takes 5-9 business days. I recommend Priority shipping in the US. Priority shipping is guaranteed to arrive within 2-3 business days for $5.50, this also includes an online tracking number and insurance. Overnight shipping can get pricy. It ...
//--------------------------------------------------------------------------- /// Book histograms and create ordered collection for easy manipulation void StTofpMatchMaker::bookHistograms(void){ mHitPosHistNames = new TOrdCollection; hTofpHitMap1 = new TH2D("tofpHitMap1","valid hit positions", 500,-250,0, 120,-1.23...
Upregulated expression level of the growth factor, progranulin, is associated with the development of primary Sjögren’s syndrome The aim of the present study was to investigate the expression and effect of progranulin (PGRN) in patients with primary Sjögren’s syndrome (pSS). In total, 26 newly diagnosed pSS patients a...
A second order approximation for the light scattering by uniform nanoegg dimers in the quasistatic regime We study the scattering of light by nanoegg dimers using a computational scheme that allows for the efficient simulation nanoegg dimers. We utilize the quasistatic approximation combined with translation relations...
<gh_stars>0 import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { ECPair, networks, payments } from 'bitcoinjs-lib'; import { Observable, of, ReplaySubject } from 'rxjs'; import { environment } from '../../environments/environment'; import { EnderecoModel } from '../mo...
use crate::errors::{ChassisError, ChassisResult}; use crate::model::{Block, ComponentTrait, Module}; use crate::parse::{eq_attr_name, parse_component, parse_module}; use proc_macro2::{Group, Punct, Spacing, TokenStream, TokenTree}; use std::fs::File; use std::{env, fs}; use syn::Item; pub fn export_module(module: Modu...
Blood transfusion in deceased donor kidney transplantation Background Given the unpredictable timing of deceased donor organs and the need for blood transfusion, this study was carried out to determine the rate and risk factors for transfusion in order to identifying a low-risk cohort in the face of a critical blood s...
#include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <map> #include <vector> using namespace std; int main() { int n,l,v1,v2,k; scanf("%d%d%d%d%d",&n,&l,&v1,&v2,&k); int m = ceil(n / (double)k); double tot1 = (double)l * (v1 + v2); double tot2 = (2 * v1 * (double)(m -...
def register_callback(self, callback): callback(self._severity) self.logger_callbacks.append(callback)
/** * TODO: in the future, make it independent from PredicateImpl */ public class AtomPredicateImpl extends PredicateImpl implements AtomPredicate { protected AtomPredicateImpl(String name, ImmutableList<TermType> expectedBaseTypes) { super(name, expectedBaseTypes); } }
/* * Algorithm for spanNot()==span(SpanCondition.NOT_CONTAINED) * * Theoretical algorithm: - Iterate through the string, and at each code point boundary: + If the code point there * is in the set, then return with the current position. + If a set string matches at the current position, then * ...
// Error returns error in a string representation. func (err Error) Error() string { var buf strings.Builder defer buf.Reset() buf.WriteString(errorsPrefix + " ") switch err { case ErrTooManyRequests: buf.WriteString("too many requests (limit has been exceeded)") case ErrUnauthorized: buf.WriteString("unauth...
<reponame>snamiki1212/tweet2csv<filename>src/convert.ts import { Parser } from "json2csv"; import { writeFile } from "fs"; import { config } from "../config"; const outputFile = "./output"; const excludingIDs = config.excludingIDs; const squash = (list: any[]) => list.map((obj) => obj.tweet); const addCustomFields = (...
def create_kg(kg, triples): for (s, p, o) in tqdm(triples): s = clean_url(s) o = clean_url(o) p = clean_url(p) s_v = Vertex(str(s)) o_v = Vertex(str(o)) p_v = Vertex(str(p), predicate=True, _from=s_v, _to=o_v) kg.add_vertex(s_v) kg.add_vertex(p_v) ...
/** * Update provided {@link MetadataLogger} log level settings from PU property. * Logger is updated only when {@code PROCESSOR} logging category level * is set properly in corresponding PU property. * * @param logger logger to be updated * @param persistenceUnit persistence unit with pro...
import java.util.Scanner; import java.util.stream.Stream; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // int[] S = Stream.of(sc.nextLine().split("")).mapToInt(Integer::parseInt).toArray(); String[] S = sc.nextLine().split(""); int v_mae = Integer.par...
The effect of synthesized cartilage tissue from human adipose-derived mesenchymal stem cells in orthopedic spine surgery in patients with osteoarthritis. Osteoarthritis is a joint disease that causes degeneration of articular cartilage and involvement of subcutaneous bone and inflammation of surrounding tissues. It ca...
/** * Whether or not the Operation is done and result can be retrieved with * get(). * * The most common way to wait for this OperationFuture is to use the get() * method which will block. This method allows one to check if it's complete * without blocking. * * @return true if the Operation is ...
/** * @brief Display the TEST Main Menu choices on HyperTerminal * @param None. * @retval None. */ void FW_APP_PrintMainMenu(void) { printf("\r\n=================== Main Menu ============================\r\n\n"); printf(" Download a new Fw Image ------------------------------- 1\r\n\n"); printf(" Test...
// get the pointer of tinyRAMInstance with a given ASM program. func GetTinyRAMInstance(asmPath string, numRegister uint64, primary, auxiliary []uint64) (*tinyRAM, error) { ps, err := parseRawAsm(asmPath) if err != nil { return nil, err } tr := tinyRAM{ NumRegister: numRegister, Prog: ps, Pr...
# | # _` | __ \ _` | __| _ \ __ \ _` | _` | # ( | | | ( | ( ( | | | ( | ( | # \__,_| _| _| \__,_| \___| \___/ _| _| \__,_| \__,_| import sys import math def read_line(): return sys.stdin.readline()[:-1] def read_i...
<filename>dataset_factory.py from sklearn.model_selection import train_test_split import numpy as np import torch from torch.utils.data import Dataset from torchvision import transforms import h5py from skimage import io, transform import os import matplotlib.pyplot as plt def dataset_factory(use_images=True, image_f...
/*Static Dynamic Programming */ class Solution { public: int countNumbersWithUniqueDigits(int n) { if(n == 0) return 1; static vector<int> dp= {10}; if(dp.size()<=n){ for(int i = dp.size(); i<n; i++){ int num = 9, j = i; dp.push_back(1); ...
<reponame>goncaloperes/Babylon.js import "./engine.alpha"; import "./engine.computeShader"; import "./engine.cubeTexture"; import "./engine.debugging"; import "./engine.dynamicBuffer"; import "./engine.dynamicTexture"; import "./engine.multiRender"; import "./engine.query"; import "./engine.rawTexture"; import...
package de.tuberlin.cit.livescale.messaging.messages; import java.util.Map; import java.util.UUID; import de.tuberlin.cit.livescale.messaging.AbstractMessage; /** * Test-Message * * @author louis * */ public class TestMessage extends AbstractMessage { private static final String FIELD_SIX = "FIELD_SIX"; pr...
<reponame>carped99/mago3d-converter<filename>tiles3d/src/types/tileset.rs use serde::{Deserialize, Serialize}; use crate::types::asset::Asset; use crate::types::extension_schema_json::ExtensionSchemaJson; use crate::types::extras_schema_json::ExtrasSchemaJson; use crate::types::properties::Properties; use crate::types...
/** * Class : RDBWorkitemLogger * Usage : */ public class RDBWorkitemLogger implements WorkitemLogger<RDBWorkitemLogger> { private ConcurrentLinkedQueue<String> buffer = new ConcurrentLinkedQueue<>(); private boolean isFlushed = false; public RDBWorkitemLogger append(String logLine) { this.buff...
package services; import java.util.Collection; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.*; import org.springframework.security.authentication.TestingAuthenticationToken; import org.springframework.security.co...
MIA > Archive > Kautsky > Social Revolution Karl Kautsky The Social Revolution Volume II On the Day after the Social Revolution (Part 2) The Organization of the Productive Process The application of the two above mentioned methods of the trust to production have not exhausted the resources of the proletarian reg...
// Code generated by go-swagger; DO NOT EDIT. package descriptors // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" strfmt "github.com/go-openapi/strfmt" "github.com/aeckard8...
/** Minimizes a cost function. * <p>The initial simplex is built from two vertices that are * considered to represent two opposite vertices of a box parallel * to the canonical axes of the space. The simplex is the subset of * vertices encountered while going from vertexA to vertexB * travelling along th...
Today, Ubisoft Entertainment has released a range of stunning photos of a hand-crafted Sony PS4 and DUAL SHOCK 4 controllers, to mark the upcoming launch of Far Cry Primal on February 23rd, 2016. Working free-hand, accredited master carver and stone mason, Nick Roberson, was commissioned to intricately replicate these...
def loadNumericalFeatures(featuresFile, delimiter=","): try: if not os.path.exists(featuresFile): prettyPrint("Unable to find the features file \"%s\"" % featuresFile, "warning") return [] content = open(featuresFile).read() if content.lower().find("[") != -1 and cont...
Sequence-independent DNA binding activity of DnaA protein, the initiator of chromosomal DNA replication in Escherichia coli. The DnaA protein specifically binds to the origin of chromosomal DNA replication and initiates DNA synthesis. In addition to this sequence-specific DNA binding, DnaA protein binds to DNA in a se...
package base import ( "encoding/json" "github.com/couchbase/gocb" "gopkg.in/couchbase/gocbcore.v7" ) // BinaryDocument is type alias that allows SGTranscoder to differentiate between documents that are // intended to be written as binary docs, versus json documents that are being sent as raw bytes // Some additio...
<filename>src/devices/tools/banjo/src/backends/rust.rs // Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use { crate::ast::{self, BanjoAst, Constant}, crate::backends::util::to_c_name, crate::b...
<reponame>pedjaristic/love-in-the-time-covid<filename>src/components/FeelGoodPostList.tsx<gh_stars>0 import React from "react"; import { VerticalSnapContainer, SnapItem, SpecialSnapItem, FlexCenter } from "./layout/indexPage"; import { FeelGoodPostItem } from "./PostItem"; import { graphql, useStaticQuery } fro...
Diesel vehicles will disappear from roads much faster than expected, according to the European Union’s industry commissioner. Elżbieta Bieńkowska spoke after the European parliament backed tougher rules to prevent manufacturers selling cars that produce far more toxic pollution when driven than in official tests. The...
// write callback // Write data to browsers and close the socket. void write_cb(struct ev_loop *loop, struct ev_io *watcher, int revents) { Client *cli; int n; if(EV_ERROR & revents){ perror("invalid event"); return; } cli = (Client*) watcher->data; n = send(watcher->fd, cli->data, cli->len, 0); d...
// this worker deals specifically with listening for processes // which are using the process_OK_message feedback for maestro. // func (this *epollListener) listener() { var event syscall.EpollEvent ok_message_len := len(process_OK_message) ok_first_char := []rune(process_OK_message)[0] var local_buf = make([]byte,...
// Package arg implements command-line argument parsing. // // It is very similar to the flag handling provided by the stdlib 'flag' package (without // the global handling), and intended to be used as a complement to it. // // Usage // // Define an ArgSet using arg.NewArgSet(), then add arguments to it: // var s strin...
package br.lassal.dbvcs.tatubola.integration.versioncontrol; import br.lassal.dbvcs.tatubola.builder.DatabaseSerializerFactory; import br.lassal.dbvcs.tatubola.builder.RelationalDBVersionFactory; import br.lassal.dbvcs.tatubola.integration.IntegrationTestInfo; import br.lassal.dbvcs.tatubola.integration.util.FileSyste...
<reponame>imgag/ProgrammierProjekt2019 #include "impactfilter.h" #include "ui_impactfilter.h" #include "filterdialog.h" #include "annotationservice.h" impactFilter::impactFilter(QWidget *parent) : QDialog(parent), ui(new Ui::impactFilter) { ui->setupUi(this); } impactFilter::~impactFilter() { delete u...
/** * Deserializes XML-based output from cTAKES to jCas object. * @param stream of XML file. * @param jcas {@see jCas} object used to keep the jcas from XML file. */ public static void deserialize(InputStream stream, JCas jcas) { try { XmiCasDeserializer.deserialize(new BufferedInputStream(stream), jcas.ge...
# -*- coding: utf-8 -*- """ Created on Sun Apr 12 07:49:36 2020 @author: naoki """ N = int(input()) xl = [list(map(int, input().split())) for _ in range(N)] left_right = [[row[0]-row[1], row[0]+row[1]] for row in xl] left_right = sorted(left_right, key = lambda x:int(x[1])) count = 0 now = -100000000000 for row in (l...
<reponame>fritzminor/schnellsuchfeldbhh import { FC } from "react"; import { AppState } from "../store/AppState"; import { Store } from "../store/Store"; import { ModalAnalysis } from "./ModalAnalysis"; import { ModalMessage } from "./ModalMessage"; export type ModalInfoProps = { modalInfo: AppState["modalInfo"]; ...
<reponame>leozz37/makani<filename>avionics/firmware/params/param_util.c /* * Copyright 2020 Makani Technologies LLC * * 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....
. In the last years, the development of immunophenotypic and molecular analyses allowed to recognize several cases of hybrid acute leukemia (AL), whose blast cell display both lymphoid and myeloid features. Hybrid, or mixed-lineage, AL seems to have distinct clinical manifestations and hematological findings, and is m...
<filename>NativeRenderingPlugin/PluginSource/source/ShaderProp.h #pragma once #include "PlatformBase.h" #include <assert.h> enum PropType { Float, Vector2, Vector3, Vector4, Matrix, FloatBlock }; const std::string propTypeStrings[] = { "Float", "Vector2", "Vector3", "Vector4", "Matrix", ...
/** * As the default WS-Addressing binding since JAXB 2.1 uses the * {@link W3CEndpointReference} class, we must also use this class, otherwise * JAXB would complain, that there are 2 contexts for the same namespace+element * combination.<br> * The issue with {@link W3CEndpointReference} is that it can easily be c...
<reponame>ulgom/usergrid-stack package org.usergrid.system; import me.prettyprint.hector.api.Cluster; import me.prettyprint.hector.api.exceptions.HectorException; import org.codehaus.jackson.JsonNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.usergrid.utils.JsonUtils; import org.usergrid.util...
<filename>voicebuilder/scripts/python/voice_build.py #!/usr/bin/python3 # -*- coding:utf-8 -*- import os import re import sys import subprocess import shlex import getopt import logging import traceback from pathlib import Path from shutil import copyfile marytts_home = os.environ['MARYTTS_HOME'] marytts_version = os...
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); //#define endl "\n" #define int long long #define f(i,p) for(int i=0;i<p;i++) #define el const int N=1e9+7; const int P = 998244353; int cnt[100005]; typedef struct dot{ int ind; int elem;...
eps = 1e-7 def f(d): l, r = 2.0, d while r - l > eps: mid = (l + r) * 0.5 if mid ** 2 / (mid - 1) < d: l = mid else: r = mid return (l + r) * 0.5 t = int(input()) for _ in range(t): a = int(input()) if a == 0: print('Y', 0.0...
/** * Lists content of current directory, and subdirectories * @param dir given directory * @param path path of parent directory * @return content of current directory, and subdirectories */ public String recrusiveListing(Directory dir, String path) { String content = dir.getContent(); ...
Care for Vulnerable Elderly in Cardiology: A Program for Daily Practice Background: The percentage of cardiac patients aged ≥75 has increased considerably over the past decades. To optimize multidisciplinary care for these frail elderly, a program of intensive medical and nursing care was started at Noord West Ziekenh...
If you made a list of the factors that landed Donald Trump in the White House, Trump campaign digital director Brad Parscale would put Facebook near the top. “Facebook now lets you get to places—and places possibly that you would never go with TV ads,” Parscale told CBS earlier this month. “Now, I can find, you know, 1...
On August 15, 2005, Israel began closing its small settlements in Gaza and withdrawing the troops that protected them as well as the forces that tried to stop smuggling along the Gaza-Egypt border. The last Israeli soldier left a month later, ending an Israeli presence that had begun with the 1967 war. Ten years later,...
Anti-lymphocyte globulin stimulates normal human T cells to proliferate and to release lymphokines in vitro. A study at the clonal level. Human peripheral blood mononuclear cells (PBMC) were stimulated in vitro with anti-lymphocyte globulin (ALG), and the phenotypic and functional properties of the blasts obtained wer...
/** * Return the count of the number of times the user has the collection permission. * @see edu.ur.ir.institution.InstitutionalCollectionSecurityService#hasPermission(edu.ur.ir.institution.InstitutionalCollection, edu.ur.ir.user.IrUser, edu.ur.ir.institution.InstitutionalCollectionPermission) */ public long h...
def combine_tables(self, filename, dir_path=os.getcwd(), name='combined'): location = glob.glob(dir_path+"*"+filename+"*") if location == None: raise NameError('Table not located in the given path') else: tables = map(self._initialise, location) if type(tables...
<filename>tests/fitness_test2.py # tests/fitness_test2.py import source.fitness.fitness as fit import os fit_app = fit.Fitness() test1 = fit_app.open_session() if not test1: print("ERROR: session should exist") else: print("Test1 passed") fit_app.print_fitness_plan() fit_app.save_session() test2 = os.path...
// Clearly we have performance issue due to : recursion public Integer calculate_fibonacci(int inputNumber){ if (inputNumber == 0 || inputNumber ==1){ return 1; } else { return calculate_fibonacci(inputNumber -1 ) + calculate_fibonacci(inputNumber - 2); } }
About the author (NewsTarget) Scientists are finding that those who choose to eat according to the principles of the Mediterranean diet have a lowered rate of death from all causes. Research has shown that the Mediterranean diet has a beneficial effect against cardiovascular disease and is a preventative against a sec...
/** ----- R E A D R A D I U S ----- */ public static double readRadius(String fileName) { In in = new In(fileName); in.readInt(); double universeRadius = in.readDouble(); return universeRadius; }
/** * Reader to read log buffer files. */ public class LogBufferReader implements Closeable { private static final String FILE_SUFFIX = ".buf"; private final int batchSize; private final String baseDir; private final long maxFileId; private long currFileId; private LogBufferEventReader eventReader; pri...
<reponame>sakuli/sakuli export async function wait(milliseconds: number) { await new Promise<void>((res) => { setTimeout(() => res(), milliseconds); }); }
<gh_stars>0 /* Problem Link: https://www.hackerearth.com/practice/basic-programming/input-output/basics-of-input-output/practice-problems/algorithm/find-product/description/ */ #include <iostream> using namespace std; using ulli = unsigned long long int; int main() { ios::sync_with_stdio(false); ulli n; c...
Histologic characteristics enhance predictive value of American Joint Committee on Cancer staging in resectable pancreas cancer American Joint Committee on Cancer (AJCC) anatomic stage group is considered relatively nondiscriminatory for predicting differences in survival after pancreatectomy for ductal adenocarcinoma...
<gh_stars>0 export default interface IHashProvider{ generateHash(payload:string):Promise<string>; compareHash(payload:string,hashed:string):Promise<boolean>; }
/* * MIT LICENSE * Copyright 2000-2019 Simplified Logic, Inc * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, co...
import time import sqlite3 import pandas as pd import numpy as np import scipy as sp from scipy import stats import matplotlib.mlab as mlab import matplotlib.pyplot as plt ''' from sklearn.datasets import make_classification from sklearn.linear_model import LogisticRegression from sklearn.ensemble import (RandomTreesE...
from django.conf import settings from django.core.cache import cache from channels import Channel, Group from channels.sessions import channel_session, enforce_ordering from channels.auth import http_session_user, channel_session_user, channel_session_user_from_http from channels.handler import AsgiHandler, AsgiReques...
<gh_stars>10-100 /* * Copyright 2015 <NAME> * * 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 o...
/** * Default progress bar renderer (see {@link ProgressBarRenderer}). * @author Tongfei Chen * @author Muhammet Sakarya * @since 0.8.0 */ public class DefaultProgressBarRenderer implements ProgressBarRenderer { private ProgressBarStyle style; private String unitName; private long unitSize; privat...
//******** OS_Launch *************** // start the scheduler, enable interrupts // Inputs: number of 12.5ns clock cycles for each time slice // you may select the units of this parameter // Outputs: none (does not return) // In Lab 2, you can ignore the theTimeSlice field // In Lab 3, you should implement the u...
// We don't want ::CreateThread() calls scattered throughout the source. So gather // them all here. BOOL Thread::CreateNewThread(SIZE_T stackSize, LPTHREAD_START_ROUTINE start, void *args, LPCWSTR pName) { CONTRACTL { NOTHROW; GC_TRIGGERS; }
package service import ( "github.com/iodsp/user_center/context" "github.com/iodsp/user_center/models/iodsp" "github.com/iodsp/user_center/params" "github.com/jinzhu/gorm" "time" ) //given an originals path and a db instance. type Resource struct { db *gorm.DB } //returns a new Resource type with a given path a...
Been busy, but I managed to squeeze in some time to finish a scene for my own indulgent reasons. Oh, and Gwen long went through the gritty redesign grinder and now she's all shaggy!They're both karran desperi, or vagabonds if you will, adopted by former seer Taega, who died under unfortuante circumstances, but they inh...
from django.core.urlresolvers import reverse from django.db import models class Group(models.Model): """ Representing a Group that orders food. """ name = models.CharField(max_length=255) """ Name to represent the group. Will be shown at any place where the group is represented in the we...
/** * Created by songlihuang on 2017/7/13. */ public class FileProgressManager implements ProgressManager { private static final String DATE_FMT = "yyyy-MM-dd HH:mm:ss"; private File baseFile; public void init() { if (baseFile == null) { baseFile = new File(SystemUtil.USER_HOME + "/...
/* * Copyright 2019 The Android Open Source 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 copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
/** * @file drivers/entropy.h * * @brief Public APIs for the entropy driver. */ /* * Copyright (c) 2016 ARM Ltd. * Copyright (c) 2017 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_ #define ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_ /** * @brief Entropy Interfac...
PARIS — Two art collectors from the United States, Marlene and Spencer Hays, have pledged the Musée d’Orsay here the largest foreign collection of art to be donated to France since World War II — more than 600 masterworks from the late 19th and early 20th centuries, including works by Pierre Bonnard, Edouard Vuillard, ...
<gh_stars>1-10 package fastgelf import ( "encoding/json" "net" "reflect" "testing" "time" ) func createListener(t testing.TB) *net.UDPConn { addr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0") if err != nil { t.Fatal(err) } udpConn, err := net.ListenUDP("udp", addr) if err != nil { t.Fatal(err) } re...
/** * Tests the direct reference to data set. * * @throws Exception * if any exception */ public void testDataSetReference( ) throws Exception { openDesign( "DesignWithElementReferenceLibrary.xml" ); DataSetHandle dataSet2 = designHandle.findDataSet( "dataSet2" ); DataSetHandle libADataS...
n = input() problems = map(int,raw_input().split()) sum = 0 for x in problems: sum += x index = 0 total = 0 while total < sum/2.0: total += problems[index] index += 1 print index
// NewRSAReaderWriter creates RSAReaderWriter // publicKey - key of the entity I am sending message to // privateKey - my privateKey func NewRSAReaderWriter(publicKey *rsa.PublicKey, privateKey *rsa.PrivateKey, conn Conn) (rw *RSAReaderWriter) { return &RSAReaderWriter{ publicKey: publicKey, privateKey: priva...
Bitcoin exchange SimpleFX mailing system hacked, investigation underway If you are a user of the SimpleFX bitcoin exchange and received two strange emails and wondered why, it’s because the exchange’s mailing system was compromised. SimpleFX which is based in Saint Vincent and the Grenadines, is a trading platform wh...
/** * Created by blackmaple on 2017/5/9. */ public class CourseLoginRunnable extends BaseRunnable { public CourseLoginRunnable(Handler handler) { super(handler); } @Override public void run() { try { String result = CourseConnector.loginCourse(); sendRefreshMes...
<reponame>shayansm2/metaalgolib<filename>src/algorithms/lib/AlgorithmCalculator.py from abc import ABC, abstractmethod from src.lib.Calculator import Calculator class AlgorithmCalculator(Calculator, ABC): @abstractmethod def get_cost_function(self, *args): pass
package me.cchao.insomnia.api.business; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Function; import java.util.regex.Pattern; import java.util.stream.Collectors; import me.cchao.insomnia.api.bean.resp.user.UpdateUs...
def estimateNiters(cls, ptsPerHyp, inlierPerc, confidence=0.95, stddevs=2): from math import log, sqrt inlierPerc = min(0.9, inlierPerc) wn = inlierPerc**ptsPerHyp try: n = int(log(1-confidence)/log(1-wn) + 0.5) except ZeroDivisionError: n = 1e99 ...