content
stringlengths
10
4.9M
/** * */ package com.mangodemo.repository; import org.testng.Assert; import org.testng.annotations.Test; import com.mangodemo.BaseTest; import com.mangodemo.model.Person; /** * @author jiazhang * */ public class PersonRepositoryTest extends BaseTest { @Test public void insert() { ...
// Copyright 2019 The LevelDB-Go and Pebble Authors. All rights reserved. Use // of this source code is governed by a BSD-style license that can be found in // the LICENSE file. package randvar import ( "encoding/binary" "fmt" "regexp" "strconv" "strings" "golang.org/x/exp/rand" ) var randVarRE = regexp.MustC...
/** * Builder class for {@link Request}. * Provides a convenient way to set various fields to {@link Request} */ public static class Builder { private String url; private String method; private String userAgent; private Params params; private int connectTimeout; ...
After a week of being behind Hillary Clinton by ten points or more in various polls, Donald Trump has suddenly pulled to nearly even in a national poll by Reuters/Ipsos released Saturday. Clinton leads with 42 percent of the vote compared to 39 percent for Trump, a significant gain for the GOP nominee, who had been be...
<reponame>vknaisl/munchen_tdd<filename>sources/src/main/java/cz/knaisl/munchen_tdd/core/converter/DateToZonedDateTimeConverter.java package cz.knaisl.munchen_tdd.core.converter; import org.springframework.core.convert.converter.Converter; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Date;...
All-carbon-nanotube flexible multi-electrode array for neuronal recording and stimulation Neuro-prosthetic devices aim to restore impaired function through artificial stimulation of the nervous system. A lingering technological bottleneck in this field is the realization of soft, micron sized electrodes capable of inj...
package at.ac.tuwien.sepm.groupphase.backend.service.impl; import at.ac.tuwien.sepm.groupphase.backend.endpoint.dto.Filter.MessageFilter; import at.ac.tuwien.sepm.groupphase.backend.entity.ApplicationUser; import at.ac.tuwien.sepm.groupphase.backend.entity.Message; import at.ac.tuwien.sepm.groupphase.backend.entity.Re...
Influence of the Sun Position and Platform Orientation on the Quality of Imagery Obtained from Unmanned Aerial Vehicles Images acquired at a low altitude can be the source of accurate information about various environmental phenomena. Often, however, this information is distorted by various factors, so a correction of...
def ecdsa_signature_parse_der(der_sig: bytes) -> Secp256k1ECDSASignature: sig = ctypes.create_string_buffer(INTERNAL_SIGNATURE_LENGTH) result = lib.secp256k1_ecdsa_signature_parse_der( secp256k1_context_verify, sig, der_sig, len(der_sig) ) if result != 1: assert_zero_return_code(result) ...
/** * Recalculate player actions (movement and shooting). Called from recalculate(). * @param frameTime frame time, in seconds. */ private void recalculatePlayerActions(double frameTime) { boolean leftKeyDown = this.getKeyState(KeyEvent.VK_LEFT); boolean rightKeyDown = this.getKeyState(KeyEvent.VK_RIGHT); i...
Every year they get closer: UFO fan hails clearest video yet and says 'they know I'm filming them' It seems to be world centre for UFO videos, but this the image is extraordinarily clear. UFO enthusiast Michael Lee Hill, of Eastlake, has recorded many images of something mysterious over Lake Erie, Ohio. He has just ...
package model type CodexSubmission struct { QuestionID string `json:"question_id"` SourceCode string `json:"source_code"` Language string `json:"language"` TimeLimit string `json:"time_limit"` TestCases []*SandboxStdin `json:"test_cases"` } type SandboxStdin struct { ID ...
N, M = map(int, input().split()) H = list(map(int, input().split())) OBS = [] for i in range(0, N): OBS.append(1) for i in range(0, M): A = 0 B = 0 A, B = map(int, input().split()) if H[A - 1] > H[B - 1]: OBS[ B - 1 ] = 0 elif H[A - 1 ] < H[B - 1]: ...
from sys import stdin, stdout from math import sqrt, floor n = int(stdin.readline()) arr = list(map(int, stdin.readline().split())) arr.sort() for i in range(1, n - 1, 2): arr[i], arr[i - 1] = arr[i - 1], arr[i] ans = 0 for i in range(1, n - 1, 2): if arr[i] < min(arr[i - 1], arr[i + 1]): an...
#include <stdio.h> #include <stdlib.h> const long N=166666; int max(long a,long b) { if(a>b)return a; else return b; } long len_of_goodsegment(long long a[N],long n) { long count=2,ret=2,i; for(i=2;i<n;i++) { if(a[i]==a[i-1]+a[i-2]) { count++; } else ...
/** * internal use only, set current inner context * @param newCurrentInnerContext current inner context */ public static void internal_assignCurrentInnerContext(GrouperContext newCurrentInnerContext) { if (newCurrentInnerContext == null) { currentInnerContext.remove(); } else { current...
Hadas Gold interviews Michelle Fields and her boyfriend Jamie Weinstein, the Daily Caller editor who began the public conversation about an incident with Corey Lewandowski by tweeting “Trump always surrounds himself [with] thugs.” From Politico: Michelle Fields says she wouldn’t change how she has handled the events ...
from sys import stdin from heapq import * Q = int(stdin.readline()) customer_id = 1 pq = [] first = 1 ans = [] served = set() for q in range(Q): args = stdin.readline().split() if args[0] == "1": heappush(pq, [-1*int(args[1]), customer_id]) customer_id += 1 elif args[0] == "2": ans...
def remove_instance(self, instance, delete_instance=False, ignore_missing=True): instance = self._get_resource(_instance.Instance, instance) return instance.remove(self._session, delete_instance=delete_instance, ignore...
def message_parse(self, message, save_original=False): if not isinstance(message, Message): raise ValueError(_('Message should be a valid Message instance')) msg_dict = {'message_type': 'email'} message_id = message.get('Message-Id') if not message_id: message_id ...
The way Educators teach and the way students learn has changed dramatically over the last several years. Instead of assigning worksheets, teachers are now assigning online projects that bring a richer environment of learning to the classroom. Instead of students putting together a folder with all their work and assignm...
// This is the single constructor for all Delegates. The compiler // doesn't provide an implementation of the Delegate constructor. We // provide that implementation through an ECall call to this method. FCIMPL3(void, COMDelegate::DelegateConstruct, Object* refThisUNSAFE, Object* targetUNSAFE, PCODE method) { F...
<reponame>thomasboussekey/terraform-provider-aiven package cache import ( "fmt" "sync" aiven "github.com/aiven/aiven-go-client" ) var ( topics = make(map[string]map[string]aiven.KafkaTopic) topicCacheLock sync.Mutex ) //TopicCache type type TopicCache struct { } //write writes the specified topic to t...
def multi_svc_chain(self, policys, svcs): right_net_fix, r_hs_obj = self.config_vn(stack_name='right_net') left_net_fix, l_hs_obj = self.config_vn(stack_name='left_net') vn_list = [left_net_fix, right_net_fix] vms = [] vms = self.config_vms(vn_list) ...
use std::ops::Bound::{self, *}; pub(crate) struct Bounds<T> { pub start: Bound<T>, pub end: Bound<T>, } impl<'a, T> From<&'a std::ops::Range<T>> for Bounds<&'a T> { fn from(range: &'a std::ops::Range<T>) -> Self { Self { start: Included(&range.start), end: Excluded(&range.e...
Considerations of reactive power/voltage control in CAISO market operations The design and integration of traditional voltage control and stability tools with the Energy Market Management System at the California Independent System Operator (CAISO) is discussed and presented in this paper. The tools are transformed fr...
package main; public class localBrowser { private Window win; public localBrowser(Window win){ this.win = win; } public void performSearch(){ String url = win.searchArea.getText(); if(!url.isEmpty()) win.browser.setUrl(url); } }
{-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Network interpreter for Floating Domains specific API module Network.DO.Domain.N...
/************************************************************** * * 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 y...
def store_position(self, timer): self._append_time(timer) self._append_storex(self.xposition[-1]) self._append_storey(self.yposition[-1])
. In experiment with an artificially perfused guinea-pig brain, labelled ethmosine possessing gamma-activity was used to study the penetration of the drug through the blood-brain barrier. The ethmosine transport constant was found to be in a range of 0.45-0.62 x 10(-3) ml x min-1 x g-1 for various segments of the ante...
def do_python(self, line): locals = self.getExpressionLocals() if len(line) != 0: cobj = compile(line, 'cli_input', 'exec') exec(cobj, locals) else: code.interact(local=locals)
A hybrid particle swarm with velocity mutation for constraint optimization problems Two approaches for solving numerical continuous domain constrained optimization problems are proposed and experimented with. The first approach is based on particle swarm optimization algorithm with a new mutation operator in its veloc...
<filename>src/interactions/fun/DadJoke.ts<gh_stars>1-10 import * as DJS from "discord.js"; import { Bot } from "structures/Bot"; import { request } from "undici"; import { SubCommand } from "structures/Command/SubCommand"; interface Data { attachments: { fallback: string; footer: string; text: string; ...
‘Homosexuality is not a problem – it doesn’t do you any harm and can be lots of fun’: Students and Gay Rights Activism in Irish Universities, 1970s–1980s Using primary archival material, this article explores the role of students and universities in the campaign for gay rights in Ireland in the 1970s and 1980s. At a t...
<reponame>Higgcz/Gina<filename>api/structs/Structures/Tree.cpp<gh_stars>1-10 // // Tree.cpp // Gina // // Created by <NAME> on 06.01.14. // Copyright (c) 2014 <NAME>. All rights reserved. // #include <iomanip> #include <math.h> #include "Tree.h" using namespace std; using namespace Gina::Structures; void Node::s...
Evaluating Differences in Mathematical Competencies in Middle School Students during Pandemic Conditions through Preparatec Platform This research proposes to evaluate the difference in essential mathematical competencies of middle school students transitioning to high school level under pandemic conditions (COVID-19)...
/** * This class provides functionalities for automated calibration of PID weights for the NXT. * It provides a test, that forces the NXT to balance and make the same movements each run, while it measures control information and sends it after the test to the PC. * This class provides two functions to choose next PI...
/* * Convert int to hexadecimal string with padding * * @param value * @param padding * @return hexadecimal string */ protected static String hexString(int value, int padding) { String hexString = "0123456789ABCDEF"; StringBuffer tempString = new StringBuffer ...
//bees attacks bear and insect mobs that are in the dimension @SubscribeEvent public static void MobUpdateEvent(LivingUpdateEvent event) { Entity entity = event.getEntity(); if (!entity.world.isRemote && entity.dimension == BzDimensionRegistration.bumblezone() && Bumblezone.BzConfig.aggressiveBees.g...
<filename>models/model_job.go package models type ( Job map[string]MessagingJobs MessagingJobs []MessagingJob MessagingJobValue struct { Data string `yaml:"data"` Timestamp int64 `yaml:"timestamp"` } MessagingJob struct { Channel string `yaml:"channel"` Loop int ...
// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2021 Mark Kettenis <kettenis@openbsd.org> */ #define LOG_CATEGORY UCLASS_IOMMU #include <common.h> #include <dm.h> #include <iommu.h> #include <malloc.h> #include <phys2bus.h> #include <asm/io.h> #if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLA...
n,m = map(int,input().split()) x = [i for i in range(1,m+1)] p = m//2 s=[] if(m%2): if(m>1): s.append(x[p]) l=p-1 r=p+1 while(l>=0 and r<m): if(x[l]<x[r]): s.append(x[l]) s.append(x[r]) else: s.appe...
/** * Class to test the overhead of wrapping an object up. * @author Arend Rensink * @version $Revision: 5479 $ */ public class ObjectWrapSpeedTest { /** Constructs a version of the test. */ public ObjectWrapSpeedTest(String version, Action storeAction, Action getAction) { this.version = version; ...
/** * Creates a {@link Shape} representing a {@link Geometry}, * according to the specified PointTransformation * and PointShapeFactory (if relevant). * <p> * Note that Shapes do not * preserve information about which elements in heterogeneous collections * are 1D and which are 2D. * For example, a Geo...
While Jim Carrey was calling gun owners "motherf--kers," Jason Biggs spent Holy Week attacking the Pope. The Five's Greg Gutfeld took them both on Friday marvelously saying, "Our country is great because washed up comics have the right to suck" (video follows with transcript and commentary): GREG GUTFELD: So the Jim ...
<gh_stars>1-10 import * as RNFS from "react-native-fs"; import BaseContainer from "../../../lib/container/base/BaseContainer"; import * as MstContainers from "../../../model/impl/MstContainer"; import { MstItemContainer, MstSvtLimitContainer, MstSvtTreasureDeviceContainer, MstTreasureDeviceLvContainer }...
package de.dc.javafx.xcore.example.demo; import de.dc.javafx.xcore.example.BaseContactListView; import de.dc.javafx.xcore.example.model.Contact; import de.dc.javafx.xcore.example.tiles.ContactTileBar; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.Obser...
<reponame>G-MontaG/Paranoia<gh_stars>0 import moment = require("moment"); import {ipcMain, dialog} from "electron"; import {win} from "../../init"; import {FileSystemService} from "../file-system.service"; import {appConfigService} from "../app-config.service"; const pathModule = require('path'); const fs = require('fs...
/* * Create the transient table that will be filled with new___ data during * CLUSTER, ALTER TABLE, and similar operations. The transient table * duplicates the logical structure of the OldHeap, but is placed in * NewTableSpace which might be different from OldHeap's. Also, it's built * with the specified persis...
Update (March 25): Sony has confirmed that the version 2.5 PS4 firmware will be available for download tomorrow, March 26. In addition to the features discussed below, Sony announced the update will also bring the ability to back up the PS4's internal hard drive to an external USB disk, to find PS4 friends through a Fa...
Armada FC Public Relations | July 22, 2015 Less than a year into their first season at Community First Park at the Baseball Grounds of Jacksonville, the Jacksonville Armada FC have managed to create a unique atmosphere in Downtown Jacksonville. Whether it is the 30-feet-high kraken known as Squid Vicious lurking arou...
def remove_data(self, raise_error=False): path = Path(self.file_path) if path.exists(): if path.is_dir(): shutil.rmtree(path, ignore_errors=True) elif path.is_file(): path.unlink() _, bucket = _s3_bucket_instance(self.bucket) relati...
use std::fmt; pub use std::io::ErrorKind; #[derive(Clone, Debug)] pub struct StdinError { pub kind: ErrorKind, } impl StdinError { pub fn new(kind: ErrorKind) -> StdinError { StdinError { kind } } } pub fn to_err(e: StdinError) -> super::Error { use super::{Error, ErrorKind}; Error::new(E...
/** * A collection of helpful utility methods to read data from Kepler actors' * ports. */ public final class PortHelper { /** * Read string from port, throw {@link IllegalActionException} in case it * is empty. * * @param port Actor's port to read data from. * @return String value of a ...
<filename>net.violet.platform/src/main/java/net/violet/platform/util/concurrent/units/AbstractCrawlerProcessUnit.java package net.violet.platform.util.concurrent.units; import net.violet.common.utils.concurrent.ThreadWatcher; import net.violet.common.utils.concurrent.units.AbstractProcessUnit; import net.violet.platfo...
/// Extend a node span to cover its attributes. (By default, item spans cover only the item body, /// not the preceding attrs.) pub fn extended_span(mut s: Span, attrs: &[Attribute]) -> Span { // Extend `s` backward to cover all the attrs for attr in attrs { // Not sure these checks are exactly right, ...
<filename>py3cw/test_request.py import pytest from .request import Py3CW def test_error_missing_key(): with pytest.raises(ValueError) as excinfo: assert Py3CW( key='', secret='secret' ) excinfo.match(r'Missing key') def test_error_missing_secret(): with pytest.rai...
/** Create an association between source and target types */ public static Association createAssociation (Classifier source, Classifier target, RefOntoUML.Package container) { Association assoc = factory.createAssociation(); createAssociationEnds(assoc, source, target); if(container!=null)container.getPackagedEl...
/** * Mark index we're sending out this round as sent + update metadata as necessary. * * @param graph Local graph to operate on * @param roundNumber current round number * @param dga Distributed accumulator for determining if work was done in * an iteration across all hosts */ inline void ConfirmMessageToSendOp...
On or about February 24, 1848, a twenty-three-page pamphlet was published in London. Modern industry, it proclaimed, had revolutionized the world. It surpassed, in its accomplishments, all the great civilizations of the past—the Egyptian pyramids, the Roman aqueducts, the Gothic cathedrals. Its innovations—the railroad...
/** * Converts Ozone delegation token to @{@link TokenProto}. * @return tokenProto */ public static TokenProto convertToTokenProto(Token<?> tok) { if(tok == null){ throw new IllegalArgumentException("Invalid argument: token is null"); } return TokenProto.newBuilder(). setIdentifier(ge...
/* approach : --> as we are given the starting red color node(x), the only place to start coloring blue that ensures blue to win is to color any adjacent node of x to blue. --> if we color left child of x to blue then we can stop the red color player to color any node of subtree starting from the left ...
SACRAMENTO, California (Reuters) - Pellet guns and other toy weaponry should not be allowed to look like the real thing, a California lawmaker said Friday, vowing to introduce a bill to ban such replicas following the accidental killing of a 13-year-old boy by sheriff’s deputies. The proposal by State Senator Kevin de...
package org.redquark.ramanujan.mustdos; import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.redquark.ramanujan.mustdos._020InsertANodeAtMiddle.Node; /** * @author <NAME> * */ cla...
// parsePage parses a file from src and returns a page. func (s *Site) parsePage(src string) (*Page, error) { b, err := os.ReadFile(src) if err != nil { return nil, err } p := &Page{MetaTags: make(map[string]string), s: s} c, err := frontmatter.Parse(string(b), p) if err != nil { return nil, fmt.Errorf("%s: f...
3D modelling of coupled electromagnetic-mechanical responses in REBCO coils involving tape inhomogeneity Electromagnetic and mechanical properties are crucial components of high-temperature superconducting magnet in high-field applications. In this research, in order to predict the multi-field behaviors of REBCO coils...
/** * Create a new buffered image with the same characteristics (color model, * raster type, properties...) than the specified one. * * @param width the width * @param height the height * @param image an image with the same characteristics than the one which * will be created. * ...
def select_starting_destinations(self, game, destinations): self.info = game.get_player_info(self) self.edge_claims = game.get_edge_claims() combinations = [[0, 1], [1, 2], [0, 2], [0, 1, 2]] possible_destination_comb = [] costs = [] for combination in combinations: ...
// Events streams QEMU QMP Events. // If a problem is encountered setting up the event monitor connection // an error will be returned. Errors encountered during streaming will // cause the returned event channel to be closed. func (rpc *LibvirtRPCMonitor) Events() (<-chan Event, error) { events, err := rpc.l.Events(r...
import { DeploySlashCommand } from "./deployslash"; import { EndGameCommand } from "./endgame"; import { GlobalBlacklistCommand } from "./gblacklist"; import { KillCommand } from "./kill"; import { RandomCaseCommand } from "./randomcase"; import { StartGameCommand } from "./startgame"; import { StartPerpetualGameComman...
<reponame>KatPfeifer/LimitingReagentSim import analysisButton from "../objects/analysisButton"; import button from "../objects/button"; import buttonOutline from "../objects/buttonOutline"; export default class ef extends Phaser.Scene{ private background: Phaser.GameObjects.Image; private background2: Phaser.G...
#include "DM_Particle.hpp" #include <iostream> #include <cmath> #include <functional> #include "Numerics_Functions.hpp" #include "Physics_Functions.hpp" //6. DM-nucleus scattering cross sections: //Nuclear Helm form factor double FormFactor_N(double q,double A,bool ldm) { if(ldm || q==0.0) return 1.0; els...
<filename>crates/eldiro-cli/src/main.rs use rustyline::Editor; fn main() { let mut rl = Editor::<()>::new(); let history_file = ".eldiro_history"; if rl.load_history(history_file).is_err() { println!("No previous history."); } let mut env = eldiro::Env::default(); loop { let r...
<reponame>t-yanaka/zabbix-report # coding: utf-8 from rest_framework import serializers from .models import User, Entry class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('name', 'mail') class EntrySerializer(serializers.ModelSerializer): class Meta: ...
<filename>src/presentation/protocols/http-request.ts export interface HttpRequest<B = any, P = any> { body?: B headers?: any params?: P query?: any }
<reponame>pipauwel/IFCtoLBD<filename>src/main/java/nl/tue/isbe/BOT/Interface.java package nl.tue.isbe.BOT; /* * * Copyright 2019 <NAME>, Eindhoven University of Technology * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You ...
The night started off as brisk and swift as a hunch perforation for the events to come. Nothing troublesome, except as sense of urgency in the way. I have been reading books all day long, taking time to immense myself in the ageless wonders some of the stories have produce all the while moving into a more converse spot...
Contact dermatitis caused by urethane acrylates in a hearing aid Several articles have appeared in the medical literature presenting the arithemetic mean as a summary index for the evaluation of ordinal data such as patch test responses. The use of the mean in such situations is inappropriate. Consider a hypothetical ...
from __future__ import annotations import tempfile import os import json import logging from typing import Optional from transformers import Wav2Vec2Processor, AutoConfig, AutoTokenizer, AutoFeatureExtractor class TokenSet(): """ TokenSet Parameters ---------- tokens : list[str] List of to...
// end anon namespace class vtkTextPropertyLookup : public std::map<unsigned long, vtkSmartPointer<vtkTextProperty> > { public: bool contains(const unsigned long id) {return this->find(id) != this->end();} }
class TokenEmbeddingPooling: """Method for pooling a sequence of token representation to a single representation.""" def __init__( self, reduction: Callable[[torch.FloatTensor, int], torch.FloatTensor], ): """ Initialize the module. :param reduction: The...
#import <UIKit/UIKit.h> @class TGCircularProgressView; @interface TGSecretPeerMediaTimerView : UIView @property (nonatomic, strong, readonly) UIImageView *infoBackgroundView; @property (nonatomic, strong, readonly) UIImageView *timerFrameView; @property (nonatomic, strong, readonly) TGCircularProgressView *progressV...
Automatic parallelization of simulink applications The parallelization of Simulink applications is currently a responsibility of the system designer and the superscalar execution of the processors. State-of-the-art Simulink compilers excel at producing reliable and production-quality embedded code, but fail to exploit...
import time import logging LOGGER = logging.getLogger() def driveIter(root, drive, mimeType): params = { "pageToken": None, "supportsAllDrives": True, "includeItemsFromAllDrives": True, "fields": "files(id,name,mimeType,parents,shortcutDetails), incompleteSearch, nextPageToken", ...
Believe it or not, LaMarcus Aldridge is settled in San Antonio. (Eric Gay/Associated Press) Since LaMarcus Aldridge and the San Antonio Spurs agreed to join their houses in the summer of 2015, the marriage has been on the rocks. Rumblings persisted for over a year that neither side was thrilled with the arrangement, ...
/** * @author Ivan Khalopik * @since 1.0 */ public class TestCollectionUtils extends Assert { @DataProvider public Object[][] isEmptyData() { return new Object[][]{ {null, true}, {new ArrayList(), true}, {CollectionUtils.newConcurrentList(), true}, {CollectionUtils.newConcurrentSet(), true}, ...
import { QueryInput } from 'types'; export const buildQueryVariables = (queryInput: QueryInput) => ({ countryInput: queryInput });
An Emirates Airbus A380 lands on the runway at Manchester Airport at Manchester Airport, northern England June 25, 2013. REUTERS/Phil Noble By Cyril Altmeyer and Tim Hepher TOULOUSE (Reuters) - Airbus lost a major order on Wednesday when Dubai's Emirates airline cancelled its entire requirement for 70 A350 jets, deal...
// ToStringPtr converts an optional string in protobuf to a string pointer. func ToStringPtr(pbString servicepb.OptionalString) *string { if pbString.GetNoValue() { return nil } v := pbString.GetData() return &v }
<filename>src/debug/di/rsmain.cpp // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. //***************************************************************************** // ...
def _remove_all_networks(hil_client, node): node_info = show_node(hil_client, node) for nic in node_info['nics']: port = nic['port'] switch = nic['switch'] if port and switch: try: hil_client.port.port_revert(switch, port) log_info('Removed all...
#include<stdio.h> int main(){ long long a,b,c,d,a1,b1,c1; scanf("%lld%lld%lld%lld",&a,&b,&c,&d); if(d>=a && d>=b && d>=c ) { a=a; b=b; c=c; } if(b>=a && b>=d && b>=c ) { a=a; b=d; c=c; } if(c>=a && c>=b && c>=d ) { a...
English Language and Literature Students’ Perceptions of Critical Thinking The fundamental purpose of the function of thinking is to attribute meaning to events in our lives, classify these events into categories and identify them subjectively. As an important dimension of education on thinking, the teaching of critic...
start=[] for i in range(8): start.append(input()) a=[start] #start=[".......A","........","........","........","........",".SSSSSSS","S.......","M......."] #a=[start] for i in range(10): tmp=a[-1] tmp=[".......A"]+tmp tmp[1]=tmp[1][:-1]+"." a.append(tmp[:-1]) dx=[-1,1,0,0,0,1,1,-1,-1] ...
<reponame>scjalliance/drivestream package main import ( "context" "fmt" "github.com/scjalliance/drivestream/driveapicollector" "github.com/scjalliance/drivestream/resource" drive "google.golang.org/api/drive/v3" ) func listPermissions(ctx context.Context, s *drive.Service, id string) (perms []resource.Permissio...
Tens of thousands of Taiwanese protesters have taken to the streets in Taipei in a bid to pressure President Ma Ying-jeou to retract a controversial trade pact with China. The protesters, many wearing black shirts and headbands reading "defend democracy, retract service trade pact," crowded the streets leading to the ...
Small-Field Approach Holds Promise for Operators in Southeast Asia This article, written by Special Publications Editor Adam Wilson, contains highlights of paper SPE 186434, “Small Is Beautiful: Why Small Fields Are the Next Big Thing in Southeast Asia and How to Capitalize on Them,” by Arnold Volkenborn, Andrew Lea-C...
/* Communities structs have `->str` which is used * for vty outputs and extended BGP community lists * with regexp. * This is a helper to convert already aliased version * of communities into numerical-only format. */ char *bgp_alias2community_str(const char *str) { char **aliases; char *comstr; int num, i; fr...
/* eslint-disable @typescript-eslint/no-unused-vars */ /* * Copyright (c) 2018 THL A29 Limited, a Tencent company. 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 *...