content stringlengths 10 4.9M |
|---|
/**
* Will collapse and expand a subtree from its root vertex
*
* @param <V> vertex type
* @param <E> edge type
*/
public class TreeCollapser<V, E> {
private static Logger log = LoggerFactory.getLogger(TreeCollapser.class);
Graph<V, E> tree;
Supplier<V> vertexFactory;
protected final Map<V, Graph<V, E>> ... |
<gh_stars>0
import { IsNotEmpty } from "class-validator";
class PartidaDto {
@IsNotEmpty()
data: string;
@IsNotEmpty()
mandante: string;
@IsNotEmpty()
visitante: string;
@IsNotEmpty()
rodada: number;
}
export class CriarCampeonatoDto {
@IsNotEmpty()
campeonato: string;
@IsNotEmpty()
da... |
<filename>exercises-7_12/assignment8.c
/*
Assignment text:
To see how pointers are working an example could be a Bobblesort.
#include<stdio.h>
void swap(int *a,int *b);
int main()
{
int i, j, n;
int ar[] = { 7, 3, 9, 2, 11 };
printf("Array before sort:\n\n");
for(i = 0; i < 5; i++)
printf("ar... |
<gh_stars>100-1000
import styled from 'styled-components';
import Position from '../../../models/Position';
interface Props {
position: Position;
}
const Container = styled.div.attrs((props: Props) => ({
style: {
top: `${props.position.top}px`,
left: `${props.position.left}px`,
},
})) <Pro... |
An asteroid, which is half the size of a football field and will fly past the Earth on Friday, contains metal and fuel worth up to $195 billion, says asteroid miner Deep Space Industries.
Asteroid DA14 will fly as close as 27,680 km to the earth, within the orbit of some satellites.
Scientists say the asteroid will n... |
<filename>src/main/java/cn/home/modules/aop/SystemArchitecture.java<gh_stars>0
package cn.home.modules.aop;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
@Aspect
@Component
public class SystemArchitecture {
/**
* A join point... |
<filename>octavia/compute/compute_base.py
# Copyright 2011-2014 OpenStack Foundation
#
# 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/LIC... |
Obama Widening War in Somalia
Obama Widening War in Somalia By Sherwood Ross
August 29, 2011
Led by the Central Intelligence Agency(CIA) the U.S. is stepping up its war in Somalia, The Nation magazine reports.
“The CIA presence in (the capital) Mogadishu is part of Washington’s intensifying counter-terrorism focus ... |
#include<bits/stdc++.h>
using namespace std;
int dj[20][20];
#de\
fine fuck f\
o\
r
int min(int x,int y){
return x<y?x:y;
}
int max(int x,int y){
return x>y?x:y;
}
int main()
{
int n,ans=0;
cin>>n;
fuck(int i=1;i<=n;++i)
fuck(int j=1;j<=n;++j)
cin>>dj[i][j];
fuck(int k=1;k<=n;++k)
... |
/*
***************************************************************************
* Ralink Tech Inc.
* 4F, No. 2 Technology 5th Rd.
* Science-based Industrial Park
* Hsin-chu, Taiwan, R.O.C.
*
* (c) Copyright 2002-2011, Ralink Technology, Inc.
*
* All rights reserved. Ralink's source code is an unpublished work a... |
Donald Trump and Hillary Clinton will both be in New York tonight for their election parties. And if all goes smoothly, one candidate will be giving a victory speech while the other delivers a concession — just one mile away from each other.
Trump will be at the Midtown Hilton Hotel, across the street from the Museum ... |
The neutral phenolic and indolic compounds in human urine.
Human urines were investigated for neutral phenolic and indolic compounds under dietary control: a standard diet, sucrose-water diet, water-Na2SO4 diet, and after antibiotic treatment. The neutral compounds were detected on bidimensional paper chromatograms af... |
//
// ParseCmdLine
//
// Returns TRUE for uninstall
// FALSE for normal install
//
BOOL ParseCmdLine(LPCTSTR lpCmdLine)
{
while( *lpCmdLine && *lpCmdLine != TEXT('-') && *lpCmdLine != TEXT('/')) {
lpCmdLine++;
}
if (!(*lpCmdLine)) {
return FALSE;
}
lpCmdLine++;
if (... |
def generate_mosaic_id(nonce: bytes, public_key: bytes) -> int:
assert len(nonce) == 4
assert len(public_key) == 32
hasher = hashlib.sha3_256()
hasher.update(nonce)
hasher.update(public_key)
result = unpack_u64_dto(hasher.digest())
return stdint.u64_from_dto((result[0], result[1] & 0x7FFFFFF... |
<commit_msg>Fix: Add value parameter to fprintf in safe_malloc
Changed the value type in the `fprintf` from `u` to `zu`, this is because `size` is of type `size_t` and not `unsigned int`.
In addation, asign the return value of memset to `memory`.
<commit_before>
void* safe_malloc_function(size_t size, const char* call... |
Does the duration of motor imagery affect the excitability of spinal anterior horn cells?
Abstract Purpose: Motor imagery, the process of imagining a physical action, has been shown to facilitate the excitability of spinal anterior horn cells. In the acute phase after a stroke, the excitability of spinal anterior horn... |
<gh_stars>0
import JsonAttribute from '../service-catalog/json-attribute';
import JsonCost from '../service-catalog/json-cost';
import JsonRegion from '../service-catalog/json-region';
/**
* This interface defines the shape of a component when serialized to JSON.
* It is a union of all properties of every catalog com... |
from constants import CELEBA_DATADIR
import os
import numpy as np
txt_file = os.path.join(CELEBA_DATADIR, 'Anno/list_landmarks_align_celeba.txt')
with open(txt_file) as file:
for i, line in enumerate(file):
fields = line.split()
if len(fields) < 11:
continue
image_name = field... |
tl;dr: Do not use if (__FILE__ eq $0) in your .psgi code, that's not supposed to work since Plack 0.9971.
There's been a known issue in Starman and Plack based Perl web servers in general, where FindBin module used in your application doesn't return an expected value.
To make things even worse with Starman, when it h... |
// GlobalService sets the service to use "global" mode
func GlobalService() func(*swarm.Service) {
return func(service *swarm.Service) {
service.Spec.Mode = swarm.ServiceMode{Global: &swarm.GlobalService{}}
}
} |
<filename>spectral/knn.py<gh_stars>1-10
import numpy as np
def myKNN(S, k, sigma=1.0):
N = len(S)
A = np.zeros((N,N))
for i in range(N):
dist_with_index = zip(S[i], range(N))
dist_with_index = sorted(dist_with_index, key=lambda x:x[0])
neighbours_id = [dist_with_index[m][1] for m i... |
/**
* Return a new parameter list which is listA + listB.
*/
struct gl_program_parameter_list *
_mesa_combine_parameter_lists(const struct gl_program_parameter_list *listA,
const struct gl_program_parameter_list *listB)
{
struct gl_program_parameter_list *list;
if (listA) {
l... |
<gh_stars>0
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cross/core/initiator/msgs.proto
package types
import (
context "context"
fmt "fmt"
_ "github.com/cosmos/cosmos-sdk/codec/types"
types1 "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"
github_com_datachainlab_cross_x_core_account_t... |
/**
* Try to extract POSIX mode information from the given entry.
*
* @param entry The entry
*
* @return POSIX mode information if any is present
*/
public static Optional<Set<PosixFilePermission>> posixFilePermissionsFor(
final ArchiveEntry entry)
{
Objects.requireNonNull(entry, "entry");
... |
/*******************************************************************************
* @file espversion.hpp
* @author garou (<EMAIL>)
* @brief Header file of ESP32 version ADC driver.
******************************************************************************/
/* Define to prevent recursive inclusion --... |
/**
* Uses Treebank tags and calls the correct verb, noun, adj lemmatizer.
*/
public String lemmatizeTaggedWord(String token, String postag) {
String lemma = null;
if (postag != null && postag.startsWith("VB"))
lemma = verbToLemma(token);
else if (postag != null && postag.startsWith("N"))
... |
<filename>src/test/java/org/apache/maven/report/projectinfo/PluginManagementReportTest.java
package org.apache.maven.report.projectinfo;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional informat... |
def main():
coo = [] #Coordenadas
coords = [[],[],[],[]] #Coordenadas en segmentos
dia = 0 #Segmentos diagonales
for i in range(4):
x1, y1, x2, y2 = map(int, input().split())
coo.append([x1,y1])
coo.append([x2,y2])
coords[i].append(min([x1,y1],[x2,... |
<gh_stars>1-10
/* Generator for a table with fixed width columns
@(#) $Id: f50f6c474339b92f69105790cf24d712345c8285 $
* 2017-05-27: javadoc
2014-03-04: ignore pseudo columns
2011-08-24: writeGenericRow
2011-05-24: avoid empty header line
2011-02-14: without headers and comments
2010-03... |
Open Road Summer by Emery Lord (review)
mental breakdown in the aftermath of a horrific event, and while savvy readers will figure out the main trick long before the reveal, the details are still engaging and the inciting problems worth consideration. Given the subject matter, this will pair well with the usual high s... |
Posted by Daniel in Design on January 20th, 2011 with 1 Comment
Photo manipulation to me is creativity at another level, being able to blend a photo stock with various textures and brushes to make something extremely realistic is truly amazing!
As you are aware photo manipulation can come in various forms but today w... |
<filename>src/add-ons/print/transports/lpr/LprTransport.h<gh_stars>1-10
// Sun, 18 Jun 2000
// Y.Takagi
#ifndef __LprTransport_H
#define __LprTransport_H
#include <DataIO.h>
#include <Message.h>
#include <fstream>
#include <string>
using namespace std;
class LprTransport : public BDataIO {
public:
LprTranspo... |
Our Visitors Say
Please click here and sign up to get an email when we add new songs (1-2 emails/month max)
This site is terrific! For years it was very hard for me to go to the amud when asked to daven kabbalos shabbos. after practicing some of the tunes heard here, it is still is not easy, but at least I don't swea... |
<reponame>MattiasLiljeson/denLilleOstPojken
#include "GlyphAnimIn.h"
GlyphAnimIn::GlyphAnimIn()
{
reset();
}
void GlyphAnimIn::update( float p_dt )
{
m_totTime += p_dt;
}
TransformInfo GlyphAnimIn::getAnimation( TransformInfo p_transInfo,
float p_freq, float p_amplitude, float p_speed )
{
float fac = m_totTime /... |
package ws.bmocanu.aoc.ed2020;
import ws.bmocanu.aoc.support.Log;
import ws.bmocanu.aoc.utils.FileUtils;
import ws.bmocanu.aoc.xbase.SolutionBase;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Day25DoorKeyCryptoBreaking extends SolutionBase {
public static Map<L... |
def dummy_func_1(input_array):
n_samples = 10_000
test_range = np.linspace(0, 1, n_samples)
target = polyval(test_range, TARGET, tensor=False)
output = polyval(test_range, input_array, tensor=False)
loss = np.sum(abs(target - output)) / n_samples
return -1 * loss |
/*
// ======================================================================
// system command - DEAD
// immediately terminate game, stop executing system commands
// ======================================================================
*/
void SH_DEAD()
{
PrintStr("Do you wish to try again?\n");
for (;;)
{
char ... |
def read_segmentation_gt(gt_file):
with open(gt_file, 'rt') as f_handle:
reader = csv.reader(f_handle, delimiter='\t')
start_times = []
end_times = []
labels = []
for row in reader:
if len(row) == 3:
start_times.append(float(row[0]))
... |
// GetPrimitiveType gets the name extension from the given service
func GetPrimitiveType(service pgs.Service) (string, error) {
var primitiveType string
ok, err := service.Extension(services.E_Type, &primitiveType)
if err != nil {
return "", err
} else if !ok {
return "", errors.New("no atomix.primitive.type se... |
// Copyright 2020-2021, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>
// SPDX-License-Identifier: MIT OR Apache-2.0
use std::{
net::{IpAddr, Ipv4Addr, Ipv6Addr},
ops::Deref,
};
use chrono::{NaiveDateTime, Utc};
use namib_shared::{
macaddr::{MacAddr, SerdeMacAddr},
models::{DhcpLeaseInformation, DhcpL... |
/** Convenience method for getting the Color.black LineBorder of thickness 1.
*/
public static Border createBlackLineBorder() {
if (blackLine == null) {
blackLine = new FocRoundBorder(Color.black, 1);
}
return blackLine;
} |
#if defined(PEGASUS_OS_HPUX)
# include "UNIX_StorageSettingsGeneratedFromCapabilitiesDeps_HPUX.h"
#elif defined(PEGASUS_OS_LINUX)
# include "UNIX_StorageSettingsGeneratedFromCapabilitiesDeps_LINUX.h"
#elif defined(PEGASUS_OS_DARWIN)
# include "UNIX_StorageSettingsGeneratedFromCapabilitiesDeps_DARWIN.h"
#elif defined(P... |
def gen_fake_receipt_data(order=None):
data = {}
for _ in range(10):
data[FAKE.text()] = FAKE.text()
keys = sorted(data.keys())
data["signed_field_names"] = ",".join(keys)
data["unsigned_field_names"] = ""
data["req_reference_number"] = order.reference_number if order else ""
data["s... |
<reponame>shentuzhigang/MyZSTU<gh_stars>1-10
package club.zstuca.myzstu.boot.robot.listener;
import love.forte.simbot.annotation.Filter;
import love.forte.simbot.annotation.Listen;
import love.forte.simbot.annotation.Listener;
import love.forte.simbot.annotation.Priority;
import love.forte.simbot.api.message.events.Gr... |
Everyone deals with anxiety - to one degree or another.
Some of us squash it down, some of us develop coping strategies, but nonetheless all of us know that gnawing feeling in the pit of our stomachs. That sense that things could go wrong.
It's exhausting. It takes away from the quality of your work, and more importa... |
#!/usr/bin/python3
"""
Library for Raspberry Pi interfacing with the 16-Bit I/O Expander MCP23017
from Microchip Technology.
"""
__all__ = ["MCP23017", "LCD20x4"]
import time
import smbus
from collections import Iterable
class MCP23017:
"""
Class for the MCP23017 I/O port expander.
"""
REG_BASE_ADDR ... |
<gh_stars>0
import {FontConfig} from '@common/core/services/value-lists.service';
export const BROWSER_SAFE_FONTS: FontConfig[] = [
{family: 'Impact, Charcoal, sans-serif', category: 'sans-serif'},
{family: 'Arial, Helvetica Neue, Helvetica, sans-serif', category: 'serif'},
{family: '"Comic Sans MS", cursi... |
Segmentation of Glioma Tumors in Brain Using Deep Convolutional Neural Network
Detection of brain tumor using a segmentation based approach is critical in cases, where survival of a subject depends on an accurate and timely clinical diagnosis. Gliomas are the most commonly found tumors having irregular shape and ambig... |
<filename>samples/test_shadow.py
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0.
import argparse
from awscrt import auth, io, mqtt, http
from awsiot import iotshadow
from awsiot import mqtt_connection_builder
from concurrent.futures import Future
import sys
i... |
/**
* If a value is not {@code null},
* returns this {@code ChainX} storing the value,
* otherwise returns the given {@code ChainX}.
*
* @param chain the {@code ChainX} to be returned
* @return returns this {@code ChainX} storing the value of this {@code ChainX},
* if a value is not {... |
// HandleImage is a core.IImageHandler protocol implementation
func (flow *ImageFlow) HandleImage(image *core.Image, message *core.Message, bot core.IBot) error {
if !message.IsPrivate {
return nil
}
file, err := flow.imageDownloader.Download(image)
if err != nil {
return err
}
defer file.Dispose()
url, err ... |
<gh_stars>0
import React from 'react';
import AsTocElement from './AsTocElement';
import HeaderOne from './HeaderOne';
import HeaderTwo from './HeaderTwo';
import HeaderThree from './HeaderThree';
import HeaderFour from './HeaderFour';
import HeaderFive from './HeaderFive';
import HeaderSix from './HeaderSix';
type P... |
/**
* Used to add fallback locations (the crop specific locations) if any of the locations are null
* @param id the id of the crop to generate texture locations for
* @return this crop textures instance with non-null locations
*/
public CropTextures init(ResourceLocation id) {
String modid =... |
#include <stdio.h>
long long a,b = 0;
int diga,digb,m,n,p,q,i,j,k,sum=0;
int bia[200]={0};
int bib[200]={0};
int main (void)
{
scanf("%lld %lld",&a,&b);
for(i=0;a>0;i++)
{
bia[i]=a%2;
a=a/2;
// printf("%d",bia[i]);
}
p=i;
for(i=0;b>0;i++)
{
... |
<reponame>QData/dmc_remastered
import collections
import os
import random
import xml.etree.ElementTree as ET
import numpy as np
from dm_control import mujoco
from dm_control.rl import control
from dm_control.suite import base, common
from dm_control.suite.utils import randomizers
from dm_control.utils import container... |
def unload(self):
del self.processmemory
del self.registers
del self.error
del self.running
del self.pname
del self.tid
if hasattr(self, 'output_exit'):
del self.output_exit |
package es.uniovi.asw.steps;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.springframework.boot.test.context.SpringBootTest;
import com.uniovi.main.InciDashboardI2bApplication;
import cucumber.api.java.Before;
import cucumber.api.jav... |
<reponame>acontini/go-dmr
package fec
var (
hamming15_11_3_gen = [11]uint32{
0x4009, 0x200d, 0x100f, 0x080e, 0x0407, 0x020a, 0x0105, 0x008b, 0x004c, 0x0026, 0x0013,
}
hamming15_11_3_table = [16]uint32{
0x0000, 0x0001, 0x0002, 0x0013, 0x0004, 0x0105, 0x0026, 0x0407,
0x0008, 0x4009, 0x020a, 0x008b, 0x004c, 0x20... |
/**
* Deletes the search history.
*/
public class DeleteSearchHistoryHandler implements IServiceIntentHandler<ServiceAction> {
@Override
public void handleIntent(ServiceAction action, Intent intent) {
new SearchHistory().clear();
}
@Override
public void dispose() {
}
} |
An evaluation of dog rabies control in Limpopo province (South Africa)
SUMMARY Rabies is a prevalent and re-emerging disease in South Africa particularly in rural areas with high human densities. Outbreaks are frequently reported in the north and eastern parts of this country, probably an indication of inadequacy in t... |
Analysis of Control System to Prevent Collapse of Mixed-Source DC Microgrid for Industry
This paper presents the control of power sources by lookup table controller to maintain the voltage of critical load and to prevent the collapse of a mixed-source DC microgrid which consists of grid, diesel generators, batteries a... |
#include "Points.h"
void Points::addPoint(float x, float y) {
points.push_back(Point(x, y));
sortPoints();
}
void Points::addPoint(int x, int y, int width, int height) {
if (x <= 0 || y <= 0 || x >= width || y >= height)
return;
points.push_back(getPoint(x, y, width, height));
sortPoints(... |
#include <bits/stdc++.h>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long int lli;
lli mod=1000000007;
int main(){
ios::sync_with_stdio(0);
lli n, i, x=0, j;
cin>>n;
string s[n];
lli a[n], b[n][3], d[3]={0,0,0};
for(i=0;i<n;i++){
b[i][0]=b[i]... |
/**
* @file robot_state.cpp
* @version Iteration 2
* @brief This file is the main function which instantiate the object and implemets the function.
* @created on 3rd Nov 2020
* @copyright Copyright 2020. All rights reserved
* @Author : <NAME> (Driver), <NAME> (Navigator), <NAME> (Design Keeper),
... |
China constructing North Korean border refugee camps in preparation for disaster: leaked report
Updated
China has reportedly begun constructing multiple refugee camps capable of holding large numbers of asylum seekers fleeing potential disaster on the Korean Peninsula, according to a document leaked on Chinese microb... |
//#[macro_use]
//extern crate nom;
use crate::model_instance;
use crate::parser;
use crate::vwmap;
use std::error::Error;
use std::io::Error as IOError;
use std::io::ErrorKind;
use std::collections::HashMap;
use std::mem::replace;
use std::cell::Cell;
use fasthash::murmur3;
use serde::{Serialize,Deserialize};
use cr... |
/*[clinic input]
preserve
[clinic start generated code]*/
PyDoc_STRVAR(_imp_lock_held__doc__,
"lock_held($module, /)\n"
"--\n"
"\n"
"Return True if the import lock is currently held, else False.\n"
"\n"
"On platforms without threads, return False.");
#define _IMP_LOCK_HELD_METHODDEF \
{"lock_held", (PyCFunctio... |
/* Free the thread-specific buffer */
static void buffer_destroy(void *buf)
{
int i;
struct descriptor **d = (struct descriptor **)buf;
for (i = 0; i < NDESCRIP_CACHE; i++)
{
if (d[i])
{
if (d[i]->class == CLASS_XD)
free_xd(d[i]);
else if (d[i]->class == CLASS_D)
free_d(d[i])... |
/**
* cairo_surface_flush:
* @surface: a #cairo_surface_t
*
* Do any pending drawing for the surface and also restore any temporary
* modifications cairo has made to the surface's state. This function
* must be called before switching from drawing on the surface with
* cairo to drawing on it directly with native... |
/*
* @description Improper release of lock
*
* */
import java.util.concurrent.locks.ReentrantLock;
public class CWE404_Improper_Resource_Shutdown__ReentrantLock_Thread_01 extends AbstractTestCase
{
static private int intBadNumber = 3;
static private final ReentrantLock BAD_REENTRANT_LOCK = new Reentr... |
<gh_stars>0
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/* * Copyright (C) 2006 The Guava Authors * * 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 ... |
def train_script(input_data, output_dir, image_dir, batch_size=4, num_iter=10, **kwargs):
filenames, labels = [], []
for item in input_data:
if item['output'] is None:
continue
image_url = item['input'][0]
image_path = download(image_url, image_dir)
filenames.append(i... |
// upload bitstream (High-Speed) on every FPGA in the device
int ztex_upload_bitstream(struct ztex_device *dev, FILE *fp)
{
unsigned char settings[2];
int result;
result = vendor_request(dev->handle, 0x33, 0, 0, settings, 2);
if (result < 0) {
ztex_error("SN %s: getHSFpgaSettings returns %d (%s)\n",
dev->snSt... |
def enumAttributeAsJSON(self, attr):
pattern = {}
enumDefault = cmds.attributeQuery( attr, node=self.node, listDefault=True )
if enumDefault != None and len(enumDefault) > 0:
pattern[JsonKeys.kKeyDefault] = int(enumDefault[0])
enumList = cmds.attributeQuery( attr, node=self.node, listEnum=True)
if enumList... |
// replicateResourceToNamespaces will replicate the given object into target namespaces. It will return a list of
// Namespaces it was successful in replicating into
func (r *GenericReplicator) replicateResourceToNamespaces(obj interface{}, targets []v1.Namespace) (replicatedTo []v1.Namespace, err error) {
cacheKey :=... |
/* simple broadcast from "src" processor to other processors */
void
__fort_rbcstl(int src, void *adr, long cnt, long str, int typ, long ilen)
{
register int in;
register int me;
register int cp;
struct ents s;
struct ent e;
int lcpu, tcpus;
if (cnt <= 0) {
return;
}
s.beg = &e;
s.avl = (&e) ... |
A law expanding the rights of New Yorkers to sue for bias profiling by police, passed last year over Michael Bloomberg’s veto, will stand, Mayor de Blasio announced today. The new administration is abandoning the old one’s attempt to fight the law, which allows plaintiffs to sue the NYPD in state court for “injunctive ... |
/// Raw `TyVid` are used as the unification key for `sub_relations`;
/// they carry no values.
impl ut::UnifyKey for ty::TyVid {
type Value = ();
fn index(&self) -> u32 { self.index }
fn from_index(i: u32) -> ty::TyVid { ty::TyVid { index: i } }
fn tag() -> &'static str { "TyVid" }
} |
//Ami extracts imageID of current ASG from Launch Template.
func (r *Replacer) Ami(id string) (string, error) {
params := &autoscaling.DescribeAutoScalingInstancesInput{
InstanceIds: []*string{
aws.String(id),
},
}
output, err := r.asg.AsgAPI.DescribeAutoScalingInstances(params)
if err != nil {
return "", ... |
/**
* Created by emmaedv on 21/04/15.
*/
public class MenuActivity extends Activity{
RelativeLayout layout, header;
static ImageButton listBtn, arBtn;
TextView listText, arText, headerText;
// Bundle to be populated with found parts from the metaio view
Bundle returnDataBundle;
public void o... |
def text_match(text, model=None):
if not model:
model = current_app.config['DEFAULT_LDA_MODEL']
result, matched_topics = match_by_lda(text, model)
total_list = []
for author in result:
a = Reviewer(result[author])
if a.valid:
total_list.append(a)
return total_list |
/**
* Execute some sql as a batch.
* @return anything return from the callback object.
*/
public int[] executeBatchSql(){
if (this.batchSize <= 0 || GrouperClientUtils.length(this.batchBindVars) <= this.batchSize) {
if (this.bindVars != null){
throw new RuntimeException("Use batchBindVars ... |
<filename>profiler/sort_lib.cpp<gh_stars>0
/**
* @brief Application to run sorting algorithms on random int data
*
* @author <NAME>
* @date 2012-04-19
*/
// sort library
//
//==============================================================================
#include "sort_lib.h"
#include <vector>
//=============... |
use crate::RespError;
use bytes::{Buf, BufMut, Bytes, BytesMut};
#[derive(Debug, Clone, PartialEq)]
pub struct SimpleString(Bytes);
/// Simple string type
impl SimpleString {
/// Build a new Simple string
///
/// # Example
/// ```
/// use resp_protocol::SimpleString;
///
/// let simple_str... |
/**
* Wraps Spring's {@link CachingResourceResolver} but adds in support to disable with
* environment properties.
*
* {@code }
*
* @author Brian Polster
* @since Broadleaf 4.0
*/
@Component("blCachingResourceTransformer")
public class BroadleafCachingResourceTransformer extends CachingResourceTransformer i... |
<gh_stars>1-10
package whitedew
import (
"github.com/m1dsummer/whitedew/api"
"github.com/m1dsummer/whitedew/event"
"github.com/m1dsummer/whitedew/server"
"github.com/m1dsummer/whitedew/utils/chain"
"testing"
)
type PluginPing struct{}
func (p PluginPing) Init(w *WhiteDew) {
w.SetActionHandler("/ping", Callback... |
TUTTI is comprised of eight soundscapes: an audio self portrait comprising of manipulated sound recordings from Cosey’s life, music and art: “It’s the only album I’ve made that is an all encompassing statement expressing the totality of my being.
A sense of the past in relation to the present and everything in between... |
import { RecordOf } from 'immutable';
import { Reducer } from 'redux';
import { combineReducers } from 'redux-immutable';
import { createStateMachine, IStateMachine, IStateMachineHash } from './state-machine';
interface IRegistry {
[namespace: string]: Reducer;
}
/**
* Internal registry to aggregate reducers.
*/... |
import sys
def input():
return sys.stdin.readline()[:-1]
N=int(input())
A=tuple(map(int,input().split()))
B=[abs(i) for i in A]
o=0
for i in A:
if i<0:
o+=1
if o%2==0:
print(sum(B))
else:
print(sum(B)-min(B)*2) |
Perhaps it’s only the beginning of his long term plan for Tamil Nadu, but BJP president Amit Shah’s visit to the state to energise the party didn’t produce any breakthrough other than the entry of three new faces who at best can be described as small fry.
One of them is a former DMK MP and junior union minister Napole... |
/*******************************************************************************
**
** Function l2cble_set_fixed_channel_tx_data_length
**
** Description This function update max fixed channel tx data length if applicable
**
** Returns void
**
******************************************************... |
We sell all the hottest brands of sunglasses direct from the manufacturer. There are no fakes here. Want to do some reading on the beach? We can make most sunglasses into prescription sunglasses. You can receive your sunglasses with original lenses or prescription lenses made by us.
Best Optical Quality Prescription L... |
There Can be No Progressive Coalition Without Working Class Whites
BJ Gray Blocked Unblock Follow Following Apr 12, 2017
In direct conflict with the self-interest of the Democratic Party or any notion of progressive humanism, many liberals have expressed disgust at Bernie Sanders’ suggestion that the party should att... |
/**
* Checks reference queue and kills off entries which are not holding any data.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
private void flushEntries() {
Entry<K, V> entry = null;
while ((entry = (Entry) queue.poll()) != null) {
discard(entry);
}
final ... |
Table of Contents
Title Page
Copyright Page
CHAPTER 1
CHAPTER 2
CHAPTER 3
CHAPTER 4
CHAPTER 5
CHAPTER 6
CHAPTER 7
CHAPTER 8
CHAPTER 9
CHAPTER 10
CHAPTER 11
CHAPTER 12
CHAPTER 13
CHAPTER 14
CHAPTER 15
CHAPTER 16
CHAPTER 17
Lord Woolton Pie
Praise for the delightful mysteries of **Kate Kingsbury . .... |
/**
* Writes all brush and point entities with exception of some internal
* entities, including
* - cubemaps
* - overlays
* - static props
* - detail brushes
* Those are written by separate methods because of their different data models.
*
* @see writeCubeMaps
* @see wr... |
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// 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, merg... |
// Unregister the supplied NotificationHandler to not recieve OVSDB Notifications anymore
func (ovs *OvsdbClient) Unregister(handler ovsdb.NotificationHandler) error {
ovs.handlersMutex.Lock()
defer ovs.handlersMutex.Unlock()
i, err := getHandlerIndex(handler, ovs.handlers)
if err != nil {
return err
}
ovs.hand... |
.
The purpose of this study was to investigate wave amplitudes and latencies of electroretinograms (ERG) and to examine the eye cornea of rabbits a month after their eye UV-B-irradiation with a biologically effective dose of 1.3 kJ/m2 at three intensities of 1.62, 0.567 or 0.157 W/m2. It was demonstrated that ERG a- a... |
.
A F (ab)2 -like fragment of IgG isolated from the serum of partially hepatectomized rabbits was capable of enhanceing an immune response in rabbits xenogenous erythrocytes. This enhancing effect was revealed by an increase of both the number of antibody-forming cells in the spleen and the titres of 19S and 7S hemagg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.