content stringlengths 10 4.9M |
|---|
/**
* Handles mouse events when the user enters or exits the random button.
* makes the dice shake.
*
* @author David Bahr
*/
private class ShakeDiceListener extends MouseAdapter
{
/**
* Make the dice start shaking.
*/
public void mouseEntered(MouseEvent e)
{
// make the dice shak... |
package service.configuration;
import java.util.Properties;
/**
* Created by nitina on 8/26/17.
*/
public interface IConfiguration {
Properties getProperties();
public String getErrorMessage();
}
|
import sys
A = sys.stdin.readline().strip()
res = 0
while A:
t = A[0]; A = A[1:]
for i in range(1,5):
if A and A[0] == t:
A = A[1:]
res += 1
print res
|
/* Inline helper to place the tv image */
static inline void
put_image (void)
{
blit(bmp,screen,0,0,0,0,320,200);
} |
package cn.xcom.banjing.activity;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.view.Window;
import android.widget.RelativeLayout;
import android.widget.Toast;
import ... |
class Machine:
"""The class that will send data to the machine."""
def __init__(self, *args, **kargs):
self.parent = args[0]
self.update_status = self.parent.sb.SetStatusText
self.read_status = self.parent.sb.GetStatusText
self.com = Communicate(self)
self.steps_per_pixel = 600
self.z_steps... |
/**
* Metodo responsavel para a atualizar a lista de usuarios onlines
* @param message
*/
private void refreshOnlines(ChatMessage message) {
sys.EscreveLogConsole("ClienteInterface - Metodo refreshOnlines", "***INICIO***");
sys.EscreveLogConsole("ClienteInterface - Metodo refreshOnlines"... |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <string.h>
#include "yunit.h"
#include "core/router_mgr.h"
#include "core/mesh_mgmt.h"
#include "hal/interfaces.h"
void test_uradar_sid_router_case(void)
{
network_context_t network = {
.meshnetid = 0x100,
.attach_state = A... |
class MultilabelPredictor:
""" Tabular Predictor for predicting multiple columns in table.
Creates multiple TabularPredictor objects which you can also use individually.
You can access the TabularPredictor for a particular label via: `multilabel_predictor.get_predictor(label_i)`
Parameters
... |
import time
from backend.utilities.hash import Hash
from backend.utilities.hex_bin import hex_to_bin
from backend.config import MINE_RATE
GENESIS_DATA = {
"timestamp": 1,
"last_hash": "genesis_last_hash",
"data": "genesis_data",
"hash": str(Hash.hash("genesis_hash")),
"difficulty": 3,
"nonce": ... |
MILWAUKEE - Not surprisingly, Heat interest appears to be rising significantly during this 11-game winning streak. Some tangible signs:
• Five of Fox Sports Sun's 10 most watched Heat games this season have come during the winning streak, and viewership of Heat games has risen 33 percent over the full season average.
... |
<gh_stars>100-1000
'''
A collection of utility functions.
'''
import numpy as np
import scipy.stats as stats
from typing import Iterable
def sim_seasonal_data(n_series, timesteps, measure_noise,
freq=None, level=None, amp=None):
"""Generate sinusoidal data with periodic patterns.
Param... |
<filename>src/components/dashboard/DashboardItem/DashboardItem.tsx
import React from "react";
import { DashboardItemProps } from "./DashboardItem.types";
import { CloseOutlined } from "@ant-design/icons";
export const DashboardItem = (props: DashboardItemProps) => {
const { id, title, children } = props;
return (... |
/**
* Request structure for transferring assets (unique, accounts or quantities).
*/
@JsonTypeName("TransfersRequest")
public class TransfersRequest extends BaseCommandRequest {
private final Collection<TransferItem> transfers;
/**
* Initializes a new request object.
* A random request identifier ... |
import Control.Monad
import Data.Maybe (fromJust)
import qualified Data.ByteString.Char8 as B
main :: IO ()
main = do
_ <- readInt
ts <- readInts
m <- readInt
px <- replicateM m readInts
forM_ px $ \[p, x] -> print $ sum $ replace ts (p - 1) x
where
readB = fst . fromJust . B.readInt
... |
def hash_context(context: Optional[AnyStr] = None) -> str:
if not context:
return ""
try:
context_bytes = cast(str, context).encode("utf8")
except AttributeError:
context_bytes = cast(bytes, context)
try:
return md5(context_bytes).hexdigest()
except TypeError:
... |
<gh_stars>100-1000
package com.ironz.binaryprefs.task;
import com.ironz.binaryprefs.task.barrier.FutureBarrier;
import java.util.concurrent.Callable;
/**
* Abstraction for task running. You should guarantee sequential task execution.
*/
public interface TaskExecutor {
/**
* Submits runnable into task exec... |
/*
* Copyright 2013 University of Southern California
*
* 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 applicab... |
<gh_stars>100-1000
"""
Defines database related utilities.
"""
import os
import pkgutil
import datetime
from ..exceptions import DatabaseError
def get_database(dialect):
"""
Returns requested database package with modules that provide additional functionality.
:param string dialect: (required). Databas... |
/**
* UI Flow for checking the software version property in a resource
*/
public class CheckSoftwareVersionPropertyFlow extends AbstractUiTestFlow {
private final List<String> expectedSoftwareVersionList;
public CheckSoftwareVersionPropertyFlow(final WebDriver webDriver, final List<String> expectedSoftwareV... |
<gh_stars>1-10
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SVGDocume... |
/**
* Un like realizado por un usuario a un post
*/
@Entity
@Data
@NamedQueries({
@NamedQuery(name = "Likes.all",
query = "SELECT l FROM Likes l"),
@NamedQuery(name="Likes.byId",
query="SELECT l FROM Likes l "
+ "WHERE l.post.id = :postId"),
... |
Increased succinate dehydrogenase activity of lymphocytes in eczema.
Succinate dehydrogenase activity has been studied in the peripheral blood lymphocytes from controls and patients with a variety of skin and other diseases. Increased activity has been found in eczematous dermatitis and dermographism, and also in one ... |
// Adds the data to the cert as an extension, formatted as a single
// ASN.1 octet string.
static void AddOctetExtension(X509* cert, int nid, const unsigned char* data,
int data_len, int critical) {
ScopedASN1_OCTET_STRING inner(ASN1_OCTET_STRING_new());
CHECK_NOTNULL(inner.get());
C... |
/*
* Copyright 2012 Google Inc.
*
* 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 to in w... |
/**
* Service request content when used with JSON-accepting endpoints
*
* Current status: NOT USED
*
* NB: for the moment, documents are sent either as:
* - ocet stream
* - multi-part files
* as encoding binary document content into JSON may be an overkill,
* but may be revisited when going forward with gRPC
... |
import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-layout-fixed',
template: `
<nz-layout class="layout">
<nz-header>
<div class="logo"></div>
<ul nz-menu nzTheme="dark" nzMode="horizontal">
<li nz-menu-item>nav 1</li>
<li nz-menu-item>nav 2</li>... |
<reponame>UCLALibrary/bucketeer
package edu.ucla.library.bucketeer;
import static edu.ucla.library.bucketeer.Constants.MESSAGES;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import org.junit.Rule;
import org.junit.Test;
imp... |
export class Global {
static readonly GRIDSIZE = 800; //breedte en hoogte van het grid
static readonly CELLSIZE = 32; //breedte en hoogte van 1 cell in het grid
static readonly CELLBORDER = 2;
}
export class GameHelper {
static GetCell(coordinate: number): number {
return coordinate * Global.CE... |
def _get_app_exec(self):
self.pid = self._ctl2.GetProcessId()
if self.pid != 0:
return psutil.Process(self.pid).name()
returned_HRESULT = self._ctl2.IsSystemSoundsSession()
S_OK = 0
if returned_HRESULT == S_OK:
return "SndVol.exe"
else:
... |
// cargo-deps: bindgen = "0.51.1", pkg-config = "0.3.17"
use std::path::PathBuf;
fn main() {
let mut lib = pkg_config::Config::new()
.atleast_version("3.2.2")
.probe("libarchive")
.expect("Fail to detect the libarchive library");
let include_path = lib
.include_paths
.... |
Historic Markers Across Alabama
The Rooster Bridge
Marker ID: AHC Location: on U.S. 80 3 miles east of State Road 28, Demopolis, Alabama County: Sumter Coordinates: N 32° 27.127 W 088° 0.344 32.45211666 -88.00573333 Style: Free Standing ** Waymark: None
Text:
Side 1:
In 1919 a rooster sale organized by Frank Derby... |
<filename>frappe-bench/apps/erpnext/erpnext/utilities/user_progress_utils.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe, erpnext
import json
from frappe import _
from frappe.utils import flt
from erpnext.setup.doctype.se... |
<reponame>Rodrigo-Santoos/Praticando<gh_stars>0
package main;
import java.util.Scanner;
public class Matrizes {
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
System.out.print("Digite quantos campos ira adicionar: ");
int n = entrada.nextInt();
System.out.println();
... |
ctDNA analysis reveals different molecular patterns upon disease progression in patients treated with osimertinib
Background Several clinical trials have demonstrated the efficacy and safety of osimertinib in advanced non-small-cell lung cancer (NSCLC). However, there is significant unexplained variability in treatmen... |
/**
* An immutable heterogeneous mapping from a parametrized type-safe key to any value, supporting a minimal mapping
* interface.
*
* @see TypeSafeKey
* @see com.jnape.palatable.lambda.adt.hlist.HList
*/
public class HMap implements Iterable<Tuple2<TypeSafeKey, Object>> {
private static final HMap EMPTY = n... |
//
// FCWKErrorCode.h
// FitCloudWFKit
//
// Created by pcjbird on 7/10/20.
// Copyright © 2020 Zero Status. All rights reserved.
//
#ifndef FCWKErrorCode_h
#define FCWKErrorCode_h
/**
* @brief 错误码定义
*/
typedef NS_ENUM(NSInteger, FCWKERRORCODE)
{
FCWKERRORCODE_UNKNOWN = 1000, ... |
import sys
s = int(input())
dp = [0]*(s)
dp[:4] = [0,0,1,1,1]
mod = 1000000007
for i in range(5,s):
dp[i] = (dp[i-3] +dp[i-1]) % mod
print(dp[s-1])
|
<gh_stars>100-1000
#ifndef TestFunctions_h
#define TestFunctions_h
class vtkUnstructuredGrid;
class vtkStructuredGrid;
class vtkPolyData;
class vtkMultiBlockDataSet;
void Create(vtkUnstructuredGrid*, int);
void Create(vtkStructuredGrid*, int);
void Create(vtkPolyData*);
void CreatePolyhedral(vtkUnstructuredGrid*);
i... |
WASHINGTON (Reuters) - President Donald Trump’s effort to reshape influential U.S. courts by stocking them with conservative judges faces at least one significant impediment: some of the courts best placed to thwart his agenda have liberal majorities that are likely to stay in place in the short-term.
FILE PHOTO - The... |
class DBEstParser:
"""parse a single SQL query, of the following form:
- **DDL**
>>> CREATE TABLE t_m(y real, x real)
>>> FROM tbl
>>> [GROUP BY z]
>>> [SIZE 0.01]
>>> [METHOD UNIFROM|HASH]
>>> [ENCODING ONEHOT|BINARY]
- **DML**
>>> SELECT AF(y)
... |
The Colorado Division of Motor Vehicles will pilot a new design for driver licenses, instruction permits and identification cards at three different Colorado offices starting on March 1.
The new design features a more colorful background including Mount Sneffels -- which is located between Ouray and Telluride. It also... |
package com.mvp4g.example.client.main.presenter;
import com.mvp4g.client.annotation.Presenter;
import com.mvp4g.client.presenter.BasePresenter;
import com.mvp4g.example.client.main.MainEventBus;
import com.mvp4g.example.client.main.StatusSplitter;
import com.mvp4g.example.client.main.view.StatusContainerView;
@Presen... |
def calcular_total_mensajes(self, user):
Almacenamiento.__checc(user)
self.c.execute("SELECT SUM(message_number) as total_messages FROM user_group WHERE userid = ?", (user.userid,))
res = self.c.fetchall()
return res[0][0] if res else None |
<reponame>Diogny/ecljs
import EC from "./ec";
import Container from "./container";
/**
* @description Circuits component container
*/
export default class Circuit extends Container<EC> {
get name(): string { return "circuit" }
get dir(): boolean { return false }
get ec(): EC | undefined {
return !this.selecte... |
// For now, just use the TCS simulator.
public final class CaStatusAcceptorTest {
private static final Logger LOG = LoggerFactory
.getLogger(CaStatusAcceptorTest.class.getName());
private static final String CA_ADDR_LIST = "127.0.0.1";
private static final String TOP = "test";
private stat... |
<reponame>liwenyip/adhoc
/*
* File: Code for a new 'Dynamic Address Allocation' Agent Class for the ns
* network simulator
* Author: <NAME> (<EMAIL>), September 2005
*
*/
#ifndef ns_daa_h
#define ns_daa_h
#include "agent.h"
#include "tclcl.h"
#include "packet.h"
#include "address.h"
#include "ip.h"
/*
... |
package com.andyadc.codeblocks.serialization.json;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer;
public class FastjsonSerializer {
private static... |
Reducing NO x emissions from a nitric acid plant of domestic petrochemical complex: enhanced conversion in conventional radial-flow reactor of selective catalytic reduction process
The nitric acid plant of a domestic petrochemical complex is designed to annually produce 56,400 metric tons (based on 100% nitric acid). ... |
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "/home/labuser/Desktop/openairinterface5g_f1ap/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1"
* `asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D /home/labuser/D... |
The three transforming regions of SV40 T antigen are required for immortalization of primary mouse embryo fibroblasts.
Simian virus 40 (SV40) is a small DNA tumor virus whose early region gene product, large T antigen, is sufficient to immortalize primary rodent cells and transform established rodent cell lines. Three... |
import PropertyDecorator from '../contracts/PropertyDecorator'
import Field from './Field'
/**
* Create a attribute decorator.
*/
export default function Attribute (value: any = null): PropertyDecorator {
return Field(model => model.attr(value))
}
|
//
// Copyright 2017 The Android Open Source Project
//
// 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 l... |
def autorepr(cls):
class WithRepr(cls):
def __repr__(self):
return '<{clss} {attrs} at {id}>'.format(
clss=cls.__name__,
attrs=vars(self),
id=id(self))
WithRepr.__name__ = cls.__name__
WithRepr.__doc__ = cls.__doc__
return WithRepr |
import { AbstractRemotePlatform } from '@backyard/common';
import type {
PlatformCommandHookArgs,
PlatformInitArgs,
} from '@backyard/types';
import { getServices } from '@backyard/common';
import type {
AwsRemoteOptions,
AwsRemotePlugins,
AwsRemoteTerraformHookArgs,
} from './types';
import { addVpc } fro... |
A Two Level Architecture for High Throughput DCT-Processor and Implementing on FPGA
Frequency analysis using discrete cosine transform is being used in a large variety of algorithms such as image processing algorithms. This paper proposes a new high throughput architecture for the DCT processor. This system has got a ... |
/**
* This class can be used to update server voice channels.
*/
public class ServerVoiceChannelUpdater extends ServerChannelUpdater {
/**
* The server voice channel delegate used by this instance.
*/
private final ServerVoiceChannelUpdaterDelegate delegate;
/**
* Creates a new server voi... |
<reponame>hbraha/ovirt-engine
package org.ovirt.engine.core.bll.provider.network.openstack;
import org.ovirt.engine.core.bll.provider.NetworkProviderValidator;
import org.ovirt.engine.core.bll.provider.ProviderValidator;
import org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties;
import or... |
Yes we skip 10.2 for 10.3 since was FreeBSD 10.3 was coming we thought we should wait for 10.3. This is the first ALPHA development release for testing and debugging for GhostBSD 10.3, only as MATE been released yet which is available on SourceForge and for the amd64 and i386 architectures.
What's new
GhostBSD now su... |
def load_gan_model(cls):
return keras.models.load_model('models/{}-gan.h5'.format(cls)) |
Andrew Taggart of The Chainsmokers and Halsey perform onstage during the 2016 MTV Video Music Awards at Madison Square Garden on Aug. 28, 2016 in New York City.
The Chainsmokers' "Closer," featuring Halsey, reigns for a second week, Twenty One Pilots double up in the top five & Mendes reaches the top 10 with "Treat Yo... |
<filename>ictarus/src/config.rs
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::net::{SocketAddr, ToSocketAddrs};
use std::sync::{Arc, RwLock};
use crate::constants::*;
use log::*;
/// A config that can be shared across tasks.
pub type SharedConfig = Arc<RwLock<Config>>;
/// Node configuration.
///
//... |
// safer than direct double comparison from distanceSq
private boolean areAdjacent(BlockPos posA, BlockPos posB) {
int diffX = Math.abs(posA.getX() - posB.getX());
int diffY = Math.abs(posA.getY() - posB.getY());
int diffZ = Math.abs(posA.getZ() - posB.getZ());
return (diffX + diffY + di... |
<gh_stars>10-100
"""Contains a few more sophisticated commands that are usually accessed directly inside configs."""
import os
import shutil
import atexit
from pathlib import Path
from collections import defaultdict
from typing import Callable, Iterable
import numpy as np
from tqdm import tqdm
from .io import save_js... |
/**
* Call this method when the graphics needs to be repainted on the graphics
* surface.
*
* @param g the graphics to paint on
*/
private void drawSurface(Graphics2D g) {
final Dimension d = this.getSize();
if (gameOver) {
g.setColor(Color.red);
g.fillR... |
/**
* AdaGrad Descent Algo
*
* edits params using totSqGrad as well
*
* @author rosecatherinek
*/
protected void agd(ParamVector<String,?> params, PosNegRWExample ex) {
TIntDoubleMap gradient = gradient(params,ex);
for (TIntDoubleIterator grad = gradient.iterator(); grad.hasNext(); ) {
grad.advance... |
/**
* Maintains information about a vertex partition of a graph.
* This can be built from a map from vertices to vertex sets
* or from a collection of (disjoint) vertex sets,
* such as those created by various clustering methods.
*/
public class VertexPartition<V,E>
{
private Map<V,Set<V>> vertex_partition_map;... |
def update_loop(self, iteration, total, update_msg=''):
setattr(self, 'update_time', self.current_time)
iter2percent = (100. * (iteration / float(total)))
setattr(self, 'percent_complete', iter2percent)
setattr(self, 'complete', True if self.percent_complete == 100 else False)
... |
def complex_quad(fun,a,b,**kwargs):
real_integral = scipy.integrate.quad(lambda x: scipy.real(fun(x)), a, b,
**kwargs)
imag_integral = scipy.integrate.quad(lambda x: scipy.imag(fun(x)), a, b,
... |
import ResolvedApi, { EXPERIMENT_COOKIE as experimentCookie, PREVIEW_COOKIE as previewCookie } from './ResolvedApi';
import Predicates from './Predicates';
import { Experiments } from './experiments';
import Api, { ApiOptions } from './Api';
import { DefaultClient } from './client';
export default {
experimentCookie... |
<reponame>aperturerobotics/controllerbus
package boilerplate_v1
import "github.com/aperturerobotics/controllerbus/example/boilerplate"
// _ is a type assertion
var _ boilerplate.BoilerplateResult = ((*BoilerplateResult)(nil))
|
// RequireSSL returns values for the require SSL automation.
func (f *Finding) RequireSSL() *requiressl.Values {
return &requiressl.Values{
ProjectID: f.SQLScanner.GetFinding().GetSourceProperties().GetProjectID(),
InstanceName: sha.Instance(f.SQLScanner.GetFinding().GetResourceName()),
}
} |
Image caption An officer managed to get the emu into a police car
An escaped emu has been captured by police in a patrol car after it was spotted in a north Devon town during rush hour.
The 4ft (1.2m) tall bird was first seen on St George's Road in Barnstaple.
It was then found by officers in nearby Riddell Avenue a... |
package com.example.test.tests;
import com.example.test.model.Item;
import org.testng.Assert;
import org.testng.annotations.Test;
public class SearchSecondTest extends TestBase{
@Test
public void SecondTest() throws InterruptedException {
// app.openSite("https://yandex.ru/");
// app.getMainPage... |
def load_all_spyrelets(gateway):
spyrelet_configs, _ = copy.copy(get_config_param(gateway.config, [CONFIG_SPYRELETS_KEY]))
if _LOADED_SPYRELETS:
raise SpyreletLoadError(None, 'the following spyrelets were already loaded so nothing was done: {}'.format(_LOADED_SPYRELETS))
while bool(spyrelet_configs)... |
package trade
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"time"
"github.com/raggaer/respoe/client"
)
const (
exchangeURL = "https://www.pathofexile.com/api/trade/exchange/%s"
exchangeOffersURL = "https://www.pathofexile.com/api/trade/fetch/%s?query=%s&exchange"
)
// Excha... |
/**
* Data Pre Process Class
* @author Neyzoter Song
* @date 2020-2-19
*/
public class DataPreProcess implements Serializable {
private static final long serialVersionUID = 2357018289949033614L;
/**
* properties
*/
private static PropertiesUtil propertiesUtil = new PropertiesUtil(PropertiesLa... |
// to the button controls specifically won't scale well.
public class ListInputPanel<T> extends AbstractInputPanel implements ActionListener, IFormStateValidator
{
private static final long serialVersionUID = 1L;
private int selectedIndex = 0;
private final DefaultListModel<T> dataListModel = new DefaultListMode... |
N,K=map(int,input().split())
V=list(map(int,input().split()))
import heapq
turn=min(N,K)
m=0
for A in range(turn+1):
for B in range(turn+1-A):
h=[]
heapq.heapify(h)
if A>0:
h=V[:A]+h
if B>0:
h=h+V[len(V)-B:]
heapq.heapify(h)
ans=sum(h)
for i in range(K-A-B):
if h!=[]:
... |
//Even though this class is static, needs to be a service, so that the reset() gets fired at appropriate times.
@Service
@Singleton
public class ModelGet implements StaticIsaacCache {
private static final Logger LOG = LogManager.getLogger();
static IdentifierService identifierService;
static TaxonomyDebugS... |
/*!
* This module constains utilities used by the HttpProtocol test suite.
*/
// Utilities:
// We store constants that should be defined by the HttpProtocol class:
export const HTTP: string = 'http';
export const HTTPS: string = 'https'; |
// Parse unmarshals JSON into a Task.
func Parse(jsonData []byte) (Task, error) {
var baseMsg BaseTask
err := json.Unmarshal(jsonData, &baseMsg)
if err != nil {
return nil, errors.Wrapf(err, "unmarshaling BaseTask")
}
var task Task
switch baseMsg.Type {
case TypeDownloadAsset:
task = &DownloadAsset{}
case T... |
// probeResources will look for orphaned resources and returns
// those resources which could not be deleted in the order
// orphanedInstances, orphanedVolumes, orphanedMachines, orphanedNICs
func (r *ResourcesTrackerImpl) probeResources() ([]string, []string, []string, []string, error) {
clients, err := getAzureClien... |
Linker‐insertion mutagenesis of Pseudomonas aeruginosa outer membrane protein OprF
The oprF gene, expressing Pseudomonas aeruginosa major outer membrane protein OprF, was subjected to semi‐random linker mutagenesis by insertion of a 1.3 kb Hincll kanamycin‐resistance fragment from plasmid pUC4KAPA into multiple blunt‐... |
Interparticle contact forces in fine cohesive powders. Theory and experiments
The flow of fine powders is strongly influenced by interparticle contact forces. Depending on the interparticle load force the contact behavior can be elastic, fully plastic or elasto‐plastic. We propose a model for the elasto‐plastic loadin... |
<filename>src/Main.java
import events.OnStartGame;
import events.StartGameEventListeners;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import scenes.game.GameScene;
impo... |
#ifndef LUDIS86_H
#define LUDIS86_H
/*
* libudis86 Lua bindings
*/
//extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
//}
#ifndef LUA_API
#ifdef WIN32
#define LUA_API __cdecl __declspec(dllexport)
#else
#define LUA_API __cdecl
#endif
#endif
//extern "C" {
int LUA_A... |
/** This class represents the location of a token. */
class Location
{
public:
Position begin;
Position end;
void step ()
{
begin = end;
}
Location & operator+= (size_t const offset)
{
end.column += offset;
return *this;
}
void lines ()
{
end.line++;
}
} |
Synthesis and Dielectric Investigations of New Swallow-Tailed Monomers and Polymers
Abstract A new class of liquid crystalline side chain polymers using swallow-tailed mesogens was synthesized. Comparative dielectric investigations on these polymers and on the corresponding low molecular weight substances in the frequ... |
<reponame>mkinsner/llvm<filename>compiler-rt/test/asan/TestCases/Linux/vfork.cpp
// https://github.com/google/sanitizers/issues/925
// RUN: %clang_asan -O0 %s -o %t && %run %t 2>&1
// REQUIRES: aarch64-target-arch || x86_64-target-arch || i386-target-arch || arm-target-arch || riscv64-target-arch
#include <assert.h>
... |
<gh_stars>0
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { Module } from '@nestjs/common';
import { CaslAbilityFactory } from '../../shared/modules/casl/casl-ability.factory';
import { FileUpload } from './file-upload.entity';
import { FileUploadsController } from './file-uploads.controller';
import { Fil... |
def ResultReader(filename):
warnings.warn('This function will be depreciated in 0.36.0\n' +
'Please use "open_result" instead.')
open_result(filename) |
Effect of vacancies on the electronic structure of PdxTiSn alloys
We have studied the influence of vacancies on the electronic structure of PdxTiSn (1⩽x⩽2) Heusler-type alloys by the ab initio tight binding linearized muffin-tin orbital (TB LMTO) method. The LMTO calculations have shown that PdTiSn can be classified a... |
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* 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... |
/**
* Translate this bounding box in a specific direction
*
* @param direction
* The direction to move this BB
* @return A new BB representing this BB translated by direction
*/
public BoundingBox translate(BlockVector direction)
{
return this;
} |
In an interview with Rolling Stone, Ryan Adams looked back on the recording sessions for Heartbreaker, his debut solo album, saying, “I felt at the time that I needed to say goodbye to my career.” Having retreated from New York to Nashville, and trying to salvage something from the dissolution of his band, alt.country ... |
// --------------------------------------------------------------------------
//
// CMenuItem::accLocation()
//
// Sometimes we are asked for the location of a peer object. This is
// kinda screwy. This happens when we are asked to navigate next or prev,
// and then let our parent navigate for us. The caller ... |
#pragma once
class RandomStringMaker;
class BinaryFileBytesMaker
{
friend class BinaryFileBytesMakerTests;
private:
// Constant Components
unique_ptr<const RandomStringMaker> _randomStringMaker;
public:
BinaryFileBytesMaker();
virtual ~BinaryFileBytesMaker();
virtual string MakeBytesStrin... |
/**
* Google Cloud Storage Service Account App Engine sample.
*
* @author Marc Cohen
*/
public class StorageSample extends HttpServlet {
/** HTTP status code for a resource that wasn't found. */
private static final int HTTP_NOT_FOUND = 404;
/** HTTP status code for a resource that was found. */
private st... |
<filename>src/window.c
void node_insert_at_head(node *n) {
if (head) {
head->prev = n;
n->next = head;
}
head = n;
}
void node_insert_at_tail(node *n) {
if (head) {
node *tmp = head;
while (tmp->next) tmp = tmp->next;
tmp->next = n;
n->prev = tmp;
} e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.