content stringlengths 10 4.9M |
|---|
#ifndef INNER_NODE_H
#define INNER_NODE_H
#include <stdexcept>
#include "inode.hpp"
#include "ibackpropagation_strategy.hpp"
namespace mcts {
// ----------------------------------------------------------------------
/// @brief implements most methods of the inode interface. some methods
/// have to be impleme... |
/* Drain all the messages currently in 'sock''s receive queue. */
int
nl_sock_drain(struct nl_sock *sock)
{
int error = nl_sock_cow__(sock);
if (error) {
return error;
}
return drain_rcvbuf(sock->fd);
} |
Short PLACE voting explanation
Jameson Quinn Blocked Unblock Follow Following Nov 2, 2017
Problem 1: gerrymandering has weaponized wasted votes.
Solution 1: Use a voting method that minimizes wasted votes. That’s the idea behind #PropRep (proportional representation) methods. In particular, transferable vote methods... |
// Sending response for an incoming message
void
HTTPServerMarlin::SendResponse(HTTPMessage* p_message)
{
HTTPRequest* request = reinterpret_cast<HTTPRequest*>(p_message->GetRequestHandle());
if(request)
{
p_message->SetHasBeenAnswered();
request->StartResponse(p_message);
}
} |
<reponame>gusolsso/node-sp-auth-config
import { IStrategyDictItem, IOnpremiseTmgCredentials } from '../interfaces';
import * as url from 'url';
function isOnPremUrl(siteUrl: string): boolean {
let host: string = (url.parse(siteUrl)).host;
return host.indexOf('.sharepoint.com') === -1 && host.indexOf('.sharepoint.c... |
/*********************************************************************
Allocate memory for a string, copy the string into the memory and
then return the pointer to the memory.
*********************************************************************/
char *
strset (char *string)
{
char *pointer_to_string;
if (pointe... |
/**
* Resolves the string restrictions.
*
* @param refStringRestriction referred string restriction of typedef
* @throws DataModelException a violation in data model rule
*/
private void resolveStringRestriction(YangStringRestriction refStringRestriction)
throws DataModelException {... |
import { Routes } from '@angular/router';
import { LoginComponent } from './login.component';
import { ByLocationComponent } from './byLocation/byLocation.component';
import { ByCodeModuleGuard } from './by-code.module.guard';
import { SocieModuleGuard } from './socie.module.guard';
export const routes: Routes = [
{
... |
<reponame>marians20/people_manager
import { Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError, map } from 'rxjs/operators';
import { MatSnackBar } from '@angular/material/snack-bar';
@Injectable({... |
<filename>src/third_party/mozjs/extract/js/src/frontend/ParseNodeVerify.h<gh_stars>0
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* vim: set ts=8 sts=2 et sw=2 tw=80:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not ... |
A MAN was decapitated and killed by a model remote-controlled helicopter in Brooklyn, sources said.
The victim, Roman Pirozek, was on the corner of Shore Parkway and Bay 44th Street around 3:40 p.m, when his toy aircraft boomeranged and chopped off his head, law enforcement sources told the New York Post
Mr Pirozek w... |
<reponame>kgb0255/deepCR<filename>deepCR/test/test_evaluate.py
import os
import numpy as np
import pytest
import deepCR.evaluate as evaluate
from deepCR.model import deepCR
def test_eval():
mdl = deepCR()
var = np.zeros((10,24,24))
tpr, fpr = evaluate.roc(mdl, image=var, mask=var, thresholds=np.linspace(... |
nums = [int(x) for x in input().split()]
N,K = nums[0],nums[1]
D = set([int(x) for x in input().split()])
ans = N
def solve(M):
M = [int(x) for x in str(M)]
for m in M:
if m in D: return False
return True
while(1):
if solve(ans):
print(ans)
break
else:
ans +=1 |
def _get_files(self):
expanded_paths = set()
for path in self.options["path"]:
expanded_paths.update(glob.glob(path))
all_files = set()
for path in expanded_paths:
if os.path.isdir(path):
for root, dirs, files in os.walk(path):
... |
import { useState, useCallback } from 'react';
import { resolveValue } from '../utils';
/**
* Signature of the setters provided by `useCounter`
* @public
*/
export interface NumberSetter {
/** Sets the state to a given value */
set: React.Dispatch<React.SetStateAction<number>>;
/** Increments the state by a g... |
#include<iostream>
using namespace std;
long long n, a[10000], i, j, m[1001], k[1001];
main(){
cin>>n;
for(i=0;i<n;i++){
cin>>m[i]>>k[i];
a[i]=m[i]+k[i];
}
for(i=0;i<n;i++){
for(j=i+1;j<n;j++){
... |
def transform(self, indata, depth, parameters=None, uritransform=None):
if parameters is None:
parameters = {}
if self.config:
adapted_config = self.t.getconfig(self.config, depth)
else:
adapted_config = None
outdata = self.t.transform(indata, adapted_... |
/**
* Creation Date: 30.05.2018 11:18<br/>
* © Information Design One AG
* @author Eduard Beutel
*/
@Configuration
public class ValidatorConfig extends RepositoryRestConfigurerAdapter
{
@Bean
@Primary
Validator validator() {
return new LocalValidatorFactoryBean();
}
... |
// Helper for numerical solution of tau from noise formula:
Double_t taufunNoise( Double_t* x, Double_t* par ) {
Double_t tau= x[0];
Int_t npar= par[0];
Double_t sum= 0.0;
for( Int_t ipar= 0; ipar < npar; ipar++ ) {
Double_t tausii= tau*par[ipar+1];
Double_t qp= par[npar+ipar+1];
sum+= ( pow( qp, 2 ... |
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Policies_StatusARM) DeepCopyInto(out *Policies_StatusARM) {
*out = *in
if in.ExportPolicy != nil {
in, out := &in.ExportPolicy, &out.ExportPolicy
*out = new(ExportPolicy_StatusARM)
(*in).... |
def replace_reducer(next_reducer):
_state["current_reducer"] = next_reducer
dispatch({"type": __INIT}) |
Influence of Tumour Necrosis Factor‐α on the Expression of Fc IgG and IgA Receptors, and Other Markers by Cultured Human Blood Monocytes and U937 Cells
The expression of Fc receptors for IgG (FcγR) and IgA (FcαR) and of various other antigens on the human monocytic cell line U937 and peripheral blood monocytes, under ... |
<gh_stars>10-100
from dpmModule.util.dpmgenerator import IndividualDPMGenerator
from dpmModule.util.configurations import export_configuration, export_enhancer_configuration
import json
import argparse
def get_args():
parser = argparse.ArgumentParser("DPM Test argument")
parser.add_argument("--job", type=st... |
Ocular vestibular evoked myogenic potentials (o-VEMPs) testing in cervicogenic vertigo and its relation to radiological findings: a correlation study
Abstract Background: The term cervicogenic vertigo is reserved for cases where the suspected mechanism is proprioceptive. For a diagnosis of cervicogenic vertigo, it is ... |
/**
* Simplifies implementing a cell renderer, works around oddities in look and feels.
*
* @param <E> the type of values this renderer can be used for
*/
public abstract class DMDircListCellRenderer<E> implements ListCellRenderer<E> {
/**
* A version number for this class.
*/
private static fina... |
def meanPrecision(self, doc_IDs_ordered, query_ids, qrels, k):
meanPrecision = 0.0
d = {}
for q in query_ids:
d[q] = set()
for e in qrels:
if int(e["query_num"]) in d:
d[int(e["query_num"])].add(int(e["id"]))
q = []
for i in range(len(query_ids)):
prec = self.queryPrecision(doc_IDs_ordered[i],... |
For reasons opaque and entangled, I am meeting Ridley Scott in Berlin, crashing the German junket for his new film Alien: Covenant. The location is a grand hotel in the old east of the city and I know I’m in the right place because of a large poster sitting on an easel. It shows the silhouetted image of a xenomorph – t... |
Part of the Truthout Series Progressive Picks
Keeanga-Yamahtta Taylor. (Photo courtesy of Keeanga-Yamahtta Taylor)What led to the current movement insisting that Black lives do matter and demanding that Black people be treated accordingly? Find out in Keeanga-Yamahtta Taylor’s new book, which Michelle Alexander calls ... |
The Jets want to see what running back Denard Robinson has to offer. The former Michigan standout is working out for Gang Green this week, according to his agents (on Twitter).
[RELATED: Jets Release WR Eric Decker]
Robinson, 27 in September, will participate in the Jets’ three-day mandatory minicamp and try to make ... |
package org.jasig.cas.mock;
import org.jasig.cas.authentication.Authentication;
import org.jasig.cas.authentication.BasicCredentialMetaData;
import org.jasig.cas.authentication.CredentialMetaData;
import org.jasig.cas.authentication.DefaultAuthenticationBuilder;
import org.jasig.cas.authentication.DefaultHandlerResult... |
/**
* A very insecure MD5 password encoder.
* Please DO NOT use this anywhere in production !!!!!!!!
*/
public class MD5PasswordEncoder implements PasswordEncoder {
private static final Logger LOG = LoggerFactory.getLogger(MD5PasswordEncoder.class);
@Override
public String encode(CharSequence rawPasswo... |
/**
* Strip off trailing zeroes
* @param s input string
* @return pruned string
*/
public static String stripTrailingZeroes(String s) {
char[] chars = s.toCharArray();
int length,index;
length = s.length();
index = length -1;
for (; index >=0;index--)
{
if (chars[index] != '0'){
bre... |
/*
Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
... |
This year saw an explosion of racism, Islamophobia, xenophobia, and violence. While there were some significant progressive victories in 2015, there were also many dangerous developments -- from the proliferation of war around the world; to the worst refugee crisis since World War II; to the growth of far-right, neo-fa... |
package main
import (
"context"
"flag"
"fmt"
"io"
"log"
"time"
"github.com/sandokandias/grpc-web-research/backend/internal/grpc/api"
"google.golang.org/grpc"
"github.com/gosuri/uitable"
)
var (
address = flag.String("address", "localhost:9000", "Address of the server in format <ip/name:port>. e.g.: 0.0.0.... |
// List lists all the elasticsearch clusters matching the filters
func List(params ListParams) (*models.ElasticsearchClustersInfo, error) {
params.fillValues()
if err := params.Validate(); err != nil {
return nil, err
}
res, err := params.V1API.ClustersElasticsearch.GetEsClusters(
clusters_elasticsearch.NewGetE... |
<gh_stars>1-10
package org.mockserver.cors;
import io.netty.handler.codec.http.HttpHeaderNames;
import org.mockserver.model.Headers;
import org.mockserver.model.HttpRequest;
import org.mockserver.model.HttpResponse;
import static io.netty.handler.codec.http.HttpMethod.OPTIONS;
import static org.mockserver.configurati... |
<filename>fdm/datasources/joinquant/fields.py
price_fields = [
'open',
'close',
'high',
'low',
'volume',
'money',
]
fs_fields = {
'STK_INCOME_STATEMENT': [
'pub_date', 'start_date', 'end_date', 'total_operating_revenue',
'operating_revenue', 'total_operating_cost', 'operatin... |
/**
* An implementation of the SSFIM algorithm for mining frequent itemsets from a
* transaction database.<br/><br/>
*
* It is based on the description in:<br/><br/>
*
* Djenouri, Y., Comuzzi, M. and Djenouri, D., 2017, May. SS-FIM: Single Scan for Frequent Itemsets Mining in Transactional Databases.
*... |
<gh_stars>10-100
package nl.weeaboo.vn.impl.image;
import com.badlogic.gdx.graphics.Pixmap;
import nl.weeaboo.common.Dim;
import nl.weeaboo.vn.gdx.res.NativeMemoryTracker;
/**
* Screenshot which initially stores its pixel data in a compressed format, then decodes the binary data using
* {@link Pixmap} if needed.
... |
def loadNode(self, nodepath=None):
if nodepath is None:
nodepath = self.snpath
return SNCRS.Node.LoadNode(nodepath) |
Why Trump Appears Irresistible: The Politics of Social Power
mista. frank. Blocked Unblock Follow Following Feb 1, 2017
Fight of the Century: Muhammad Ali vs. Joe Frazier
There are primarily two types of attacks currently being wielded against Donald Trump: the first is shame, the second is truth. Neither has proven... |
<gh_stars>0
import { TypeCheckResult } from './interfaces';
export declare function getFileHash(file: string, enableCache: boolean): Promise<string>;
export declare function saveCache(typeCheckResult: TypeCheckResult): Promise<void>;
export declare function readCache(enableCache: boolean): Promise<TypeCheckResult>;
|
def increase_degree(self, by: int) -> None:
self.degree += by
self.attributes["degree"] = self.degree |
<gh_stars>1-10
# -*- coding: utf-8 -*-
import sys, re
from counter import Counter
from collections import defaultdict
from cncframework.events.dag import DAG
import cncframework.events.styles as styles
import cncframework.events.actions as actions
class EventGraph(DAG):
'''
Directed acyclic graph for a CnC-OCR... |
Serralles Notches New Lap Record of 196.374 mph on Dallara-Mazda Indy Debut
Indianapolis, Ind. – Englishman Jack Harvey has been too often the bridesmaid in his year and a half of competition in Indy Lights Presented by Cooper Tires, but he was out in front when it mattered in this afternoon’s Freedom 100 Presented by... |
<filename>bqueryd/messages.py<gh_stars>1-10
import cPickle
import json
import time
def msg_factory(msg):
if type(msg) is str:
try:
msg = json.loads(msg)
except:
msg is None
if not msg:
return Message()
msg_mapping = {'calc': CalcMessage, 'rpc': RPCMessage, '... |
You'd be hard-pressed to tell sometimes, but the United States Congress actually maintains its own in-house think tank, staffed by a seasoned team of lawyers, economists, and policy experts: the Congressional Research Service. Founded in 1914 as the Legislative Reference Service, CRS now commands an annual budget in ex... |
<reponame>kartaggen/logistics-company
package com.f97808.logisticscompany.jpa;
import com.f97808.logisticscompany.entity.Employee;
import com.f97808.logisticscompany.entity.Office;
import com.f97808.logisticscompany.entity.User;
import org.springframework.data.repository.CrudRepository;
import java.util.List;
import ... |
/**
* Created by tlanders on 5/9/2017.
*/
public abstract class BaseService<TE, T> {
private Repository<TE, T> repository;
public BaseService(Repository<TE, T> repository) {
this.repository = repository;
}
public TE findById(T id) {
return repository.get(id);
}
} |
//!
//! @file main.h
//! @brief
//! @version 0.1
//!
//! @date 2020-09-24
//! @author <NAME> (<EMAIL>)
//!
//! @institution University of Colorado Boulder (UCB)
//! @course ECEN 5823-001: IoT Embedded Firmware (Fall 2020)
//! @instructor <NAME>
//!
//! @assignment ecen5823-assignment7-baquerrj
//!
//! @resources Utiliz... |
def write_calibration_file(filename, frequency_array, calibration_draws, calibration_parameter_draws=None):
import tables
calibration_file = tables.open_file(filename, 'w')
deltaR_group = calibration_file.create_group(calibration_file.root, 'deltaR')
calibration_file.create_carray(deltaR_group, 'draws_a... |
Only a few people (9 percent) insist that 1991 was the year of "victory of a democratic revolution which put an end to Communist Party rule."
Tens of thousands of Yeltsin's (center) supporters gathered around the president’s residence at the White House in Moscow. Source: ITAR-TASS
A relative majority of Russians (41... |
<gh_stars>0
import { Observable } from 'rxjs';
export declare class MinimizeService {
cureentWidnowData: any[];
private messageSource;
currentMessage: Observable<any>;
constructor();
onMinimizeClick(itemData: any): void;
onCloseClick(data: any): void;
}
|
Guest contributor Michael Coats takes a trip back to where it all began…
I’ve always (sliiight fabrication there) wished that I could have watched the classic episodes of Doctor Who. Unfortunately, there were a few obstacles in my way, not least the small matter being born 3 years too late to have watched any. Actuall... |
<filename>Codeforces-Code/Codeforces Round 327 (Div. 1)/C.cpp
#include <cstdio>
#include <algorithm>
const int MAXN = 1111;
const int MAXQ = 6666666;
const int INF = ~0u >> 3;
const int DX[] = {1, -1, 0, 0};
const int DY[] = {0, 0, 1, -1};
int n, m, d[4][MAXN][MAXN];
char map[MAXN][MAXN];
std::pair<int, int> Q[MAXQ]... |
def make_split_idx(args):
print("Make idx list. ")
root = args.root
data_root = root + 'data/refer/data/'
output_folder = root + 'data/referit_raw/'
ref_ann, ref_inst_ann = referit_parser.referit_load_data(data_root)
annotations = referit_parser.get_annotations(ref_ann, ref_inst_ann)
splits ... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef vector<str> ... |
/**
* Loads the current quizResults from file.
* <p>
* Local Variable Dictionary
* <p>
* file: Reference variable for File. Holds File representation of QuizResults file.
* <p>
* jc: Reference variable for JAXBContext. Provides a way to access XML
* binding methods.
* <p>
* unmarshaller: R... |
<filename>tests/ui/pin_project/unaligned_references.rs
#![forbid(unaligned_references)]
// Refs: https://github.com/rust-lang/rust/issues/82523
#[repr(packed)]
struct Packed {
f: u32,
}
#[repr(packed(2))]
struct PackedN {
f: u32,
}
fn main() {
let a = Packed { f: 1 };
let _ = &a.f; //~ ERROR referen... |
import {
ChannelTypes,
Client,
Embed,
Intents,
Message,
MessageReaction,
User
} from 'https://raw.githubusercontent.com/harmony-org/harmony/main/mod.ts'
import { DISCORD_TOKEN } from '../config.ts'
import { Game, PropEmoji } from './structures/game.ts'
import {
PortalgunStates,
MovementEmojis,
BlueP... |
Deletion of Indian hedgehog gene causes dominant semi-lethal Creeper trait in chicken
The Creeper trait, a classical monogenic phenotype of chicken, is controlled by a dominant semi-lethal gene. This trait has been widely cited in the genetics and molecular biology textbooks for illustrating autosomal dominant semi-le... |
Thanks to Target for sponsoring this post!
While Disney films have brought us songs, tears, and cheer, they’ve also brought us groan-inducing chuckles in the form of a good (or bad) pun from time to time. Here are some of our favorites!
The Lion King
It’s our problem-free, pun philosophy.
Beauty and the Beast
This... |
package com.x.organization.assemble.control.wrapout;
import java.util.ArrayList;
import java.util.List;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.http.annotation.Wrap;
import com.x.organization.core.entity.Person;
@Wrap(Person.class)
public class WrapOutPerson extends Person {
private static ... |
/**
* Creates a new Knight Character and adds it to the Party HashMap, it needs all the
* parameters to create a Knight object.
* @param name
* The name of the Character
* @param healthpoints
* The health point of the Character
* @param attack
* The attack value... |
def create_l2_gateway_connection_precommit(self, ctx, gw_connection):
admin_ctx = ctx.elevated()
nsxlib = self._core_plugin.nsxlib
l2gw_id = gw_connection.get(l2gw_const.L2GATEWAY_ID)
devices = self._get_l2_gateway_devices(ctx, l2gw_id)
bep_id = devices[0].get('device_name')
... |
/**
* Test should not fail with NPE when getChildDataAndWatchForNewChildren invoked with wrongNode
*/
@Test
@SuppressWarnings("deprecation")
public void testGetChildDataAndWatchForNewChildrenShouldNotThrowNPE() throws Exception {
ZKUtil.getChildDataAndWatchForNewChildren(ZKW, "/wrongNode");
} |
/*
* Copyright (c) 2003, Adam Dunkels.
* 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 ... |
The evolution of alliances relevance in USA
Over the last two decades, important contributions on alliances have shown the increasing relevance of this type of organisation. But, since we started working on Thomson financial database on alliances, we found a decrease of the number of alliances created since 1994-1995.... |
// Next loads the next word
func (source HunspellWordSource) Next() bool {
hasToken := source.scanner.Scan()
if hasToken && !isValidLine(source.scanner.Text()) {
hasToken = source.Next()
}
return hasToken
} |
"""
Extract reported SubT artifacts and generate JSON file
"""
import os
import json
from osgar.logger import LogReader, lookup_stream_names
from osgar.lib.serialize import deserialize
def get_annotation_item(filename, result):
# result has form [['phone', 0.24000608921051025, [563, 71, 617, 107]]]
ret = ... |
<gh_stars>10-100
package goterators
import (
"fmt"
"testing"
)
func TestSum(t *testing.T) {
testSource := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}
expectedValue := 210
actutalValue := Sum(testSource)
if actutalValue != expectedValue {
t.Errorf("Expected = %v , got = %v", e... |
/**
* Given a certain three cell indices, returns the cell with the max amount of a given pheremone
*
* @param lower
* @param upper
* @param mid
* @param pherType - desired pheremone
* @param neighbors
* @return
*/
private int findMaxPher (int lower, int upper, int mid, int... |
/**
* @file Kinematics.cpp
* @author jonas
* @date 9/18/20
* Description here TODO
*/
#include "Kinematics.hpp"
#include "Angle.hpp" // for Angle
#include "KinematicExceptions.hpp" // for UnreachableException
#include "MathUtil.hpp" // for cosineLawAngle, squareAngle
#include <cmath> ... |
/**
* Converts Java values to a script language values.
*
* @param values
* the java values
* @return the script values
*/
public static Object[] fromJava(Object... values) {
Object[] converted = new Object[values.length];
for (int i = 0; i < values.length; ++i)... |
def updateAvailableLicenseSeats(installinfo):
license_info_url = munkicommon.pref('LicenseInfoURL')
if not license_info_url:
return
if not installinfo.get('optional_installs'):
return
license_info = {}
items_to_check = [item['name']
for item in installinfo['opti... |
def as_tabular(elements,var,wkt=False,wkb=False,path = None):
import osgeo.ogr as ogr
if path is None:
path = get_temp_path(suffix='.txt')
sr = ogr.osr.SpatialReference()
sr.ImportFromEPSG(4326)
sr2 = ogr.osr.SpatialReference()
sr2.ImportFromEPSG(3005)
with open(path,'w') as f:
... |
<reponame>connectedcustomer/Project1<filename>tests_python/tests/test_mempool.py
import time
import pytest
from tools import utils
BAKE_ARGS = ['--max-priority', '512', '--minimal-timestamp']
@pytest.mark.mempool
@pytest.mark.multinode
@pytest.mark.slow
@pytest.mark.incremental
class TestMempool:
" Tests mempool... |
/*****************************************************************************/
/** Adds a core morph animation.
*
* This function adds a core morph animation to the core model instance.
*
* @param pCoreMorphAnimation A pointer to the core morph animation that
* should be added.
... |
<filename>slycore/src/io/memorystream.cpp
#include "sly/io/memorystream.h"
using namespace sly;
MemoryStream::MemoryStream() {
}
MemoryStream::MemoryStream(size_t length) {
_buffer.reserve(length);
}
MemoryStream::~MemoryStream() {}
retval<size_t> MemoryStream::read(vptr_t buffer, size_t size) {
if((_po... |
The view of the red light area in Budhwar Peth on Saturday evening was different from the usual one. Shehnai could be heard playing, rangolis were being drawn and Diwali lamps had lit up the alley otherwise crowded by commercial sex workers (CSWs) and their customers.
Arguably for the first time, the CSWs, police and ... |
Photo illustration by Slate. Photo by iStock/Thinkstock.
The best place to live in America, according to Money’s 2017 ranking, is Fishers, Indiana (population: 90,000). The little-known Indianapolis suburb, we’re told, is not only “safe and quaint and full of young families,” it also boasts a growing economy and a far... |
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.31.1.5860.78bb27cc6 modeling language!*/
package cruise.associations.compositions;
import java.util.*;
// line 74 "../../../../src/TestHarnessCompositionsLeft.ump"
public class X0_n__m_n
{
//------------------------
// MEMBER VARIABLES
... |
<reponame>sadema/GildedRose-Refactoring-Kata
package com.gildedrose.item_types.backstage;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import static org.junit.jupiter.api.Assertions.assertEquals;
class BackstageItemTest {
@ParameterizedTest
@CsvSourc... |
// SPDX-License-Identifier: GPL-2.0+
//
// soc-pcm.c -- ALSA SoC PCM
//
// Copyright 2005 Wolfson Microelectronics PLC.
// Copyright 2005 Openedhand Ltd.
// Copyright (C) 2010 Slimlogic Ltd.
// Copyright (C) 2010 Texas Instruments Inc.
//
// Authors: <NAME> <<EMAIL>>
// <NAME> <<EMAIL>>
#include <linux/kern... |
/// Remove the branching code at the end of the specific MBB.
/// This is only invoked in cases where AnalyzeBranch returns success. It
/// returns the number of instructions that were removed.
unsigned TVMInstrInfo::removeBranch(MachineBasicBlock &MBB,
int *BytesRemoved) const {
M... |
def update_user_settings():
if admin_session_timedout():
if flask.request.method == "POST":
flask.flash("Action canceled, try it again", "error")
return flask.redirect(
flask.url_for("auth_login", next=flask.request.url)
)
user = _get_user(username=flask.g.fas_use... |
def _workflow_inputs(activity_gateway: IActivityGateway, paths: List[str] = None):
usage_paths = activity_gateway.get_all_usage_paths()
if not paths:
return usage_paths
return _lookup_paths_in_paths(lookup_paths=paths, target_paths=usage_paths) |
package procstats
func collectProcMetrics(pid int) (m proc, err error) {
// TODO
return
}
|
/*input
3
2
5
17
*/
import java.util.Scanner;
public class CF1{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){ //Number of test cases
int n=sc.nextInt();
while((n&(n-1))!=0){
n=n&(n-1);
}
System.out.println(n-1);... |
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
typedef long long int lint;
int main() {
int t;
cin >> t;
while (t--) {
int n;
lint x;
cin >> n >> x;
lint maxD = 0, maxDH = 0;
for (int i = 0; i<n; i++) {
lint d,h;
cin >> d >> h;
maxD = ... |
<reponame>gurubamal/integration-simulators-ran-simulator<filename>ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RANSliceConfigController.java
/*
* ============LICENSE_START=======================================================
* Ran Simulator Controller
* ========================... |
n = int(input())
taxi = 0
a = input().split( )
a = [int(i) for i in a]
lista = [0 for i in range(4)]
for i in a:
lista[i - 1] += 1
taxi += lista[3]
taxi += lista[2]
lista[0] -= min(lista[2], lista[0])
taxi += lista[1]//2
if lista[1]%2 == 1:
lista[1] -= 2
taxi += 1
if lista[0] >= 2:
... |
Dissecting the Wjj Anomaly: Diagnostic Tests of a Leptophobic Z'
We examine the scenario where a leptophobic Z' boson accounts for the excess of events in the Wjj channel as observed by CDF. We assume generation independent couplings for the Z' and obtain allowed regions for the four hadronic couplings using the cross... |
package org.javasimon.callback.logging;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Concrete log template using {@link Logger}.
*
* @author gquintana
*/
public class JULLogTemplate<C> extends LogTemplate<C> {
/** Target log template. */
private final Logger logger;
/**... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;cin>>t;
while(t--){
int n,m;cin>>n>>m;
int sump=0,sumn=0,countn=0,minn=INT_MIN,minp=INT_MAX;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
int k;cin>>k;
if(k>=0){
sump... |
import { PropertiesVolume } from '../main/modules/properties-volume';
import { Application } from 'express';
if (!process.env.TEST_PASSWORD) {
new PropertiesVolume().enableFor({ locals: { developmentMode: true } } as unknown as Application);
}
export const config = {
TestUrl: process.env.TEST_URL || 'http://local... |
def _systemctl_action(self, package: Package, action: str):
name = package.manifest['service']['name']
host_service = package.manifest['service']['host-service']
asic_service = package.manifest['service']['asic-service']
single_instance = host_service or (asic_service and not self.is_mul... |
// Load loads config options from a toml file.
func (c *Config) Load(confFile string) error {
metaData, err := toml.DecodeFile(confFile, c)
undecoded := metaData.Undecoded()
if len(undecoded) > 0 && err == nil {
var undecodedItems []string
for _, item := range undecoded {
undecodedItems = append(undecodedItem... |
<reponame>majinjing3/neaten-checkin<filename>vendor/github.com/chanxuehong/util/xml_test.go
package util
import (
"reflect"
"strings"
"testing"
)
func TestDecodeXMLToMap(t *testing.T) {
var xmlArr = []string{
`<xml>
<a>a</a>
<b>b</b>
</xml>`,
`<xml>
<a>a</a>
<b>
<ba>ba</ba>
</b>
<c>c</... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.