content stringlengths 10 4.9M |
|---|
North Carolina sheriff’s deputies kicked in a man’s door Sunday, then pepper-sprayed him, shocked him with a Taser and ultimately shot him to death – all after the alleged victim refused to allow a warrantless search, his surviving housemate said.
“Not without a search warrant,” John Livingston told two officers who a... |
/* Copyright (C) 2002-2012 The SSI Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of condition... |
Evaluation of Food and Nutrition Security Level at Provincial Level Based on Outcome Indicators in Indonesia
This study aims at evaluating the situation of Food and Nutrition Security (FNS) at provincial level using six outcome indicators. The cross-sectional study, utilized secondary data from 33 provinces published ... |
// deleteLBManagedSG will ensure LBManagedSG are deleted.
func (c *associationController) deleteLBManagedSG(ctx context.Context, ingKey types.NamespacedName) error {
sgName := c.nameTagGen.NameLBSG(ingKey.Namespace, ingKey.Name)
sgInstance, err := c.cloud.GetSecurityGroupByName(sgName)
if err != nil {
return err
... |
/**
* Read class name at the given CONSTANT_Utf8 constant pool index, and return it
* trimmed of the possible 'L' prefix and ';' suffix.
*/
private String classNameAtCPIndex(int idx) {
if (cpTags[idx] != CONSTANT_Utf8) {
throw classFileReadException("Constant pool entry " + idx + " sh... |
<filename>utils/ip.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
IP handling library
Get host from IP, ping host, get public IP range divided in any
number of ranges, loop to call all IPs in specific IP range...
"""
__author__ = '<NAME>'
__email__ = "<EMAIL>"
__license__ = "MIT License"
__copyright__ = "... |
// Raise panic if the Gorm has error
func (self *GormDbExt) PanicIfError() *GormDbExt {
defer utils.DeferCatchPanicWithCaller()()
self.ConvertError.PanicIfDbError(self.gormDb)
return self
} |
/**
* Core instance of a library.
*/
public class MongoDBTester extends AbstractMongoDBTester {
private static final List<String> SYSTEM_COLLECTIONS_NAMES = Arrays.asList("system.namespaces", "system.indexes", "system.profile", "system.js");
private final MongoDatabase db;
/**
* @param db mongodb ... |
Attorney General Eric H. Holder Jr. struck back against criticism that the FBI has targeted Muslims in a series of undercover stings, telling a Muslim group Friday night that those who allege government entrapment "simply do not have their facts straight."
In one of his most pointed and personal responses to allegatio... |
In most ways, it's unfair to compare ' Man of Steel ' and ' The Avengers .'
Other than the fact that they're both expensive, large-scale superhero movies, they couldn't be more different. Joss Whedon 's 'The Avengers' represents the Marvel Studios' modus operandi in every way: it's scrappy, witty, silly and charming; ... |
<filename>electron-app/src/renderer/repositories/UIConfig/electronRepository.ts
import * as tsyringe from 'tsyringe'
import { Repository } from './repository'
@tsyringe.singleton()
export class ElectronRepository implements Repository {
get<T>(key: string): T | undefined {
return clientConfigStore.get(key, undef... |
// Copyright 2022 PingCAP, 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 i... |
/*
*Set the event check for BFD over IPv6.
*/
int bfd_ipv6_event_check(int unit, bcm_bfd_event_type_t event, int expeted_value) {
if (bfd_event_count[event] != expeted_value) {
printf("Expected_event:%d, Actual event:%d\n", expeted_value, bfd_event_count[event]);
return BCM_E_FAIL;
}
return BCM_... |
/**
* Implementation of a sequential-access list data structure.
*
*/
public class LinkedList {
private Node head;
private int size;
public LinkedList() {
head = null;
size = 0;
}
/**
* Add a value at the end of the list.
* @param x value to add at the end of the l... |
<gh_stars>0
import express from 'express';
import {
getPosts,
getPost,
createPost,
deletePost,
likePost,
unlikePost,
} from '../controllers/post.controller';
const router = express.Router();
router.post('/', getPosts);
router.get('/:postId', getPost);
router.post('/create', createPost);
router.delete('/:... |
/*
* Copyright 2016 The gRPC 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
// Create will save a new library.
func (c Library) Create() revel.Result {
utc := time.Now().UTC().Format(time.RFC3339)
library := make(map[string]interface{})
library["DateCreated"] = utc
library["DateModified"] = utc
library["Description"] = c.Params.Get("description")
library["Name"] = c.Params.Get("name")
l... |
<filename>atlas/modules/transformer/commands/dist.py
from atlas.modules.commands.base import CommandError
from atlas.modules.commands.utils import add_bool_arg
from atlas.modules.helpers.commands import validate
from atlas.modules.resource_data_generator.commands import generate as fetch_data
from atlas.modules.resourc... |
import functools
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework_jwt.utils import jwt_encode_handler
from rest_framework.permissions import IsAuthenticated
from rest_framework.generics import RetrieveUpdateAPIView
from .permissi... |
/**
* Subclass of TextAppearanceSpan just to work with how Spans get detected
*
* Created on 2/3/15.
* @author mgod
*/
class HintSpan extends TextAppearanceSpan {
HintSpan(String family, int style, int size, ColorStateList color, ColorStateList linkColor) {
super(family, style, size, color, linkColor);... |
/*
* A tag is characterized by: a name, a type, a namespace and attributes
* according to fbuf_get_xml_namespace. This function is used to
* reconstruct the tag and send it out.
*/
boolean
xml_put_namespace (void *peer, const char *name, int type,
const char *namespace, const char *rest)
{
switch (type) {
... |
Trace metals in Lates niloticus and Rastrineobola argentea samples for human consumption at Winam Gulf of Lake Victoria
Trace metals were determined in the two most abundant fish species in the Winam Gulf of Lake Victoria (Lates niloticus and Rastrineobola argentea). The results show that the concentratios of the meta... |
// These are the two major time-sinks which happen after we have fully received
// a block off the wire, but before we can relay the block on to peers using
// compact block relay.
static void DeserializeBlockTest(benchmark::State& state)
{
CDataStream stream((const char*)block_bench::test_block,
(const... |
def sendMessageV2(lst):
return(line_bot_api.reply_message(event.reply_token,lst)) |
<reponame>loftwah/poemkit
import React, { Component } from 'react';
type SeamlessScrollingElementItemProps = {};
type SeamlessScrollingElementItemState = false;
export default class SeamlessScrollingElementItem extends Component<SeamlessScrollingElementItemProps, SeamlessScrollingElementItemState> {
construct... |
/**
* Represents a change in the selected cell.
*/
public class SelectedCellChangeEvent extends GwtEvent<SelectedCellChangeEvent.Handler> {
public static interface Handler
extends
EventHandler {
void onSelectedCellChange(SelectedCellChangeEvent event);
}
public static Type<Selec... |
President Donald Trump's personal attorney, Michael Cohen, confirmed to NBC News that he has received requests for information from the Senate and House intelligence committees as part of their probes into Russian interference in the U.S. election.
A congressional aide said the request letters, first reported by ABC N... |
def send(self, message):
packed = self._pack_message(message)
self._sendlock.acquire()
try:
self.socket.sendall(packed)
finally:
self._sendlock.release() |
// NewManualComment returns a new Comment with the request to the user to manually correct
// the given journal entry.
func NewManualComment(mode, element string) Comment {
cmt := NewComment(mode, element)
cmt.DoManual = true
logrus.Warnf("journal entry of «%s» needs manual correction", element)
return cmt
} |
/**
* Add a group role on all locations for a given orchestrator
*
* @param orchestratorId
* @param groupId
* @param role
*/
public void addGroupRoleOnAllLocations(String orchestratorId, String groupId, String role) {
Orchestrator orchestrator = orchestratorService.getOrFail(orches... |
You're unique. Aren't you? One of the more creative hypotheses surrounding quantum mechanics posits the exact opposite. Though we can readily see only one world, quantum mechanics says that when we're not observing the particles that make up that world, those particles exist in multiple places at once. There are many t... |
<reponame>snehadevi/Vehicle_Showroom
package com.sneha;
public interface Vehicle {
void getModelNumber();
void getEngineType();
void getEnginePower();
void getTireSize();
void display();
void countVisitors();
}
|
import java.util.Scanner;
public class Main {
private static Scanner sc=new Scanner(System.in);
public static void main(String[] args){
int n=sc.nextInt();
long a=sc.nextLong();
long b=sc.nextLong();
long[] x=new long[n+1];
for(int i=1;i<=n;i++){
x[i]=sc.nextLong();
}
long tired=0;
for(int i=1;i<=... |
“It’s a fool’s errand you’re involved in,” warned Pulitzer Prize-winning historian Gordon Wood when approached recently by this magazine to predict Barack Obama’s historical legacy. “We live in a fog, and historians decades from now will tell their society what was happening in 2014. But we don’t know the future. No on... |
<filename>sys/dev/isci/scil/sci_types.h
/*-
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* GPL LICENSE SUMMARY
*
* Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
*
* This program is free software; you c... |
// CheckExistsField check field is exists by name
func CheckExistsField(elem reflect.Value, fieldName string) (realFieldName string, exists bool) {
typeName := elem.Type().String()
fileKey := typeName + nameConnector + fieldName
realName, isOk := fieldNameMap.Load(fileKey)
if !isOk {
return "", isOk
} else {
r... |
One hundred and ten college and university presidents have issued a joint letter to President-elect Donald Trump urging him to forcefully “condemn and work to prevent the harassment, hate and acts of violence that are being perpetrated across our nation, sometimes in your name, which is now synonymous with our nation’s... |
<filename>post-service/src/domain/gateway/IPostRepository.ts
import { IPost } from "../entities/types";
export interface IPostRepository {
getPosts(filter?: any): Promise<IPost[]>;
getPostById(postID: string): Promise<IPost>;
createPost(postProps: IPost): Promise<IPost>;
updatePost(postID: string, ... |
SOUNDGARDEN
SEX AND GUNS AND ROCK 'N' ROLL
“We signed with A&M about eight months ago, at around the same time our ‘Ultramega OK’ album was released by SST. We’d been talking to A&M for a couple of years, and they’d already heard ‘Ultramega OK’ and were interested in many of the tracks on there. They had to trust us ... |
“Everything is under negotiation, including One China.” Those words, said by president-elect Donald Trump in January as he questioned U.S. policy on Taiwan, could mark the death knell of the Obama Administration’s Asia pivot. More importantly, Trump’s words could signal the unraveling of peace and prosperity in Asia, i... |
import { useSubscription } from '@terra-dev/broadcastable-operation';
import { useRewardsAncGovernance } from 'pages/gov/queries/rewardsAncGovernance';
import { useMemo } from 'react';
export function useCanIVote(pollId: number | undefined): boolean {
//const client = useApolloClient();
//
//const { walletReady ... |
.
To explore the carcinogenic effects of sterigmatocystin(ST), one of the predominant contaminating mycotoxins in high risk areas of cancer in China, mutation of tumor suppressor gene p53 and oncogene Ki-ras in human fetal lung cells in vitro induced by ST was studied using cell culture and silver-staining PCR-SSCP me... |
/**
* Responsibility: This class provides the methods used to print basic information about the game, like table printing and moves notifying.
*
* @author Paoloni
*
*/
public class ConsoleGameView implements GameView {
/**
* The character printed in case of empty cell.
*/
private static final char EMPTY_CHA... |
Blynk is a new platform that allows you to quickly build interfaces for controlling and monitoring your hardware projects from your iOS and Android device. After downloading the Blynk app, you can create a project dashboard and arrange buttons, sliders, graphs, and other widgets onto the screen. Using the widgets, you ... |
import { Component, OnInit, AfterViewInit, Output, EventEmitter } from '@angular/core';
const animation_timer = 3450;
@Component({
selector: 'app-guaca-play',
templateUrl: './guaca-play.component.html',
styleUrls: ['./guaca-play.component.scss']
})
export class GuacaPlayComponent implements OnInit, AfterViewInit... |
Texas Tech’s mascot is now in the playoffs in a national contest.
Raider Red has made it to the elite eight for the playoff rounds of the Capital One 2012 Mascot Challenge.
Red took second place out of 16 mascots nationwide. The playoffs are a single-elimination vote over a three-week period.
Red’s only regular-seas... |
# Copyright 2020-2022 <NAME> Multimedia GmbH
#
# 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 ... |
I find it hard to classify Adolf Hitler as the "most overrated" when he was never seen as a competent commander in the first place. Hitler was a vagrant, failed art student who only reached the equivalent rank of corporal in the Imperial German Army in WWI. His military blunders in WWII are well known, but that's to be... |
/**
* Update the user roles as per the given list.
* The update is only executed when there is a change compared to the current roles in LDAP.
*
* @param orgUserDN
* @param assignedRoleDNs
*/
public static void updateAssignedRoles(String orgUserDN, ArrayList<String> assignedRoleDNs)... |
The effect of prenatal alcohol exposure (PAE) on the onset of speech disorders and communication problems in children and adolescents
Alcohol consumption has many negative effects on the human body, and has been proven to have teratogenic effects on fetal development. Prenatal alcohol exposure (PAE) is associated with... |
/**
* Unit tests for {@link HadoopInputFormatIO}.
*/
@RunWith(JUnit4.class)
public class HadoopInputFormatIOTest {
static SerializableConfiguration serConf;
static SimpleFunction<Text, String> myKeyTranslate;
static SimpleFunction<Employee, String> myValueTranslate;
@Rule public final transient TestPipeline ... |
#include "arcpch.h"
#include "Buffer.h"
namespace Arcane
{
Buffer::Buffer() {
glGenBuffers(1, &m_BufferID);
}
Buffer::Buffer(float *data, int amount, unsigned int componentCount) {
glGenBuffers(1, &m_BufferID);
Load(data, amount, componentCount);
}
Buffer::~Buffer() {
glDeleteBuffers(1, &m_BufferID);
}... |
for _ in range(int(input())):
lx=list(map(int,input().split()))
l1=set(lx)
l1=list(l1)
#print(l1)
if(len(lx)==len(l1)):
print('NO')
elif(len(l1)==1):
print('YES')
print(lx[0],lx[0],lx[0])
elif(len(l1)==2):
#a=[i for i in l and i not in l1]
... |
It’s rare to come across writing tools that are completely free and actually useful. You can ring up quite a tab attending webinars, seminars and retreats. For most writers, those price tags are far out of reach. On the other end of the spectrum, writing tools and tips that are advertised as free have a tendency to dis... |
// Package kubectl wraps kubectl cli commands.
package kubectl
import (
"github.com/snsinfu/imagedeploy/command"
)
// Apply holds arguments for `kubectl apply`.
type Apply struct {
Manifests []string
Kustomize string
Namespace string
}
func (opts *Apply) Run() error {
return opts.command().Run()
}
func (opts *... |
/**
* @author Javon
* Class Structure for a Wine
*/
public class Wine extends WineBase
{
private MediaPlayer voicePronounciation;
private int id;
private int columnId;
private Drawable picture;
private boolean favorite = false;
private String pronounciation;
private String occasion;
private String type;
pri... |
import collections
def main():
N = int(input())
A = list(map(int, input().split()))
rankA = list(set(A))
rankA.sort(reverse=True)
Acounter = collections.Counter(A)
res = 4
ans = []
for a in rankA:
count = Acounter[a]
if count >= 2:
ans.append(a)
r... |
package com.crashlytics.android.answers;
import io.fabric.sdk.android.Fabric;
import io.fabric.sdk.android.Kit;
import io.fabric.sdk.android.services.common.AbstractSpiCall;
import io.fabric.sdk.android.services.common.ResponseParser;
import io.fabric.sdk.android.services.events.FilesSender;
import io.fabric.sdk.andro... |
/**
* Genre entity which holds a name.
* <p>
* This type is immutable and therefor inherently thread safe.
*
*/
public class Genre extends Named
{
/**
* Constructor method to create a new {@link Genre} instance.
*
* @param name not empty
*/
public Genre(
final String name
)
{
super(name);
}
} |
/**
* Provides an opinionated base for a reactive CRUD service that manages entities within a Mongo NoSQL database. This
* service provides the following additional functionality:
* 1) Create and Update data transformers
* 2) Spring application event thrown on any data change (Note: due to the stream nature of the ... |
#include<bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a);i<=(b);i++)
#define ROF(i,a,b) for(int i = (a);i>=(b);i--)
#define MST(a,x) memset(a,x,sizeof(a))
#define ll long long
#define PB push_back
#define PH push
#define MP make_pair
#define FT first
#define SD second
#define N 100005
#define M 305
#defin... |
package com.tle.web.api.item.interfaces;
import com.tle.web.api.item.interfaces.beans.ItemStatusBean;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Pat... |
The city of San Antonio is hoping to one day become home to a Major League Soccer team, and on Wednesday a significant step was taken in that quest.
City and Bexar County officials announced they have reached a joint agreement to buy Toyota Field from current San Antonio Scorpions owner Gordon Hartman, pending officia... |
Small Ruptured Abdominal Aortic Aneurysm with Renal Failure: Endovascular Treatment
The successful endovascular exclusion of a ruptured 3-cm diameter atherosclerotic abdominal aortic aneurysm (AAA) in a high-risk patient with renal failure is reported. An 82-year-old man with chronic renal failure and other comorbidit... |
Note: Tandem Kirkpatrick-Baez microscope with sixteen channels for high-resolution laser-plasma diagnostics.
Multi-channel Kirkpatrick-Baez (KB) microscopes, which have better resolution and collection efficiency than pinhole cameras, have been widely used in laser inertial confinement fusion to diagnose time evolutio... |
/// module of a predicate
///
/// notice that modules are currently treated as atoms, this should change.
YAPModule module() {
if (ap->ModuleOfPred == PROLOG_MODULE)
return YAPModule(AtomProlog);
else
return YAPModule(AtomOfTerm(ap->ModuleOfPred));
} |
/**
* Read in the input file line by line, parse the input data into an array
* of <code>Case<code> .
* The test file should follow the following format:
* <p>
* #Element Property name ULocale Input string isOK( Pass(P)/Fail(F) )
* ReportDesign creationDate zh_CN 1981-04-... |
Faster placement of hydrogens in protein structures by dynamic programming
M. Word and coauthors from the Richardsons' 3D Protein Structure laboratory at Duke University propose dot scores to measure interatomic interactions in molecular structures. Their program REDUCE uses these scores in a brute-force search to sol... |
import * as express from 'express';
import { HELLO, GOOD_BYE } from './message';
import { putTask, getTask, Task } from './datastore';
import { CommitResponse } from '@google-cloud/datastore/request';
const app = express();
app.get('/', (req: express.Request, res: express.Response) => {
res.send(`${HELLO} from App ... |
No Good from a Corpse
by Leigh Brackett
CHAPTER ONE
EDMOND CLIVE saw her almost as soon as he came into the runnel from the San Francisco train. She was standing beyond the gate, watching for him, and somehow in all that seething press of uniforms and eager women, she was quite alone.
Clive smiled and tried to shov... |
/**
* Delete a single document from the index provided a specific doc id.
*
* @param docId
* id of the solr document to delete
*
*/
public void deleteDocument(String docId) {
try {
if (embeddedSolrServer != null) {
embeddedSolrServer.deleteById(docId);
} else {... |
Esophageal diverticulum presenting as a thyroid nodule and diagnosed on fine-needle aspiration.
Anterior cervical nodules that move with swallowing and are confirmed as thyroidal by ultrasonography of the neck are not necessarily of thyroidal origin. We report a patient who was found to have primary hypothyroidism in ... |
<filename>models/two_d/multiresunet.py
from typing import Tuple, Dict
import torch.nn as nn
import torch.nn.functional as F
import torch
class Multiresblock(nn.Module):
def __init__(self, input_features: int, corresponding_unet_filters: int, alpha: float = 1.67) -> None:
"""
MultiResblock
... |
def parse_rttm_for_ms_targets(self, sample, target_spks=None):
rttm_lines = open(sample.rttm_file).readlines()
uniq_id = self.get_uniq_id_with_range(sample)
rttm_timestamps = extract_seg_info_from_rttm(uniq_id, rttm_lines)
fr_level_target = assign_frame_level_spk_vector(
rttm... |
<reponame>anudeep586/Codechef_hackerrank_codeforces1<gh_stars>0
tests=int(input())
for _ in range(tests):
z=[]
d=int(input())
m=0
num=0
for o in range(10000):
num=num+1
while True:
i=1
if num%i==0:
z.append(i)
else:
... |
/**
* Push consumer with namespace.
*/
public class PushConsumerWithNamespace {
public static void main(String[] args) throws Exception {
DefaultMQPushConsumer defaultMQPushConsumer = new DefaultMQPushConsumer(
"test1|InstanceTest", "cidTest");
defaultMQPushConsumer.setNamesrvAddr... |
package com.manning.nettyinaction.chapter12;
import org.eclipse.jetty.npn.NextProtoNego;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* @author <a href="mailto:<EMAIL>"><NAME></a>
*/
public class DefaultServerProvider implements NextProtoNego.ServerProvider {
private static... |
<reponame>bcgov/time-machine
import * as Koa from 'koa';
import * as Router from 'koa-router';
import {
retrieveRfxPhases,
retrieveRfxPhaseById,
updateRfxPhase,
deleteRfxPhase,
createRfxPhase,
checkRfxUsage,
} from '../../../services/client/rfxPhase.service';
import { authorize } from '../../../services/com... |
Drift-diffusion simulation without Einstein relation
We suggest that the overestimation of the linear current in nanoscale devices by the standard drift-diffusion (DD) model is due to approximating the diffusivity by the Einstein relation. Using instead in DD simulation the field-dependent diffusivity from bulk Monte ... |
class LineDataFetcher:
'''
Fetches data published to /line_data
'''
def __init__(self):
self.data_sub = rospy.Subscriber("/line_data", LineData, self.data_callback, queue_size = 1)
self.line_data = []
def data_callback(self, linedata):
self.line_data = linedata
retu... |
package com.dotcms.contenttype.test;
public class Constants {
final static String NEWS = "28039964-5615-4ccf-bb96-ded62adbcc6a";
final static String CONTENT = "2a3e91e4-fbbf-4876-8c5b-2233c1739b05";
final static String FILEASSET = "33888b6f-7a8e-4069-b1b6-5c1aa9d0a48d";
final static String WIDGET = "9d8cba31-0072-... |
/**
* Created by haoling.wang on 2019/1/10.
*/
@Slf4j
@RestController
@RequestMapping("newapi/cricle_camel/task")
public class TaskController {
@Resource
private CamelCommentLikeNumSyncTask camelCommentLikeNumSyncTask;
@Resource
private CamelPostLikeNumSyncTask camelPostLikeNumSyncTask;
@Resour... |
/**
*
* @author Ondrej Mihalyi
*/
@Health
@ApplicationScoped
public class ServiceActiveHealthCheck implements HealthCheck {
@Inject
@ConfigProperty(name = "ServiceActiveHealthCheck.timeToBecomeInactiveInSeconds", defaultValue = "10")
int limitForInactivityInSeconds;
@Inject
LastResponse... |
<gh_stars>0
package test
import (
"fmt"
"strings"
"testing"
"github.com/gruntwork-io/terratest/modules/random"
"github.com/gruntwork-io/terratest/modules/terraform"
)
// TestIAMUsersExample creates random iam users
func TestIAMUsersExample(t *testing.T) {
t.Parallel()
opts := &terraform.Options{
Terraform... |
/* Write P into the buffer according to these args:
* If SIGN is true, p is a signed.
* BASE is the base.
* If WITH_ZERO is true, '0' must be added.
* WIDTH is the width of the field.
*/
static
UInt myvprintf_int64 ( void(*send)(HChar,void*),
void* send_arg2,
Int... |
<reponame>sawickiap/RegEngine
#include "BaseUtils.hpp"
#include "Settings.hpp"
#include "SmallFileCache.hpp"
#include "ImGuiUtils.hpp"
#include "Streams.hpp"
#define RAPIDJSON_HAS_STDSTRING 1
#include "../ThirdParty/rapidjson/include/rapidjson/document.h"
#include "../ThirdParty/rapidjson/include/rapidjson/prett... |
import * as fs from "fs";
import { IActivation } from "./internal/IActivation";
import { ConnectionFactory } from "./internal/ConnectionFactory";
import { MutexServer } from "../MutexServer";
import { MutexConnector } from "../MutexConnector";
const EXTENSION = __filename.substr(-2);
if (EXTENSION === "js")
requ... |
export default class DevMessageProducer {
_messages: string[]
_counter: number = 0
// eslint-disable-next-line no-undef
_timer: NodeJS.Timeout
constructor(
messagesFactory: () => string[] = DevMessageProducer._defaultMessagesFactory
) {
this._messages = messagesFactory()
}
static _defaultMessa... |
/**
* Wrapper class over NamespaceEvent. It can be used as a key in a map or an
* entry in a set.
*/
public class NamespaceEventKey {
public NamespaceEvent event;
private int hashCodeValue;
public NamespaceEventKey(NamespaceEvent event) {
this.event = event;
hashCodeValue = (int)event.getType(... |
// Encrypt takes a left and right uint32 and encrypts it using the Feistel cipher,
// it returns the encrypted left and right parts
func Encrypt(left, right uint32, rounds int, keys []uint32) (uint32, uint32) {
size := len(keys)
for i := 0; i < rounds; i++ {
left1 := (left ^ keys[i%size]) ^ right
right1 := left
... |
<reponame>Qi4j/qi4j-libraries<filename>sql/src/main/java/org/qi4j/library/sql/datasource/DataSourceConfiguration.java
package org.qi4j.library.sql.datasource;
import org.qi4j.api.common.UseDefaults;
import org.qi4j.api.configuration.ConfigurationComposite;
import org.qi4j.api.configuration.Enabled;
import org.qi4j.api... |
// Copyright (c) 2019-present, <NAME> <<EMAIL>>
// See the LICENSE for more information.
/**
* Inversion control types.
*/
export const TYPES = {
Logger: Symbol.for('Tunnel/Logger'),
TunnelService: Symbol.for('Tunnel/TunnelService'),
LocalTunnelAction: Symbol.for('Tunnel/LocalTunnelAction'),
RemoteTunnelAct... |
# Exercise 106 - Interactive Python Help System
'''Make a mini-system that uses Python's Interactive Help. The user will type
the command and the manual will appear. When the user types the word 'END',
the program will terminate. Important: use color.
'''
|
<filename>src/Models/UI/Button.cpp
#include "Button.hpp"
#include "../../Others/Game_Parameters.hpp"
#include <iostream>
#include "../../Managers/ObjectManager.hpp"
Button::Button() : Label()
{
}
Button::Button(const std::string &text, Vector2<int> position, Vector2<int> size, TextRenderer &renderer, const Vector3<fl... |
But no mind ever grew fat on a diet of novels. The pleasure which they occasionally offer is far too heavily paid for: they undermine the finest characters. They teach us to think ourselves into other men’s places. Thus we acquire a taste for change. The personality becomes dissolved in pleasing figments of imagination... |
nums = input().split()
N = int(nums[0])
L = int(nums[1])
#繰り返しの要素入力
count = 0
list = []
while count < N:
list.append(input())
count += 1
s_list = sorted(list)
print(''.join(s_list))
|
// ParseVersionRange parses a version range string like "[16.0,)"
// and returns comparable minimum and maximum numeric forms.
func ParseVersionRange(s string) (min, max uint64, err error) {
v, err := q.init()
if v == nil {
return
}
err = v.ISetupHelper(&q.vh)
if err != nil {
return
}
return q.vh.ParseVersio... |
<gh_stars>10-100
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------... |
<filename>hello/urls.py
from django.urls import path
from hello import views
urlpatterns = [
path("", views.home, name="home"),
path("hello/<name>", views.hello_there, name="hello_there"),
] |
package main
import (
"go/ast"
"go/parser"
"os"
"path"
"path/filepath"
"runtime"
"strings"
)
type mImportPaths struct {
Fn string
Src string
Env map[string]string
InstallSuffix string
}
type mImportPathsDecl struct {
Name string `json:"name"`
Path string `json:"path"`
}
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.