content stringlengths 10 4.9M |
|---|
import java.io.*;
import java.util.*;
public class P601D {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
for(int i=0; i<t; i++) {
String[] line ... |
package testtelemetry
import (
"encoding/json"
"fmt"
"github.com/StackVista/stackstate-agent/pkg/metrics"
"io/ioutil"
"log"
"os"
"runtime"
"strings"
"unsafe"
common "github.com/StackVista/stackstate-agent/rtloader/test/common"
"github.com/StackVista/stackstate-agent/rtloader/test/helpers"
)
/*
#include "r... |
<reponame>prsolucoes/pickman
package main
import (
"flag"
"io/ioutil"
"github.com/prsolucoes/pickman/app"
"encoding/json"
"github.com/prsolucoes/pickman/managers"
"github.com/prsolucoes/pickman/logger"
_ "github.com/prsolucoes/pickman/loaders"
)
var (
Config *app.Config
CollectorNameToExecute string
)
func ... |
/**
* Default {@code ExecutorService} used for scheduling concurrent tasks.
* This default spawns as many threads as required with a priority of
* {@code Thread.MIN_PRIORITY}. Idle threads are pruned after one minute.
* @return fresh ExecutorService
*/
public static ExecutorService defaultExec... |
#include <iostream>
#include <queue>
#include <array>
#include <algorithm>
using namespace std;
int main() {
int t;
cin >> t;
vector<int> tot = {2};
int delta = 2;
int s = 2;
while (tot.back() <= int(1e9)) {
delta += 3;
s = s + delta;
tot.push_back(s);
}
while (t--) {
int n;
cin >> ... |
L-NMMA (a nitric oxide synthase inhibitor) is effective in the treatment of cardiogenic shock.
BACKGROUND
The objective was to assess the safety and efficacy of L-NMMA in the treatment of cardiogenic shock.
METHODS
We enrolled 11 consecutive patients with cardiogenic shock that persisted after >24 hours from admissi... |
import { GitHistory, Log } from "../src";
import * as glob from "fast-glob";
import * as path from "path";
import * as fs from "fs";
import * as util from "util";
import { Lang, ts, elm, rs } from "./lang";
type Langs = { [key: string]: number };
type Result = { hash: string; date: string; langs: Langs };
export asyn... |
INTERESTS OF CHILDREN AND YOUTH IN THE CONTEXT OF PREVALENCE OF PHYSICAL ACTIVITIES AND SPORT
The results of qualitative research aimed at finding personal views of children and youth are presented in this paper. The research was conducted in consideration of children’s surroundings: school, family and local community... |
package kafka
import (
"context"
encoding "encoding/json"
"fmt"
"time"
"github.com/Shopify/sarama"
"github.com/cenkalti/backoff/v4"
"github.com/consensys/orchestrate/pkg/errors"
authutils "github.com/consensys/orchestrate/pkg/toolkit/app/auth/utils"
"github.com/consensys/orchestrate/pkg/toolkit/app/log"
"gi... |
<filename>modules/io/crypto.cpp
#include "modules/io/crypto.h"
#include <endian.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
#include <string.h>
#include "modules/io/hash.h"
#include "modules/io/hexdump.h"
#include "modules/io/log.h"
extern "C" {
// WTF openssl did you forget this one?
#include <openssl/mode... |
import Control.Monad
import Data.List
main = do
t <- readLn
replicateM t $ getLine >>= print.solve
solve = (+1).foldl max 0.map length.filter((=='L').head).group |
<gh_stars>1-10
import * as Sentry from "@sentry/node"
import debug from "debug"
const log = debug("resync:sentry")
if (process.env.NODE_ENV !== "development") {
Sentry.init({
dsn: "https://5b4d331966544c5e823e1ea81f56e3cf@o105856.ingest.sentry.io/5712866",
tracesSampleRate: 1.0,
environment: process.env... |
/**
* Returns joint index computed from {@code #toIndices} and if
* {@code removedJointIndexRef} is non-null and {@code #converter}
* has non-null for {@link JointDomainReindexer#getRemovedDomains()},
* this will compute a joint index from {@code #removedIndices} and set
* it in that {@code removedJointI... |
def update_info(self):
index = pd.MultiIndex(
levels=[[], []], labels=[[], []], names=['period', 'name'])
df = DataFrame(data=None, index=index)
norm_cols = ['{}_loading_norm_value'.format(f) for f in self.factors]
cols = self.factors + norm_cols
for t, (f, factor) in... |
// RenameFileInGuest rename a file in Guest OS.
func RenameFileInGuest(app, vmx, username, password, src, dst string) error {
if _, err := vmrun(app, "-gu", username, "-gp", password, "renameFileInGuest", vmx, src, dst); err != nil {
return err
}
return nil
} |
def __top_x_by_cat(self, sorted_items):
best_with_score = []
item_types = [
'container_course', 'container_workspace', 'engage_article', 'engage_microlearning', 'totara_playlist'
]
for i_type in item_types:
type_recommended = [(x[0], x[1]) for x in sorted_items if... |
<filename>packages/easy/test/ref/DevTable.ts<gh_stars>10-100
import { convert, Database, DefaultProvider, MapOptions, Table } from '../../src';
export class DevDatabase extends Database {
static readonly DevDB = new Database('DevDB', DefaultProvider);
}
export class DevTable extends Table {
readonly id = this.map... |
Not long before my wife and I had our first child, we had dinner with another married couple — both writers — who at the time had a toddler of their own. I asked them for some advice. Instead, they gave me a caution. "Don't write about your kid," they said. "Being a parent is going to change your life, and it's all you... |
def sll(vals: List) -> Optional[ListNode]:
if not vals:
return None
head = ListNode(vals[0])
if len(vals) > 1:
prev = head
for val in vals[1:]:
node = ListNode(val)
prev.next = node
prev = node
return head |
Multi-Feature Bio-Inspired Model for Scene Classification
A multi-feature bio-inspired model for scene image classification (MFBIM) is presented in this work; it extends the hierarchical feedforward model of the visual cortex. Firstly, each of three paths of classification uses each image property (i.e. shape, edge or... |
# -*- coding: utf-8 -*-
import pytest
import env # noqa: F401
m = pytest.importorskip("pybind11_tests.virtual_functions")
from pybind11_tests import ConstructorStats # noqa: E402
def test_override(capture, msg):
class ExtendedExampleVirt(m.ExampleVirt):
def __init__(self, state):
super(Ext... |
{-|
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] nen
[@Native name@] -
[@English name@] Nengone
-}
module Text.Numeral.Language.NEN.TestData (cardinals) where
--------------------------------------------------------------------------------
-- Imports
-------------------------------------... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define INFL 0x6fffffffffffffffLL
int main() {
ll a,b,c,d,h,i,j,k,l,m,n,v,w,x,y,z;
ll ans = 0;
string s;
cin >> s;
if (s[s.size()-1]=='s') s = s + "es";
else s = s + "s";
//vector<ll> aa(n);
//for(i=0;i<n;i++) cin >> aa[i];
//vector<ll> ... |
// find fs from udevadm info
func parseFS(output string) string {
m := parseUdevInfo(output)
if v, ok := m["ID_FS_TYPE"]; ok {
return v
}
return ""
} |
// sets up psplit, so split is performed with no
// user-requested operation
//
VOID BTISelectSplitWithOperNone( SPLIT *psplit, FUCB *pfucb )
{
if ( splitoperInsert == psplit->splitoper )
{
INT iLine = psplit->ilineOper;
for ( ; iLine < psplit->clines - 1 ; iLine++ )
{
psplit->rglineinfo[iLine] = pspl... |
25 Marble sized sphere th at, when placed in the mouth, a llows you to se e the visual output of nearby electronic devices in your mind. 26 Button that, wh en pressed, causes nearby computer systems to be able to feel pain. 27 Cylindrical electrical power source that feeds on nearby life (-1 Might point per hour). 28 R... |
.
OBJECTIVE
To assess the value of SYNTAX score to predict major adverse cardiac and cerebrovascular events (MACCE) among patients with three-vessel or left-main coronary artery disease undergoing percutaneous coronary intervention.
METHODS
190 patients with three-vessel or left-main coronary artery disease undergoi... |
/*
* Copyright 2014 <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 or agreed to in wr... |
package sqlite.feature.custombean.case2;
import java.util.Calendar;
import java.util.Date;
import com.abubusoft.kripton.android.sqlite.SQLitePopulator;
import com.abubusoft.kripton.android.sqlite.TransactionResult;
import android.support.annotation.NonNull;
import android.util.Log;
import sqlite.feature.custombean.c... |
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... |
n = int(input())
dollarBills = [100, 20, 10, 5, 1]
minBills = 0
for dollar in dollarBills:
minBills += n // dollar
n %= dollar
print(minBills) |
#include<stdio.h>
int l,r,k,d[1000001],D[10][1000001],i,j;
int f(int n){
if(n==0)return 1;
else return f(n/10)*((n%10)?n%10:1);
}
int g(int n){
if(n<1000000)if(d[n])return d[n];
if(n<10)return n;
if(n<1000000)return d[n]=g(f(n));
else return g(f(n));
}
int main(){
int T;
scanf("%d",&T);
for(i=1;... |
America, meet the Minnesota Vikings, the best team in the NFC North—both in record and in actuality. During the summer, many predicted the Vikings would take that Next Step under second-year coach Mike Zimmer. But no one forecast that a Week 10 victory at Oakland would be their seventh of the year. This morning, they l... |
import * as React from 'react';
import { Adsense } from '@client/services/service-proxies';
import { withNamespaces } from '@client/i18n';
const Fragment = React.Fragment;
interface Props {
adsense: Adsense[];
t: (key: string) => string;
}
interface State {}
class BaseRightSideBar extends React.PureComponent<Props... |
/****************************************************************************
* Name: sam_shutdown
*
* Description:
* Disable the USART. This method is called when the serial
* port is closed
*
****************************************************************************/
static void sam_shutdown(struct uart... |
/**
* Two subsequent builds should not change the last modified if none of the
* source inputs have been modified.
*
* @throws Exception
*/
public void testLastModified() throws Exception {
Workspace ws = getWorkspace("testresources/ws");
Project project = ws.getProject("p6");
File bnd = IO.getFile("t... |
/**
*
* @author Miguel Angel Diaz
*/
public class NotasServicios {
public Nota guardarNota(Nota n){
NotasDAO dao = new NotasDAO();
return dao.guardarNota(n);
}
public Nota getNota(Long idalu, Long idasig){
NotasDAO dao = new NotasDAO();
return dao.getNota(i... |
National and Northern New England Opioid Prescribing Patterns, 2013–2014
Objective
To evaluate current opioid prescribing patterns nationally and regionally across several northern New England states and compare with prescription data on an institutional level over a two-year period, between 2013 and 2014.
Design, S... |
/**
* Preprocessor to encrypted OutputStream using GPG codec
*
* This is backwards compatible with PGP algorithms
*
*/
public class GpgEncryptProcessor extends OutputStreamProcessor {
private static final String FILE_EXT = "gpg";
public StreamCodec getCodec() {
return codec;
}
public void setCodec(St... |
<reponame>juliomrqz/scrits-django<filename>angular/src/app/articles/articles-detail.component.ts<gh_stars>1-10
import { AfterViewInit, Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ArticlesService } from '../shared/backend/articles.service';
import { Artic... |
DOA Estimation of Distributed mmWave Radar System via Fast Iterative Adaptive Approach
In this paper, we propose a fast algorithm based on iterative adaptive approach to address the DOA estimation for the distributed mmWave radar system under the challenging conditions of a single snapshot and coherent sources. In ord... |
<filename>mgs/v1.2/ais_thread.py
#!/usr/bin/env python
#########################################
# Title: Rocksat Data Server Class #
# Project: Rocksat #
# Version: 1.0 #
# Date: August, 2017 #
# Author: <NAME>, KJ4QLP #
# Comment: Initial... |
def calc_mdl(yx_dist, y_dist):
prior = multinomLog2(y_dist.values())
prior += multinomLog2([len(y_dist.keys()) - 1, sum(y_dist.values())])
post = 0
for x_val in yx_dist:
post += multinomLog2([x_val.get(c, 0) for c in y_dist.keys()])
post += multinomLog2([len(y_dist.keys()) - 1, sum(x_val... |
As the IRS Threatens to Shut Down Medical Cannabis, a New Campaign Fights Back The 280E Reform effort plans to bring an end to the current IRS campaign to close medical cannabis dispensaries.
OAKLAND, CA — As the IRS threatens to turn back the clock on medical cannabis, a national alliance of industry leaders, patient... |
#include<stdio.h>
int main()
{
int a,d=0,m=0,i;
scanf("%d",&a);
double b[a];
int c[a];
for(i=0;i<a;i++)
{
scanf("%lf",&b[i]);
c[i]=b[i];
d=d+c[i];
}
/* for(i=0;i<a;i++)
{
printf("%d\n",c[i]);
}**/
// printf("d=%d\n",d);
i=0;
... |
#!/usr/local/bin/python
# encoding: utf-8
"""
*Send documents or webpage articles to a kindle device or app*
:Author:
<NAME>
:Date Created:
October 10, 2016
"""
################# GLOBAL IMPORTS ####################
import sys
import os
os.environ['TERM'] = 'vt100'
from fundamentals import tools
from .ebook im... |
<reponame>Blackbaud-ColbyWhite/skyux-flyout<filename>src/app/visual/flyout/flyout-modal.component.ts
import {
Component
} from '@angular/core';
import {
SkyModalInstance
} from '@skyux/modals';
@Component({
selector: 'sky-flyout-modal-demo',
template: `
<sky-modal>
<sky-modal-content>
Modal content...
... |
// Tries to repeatedly pause the game until it succeeds
void GeckoSafePauseCmd()
{
bool WasRunning = (GeckoStatus() == WiiStatusRunning);
while (WasRunning)
{
GeckoPauseCmd();
usleep(100000);
WasRunning = (GeckoStatus() == WiiStatusRunning);
}
} |
'To Pimp A Butterfly' Aspires To Be Music's Great American Novel
Enlarge this image toggle caption Christian San Jose/Courtesy of the artist Christian San Jose/Courtesy of the artist
When Kendrick Lamar released his major label debut in 2012, he vaulted onto pop's leaderboard as one of the best rappers of his generat... |
import { Request, Response } from 'express';
import { UNPROCESSABLE_ENTITY, INTERNAL_SERVER_ERROR, NOT_FOUND } from 'http-status-codes';
import logger from '../util/logger';
import { NotFoundError } from '../errors';
import { ValidationError } from '../errors';
/**
* Middlware for handling validation errors from cont... |
Addressing the Machine: Victorian Working-Class Poetry and Industrial Machinery
This article explores the representation of machinery by industrial workers in the Victorian period, and argues that their writings have a qualitatively different literary approach to machinery than that found in the work of established ... |
/**
* Created by IntelliJ IDEA.
* User: astoev
* Date: 2/12/12
* Time: 11:37 AM
*
* @author astoev
* @author jmitrev
*/
public class InfoActivity extends MainMenuActivity {
public static final String MIME_OPEN_DIRECTORY = "vnd.android.document/directory";
@Override
protected boolean showBaseOption... |
Electrical and Structural Properties of CuBa2LaCa2Cu4O11+δ Superconducting System
In this work, the superconducting CuBa2LaCa2Cu4O11+δ compound was prepared by citrate precursor method and the electrical and structural properties were studied. The electrical resistivity has been measured using four probe test to find ... |
<gh_stars>1-10
import { Block, TextField } from '@stage-ui/core'
import { useEffect, useState } from 'react'
import { context } from '../../../..'
import React from 'react'
let timer: NodeJS.Timeout | null = null
const TextControls = () => {
if (!context.tools.focused) {
return null
}
const [value... |
<reponame>gigaclood/phoenix
/*
* 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 ... |
// NewPhysicalHashJoin creates a new PhysicalHashJoin from LogicalJoin.
func NewPhysicalHashJoin(p *LogicalJoin, innerIdx int, useOuterToBuild bool, newStats *property.StatsInfo, prop ...*property.PhysicalProperty) *PhysicalHashJoin {
leftJoinKeys, rightJoinKeys, isNullEQ, _ := p.GetJoinKeys()
baseJoin := basePhysica... |
/**
* Test of getAllPaymentsByAccount method, of class ExpenseManagerImpl.
*/
@Test
public void testGetAllPaymentsByAccount_Long() {
System.out.println("getAllPaymentsByAccount");
Long accountId1 = new Long(5);
Long accountId2 = new Long(4);
Long subjectId = new Long(6);
... |
<reponame>iqoption/yabs<gh_stars>1-10
package format
import (
"io/ioutil"
"encoding/json"
"strconv"
"yabs/common/utils"
log "github.com/sirupsen/logrus"
)
type GPUInfo struct {
Vendor string `json:"vendor"`
Renderer string `json:"renderer"`
}
type Info struct {
Version string `json:"version"`
Browser st... |
// ConvertAddr converts legacy public key to XWC address
func ConvertAddr(buf []byte) (addr string) {
sum := sha512.Sum512(buf)
addrBuf := hash.Rmd160(sum[:])
addrBuf = append([]byte{0x35}, addrBuf...)
checksum := hash.Rmd160(addrBuf)[:4]
addrBuf = append(addrBuf, checksum...)
addr = "XWC" + base58.Encode(addrBuf... |
LOS ANGELES (Reuters) - A man arrested on Thursday for defacing Republican presidential nominee Donald Trump’s star on the Hollywood Walk of Fame in Los Angeles with a sledgehammer and a pickax said he did it because he was angry at the candidate.
James Otis, the man who admits vandalizing Donald Trump's star on the H... |
#ifndef TESTING_H
#define TESTING_H
#ifdef TESTING
#include <string>
#include <iostream>
#if defined(_WIN32) || defined(_WIN64)
#include <crtdbg.h>
#endif
using std::string;
struct CrtCheckMemory
{
#if defined(_WIN32) || defined(_WIN64)
_CrtMemState state1;
_CrtMemState state2;
_CrtMemState state3;
#endif
... |
def _GaeBuilderPackagePath(runtime):
return 'gcr.io/gae-runtimes/buildpacks/%s/builder:latest' % runtime |
import ExtendedClient from "../../src/Client/index";
import { GuildMember } from "discord.js";
class CheckRole {
idRolesWithPermission: string[];
guildMemberUser: GuildMember;
constructor(
private client: ExtendedClient,
guildMemberUser: GuildMember,
idRolesWithPermission?: string[]
) {
this.i... |
<gh_stars>100-1000
package com.github.czyzby.lml.uedi.music;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.scenes.scene2d.Action;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.github.czyzby.kiwi.util.common.Exceptions;
/** Allows to stop the chosen {@link Music} instance in {@link ... |
def write_json(input_path, input_data):
with open(input_path, 'w') as outfile:
json.dump(input_data, outfile) |
<gh_stars>0
package ru.sbtqa.tag.pagefactory.transformer;
import cucumber.api.Transformer;
import ru.sbtqa.tag.pagefactory.transformer.enums.ClickVariation;
public class ClickVariationTransformer extends Transformer<ClickVariation> {
@Override
public ClickVariation transform(String value) {
return Cl... |
Pope Francis speaks during his general audience at St Peter's square on June 11, 2014 at the Vatican. AFP PHOTO / VINCENZO PINTO (Photo credit should read VINCENZO PINTO/AFP/Getty Images)
The global economic system is near collapse, according to Pope Francis.
An economy built on money-worship and war and scarred by y... |
Chapter 22. Long-lived Spin Order in CH2D Groups
The ubiquitous nature of methyl groups makes the potential exploitation of methyl long-lived states particularly attractive. However, access to methyl group long-lived states is only provided by inefficient cross-relaxation processes that greatly reduce the available in... |
MSNBC's Rachel Maddow said Friday that deceased Fox News head Roger Ailes once offered to hire her "so no one else could put her on."
“He would just hire me so no one else could put me on,” Maddow told SiriusXM radio host Howard Stern. “I was like, ‘So, you’d pay me a full contract to not work?'”
“Would you consider ... |
The Value of Photo Biological Regulation Based on Nano Semiconductor Laser Technology in the Treatment of Hypertension Fundus Disease.
With the development of nanometer semiconductor laser technology, due to the wide range of photobiological regulation and non-invasive advantages, it is widely used in clinical researc... |
<filename>min3d-source/min3d/core/Vertices.java
package min3d.core;
import min3d.vos.Color4;
import min3d.vos.Number3d;
import min3d.vos.Uv;
public class Vertices
{
private Number3dBufferList _points;
private UvBufferList _uvs;
private Number3dBufferList _normals;
private Color4BufferList _colors;
... |
// generate the opcode function name
func opcodeFuncName(code uint8) string {
x := opcodeLookup(code)
if x.ins == "ill" {
return "opXX"
}
return fmt.Sprintf("op%02X", code)
} |
<commit_msg>Exclude user from to string
<commit_before>package ee.tuleva.onboarding.aml;
import ee.tuleva.onboarding.user.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import javax.persistence... |
Charlie Wilson, Cleveland Larkin, and Willustus “Lusk” Holley were walking down a dirt road in rural Slocum, Texas when they were blindsided by a mob of armed white men. On their way to tend to family livestock on July 29, 1910, the three black teenagers became the first casualties of what would turn out to be a shamef... |
package libraryManager;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import models.Book;
import models.Dvd;
import play.mvc.BodyParser;
import play.mvc.Controller;
import play.mvc.Result;
import service.Bo... |
<filename>cmd/discover/main.go
package main
import (
"errors"
"flag"
"fmt"
"go/ast"
"go/format"
"go/token"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/eandre/discover"
"golang.org/x/tools/cover"
)
func usage() {
fmt.Fprintf(os.Stderr, `Usage: \n\ndiscover [flags] command [<args>...... |
#include "RecoLuminosity/LumiProducer/interface/LumiCorrector.h"
/**
these are corrections including unit conversion /mb to /ub
if unit is already /ub, use e-03
**/
LumiCorrector::LumiCorrector() {
Occ1Norm_ = 6.36e3; // For 2.76TeV 1.34e3, for HI 2.214e6
Occ2Norm_ = 7.97e3;
ETNorm_ = 1.59e3;
PUNorm_ = 6.37e3... |
def resource(self):
resource = self._get_resource()
if resource and resource.exists():
return resource |
/**
* Defines the 'role' of a Druid service, utilized to strongly type announcement and service discovery.
*
* Originally, this was an enum to add type safety for discovery and announcement purposes, but was expanded
* into a class to allow for extensibility while retaining the type safety of using defined types in... |
/*----------------------------------------------------------------------------
> Function Name: RtStatus_t ExtractPath(uint8_t *filepath,int32_t *index)
FunctionType: Reentrant
Inputs: 1) Pointer to filepath
2) Pointer to index
Outputs: Returns SUCCESS or... |
// ==============================================================================================
// pidynbotsShutdownCB
//
// This callback is invoked whenever a game shutdown is detected, typically as a result of
// restart request, or operator terminating the server. This event is not a SISSM shutdown.
//
int... |
/**
* The bullet data in an attacking, including its track, top point's coordinate
* @author wangqi
*
*/
public class BulletTrack {
public int roundNumber = 0;
public int startX = 0;
public int startY = 0;
public int wind = 0;
public int power = 0;
public int angle = 0;
//The bullet hit point's coordinate
... |
/**
* Created by zhoumy on 2017/2/6.
*/
@Service("trafficPolicyValidator")
public class DefaultTrafficPolicyValidator implements TrafficPolicyValidator {
@Resource
private SlbTrafficPolicyMapper slbTrafficPolicyMapper;
@Resource
private PathValidator pathValidator;
@Resource
priva... |
One person has died and four were injured Tuesday after an explosion at an Army ammunition plant in Missouri, officials said.
The explosion took place in a mixing building at Lake City Army Ammunition Plant in Independence, Missouri at approximately 1 p.m.
One worker was killed and four were treated at the scene but ... |
/* eslint-disable @typescript-eslint/no-unused-expressions */
/* eslint-disable max-len */
import { expect } from "chai";
import { run_program, h, KEYWORD_TO_ATOM, OPERATOR_LOOKUP, SExp, t, CLVMObject, Tuple, Bytes } from "clvm";
import { bytes } from "../../../util/serializer/basic_types";
import { ConditionsDict, SEx... |
/**
* @author Lee Rhodes
* @author Kevin Lang
*/
class HeapAuxHashMap implements AuxHashMap {
private final int lgConfigK; //required for #slot bits
private int lgAuxArrInts;
private int auxCount;
private int[] auxIntArr; //used by Hll4Array
/**
* Standard constructor
* @param lgAuxArrInts the log s... |
/**
\brief Writing info on original (node-based) nodes
*/
void extractor::WriteNodeMapping(const std::vector<QueryNode> &internal_to_external_node_map)
{
boost::filesystem::ofstream node_stream(config.node_output_path, std::ios::binary);
const unsigned size_of_mapping = internal_to_external_node_map.size();
... |
package response
type WebLink struct {
Name string `json:"name"`
Url string `json:"url"`
OriginUrl string `json:"origin_url"`
Content string `json:"content"`
}
|
<gh_stars>0
use crate::app;
use ash::version::DeviceV1_0;
use ash::vk;
pub fn update_descriptor_set(
app_data: &app::AppData,
vulkan_data: &app::VulkanInitData,
resource_index: usize,
) {
let device = vulkan_data.get_device_ref();
let set = app_data.descriptor_sets[resource_index];
let buffer_... |
<reponame>Eric-Arellano/rust
// run-pass
macro_rules! make_foo {
() => (
struct Foo;
impl Foo {
fn bar(&self) {}
}
)
}
make_foo!();
pub fn main() {
Foo.bar()
}
|
import re
from . import base
class regex_search_ternary(base.Function):
"""
Ternary regex operator, it takes arguments in the following form
STR1, REGEX, STR2, STR3
If REGEX matches STR1 (re.search is used), STR2 is returned,
otherwise STR3 is returned
"""
def __init__(self):
# 4 arguments
super(regex_searc... |
/**
*
* Maintains a list of topics
*
* @author wyatt
*
*/
public class TopicListViewAdapter extends PostListViewAdapter<TopicModel> {
public TopicListViewAdapter(FragmentActivity theActivity,
PostModelList<TopicModel> arrayList) {
super(theActivity, arrayList);
}
/*
* (non-Javadoc)
*
* @see
... |
Neil Kopit is a marketing director with the Ourisman car dealership. Its Tenleytown business is leaving the District for Bethesda. (Bonnie Jo Mount/The Washington Post)
One glance at the Ourisman Volkswagen’s showroom in Tenleytown helps explain why traditional car dealerships will soon be a thing of the past in the D... |
from unittest import TestCase
from unittest.mock import patch
from nose.tools import istest
from convertfrom.main import convert, main
class EntryPointTest(TestCase):
@istest
@patch('convertfrom.main.sys')
@patch('convertfrom.main.print')
@patch('convertfrom.main.convert')
def prints_converted_r... |
//This class is used to make the sell order Priority Queue,which overwrite the compare method
public class Sellorder implements Comparable <Sellorder>{
public Integer Price;
public Integer Amount;
public String ID;
public Integer getPrice() {
return Price;
}
public void setPr... |
<reponame>Epsilon-Infinity/QRE2020<filename>just_sort.py
import utils
from copy import deepcopy
from collections import defaultdict
# {'book_scores':book_scores, days:'days', 'libraries':libraries}
def solver(inputs):
books_so_far = set()
libraries = inputs["libraries"]
# sort libraries
libraries = ... |
#include "Validation/MuonGEMDigis/interface/GEMStripDigiValidation.h"
#include "Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h"
#include "Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h"
#include "Validation/MuonGEMDigis/interface/GEMDigiTrackMatch.h"
#include "Validation/MuonGEMDigis/interface/GEM... |
// In the name of God
// Code by: mrMaster
#include <bits/stdc++.h>
using namespace std;
#define bpc __builtin_popcount
#define blz __builtin_clz
#define btz __builtin_ctz
#define boost ios_base :: sync_with_stdio(false) , cout.tie(0) , cin.tie(0)
#define endl '\n'
typedef long long ll;
typedef long double ld;
typ... |
/*****************************************************************************/
/**
*
* This function gets the acknowledge flag
*
* @param InstancePtr is a pointer to the XV_HdmiTx core instance.
*
* @note None.
*
******************************************************************************/
int XV_HdmiTx_DdcGe... |
n,i=raw_input().split();
n=int(n);
i=int(i);
if(i%2==0):
i=n+1-i;
print (i/2)+1;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.