content stringlengths 10 4.9M |
|---|
#include "util.h"
int main()
{
int shmid = shmget(SHM_KEY, SHM_SIZE, SHM_R | SHM_W | IPC_CREAT);
if (shmid == -1) {
error("shmid");
return 1;
}
int semid = semget(SEM_KEY, 0, IPC_CREAT | 0600);
if (semid == -1) {
error("semget");
return 1;
}
auto shmp = shm... |
/**
* Implementation of diagnostic mbean.
*/
public class DiagnosticDumpMBeanImpl extends StandardMBean implements DiagnosticDumpMBean {
/**
* Dump providers.
*/
private BundleContext bundleContext;
private SimpleDateFormat dumpFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmss");
... |
Weeks before the release of a scathing report into military sexual misconduct, Canada's top general issued orders for the military to plan to ignore key recommendations, including the creation of an independent centre to take complaints and provide support and expertise.
CBC News has obtained orders written by Chief o... |
<filename>run.py
#!/usr/bin/env python3.6
import random
from user import User
def create_user(fName, lName, password) :
"""
to create a new user
"""
new_user = User(fName, lName, password)
return new_user
def save_users(user) :
"""function to save users
"""
user.save_user()
def del_u... |
def main():
N = int(input())
health = set(map(int, input().split()))
min_num = min(health)
for i in health:
while i % min_num != 0:
temporary_min_num = min_num
min_num = i % min_num
i = temporary_min_num
print(min_num)
main()
|
// Prepend adds an item to the beginning of the collection.
func (c NumberArrayCollection) Prepend(values ...interface{}) Collection {
var d NumberArrayCollection
var n = make([]decimal.Decimal, len(c.value))
copy(n, c.value)
d.value = append([]decimal.Decimal{newDecimalFromInterface(values[0])}, n...)
d.length = ... |
import torch
import os
import argparse
import json
import pytorch_lightning as pl
from fengshen.models.model_utils import add_module_args
from fengshen.data.task_dataloader.task_datasets import AbstractCollator
from fengshen.data.universal_datamodule import UniversalDataModule
from fengshen.utils.universal_checkpoint ... |
Efficient logic architectures for CMOL nanoelectronic circuits
CMOS molecular (CMOL) circuits promise great opportunities for future hybrid nanoscale IC implementation. Two new CMOL building blocks using transmission gates have been introduced to obtain efficient combinational and sequential logic for CMOL designs. Co... |
Chinese President Xi Jinping during a call with President Trump reportedly urged restraint in dealing with North Korea.
Chinese state media reported that Xi said China "strongly opposes" anything that would go against United Nations Security Council resolutions, according to USA Today.
Xi also told Trump that China w... |
<gh_stars>10-100
// Libs
import React from 'react';
// App
import {bemBlock} from 'common/utils/bem';
// Module
import './NotificationLink.less';
type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement>
const block = bemBlock('neptune-link');
export const NotificationLink:React.FC<LinkProps> = (props) => {
... |
def _bitflips_designated(self, value, fi_indices):
for item in fi_indices:
val = value[item]
bits = str(value.dtype)[-2:] if str(value.dtype)[-2].isdigit() else str(value.dtype)[-1]
if 'uint' in str(val.dtype):
pos = int(bits) - 1
else:
... |
Effects of the Fuel Injection Parameters on the Performance and Emissions Formation in a Large-Bore Marine Diesel Engine
Reductions in the emissions of nitrogen oxides (NO x ) and soot from marine diesel engines can be supported by employing multiple-injection strategies, similar to those used in automotive engines. I... |
<gh_stars>1-10
package parameter
type RelationshipTypeKind string
const (
RelationshipTypeKindParent RelationshipTypeKind = "PARENT"
RelationshipTypeKindChild RelationshipTypeKind = "CHILD"
RelationshipTypeKindSibling RelationshipTypeKind = "SIBLING"
RelationshipTypeKindXName RelationshipTypeKind = "X-NAME"
... |
// check condition and set state
func (f *FSM) doTransit(ctx context.Context, transition *Transition) error {
log.Printf("\t[fsm] start condition check for transit(%s)\n", transition.Key)
if transition.Condition != nil {
if flag, err := transition.Condition(ctx, transition.From.Name); err != nil {
log.Printf("\t... |
import React, { useState } from 'react';
import { storiesOf } from '@storybook/react';
import { CardOpenClose } from './CardOpenClose';
storiesOf('core/CardOpenClose', module)
.addParameters({ component: CardOpenClose })
.add('basic', () => {
const [isOpen, setIsOpen] = useState(false);
return (
<Ca... |
/*
* 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 2.0
* (the "License"); you may ... |
Tomorrow, Mozilla will release Firefox 3 Beta 3, the eleventh milestone in the longest development time for a Firefox revision since the initial Firefox 1.0 on 2004. The eight alphas and trio of betas (so far), if anything, are a reflection of the long list of enhancements it (Firefox) and the underlying Gecko renderin... |
#include "pch.h"
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main()
{
/*
pair<int, string> myPair_1(1, "Test_1");
pair<int, string> myPair_2(2, "Test_2");
pair<int, string> myPair_3(3, "Test_3");
cout << endl << " | " << myPair_1.first << " | " << myPair_1.second << endl;... |
def OnEpisodeFinishedCallback(
self,
env: Environment,
qfunc: QFunction,
episode_idx: int,
num_of_episodes: int,
episode_reward: float,
steps: int,
):
pass |
#include<bits/stdc++.h>
#define inf 0x3f3f3f3f
using namespace std;
typedef long long LL;
const int maxn=2e5+100;
LL pos[maxn];
int main()
{
string ss;
LL n,q;
cin>>n>>q;
cin>>ss;
pos[0]=0;
for(int i=1;i<=n;i++){
pos[i]=pos[i-1]+ss[i-1]-'a'+1;
//cout<<pos[i]<<" ";
... |
At the end of the French presidential debate between frontrunners Emmanuel Macron and Marine Le Pen, the National Front candidate (Le Pen) attacked her rival by saying that she hoped that his offshore Bahamian account would not be revealed. On the next day, she repeated this during a morning political talk show but pro... |
def convert_K(cube_name, output_folder, is_huge=True, verbose=False):
hdr = fits.getheader(cube_name)
new_hdr = hdr.copy()
new_hdr['BUNIT'] = 'K'
spec_shape = hdr['NAXIS3']
cube_K_name = os.path.join(output_folder,
f"{cube_name.rstrip('.fits')}_K.fits")
if is_huge:... |
// NewMember creates a new member.
// It panics if value type is not one of the return value type
// of Member As* methods.
func NewMember(val interface{}) Member {
m := &member{val: val}
m.Type()
return m
} |
package ivy
import (
"net"
"net/http"
)
// Dial dial a single connection to an IvyHub
func Dial(network, address, registration string) (c net.Conn, err error) {
// create REGISTER request
var req *http.Request
if req, err = NewRegisterRequest(registration); err != nil {
return
}
// dial
if c, err = net.Dial... |
/**
* @module botbuilder-testing
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/* eslint-disable @typescript-eslint/ban-types */
import {
Activity,
TestAdapter,
Middleware,
ConversationState,
MemoryStorage,
AutoSaveStateMiddleware,... |
<filename>src/base/model.ts
import { Field, ObjectType } from "@nestjs/graphql";
@ObjectType()
export class BaseModel{
@Field(()=> String, {nullable : true, name:"id"})
id : String
@Field(()=> Date, {defaultValue : Date.now(), name:"createdAt"})
createdAt : Date
} |
12 students who were injured in the clashes were rushed to hospital
12 students at a private engineering college in Punjab were injured after clashes erupted over Kashmiri students cheering for Pakistan in a cricket match against Sri Lanka.The college has been closed till September 8.The fight took place yesterday at ... |
Rodgers, the Liverpool manager, has targeted the midfielder for a potential £30 million move and has made an enquiry to the Russian club ahead of a possible bid before the transfer window closes.
Willian only moved to Anzhi in January from Shakhtar Donetsk but he has been put up for sale, together with all of his team... |
/**
* Use this class to execute requests <b>synchronously</b> against the Box REST API(V2). Full details about the Box API can be found at {@see <a
* href="http://developers.box.com/docs">http://developers.box.com/docs</a>} . You must have an OpenBox application with a valid API key to use the Box API. All
* methods... |
package projects
import "time"
const (
// GetSbomEndpoint is the current endpoint for retrieving an organization's SBOMs
GetSbomEndpoint = "v1/project/getSBOM"
// GetSbomsEndpoint is the current endpoint for retrieving an organization's SBOMs
GetSbomsEndpoint = "v1/project/getSBOMs"
)
// SourceDetails contains t... |
<reponame>Fintan-contents/example-chat
import React from 'react';
import './Label.css';
export const Label: React.FC<React.LabelHTMLAttributes<HTMLLabelElement>> = (props) => {
return (
<label className="Label" {...props}>{props.children}</label>
);
};
|
package source
import (
"context"
"sync"
"github.com/pkg/errors"
"k8s.io/client-go/util/workqueue"
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/runtime/inject"
"sigs.k8s.io/controller-runtime/pkg/source"
)
// Stoppable is a st... |
<reponame>FabianoVeglianti/syncope<gh_stars>100-1000
/*
* 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... |
/* Fetch IRQ information of specific IR index */
static int vtd_remap_irq_get(IntelIOMMUState *iommu, uint16_t index,
X86IOMMUIrq *irq, uint16_t sid)
{
VTD_IR_TableEntry irte = {};
int ret = 0;
ret = vtd_irte_get(iommu, index, &irte, sid);
if (ret) {
return ret;
... |
// GetNoticesOk returns a tuple with the Notices field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BTFeatureScriptEvalResponse1859) GetNoticesOk() (*[]BTNotice227, bool) {
if o == nil || o.Notices == nil {
return nil, false
}
return o.Notices, true
} |
import copy
from pprint import pprint
with open("input.txt") as f:
arr = [line.strip().split("-") for line in f.readlines()]
#print(arr)
connections = {}
for line in arr:
if line[0] in connections.keys():
connections[line[0]].append(line[1])
else:
connections[line[0]] = [line[1]]
if... |
/**
*
* @author Sandeep Reddy,Murthy
*
*/
public class SplunkAuthTokenProviderTest extends PowerMockTestCase{
@Mock
HttpClientProvider httpClientProvider;
// @Autowired
SplunkAuthTokenProvider splunkAuthTokenProvider;
// @Autowired
AlertBuilder alertBuilder;
private static final Logger logger = LoggerFactor... |
Preparation and thermal characteristics of caprylic acid based composite as phase change material for thermal energy storage
The present work is focused on the phase change behavior of the lately prepared caprylic acid based composite as phase change materials (PCMs) for thermal energy storage. The composite PCMs were... |
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;
/**
* <pre>
* You've got a way to kee... |
<gh_stars>10-100
import { emptyProjects } from "cypress/fixtures/db/emptyProjects";
import { realWorldState } from "cypress/fixtures/db/realworld-state";
import {
generatedEditorTestId,
schemaEditorTestId
} from "cypress/support/selectors";
import { treeTestId } from "cypress/support/tree";
import { DB_NAME } from ... |
def compute_normalized_histograms(channels, nbins=8, bins_range=(0,256)):
histograms = [ np.histogram(x, bins=nbins, range=bins_range)[0] for x in channels ]
hist_features = np.concatenate(histograms).astype(np.float64)
normed_features = hist_features / np.sum(hist_features)
return normed_features |
<reponame>majacQ/objective-c
#import <Foundation/Foundation.h>
#pragma mark Class forward
@class PNUUIDMetadata;
NS_ASSUME_NONNULL_BEGIN
#pragma mark Interface declaration
/**
* @brief Object which is used to represent \c chanel \c member.
*
* @author <NAME>
* @version 4.14.1
* @since 4.14.1
* @copyright ©... |
#!/usr/bin/env python
import os
import yaml
def actions_awstest(self):
"""Checks the GitHub Actions awstest is valid.
In addition to small test datasets run on GitHub Actions, we provide the possibility of testing the pipeline on AWS.
This should ensure that the pipeline runs as expected on AWS (which o... |
n = int(input())
a = [int(i) for i in input()]
u = [[] for i in range(10)]
u[2] = [2]
u[3] = [3]
u[4] = [2, 2, 3]
u[5] = [5]
u[6] = [3, 5]
u[7] = [7]
u[8] = [2, 2, 2, 7]
u[9] = [2, 3, 3, 7]
c = []
for i in a:
if i > 1:
c += u[i]
c.sort()
c = list(map(str,reversed(c)))
print(''... |
def check_ssl(self, ssl, sslmode, monitor=False, primary=False):
key = self.sslServerKey
crt = self.sslServerCert
crl = None
rootCert = self.sslCAFile
if self.sslSelfSigned:
key = os.path.join(self.datadir, "server.key")
crt = os.path.join(self.datadir, "s... |
/// Create a new Metadata with the given brokers
pub fn with_brokers(brokers: Vec<Broker>) -> Self {
Metadata {
brokers,
topic_partitions: HashMap::new(),
group_coordinators: HashMap::new(),
}
} |
/**
* The processor that takes care of user activation mapping to an account (outbound direction).
*
* @author Radovan Semancik
*/
@Component
public class ActivationProcessor {
private static final Trace LOGGER = TraceManager.getTrace(ActivationProcessor.class);
private static final QName SHADOW_EXISTS_PROPE... |
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
public static void main(String []args)throws IOException {
PrintWriter pw=new Prin... |
<filename>app/src/main/java/com/codepath/apps/dwitter/fragments/TweetsListFragment.java
package com.codepath.apps.dwitter.fragments;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefres... |
/// Receives the next incoming message and returns the message's content
/// (i.e., without the message size and without the HMAC tag) if the
/// message's HMAC tag is correct. Otherwise returns `SecureServerError`.
pub fn recv_message(&mut self) -> Result<Vec<u8>, SecureServerError> {
let mut sizebytes: [u8; 4... |
This has been the most difficult season of Baltimore Ravens quarterback Joe Flacco's six-year career.
His 14 interceptions are a career high. His 78.5 passer rating is a career worst. And his dislike of the Wildcat offense caused a backlash from fans.
But, as Flacco has so often repeated, it's all about wins with him... |
Natural cytotoxicity of human blood monocytes and natural killer cells and their cytotoxic factors: Discriminating effects of actinomycin D
The effect of actinomycin D on target susceptibility to human blood natural killer (NK) cells and monocytes was analysed in direct cell‐mediated and their cytotoxic factor‐mediate... |
Occupational Noise Induced Hearing Loss in India: A Systematic Review and Meta-Analysis
Background: India has over 50 million workers employed in industries with exposure to very high sound levels, predisposing them to noise-induced hearing loss (NIHL). Methods: We conducted a systematic review and meta-analysis by us... |
/**
* Transaction of the portfolio.
*/
@ApiModel(description = "Transaction of the portfolio.")
@JsonPropertyOrder({
PortfolioTransactionModifyDataTransaction.JSON_PROPERTY_ID,
PortfolioTransactionModifyDataTransaction.JSON_PROPERTY_NOTATION,
PortfolioTransactionModifyDataTransaction.JSON_PROPERTY_TIME,
Portf... |
/* access modifiers changed from: package-private */
public final void a(h<Void> hVar, t0 t0Var) {
Status m2;
if (t0Var == null || t0Var.m() == null) {
a(hVar, (Status) null);
return;
}
int t = t0Var.m().t();
this.f7889g.writeLock().lock();
if (t !... |
def process_middleware(self, user_agent, cache_get_many_calls_for_request=1):
fake_request = HttpRequest()
fake_request.META['HTTP_USER_AGENT'] = user_agent
with mock.patch.object(caches['default'], 'get_many', wraps=caches['default'].get_many) as mocked_code:
request_response = self... |
<reponame>VerdePeach/Speedik<filename>src/main/java/com/in726/app/model/Disk.java
package com.in726.app.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import javax.per... |
/**
* Class implementation for the method-reference annotation.
*
* @author JUnit-Tools-Team
*
*/
public class MethodRef {
private String name;
private String signature;
private boolean signatureChanged = false;
private String signatureNew;
private boolean unresolvedConfli... |
/// Gets a listof Meals from the API.
/// This has been extracted since its used in multiple functions.
/// Returns up to `limit` results (ordered by whatever the API returns)
async fn _get_filtered_meals_response(&self, url: String) -> Result<Option<Vec<String>>> {
let response = get(url).await?.text().await?;... |
Unit customization is not a natural fit for a strategy game, particularly not a 4X game where research and economic infrastructure are the chief drivers of military progress.
We don't even know where to start.
Armor bone is connected to the hip bone, flak cannon is connected to the shoulder bone...
Customize all you... |
Ownership structure and oppurtunistic accounting: A Case of listed food and beverage firms in Nigeria
Earnings management has been identified by regulators and practitioners as a tool used by managers to mislead investors about the underlying economic conditions of their firms. Although, the relationship between owner... |
import java.util.Scanner;
/**
* Created by leo on 16/12/15.
* http://codeforces.com/problemset/problem/158/A
* Next Round
* "Contestant who earns a score equal to or greater than the
* k-th place finisher's score will advance to the next round,
* as long as the contestant earns a positive score..." [excerpt
* f... |
///Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define ll long long
#define pll pair<ll,ll>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define cy cout<<"YES"<<endl
#define cn cout<<"NO"<<endl
using namespace std;
const ll inf=1e18;
con... |
<filename>source/svgnumber.h<gh_stars>0
#ifndef SVGNUMBER_H
#define SVGNUMBER_H
#include "svgproperty.h"
namespace lunasvg {
class SVGNumber : public SVGPropertyBase
{
public:
SVGNumber();
void setValue(double value) { m_value = value; }
double value() const { return m_value; }
std:... |
Characterization of the High Temperature Form of Fe2(MoO4)3
Ferric molyhdate in its high temperature orthorhomhic phase has been characterized by conductometric and thermogravimetric measurements. In the temperature range 793-973 K the compound can exist with O2 and MoO3 deficiencies. Defect models are proposed which ... |
import dedent from 'dedent';
export type WhoisTestResponse = {
server: string;
data: string;
};
export type WhoisIANATestResponse = WhoisTestResponse & {
refer: string;
};
export const iana: WhoisIANATestResponse = {
server: 'whois.iana.org',
refer: 'whois.nic.io',
data: dedent`
% IANA WHOI... |
def keyPressEvent(self, event):
if event.key() in [
QtCore.Qt.Key_Enter,
QtCore.Qt.Key_Return,
QtCore.Qt.Key_Tab,
QtCore.Qt.Key_Comma,
QtCore.Qt.Key_Space,
]:
tag = self.get_typed_text()
tag.strip()
self.add_... |
/*This file is part of the FEBio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio.txt for details.
Copyright (c) 2020 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any person obtaining ... |
<reponame>vaibhavsingh97/serverless-enigma
import os
import json
from random import randint
import giphy_client
from flask import Flask
from giphy_client.rest import ApiException
app = Flask(__name__)
api_instance = giphy_client.DefaultApi()
API_KEY = os.environ.get('GIPHY_TOKEN')
q = 'cat'
limit = 100
offset = 0
rat... |
def _register_heartbeat(self, hearbeat_filepath: str):
t_now = datetime.utcnow()
with open(f"{hearbeat_filepath}", "w") as file_obj:
file_obj.write(t_now.strftime("%Y-%m-%d %H:%M:%S")) |
<gh_stars>0
// Lisp core functions
#include <math.h>
#include "types.h" // Datatypes
#include "vars.h" // Variable tools
#ifndef CFUNC_H
#define CFUNC_H
#define ASSERTM(x,m) if (!(x)) {printf("\nFatal error: " m "\n\n"); exit(1);}
var_t *cons(var_t *var1,var_t *var2)
{
var_t *c=NEW(var_t);
c->type=CELL;
c->data.l=... |
info = [int(x) for x in input().split()]
string = [char for char in input()]
nums = []
num = 0
for i in range(len(string)):
if string[i] == "#":
num += 1
else:
if nums == 0:
num = 0
else:
nums.append(num)
num = 0
if sorted(nums, re... |
package main
import (
"strings"
)
func parseURL(url string, silent bool) string {
if !silent {
log(1, "Parsing URL %s...", bolden(url))
}
repoURL := url
// Trim
repoURL = strings.TrimSpace(repoURL)
repoURL = strings.TrimSuffix(repoURL, "/")
// Change protocol to http://
if split := strings.Split(repoURL... |
<filename>test/JsonStruct/deserialize.ts<gh_stars>1-10
import { JsonName, JsonStruct, deserialize } from './../../src';
class InnerClass {
@JsonName()
fieldToSerialize: string;
@JsonName('customName')
fieldTwo: number;
static fromServer(data: object): InnerClass {
return deserialize(data,... |
def do_change_name_selected(self):
cif = self.get_selected_cif()
if cif == None:
return
FileControlEditDialog(self.context, cif) |
/**
* Example of how to do closed multi-dimensional sequential
* pattern mining in source code.
* @author Philippe Fournier-Viger
*/
public class MainTestMultiDimSequentialPatternMiningClosed {
public static void main(String [] arg) throws IOException{
// Minimum absolute support = 50 %
double minsupp =... |
STUDENT Harry Bainbridge wrote his final year dissertation on rapper Kanye West.
The english literature undergraduate penned 10,492 words on reality star Kim Kardashian's singer husband.
5 Harry Bainbridge wrote 10,492 words on Kanye West for his dissertation
He titled his work: "I Love Kanye: Identity in the works ... |
<gh_stars>0
export { VueRenderService } from './VueRenderService'
|
/*
* Copyright (c) 2006-2017 DMDirc Developers
*
* 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, modify, merge,... |
The tighter credit policies also extend to the Streamline Refinance program, which allows borrowers with V.A. loans to refinance into another V.A. loan with very little paperwork and, until recently, no appraisal.
Mr. Long and V.A. representatives say that lenders are now requiring borrowers to pay for an appraisal, w... |
<reponame>Fiend-Star-666/Java-codes
package com.intern.carRental.primary;
import java.util.List;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOn... |
Taste solution consumption by FHH-Chr nBN consomic rats.
There has been extensive work to elucidate the behavioral and physiological mechanisms responsible for taste preferences of the rat but little attempt to delineate the underlying genetic architecture. Here, we exploit the FHH-Chr n(BN)/Mcwi consomic rat strain s... |
<gh_stars>0
/*
* (C) Copyright 2020 Radix DLT Ltd
*
* Radix DLT Ltd licenses this file to you 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
*
... |
/**
* Dig the next available piece of land if not done. As soon as it reaches
* bedrock, lava or goes below 0, it's considered done.
*/
@Override
public void updateEntity() {
super.updateEntity();
if (worldObj.isRemote) {
return;
}
if (updateTracker.markTimeIfDelay(worldObj)) {
sendNetworkUpdate();... |
from collections import defaultdict
import logging
import math
logger = logging.getLogger('lobster.algo')
class Algo(object):
"""A task creation algorithm
Attempts to be fair when creating tasks by making sure that tasks are
created evenly for every category and every workflow in each category
bas... |
Congenital hypothyroidism in Indian preterm babies - screening, prevalence, and aetiology.
INTRODUCTION
Paucity of data on hypothyroidism in Indian preterms. Aim of the study: To describe the prevalence, aetiology, and experience with screening for primary hypothyroidism in preterm babies.
MATERIAL AND METHODS
A pro... |
cityscape The Switch to Presto Could Make Life a Lot Harder for Seniors and Students
Until 2017, discounted fares will only be available at Davisville station.
Renz Gamboa uses the TTC every day. He’s a student who attends school in Toronto, and he used to purchase a Metropass for his commute.
He didn’t know about t... |
<filename>UnicornBattle/Assets/AppCenter/Plugins/iOS/Crashes/Utility/NSErrorHelper.h
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the MIT license.
extern "C" const char* app_center_unity_nserror_domain(void* error);
extern "C" long app_center_unity_nserror_code(void* error);
extern... |
package signaling
import (
"fmt"
"github.com/ysugimoto/signalingo/connection"
"github.com/ysugimoto/signalingo/env"
"github.com/ysugimoto/signalingo/hooks"
"github.com/ysugimoto/signalingo/logger"
"github.com/ysugimoto/signalingo/operation"
"golang.org/x/net/websocket"
"net/http"
)
var manager *Manager
func ... |
The Effect of Taxes on the Performance of the Stock Market-Arab Stock Markets as A Model
The research aims to provide a comprehensive and in-depth picture of the theoretical frameworks and empirical studies that framed and explained the mechanism of transmission of direct and indirect influence through which taxes can... |
//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 1993 - 2000 California Institute of Technology //
// //
// Read the COPYING and README files, or contact '<EMAIL>', //
// before co... |
/**
* Created by liyou on 18/11/7.
*/
public class ArticleModel implements ArticleDetailContract.Model {
@Override
public void loadArticleList(int page, RequestListener<PageEntity<ArticleEntity>> listener) {
OkGo.<BaseResponse<PageEntity<ArticleEntity>>>get(Urls.ARTICLE + page + "/json")
... |
/// Wrap a future with one that will timeout when this timeout expires.
pub fn mix<'a, 'b, R, F>(
&'a self,
f: F,
) -> impl std::future::Future<Output = KitsuneResult<R>> + 'b + Send
where
R: 'b,
F: std::future::Future<Output = KitsuneResult<R>> + 'b + Send,
{
let tim... |
Assessment and application of potential food provisioning services of ecosystems in Three-gorge areas
The assessment of food provisioning services of ecosystems in Three-gorge areas is helpful for better understanding the function of ecosystems in local human well-beings. In this paper, process-based models are used t... |
/**
* Update the the right side of the panel to display the selected node
*
* @param event the selection event indicating what node was selecteds
*/
@Override
public void nodeSelected(RejTreeNodeSelectionEvent event) {
RejTreeNodeView view = event.getNode().getView();
int curDivi... |
from sys import stdin, stdout
def find(A,B):
return (B//2)*A+(-(-A//2) if B%2 else 0)
def main():
for _ in range(int(stdin.readline())):
A,B=sorted(map(int, stdin.readline().split()))
print(find(A,B))
main() |
‘I did a good deed by killing a Turkish gendarme,’ Niğde assailant says
NİĞDE
The perpetrator identified as Ç.R., a Swiss national who was first reported as being from Kosovo, was arrested by the court with two others captured after the March 20 attack.
One of the perpetrators of an attack against Turkish gendarmes ... |
Real Madrid sign the best young player in Brazil for €45m: Vinicius Junior
Real Madrid sign another young talent
As Real Madrid continue to challenge for the double of La Liga and the Champions League this season, they are also making huge waves in the transfer market as well.
On Sunday, Brazilian newspaper Globoesp... |
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from '@cartella/env/environment';
@Injectable({
providedIn: 'root',
})
export class ResetPasswordService {
resetEndpoint = `${environment.api}/auth/reset`;
verifyEndpoint = `${environment.api}/au... |
/*////////////////////////////////////////////////////////////////////////
Copyright (c) 1997-2000 <NAME> and ETL,AIST,MITI
Copyright (c) 2001-2006 National Institute of Advanced Industrial Science and Technology (AIST)
AIST-Product-ID: 2000-ETL-198715-01, H14PRO-049, H15PRO-165, H18PRO-443
Permission to use this mate... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.