content stringlengths 10 4.9M |
|---|
{-# LANGUAGE RecordWildCards #-}
module HulkanEngine3D.Utilities.Logger
( logTrivialInfo
, logInfo
, logDebug
, logWarn
, logError
) where
import GHC.Stack hiding (prettyCallStack, prettySrcLoc)
import Data.List
import Data.Time
import Control.Monad
prettySrcLoc :: SrcLoc -> String
prettySrcL... |
/** Checks if the target is valid for being attacked */
public boolean isValid(Entity entity)
{
if (DamageUtility.canDamage(entity))
{
return !entity.isInvisible();
}
return false;
} |
/**
* Not usually needed except if resources need to be reclaimed in a long running process.
*/
public static void clearResources()
{
nameMap.clear();
} |
by
*Click on each bible passage to expand the text. Luke 1:46b-55 Mary’s Song 46. And Mary said: “My soul glorifies the Lord 47. and my spirit rejoices in God my Savior, 48. for he has been mindful of the humble state of his servant. From now on all generations will call me blessed, 49. for the Mighty One has done gre... |
/// Create validators, returning a list of validator pubkeys on success.
pub fn create(
&self,
quantity_flag: &str,
quantity: usize,
store_withdrawal_key: bool,
) -> Result<Vec<String>, String> {
let mut cmd = validator_cmd();
cmd.arg(format!("--{}", VALIDATOR_DIR_FLA... |
def _compute_gradient_and_hessian(self, x):
edge_container = self._find_containing_paths()
grad = np.zeros(self.num_edges)
hessian = np.zeros((self.num_edges, self.num_edges))
for edge in range(self.num_edges):
involved_cases = edge_container[edge]
path_weights = [sum([x[i] for i in self.res... |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
bool is_palindrome(string x){
bool ans = true;
ll y = x.length();
for(ll i=0; i<(y+1)/2; i++){
if(x[i] != x[y-i-1]){
ans = false;
}
}
return ans;
}
int main(){
ios::sync_with_stdio(0);
cin.ti... |
<reponame>zrosenbauer/action-tls-monitor
import { Protocol } from '../tls';
export interface AlertInput {
domain: string;
validTo: string;
validFrom: string;
protocol: Protocol;
errorMessage: string;
}
|
/***
* Copy all files from config region's config bucket to destination region's config bucket
* @param destinationRegion Region to copy files to
*/
public void sync(Regions destinationRegion) {
EnvironmentData decryptedEnvironmentData = getDecryptedEnvironmentData();
StoreService destina... |
def check_column(
data,
columns,
bins=False,
missing=0.1,
cardinality=15,
float_frequency=30,
category_frequency=100,
outlier_function=quartile,
):
if isinstance(columns, str):
columns = [columns]
bins = [bins]
else:
if bins == False:
bins = [F... |
Improvement of Atomic-Layer-Deposited Al2O3/GaAs Interface Property by Sulfuration and NH3 Thermal Nitridation
Fermi level pinning at the interface between high-κ gate dielectric and GaAs induced by unstable native oxides is a major obstacle for high performance GaAs-based metal-oxide-semiconductor (MOS) devices. We d... |
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/test/unit_test/os_interface/linux/device_command_stream_fixture_exp.h"
#include "opencl/test/unit_test/os_interface/linux/drm_mock_exp.h"
// clang-format off
#include "shared/source/os_interface/linux/drm_tip.h"
// c... |
/**
* Add a Favorite to the database.
* @param surfer The Surfer that is becoming a Favorite.
* @param userInfo The UserInfo making a Favorite.
*/
public static void add(Surfer surfer, UserInfo userInfo) {
if (surfer != null && userInfo != null) {
Favorite favorite = new Favorite(surfer, userInfo)... |
'''
@author: <NAME>
@summary: A module to perform batch request processing.
'''
from __future__ import absolute_import, unicode_literals
import json
import logging
from datetime import datetime
import six
from concurrent.futures import TimeoutError
from django.conf import settings
from django.http.response import (
... |
//TODO: implement for m>1 in terms of random gates
MPS
randomMPS(InitState const& initstate, int m, Args const& args)
{
if(m>1) Error("randomMPS(InitState,m>1) not currently supported.");
auto psi = MPS(initstate);
psi.randomize(args);
return psi;
} |
Research on Natural Characteristics of Helical Gear in Gearbox for Wind Turbine Generator
The three-dimensional helical gear model based on the geometric parameters is created by using software called PROE3.0. The natural characteristics of helical gear are analyzed by using the finite element method. The natural freq... |
<reponame>skibaa/dust
extern crate ansi_term;
use crate::utils::Node;
use self::ansi_term::Colour::Red;
use lscolors::{LsColors, Style};
use terminal_size::{terminal_size, Height, Width};
use unicode_width::UnicodeWidthStr;
use std::cmp::max;
use std::cmp::min;
use std::fs;
use std::iter::repeat;
use std::path::Pa... |
Dennis McGuire took 15 minutes to die by lethal injection Thursday morning at the Southern Ohio Correctional Facility in Lucasville for the 1989 rape and murder of a 22-year-old pregnant woman named Joy Stewart.
Eyewitness accounts differ slightly on how much Mr. McGuire, 53, struggled and gasped in those final minute... |
<filename>bridges/stripe/stripe.go
package stripe
// TODO: Implementing stripe bridge
|
/**
* Summary of a cluster which does not include all the related information, such as: spectrum or PSM
*
* @author Rui Wang
* @version $Id$
*/
public class ClusterSummary {
private Long id;
private String uuid;
private float averagePrecursorMz;
private int averagePrecursorCharge;
private Strin... |
def exit_clean(self):
self._delete_folder(AutoFlipConf.TMP_PBTXT_FOLDER_PATH)
self._delete_folder(self.DESTINATION_MODEL_FOLDER_LOCATION) |
def _null_wrap_accumulate_block(
ignore_nulls: bool,
accum_block: Callable[[AggType, Block[T]], AggType],
null_merge: Callable[[WrappedAggType, WrappedAggType], WrappedAggType],
) -> Callable[[WrappedAggType, Block[T]], WrappedAggType]:
def _accum_block_null(a: WrappedAggType, block: Block[T]) -> Wrappe... |
/**
* {@link ManagedFunction} to invoke a {@link Method}.
*
* @author Daniel Sagenschneider
*/
public class MethodFunction implements ManagedFunction<Indexed, Indexed> {
/**
* Invokes the {@link Method} as the {@link ManagedFunction} directly on the
* {@link Object}.
*
* @param instance Instance. May ... |
<filename>src/app/model/service/crud-request.ts
export class CrudRequest {
entity: string;
id: string;
special: string;
param: any[];
data: object;
}
|
def submit_job(self, bundle, job_config=None):
return self._delegator._submit_job(bundle=bundle, job_config=job_config) |
Sudden Cardiac Arrest in an Intubated Premature Infant With Cerebellar and Brainstem Injury: Is There a Link?
The ventilated premature infant frequently exhibits unprovoked desaturation episodes accompanied by bradycardia. In most instances, these episodes are short-lived and recover spontaneously or with minimal inte... |
<gh_stars>1-10
package com.redhat.uxl.services.service;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.joda.time.DateTime;
import org.springframework.transaction.annotation.Transactional;
/**
*... |
Brewster Kahle, completist Freedom For IP It's no secret that print media is struggling. Devices like the Kindle and iPad seem to point to a world without ink on paper as being not only possible, but practical as well.
Brewster Kahle, who has previously found success with a number of Internet technologies like the Int... |
/*! \brief SPI slave tranfers data to Usart SPI master
*/
static bool spi_slave_transfer(void)
{
usart_spi_select_device(USART_SPI_EXAMPLE, &USART_SPI_DEVICE_EXAMPLE);
data_master_tx[0] = SLAVE_RD_CMD;
count = 0;
usart_spi_write_packet(USART_SPI_EXAMPLE, data_master_tx, 1);
usart_spi_read_packet(USART_SPI_EXAMPLE... |
/*
* The MIT License
*
* Copyright 2017 <NAME> & <NAME>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy,... |
<filename>duke-core/src/main/java/no/priv/garshol/duke/Duke.java
package no.priv.garshol.duke;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.Writer;
import java.util.List;
import java.util.ArrayL... |
//Helper function to convert New_York to New York
string convert(string s)
{
string firstWord="";
string secondWord="";
int ch=-1;
for(int i=0;i<s.length();i++)
{
if(s[i]=='_')
{
ch=1;
}
else
{
if(ch==-1)
{
f... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,d;
cin>>n>>d;
int sum=0,last=-1;
for(int i=1;i<=n;++i)
{
int p;
cin>>p;
if(p<=last)
{
int o=last-p;
int k=o/d+1;
sum+=k;
p=p+k*d;
}
last=p;
}
cout<<sum;
return 0;
} |
<reponame>rhencke/engine<filename>src/third_party/skia/infra/bots/task_drivers/perf_puppeteer_skottie_frames/perf_puppeteer_skottie_frames.go
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This exec... |
[6] Here we investigate the use of Li/Ca ratios, and the combination with Mg/Ca as Mg/Li and Li/Mg ratios, as sea surface temperature proxies in tropical corals. We utilize modern Porites corals from locations with exceptional local in situ temperature data to calibrate these promising new proxies while revealing some ... |
from django.conf import settings
ENABLE_SELECT2 = getattr(settings, 'DJANGOCMS_LINK_USE_SELECT2', False)
if ENABLE_SELECT2 and 'django_select2' in settings.INSTALLED_APPS:
try:
from djangocms_link.fields_select2 import Select2PageSearchField as PageSearchField
except ImportError:
from djangocm... |
-- Copyright (c) 1999 <NAME>.
-- See COPYRIGHT file for terms and conditions.
-- WARNING: The Set operations (insertWith...) are not adequately tested.
-- To be thorough, they should be tested on a type where distinguishable
-- values can still be "equal", and the results should be tested to make
-- sure that the "W... |
/**
* Utility for reflect.
*/
public class ReflectUtil {
/**
* Finds and returns the Class object associated with the class or interface
* with the given string name.
*
* @param <T> the type of the returned class
* @param className the fully qualified name of the desired class
... |
<reponame>alonmm/VCSamples<filename>VC2012Samples/Windows 8 samples/C++/Windows 8 app samples/Association launching sample (Windows 8)/C++/App.xaml.cpp
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES O... |
Improving Efficiency in Iron Ore Mining Facilities
A cost effective energy optimization project for a 35 MW iron ore pellet plant is presented. Applications involving large centrifugal loads and changing flow rates were prime targets for significant energy savings. Input-output power balances of these units provide si... |
<filename>DSP Lab 2/Assignment3_1.py
import pyaudio
import struct
WIDTH = 1
print pyaudio.paInt8
print pyaudio.get_format_from_width(WIDTH)
sl = struct.pack('i',-1);
print `sl`
|
/**
* Extends SchemEditValidator to provide validation services for collection configuration
records. Specifically, ensures that status flags are not duplicated,
* nor do they redefine reserved flags<p>
*
*
*
*@author ostwald <p>
*
* $Id: CollectionConfigValidator.java,v 1.10 2005/06/02 18:45:40 ostw... |
/**
*
* @author Santiago Rojas
*/
@Path ("/citaLaboratorio")
@Produces("application/json")
@Consumes("application/json")
@RequestScoped
public class CitaLaboratorioResource {
private static final Logger LOGGER = Logger.getLogger(CitaLaboratorioResource.class.getName());
@Inject
... |
<filename>app/index/controller.go<gh_stars>1-10
package index
import (
"github.com/gin-gonic/gin"
"time"
)
type Controller struct {
Service *Service
}
func (x *Controller) Index(c *gin.Context) interface{} {
return gin.H{"time": time.Now()}
}
type IpQuery struct {
Value string `form:"value" binding:"required,i... |
<gh_stars>1-10
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Criterion.Main
import Data.Functor
import Data.Map (Map)
import qualified Data.Map as M
import Data.Set (Set)
import qualified Data.Set as S
iter :: (a -> a) -> Int -> a -> a
iter f = go
where
go 0 x = x
go !n x = go (p... |
/**
* Sql body utility
*/
public class SqlBodyUtil {
private static final String EMPTY_STRING = "";
/**
* Limit sql body size to specify {@code JDBCPluginConfig.Plugin.JDBC.SQL_BODY_MAX_LENGTH}
* @param sql Sql to limit
*/
public static String limitSqlBodySize(String sql) {
if (sql... |
#ifndef COLOURREPLACEMENTRULE_H
#define COLOURREPLACEMENTRULE_H
#include "Vision/visionblackboard.h"
#include "Vision/VisionTools/classificationcolours.h"
#include "Vision/VisionTypes/coloursegment.h"
class ColourReplacementRule
{
//METHOD DEFINITION
public:
enum ReplacementMethod {
BEFORE,
AFTE... |
package ch05;
/**
*
* 【例5-2】 编写成员函数计算二叉树中结点的个数
*
*/
public class Example5_2 {
// 采用先根遍历的方式对树进行遍历,计算树中的结点数
public int countNode(BiTreeNode T) {
int count = 0;
if (T != null) {
++count;// 结点数增1
count += countNode(T.getLchild()); // 加上左子树上结点数
count += countNode(T.getRchild());// 加上右子树上的结点数
}
ret... |
/**
* onCreate method that instantiates the activity and associated the proper layout.
* In FinishActivity, it sets the View, and checks the intent of the PlayActivity.
*
* Sets the internal variables to the values from intent, then changes the display text based on the data
* received.
*
*/
@Override
... |
On this day 12 months ago, Moscow held off from retaliating to Barack Obama's diplomatic parting shot, in hope of a new start. Instead, 2017 has been the worst year of US-Russia relations since the fall of the Berlin Wall.
Three weeks before leaving the Oval Office, Obama expelled 35 Russian diplomats and closed two M... |
Image caption Some legal aid protesters made their opposition to price competitive tendering (PCT) clear in May
Plans to cut the legal aid bill by awarding contracts to the lowest bidder have been dropped, Justice Secretary Chris Grayling has announced.
In an interview with the Times newspaper, Mr Grayling said the m... |
import { HttpParameterCodec, HttpParams } from '@angular/common/http';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { ApiInterface } from '../abstract-services/api-interface';
import { Category } from '../model/dataset-api/category';
import { Data } from '../model/d... |
/**
* svc_rdma_send - Post a single Send WR
* @rdma: transport on which to post the WR
* @wr: prepared Send WR to post
*
* Returns zero the Send WR was posted successfully. Otherwise, a
* negative errno is returned.
*/
int svc_rdma_send(struct svcxprt_rdma *rdma, struct ib_send_wr *wr)
{
int ret;
might_sleep()... |
/**
* A bean to memorize the treatement of the application.
*/
public class ManagedAccess implements Resettable, InitializingBean, Serializable {
/**
* The serialization id.
*/
private static final long serialVersionUID = -2380329125800067454L;
/*
******************* PROPERTIES ************... |
// GetWord will retrieve a word for the given key
func (c *MemoryClient) GetWord(ctx context.Context, key string) (string, error) {
if c.Data == nil {
return "", errors.New("running in local mode. Data has not been retrieved")
}
if val, ok := c.Data[key]; ok {
return val, nil
}
return "", fmt.Errorf("key not f... |
def mutateRow(self, table, trowMutations):
self.send_mutateRow(table, trowMutations)
self.recv_mutateRow() |
import pytest
def pytest_addoption(parser):
parser.addoption(
"--integration",
metavar="LIVY_URL",
nargs="?",
const="http://localhost:8998",
help="Run integration tests against the specified Livy server URL "
+ "(default: http://localhost:8998)",
)
def pytest_... |
def flatten_data(data):
if isinstance(data, list):
return [flatten_data(e) for e in data]
elif isinstance(data, types.Struct):
keys = data.get_members()
return [flatten_data(data.member_by_key(key)) for key in keys]
else:
return [primitives_to_scrypt_types(data)] |
// ListApplicationTypesWithResponse request returning *ListApplicationTypesResponse
func (c *ClientWithResponses) ListApplicationTypesWithResponse(ctx context.Context, params *ListApplicationTypesParams) (*ListApplicationTypesResponse, error) {
rsp, err := c.ListApplicationTypes(ctx, params)
if err != nil {
return ... |
// checkBufferWillFull check whether the send buffer will be full.
func (t *TCPConnection) checkBufferWillFull() {
if len(t.sendBuffer) >= t.MaxSendBufferSize {
if t.OnBufferFull != nil {
t.OnBufferFull(t)
}
}
} |
/**
* EncryptionKeyInfo contains the encryption key and corresponding metadata which contains additional information about
* the key such as version, timestamp.
*/
public class EncryptionKeyInfo {
private Map<String, String> metadata = null;
private byte[] key = null;
public EncryptionKeyInfo() {
... |
/**
* Main service shell Allows 'subroutines' in Java may be invoked from the primary code of qcert, written in OCaml or extracted to OCaml. This
* service can be obtained either by fork/exec or by running with the -server option.
*/
public class Main extends NanoHTTPD {
/** Constructor; passes through to NanoHT... |
import React from 'react'
import AvatarImage from '../../../../../../components/AvatarImage'
import { Contact } from '../../../../../../interfaces/contact'
import SeenMessageIcon from '../../../../../../assets/icons/seen_message.svg'
import { formatDateNumberToDayMonthYear } from '../../../../../../utils/format_dat... |
<reponame>beamjs/erlv8
#include "erlv8.hh"
typedef TickHandlerResolution (*TickHandler)(VM *, char *, ERL_NIF_TERM, ERL_NIF_TERM, ERL_NIF_TERM, int, const ERL_NIF_TERM*);
struct ErlV8TickHandler {
const char * name;
TickHandler handler;
};
static ErlV8TickHandler tick_handlers[] =
{
{"stop", StopTickHandle... |
A Case of Esophagojejunal Variceal Rupture after Total Gastrectomy and Esophagojejunostomy Successfully Treated with Percutaneous Transhepatic Obliteration under Dual-balloon Occlusion of Feeding and Draining Veins
We present the case of a man in his 60s with bleeding esophagojejunal varices occurring after gastrectom... |
“Buddha was asked, ‘What have you gained from meditation?’ He replied, ‘Nothing.’ ‘However,’ Buddha said, ‘let me tell you what I lost: anger, anxiety, depression, insecurity, fear of old age, and death.’”
“I never get stressed.”
I used to say and think this all the time when I saw someone freaking out about an upcom... |
/**
* Created by wawe on 17/6/4.
*/
@Component
public class Global implements StringConstant {
/**
* 保存全局属性值
*/
private static Map<String, String> map = Maps.newHashMap();
/**
* 属性文件加载对象
*/
private static PropertiesLoader loader = new PropertiesLoader("application.properties");
... |
package com.xiaojukeji.kafka.manager.common.utils;
/**
* @author zhongyuankai
* @date 2020/6/8
*/
public class NumberUtils {
public static Long string2Long(String s) {
if (ValidateUtils.isNull(s)) {
return null;
}
try {
return Long.parseLong(s);
} catch (... |
from sys import stdin
from collections import Counter
input = stdin.readline
S = list(input())
T = list(input())
def main():
C1 = sorted(Counter(S).values())
C2 = sorted(Counter(T).values())
print("Yes" if C1 == C2 else "No")
return
main()
|
<filename>netty-spring-websocket/src/main/java/com/github/berrywang1996/netty/spring/web/websocket/bind/annotation/AutowiredMessageSender.java<gh_stars>0
package com.github.berrywang1996.netty.spring.web.websocket.bind.annotation;
import java.lang.annotation.*;
/**
* @author berrywang1996
* @version V1.0.0
*/
@Tar... |
// Load reads the configuration from a YAML file structure. If path is empty
// this method reads from the configuration file specified by the '-c' command
// line flag.
func Load(path string) (*common.Config, error) {
var config *common.Config
var err error
cfgpath := GetPathConfig()
if path == "" {
list := []st... |
import { ColProps } from 'components/atoms/Grid/Col/Col';
import { AlignItems, JustifyContent } from 'types';
// Form type
export type FormType = 'vertical' | 'horizontal';
export interface LabelOptions extends React.HTMLAttributes<HTMLDivElement> {
align?: AlignItems;
justify?: JustifyContent;
col?: ColProps; ... |
/**
* author: WentaoKing
* created on: 2020/3/20
* description:
*/
public class ShutDownHookDemo {
static class ShutdownHook extends Thread{
@Override
public void run() {
System.out.println("I am called during shutting down");
}
}
public static void main(String[] ar... |
<reponame>empun/imgbox-js
import axios from 'axios';
import util from 'util';
const URL = {
baseURL: 'https://imgbox.com',
root: '/',
token: 'ajax/token/generate',
upload: 'upload/process',
gallery_edit: 'gallery/edit',
images: 'api/v1/images',
gallery: 'api/v1/galleries',
delete_images... |
RIO DE JANEIRO (AP) — It was a golden goodbye for Usain Bolt who led his Jamaican teammates to victory in the men’s 4×100 relay. It was the last race of his Olympic career and his ninth Olympic medal. The U.S. men finished third but were disqualified for exchanging illegally outside the zone at the first change.
The U... |
<filename>src/main/java/org/hutrace/handy/authority/impl/code/Salt.java
package org.hutrace.handy.authority.impl.code;
/**
* 创建salt(盐)的接口
* <p>所有创建salt(盐)都通过此接口调用
* <p>你可以自定义实现它
* @author hu trace
*/
public interface Salt {
/**
* 创建盐
* @return 盐
*/
String create();
}
|
<filename>src/app/v1/api/user/event/event.go
package event
import (
"github.com/google/uuid"
"github.com/sofyan48/nemo/src/app/v1/api/user/entity"
"github.com/sofyan48/nemo/src/app/v1/utility/kafka"
"github.com/sofyan48/nemo/src/app/v1/utility/mongodb"
)
// USEREVENT ...
const USEREVENT = "user_event"
// UserEve... |
from setuptools import setup
setup(name='redbull',
version='0.81',
packages=['redbull'],
python_requires=">=3.6",
zip_safe=False)
|
def update_hand(hand: Dict[str, int], word: str) -> Dict[str, int]:
word = word.lower()
new_hand = dict(hand)
for letter in word:
if letter not in new_hand:
continue
if new_hand[letter] > 0:
new_hand[letter] -= 1
return new_hand |
Floquet Analysis of Space-Time Modulated Huygens' Metasurfaces with Lorentz Dispersion
A rigorous semi-analytical Floquet analysis is proposed for a zero-thickness space-time modulated Huygens' metasurface to model and determine the strengths of the new harmonic components of the scattered fields. The proposed method ... |
'''
Handles every piece of hardware that comes to our attention.
''' |
Online Assignment of Heterogeneous Tasks in Crowdsourcing Markets
We investigate the problem of heterogeneous task assignment in crowdsourcing markets from the point of view of the requester, who has a collection of tasks. Workers arrive online one by one, and each declare a set of feasible tasks they can solve, a... |
package com.ukefu.util.task.process;
public interface JPAProcess {
public void process(Object data) ;
public void end();
}
|
/*
count the numbers of various types of structures under our control
*/
void BuildOrderManager::updateStructureCounts()
{
int bases = 0;
int productionFacilities = 0;
int gases = 0;
int cannons = 0;
int workers = 0;
for (auto structure : blinkerBot.Observation()->GetUnits())
{
if (UnitData::isOurs(structure... |
#define _POSIX_C_SOURCE 200809L
#include "bml.h"
#include "../macros.h"
#include "../typed.h"
#include <complex.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
// print content of file in stdout
void T... |
<reponame>nickitalebed1/ticketHunter
package com.ticket.hunter.client;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
impor... |
Combined suppression of the intrarenal and circulating vasoconstrictor renin-ACE-ANG II axis and augmentation of the vasodilator ACE2-ANG 1-7-Mas axis attenuates the systemic hypertension in Ren-2 transgenic rats exposed to chronic hypoxia.
The aim of the present study was to test the hypothesis that chronic hypoxia w... |
/**
* Represents the percentage of the total grade that this assignment takes up.
*/
public class AssignmentPercentage {
public static final String MESSAGE_CONSTRAINTS =
"Assignment percentages should be a value between 0 to 100 and it should not be blank.";
public final double assignmentPercent... |
// Let's assume that our HTTP proxy is placed on 127.0.0.1:3128 address.
// Then we have to build the correct URL with HTTP scheme. Also, please
// remember that this executor will support both HTTP and HTTP proxies
// (i.e, will do CONNECT method for HTTPS).
func ExampleMakeProxyChainExecutor_http() {
httpURL := &url... |
<reponame>angcyo/CalendarView<filename>calendarview/src/main/java/com/haibin/calendarview/VerticalCalendarView.java
package com.haibin.calendarview;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.TypedArray;
import android... |
<filename>modules/mysqlapi/restful/graph/index_it_test.go
package graph
import (
"net/http"
oClient "github.com/Cepave/open-falcon-backend/common/http/client"
json "github.com/Cepave/open-falcon-backend/common/json"
tg "github.com/Cepave/open-falcon-backend/common/testing/ginkgo"
tc "github.com/Cepave/open-falco... |
import numpy as np
import os
import torch.nn.functional as F
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.distributions.categorical import Categorical
from torch.multiprocessing import Pipe
from model_resize import CnnActorCriticNetwork2, RNDModel2
from env... |
/**
* Splits a full name composed according to the Chinese tradition:
* <pre>
* [family name [middle name]] given name
* </pre>
*/
private void splitChineseName(Name name, String fullName) {
StringTokenizer tokenizer = new StringTokenizer(fullName);
while (tokenizer.hasMoreTok... |
Adaptively Center-Shape Sensitive Sample Selection for Ship Detection in SAR Images
With the wide application of synthetic aperture radar in maritime surveillance, a ship detection method has been rapidly developed. However, there is still a key problem common in most methods, i.e., how to select positive and negative... |
<reponame>electro89/frontend
import { Component, OnInit } from "@angular/core";
import { GlobalVarsService } from "../../../global-vars.service";
import { BackendApiService, ProfileEntryResponse, TutorialStatus } from "../../../backend-api.service";
import { AppRoutingModule } from "../../../app-routing.module";
import... |
/**
* Document view exporter that does not export virtual nodes.
*/
public class HippoDocumentViewExporter extends DocumentViewExporter {
public HippoDocumentViewExporter(Session session, ContentHandler handler, boolean recurse, boolean binary) {
super(session, handler, recurse, binary);
}
@Over... |
package owolabi.tobiloba.measurementrecorder;
import android.content.Context;
import android.database.Cursor;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import owolab... |
// NOTE: set the variable indicators and set terminal derivatives in _backward_info
void Simulation::backward() {
if (_q_his.size() <= 1) {
std::cerr << "[Error] Please call simulation.forward() before simulation.backward()." << std::endl;
throw "error";
}
int T = _q_his.size() - 1;
if ... |
<gh_stars>0
package clog
import (
"flag"
"fmt"
"os"
"github.com/google/logger"
"github.com/dakraid/LooM/logview"
)
const logPath = "output.log"
var verbose = flag.Bool("verbose", false, "print info level logs to stdout")
// InitLogger The cLogger package is just a proxy to the Google/Logger package and has t... |
import { maximumProduct, maximumProduct2 } from './maximumProduct';
describe('maximumProduct function', () => {
it('should work', () => {
expect(maximumProduct([-4, -4, 2, 8])).toBe(128);
expect(maximumProduct2([-4, -4, 2, 8])).toBe(128);
});
});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.