content stringlengths 10 4.9M |
|---|
/**
* Builds the triangle based on specified side lengths.
*
* @param inputReader the implementation used to read input
* @return a new {@link Triangle} instance
*/
static Triangle buildTriangle(InputReader inputReader) {
if (inputReader == null) {
throw new IllegalArgumentException("InputReader cannot ... |
def build_doctype_map(self):
self.doctype_map = {}
active_domains = frappe.get_active_domains()
all_doctypes = frappe.get_all("DocType", fields=["name", "in_create", "module", "istable", "issingle", "read_only", "restrict_to_domain"])
for dt in all_doctypes:
if not dt.restrict_to_domain or (dt.restrict_to_do... |
//------------------------------------------------------------------------------
// GB_enumify_identity: return ecode for identity value of an operator
//------------------------------------------------------------------------------
void GB_enumify_identity
(
int *ecode,
GB_Opcode opcode, ... |
package com.chooloo.www.callmanager.database.dao;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import com.chooloo.www.callmanager.database.entity.CGroup;
import java.util.List;
@Dao
public interface CGroupDao {
@Insert
long[] insert(... |
// It also distributes work to free threads, based on max. thread number (meant for large files)
public void run(char[] password) {
if (!this.gpg) {
CipherStream my_threads[] = new CipherStream[this.numThreads];
int count = 0, savecount = 0, size = (this.in == null) ? -1 : this.in.length... |
class UnsupportedAttribute:
"""Class which is used to create attributes which are not supported.
This is used for attributes like "fileobj" for downloads which are not
supported with QtWebengine.
""" |
Automatically increasing the fault-tolerance of distributed systems
The design of fault-tolerant distributed systems is a costly and diflicult task. Its cost and difficulty increase dramatically with the severity of failures that a system must tolerate. We seek to simplify this task by developing methods to automatica... |
<reponame>Nomadw/SpherePrototype
#include "Globals.h"
#include "MainObject.h" //Class variables and functions declared in MainObject.h
//All MainObject functions defined here
//Constructor - All other contructors based off this one
MainObject::MainObject()
{
//Sets all base values
show = true;
collidable = true;... |
/**
* This class manages the launching of the whole cognitive system
*
* @author wendt
*
*/
public class LauncherMQTTPerformanceTest {
private final static Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final DPBuilder dpb = new DPBuilder();
private SystemControllerImpl co... |
Alasdair Gray, the leading Scottish writer and painter, is seriously ill in hospital after a fall in the early hours of this morning.
He is currently in hospital with what is believed to be a broken back and serious injuries to his legs and his head.
The incident occurred at 2am outside his house in the west end of G... |
<filename>devand-crypto/src/lib.rs
mod email_verification_token;
mod password_reset_token;
mod signed_token;
pub use email_verification_token::EmailVerification;
pub use password_reset_token::PasswordReset;
pub use signed_token::{Decoder, Encoder, Signable, SignedToken};
|
/**
* ${PEOJECT_NAME}
* Created by Administrator on 2017/4/24.
*/
public class CheckOrderFragmentsBiz {
private CheckOrderFragment checkOrderFragment;
/**
* 网络订单审核的标记
*/
private final String mUpdateAudit="UpdateAudit";
public CheckOrderFragmentsBiz(CheckOrderFragment checkOrderFr... |
<reponame>Pradeep-selva/breaddit
export { default as Navbar } from "./Navbar";
export { default as TrendingPostCard } from "./TrendingPostCard";
export { default as Avatar } from "./Avatar";
export { default as TextInput } from "./TextInput";
export { default as AddPost } from "./AddPost";
export { default as TabPanel ... |
import * as XrmMock from "../xrm-mock/index";
import { UiMock } from "../xrm-mock/ui/ui.mock";
import Ui from "./ui";
export default class FormContext {
public static createFormContext(entity?: XrmMock.IEntityComponents, ui?: XrmMock.IUiComponents,
process?: Xrm.ProcessFlow.Proc... |
<gh_stars>0
import { Injectable, Inject } from '@angular/core';
import { CurrentUser } from '../models/current-user.model';
import { HttpClient } from '@angular/common/http';
import * as parseUri from 'parse-uri';
import { ModConfig } from '../static/mod-config.const';
import { ModFrameworkConfig } from '../models/mod... |
import { Detail, useNavigation } from "@raycast/api";
import { FormulaActionPanel } from "./actionPanels";
import { Formula, brewIsInstalled, brewPrefix } from '../brew';
export function FormulaInfo(props: {formula: Formula, onAction: (result: boolean) => void}) {
const { pop } = useNavigation();
return (
<De... |
<filename>src/main/java/com/efp/plugins/project/coder/generator/ControllerGenerator.java
package com.efp.plugins.project.coder.generator;
import com.efp.common.constant.TemplateFileNameEnum;
import com.efp.plugins.project.coder.bean.GenerateInfo;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs... |
def assertion(method: str, message: str) -> D:
def decorator(function: F) -> F:
@wraps(function)
def wrapper():
try:
assert(getattr(this, method)())
except AssertionError as error:
raise ParallelError(message) from error
return cast(F, ... |
// SetDisplayName sets the displayName property value. A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only.
func (m *OutlookCategory) SetDisplayName(value *string)() {
if m != nil {
m.displayName = value
}
} |
def _crc_sign_full_packet_com_key(data: str) -> str:
try:
crc = hexlify(pack(">I", crc_hqx(unhexlify(data), 0x1021))).decode(
ENCODING_CODEC
)
data = data + crc[6:8] + crc[4:6]
crc = (
crc[6:8] + crc[4:6] + (hexlify(REMOTE_KEY)).decode(ENCODING_CODEC)
... |
# Copyright (c) 2020-2021, NVIDIA CORPORATION.
#
# 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 agre... |
A federal judge has extended an injunction blocking Maui County’s voter-approved moratorium on genetically engineered farming from going into effect for at least another three months.
U.S. District Court Chief Judge Susan Mollway based her decision on two bills introduced in the Legislature this session that sought to... |
/* Initialize the PAPI plugin; register the plugin hook to the plugin manager */
extern int
init_mf_plugin_papi(PluginManager *pm)
{
PluginManager_register_hook(pm, "mf_plugin_papi", mf_plugin_papi_hook);
conf_data = malloc(sizeof(mfp_data));
mfp_get_data_filtered_by_value("mf_plugin_papi", conf_data, "on"... |
/**
*
* @author Tomasz Zielinski <tomasz.zielinski@ed.ac.uk>
*/
public class TransposableImportException extends ImportException {
final String msg;
final Integer row;
final Integer col;
public TransposableImportException(String msg, Integer row, Integer col) {
supe... |
<reponame>victorhck/nanonote
#ifndef MOVELINEEXTENSION_H
#define MOVELINEEXTENSION_H
#include "TextEdit.h"
#include <memory>
class Action;
class MoveLinesExtension : public TextEditExtension {
Q_OBJECT
public:
explicit MoveLinesExtension(TextEdit* textEdit);
~MoveLinesExtension();
void aboutToShowE... |
<reponame>lubianat/complex_bot
from shexer.model.IRI import IRI
from shexer.model.property import Property
from shexer.model.Literal import Literal
from shexer.model.bnode import BNode
from shexer.utils.uri import remove_corners, parse_literal, parse_unquoted_literal, FLOAT_TYPE, INTEGER_TYPE
def check_if_prop... |
This email has also been verified by Google DKIM 2048-bit RSA key
Daily Media Report 7.6.15
From:mcantrell@hillaryclinton.com To: HRCRapid@hillaryclinton.com, jpalmieri@hillaryclinton.com, jmcclain@hillaryclinton.com, kschake@hillaryclinton.com, mthatcher@hillaryclinton.com Date: 2015-07-06 20:44 Subject: Daily Media... |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, cast, Dict, List, Optional, TypeVar
import torch
from torchrec.... |
def from_pyval(pyval, device=0, backend=None):
backend = backend or _get_default_local_backend()
pyval = require_numpy_array_layout(pyval)
cbuf = backend.buffer_from_pyval(pyval, device)
return LocalBuffer(cbuf, backend, device) |
// createDefaultConfig creates a default ./romie/config.yml entry
func createDefaultConfig() {
romieDir := config.GetDefaultConfigPath()
if err := downloadFile("config.yml", config.GetDefaultConfigURL(), romieDir, 1, 1); err != nil {
logrus.Errorf("Failed to download config.yml\n")
logrus.Errorf("Error: %q\n", er... |
class kazoe:
def __init__(self,b):
b.sort()
self.b = b
def sum(self):
c = [0] *4
for i in range(len(self.b)):
if(self.b[i] == "AC"):
c[0] += 1
else:
if(self.b[i] == "TLE"):
c[1] += 1
els... |
/**
* @author tyrantqiao
* @date 2020/1/6
* email tyrantqiao@gmail.com
*/
public class AllArrange {
/**
* 理解为三个人ABC拍照
* ABC 拍照
* B和C 换位
* ACB 拍照
* B和C 换位
* ABC
* A和C 换位
* CBA 拍照
* B和A 换位
* CAB 拍照
* AB 换位
* CBA
* C和A 换位
* ABC
*
* @p... |
Paul Dacre, the editor-in-chief of the Daily Mail, is to stand down as chair of a committee that governs journalists’ code of conduct before a government review of press regulation.
His departure after eight “turbulent” years for the industry comes after an external review of the press regulator Ipso recommended that ... |
def reset_algorithm(self, refresh_map: bool = False) -> None:
if refresh_map:
if self.map is not None:
self.map.reset()
self.map = copy.deepcopy(self._services.settings.simulator_initial_map)
elif self.map is None:
return
else:
self... |
package org.bndly.pdf.layout;
/*-
* #%L
* PDF Document Printer
* %%
* Copyright (C) 2013 - 2020 Cybercon GmbH
* %%
* 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://ww... |
/**
* A reference token representing a hyphen.
*
* @author leadpony
*/
private static class HyphenToken extends KeyToken {
HyphenToken() {
super("-");
}
@Override
public JsonArray add(JsonArray target, JsonValue value) {
JsonArrayBuilderImpl ... |
import numpy as np
from scipy.spatial import distance
n = int(input())
xy = []
for _ in range(n):
x, y = map(int, input().split())
xy.append([x, y])
dist_M = distance.cdist(xy, xy, metric='euclidean')
print(np.sum(dist_M)/(n)) |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Component, Directive, ElementRef, HostBinding, Input, ViewChild} from '@angular/core';
import {ngDevModeReset... |
The 2018 Inc. 5000
The fastest-growing companies in America are a force, notching collective revenue of more than $206.2 billion in 2017 and three-year revenue growth rates that top out at 75,661 percent. Explore the list.
Note: Flexport tied with GForce Life Sciences for No. 8 on the 2018 Inc. 5000. It was listed in... |
def add_all_pairs(bond_dataframe,structure_dict):
iadd = -1
new_data = collections.defaultdict(list)
for molecule_name in bond_dataframe["molecule_name"].unique():
n_atom = len(structure_dict[molecule_name]["symbols"])
for iatom1,iatom0 in itertools.combinations(range(n_atom),r=2):
... |
<filename>src/web/uploader.tsx
import { Upload, UploadProps } from "antd";
const { Dragger } = Upload;
import { InboxOutlined } from "@ant-design/icons";
import React, { Component } from "react";
import { UploadFile } from "antd/lib/upload/interface";
import { ipcRenderer } from "electron";
import { Channal } from "../... |
Review Recommendation for Points of Interest's Owners
Websites that provide reviews for services and products deal with big volumes of data (many users writing many reviews for many items). Then, recommendation algorithms come to the rescue in matching reviews to the consumers who are reading them. Such online review ... |
// ____ _ __ _
// | _ \(_)/ _| | |
// | |_) |_| |_ _ __ ___ ___| |_
// | _ <| | _| '__/ _ \/ __| __|
// | |_) | | | | | | (_) \__ \ |_
// |____/|_|_| |_| \___/|___/\__| 2018 - 2019
//
//
// This file is distributed under the MIT License (MIT).
// See LICENSE.txt for details.
/... |
import { GraphQLInputFieldConfig, GraphQLInputFieldConfigMap } from 'graphql'
import { acceptFieldVisitor, getEntity } from '@contember/schema-utils'
import { GqlTypeName } from '../utils'
import { Acl, Model } from '@contember/schema'
import Authorizator from '../../acl/Authorizator'
import singletonFactory from '../.... |
// ValidatePath implements BuildPath interface and validates
// that the referenced strategy exists. This applies to both
// namespaced or cluster scoped strategies
func (s Strategy) ValidatePath(ctx context.Context) error {
var (
builderStrategy build.BuilderStrategy
strategyExists bool
err error
... |
<gh_stars>1-10
import engine.animation
import engine.event
import engine.inputadapter
import engine.game
import engine.gui
import engine.loader
import engine.tween
|
A lot of young people are angry at what they see as an older generation robbing them of their future by voting to leave the EU. But it’s not the future, it’s now – figures this week reveal just how much of the national pie is being taken by today’s retired people.
In 1994-95 the median net income of the average pensio... |
o, e = [input() for i in range(2)]
string = []
for i in range(len(e)):
string.append(o[i] + e[i])
if len(o) != len(e):
string.append(o[-1])
print(''.join(string)) |
/**
* Created by Jonathan on 12/2/2016.
*/
@Autonomous(name="No Gyro Test", group="Autonomous")
@Disabled
public class OpModeNoGyro extends LinearOpMode {
@Override
public void runOpMode() throws InterruptedException {
//MoveNoGyro.initialize(hardwareMap.dcMotor.get("motor_1"), hardwareMap.dcMotor.g... |
WOMEN’S EMPOWERMENT THROUGH CANVAS BUSINESS MODEL
Increasing population in a country, especially in developing countries, has an impact on various aspects, one of them is social impact. The emergence of criminality, acts of violence, sexual harassment is phenomenon which is part of a development, including violence ag... |
def readMode(self, device):
self.enable11n = False
self.enable11ac = False
if device.htmode is None:
return
if device.htmode.startswith("HT"):
self.enable11n = True
elif device.htmode.startswith("VHT"):
self.enable11n = True
self.en... |
/**
* An ImageIO.read() replacement, which in tests can be up to 15x faster. This has shown to significantly improve
* the OCR's performance both in training and actual usage.
*
* @param input The file to read
* @return The BufferedImage of the file
* @throws IOException If there are issue... |
/** Test of parsing and executions of BNF expressions an assignment commands.
* @author Vaclav Trojan
*/
public class TestExprCompiler {
public TestExprCompiler() {super();}
/* Value types. */
static final int TYPE_VOID = 0;
static final int TYPE_BOOLEAN = 1;
static final int TYPE_INT = 2;
static final int TY... |
/**
* Utility functions to count the number of distinct values in an array.
*/
static inline int _offset_of(
const unsigned int val, const unsigned int *buf, int len ) {
while( len-- > 0 ) if( buf[len] == val ) break;
return len;
} |
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import java.util.List;
import java.util.Map;
import net.sourceforge.pmd.RuleContext;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.java.ast.ASTAllocat... |
/*
* Copyright 2018-2020 TON DEV SOLUTIONS LTD.
*
* Licensed under the SOFTWARE EVALUATION License (the "License"); you may not use
* this file except in compliance with the License.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASI... |
import { EventEmitter } from 'events';
import { injectable } from 'inversify';
import 'reflect-metadata';
import { CancellationToken, Disposable, Uri } from 'vscode';
import { createDeferred, Deferred } from '../../client/common/helpers';
import { Product } from '../../client/common/installer';
import { IServiceContain... |
// Package version is used as a place, where application version defined.
package version
import "strings"
// version value will be set during compilation.
var version = "v0.0.0@undefined"
// Version returns version value (without `v` prefix).
func Version() string {
v := strings.TrimSpace(version)
if len(v) > 1 ... |
/**
* Custom serializable write function
* @param o
* @throws IOException
*/
private void writeObject(ObjectOutputStream o)
throws IOException {
byte[] imageInByte;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(this.source, "jpg", baos);
baos.f... |
In its latest attempt to derail the plain cigarette packaging legislation, Big Tobacco has pulled out one of its favourite pro-tobacco messages: say no to a nanny state.
The print advertisements and website ask, “Do you really like living in a nanny state?” and explain, “The government doesn’t believe you can make you... |
def save_matrix(filename,
matrix,
minimum_value=None,
maximum_value=None,
colormap='magma',
is_colorbar=True):
figure = plt.figure()
noninf_mask = matrix != float('inf')
if minimum_value is None:
minimum_value = np.quant... |
// Append It appends the value into existing object like as append a value into array
func (cm *ConcurrentMap) Append(handler AppendHandler) {
cm.lock.Lock()
defer cm.lock.Unlock()
cm.m = handler(cm.m)
} |
/**
* Command for purging the data of players which have not been online for a given number
* of days. Depending on the settings, this removes player data in third-party plugins as well.
*/
public class PurgeCommand implements ExecutableCommand {
private static final int MINIMUM_LAST_SEEN_DAYS = 30;
@Injec... |
<gh_stars>0
package space.bbkr.shulkercharm;
import blue.endless.jankson.Jankson;
import blue.endless.jankson.JsonElement;
import blue.endless.jankson.JsonObject;
import io.github.cottonmc.jankson.JanksonFactory;
import io.github.ladysnake.pal.AbilitySource;
import io.github.ladysnake.pal.Pal;
import net.fabricmc.api.... |
<filename>jhc-core/src/E/TypeAnalysis.hs
-- | examine all uses of types in a program to determine which ones are
-- actually needed in the method generation
module E.TypeAnalysis(typeAnalyze, Typ(),expandPlaceholder) where
import Control.Monad.Error
import Control.Monad.Identity
import Control.Monad.State
import Data... |
<filename>prompt.go<gh_stars>0
package main
import (
"bufio"
"os"
"strings"
"golang.org/x/term"
)
func promptPassword(hint string) (string, error) {
os.Stdout.WriteString(hint)
buf, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return "", err
}
return string(buf), err
}
func prompt(hint st... |
/**
* @author Gary Russell
* @since 2.2.4
*
*/
public class ConcurrentMessageListenerContainerMockTests {
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testCorrectContainerForConsumerError() throws InterruptedException {
ConsumerFactory consumerFactory = mock(ConsumerFactory.class);
final... |
A man has set fire to his house after trying to get rid of an ants nest by dousing it with petrol and lighting it.
The incident in Rotherham, South Yorkshire, follows a similar blaze earlier this week in Bridgend, South Wales, when a man managed to start a fire at his home as he tried to kill a spider with an aerosol ... |
#include "common/types.h"
#include "init/initcall.h"
#include "arch/gdt.h"
#include "arch/idt.h"
#include "arch/proc.h"
#include "mm/mm.h"
#include "mm/cache.h"
#include "sched/proc.h"
#include "sched/sched.h"
#include "log/log.h"
processor_t *bsp;
static DEFINE_LIST(procs);
DEFINE_PER_CPU(processor_t *, this_proc);
... |
import { Injectable, InternalServerErrorException, HttpStatus, HttpException, BadRequestException, ConflictException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { DeleteResult } from 'typeorm';
import { FollowerRepository } from './follower.repository';
import { PaginationGetFi... |
package cn.xz.sample;
import org.junit.BeforeClass;
import org.junit.Test;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.FileNo... |
// Copyright 2021 Google LLC. 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.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
<gh_stars>1000+
package generator
import (
"fmt"
"os"
"path/filepath"
"github.com/spf13/viper"
)
// LanguageDefinition in the configuration file.
type LanguageDefinition struct {
Layout SectionOpts `mapstructure:"layout"`
}
// ConfigureOpts for generation
func (d *LanguageDefinition) ConfigureOpts(opts *GenOpt... |
/**
* Maps to the table used it issue row IDs for TableEntities
*
* @author jmhill
*
*/
public class DBOTableIdSequence implements MigratableDatabaseObject<DBOTableIdSequence, DBOTableIdSequence> {
private static FieldColumn[] FIELDS = new FieldColumn[] {
new FieldColumn("tableId", COL_ID_SEQUENCE_TAB... |
<reponame>johnomotani/optionsfactory
"""Some common checks that can be imported for clarity
"""
def is_positive(x):
try:
return x > 0
except TypeError:
return False
def is_positive_or_None(x):
if x is None:
return True
return is_positive(x)
def is_non_negative(x):
try:
... |
n, k = map(int, raw_input().split())
a = map(int, raw_input().split())
b = len([i for i in a if i > 0])
c = [i+1 for i in range(n) if a[i]==a[k-1]]
print min(b, c[-1]) |
n, m = map(int, input().split())
b = list(map(int, input().split()))
ans = 0
frq = dict()
for i in range(1, m+1):
frq[i] = b.count(i)
b.sort(reverse=True)
x = -1
past = 0
for j, i in enumerate(b):
if i != x:
past = len(b[j:]) - frq[i]
x = i
ans += past
#print(n - fr... |
def tangoMachineToInstance(self, vm):
instance = Instance()
instance.cores = vm.cores
instance.memory = vm.memory
instance.disks = [DiskConfiguration(d={"uri": vm.image, "persistent": False})]
instance.name = self.instanceName(vm.id, vm.name)
instance.userId = 42
... |
#include<stdio.h>
typedef long long int lli;
int main () {
lli t, a;
scanf ("%lld %lld", &t, &a);
lli mid = (t % 2 == 0)? (t / 2) : ((t + 1) / 2);
lli ans = (a > mid)? (a - mid) * 2 : (2 * a) - 1;
printf ("%lld\n", ans);
return 0;
} |
// insertWithLock insert record and locker by self
func (r *DBCompensator) insertWithLock(ctx context.Context, tasks ...*Task) (int64, error) {
beans := make([]interface{}, 0)
for _, task := range tasks {
task.ID = uuid.NewString()
task.TimeStamp = time.Now().Unix()
task.Locker = task.ID
task.LockExpire = tas... |
def load_params(input_file):
params = fn.read_input_file(input_file)
p = {}
p['input_name'] = params['input_name']
p['eta_i'] = float(params['eta_i'])
p['eta_o'] = float(params['eta_o'])
p['L'] = float(params['L'])
p['R_o'] = conv.um_2_m*float(params['R_o'])
sd = int(params['selem_dim']... |
Book Reviews : Son of Man Inadequately Surveyed
attempts a Forschzmgsberichte of the Son of Man problem from the patristic period onwards. The early chapters provide useful information for scholars interested in the history of exegesis. Chapter 1, ’Genealogical Interpretations’, surveys western interpreters who argued... |
Assessing Photocatalytic Activity at the Nanoscale Using Integrated Optical and Electron Microscopy
An integrated optical‐electron microscope is presented that enables the in situ study of dynamic processes on photoactive materials. Here, the deposition of metallic silver nanostructures at ZnO photocatalyst particles ... |
#[allow(unused_imports)]
use std::ops::Index;
#[allow(unused_imports)]
use std::ops::IndexMut;
#[allow(unused_imports)]
use std::ops::Div;
#[allow(unused_imports)]
use std::ops::Mul;
use quat::Quat;
#[derive(Debug, Copy, Clone)]
pub struct DualQuat < T > {
pub _rot: Quat< T >,
pub _tra: Quat< T >,
}
macro_ru... |
/// Below that value, the gradient contains various shades of blue.
public void buildTerrainGradient() throws ExceptionInvalidParam {
clearGradient();
gradient.addGradientPoint(-1.00, new ColorCafe(0, 0, 128, 255));
gradient.addGradientPoint(-0.20, new ColorCafe(32, 64, 128, 255));
gradi... |
// lcp calculates the longest common prefix of the input strings.
func lcp(strs [][]rune) string {
if len(strs) == 0 {
return ""
}
for i, c := range strs[0] {
for _, s := range strs[1:] {
if i == len(s) || s[i] != c {
return string(strs[0][:i])
}
}
}
return string(strs[0])
} |
No Evidence for a Direct Vasodilatory Effect of Celiprolol on Human Vasculature In Vivo or In Vitro
Summary Celiprolol is reported to be a new cardioselective p blocker with novel ancillary properties including vasodilator effects. The purpose of this study was to investigate whether celiprolol possesses a direct vaso... |
package cache
import (
"net/http"
"net/url"
"os"
"sync"
"time"
"github.com/adhocore/urlsh/model"
"github.com/gomodule/redigo/redis"
)
var once sync.Once
var pool *redis.Pool
var prefix = "url:"
func connect() {
dsn := os.Getenv("REDIS_URL")
if dsn == "" {
dsn = os.Getenv("HEROKU_REDIS_MAUVE_URL")
}
if ... |
Integral Analysis of RCA of Irkutsk Region Companies
. The financial position of a company depends on its liquidity, or otherwise, on how soon the funds invested in the assets turn into real money. The growth of non-payments complicates the company's rhythmic activities (purchase of raw materials, payment of labor and... |
// Copyright (C) 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "util/avx512-util.hpp"
namespace intel {
namespace hexl {
#ifdef HEXL_HAS_AVX512DQ
// ************************************ T1 ************************************
// ComplexLoadFwdInterleavedT1:
// Assumes Complex... |
/**
* Sous-classe de JDesktopPane qui permet la gestion de plusieurs ChronicleView.
*
* @author <a href="mailto:carlos.miranda_lopez@insa-rouen.fr">Carlos Miranda</a>
*/
public class ChronicleDesktop extends JDesktopPane {
private static final long serialVersionUID = 1L;
public void addChronicleView(... |
/** Tests the ArrayRingBuffer class.
* @author Josh Hug
*/
public class TestArrayRingBuffer {
@Test
public void someTest() {
ArrayRingBuffer<Double> arb = new ArrayRingBuffer<>(10);
}
@Test
public void testEnqueueDequeue() {
ArrayRingBuffer<Integer> arb = new ArrayRingBuffer<>(5)... |
/**
* @ingroup finsh
*
* This function returns current finsh shell input device.
*
* @return the finsh shell input device name is returned.
*/
const char *finsh_get_device()
{
RT_ASSERT(shell != RT_NULL);
return shell->device->parent.name;
} |
// details outputs details for a single transaction.
func (w *walletAPIHandler) details(ctx context.Context, c Call, wr io.Writer) error {
var opts txIDOptions
if err := unmarshalOptions(c, &opts); err != nil {
return w.encodeErr(c, err, wr)
}
detail, err := w.cli.PaymentDetailCLILocal(ctx, opts.TxID)
if err != ... |
If you were one of the diehard fans who stuck with Community through its three-month hiatus, you’re about to be rewarded with not one, not two, but three new episodes in one day. Also after the jump:
More Walking Dead alums follow Frank Darabont to L.A. Noir
Boardwalk Empire will jump forward in time for Season 3
Lu... |
Vampire graves from Poland explained- When archaeologists last year in Poland found the graves with skeletons, many have assumed that this is the people who are buried on such a way because it was suspected that they are vampires. But new research shows that those buried in these graves died of cholera, and local resid... |
from bisect import bisect as B
I=lambda z:[int(input()) for _ in range(z)]
a,b,q=map(int,input().split())
F=float("inf")
s=[-F]+I(a)+[F];t=[-F]+I(b)+[F];X=I(q)
for x in X:
i=B(s,x);j=B(t,x)
o,p=x-s[i-1],s[i]-x
q,r=x-t[j-1],t[j]-x
print(min(2*o+r,o+r*2,2*p+q,p+q*2,max(o,q),max(p,r))) |
<gh_stars>10-100
from leapp.actors import Actor
from leapp.exceptions import StopActorExecutionError
from leapp.models import Report, PamConfiguration
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
from leapp.libraries.stdlib import api
from leapp.reporting import create_report
from leapp import reporting
clas... |
import sys
from itertools import product
from collections import Counter
N = int(input())
obelisks = [list(map(int, sys.stdin.readline().split())) for _ in [0]*N]
dists = [list(map(int, l.split())) for l in sys.stdin]
counter = Counter()
for (x1, y1), (x2, y2) in product(obelisks, dists):
counter[(x1+x2... |
//-----------------------------------------------------------------------------
// Purpose: Try and allocate a free beam
// Output : Beam_t
//-----------------------------------------------------------------------------
Beam_t *CViewRenderBeams::BeamAlloc( bool bRenderable )
{
Beam_t* pBeam = NULL;
if ( m_pFreeBeams... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.