content
stringlengths
10
4.9M
/** * This class hosts several constants related to the network configuration of * Marauroa */ public class NetConst { /** * Number of the protocol version. * 0 - Initial version * 1 - Added Action message * 2 - Added Perception message * 3 - Multipacket udp * 4 - Added server info * 5 - Modified Act...
// checks if string or array is empty func isValidArrayOrString(value interface{}) bool { if value == nil { return false } if isString(value) { return value.(string) != "" } if isArrayLike(value) { a, err := arrayify(value) if err != nil { return false } for _, v := range a { if !isString(v) || v...
/** * * Fixed number of bins for a histogram. Unless configured, the range will * expand dynamically, redistributing the data as necessary into the wider bins. * * The advantage of constraining the range of the statistic is to ignore values * outside the range, such as erroneous values. Erroneous values force e...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. */ /** * Holds all of the documents and data necessary to inflate an APL component hierarchy. */ export declare class Content { /** * Creates an instance of a Content object. a single Content instance * can be used with multiple ...
<reponame>scmwinlinaung/ionic-native_for_jp_encode_decode import { IonicNativePlugin } from '@ionic-native/core'; /** * @hidden */ export declare class PLNObject { private _objectInstance; constructor(title: string, options: LocalNotificationOptions); close(): void; } export interface LocalNotificationOpt...
import bytes from 'bytes'; import type { CommitRecord } from 'bundlemon-utils'; export const stringToColor = function (str: string): string { let hash = 0; for (let i = 0; i < str.length; i++) { hash = str.charCodeAt(i) + ((hash << 5) - hash); } let color = '#'; for (let i = 0; i < 3; i++) { const...
import React, { useEffect, useState } from "react"; import { InertiaLink } from "@inertiajs/inertia-react"; // eslint-disable-next-line import/no-duplicates import { format } from "date-fns"; // eslint-disable-next-line import/no-duplicates import fr from "date-fns/locale/fr"; import { PostType } from "@/utils/types";...
<filename>SRC/TEST/SCENARIO_PLAYER/sp_common_xml.c /* * Copyright (c) 2015, EURECOM (www.eurecom.fr) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code mu...
/** * Demand-driven alias query. * @param var1 * @param m1 * @param var2 * @param m2 * @return * * pre-condition: var1.type == var2.type -> this condition is not checked in the method * because it's usually the case; the types would differ only when we are doing an * exhaustive test */ public b...
/* * Copyright (c) 1999, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
<reponame>aanviguliani/net-test<filename>pkg/akips/config.go package akips import ( "context" "io" "net/http" "net/url" "path" "strings" ) // Config is the client configuration type Config struct { AuthMethod AuthMethod URL string Transport http.RoundTripper } // Client creates an *http.Client func ...
Very Deep Graph Neural Networks Via Noise Regularisation Graph Neural Networks (GNNs) perform learned message passing over an input graph, but conventional wisdom says performing more than handful of steps makes training difficult and does not yield improved performance. Here we show the contrary. We train a deep GNN ...
Antidepressant Potential of Chlorogenic Acid-Enriched Extract from Eucommia ulmoides Oliver Bark with Neuron Protection and Promotion of Serotonin Release through Enhancing Synapsin I Expression Eucommia ulmoides Oliver (E. ulmoides) is a traditional Chinese medicine with many beneficial effects, used as a tonic medic...
/* * Calculate the ULP checksum - try to use hardware. * In the case of MULTIRT, broadcast or multicast the * IXAF_NO_HW_CKSUM is set in which case we use software. * * If the hardware supports IP header checksum offload; then clear the * contents of IP header checksum field as expected by NIC. * Do this only if...
/** * Communicates the popup form with the {@code Memory} object displayed in the graph * * @param event The event that triggered this action */ public void calculateDesiredFalseMCUs(ActionEvent event) { boolean dataOk = true; resultLabel.setText(null); falseMCUsError.setText(null); try { this.desir...
Murder Attempt to Murder Homicide not amounting to Murder Rape Custodial Rape Other Rape Kidnapping Kidnapping of Girls/Women Kidnapping of Others Dacoity Preparation for Dacoity Robbery Burglary Theft Auto Theft Other Theft Riots Criminal breach of Trust Cheating Counterfeiting Arson Hurt Dowry Death Assault on Women'...
def rewind_adjoint(self, times, output_grad): l0 = output_grad[-1] nt = self.full_times.shape[0] grad_result = tuple(torch.zeros(p.shape, device = times.device) for p in self.adjoint_params) j = times.shape[0]-2 for curr in range(nt-2,-1,-1): last = curr + 1 tcurr = self.full_tim...
Excuse the back-to-back updates, but we thought some of you would be interested in this awesome tidbit. Our very own Dr. Jason Wright will be participating in a panel discussion titled "Are We Alone in the Universe", hosted by Ira Flatow at the New York Academy of Sciences. To listen, tune in to the live stream tonigh...
A video posted by celebrity gossip website TMZ reportedly shows how Bieber shouts out “What’s up, bitch?” at Bloom, spurring the English actor to lunge at the 20 year old but not connecting the hit. Spanish newspaper ABC also claimed other big names such as Paris Hilton were present at Ibiza’s Cipriani restaurant. Th...
/** * checkIfAlreadySelected() * Checks company hasn't already been selected * @param company * @return True or false depending on if a company has been found */ private boolean checkIfAlreadySelected(Company company) { for(Company c : selectedCompanies) { if(c.g...
/** * Access functionality of the kpathsea library via kpsewhich * (Easier than implementing a JNI interface, if more clumsy). * The ProgramRunner interface isn't a perfect match because * kpathsea doesn't have input and output filetypes etc, but * this lets us integrate with other parts of TeXlipse with * minima...
Optimal Left-to-Right Binary Signed-Digit Recoding This paper describes new methods for producing optimal binary signed-digit representations. This can be useful in the fast computation of exponentiations. Contrary to existing algorithms, the digits are scanned from left to right (i.e., from the most significant posit...
var creepName = require('./util.nameBuilder'); interface StructureSpawn{ sCreep(role:String, specialty?:String): void; } StructureSpawn.prototype.sCreep = function(role, specialty?){ var body = []; if(this.room.find(FIND_STRUCTURES, {filter: (s:StructureContainer) => s.structureType === STRUCTURE_CONTAINER...
Localization of Ghrelin-Producing Cells in the Stomach of the Rainbow Trout (Oncorhynchus mykiss) Abstract Ghrelin, an endogenous ligand for the growth hormone secretagogue receptor (GHS-R), was isolated from the rat stomach and determined to be n-octanoylated 28-amino-acid peptide. In this study, we studied the distr...
Ice Cube is set to reprise his 21 Jump Street role as police Captain Dickson in the upcoming sequel, 22 Jump Street. The Hollywood Reporter brings word that the musician-turned-actor will join Jonah Hill and Channing Tatum for the June 13, 2014 release. The original 2012 action comedy, inspired by (and loosely continu...
def PrettyXMLFormat(node, level=0): theStr = "\n" + level*" " if len(node): if not node.text or not node.text.strip(): node.text = theStr + " " if not node.tail or not node.tail.strip(): node.tail = theStr for i,child in enumerate(node): PrettyXM...
A Job Scheduling Method Based on Expected Probability of Completion of Voting in Volunteer Computing This paper addresses the problem of job scheduling in volunteer computing (VC) systems where each computation job is replicated and distributed to multiple participants (workers) to remove incorrect results. In the job...
<reponame>ethercrow/json-syntax<gh_stars>10-100 {-# language BangPatterns #-} {-# language LambdaCase #-} import Data.Primitive (ByteArray) import Data.ByteString (ByteString) import Data.Bool (bool) import Control.Exception import Foreign.C.Types (CChar) import qualified Json import qualified Data.Bytes as Bytes imp...
/** * <p>Title: Sarf Program</p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2006</p> * * <p>Company: ALEXO</p> * * @author Haytham Mohtasseb Billah * @version 1.0 */ public class SelectionInfo { private boolean trilateral; private boolean augmented; private boolean a...
import { createLogger, format, LoggerOptions, transports } from "winston"; const { combine, timestamp, printf } = format; const formatter = printf(({ level, message, timestamp, ...args }) => { const LOG = `${timestamp} | ${level.toUpperCase()} | ${message}`; const data = Object.keys(args) .map((key) => `${key...
<reponame>ALESSANDROLMENEZES/e-comerce import { Inject } from '@nestjs/common'; import { IUseCase, Result } from 'types-ddd'; import { BasketRepositoryInterface } from '@repo/basket-repository.interface'; import { UpdateBasketDto } from './update-basket.dto'; import { Currency, MonetaryValueObject, BasketInfoValueOb...
def Dump(obj, fid, float_digits=-1, **params): params['float_digits'] = float_digits json.dump(obj, fid, cls=DecimalEncoder, **params)
// // 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 ...
#pragma once struct BasicCodecave { private: void call_virtual_protect() noexcept; public: unsigned char data[64]; BasicCodecave() noexcept; BasicCodecave(const unsigned char *data, unsigned int length) noexcept; BasicCodecave(const BasicCodecave &other) noexcept; }; void write_jmp_call(...
/** * Mapper to convert a generic query compilation into components for a Neo4j Cypher query. */ public class QueryToCypherMapper extends AbstractExpressionEvaluator { final ExecutionContext ec; final AbstractClassMetaData candidateCmd; final Query query; final QueryCompilation compilation; /*...
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8') const _n = stdin.split('\n')[0] const n = Number(_n) const a1 = stdin .split('\n')[1] .split(' ') .map(Number) const a2 = stdin .split('\n')[2] .split(' ') .map(Number) const a1Total = i => { let sum = 0 for (let j = 0; j <= i; j++) { ...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { int tc; cin>>tc; while(tc--) { int n,k; cin>>n>>k; string A; cin>>A;int ch=1;int c0=0,c1=0; for(int i=0;i<k;i++) { int temp=-1; for(int j=i;j<n;j+=k) { ...
NUMERICAL AND EXPERIMENTAL INVESTIGATION OF HEAT TRANSFER DURING COMPOSITE FUSED FILAMENT FABRICATION Additive manufacturing of fiber-reinforced composite materials enables production of parts with high specific stiffness and strength. Several manufacturers have released their versions of composite 3D printers with th...
// renderRecording uses Asciicast2gif's Docker image to convert an // asciicast to the gif format. This function does not pull the // Docker image, so it needs the client and context passed as arguments. // Asciicast2gif is used with the "-S1" flag to reduce the gif's // resolution. // // This function returns the path...
<gh_stars>0 package ar.com.kfgodel.function.bytes; /** * Date: 29/07/17 - 19:57 */ public interface ByteToStringFunction extends ByteToObjectFunction<String> { }
def __readpotHDF(self, hdffile, atomType=None): info = hdffile.get('general') numPOT = info.attrs['numPOT'][0] if 'bravaisMatrix' in info: self.bravaisMat['pot'] = np.array(info.get('bravaisMatrix')) if numPOT == 0: raise IOError(f'No potentials found in {hdffile}...
package rogue import "fmt" func (n *Obj) ageCap() int64 { // XXX what is a sane age? return 100000 } func (n *Obj) hungerCap() int { return 100 + (n.Level * 5) } func (n *Obj) thirstCap() int { return 100 + (n.Level * 5) } func (n *Obj) coldnessCap() int { return 100 + (n.Level * 5) } func (n *Obj) tiredness...
0170 Identifying Skill Level Differences In Simulated Laparoscopic Scenarios Under High And Low Attentional Demands Background/context The acquisition of expertise requires that individuals develop complex, integrated systems of representations that facilitate the execution, monitoring, planning and analyses of perfor...
package history import ( "errors" "testing" "time" ) func TestValidatorCreate(t *testing.T) { now := time.Now() testCases := []struct { tname string repositoryEntries []*Entry entry *Entry wantErr error }{ // nominal cases { tname: "new entry", entry: &Entry{...
def recv_compressed(self): try: return self._packet_queue.popleft() except IndexError: pass header = bytearray(b'') packets = [] try: abyte = self.sock.recv(1) while abyte and len(header) < 7: header += abyte ...
Eastern Anatolia Observatory (DAG): the status in 2022, towards the first light East Anatolian Observatory’s DAG telescope, with its 4m diameter primary mirror and VIS/IR observation capability, Eastern Anatolian Observatory’s 4m diameter class DAG telescope, with VIS/IR observation capability, will be located on the ...
def Exit(self): if self.Alive(): if sys.platform == "win32": import win32api win32api.TerminateProcess(int(self.pd._handle), -1) else: from os import kill kill(self.pd.pid, signal.SIGINT) if self.pd: self.pd.wait()
// Copyright © 2012 <NAME>, <NAME> // This is under the 2 clause BSD license. // See the included LICENSE.TXT file for more details. #pragma once #include <boost/noncopyable.hpp> #include <string> #include <memory> #include <vector> #include <windows.h> #include "Win32Exception.hpp" #include "Library.hpp" ...
The first day of jury selection in the second Oregon standoff trial ended Tuesday with 41 prospective jurors still in the pool and the judge not granting much leeway to either defense lawyers or prosecutors in their requests to bounce people for perceived biases. The outcome of the first trial against seven co-defenda...
The role of the bursa of Fabricius in the immune response to vaccinal antigens and the development of immune tolerance in chicks (Gallus domesticus) vaccinated at a very young age &NA; Vaccination is recognized to be the most cost‐effective means of preventing, controlling, and even eradicating infectious diseases. Co...
// SyncedNotificationAppInfoTemp is a class that contains the information // necessary to produce a welcome notification and the app badges for all synced // notification. // TODO(dewittj): Convert this into a sync protobuf-backed data structure. class SyncedNotificationAppInfoTemp { public: explicit SyncedNotificat...
// makeFileList creates a list of files to be packed into tpk package. // gotizen do not use any hand-crafted build configuration files like Makfile, // CMakeList.txt or similar, so only source of information about package files // is tizen-manifest.xml func makeFileList(manifest *TizenManifest) (files []PackageFile, e...
<reponame>BryanCruz/haskell-stuff {-# LANGUAGE OverloadedStrings #-} module Main where import System.Environment import Formatting import Formatting.Clock import System.Clock import Data.List.Split (chunksOf) import Control.DeepSeq import KMeansPar main :: IO () main = do [fname, sk, sit, schunks] <- getArgs fi...
package room import ( "context" "fmt" "time" "github.com/pkg/errors" "go-common/app/interface/live/app-interface/conf" cDao "go-common/app/interface/live/app-interface/dao" roomV1 "go-common/app/service/live/room/api/liverpc/v1" "go-common/library/log" rpcCtx "go-common/library/net/rpc/liverpc/context" ) /...
def sync_iter(func: Callable[P, Iterable[T]]) -> Callable[P, 'SyncIter[T]']: @wraps(func) def wrapper(*args: P.args, **kwargs: P.kwargs) -> 'SyncIter[T]': return SyncIter(func(*args, **kwargs)) return wrapper
/* Free BLOC from the chain of blocs, relocating any blocs above it. This may return space to the system. */ static void free_bloc (bloc_ptr bloc) { heap_ptr heap = bloc->heap; heap_ptr h; if (r_alloc_freeze_level) { bloc->variable = NULL; return; } resize_bloc (bloc, 0); if (bloc == f...
/** * Given a string in the form NN% return the corresponding double. * * No Ruby usage (internal function) * * @param str the string * @return a double */ double rm_str_to_pct(VALUE str) { long pct; char *pct_str, *end; str = rb_rescue(rb_str_to_str, str, rescue_not_str, str); pct_str = StringVa...
Inhibition of a protease associated with tumour cells and the probable mechanism of regulation of this interaction in vivo. The regulation of activity of a protease on the surface of human colonic tumour cells implanted in nude mice has been studied. A synthetic fluorescent probe was used to locate cells possessing ac...
<reponame>sashka/signedvalue<filename>signedvalue_test.go package signedvalue import ( "strings" "testing" ) // Test field decoder. func TestConsumeField(t *testing.T) { tests := []struct { field string value string next int err error }{ {field: "0:|", value: "", next: 3, err: nil}, {field: "1:1|",...
// TODO: improve this once std::from_chars is available everywhere optional<double> strToDouble(string_view str, size_t* pos) { std::string copy(str); const char* start = copy.c_str(); char* end; errno = 0; double val = strtod(start, &end); if (start == end || errno == ERANGE) return std...
<reponame>evg656e/broadcast-example<gh_stars>0 import signal, { Signal } from './signal'; import WebSocket from './websocket'; console.log('defining Client'); /*! \class Client */ export default class Client { url: string; ready: boolean; closed: boolean; messageReceived: Signal; readyChanged:...
#include <kipr/botball.h> int main() { printf("going straight\n"); motor(0,70);//motor 0 running 70% motor(2,70);//motor 3 running 70% msleep(5000);//motor 0 and 3 running 7 seconds printf("turn l...
/** * Create new Object and return this new Object if success. Run only on * tables with auto_increment id column. * * @param obj * @return */ @Override public BestScoreBean create(BestScoreBean obj) { log.debug("Start method..."); BestScoreBean objectToReturn = nul...
<filename>include/cache/CacheInfo.h /** * @file CacheInfo.h * @brief The header file of CacheInfo. * * This file defines struct CacheInfo and comparision function object * of CacheInfo to implement different replacement algorithm. */ #ifndef CACHEINFO_H #define CACHEINFO_H namespace izenelib { namespace cache...
<filename>tic-tac-toe-client/src/app/image-stack/ImageStack.tsx<gh_stars>0 import React, { FC } from 'react'; import styles from './ImageStack.module.scss'; export const ImageStack: FC<{ imageSources: ReadonlyArray<string | undefined>; }> = ({ imageSources }) => ( <div className={`${styles.top} position-absolute ...
Review on Nelliyathi kasayam in the management of Diabetes Mellitus (Neerizhivu) Globally diabetes is a one of the major health challenges disease. This disease direct impact the socio economical level in person and country. Diabetes Mellitus is caused by lack of insulin activity. In type 2 diabetes there is resistanc...
Curcumin as a therapeutic agent in leukemia Leukemia comprises a group of hematological malignancies responsible for 8% of all cancers and is the most common cancer in children. Despite significant improvements in leukemia treatment, the efficacy of conventional chemotherapeutic agents is low and the disease carries a...
/* ************************************************ username : smmehrab fullname : <NAME> email : <EMAIL> institute : university of dhaka, bangladesh session : 2017-2018 ************************************************ */ #include<stdio.h> int main() { int n,m,i,j,c=0; char temp; ...
<filename>kMeansClustering.py import numpy as np import os import matplotlib.pyplot as plt def compute_euclidean_distance(point, centroid): return np.sqrt(np.sum(((point - centroid)**2))) def assign_label_cluster(distance, data_point, centroids): index_of_minimum = min(distance, key=distance.get)#find closest...
SDF‐based tracking control for state‐constrained nonholonomic systems with disturbances via relay switching control: Theory and experiment This article investigates the tracking control problem for a kind of chained‐form nonholonomic systems in the presence of unknown time‐varying disturbances and full‐state constrain...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *----------------------------------------------------------------------...
<filename>sahara/plugins/mapr/util/config_file_utils.py # Copyright (c) 2014, MapR Technologies # # 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/LIC...
n = int(input()) lim = n i = 1 a = 1 b = n while lim > i: if n % i == 0: if a + b > n % i + i: a = i b = n / i lim = n // i i += 1 sub = a + b - 2 ''' if a == 1: print("こっちに") sub += 1 if b == 1: print("きてる") sub += 1 ''' print(int(sub))
Delhi's anti-graft bureau head MK Meena on Tuesday accused the AAP government of trying to abuse the process of law. Making the submission before the Delhi High Court, Meena's counsel questioned Delhi government's power to set up an inquiry commission to probe a scam without seeking the Centre's approval. "It is tota...
/** * Data container to access metadata and binary data of a note attachment * * @author Karsten Lehmann */ public class JNAAttachment implements Attachment { private String m_fileName; private Compression m_compression; private short m_fileFlags; private long m_fileSize; private DominoDateTime m_fileCreated;...
Advertisements of badminton equipment in Medan press, as early as 1932. Brown argues that key to the introduction of badminton to Indonesia lies in Medan, where badminton players from Pinang (e.g. Yan Eng Hoo) frequently visited for exhibition games. Before independence, Chinese is the largest ethnic group in Medan In...
/*********************************************************************/ /** ** ** E2E_CONTEXT_LogUspMsgIfSessionContext ** ** Logs a USP protobuf message structure in Protobuf debug format if ** this message is to encapsulate in a SessionContext record type. ** ** This function is used to print the USP Message before q...
With all the news coming out about the Boston Red Sox signing both Hanley Ramirez and Pablo Sandoval (though the Sandoval deal hasn’t been finalized), their roster is getting jam packed, especially considering Ramirez would likely play in left field. Having an overload of MLB caliber outfielders, the Red Sox are going...
It has been a decade since Liliane last saw her little girl. She fled Africa in fear for her life, leaving behind everything she knew and loved in the hope of a fresh start in Japan. Today, she scrapes a living from dead-end jobs, and what Japanese she knows has been snatched from television shows. There is little gov...
<gh_stars>0 import { AmortizationPeriod } from './amortization'; import { MonthsPerYear } from './constants'; export type AmortizationPeriodWithMI = AmortizationPeriod & { mortgageInsurance: number; }; export interface ComputeMIInputs { propertyValue: number; mortgageInsurance: number; upFrontMip?: number; } ...
package com.eatthepath.idobfuscator; public class XorLongTransformerTest extends LongTransformerTest { @Override public LongTransformer[] getTransformers() { final long[] masks = new long[] { 0, 1, -7, 77, Long.MAX_VALUE, Long.MIN_VALUE }; final LongTransformer[] transformers = new LongTransfo...
def base64_to_tif(base64img, output_file_path=""): decoded_tif = base64.b64decode(base64img) tif_bytes = io.BytesIO(decoded_tif) image = Image.open(tif_bytes) if output_file_path != "": image.save(output_file_path, format='TIFF') return decoded_tif
<reponame>Sirherobrine23/Dir819gpl_code /* File: enroll-scep.h Description: Cisco Simple Certificate Enrollment Protocol (SCEP) exported (and private) symbols and definitions. Copyright: Copyright (c) 2002, 2003 SFNT Finland Oy. All rights reserved */ #include "sshincludes.h" ...
It was quiet in the dank basement in northwest Caracas, where dozens of young men and women sat on the floor and assembled their weapons. They poured asphalt, gasoline and paint into beer and pop bottles, tying knots in strips of fabric to fashion wicks. Molotov cocktails are cheap and easy to make. Whether they're do...
<filename>pkg/seek/rlimit.go package seek import "syscall" func getRlimit(percent uint) uint64 { var rlimit syscall.Rlimit err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlimit) if err != nil { return 768 } return uint64(float64(rlimit.Cur) * float64(percent) / 100) }
// Copyright 2021 VMware, Inc. // SPDX-License-Identifier: Apache License 2.0 package models // This file is auto-generated. // VirtualserviceFaults virtualservice faults // swagger:model VirtualserviceFaults type VirtualserviceFaults struct { // Enable debug faults. Field introduced in 20.1.6. DebugFaults *bool `...
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ==============================================================...
import React from 'react'; export function FavoriteActiveSvg(): JSX.Element { return( <svg width="24" height="24" viewBox="0 0 24 24"> <path fill="currentColor" fillRule="evenodd" d="M16 3c3.59 0 6 2.41 6 6 0 4.452-3.44 8.308-9.311 11.824-.394.246-.98.246-1.366.006C5.46 17.353 2 13.466 2 9c0-3.59 2.41-6 6-...
#include <stdio.h> double dp[3000][3000]; long long n; double arr[3000]; double solve(long long index,long long target) { if(index>=n) { if(target==0) return 1.0; else return 0.0; } else if(dp[index][target]!=-1) return dp[index][target]; else return dp[index][target]=solve(index+1...
Interest-based Segments of TV Audiences ABSTRACT This paper is one of 18 selected by the Editorial Review Board of The Journal of Advertising Research to be a ‘classic’ - an article that has withstood the test of time. First published in 1979, this paper reports on a face-to-face national probability survey of 2500 re...
<gh_stars>1-10 // Package goaci is a a Cisco ACI client library for Go. package goaci import ( "crypto/tls" "errors" "fmt" "io" "io/ioutil" "net/http" "net/http/cookiejar" "strings" "time" "github.com/tidwall/gjson" ) // Client is an HTTP ACI API client. // Use goaci.NewClient to initiate a client. // This...
def psaw_parse_response(self, res, db=None, save_data=False): if not db: self.last_id_count = 1 else: sort = [('_id', -1)] documents = db.get_documents(sort=sort, limit=1, show=False) try: self.last_id_count = documents[0]['doc_id'] + 1 except IndexError: self.last_id_count = 1 if self.LOG_...
package main import "testing" func TestBitSet(t *testing.T) { n := 64 a := NewBitSet(n) a.Set(10) if !a.IsSet(10) { t.Fatalf("10 should be set, but not") } a.Clear(10) if a.IsSet(10) { t.Fatalf("10 should not be set but wrong") } a.Set(10) a = a.RightShift(3) if a.IsSet(10) || !a.IsSet(7) { t.Fa...
def remove_compounds(self,removed_compounds): if type(removed_compounds) is not list: userError("**Error! the input to 'remove_compounds' should be a list of compound objects") for cmp in removed_compounds: for rxn in cmp.reactions: if rxn.stoichiometry[cmp] < 0: ...
def _inner_release(self): if not self.is_acquired: return False try: self._delete_nodes(self.nodes) except NoNodeError: pass self.is_acquired = False self.nodes = [None for _ in self.paths] return True
pub mod redis; pub mod slack; pub use redis::{RedisResponse, RedisServer}; pub use slack::{SlackApi, SlackUser, SlackUserGroup};
The Los Angeles Rams’ 2017 draft was peppered with small-school reaches. While the Rams may not have gained the best value from the 2017 NFL Draft, the overall process did contain a few positives. The offensive selections demonstrate that the front office has a clear acknowledgement of the scheme that new head coach Se...
<reponame>kyungmin96/myfcdd from typing import List, Tuple import torch from fcdd.models.bases import FCDDNet, BaseNet from fcdd.training.ae import AETrainer from fcdd.training.fcdd import FCDDTrainer from fcdd.training.hsc import HSCTrainer from fcdd.util.logging import Logger from torch.optim.lr_scheduler import _LR...
A CBC News investigation has revealed the Conservative Party candidate running against Liberal Leader Justin Trudeau is a performance artist whose campaign is at least partially intended to "mess with" the Tories. Performance artist Chris Lloyd was formally acclaimed as the Conservative candidate in the Montreal ridin...
<reponame>michalMilewski-8/MillingSimulator<filename>Torus.h #pragma once #include "Object.h" class Torus : public Object { public: Torus(float R, float r, int vertical, int horizontal,glm::vec4 color, Shader sh); void DrawObject(glm::mat4 mvp) override; void CreateMenu() override; float GetR()...