content stringlengths 10 4.9M |
|---|
<gh_stars>0
package basics;
import java.util.*;
public class AddNumber {
static Scanner sc=new Scanner(System.in);
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Enter the 1st number: ");
int a=sc.nextInt();
System.out.println("Enter the 2nd number: ");
int b... |
/**
* An {@link Executor} that executes tasks one at a time in serial order.
*/
public final class SerialExecutor implements Executor {
private final LinkedList<Runnable> mTasks = new LinkedList<>();
private Runnable mActive;
public synchronized void execute(@NonNull final Runnable r) {
mTasks.o... |
<filename>src/01wstep/05listy.py
# listy
print('----------')
l = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
print(l)
print(l[0])
print(l[-1])
print(l[1:6])
print(l[0:7])
print(l[0:8])
print(l[:5])
print(l[3:])
print(l[:])
print(l[7:2:-1])
print(l[7:2])
# print l[7]
print('------ wstawianie --------')
l.append('z')
print(l)... |
Evangelicals crave narratives of redemption—of men finding God and forsaking all other paths—and a spiritual biography of Trump is sure to give them exactly what they need.
Despite his lack of understanding about basic biblical precepts (he's frequently said that he doesn't like to ask forgiveness, a central tenet of ... |
With Peter King on vacation until July 25, this week’s Monday Morning QB guest columnist is Lions guard Geoff Schwartz. The 2016 season will be Schwartz’s ninth in the NFL. He was drafted in the seventh round in 2008 by the Panthers, and he also has spent time with the Vikings, Chiefs and Giants. He’s written for The M... |
package test
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
k8sMeta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestResourceQuota_Query(t *testing.T) {
const namespace = "default"
t.Run("Should return resourceQuotas when ther... |
N = list(map(int, input().split()))
s1 = N[0] * N[1]
s2 = N[2] * N[3]
print(max(s1, s2))
|
Rem oving the H a za rd Fe d w ire Daylight
Free Federal Reserve daylight overdrafts misallocate resources. One reason is the moral hazard of fully insuring a paying bank’s access to whatever volume of daylight overdraft credit it needs. This paper contrasts the effects of three recent proposals for pricing daylight o... |
<reponame>BuckWang0509/codeforces-go
package main
import (
"bufio"
. "fmt"
"io"
)
// github.com/EndlessCheng/codeforces-go
func CF1621B(_r io.Reader, _w io.Writer) {
in := bufio.NewReader(_r)
out := bufio.NewWriter(_w)
defer out.Flush()
var T, n, l, r, c int
for Fscan(in, &T); T > 0; T-- {
ll, rr, lc, rc :... |
<reponame>stemey/feature-hub
/**
* @jest-environment node
*/
let mockResponse: string;
// tslint:disable promise-function-async
jest.mock('node-fetch', () => () =>
Promise.resolve({
buffer: () => Promise.resolve(Buffer.from(mockResponse))
})
);
// tslint:enable promise-function-async
import {loadCommonJsMo... |
<gh_stars>1-10
#include "mymanager.h"
myManager::myManager(QObject *parent)
: QObject(parent), m_passComplexity(QString("Default"))
{}
/* ============================================================================================================ */
/* SECTION I : Credential... |
package util
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"github.com/timsolov/boilr/pkg/template"
"github.com/timsolov/boilr/pkg/util/osutil"
"github.com/timsolov/boilr/pkg/util/validate"
)
var (
// ErrUnexpectedArgs indicates that the given number of arguments exceed the expected number of arg... |
package array;
import java.util.HashSet;
import java.util.Set;
/**
* 840. Magic Squares In Grid
* <p>
* A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum.
* Given an grid of integers, how many 3 x 3 "magic square" sub... |
A Gift of Life: An Islamic Perspective in Organ Donation and Transplantation
Organ Donation and Transplantation is an issue that has widespread ramifications. In addition to the medical/ technical aspects, there are legal, moral, ethical, economic, logistical and humanitarian aspects. Each of these aspects may have so... |
def contains_ratio(container: BoundingBox, contained: BoundingBox) -> float:
if contained.area == 0:
return 0.0
return intersection(container, contained).area / contained.area |
// initZookeeperLatencyMinMetric builds new zookeeper.latency.min metric.
func (mb *MetricsBuilder) initZookeeperLatencyMinMetric() {
metric := mb.metrics.ZookeeperLatencyMin
metric.SetName("zookeeper.latency.min")
metric.SetDescription("Minimum time in milliseconds for requests to be processed.")
metric.SetUnit("1... |
<reponame>Kkiranandroid/exam
package get.set;
import java.util.ArrayList;
public class HomeCategoryGetSet {
public String categoryId;
public String categroyName;
public String coursecount;
public String getCoursecount() {
return coursecount;
}
public void setCoursecount(String coursecount) {
this.coursec... |
#include <stdio.h>
#include <string.h>
int main()
{
int hash[4010],i,j,x,k,num1,num2,a,min,max;
while(scanf("%d%d",&x,&k)!=EOF)
{
min=max=0;memset(hash,0,sizeof(hash));
for(i=0;i<k;i++)
{
scanf("%d",&a);
if(a==2)
{
scan... |
Identification of free radicals in irradiated MA-AMPS copolymer
Methacrylamide-2-acrylamido-2-methylpropanesulphonic acid (MA-AMPS) (80:20) is subjected to n -irradiation and the generated free radicals are identified by the electron spin resonance (ESR) technique. The ESR spectrum "obser"ved for MA-AMPS (80:20) has s... |
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import { serializeCustomData } from './requests/custom-data'
export { massTransfer } from './transactions/mass-transfer'
export { reissue } from './transactions/reissue'
export { burn } from './transactions/burn'
export { excha... |
// Copyright 2020 by <NAME> <<EMAIL>>
//
// 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 t... |
<filename>src/main/java/dd2480/group4/storage/RepositoryHandler.java
package dd2480.group4.storage;
import java.io.IOException;
import java.nio.file.Path;
/**
* The interface for handling repositories.
*/
public interface RepositoryHandler {
/**
* Creates a temporary directory and returns the path to it.
... |
/**
* Parameters supplied to the Create Hosted Service operation.
*/
public class HostedServiceCreateParameters {
private String affinityGroup;
/**
* Optional. The name of an existing affinity group associated with this
* subscription. Required if Location is not specified. This name is a GUID
... |
// CheckResponse checks response headers and a copied stream of the body.
func CheckResponse(r *http.Response, teedBody io.Reader) error {
if r.StatusCode != http.StatusOK {
return fmt.Errorf("%v %v: %s",
r.Request.Method, r.Request.URL, r.Status,
)
}
var er ErrorResponse
err := json.NewDecoder(teedBody).Dec... |
import DatabaseError, { DatabaseErrorSubclassOptions } from '../database-error';
export enum RelationshipType {
parent = 'parent',
child = 'child',
}
interface ForeignKeyConstraintErrorOptions {
table?: string;
fields?: { [field: string]: string };
value?: unknown;
index?: string;
reltype?: Relationship... |
/**
* Restore the contents of {@link SnapshottleMemory} from a snapshot
* file. It is up to the memory to clear its contents before or to
* handle conflicts otherwise. The memory must not be modified while
* its contents are restored. Does nothing if the snapshotFile does
* not exist or is emtpy, th... |
Osteoblastic metastasis from breast affecting the condyle misinterpreted as temporomandibular joint disorder.
Sir, Despite the low incidence of metastases in jaw bones compared with the rest of the skeleton, metastases are important because of the poor prognosis they carry. Their presence can indicate a yet unknown le... |
def remove(self, entity: Entity) -> None:
cache = self._cache
obj_store = self._obj_store
key = entity.id
if cache[key] is entity:
del obj_store[key]
del cache[key]
Persistent.remove_from(entity)
else:
raise DuplicateIdError |
import toLower from 'lodash-es/toLower';
toLower('a string');
|
<gh_stars>10-100
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
struct notlit { // expected-note {{not literal because}}
notlit() {}
};
struct notlit2 {
notlit2() {}
};
// valid declarations
constexpr int i1 = 0;
constexpr int f1() { return 0; }
struct s1 {
constexpr static int mi1 = 0;
const static i... |
def update_until_STOP(self, nodes, path, pathidx):
nodeidx = 0
while path[pathidx][0] != 'STOP':
node, edge = path[pathidx]
if nodeidx >= len(nodes):
astnode = {}
if node == 'DBranch':
astnode['node'] = node
... |
<reponame>lightsea90/ref-contracts<gh_stars>1-10
use near_sdk_sim::{call, to_yocto};
use crate::common::utils::*;
pub mod common;
#[test]
fn owner_scenario_01() {
let (root, owner, pool, token1, _, _) = setup_pool_with_liquidity();
assert_eq!(balance_of(&token1, &pool.account_id()), to_yocto("105"));
ca... |
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/lice... |
N,*A=map(int,open(0).read().split());l=[0]*9
for a in A:l[min(8,a//400)]+=1
m=sum([0<l[i]for i in range(8)]);print(max(m,1),m+l[8]) |
/**
* Returns an {@code RDFProcessor} that expands the ruleset based on the supplied TBox and
* applies the resulting ruleset on input statements either as a whole or partitioned based on
* an optional {@code Mapper}.
*
* @param ruleset
* the ruleset to apply
* @param mappe... |
N = input()
nl = []
for i in N:
nl.append(i)
#print(nl)
nl_i = [int(i)for i in nl]
#print(nl_i)
if int(N) % sum(nl_i) ==0:
print('Yes')
else:
print('No') |
def for_service(self, service) -> list:
routes = [r for r in self if r["spec"]["to"]["name"] == service]
routes = list(sorted(routes,
key=lambda x: float(x["metadata"]["labels"].get("3scale.net/tenant_id", math.inf))))
return routes |
Grand Prix Cincinnati is this weekend, and Standard is the name of the game. Success in Standard tournaments boils down to understanding of a format and familiarity with a deck. If you understand everything going on in a format, and you plan for the possibility of seeing anything and everything across the table, you wi... |
/**
* Creates ChunkEncoded data for an given chunk data.
* @param chunkData chunk data that needs to be converted to chunk encoded format.
* @param isLastByte if true then additional CRLF will not be appended.
* @return Chunk encoded format of a given data.
*/
public static ByteBuffer createChu... |
package com.ruoyi.controller.web.controller.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* 报表
*
*/
@Controller
@RequestMapping("/demo/report")
public class DemoReportC... |
<filename>influxdb/event_service_test.go<gh_stars>0
package influxdb_test
import (
"context"
"testing"
"github.com/aukbit/hippo"
pb "github.com/aukbit/hippo/test/proto"
"github.com/aukbit/rand"
)
// Ensure event can be created.
func TestEventService_Create(t *testing.T) {
c := MustConnectStore()
defer c.Close... |
class DbscanWrapper:
"""
Run dbscan without allocating memory for a distance matrix. Distance is
currently hamming distance.
"""
def __init__(self,alphabet="amino",dist_function="simple"):
"""
Initialize the class. This should be called by every subclass to
initialize the ... |
#include "Engine\ECS/Transform.h"
#define GLM_ENABLE_EXPERIMENTAL
#include <Base/Math/gtx/quaternion.hpp>
namespace NuclearEngine
{
namespace ECS
{
Transform::Transform()
{
mTransformMatrix = Math::Matrix4(1.0f);
mPosition = Math::Vector3(0.0f);
mRotation = Math::Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
mS... |
Epidemiological evidence relating environmental smoke to COPD in lifelong non-smokers: a systematic review
Background: Some evidence suggests environmental tobacco smoke (ETS) might cause chronic obstructive pulmonary disease (COPD). We reviewed available epidemiological data in never smokers. Methods: We identified e... |
package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the... |
def create_gaussian_filter(fsize,sigma):
center = np.ceil(fsize/2)
tmp = np.arange(1,center,1)
tmp = np.concatenate([tmp[::-1], [0], tmp])
dist = np.zeros((1,tmp.shape[0]))
dist[0,:] = tmp
Hgx = np.exp(-dist**2/(2*sigma**2))
Hgy = np.transpose(Hgx)
HG = np.outer(Hgy, Hgx)
SUM = np.su... |
// Describes your import snapshot tasks.
func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInput) (*DescribeImportSnapshotTasksOutput, error) {
req, out := c.DescribeImportSnapshotTasksRequest(input)
err := req.Send()
return out, err
} |
/**
* The base game entity class, it aims for creating movable objects.
*/
public abstract class BaseGameEntity extends AbstractEntity {
public static final int DEFAULT_ENTITY_TYPE = -1;
/**
* Using this vector for temporary calculation, so the change of this vector
* does not affect to current instance.
... |
<filename>powerplant_vistool-private/WorldWindJava-master/lib-external/webview/windows/stdafx.cpp
/*
* Copyright (C) 2012 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
// stdafx.cpp : source file that includes just the... |
// Register the approver-policy Webhook endpoints against the
// controller-manager Manager.
func Register(ctx context.Context, opts Options) error {
log := opts.Log.WithName("webhook")
log.Info("running tls bootstrap process...")
tls, err := tls.New(ctx, tls.Options{
Log: log,
RestConfig: ... |
2K Shares Pin 2K
Making your own jam seems so… Martha Stewart. Ha. Doesn’t it?! But let me tell you.. it could not be any easier.
Thanks to our friendly superfood, the chia seed, we can make Cranberry Raisin Chia Seed Jam in no time! Chia seeds make it all possible (and fast). These tiny chia gems absorb all the exce... |
/**
* A builder object for configuring {@link PlaybookConfig} objects dynamically
*
* @author Greg Marut
*/
public class PlaybookConfigBuilder
{
//holds the instance of the playbooks test configuration
private final PlaybooksTestConfiguration playbooksTestConfiguration;
//holds the app class to configure this ... |
I have to admit and apologize, I literally gave my Secret Santa nothing to go off of. Compared to what everyone talked about, I feel ashamed lol
However, Santa came through, and in awesome ways! Santa must have used all sorts of Claus-fu (i.e. reddit-stalking).
Boxes arrive at my door. Yes two, not one. It was a blus... |
package cn.zhuguoqing.operationLog.bean.dto;
import cn.zhuguoqing.operationLog.bean.enums.CustomFunctionType;
import cn.zhuguoqing.operationLog.bean.enums.DiffType;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
im... |
// NewSubscriber creates an amqp subscriber.
func NewSubscriber(conn *amqp.Connection, exchange string, logger *zap.Logger) (*Subscriber, error) {
ch, err := conn.Channel()
if err != nil {
return nil, fmt.Errorf("cannot allocate channel: %v", err)
}
defer ch.Close()
err = declareExchange(ch, exchange)
if err !=... |
package com.mf.sample;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.mf.library.OnCallBack;
import com.mf.library.UpdateChecker;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate... |
Comparison of the effects of early handling and early deprivation on maternal care in the rat.
It has been reported in the rat that postnatal manipulations can induce robust and persistent effects on offspring neurobiology and behavior, mediated in part via effects on maternal care. There have, however, been few studi... |
BEIRUT (Reuters) - A group tracking the Syrian war said on Saturday that Islamist insurgents shot dead 56 members of Syrian government forces in a mass execution at an air base captured from the army earlier this month in northwestern Syria.
The Syrian Observatory for Human Rights said the mass killing at Abu al-Duhur... |
/**
* Converts table into index scan relational expression.
*/
IgniteLogicalIndexScan toRel(
RelOptCluster cluster,
RelOptTable relOptTbl,
String idxName,
List<RexNode> proj,
RexNode condition,
ImmutableBitSet requiredCols
); |
The number of illegal immigrants attempting to enter the US by crossing the Rio Grande has fallen dramatically since President Trump took office.
In March this year, only 4,143 people were detained by Border Patrol Agents at the notorious river crossing as opposed to 15,579 who were caught in January before Trump was ... |
In vitro growth of postembryonic hair.
The growth of postembryonic mouse hair has been studied in tissue culture using rat-tail collagen gel as a substrate. Continued development and growth of follicles from both newborn and 3- to 4-day-old mice is stimulated only when a tryptic digest of early mouse embryos is incorp... |
//A generalized function to write the data into the given file name. 'append' parameter tells if the data should be appended to te file or the file
//should be truncated and then data should be written.
void writeFile(char *fileName, char *data, int size, int append) {
FILE *file;
char fileNameW[50];
bzero(fileNa... |
RL-numbers: An alternative to fuzzy numbers for the representation of imprecise quantities
In this paper we define imprecise quantities on the basis of a new representation of imprecision introduced by the authors called RL-representation (for restriction-level representation). We call the corresponding RL-representat... |
Location Sensitivity of Non-structural Component for Channel-type Auxiliary Building Considering Primary-secondary Structure Interaction
To ensure the safe and stable operation of nuclear power (NPP), many non-structural components (NSCs) are actively associated with NPP. Generally, floor response spectrum (FRS) is us... |
def fromAskQueries(self,wikiId:str,askQueries:list,withFetch:bool=True):
for askQuery in askQueries:
name=askQuery["name"]
ask=askQuery["ask"]
title=askQuery["title"] if "title" in askQuery else None
description=askQuery["description"] if "description" in askQuery... |
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
r = []
if A%10 != 0:
r.append(10 - A%10)
A += 10 - A%10
if B%10 != 0:
r.append(10 - B%10)
B += 10 - B%10
if C%10 != 0:
r.append(10 - C%10)
C += 10 - C%10
if D%10 != 0:
r.append(10 - D%10)
D += 10 - D%1... |
An Open Letter to New Yoga Teachers
Yesterday was the last day of a yoga teacher training that began in September. Inspired by the group’s great courage and heart, I’ve written them an open letter that I hope will be of help to them and to anyone starting out on the path of teaching:
Dear Friends,
Let me begin by sa... |
package models
// This file is auto-generated.
// Please contact <EMAIL> for any change requests.
// AviCloudStatusDetails avi cloud status details
// swagger:model AviCloudStatusDetails
type AviCloudStatusDetails struct {
// Connection status of the controller cluster to Avi Cloud. Enum options - AVICLOUD_CONNECTI... |
#pragma once
#include "Room.h"
namespace sf
{
class Sprite;
}
class TreasureRoom : public Room
{
private:
std::shared_ptr<sf::Sprite> m_pPodiumSprite;
public:
TreasureRoom(Map *parent, const sf::Vector2i &pos);
~TreasureRoom();
void RenderGame(sf::RenderWindow *window) override;
};
|
/**
* Handles all clash-related messages. In particular, these events are handled:
* - CLASH_REQUEST: Another client has sent a clash request to the current client.
* - CLASH_ACCEPTED: Another client has accepted a clash request sent by the current client.
* - CLASH_REJECTED: Another client has rejected a clash... |
package generate
import (
"testing"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/stretchr/testify/assert"
)
func TestSetPodExitPolicy(t *testing.T) {
tests := []struct {
input, expected []string
}{
{
[]string{"podman", "pod", "create"},
[]string{"podman", "pod", "create", "--exit-... |
// const localeDirectory = import.meta.globEager('./compiled-lang/*.json')
import en from './compiled-lang/en.json'
import sk from './compiled-lang/sk.json'
const localeDirectory = {
'./compiled-lang/en.json': {
default: en
},
'./compiled-lang/sk.json': {
default: sk
}
}
const gatherLocales = Object.... |
#include <iomanip>
#include <ostream>
#include "EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDDAQHeader.h"
namespace Phase2Tracker {
std::ostream& operator<<(std::ostream& os, const FEDDAQEventType& value) {
switch (value) {
case DAQ_EVENT_TYPE_PHYSICS:
os << "Physics trigger";
... |
/**
* usb_composite_unregister() - unregister a composite driver
* @driver: the driver to unregister
*
* This function is used to unregister drivers using the composite
* driver framework.
*/
void usb_composite_unregister(struct usb_composite_driver *driver)
{
if (composite != driver)
return;
usb_gadget_unreg... |
// To Implement Insert func, Use two pointer algorithm.
// First one (j) points long string.
// The other one (i) points short string.
// While increasing i, j, if there are more than one difference between strA[i] and strB[j] --> return false;
// pale
// ale ple pae pal --> true
// lae --> false
bool checkAddDel(s... |
/**
* Maps the data from the trial run actions to the database.
*
* @author Walter Weinmann
*
*/
public class TrialRunActionMapper {
private static final String AND_SEQUENCE_NUMBER_ACTION =
" AND SEQUENCE_NUMBER_ACTION = ";
private static final String AND_START_TIME = " AND START_TIME = ";
... |
Grav|Lab Early Access is almost here! Hey folks,
Grav|Lab will start it's preliminary testing on October 21st! The game will feature 17 levels and a built in level editor. Workshop support will come in an update after early access launch.
http://store.steampowered.com/app/408340/
Grav|Lab is nominated for a Proto Aw... |
package com.evieclient.utils.render;
import io.sentry.Sentry;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.util.ResourceLocation;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.InputStream;
public class Loa... |
def sample_data(self,sample_size):
samples_idx = [];
for i in xrange(sample_size):
rand_w = random();
sum = 0;
for j in xrange(self.num_training_examples):
sum += self.weights[j];
if sum>rand_w:
samples_idx += [j];
... |
#![doc(html_root_url = "https://docs.rs/mio/0.7.11")]
#![deny(
missing_docs,
missing_debug_implementations,
rust_2018_idioms,
unused_imports,
dead_code
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
// Disallow warnings when running tests.
#![cfg_attr(test, deny(warnings))]
// Disallow warnings in exampl... |
def iterate_threads (self):
self._log("iterate_threads()")
thread_entry = THREADENTRY32()
snapshot = kernel32.CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, self.pid)
if snapshot == INVALID_HANDLE_VALUE:
raise pdx("CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, %d" % self.pid, ... |
Influence of Engagement on the Performance of Company Employees in Cavite, Philippines
Employee is considered one of the most important stakeholders in an organization. Hence, their performance should always be in accordance with the company’s goals and objectives. Nevertheless, in meeting all these expectations, empl... |
Culture eats strategy for lunch.
Culture is a balanced blend of human psychology, attitudes, actions, and beliefs that combined create either pleasure or pain, serious momentum or miserable stagnation. A strong culture flourishes with a clear set of values and norms that actively guide the way a company operates. Empl... |
package testresource
import "github.com/giantswarm/microerror"
var testError = microerror.New("just testing")
// IsTestError asserts testError.
func IsTestError(err error) bool {
return microerror.Cause(err) == testError
}
|
"""This module contains the classes used for constructing and conducting an Experiment (most notably,
:class:`CrossValidationExperiment`). Any class contained herein whose name starts with 'Base' should not be used directly.
:class:`CrossValidationExperiment` is the preferred means of conducting one-off experimentation... |
// IsFile check is path is exists and it's a directory
func IsFile(path string) bool {
stat, err := os.Stat(path)
if os.IsNotExist(err) {
return false
}
return stat.Mode().IsRegular()
} |
/**
* Renaming Builder class field with parent class field.
*/
public class BuilderFieldRenameParticipant extends RenameParticipant {
private ICompilationUnit unit;
private String oldName;
private IField field;
private IField builderField;
private IMethod builderConstr;
private IMethod builderSetter;
private ... |
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { AlertService } from 'app/core/alert/alert.service';
import { TUM_USERNAME_REGEX } from 'app/app.constants';
import { AccountService } from 'app/core/auth/account.service';
import { Course } from 'app/entities/course.model';
import ... |
import React, { useEffect, useState } from 'react';
import { SearchOutlined, DeleteOutlined } from '@ant-design/icons';
import { Input, Pagination, Layout, Card, Tooltip, Spin } from 'antd';
import EmptyComponent from '../empty/empty';
import './list.scss';
const { Content } = Layout;
const { Meta } = Card;
const ... |
/*
* Copyright (c) 2012 Clément Bœsch
*
* This file is part of FFmpeg.
*
* FFmpeg 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 2.1 of the License, or (at your option) any lat... |
// newReportXML returns a new Report based on the contents of a
// XML-formatted valgrind report.
func newReportXML(output *outputElement) *Report {
report := &Report{
Pid: output.Pid,
Ppid: output.Ppid,
Tool: output.Tool,
}
for _, node := range output.Errors {
report.Errors = append(report.Errors, newError... |
<filename>HW08/libs/WWJ/code/src/gov/nasa/worldwind/formats/tiff/Tiff.java<gh_stars>10-100
/*
* Copyright (C) 2012 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
package gov.nasa.worldwind.formats.tiff;
/**
* @author <... |
def seek(self, offset, whence=0):
if whence == 1:
raise ValueError('Relative seek is not supported for '
'SeekableUnicodeStreamReader -- consider '
'using char_seek_forward() instead.')
self.stream.seek(offset, whence)
self.li... |
//-----------------------------------------------------------------------------
// S_PrecacheSound
//
// Reserve space for the name of the sound in a global array.
// Load the data for the non-streaming sound. Streaming sounds
// defer loading of data until just before playback.
//--------------------------------------... |
// Takes a whole multi-line []byte and finds appropriate subsitutions
func (s *Substitutor) Substitute(input []byte) ([]byte, error) {
reB64Value := regexp.MustCompile(`[A-Za-z0-9\+\/\=]{10,}`)
postbase64input := reB64Value.ReplaceAllFunc(input, s.substitutebase64)
return s.substituteraw(postbase64input)
} |
/**
* Removes first occurrences of the constants
* associated with the expression
*
* @param constants the constants (variadic parameters)
* comma separated list
*
* @see Constant
*/
public void removeConstants(Constant... constants) {
for ... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=200, MAXINT=2147483647;
ll b[N], t, n, mi=MAXINT;
vector<string> m, a, r, c, h;
ll M, A, R, C, H;
string s;
int main() {
cin >> n;
for (int i=0; i<n; i++) {
cin >> s;
switch (s[0]) {
case 'M': m.push_back... |
Inhibition of Aflatoxin Biosynthesis by Organophosphorus Compounds.
The effect of a range of organophosphorus and various other compounds on production of aflatoxin by Aspergillus flavus was investigated. Five organophosphorus compounds - Chlormephos, Ciodrin, Naled, Phosdrin and Trichlorphon- at concentrations of 20 ... |
class SuperTestBaseNoArg {
constructor() {}
}
class SuperTestBaseOneArg {
constructor(public x: number) {}
}
// A ctor with a parameter property.
class SuperTestDerivedParamProps extends SuperTestBaseOneArg {
constructor(public y: string) {
super(3);
}
}
// A ctor with an initialized property.
class Supe... |
/**
* Saturate the output signal and interleave.
*
* @param q pointer to the COOKContext
* @param out pointer to the output vector
*/
static void saturate_output_float(COOKContext *q, float *out)
{
q->adsp.vector_clipf(out, q->mono_mdct_output + q->samples_per_channel,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.