content stringlengths 10 4.9M |
|---|
// CreateComponent create an has component from a given name, namespace, application, devfile and a container image
func (h *SuiteController) CreateComponentFromDevfile(applicationName, componentName, namespace, gitSourceURL, devfile, containerImageSource, outputContainerImage, secret string) (*appservice.Component, er... |
def delete(key, backend=None):
backend = backend or 'default'
cache = get_cache(backend)
key = _generate_key(key)
val = cache.delete(key)
logger.debug("Cache DELETE: %s" % key)
return val |
/// STEP 1: use counting sort to sort LMS chars
fn sort_lms_chars(&mut self, n1: usize) {
let mut lo_char = T::one(); // sentinel dealt with as a special case
let mut hi_char;
let mut output_curr_head = self.n - n1 + 1; // plus one to skip sentinel
... |
<reponame>wd40bomber7/entitylagmeasure
package com.wd.elm;
import me.ryanhamshire.GriefPrevention.Claim;
import me.ryanhamshire.GriefPrevention.GriefPrevention;
import org.bukkit.Location;
public class GriefPreventionConnector {
public static String LookupPlayerFromLocation(Location loc) {
try {
Claim claim = ... |
<gh_stars>1-10
package osgl.func;
/*-
* #%L
* OSGL Core
* %%
* Copyright (C) 2017 OSGL (Open Source General Library)
* %%
* 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
*
* ht... |
/**
* Created by SteveYang on 17/1/22.
*/
public class ChatMessage extends TinyMessage implements Serializable{
public static final String MESSAGE_KEY = "msg";
private String message;
private long time;
public ChatMessage(String message, long time){
this.message = message;
this.time ... |
use super::super::mp;
use super::super::{Long, ULong};
use super::integer::Integer;
impl From<ULong> for Integer {
fn from(from: ULong) -> Integer {
let mut x: mp::__mpz_struct = unsafe { std::mem::MaybeUninit::uninit().assume_init() };
unsafe {
mp::__gmpz_init_set_ui(&mut x, from);
... |
Flufenamic acid blocks depolarizing afterpotentials and phasic firing in rat supraoptic neurones
Depolarizing afterpotentials (DAPs) that follow action potentials in magnocellular neurosecretory cells (MNCs) are thought to underlie the generation of phasic firing, a pattern that optimizes vasopressin release from the ... |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,i;
while (scanf("%d",&n)==1){
if (n<=5) printf("-1\n");
else {
for (i=2;i<=4;++i) printf("1 %d\n",i);
for (i=5;i<=n;++i) printf("2 %d\n",i);
}
for (i=1;i<n;++i) printf("%d %d\n",i,i+1);
}
return 0;
} |
class DiscordMessageBase:
"""The base class for representing Discord messages
:param str message: (Optional) The Discord message; default is None
:param str user: (Optional) The sender of the message; defualt is None
:param int cmd_type: (Optional) The slash command type used to send the
messag... |
////////////////////////////////////////////////////////////////////////
//
// Description:
// Returns TRUE if action is an instance of a action of the given type
// or an instance of a subclass of it.
//
// Use: public
SbBool
SoAction::isOfType(SoType type) const
{
return getTypeId().isDerivedFrom(type);
} |
package com.telenav.mesakit.plugins.josm.graph.view.tabs.query;
import com.telenav.kivakit.kernel.language.progress.ProgressReporter;
import com.telenav.kivakit.kernel.language.progress.reporters.Progress;
import com.telenav.kivakit.kernel.language.strings.Strings;
import com.telenav.kivakit.kernel.language.values.cou... |
import { CONTEXT, MEDICATION_ATC, MEDICATION_PRESCRIPTION_TYPES, MEDICATION_ADMINISTRATIONS } from '../../constants'
import apiRequest from '../apiRequest'
import { cleanValueSet } from 'utils/cleanValueSet'
import { codeSort } from '../../utils/alphabeticalSort'
import { capitalizeFirstLetter } from '../../utils/capit... |
Alan Diaz/Associated Press
Tennis ace Serena Williams is often unstoppable on the court, but a stint with DVT in 2011 nearly took her down, according to an article by ABC News. Williams, now 37, had undergone two surgeries on her foot after cutting it on a piece of glass. After a cross-country flight from New York to ... |
/**
* @author Eugene Savin
*/
public class SignatureAttribute extends Attribute {
@FieldOrder(index = 3)
private short signatureIndex;
public short getSignatureIndex() {
return signatureIndex;
}
public void setSignatureIndex(short signatureIndex) {
this.signatureIndex = signatur... |
Geothermal exploration involves a high degree of uncertainty and financial risk, and requires reliable exploration data to constrain development decisions. Geothermal potentials are usually in relation to several parameters such as acidic volcanic and intrusive rocks, volcanoes, faults, hot springs, geothermal alterati... |
Indian scientists developing snake robot News oi-GizBot Bureau
Indian scientists are developing snake robots that could help save lives in disasters and accidents and aid surveillance.
Two prototypes of the Snake Robot for Search and Rescue Missions, called SARP (Snake-like Articulated Robot Platform) have been desig... |
/* returns distance to block in dir */
int algo_distance(int *js_level, const int w, const int h, const int x, const int y, const int dir, const int *ignored_ids, const int ignored_ids_len) {
int distance = 0;
if (dir == -2) {
for (int i = y; i >= 0; --i) {
const int id = js_level[x + i * w];
char in_ignored ... |
// NewUPFInterfaceInfo parse the InterfaceUpfInfoItem to generate UPFInterfaceInfo
func NewUPFInterfaceInfo(i *factory.InterfaceUpfInfoItem) *UPFInterfaceInfo {
interfaceInfo := new(UPFInterfaceInfo)
interfaceInfo.IPv4EndPointAddresses = make([]net.IP, 0)
interfaceInfo.IPv6EndPointAddresses = make([]net.IP, 0)
logg... |
class TrigramModel:
def __init__(self, corpusData, relatedBigram, delta=0):
self.trainingCorpus = corpusData
self.trigramCountList = defaultdict(lambda: 0)
self.delta = delta
self.relatedBigram = relatedBigram
self.train_trigram_model()
"""
Splits corpus i... |
<filename>src/domain/models/temperature.model.ts<gh_stars>0
import { JsonObject, JsonProperty } from 'json2typescript';
import { TemperatureUnit } from '../enums/temperature-unit.enum';
@JsonObject('Temperature')
export class Temperature {
@JsonProperty('value', Number)
value: number;
constructor(value: n... |
<reponame>andypandy47/Jank
#pragma once
#include "Jank/Application.h"
#include "Jank/Log.h"
#include "Jank/Layer.h"
#include "Jank/ImGui/ImGuiLayer.h"
#include "Jank/Core/Timestep.h"
#include "Jank/Core/Colour.h"
#include "Jank/KeyCodes.h"
#include "Jank/MouseButtonCodes.h"
#include "Jank/Input.h"
//--Renderer-----... |
// throws Exception if queue is empty
int dequeue() throws Exception {
if (isEmpty())
throw new Exception("Queue empty");
int value = queue.get(front);
front = (front + 1) % capacity;
elemCount--;
return value;
} |
<reponame>akadop/fun<gh_stars>100-1000
/**
* Subclassing `Error` in TypeScript:
* https://stackoverflow.com/a/41102306/376773
*/
interface LambdaErrorPayload {
errorMessage?: string;
errorType?: string;
stackTrace?: string | string[];
}
export class LambdaError extends Error {
constructor(data: LambdaErrorPayl... |
In a few years, or even in a few months, we’ll probably see Psychologists examine and study the unprecedented level of gaming addiction we’ve seen from Pokemon Go players over the past few weeks. If you thought Candy Crush was bad, well, Pokemon Go takes things to an entirely new level.
In recent weeks, we’ve seen sto... |
/**
* Ulozi obrazek jako jednu stranku PDF souboru.
* @param imageData
* @param dpi
* @param filename
* @throws Exception
*/
public static final byte[] writeAsPdf(byte[] imageData, int dpi) throws Exception {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Document document = new Document();
... |
// Copyright 2021 bilibili-base
//
// 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 i... |
import dotenv from 'dotenv';
import { VoiceText } from '../../src/index';
dotenv.config();
describe('VoiceText#fetchBuffer', () => {
test('case valid', async () => {
const target = new VoiceText({ apiKey: process.env['API_KEY'] ?? '' });
expect(Buffer.isBuffer(await target.fetchBuffer())).toBe(tr... |
<reponame>fossabot/FReD<gh_stars>0
package main
import (
"fmt"
"time"
)
type ReplicaSuite struct {
c *Config
}
func (t *ReplicaSuite) Name() string {
return "Replication"
}
func (t *ReplicaSuite) RunTests() {
// Fun with replicas
logNodeAction(t.c.nodeA, "Create keygroup KGRep")
t.c.nodeA.CreateKeygroup("KGR... |
<filename>src/assets/js/components/Navigation/index.tsx<gh_stars>1-10
import classNames from 'classnames';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { NavLink } from 'react-router-dom';
import styles from './style.module.css';
interface Route {
name: string;
path: string;
}
... |
import React, { useState } from 'react';
import { makeStyles, Theme } from '@material-ui/core/styles';
import { Button, Chip, IconButton, Popover } from '@material-ui/core';
import KeyboardArrowLeftIcon from '@material-ui/icons/KeyboardArrowLeft';
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown'... |
#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <math.h>
#define ll long long
#define MAXN 500+5
using namespace std;
int memo[MAXN][2];
int A[MAXN][MAXN];
int S[MAXN];
int main()
{
int x,y,r;
cin >> x >> y >> r;
... |
package com.hantsylabs.example.spring.test.webdriver;
import org.hamcrest.core.IsEqual;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframewor... |
import java.util.Scanner;
public class WrongSubtraction {
private static int subtract(int input) {
if (input >= 10) {
return input%10 == 0 ? input / 10 : input - 1;
} else if (input > 1) {
return input - 1;
}
return input;
}
public static void main(... |
def pop(self, head=False, blocking=False):
if head and blocking:
return self.deserialize(self._client.blpop(self.list_key)[1])
elif head:
return self.deserialize(self._client.lpop(self.list_key))
elif blocking:
return self.deserialize(self._client.brpop(self.l... |
/**
* A base class for scenario specific HUDs.
*/
public abstract class ScenarioHUD extends BWindow
{
public ScenarioHUD (BStyleSheet style, BLayoutManager layout)
{
super(style, layout);
}
public abstract void pieceWasAffected (Piece piece, String effect);
} |
Did I mention what a weasel-y character RNC chairman Reince Priebus is?
The RNC’s resident Baghdad Bob continues to insult our intelligence with asinine statements about GOP nominee Trump’s worth as a candidate.
The latest cringe-worthy narrative to come out of Mr. Priebus was in regards to Trump’s vile suggestion of... |
#include <stdio.h>
#include <stdlib.h>
long int max(long int n , long int a[]);
int main(void) {
// your code goes here
long int num;
while(scanf("%ld", &num) != EOF){
long int* arr=(long int*)malloc(sizeof(long int)*(num+1));
printf("%ld\n",max(num,arr));
}
return 0;
}
long int max(long int n , long int... |
Anyone who scans my Reddit history knows that losing my father last year was a very hard experience to navigate and that it has had a lasting impression on me. When my gift arrived today, something so heartfelt and close to me was unexpected; I was expecting a t-shirt, or a dvd from my Amazon wish list. When I opened t... |
<gh_stars>0
package com.company;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Random;
import java.util.Scanner;
public class RSA {
static BigInteger p;
static BigInteger q;
static BigInteger n;
static BigInteger phi;
static BigInteger e;
static BigInteger... |
<reponame>WPRDC/wprdc-components
import { Geog, GeographyType } from '../../types';
import { FC } from 'react';
import { BreadcrumbItemLinkProps } from '../Breadcrumbs';
export interface GeographySectionProps {
geog?: Geog;
geogIsLoading?: boolean;
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
LinkComponent?: FC<Bread... |
/* This function checks if the connection request initiated with
* kmo_sock_connect() has been completed.
* This function sets the KMO error string. It returns -1 on failure.
*/
int kmo_sock_connect_check(int fd, char *host) {
int error;
int len = sizeof(error);
if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (... |
Impulsive effects on stochastic bidirectional associative memory neural networks with reaction-diffusion and leakage delays
In this paper, the problem of global asymptotic stability analysis for stochastic reaction-diffusion bidirectional associative memory neural networks (BAMNNs) with mixed delays and impulsive effe... |
// FirstPage navigates to the first page
func (ct *Cointop) FirstPage() error {
ct.debuglog("firstPage()")
if ct.IsFirstPage() {
return nil
}
ct.State.page = 0
ct.UpdateTable()
ct.RowChanged()
return nil
} |
/*
* Copyright (c) 2010-2015 Pivotal Software, Inc. All rights reserved.
*
* 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 req... |
/** Applies the most recent undone commit command. */
public void redo() {
if (undoneCommands.size() == 0) {
return;
}
final Settings settings = Settings.getInstance();
final CommitCommand commitCommand = undoneCommands.remove(undoneCommands.size() - 1);
final ChangeC... |
#include "bitmap.h"
#include <string>
Bitmap::~Bitmap()
{
al_destroy_bitmap( bitmap );
bitmap = nullptr;
}
void Bitmap::render()
{
if( bitmap != nullptr )
{
int w = al_get_bitmap_width( bitmap );
int h = al_get_bitmap_height( bitmap );
al_draw_scaled_bitmap( bitmap, 0, 0, w, h,... |
<reponame>epsilonhalbe/bricolage
#![feature(proc_macro, wasm_custom_section, wasm_import_module)]
extern crate wasm_bindgen;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern {
#[wasm_bindgen(js_namespace = console)]
fn time(name: &str);
#[wasm_bindgen(js_namespace = console)]
fn timeEnd(name: &s... |
/**
* Sets the {@link HttpClient} to use for sending and receiving requests to and from the service.
*
* @param httpClient The {@link HttpClient} to use for requests.
*
* @return The updated {@link TableClientBuilder}.
*/
public TableClientBuilder httpClient(HttpClient httpClient) {
... |
<gh_stars>0
//BogoSort
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
bool check_sorted(int *a, int n)
{
while ( --n >= 1 ) {
if ( a[n] < a[n-1] ) return false;
}
return true;
}
void shuffle(int *a, int n)
{
int i, t, r;
for(i=0; i < n; i++) {
t = a[i];
r = r... |
/**
* Creates a new {@link MdcAccessor} for interacting with the MDC represented by the given class and adapter. The
* accessor's function and consumers for accessing the MDC will be represented by generated classes which are injected
* into the MDC's class loader.
*
* @param mdcAdapter the ada... |
<reponame>ZhehaoLi9705/QuantNet_CPP
//
// BinomialLatticeStrrategy.hpp
// VI.6 Latice Methods
//
// Created by <NAME> on 2020/5/19.
// Copyright © 2020 <NAME>. All rights reserved.
//
// Strategy pattern for creating binomial lattice. Note that there is a built-in Template Method pattern built in here.
// For co... |
//Get a env variable with key, "" will return if not exist
func (e *Environment) Get(key string) string {
e.RLock()
defer e.RUnlock()
if value, ok := e.data[key]; ok {
return value
}
return ""
} |
/*
* Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP
*/
@Override
public void loop() {
float left;
float right;
float arm;
float leftservo;
float rightservo;
float front_right;
float front_left;
left = gamepad1.left... |
I was just about to leave for my first big tango festival when a message popped up on my phone. It was from a skilled dancer raving over the amazing followers and how every dance was the “best one ever”. Then he said how excited he was to dance with me that afternoon.
My excitement shifted – without a clutch – to anxi... |
/**
* This method always returns immediately for the raw consumer because it just streams.
*
* @param timeout The amount of time in milliseconds to block until returning even if the stream
* has not started.
* @return <i>true</i> if the consumer is currently streaming.
*/
pu... |
/*-
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _CONSTR_SEQUENCE_OF_H_
#define _CONSTR_SEQUENCE_OF_H_
#include <asn_application.h>
#include <constr_SET_OF.h> /* Implemented using SET OF */
#ifdef _... |
<gh_stars>0
/*
* 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... |
package main
import (
"encoding/json"
"fmt"
"log"
"path"
"regexp"
"strconv"
"strings"
"time"
"github.com/grafana/grafana_plugin_model/go/datasource"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
)
// ConsulDatasource implements a datasource which connects t... |
/**
* Abstract DAO class that provides basic CRUD operations.
*
* @param <T>
*/
public abstract class CommonDaoJpa<T> implements CommonDao<T> {
/**
* The class type of the entity the DAO instance is against.
*/
private final Class<T> typeParameterClass;
/**
* Entity manager used for pers... |
package main
import (
"fmt"
"log"
"net"
"net/http"
"github.com/conejoninja/bundle"
"strings"
)
func main() {
b, e := bundle.LoadBundle("./web.bundle", []byte(""))
if e != nil {
log.Fatalf("Error loading bundle: %s", e)
}
fmt.Println("Change the files in the assets folder without re-creating the bundle... |
<reponame>glennhickey/CharlieSandbox
'''
Usage: python make_igv_batchfile.py -s ~{sample_id} -v ~{var_id} -r ~{ref_fasta} -b ~{write_lines(minibam_array)} -o batch.txt
Purpose: write batch.txt file for IGV, given sample id, variant id, reference fasta, and newline-separated file containing minibams
'''
import sys
fro... |
def avg9x(self, matrix, percentage=0.05):
xs = matrix.flatten()
srt = sorted(xs, reverse=True)
length = int(math.floor(percentage * len(srt)))
matrix_subset = srt[:length]
return numpy.median(matrix_subset) |
package controller
import (
"bytes"
"context"
"io/ioutil"
"net/http"
"testing"
"time"
"github.com/sirupsen/logrus"
api "github.com/objectrocket/sensu-operator/pkg/apis/objectrocket/v1beta1"
"github.com/objectrocket/sensu-operator/pkg/cluster"
fakesensu "github.com/objectrocket/sensu-operator/pkg/generated/... |
/*
* PppoeCtrlReadEvent()
*
* Receive an incoming control message from the PPPoE node
*/
static void
PppoeCtrlReadEvent(int type, void *arg)
{
union {
#ifdef NGM_PPPOE_SETMAXP_COOKIE
u_char buf[sizeof(struct ng_mesg) + sizeof(struct ngpppoe_maxp)];
#else
u_char buf[sizeof(struct ng_mesg) + sizeof(struct ... |
from bs4 import BeautifulSoup as bs
from selenium import webdriver
import time
from langdetect import detect
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
def get_comments(driver, address, line, doc_... |
use crate::io::file::create_file;
use crate::io::fs::read_file_to_string;
use crate::utils::error::to_eyre_error;
use csv::{ReaderBuilder as CsvReaderBuilder, Writer as CsvWriterImpl, WriterBuilder as CsvWriterBuilder};
use eyre::Report;
use serde::{Deserialize, Serialize};
use std::io::Write;
use std::path::{Path, Pat... |
package dev.jshfx.base.jshell.commands;
import java.nio.file.Path;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import dev.jshfx.base.jshell.CommandProcessor;
import dev.jshfx.base.sys.PreferenceManager;
import dev.jshfx.base.sys.RepositoryManager;
import dev.jshfx.jfx.util.FXResourceBundle;... |
use bevy::prelude::*;
use uuid::Uuid;
pub enum LevelKind {
Stock(usize),
Custom(Uuid),
}
pub enum ButtonKind {
Play,
Editor,
Options,
Quit,
Levels,
Level(LevelKind),
}
#[derive(Component)]
pub struct ButtonMarker {
pub kind: ButtonKind,
}
impl ButtonMarker {
pub fn new(kind: ... |
<reponame>mpomerant/furious-kylry737<gh_stars>1-10
import { Direction } from '@microsoft/fast-web-utilities';
export const bodyFontValue = 'aktiv-grotesk, "Segoe UI", Arial, Helvetica, sans-serif';
export const directionValue = Direction.ltr;
export const disabledOpacityValue = 0.3;
export const strokeWidthValue = 1;
... |
#include "hdf.h"
#define FILE_NAME "Image_with_Palette.hdf"
#define IMAGE_NAME "Image with Palette"
#define N_ENTRIES 256 /* number of elements of each color */
int main( )
{
/************************* Variable declaration **************************/
intn status, /* status for fun... |
def parse_object(response, infotype):
if infotype in ('idletime', 'refcount'):
return int_or_none(response)
return response |
Bangladesh Installed 3 Million+ New Residential Solar Systems
November 19th, 2014 by James Ayre
To be exact, the recorded number was 3.1 million new systems — with more than 15 million people now benefiting from these new systems, according to coverage from the Bangladeshi newspaper The Daily Star.
The systems were ... |
Variability of Mineral Density in Coralline Hydroxyapatite Spheres: Study by Quantitative Computed Tomography
Quantitative computed tomography (qCT) can be employed to determine the mineral density (MD) of bone or similar mineralized alloplastic materials with high precision. Porous spheres made from coralline hydroxy... |
def rate_per_z(z):
return rate(z) * cosmo.differential_comoving_volume(z) * \
nu_bright_fraction * (4 * np.pi * u.sr) / (1+z) |
def main():
no_of_strings = int(input())
for _ in range(no_of_strings):
current = input()
length = len(current)
if length > 10:
current = current[0] + str(length - 2) + current[-1]
print(current)
main()
|
def parse(datetime_string: str, timezone: str = "Europe/Berlin") -> Union[datetime.datetime, None]:
parser_result = Parser(datetime_string).parse()
if parser_result is None:
return None
evaluator_result = Evaluator(parser_result, tz=timezone).evaluate()
if evaluator_result is None:
retur... |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using nam... |
<filename>src/askvm/lib/resource.ts
import { AskCode } from '../../askcode';
import { asyncMap } from '../../utils';
import { Options as RunOptions, runUntyped } from './run';
import * as types from './type';
import { any, Type } from './type';
import { typed, untyped } from './typed';
type ResourceOptions<T, A extend... |
//BUG: Spectre Dimension data is held over between two worlds if minecraft instance is not fully closed before making another world
public class SpectreDimensionHandler extends SavedData {
private final HashMap<UUID, SpectreCube> cubes;
private int cubeNumber;
public SpectreDimensionHandler(int i) {
... |
<reponame>uesp/skyedit
/*===========================================================================
*
* File: SReditView.H
* Author: <NAME> (<EMAIL>)
* Created On: 26 November 2011
*
* Interface of the CSrEditView class.
*
*=========================================================================*/
... |
/**
* Top of a stack of parsed elements, that represent the current position in the aligned document.
*/
public class AlignmentContext {
private AlignmentContext parent;
private String namespaceUri;
private String localName;
private String qName;
private Attributes attributes;
private XSTypeDefinition typeD... |
/*
* This function writes a packet into the Tx FIFO associated with the Host
* Channel. For a channel associated with a non-periodic EP, the non-periodic
* Tx FIFO is written. For a channel associated with a periodic EP, the
* periodic Tx FIFO is written. This function should only be called in Slave
* mode.
*
* ... |
Specialists training in a technical university in the transition to a robotic society
The prerequisites for the research of the topic arise from the tasks of society modernization and social training of professional staff for these purposes. The latter has traditionally been based on sociology as a science appropriate... |
/**
* The response corresponding to ServiceRegisterRequest
*
* @since 2.0
*/
@XmlRootElement
public class ServiceRegisterResponse {
private String id;
private long reregisterTimeMillis;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public long getReregisterTimeM... |
def glossary_entity_decorator(props):
return DOM.create_element('span', {
'data-term': props['term'],
'class': 'term',
}, props['children']) |
def spectrum_misc(f):
end = False
while not end:
try:
line = f.readline().split()
wavnew = [float(w) for w in line]
wav = np.append(wav, wavnew)
prevwav = wavnew[-1]
except BaseException:
end = True
aflux = f.readlines()
... |
/**
* Contains factory methods for Mqtt sources.
* Alternatively you can use {@link MqttSourceBuilder}
*
* @since 4.3
*/
public final class MqttSources {
private MqttSources() {
}
/**
* Returns a builder object which offers a step-by-step fluent API to build
* a custom Mqtt {@link StreamSou... |
// MimeType returns the attachment mime type.
func (p *PeerLink) MimeType() string {
if p.Type != "" {
return p.Type
}
return "application/octet-stream"
} |
/**
* Hibernate implementation of the JPA {@link javax.persistence.metamodel.Metamodel} contract.
*
* @author Steve Ebersole
* @author Emmanuel Bernard
*/
public class MetamodelImpl implements MetamodelImplementor, Serializable {
// todo : Integrate EntityManagerLogger into CoreMessageLogger
private static final... |
<gh_stars>0
import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { omit, pick } from 'ramda'
import { NewReceiptItem, Receipt, ReceiptUpdateFields } from '../../../receipt.types'
import {
addReceiptItem,
DeleteReceiptItem,
dele... |
/*
Prune eliminates unnecessary repositories, and groups from db.
*/
func (db *Database) Prune() (int, int) {
var repos, groups = db.PruneTargets()
for _, repo := range repos {
db.DeleteRepository(repo.ID)
}
for _, group := range groups {
db.DeleteGroup(group.Name)
}
return len(repos), len(groups)
} |
// GetFunc gets the function defined by the given fully-qualified name. The
// outFuncPtr parameter should be a pointer to a function with the appropriate
// type (e.g. the address of a local variable), and is set to a new function
// value that calls the specified function. If the specified function does not
// exist,... |
def volume_panel(name, quiet=1, _self=cmd, _noqt=0):
from pymol import gui
qt_window = not int(_noqt) and gui.get_qtwindow()
app = gui.get_pmgapp()
if qt_window:
from pmg_qt import volume as volume_qt
@app.execute
def _():
try:
panel = _volume_windows_... |
//
// main.cpp
// irinasolves
//
// Created by Irina Korneeva on 13/07/16.
// Copyright © 2016 Irina. All rights reserved.
//
#include <iostream>
#include <vector>
#include <set>
using namespace std;
int used[1000001];
set<int> d[1000001];
set<int> val;
set<int>pos;
int a[1000001];
void dfs(int v) {
used[v] = ... |
Dousing the flames of fear
Remembering a dangerous and thus frightful situation can be a lifesaver, but unchecked fearful memories can seriously affect the quality of life. Both the formation of fear memories and their extinction depend on the amygdala, a set of nuclei located deep within the temporal lobe. The way in... |
<reponame>Aayush-Jain01/lightning-bolts<filename>pl_bolts/models/gans/srgan/srgan_module.py
"""Adapted from: https://github.com/https-deeplearning-ai/GANs-Public."""
from argparse import ArgumentParser
from pathlib import Path
from typing import Any, List, Optional, Tuple
from warnings import warn
import pytorch_light... |
import Cookie from "js-cookie";
import { setContext } from "apollo-link-context";
import { ApolloClient, HttpLink, InMemoryCache } from "apollo-boost";
const httpLink = new HttpLink({ uri: `${process.env.REACT_APP_GRAPHQL_URL}` });
const authLink = setContext(async (_: any, { headers }) => {
if (Cookie.get("access_t... |
def store_and_reset(self, replication):
plan_key = self.add_plan(self.plans, replication)
if self.plan_length < len(plan_key):
self.plan_length = len(plan_key)
self.add_to_csvrows(self.hardening_plans[plan_key])
self.reset() |
Trend-spotters and futurologists have become the evangelists of the modern business world. Spend more than 10 minutes listening to their breezy uplift about what is around the corner, however, and two questions begin to well up inside you - how come they know this stuff, and how does one go about separating the wheat f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.