content
stringlengths
10
4.9M
// If the ROS node is closed through SIGINT (ctrl-c) then this function will catch the interrupt // and call the RecordPeopleToFile function before closing the node void SIGINT_Handler(int s){ RecordPeopleToFile(); ros::shutdown(); }
<gh_stars>0 // https://leetcode.com/problems/binary-tree-maximum-path-sum/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nul...
<reponame>proximax-storage/xpx-java-sdk /* * Copyright 2018 ProximaX Limited * * 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 * * Un...
<filename>pkg/hacontroller/controller_test.go<gh_stars>1-10 package hacontroller_test import ( "context" "testing" "time" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s....
<filename>src/power_saver.h #ifndef power_saver_h #define power_saver_h #include <mono.h> namespace mono { /** * @brief Auto dim the display and sleep Mono after a given period of inactivity. * * This class will automatically dim the display and enter sleep mode, * after a period of user in...
// coerceSlice creates a new slice of the appropriate type for the target field // and coerces each of the query parameter values into the destination type. // Should any of the provided query parameters fail to be coerced, an error is // returned and the entire slice will not be applied func (d *decoder) coerceSlice(q...
<gh_stars>0 import { _City } from "./_City"; import { _Country } from "./_Country"; import { _GeoLocation } from "./_GeoLocation"; import { _Organization } from "./_Organization"; import { Structure as _Structure_ } from "@aws-sdk/types"; export const _RemoteIpDetails: _Structure_ = { type: "structure", required: ...
#include <bits/stdc++.h> #define REP(i,n) for (int i=0; i<(n); ++i) #define REPR(i,n,m) for (int i=(n); i>=(m); --i) using namespace std; using LL = long long; using LD = long double; using PLL = pair<long long, long long>; using PLD = pair<long double, long double>; using VLL = vector<long long>; using VLD = vector<lo...
/** * Lists the reports that are completed and is amendable. * * @return the list */ public List<Report> findCompletedAmendableReports(){ List<Report> completedReports = listReportsHavingStatus(ReportStatus.COMPLETED); List<Report> amendableReports = new ArrayList<Report>(); for(Repor...
A randomized, double-blind, controlled trial on non-opioid analgesics and opioid consumption for postoperative pain relief after laparoscopic cholecystectomy. BACKGROUND Following laparoscopic cholecystectomy, an effective post-operative pain control is necessary, at least during the first 24 hours. We present a rando...
""" Adobe Experience Manager (AEM) API Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API # noqa: E501 The version of the OpenAPI document: 3.5.0-pre.0 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 ...
package releases import ( "context" "io" "net/http" "net/http/httptest" "testing" "gotest.tools/v3/assert" "gotest.tools/v3/assert/cmp" ) func TestReleases_Version(t *testing.T) { ctx := context.Background() srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.UR...
// CreateCutOverReplicationJobRequest creates a request to invoke CutOverReplicationJob API func CreateCutOverReplicationJobRequest() (request *CutOverReplicationJobRequest) { request = &CutOverReplicationJobRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("smc", "2019-06-01", "CutOverReplica...
def createDialog(self, message="Default Message", title="Default Title", icon="question", buttons=["Install", "Cancel"], cancelButton="Cancel" ) -> str: return cmds.confirmDialog( title=title, message=message, icon=icon, button=buttons, cancelButton=cancelButton, dismissString=cancelButto...
/// Returns all relations referenced by this value. pub fn deps(&self) -> BTreeSet<String> { match self { Value::Aggregate(aggregate) => { let mut deps: BTreeSet<_> = aggregate .subquery .iter() .flat_map(|clause| clause.dep...
<filename>test/hand/clone.test.ts import { Hand, StringParser } from '../../src'; const hand = StringParser.parseHand('KJ965.Q7.96.9874'); describe('Testing Hand.clone', () => { it('Testing a cloned hand is equal to the original', () => { expect(Hand.clone(hand)).toStrictEqual(hand); }); it('Testing modifying a...
def _build_enums(self): for dt in self.enumtypes: entry = self.enumtypes[dt] print("building enum class for type "+dt) print("", file=self.prototypes) print("enum class "+str(dt)+" : "+str(entry["basetype"])+";", file=self.prototypes) print("", file=se...
/** * Selector which determines for which entities walks shall be generated. */ public class LightEntitySelector implements EntitySelector { /** * The entities for which walks will be generated. */ public HashSet<String> entitiesToProcess; /** * The file from which the entities will be re...
// // CQResponse.h // CQRequest // // Created by QingGe on 2017/12/7. // Copyright © 2017年 QingGe. All rights reserved. // #import <Foundation/Foundation.h> @interface CQResponse : NSObject - (instancetype)initWithURLResponse:(NSURLResponse *)URLResponse data:(NSData *)data; @prop...
/** * Represents a quarternion. * <p> * A quarternion is an extension of complex-numbers from a 2-dimensional (<em>a * + b<strong>i</strong></em>) to a 4-dimensional (<em>a + b<strong>i</strong> + * c<strong>j</strong> + d<strong>k</strong></em>) field. They have many * applications, including (for us) the ...
import { CompanyProfile } from '../data'; const toretskvug: CompanyProfile = { id: 'toretskvug', name: '', shortName: 'Торецьквугілля', usreou: '33839013', location: '', industry: '', statements: { '2016': { assets: { current: { quarters: [95814, 123339, false], year...
import { constants } from '~common/barrels/constants'; export function getTimezones() { let timezones: { value: string; label: string }[] = [ { value: constants.USE_PROJECT_TIMEZONE_VALUE, label: constants.USE_PROJECT_TIMEZONE_LABEL }, { value: 'UTC', label: 'UTC' } ]; co...
// SetErrMsgPrinter overrides the default error message printer used to display DDlog error // messages. An errMsgPrinter set to nil be cause all error messages to be dropped. Concurrent calls // to the provided errMsgPrinter will be sequential. func SetErrMsgPrinter(errMsgPrinter ErrMsgPrinter) { _errMsgMutex.Lock() ...
M13 bacteriophage DNA inhibits duck hepatitis B virus during acute infection We investigated effects of various DNAs on duck hepatitis B virus replication in vivo. One‐day‐old ducks were infected intravenously with DHBV. Various DNAs were then injected intravenously, and duck hepatitis B virus levels were followed for...
Advertisement Female former boxer helps chase down burglars Homeowner fired gun into ground Share Shares Copy Link Copy An Oak Hill couple has quite a story to tell after chasing down several young people accused of burglarizing their home.On Tuesday afternoon, the couple noticed several people walking on their proper...
Mouse gestures Double-click event None Dismiss story Save story Open story Open in new tab Pocket Pushbullet Copy to clipboard Single-click event None Dismiss story Save story Open story Open in new tab Pocket Pushbullet Copy to clipboard Click-and-hold event None Dismiss story Save story Open story Open in new tab ...
Epidermal effects of tretinoin and isotretinoin: influence of isomerism. The efficacy of tretinoin is well established in the treatment of acne and photoaged skin, however as a typical side effect of tretinoin treatment most patients develop a low-grade irritant dermatitis. Since isotretinoin topical treatment usually...
// test1.cpp - Test Inline Operators #pragma warning (disable:4101) // disable warning about unreferenced local variables #include <iostream> int main() { std::cout << "(this program generates no output)\n\n"; struct Package { long originZip; // 4 long destinationZip; // 4 float shippi...
#include "Scanner.hpp" #include <fstream> #include <cwctype> #include "../Utils/Utils.hpp" #if defined( _WIN32 ) #include <Windows.h> #else #include <cstdlib> #include <clocale> #endif #define isHexNumber(c) ( ( c >= L'A' && c <= L'F' ) || ( c >= L'a' && c <= L'f' ) || ( c >= L'0' && c <= L'9' )) #define isOctalNumbe...
/* * Copyright 2012-2023 the original author or 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
//------------------------------------------------------------------------ // Compiler::optUnmarkCSE // // Arguments: // tree - A sub tree that originally was part of a CSE use // that we are currently in the process of removing. // // Return Value: // Returns true if we can safely remove the 'tree' n...
/** * A composite unary predicate yielding true when every predicate match (no * further predicate is evaluated beyond the first returning false) * * @param <E> the element Type * @author rferranti */ public class AllMatchingPredicate<E> implements Predicate<E> { private final Iterable<Predicate<E>> predicat...
/** * * @return "Select Astrobee" followed by names of bees (no smartdock) */ protected String[] makeListOfAgentNames() { final List<Agent> agents = ActiveAgentSet.asList(); final List<String> agentStrings = new ArrayList<String>(); for(final Agent a : agents){ if(!a.equals(Agent.SmartDock)){ age...
/** * The helper class generates several random numbers * and put results to a file. The file name came as first * command line argument. */ public static class RandomRunner { private static final int COUNT = 10; public static void main(String[] args) { StringBuilder sb =...
N,x=map(int,input().split()) if x==1 or x==2*N-1: print("No") exit() print("Yes") if N==2: for i in range(1,4): print(i) exit() x-=1 A=[-1 for i in range(2*N-1)] B=[0 for i in range(2*N-1)] if x==1: A[N-2]=x+1 A[N-1]=x A[N]=x-1 A[N+1]=x+2 for i in range(4): B[x-1+i]=1...
<filename>projects/RTNetwork/Headers/TwitterAccount.h #pragma once #include "Texture.h" #include "Timer.h" class RTNetwork; class TwitterAccount { protected: friend class RTNetwork; class ThumbnailStruct { public: SP<Texture> mTexture = nullptr; std::string mURL = ""; }; class UserStruct { publi...
<filename>src/application/models/user/UserProfile.ts import User from '../../entities/User'; import { Gender } from '../common/Enum'; export default class UserProfile { firstName: string; lastName?: string; email: string; avatar?: string; gender?: Gender; birthday?: Date; phone?: ...
<reponame>DiscordGIR/Bloo import asyncio import re import discord from discord.ext import commands from utils.config import cfg from utils.mod.filter import find_triggered_filters from utils.config import cfg class TwitterFix(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.liste...
#ifndef _MATH_UTILS_H #define _MATH_UTILS_H #include <eigen3/Eigen/Eigen> #include <math.h> //#include <code_utils/eigen_utils.h> #include "../eigen_utils.h" #define DEG2RAD ( M_PI / 180.0 ) #define RAD2DEG ( 180.0 / M_PI ) #define DEG2RADF ( float )( M_PI / 180.0 ) #define RAD2DEGF ( float )( 180.0 / M_PI ) namesp...
An old cardist once said, “think inside the box, everyone else is too busy trying to think outside of it.” At first read, this may seem like an attempt to stifle creativity since “out of the box” thinking is equated with creativity and is encouraged. However, this doesn’t necessarily mean that “in the box” thinking can...
def saypager(n): def decorator(say): def f(self, msg, request=None, *args, **kwargs): for i in range(0, len(msg), n): say(self, msg=msg[i:i + n], request=request, *args, **kwargs) return f return decorator
def _to_image(self, metadata): fingerprint = metadata.get('fingerprint') aliases = metadata.get('aliases', []) if aliases: name = metadata.get('aliases')[0].get('name') else: name = metadata.get('properties', {}).get('description') \ or fingerprint...
/** * Visitor to fetch attribute values for CustomClassFromMap. */ private static class CustomMapDocumentVisitor implements DocumentVisitor<CustomClassFromMap> { @Override public CustomClassFromMap visitNull() { return null; } @Override public CustomClassFromMap visitBoolean(Bo...
// Request makes a (GET/POST/...) Requests to Beam REST API with JSON data. // All the other Beam REST Calls in this file use this function. func (s *Session) Request(method, urlStr string, data interface{}) (response []byte, err error) { if s.Debug { fmt.Println("API REQUEST PAYLOAD :: [" + fmt.Sprintf("%+v", data...
<reponame>mkevenaar/chocolatey-vscode<filename>src/ChocolateyCliManager.ts<gh_stars>10-100 import { window, QuickPickItem, workspace, Uri } from "vscode"; import { ChocolateyOperation } from "./ChocolateyOperation"; import * as path from "path"; import * as xml2js from "xml2js"; import * as fs from "fs"; import { ...
/** * Run detector and calculate the score whether micro stack pattern was followed. * @param deploymentModel Deployment model to run the detector on. * @return Return the computed score. */ @Override public OutputMicroStackDetector calculateScore(DeploymentModel deploymentModel) { Map<S...
/** * This is the initial processing of an event in the queue. * * @return - true if the event could be processed, false otherwise. * @throws IllegalArgumentException */ public boolean processEvent() throws IllegalArgumentException { boolean result = false; MsgEvent event = null; synchroni...
# Copyright 2015 <NAME> <<EMAIL>> # # This file is part of jvmlaunch. jvmlaunch is BSD-licensed software; # for copyright information see the LICENSE file. import os, logging from pesky.settings import ConfigureError class Target(object): """ """ def __init__(self, name): self.name = name ...
import * as assert from 'assert'; import { TestNode, TestList, ArrTestNode, initNewArrTestNode } from './fixture'; import { isMutating, changeComplete, isDataObject, Data } from '../../src'; describe('Lists', () => { const MP_META_DATA = "ΔMd", MP_SELF = "ΔΔSelf"; @Data class DataList { list: TestNod...
// Test reading a valid customized list of string object. @Test public void testGetObjectExceptionCustomized() throws IOException, ClassNotFoundException { UtilProperties.setPropertyValueInMemory("SafeObjectInputStream", "allowList", "java.util.Arrays.ArrayList,java.lang.String"); testGetObjectExcep...
import { Sequelize } from 'sequelize'; import { SubCategory } from '../types'; const Models = require('../models'); class Repositories { private defaultAttributes = [Sequelize.literal(`"SubCategories".*`)]; /** * Get all subcategories * @param {SubCategory} where * @param {Record<string, any>} attribute...
/* ========================================================================== */ /* === Include/Mongoose_IO.hpp ============================================== */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
/** * 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"); you may...
<reponame>sankhesh/VTK<gh_stars>0 #!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() import sys class TestClip(Testing.vtkTest): def testImage2DScalar(self): planes = ['XY', 'XZ', 'YZ'] expectedNCells = [38, 46, 42...
/** * Build PasswordRecoverDTO for notifying password recovery details successfully. * * @param notificationChannel Notified channel * @param confirmationCode Confirmation code for confirm recovery * @param resendCode Code to resend recovery confirmation code * @return Password...
A Brezis-Nirenberg result for non-local critical equations in low dimension The present paper is devoted to the study of the following non-local fractional equation involving critical nonlinearities \begin{eqnarray} (-\Delta)^s u-\lambda u=|u|^{2^*-2}u, in \Omega \\ u=0, in R^n\setminus \Omega, \end{eqnarray} w...
import pytest from recipes.tests.share import create_recipes from users.tests.share import create_user_api pytestmark = [pytest.mark.django_db] URL = '/api/users/subscriptions/' RESPONSE_KEYS = ( 'id', 'email', 'username', 'first_name', 'last_name', 'is_subscribed', 'recipes', 'recipe...
<gh_stars>1-10 /* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices */ @interface PLResourceDataStoreOptions : NSObject { bool _assumeNoExistingResources; bool _baseKeyOnExistingData; } @property (nonatomic) bool assumeNoExistingReso...
/** * Contains the set of parsed entities from the document. */ public static class EntitySet { private HashMap<String, Entity> entcache = new HashMap<String, Entity>(); void addEntity(final Entity ent) { entcache.put(ent.getId(), ent); } boolean containsEntity(f...
/* =========================================================================== Doom 3 GPL Source Code Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). Doom 3 Source Code is free software: you can redistribute it and/or modify...
Georgia Tech Accepted Students Raise the Bar Click image to enlarge Freshman Convocation is the official ceremony to welcome new students to Georgia Tech's community of learners—celebrating enthusiasm for learning and discovery in achieving the university's mission of teaching, research, and service. Download Image T...
/** * @author Javad Alimohammadi */ public class RedUtilsLockImpl implements RedUtilsLock { private static final Logger log = LoggerFactory.getLogger(RedUtilsLockImpl.class); private final ExecutorService operationExecutorService = Executors.newCachedThreadPool(); private final LockChannel lockChannel; ...
<reponame>enolive/exercism module Grains ( square , total ) where square :: Integer -> Maybe Integer square n | n `notElem` [1 .. 64] = Nothing | otherwise = Just $ 2 ^ (n - 1) total :: Integer total = geometricSum 2 64 where geometricSum q n = q ^ n - 1
Inhibition of the PI 3‐kinase pathway disrupts the unfolded protein response and reduces sensitivity to ER stress‐dependent apoptosis Class Ia phosphoinositide 3‐kinases (PI3K) are critical mediators of insulin and growth factor action. We have demonstrated that the p85α regulatory subunit of PI3K modulates the unfold...
<gh_stars>1-10 import * as dataTypes from '../dataTypes'; import { schema, t } from '../schema'; /** * The `<relation>` element * * Parent element: `<identification>` * * The `<relation>` element describes a related resource for the music that is encoded. This is similar to the [Dublin * Core relation element](h...
package sql import ( "context" "database/sql/driver" "io" "github.com/pkg/errors" ) // ResultSet is SQL resultSet struct type ResultSet struct { Last bool Data [][]driver.Value Index int } // Column is SQL column struct type Column struct { Name string ServerType string } // Rows is SQL rows struc...
async def readblock(self): sep = END_BLOCK + CARRIAGE_RETURN seplen = len(sep) try: block = await self.readuntil(sep) except LimitOverrunError as loe: if self._buffer.startswith(sep, loe.consumed): del self._buffer[: loe.consumed + seplen] ...
mod foo; mod bar; fn main() { // bar::hello(); println!("hello"); }
/** * Testing system exit * http://stackoverflow.com/questions/309396/java-how-to-test-methods-that-call-system-exit * * Created by Stan Reshetnyk on 17.09.16. */ public class GenesisLoadTest { @Test public void shouldLoadGenesis_whenShortWay() { loadGenesis(null, "frontier-test.json"); as...
// +build darwin // +build cgo package disk /* #cgo LDFLAGS: -framework CoreFoundation -framework IOKit #include <stdint.h> #include <CoreFoundation/CoreFoundation.h> #include "iostat_darwin.h" */ import "C" import ( "context" "github.com/shirou/gopsutil/internal/common" ) func IOCountersWithContext(ctx context....
import dgl import torch import torch.nn as nn import torch.nn.functional as F from dgllife.model.model_zoo import GCNPredictor class Predictor(nn.Module): def __init__(self, in_feats, hidden_feats=[32, 32], batchnorm=[True, True], dropout=[0, 0], predictor_hidden_feats=32, n_tasks=64): super(Predictor, s...
/** * Apache Kafka implementation of Log. * * @since 9.3 */ public class KafkaLogAppender<M extends Externalizable> implements CloseableLogAppender<M> { private static final Log log = LogFactory.getLog(KafkaLogAppender.class); protected final String topic; protected final Properties consumerProps; ...
/** * Constants used across the file sharer. */ public class Constants { public static final int BOOTSTRAP_SERVER_PORT = 55555; public static final int TASK_INTERVAL = 3000; public static final int THREAD_DISABLE_TIMEOUT = 1000; public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; ...
<filename>client/src/@bug-ui/Form/index.tsx export * from './Input'; export * from './StyledH3Input';
/* Return -1 if exception, FALSE if the property does not exist, TRUE if it exists. If TRUE is returned, the property descriptor 'desc' is filled present. */ int JS_GetOwnPropertyInternal(JSContext *ctx, JSPropertyDescriptor *desc, JSObject *p, JSAtom prop) { JSShapeProperty *prs...
// TestClient_ArchiveWorkspaceTemplate tests archiving a workspace template func TestClient_ArchiveWorkspaceTemplate(t *testing.T) { testClientArchiveWorkspaceTemplateSuccess(t) testClientArchiveWorkspaceTemplateNotFound(t) }
<reponame>picimako/gherkin-overview /* * Copyright 2021 <NAME> * * 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 ...
<reponame>congard/algine #ifndef ALGINE_BONEMATRICES_H #define ALGINE_BONEMATRICES_H #include <algine/std/animation/BoneMatrix.h> #include <vector> namespace algine { using BoneMatrices = std::vector<BoneMatrix>; } #endif //ALGINE_BONEMATRICES_H
/** * Asserts that {@link Assembly#isSuffixSymbolName(String)} returns the expected result for various inputs. */ @Test public void isSuffixSymbolName() { assertThat(Assembly.isSuffixSymbolName(""), is(false)); assertThat(Assembly.isSuffixSymbolName("A"), is(false)); assertThat(Ass...
/** * This class contains hooks used in the {@link net.minecraft.world.item.crafting.RecipeManager RecipeManager} bytecode. * * @author Jonathing * @see net.minecraft.world.item.crafting.RecipeManager#apply(Map, ResourceManager, ProfilerFiller) * RecipeManager.apply(Map, ResourceManager, ProfilerFiller) * @since ...
/** * Find the marker that has the 'LayoutFields.CUSTOM_INFO' name in a marker tree. * * @param marker the root marker of the tree, or subtree * @param visited a collection of already visited markers, used to avoid an infinite loop * @return the marker if found, otherwise `null` */ public ...
<reponame>topoi-lang/topoi {-# LANGUAGE OverloadedStrings #-} module Parse.Lexer where import Data.Char import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE import Data.Loc import Data.Maybe (fromMaybe) import Data.Text (Text) import qualified Data.Text as Text import Language.Lexer.App...
<filename>java/form/src/org/netbeans/modules/form/layoutsupport/LayoutSupportManager.java /* * 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 l...
<reponame>lack/kubernetes<filename>cmd/kube-controller-manager/app/certificates_test.go /* Copyright 2020 The Kubernetes 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.apac...
// tr translates string and replaces meta value placeholder with values // // This function is auto-generated. // func (p attachmentActionProps) tr(in string, err error) string { var ( pairs = []string{"{err}"} fns = func(ii ...interface{}) string { for _, i := range ii { if s := fmt.Sprintf("%v", i); len(s...
The primary purpose of this study was to investigate the effects of 8 weeks of a MIPS in resistance-trained individuals during a periodized resistance training program on skeletal muscle hypertrophy, lean body mass, and strength relative to a placebo matched control. The primary findings of this research were in congru...
NBC “Potato Chip” isn’t the kind of thing that’s going to run in a “best of” montage during, say, SNL’s 40th anniversary show. Have you ever heard how certain comedians are referred to as “a comedian’s comedian,” in that the material makes other comedians laugh? “Potato Chip” is a lot like that. It’s the definition of...
/* choose the suitable input current for charger */ static int hi6522_input_current_optimize(struct ico_input *input, struct ico_output *output) { struct hi6522_device_info *di = g_hi6522_dev; int bat_voltage = hisi_battery_voltage(); int bat_exist = is_hisi_battery_exist(); int bat_temp = hisi_battery_temper...
<reponame>mlrv/H-99 {- Construct a completely balanced binary tree. In a completely balanced binary tree, the following property holds for every node: The number of nodes in its left subtree and the number of nodes in its right subtree are almost equal, which means their difference is not greater than one. ...
class CustomLogger: """ This shims `logging.Logger` without using inheritance, since we want to leverage `logging.getLogger`. """ def __init__( self, log: logging.Logger, log_format: str = '%(message)s', ) -> None: # To prevent infinite recursion, we explicitly c...
Hey All,It seemed like an impossible task. To get more the two audio channels into and out from the Pi over the GPIO header. Lots of people wanted that functionality but no one could work out how to do it. I decided this product would have the potential to completely enable and transform other peoples projects. Not onl...
interface HttpRequestOptions { method?: string; url: string; referer?: string; resolveWithFullResponse?: boolean; form?: any; body?: any; } interface GraphQLRequestOptions { origin?: string; referer?: string; query: string; variables?: object; } interface Credit { session?: s...
<filename>tests/test_calculator2/main.cpp<gh_stars>0 #include <iostream> #include <functional> #include <cmath> #include "cpp-formula.h" using namespace std; using namespace fizvlad; int main() { string str = ""; Formula::Action a_brackets(1, R"RAW_LITERAL(\(([^\(\)]+)\))RAW_LITERAL"); Formula::Action ...
/* C function FCVBBDOPT to access optional outputs from CVBBD_Data */ void FCV_BBDOPT(long int *lenrwbbd, long int *leniwbbd, long int *ngebbd) { CVBBDPrecGetWorkSpace(CV_cvodemem, lenrwbbd, leniwbbd); CVBBDPrecGetNumGfnEvals(CV_cvodemem, ngebbd); }
#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <memory.h> #include <string.h> #include <search.h> #include <ctype.h> #include <netinet/in.h> #include <arpa/inet.h> #include "sendip_module.h" #include <errno.h> typedef struct _filearr...
#include <iostream> using namespace std; int n,i,k,m[3666777],j,x,z; string s; int main(){ cin>>n; for (i=0; i<n; i++){ cin>>k>>s; x=k-11; for (j=0; j<=x; j++){ if (s[j]=='8') { cout<<"YES\n"; z++; break; } } if (z==0) cout<<"NO\n"; z=0; } }
<gh_stars>1-10 /************************************************************************************ Copyright (C) 2021 by <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 restr...
def IsInvertedSolid(*args): return _BOPTools.BOPTools_AlgoTools_IsInvertedSolid(*args)
// eccAdd Gets two points on an elliptic curve mod p and returns their sum. // Assumes the points are given in affine form (x, y) and have different x coordinates. func eccAdd(point1 [2]*big.Int, point2 [2]*big.Int, p *big.Int) [2]*big.Int { d1 := big.NewInt(0).Sub(point1[1], point2[1]) d2 := big.NewInt(0).Sub(point1...
A gun show in Texas in 2016. Photo by Spencer Platt/Getty Images On Sunday, Americans were reminded that at nearly any time and in nearly any place, there is the possibility that a man—almost always a man—will shoot and kill you. Most mass shootings go relatively unremarked upon; what made Las Vegas so notable was the...