content stringlengths 10 4.9M |
|---|
/** determinant of matrix
*
* Computes determinant of matrix m, returning d
*/
static final void DETERMINANT_3X3(final RefFloat d, mat3f m)
{
d.d = m.f[M(0,0)] * (m.f[M(1,1)]*m.f[M(2,2)] - m.f[M(1,2)] * m.f[M(2,1)]);
d.d -= m.f[M(0,1)] * (m.f[M(1,0)]*m.f[M(2,2)] - m.f[M(1,2)] * m.f[M(2,0)]... |
// Read reads data from the connection.
// No deadline is set if the Conn read timeout is the zero value.
// A deadline, defined as current time + read timeout, is set otherwise.
//
// See net.Conn.Read for more information.
func (c *conn) Read(b []byte) (int, error) {
if c.readTimeout != 0 {
if err := c.Conn.SetRea... |
package org.aksw.sparqlify.admin.web.api;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
public class CollectionJpa<T> {
private EntityManagerFactory emf;
private Class<T> clazz;
public CollectionJpa(Class<T> clazz, EntityManagerFactory emf) {
this.emf = em... |
High speed arithmetic Architecture of Parallel Multiplier – Accumulator Based on Radix-2 Modified Booth Algorithm
The sustained growth in VLSI technology is fuelled by the continued shrinking of transistor to ever smaller dimension. The benefits of min iaturization are high packing densities, high circuit speed and lo... |
def solve(vec_lst):
x_sum = 0
y_sum = 0
z_sum = 0
for vec in vec_lst:
x_sum += vec[0]
y_sum += vec[1]
z_sum += vec[2]
if x_sum != 0 or y_sum != 0 or z_sum != 0:
print("NO")
else:
print("YES")
n = int(input())
vec_lst = []
for x ... |
Some of the eagle-eyed amongst you will have already noticed, but Elite Dangerous and Frontier Developments have been shortlisted for no less than FOUR Golden Joystick awards. They are...
Best Audio
Best moment (Hyperspace)
Studio of the Year
Best PC Game
Being nominated for any award is incredible but the Golden ... |
/**
* A {@link ConfigWriter} for protobuf format config files.
*/
public final class ProtoConfigWriter implements ConfigWriter {
private final OutputStream writer;
private final boolean writeAsText;
private final ConfigProto.Builder builder;
/**
* Constructs a writer for a protobuf config file... |
/*
* 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")... |
In college, I was in a sort of “future broadcasters” club with a bunch of other students who were looking to do television hosting, news anchoring, radio announcing, podcasting, etc. The majority of us were women, so we often talked about gender-specific issues. When Gretchen Carlson sued Roger Ailes for sexual harassm... |
News Corporation, run by billionaire Rupert Murdoch, has formally entered into the process to buy Frank McCourt's Los Angeles Dodgers, according to the Wall Street Journal. News Corp.'s Fox unit is interested in buying a 15% to 20% piece of the MLB team.
The move by News Corp., which owned the Dodgers from 1998 to 200... |
Enhanced therapeutic effect of cis-diamminedichloroplatinum(II) against nude mouse grown human pancreatic adenocarcinoma when combined with 1-beta-D-arabinofuranosylcytosine and caffeine.
We demonstrated previously that the effect of cis-diamminedichloroplatinum(II) (cisplatin) against pancreatic cancer was substantia... |
def AdaptCursorOffsetIfNeeded( sanitized_html, cursor_offset ):
preceding_angle_bracket_index = cursor_offset
while True:
if preceding_angle_bracket_index < 0:
return cursor_offset
char = sanitized_html[ preceding_angle_bracket_index ]
if preceding_angle_bracket_index != cursor_offset and char == ... |
France's glacial pace of reform could push the eurozone to "breaking point" if another crisis hits the 18-nation bloc, a leading think tank has warned.
The Centre for Economics and Business Research (CEBR) said that although the rest of the eurozone – including peripheral economies of Portugal, Italy, Ireland, Greece ... |
/*
* Copyright 2017, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME> <<EMAIL>>
*/
#include <unicode/uversion.h>
#include <RelativeDateTimeFormat.h>
#include <stdlib.h>
#include <time.h>
#include <unicode/gregocal.h>
#include <unicode/reldatefmt.h>
#inc... |
/// Check a filepath to see if it is an existing and valid KWFD file
/**
* If a feature_descriptor_io algorithm is not specified only check that the
* file exists. Otherwise read the file and make sure it is valid.
*/
bool valid_feature_file_exists( std::string const& filepath,
kwive... |
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
ll n,k,s;
cin>>n>>k>>s;
ll diff=n-1;
if(diff*k<s || k>s)
{
cout<<"NO"<<endl;
}
else
{
cout<<"YES"<<endl;
vector<int> ans;
for(int i=0;i<k;i++)ans.push_back(... |
<gh_stars>0
/**
* \file randomservice/randomservice_instance_create.c
*
* \brief Create a randomservice instance.
*
* \copyright 2019 Velo Payments, Inc. All rights reserved.
*/
#include <agentd/randomservice/private/randomservice.h>
#include <cbmc/model_assert.h>
#include <unistd.h>
#include <vpr/parameters.h>... |
<gh_stars>0
package br.dominioL.estruturados.testes;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import br.dominioL.estruturados.elemento.primitivos.Booleano;
import br.dominioL.estruturados.elemento.primitivos.Numero;
import br.dominioL.es... |
Conventional wisdom holds that many of the favorite silent movie actors who failed to survive the transition to sound films—or talkies—in the late-1920s/early-1930s were done in by voices in some way unsuited to the new medium. Talkies are thought to have ruined the career of John Gilbert, for instance, because his “sq... |
REPRESENTING AND RECOGNIZING POINT OF VIEW Warren Sack
A representation of ideological point of view is articulated and a method for detecting the point(s) of view expressed in a news story is described. A version of the method, actor-role analysis, is encoded in a computer program, SpinDoetor, which can automatically... |
package core.backend.restaurant.dto;
import core.backend.menu.dto.MenuResponseDto;
import core.backend.restaurant.domain.Location;
import core.backend.restaurant.domain.Restaurant;
import lombok.Getter;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
@Getter
public class Re... |
/**
* Save the CT log currently being edited.
* @return an empty string on failure or the constant string CT_LOG_SAVED on success
* @throws IllegalStateException if there is no CT log to save
*/
public String saveCtLogBeingEdited() {
if (ctLogEditor.getCtLogBeingEdited() == null) {
... |
/*************************************************************************
* Copyright (c) 2013 eProsima. All rights reserved.
*
* This copy of FASTRPC is licensed to you under the terms described in the
* FASTRPC_LICENSE file included in this distribution.
*
******************************************************... |
The reception history of Beowulf
This paper traces both the scholarly and popular reception of the Old English epic Beowulf from the publication of the first edition of the poem in 1815 to the most recent English novel based on it from 2019. Once the work was first made available to the scholarly community, numerous e... |
/**
* Produces events simulating stocks from the AEX.
*/
static public class AEXStocksEventPullSource extends EventPullSource {
String[] stocks = {"abn amro", "26",
"aegon", "38",
"ahold", "34",
"akzo nobel", "51",
"asm lith h", "26",
"corus plc", "2",
"dsm", "40",
"elsevie... |
def process_game_rules_for_user(
self,
user: RedditUser,
author: Redditor,
unread_item: Comment,
patch_notes_line_number: int,
) -> bool:
if not user.can_submit_guess:
return True
user.num_guesses += 1
if user.num_guesses >= MAX_NUM_GUESSES... |
<gh_stars>1-10
#pragma once
#include "CesiumGeospatial/Ellipsoid.h"
#include "CesiumGeospatial/Library.h"
#include <glm/mat4x4.hpp>
#include <glm/vec3.hpp>
namespace CesiumGeospatial {
/**
* @brief Transforms positions to various reference frames.
*/
class CESIUMGEOSPATIAL_API Transforms final {
public:
/**
*... |
import enum
from django.utils.translation import gettext_lazy as _
class UserConfirmationRequestStatus(enum.Enum):
created = 'created'
sent = 'sent'
confirmed = 'confirmed'
cancelled = 'cancelled'
@classmethod
def translation(cls):
return {
cls.created: _('Created'),
... |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
// Copyright (c) 2006-2008 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.
#ifndef BASE_PORT_H_
#de... |
Adult primary gastric volvulus, a report of two cases.
Gastric volvulus is the medical situation that a stomach is twisted beyond the physiological range. It is a rare disease which is hard to experience in routine medical examination. Principally surgical treatment is essential for the acute type. However, the conser... |
import factory
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.urls import reverse
from faker import Faker
from auto_repair_saas.apps.authentication.models import User
from auto_repair_saas.apps.contacts.models import Contact
from auto_repair_saas.apps.jobs.m... |
package xjson
import "testing"
func TestJsonStr_UnmarshalJSON(t *testing.T) {
s := `{"name": "key1", value:"value1"}`
var s1 JsonStr
err := s1.UnmarshalJSON([]byte(s))
if err != nil {
t.Fatal(err)
}
t.Log("s1.UnmarshalJSON:", s1)
bytes, err := s1.MarshalJSON()
if err != nil {
t.Fatal(err)
}
t.Log("s1.M... |
def build_model(cls, args, task):
if args.decoder_layers_to_keep:
args.decoder_layers = len(args.decoder_layers_to_keep.split(","))
if getattr(args, "max_target_positions", None) is None:
args.max_target_positions = getattr(
args, "tokens_per_sample", DEFAULT_MAX_... |
Adsorption of amino acids on graphene: assessment of current force fields.
We compare the free energies of adsorption (ΔAads) and the structural preferences of amino acids on graphene obtained using the non-polarizable force fields-Amberff99SB-ILDN/TIP3P, CHARMM36/modified-TIP3P, OPLS-AA/M/TIP3P, and Amber03w/TIP4P/20... |
def shuffle(self):
for i in range(len(self.layers) - 1):
d0, d1 = self.layers[i], self.layers[i + 1]
w = NNChromosome._random([d0, d1])
b = NNChromosome._random([d1])
self.layers_wb.append((w, b)) |
The characteristics of intestinal injury peripheral to strangulating obstruction lesions in the equine small intestine.
Recent studies suggest that horses requiring surgical correction of strangulating intestinal obstruction may develop post operative complications as a result of ischaemia/reperfusion injury. Therefor... |
def _CreateExtractionWorker(self, worker_number, options):
proxy_server = rpc_proxy.StandardRpcProxyServer()
extraction_worker = self._engine.CreateExtractionWorker(
worker_number, rpc_proxy=proxy_server)
extraction_worker.SetDebugMode(self._debug_mode)
extraction_worker.SetSingleProcessMode(sel... |
// -*- C++ -*-
//
// Package: JetPlusTracks
// Class: JetPlusTrackProducer
//
/**\class JetPlusTrackProducer JetPlusTrackProducer.cc JetPlusTrackProducer.cc
Description: [one line class summary]
Implementation:
[Notes on implementation]
*/
//
// Original Author: Olga Kodolova,40 R-A12,+41227671273,
//... |
<reponame>ezLeaks/backdoored
package javassist.compiler;
import javassist.bytecode.*;
import javassist.compiler.ast.*;
import javassist.*;
public class JvstCodeGen extends MemberCodeGen
{
String paramArrayName;
String paramListName;
CtClass[] paramTypeList;
private int paramVarBase;
private boolea... |
def _make_downloader_mock(self):
def _download(url, tmpdir_path, verify):
del verify
self.downloaded_urls.append(url)
filename = self.dl_fnames.get(url, os.path.basename(url))
path = os.path.join(tmpdir_path, filename)
self.fs.add_file(path)
dl_result = downloader.DownloadResul... |
// LookupLocationContext performs a location lookup. If you want memoisation
// of the results, you should use MaybeLookupLocationContext.
func (s *Session) LookupLocationContext(ctx context.Context) (*geolocate.Results, error) {
task := geolocate.NewTask(geolocate.Config{
Logger: s.Logger(),
Resolver: s.resol... |
A fight at Silver Springs Park on Monday evening drew a large crowd of spectators including Bree Holloman who said she went only to observe from the sidelines. "I feel like I shouldn't have even shown up, but at the same time, I didn't want to fight and why would they fight me?" she questioned.
As Holloman watched var... |
It's the breast vegetable we've seen for a long time: Farmer discovers hilarious rude-shaped potato while harvesting his crop
Potato found by amused workers at Farndon Fields farm near Leicester
Farmer says the potato is one of the strangest he has seen in 30 years
Staff keep potato in a locked drawer t o preserve i... |
// TestCreateServiceInstanceWithAuthError tests creating a SerivceInstance when
// the secret containing the broker authorization info cannot be found.
func TestCreateServiceInstanceWithAuthError(t *testing.T) {
ct := &controllerTest{
t: t,
broker: func() *v1beta1.ClusterServiceBroker {
b := getTestBroker()
... |
#include <bits/stdc++.h>
typedef long long int ll;
#define MAX 1000000001
#define fio ios_base::sync_with_stdio(false);
using namespace std;
int main() {
fio;
int n,m,temp,count=0;
vector<int> has,take;
cin>>n>>m;
for(int i=0;i<n;i++) {cin>>temp; has.push_back(temp);}
sort(has.begin(),has.end());
f... |
from snakemake import shell
input, output, params, threads, wildcards, config = snakemake.input, snakemake.output, snakemake.params, snakemake.threads, snakemake.wildcards, snakemake.config
if config['y'][wildcards.yid]['t'][wildcards.sid]['paired']:
shell("""
trimmomatic PE -threads {threads} \
{input.r1} ... |
<gh_stars>1-10
{-# LANGUAGE TemplateHaskell #-}
module UnitTest.CallbackParse.ThreadControl where
import Data.Aeson (Value)
import Data.Yaml.TH (decodeFile)
import Test.Tasty as Tasty
import Web.Facebook.Messenger
import UnitTest.Internal
--------------------
-- THREAD CONTROL --
--------------------
threadContro... |
/**
* Klasa definiuje typ calkowitoliczbowy, ktory moze zostac wlaczony
* do systemu typow rozpoznawanych przez silnik.
* <p>
* Typ ten przechowuje wartosci calkowite w obiekcie {@link IntegerHolder},
* ktory moze reprezentowac:
* <ul>
* <li>liczby calkowite z przedzialu od -9223372036854775808 do 92233720368547... |
<reponame>applibgroup/FancyButtons
package com.rilixtech.themify_icons_typeface;
import android.content.Context;
import android.graphics.Typeface;
import com.rilixtech.materialfancybutton.typeface.IIcon;
import com.rilixtech.materialfancybutton.typeface.ITypeface;
import java.util.Collection;
import java.util.HashMap;... |
def display_dynamic_tags(self):
has_dynamic_sections = False
for section in self.elffile.iter_sections():
if not isinstance(section, DynamicSection):
continue
has_dynamic_sections = True
self._emitline("\nDynamic section at offset %s contains %s entrie... |
def _calculate_pitch(self, lat_sat, long_sat, alt_sat, lat_drone, long_drone, alt_drone):
R = 6371000
lat_sat = math.radians(lat_sat)
lat_drone = math.radians(lat_drone)
long_sat = math.radians(long_sat)
long_drone = math.radians(long_drone)
delta_long = long_drone - long... |
/**
* Decodes the {@link Genotype} to a phenotype by using a SAT/PB solver.
*
* @param genotype
* the genotype
* @return the phenotype
*/
protected Model decodeSATGenotype(Genotype genotype) {
if (!isInit) {
init();
}
return manager.decodeSATGenotype(variables, genotype);
} |
def delete_project(lookoutvision_client, project_name):
try:
logger.info("Deleting project: %s", project_name)
response = lookoutvision_client.delete_project(ProjectName=project_name)
logger.info("Deleted project ARN: %s ", response["ProjectArn"])
except ClientError a... |
/** create img with relative filename.
*
* @param filename (caller is responsible for anchoring this)
* @return
*/
private HtmlImg createHtmlImg(String filename) {
HtmlImg img = new HtmlImg();
img.setSrc(filename);
return img;
} |
def fill_between_curves_uv(blk, crvlist, tr=False, reverse=True, sty={}, eps=1e-24):
style = dict(fc='c', ec='none', lw=0.25, zorder=100)
uv=dict(umin=-np.inf, umax=np.inf, vmin=-np.inf, vmax=np.inf)
uv.update(blk.uvbounds)
umin, umax = uv['umin'], uv['umax']
vmin, vmax = uv['vmin'], uv['vmax']
umin, umax, vmin, ... |
import torch
from rlpyt.utils.tensor import to_onehot, from_onehot
class DiscreteMixin:
"""Conversions to and from one-hot."""
def __init__(self, dim, dtype=torch.long, onehot_dtype=torch.float):
self._dim = dim
self.dtype = dtype
self.onehot_dtype = onehot_dtype
@property
... |
import * as React from "react";
import { IEmojiProps } from "../../styled";
const SvgAnimalMammal20 = (props: IEmojiProps) => (
<svg viewBox="0 0 72 72" width="1em" height="1em" {...props}>
<path
fill="#A57939"
d="M21.588 15.085l-2.25 3.625-4.25 2-4.5 5.375-1.5 4.5 1.5 3 4.25.375 5.875-1.125s1.46.396... |
Five years ago, a little after midnight as 2012 had just begun, we started to get emails.
Later that morning, we realized that what was happening was significant enough to write a story about it. A woman named Debbie Cook had sent her fellow Scientologists a message for the new year, and it was hitting Scientology lik... |
class LIIWebClient:
""" A client for the LIIWeb JSON API that makes it easier to work with content in LIIWeb.
"""
timeout = 5 * 60
def __init__(self, url, username, password):
"""
Create a new client.
:param url: LII URL
:param username: LII API user username
:p... |
use ahash::AHashSet;
use crate::api::{Dedup, HasKey, PartitionByKey, Unary};
use crate::stream::Stream;
use crate::tag::tools::map::TidyTagMap;
use crate::{BuildJobError, Data};
impl<D: Data + HasKey> Dedup<D> for Stream<D> {
fn dedup(self) -> Result<Stream<D>, BuildJobError> {
self.partition_by_key().una... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int []a = new int[n];
int []c = new int[9];
int cn = 0;
int min = 0; int max = 0;
for(int i=0; i<n; i++) {
a[i] = sc.nextInt();
}... |
N , M , K = map(int, raw_input().split() )
a = N - M
Mod = 1000000009 ;
def calc( n ):
n += 1
res = 1 ; add = 2 ;
while( n ):
if n&1 :
res = ( res * add ) % Mod ;
add = ( add * add ) % Mod ;
n >>= 1 ;
return res - 2 ;
if ( N<=a*K+K-1 ):
... |
public class helloworld{
public static void main(String[] args) {
String nama, kelas, nim;
nama = "Irsyaadul_Ibaad";
kelas = "D3IF4401";
nim = "6706202089";
System.out.println("Nama = " + nama);
System.out.println("NIM = " + nim);
System.out.println("Kelass = " + kelas);
}
}
|
/**
* This uses a ThreadLocal to bind an externalization strategy based on the invoking subsystem. In other
* words, when we know we're serializing for Server-Agent communication then set to AGENT, when we know we're
* serializing for RemoteClient-Server communication set to REMOTEAPI. By keeping this info on the t... |
<filename>break.cpp
#include<bits/stdc++.h>
using namespace std;
main()
{
int n;
cin>>n;
for(int i=0; ;i++)
{
n=n-3;
if(n<0)
{
break;
}
cout<<n<<endl;
}
}
|
Abstract
Explanations for the persistence of violence in the eastern part of the Democratic Republic of Congo blame the incendiary actions of domestic and regional leaders, as well as the inefficacy of international peace-building efforts. Based on several years of ethnographic research, this article adds another piec... |
<reponame>blockchainreg/kava
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"strings"
"time"
"github.com/cosmos/cosmos-sdk/codec"
crkeys "github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkrest "github.com/cosmos/cosmos-sdk/types/rest"
"github.com/cosmos/cosmo... |
<reponame>metux/chromium-deb
// Copyright 2017 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.
#include "components/subresource_filter/content/browser/page_load_statistics.h"
#include "base/logging.h"
#include "base/met... |
/*
* drivers/i2c/muxes/i2c-mux-mlxcpld.c
* Copyright (c) 2016 Mellanox Technologies. All rights reserved.
* Copyright (c) 2016 Michael Shych <michaels@mellanox.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
... |
//! Load configuration values from a JSON file
//! @param[in] jsonFilename file (including path if needed) of config.json
//! @param[out] json object with parameters: T, {x,y}{min,max}, Nx, Ny, cfl
nlohmann::json loadConfig(std::string jsonFilename) {
std::ifstream i(jsonFilename);
assert(i.good() && "config.js... |
package info.xiaomo.core.network.mina.code;
import java.net.URLDecoder;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apa... |
def vscroll(self, steps=1):
for col in range(self.columns):
bits = self[col::self.columns]
if steps > 0:
self[col::self.columns] = bitops.rotater(bits, steps)
elif steps < 0:
self[col::self.columns] = bitops.rotatel(bits, abs(steps)) |
/**
* Set an array of CGI filenames/handler functions
*
* @param cgis an array of CGI filenames/handler functions
* @param num_handlers number of elements in the 'cgis' array
*/
void http_set_cgi_handlers(const tCGI *cgis, int num_handlers)
{
LWIP_ASSERT("no cgis given", cgis != NULL);
LWIP_ASSERT("invalid... |
<filename>3dphotography.py
# from DepthEstimation.inference import main
# main()
# print('Depth Estimation Done!')
import os
from Inpainting import main
print('impainting started')
for i in os.listdir("Input"):
main.inpaint(i)
|
package mux
// RouteFactoryFunc is an interface to bundle related routes under shared
// route settings.
type RouteFactoryFunc func(RouteFactory)
// RouteFactory creates routes.
type RouteFactory interface {
Get(string, HandlerFunc) *Route
Post(string, HandlerFunc) *Route
Put(string, HandlerFunc) *Route
Delete... |
<reponame>MgArreaza13/wonderhumans
from django.contrib import admin
from apps.portfolio.models import HomelessPortfolio
# Register your models here.
admin.site.register(HomelessPortfolio) |
Passive detection of subpixel obstacles for flight safety
Military aircraft fly below 100 ft. above ground level in support of their missions. These aircraft include fixed and rotary wing and may be manned or unmanned. Flying at these low altitudes presents a safety hazard to the aircrew and aircraft, due to the occur... |
<reponame>gbtec-michaelhoppe/ocl.js<filename>lib/components/expressions/context/OperationContextExpression.ts
import { ContextExpression } from './ContextExpression';
import { OclExecutionContext } from '../../OclExecutionContext';
import { OclValidationError } from '../../OclValidationError';
import { PreExpression } ... |
<reponame>cndracos/voogasalad_oneclassonemethod
package authoring.entities;
import engine.components.Jumps;
import engine.components.Lives;
import engine.components.Player;
import engine.components.Score;
import engine.components.presets.BottomCollision;
import engine.components.presets.PlayerMovement;
import javafx.s... |
def status(self):
if not self.volume:
status = volume_status.NONE
elif self._status and self._last_status_check >= time.time() - MIN_TIME_BETWEEN_STATUS_CHECKS:
status = self._status
else:
try:
self.volume.update()
status = volu... |
/*--------------------------------------------------------------*/
/* */
/* execute_redefine_world_event */
/* */
/* execute_redefine_world_event.c - creates a world object */
/* */
/* NAME */
/* execute_redefine_world_event.c - creates a world o... |
package e2e
import (
"context"
"fmt"
"net/url"
"reflect"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"github.com/open-cluster-management/multicloud-operators-foundation/pkg/utils"
e2eutil "github.com/open-cluster-management/multicloud-operators-foundation/test/e2e/util"
configv1 "github.com/openshift/a... |
<reponame>EQt/graphidx<gh_stars>1-10
#pragma once
#include <cctype>
#include <cstdint>
#include <istream>
#include <functional>
/**
Check that the first character is a digit and parse it as number
*/
template <typename int_ = size_t>
struct check_uint
{
int_ &n;
check_uint(int_ &n) : n(n) {}
};
template ... |
/**
* Creates validation bindings for the controls on this page.
*/
private void bindControls() {
initializeValidators();
usingKeyPairObservable = SWTObservables.observeSelection(usingKeyPair);
bindingContext.bindValue(usingKeyPairObservable,
PojoObservables.observeValu... |
/*
* Creates a new key_returned_t and prepends it to a list.
*
* Side effects:
* - updates *list to point to a new head.
*/
static key_returned_t *
_key_returned_prepend (_mongocrypt_key_broker_t *kb,
key_returned_t **list,
_mongocrypt_key_doc_t *key_doc)
{
key_retu... |
<reponame>viniciusbmello/bossabox-front-v2
import styled from 'styled-components';
const Layout = styled.li`
& {
list-style: none !important;
}
.card {
margin-bottom: 1rem;
padding: 1rem 1rem 2rem 2rem;
background: ${props => props.theme.colors.white};
border: 1px solid ${props => props.them... |
/**
* Runs the sanity test for getMinChildIdx() given in the write-up.
*/
@Test
public void testGetMinChildIdxSanity() {
List<Integer> startingList = Arrays.asList(new Integer[]{5,3,4});
sanityIntegerHeap.list = new ArrayList<>(startingList);
assertEquals(1, sanityIntegerHeap.get... |
/**
* Appends a string representation of the first argument in the radix specified by the second argument.
*
* @param value the number to append
* @param base the radix that the specified value should be converted to before append
* @return this
* @throws BufferOverflowException if ... |
A Transfer Model Based on Supervised Multi-Layer Dictionary Learning for Brain Tumor MRI Image Recognition
Artificial intelligence (AI) is an effective technology for automatic brain tumor MRI image recognition. The training of an AI model requires a large number of labeled data, but medical data needs to be labeled b... |
/**
* This class contains a couple of static methods for converting
* between Fahrenheit and Celsius. The methods are mapped to
* el functions in the book examples TLD file.
*
* @author Hans Bergsten, Gefion software <hans@gefionsoftware.com>
* @version 1.0
*/
public class TempConverter {
/**
... |
Homosexual Activist Admits True Purpose of Battle is to Destroy Marriage
Even knowing that there are radicals in all movements, doesn’t lessen the startling admission recently by lesbian journalist Masha Gessen. On a radio show she actually admits that homosexual activists are lying about their radical political agend... |
Context-oriented programming: beyond layers
While many software systems today have to be aware of the context in which they are executing, there is still little support for structuring a program with respect to context. A first step towards better context-orientation was the introduction of method layers. This paper p... |
/**
* Class to run a CallerInfoAsyncQuery in a separate thread, with
* its own Looper. We cannot use the main Looper because on the
* 1st quit the thread is maked dead, ie no further test can use
* it. Also there is not way to inject a Looper instance in the
* query, so we have to use a thread ... |
package repository_manage
import (
"github.com/anden007/afocus-godf/src/interfaces"
"github.com/anden007/afocus-godf/src/model/model_manage"
"github.com/google/uuid"
)
type DepartmentRepository struct{}
func NewDepartmentRepository() *DepartmentRepository {
instance := new(DepartmentRepository)
return instance... |
//
// ISecurityGuardSimulatorDetect.h
// SecurityGuardMain
//
// Created by lifengzhong on 15/11/10.
// Copyright © 2015年 <NAME>. All rights reserved.
//
#ifndef ISecurityGuardSimulatorDetect_h
#define ISecurityGuardSimulatorDetect_h
#if TARGET_OS_WATCH
#import <SecurityGuardSDKWatch/SimulatorDetect/ISimulatorDet... |
/**
* Created by Anton Nashatyrev on 14.12.2018.
*/
public class DaemonChannelHandler implements Closeable, AutoCloseable {
private final Channel channel;
private final boolean isInitiator;
private Queue<ResponseBuilder> respBuildQueue = new ConcurrentLinkedQueue<>();
private StreamHandler<MuxerAdres... |
import { IncomingMessage } from 'http'
import { parse } from 'url'
import { getBalanceDev } from 'dev-distribution/src/libs'
import { AddressBalance, DistributionTarget } from 'dev-distribution/src/types'
import { get } from 'request'
type DistributionTargets = ReadonlyArray<DistributionTarget>
const proto = 'https'
... |
<filename>src/panchang.py<gh_stars>0
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# panchang.py -- routines for computing tithi, vara, etc.
#
# Copyright (C) 2013 <NAME> <<EMAIL>>
# Downloaded from https://github.com/bdsatish/drik-panchanga
#
# This file is part of the "drik-panchanga" Python library
# for computing... |
def handle(self,msgBytes):
msg = disco_capnp.DiscoReq.from_bytes(msgBytes)
which = msg.which()
if which == 'actorReg':
self.handleActorReg(msg)
elif which == "serviceReg":
self.handleServiceReg(msg)
elif which == "serviceLookup":
self.handleSer... |
Social Bonds, Self-Control, and Adult Criminality
Recent modifications to self-control theory suggest that influential factors (bonds) equate to self-control in the calculation of whether or not to engage in deviant behavior. Hirschi argued that self-control should fare better as a theory when it is operationalized as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.