id stringlengths 1 3 | code_masked stringlengths 783 188k | target stringlengths 3 27 |
|---|---|---|
0 | #include "BiDirectionalRpc.hpp"
#include "TimeHandler.hpp"
namespace codefs {
BiDirectionalRpc::BiDirectionalRpc()
: onBarrier(0),
onId(0),
flaky(false),
timeOffsetController(1.0, 1000000, -1000000, 0.6, 1.2, 1.0) {}
BiDirectionalRpc::~BiDirectionalRpc() {}
void BiDirectionalRpc::shutdown() {}... | ping |
1 | #ifndef CATCH_UP_ENGINE_SRC_INCLUDE_COMPONENT_BASE_H
#define CATCH_UP_ENGINE_SRC_INCLUDE_COMPONENT_BASE_H
#include <entt\entt.hpp>
#include <string>
#include "uuid.h"
#include "component.h"
namespace Engine
{
class CollisionListener;
class Timestep;
class GameObject;
class Scene
{
public:
... | instance |
2 |
#ifndef _PYODBCSQLWCHAR_H
#define _PYODBCSQLWCHAR_H
typedef unsigned short ODBCCHAR;
// I'm not sure why, but unixODBC seems to define SQLWCHAR as wchar_t even with
// the size is incorrect. So we might get 4-byte SQLWCHAR on 64-bit Linux even
// though it requires 2-byte characters. We have to define our own type ... | _ctype |
3 | /**
* This Sketch reads a Resistor Ladder to determine a pitch to send
* to the Piezo unit. It's designed to be used like an Electronic
* Keyboard =)
*
*/
const int NOTES[] = { 262, 294, 330, 349 };
void setup()
{
Serial.begin(9600);
}
void loop()
{
int keyValue = analogRead(A0);
makeSoundForKey(key... | amount |
4 | //*****************************************************************************
// Copyright 2020-2022 Intel Corporation
//
// 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://w... | rets |
5 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
// freopen(".in", "r", stdin);
// freopen(".out", "w", stdout);
int [MASK] ;
ll numDays;
cin >> [MASK] >> numDays;
vector<pair<ll, int>> deliveries;
... | numDeliveries |
6 | #include "rclcpp/rclcpp.hpp"
#include "sensor_msgs/msg/laser_scan.hpp"
class LidarFilterNode : public rclcpp::Node
{
public:
LidarFilterNode() : Node("lidar_filter_node")
{
subscription_ = this->create_subscription<sensor_msgs::msg::LaserScan>(
"/scan", 10, std::bind(&LidarFilterNode::liste... | argc |
7 | // Copyright (c) 2025 <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 by applicable law or agreed to in w... | argc |
8 | #include<iostream>
using namespace std;
struct Patient{
int patientID, hieght, wieght, visionNo;
string testStatus;
Patient* next;
int data;
Patient(int p, int h, int w, int v, string t, Patient* n, int d){
patientID = p;
hieght = h;
wieght = w;
visionNo = v;
testStatus = t;
next = n;
data = d;
}
... | patient1 |
9 | #ifndef _BTREE_H_
#define _BTREE_H_
#include <string>
#include <utility>
#include <cstring>
#include <iostream>
#include <algorithm>
#include "algo/ParamTrait.h"
namespace snippet {
namespace algo {
namespace detail {
template<typename KType, typename VType, unsigned int NodeSize = 512>
class BTreeNode
{
public:
... | cur_key |
10 | #pragma once
#include <stdint.h>
#include <cmath>
#include <numbers>
#include <Geode/Geode.hpp>
namespace allium {
class DrawNodeExtension;
struct Point {
double x = 0.0;
double y = 0.0;
Point() = default;
Point(double x, double y)
: x(x), y(y)
{};
... | a21 |
11 | /*
* FontTextureManagerAndroid.cpp
* WhirlyGlobeLib
*
* Created by <NAME> on 6/2/14.
* Copyright 2011-2016 mousebird consulting
*
* 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... | charRenderClass |
12 | #include "cardashboard.h"
#include <QPainter>
#include <QPainterPath>
#include <QRadialGradient>
#include <QtMath>
#include <QTimer>
CarDashBoard::CarDashBoard(QWidget *parent)
: QWidget{parent}
{
margin = 5;
spanAngle = 240;//仪表盘占用角度
startAngle = (180-spanAngle)/2.0 ;//仪表盘开始角度
animation = false;
... | radiusIn |
13 | /*
File: laponia_battle.cpp
Last changed: 14/06/2023 14:00
Purpose: Console-based matrix war game
Authors: <NAME>
<NAME>
<NAME>
<NAME>
Usage:
HowToCompile: gcc laponia_battle.cpp -o laponia_battle
HowToExecute: ./laponia_batt... | peca |
14 | #include <iostream>
#include <fstream>
#include <string>
using namespace std;
// Structure to hold student information
struct Student {
string name;
int rollNumber;
string address;
string phoneNumber;
};
// Function to display menu options
void displayMenu() {
cout << "========= S... | inputFile |
15 | #include "../../Algorithm.hpp"
int main()
{
std::vector<int> arr;
for (int i = 0; i < 10000; ++i)
arr.push_back(i);
std::default_random_engine g(time(0));
auto [MASK] = std::chrono::system_clock::now();
auto end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds... | start |
16 | #ifndef IPC_SOCKET_CONNECTION_HPP
#define IPC_SOCKET_CONNECTION_HPP
#include "../FileDescriptor.hpp"
#include "../Utils.hpp"
#include "Address.hpp"
#include "Type.hpp"
namespace ipc {
namespace socket {
class Connection {
public:
explicit Connection(FileDescriptor fd) : fd_(std::move(fd)) {}
ssize_t Recv(... | sock_type |
17 | #include <iostream>
#include "movies.hh"
#include "utilities.hh"
//#define DEBUG
#ifdef DEBUG
#define dout std::cout
#else
#define dout 0 && std::cout
#endif
int main()
{
std::cout << "Welcome to the movies!" << std::endl;
std::cout << "----------------------" << std::endl;
std::cout << "---------------... | stored_filename |
18 | // File: bc7enc.c - <NAME>, Jr. 3/31/2020 - MIT license or public domain (see end of file)
// Currently supports modes 1, 6 for RGB blocks, and modes 5, 6, 7 for RGBA blocks.
#include "bc7enc.h"
#include <math.h>
#include <memory.h>
#include <assert.h>
#include <limits.h>
#include <algorithm>
// Helpers
static inline... | best_hi_p |
19 | // Copyright <NAME> 2021.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
export module tm.ability_blocks_move;
import tm.move.category;
import tm.move.known_move;
import tm.move.move_name;
import tm.move.targe... | target_status |
20 | //
// Created by csq on 2017/12/26.
//
#include "Sort.h"
void CSort::sort(int *a, int n, ESortType [MASK] ) {
switch ( [MASK] ) {
case ekSortType_Bubble:
sortBubble(a, n);
break;
case ekSortType_Bubble_BiDirect:
sortBubbleBiDirect(a, n);
break;
... | type |
21 | #include<iostream>
#include<list>
#include<stdlib.h>
using namespace std;
class Student {
private:
int nr_matricol;
string nume;
public:
Student(const int nr_matricol, const string nume):
nr_matricol(nr_matricol), nume(nume){};
Student(const Student& s) {
nr_matricol = s.nr_matric... | res |
22 | /*
* CompoundSolver.cpp
*
* Copyright 2023 <NAME> and Contributors
*
* 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 r... | solvesets |
23 | /*
* Copyright (c) 2024, wareya
* SPDX-License-Identifier: Apache-2.0
*
* 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 r... | next_buttons |
24 | #include "Application.h"
#include "Config.h"
Application::Application()
: m_Window(Window::Get()), m_FrameRate(0.0), m_AverageFrameTime(0.0), m_FrameCount(0), m_LastUpdate(0.0)
{
m_Window.Init(1366, 768, "glBlocks");
m_Camera = Camera({0.0f, 0.0f, 2.0f});
m_Camera.OnResize(1366, 768);
m_Renderer = new Renderer... | resizeCallback |
25 | #include<iostream>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<string.h>
#include <windows.h>
#include <time.h>
using namespace std;
char l[] = "บบบบบ";
int i;
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
COORD CursorPosition;
void gotoxy(int x, int y) {
CursorPosition.X = ... | rld |
26 | // Copyright 2023 Ar-Ray-code.
//
// 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 in... | data_h |
27 | #include "stdafx.h"
#include <iostream>
#include "Game.h"
#include "../glew-2.1.0/include/GL/glew.h"
#include <GLFW/glfw3.h>
bool Game::leftPressed;
bool Game::upPressed;
bool Game::rightPressed;
bool Game::downPressed;
bool Game::spacePressed;
float Game::xDelta;
float Game::yDelta;
void OnKeyboard(GLFWwindow* windo... | posY |
28 | #include <bits/stdc++.h>
int main() {
int H, W, K;
std::cin >> H >> W >> K;
std::vector<std::vector<char>> c(H, std::vector<char>(W));
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
std::cin >> c[i][j];
auto print = [&](auto const &v) {
for (int i = 0; i < H; i++) {
for (int j = ... | ans |
29 | // client.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
#include <cpprest/http_client.h>
#include <cpprest/json.h>
//#pragma comment(lib, "cpprest_2_10")
using namespace web;
using namespace web::http;
using namespace web::http::client;... | putvalue |
30 | #include <WiFi.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
#include "time.h"
const char* ssid = "";
const char* wifi_password = "";
const char* mqtt_server = "";
const char* mqtt_pwd = "";
const char* mqtt_usr = "";
const char* mqtt_topic = "";
const char* mqtt_control_topic = "";
// NTP Servers:
const ... | message |
31 |
#include <Adafruit_NeoPixel.h>
#define PIN 6 // output to Neopixel
#define NUM_LEDS 230 // 60 leds Per meter, so 60*4 Leds
/* Chase1 Relative Setting */
#define CHASE1COLOR 0x0000FF // R,G,B
#define CHASE1BRIGHTNESS 128 // Brightness(255:MAX, 0:MIN)
#define CHASE1START 0 // the total length from the start point t... | Chase1Rem |
32 | #include "operators/G2BMM.h"
namespace infini {
G2BMMObj::G2BMMObj(GraphObj *graph, Tensor A, Tensor B, Tensor C, int width,
int dilation, [[maybe_unused]] Tensor bias, ActType act)
: OperatorObj(OpType::G2BMM, {A, B}, {C}), width(width), dilation(dilation),
act(act), b(A->getDims()[0]), ... | costC |
33 | #include "CudaContext.h"
#include <stdexcept> //std::runtime_error
#include <array>
#include "Shin/Utilities/GraphicsUtility.h"
CudaContext::CudaContext() : m_context(nullptr) {
}
//---------------------------------------------------------------------------------------------------------------------
CudaContext::~Cu... | physicalDevice |
34 | #include "ActionToolTipComponent.h"
#include "PositionYTween.h"
#include "ResourceContainer.h"
#include "SpriteAlphaTween.h"
#include "SpriteComponent.h"
#include "StageConstitution.h"
using RC = ResourceContainer;
using namespace base_engine;
std::weak_ptr<ActionToolTipComponent> ActionToolTipComponent::Create(
... | tooltip_component |
35 | /*
Copyright 2015 Google LLC All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | shmid |
36 |
using namespace std;
using namespace cv;
using namespace TgBot;
namespace travisFilter {
enum paramNumbers { contrast = 0, brightness = 1, gamma = 2, yellow = 3, grain = 4 };
void correction(Mat &img, double alpha_, int beta_,
double [MASK] ) {
Mat res1;
img.convertTo(res1, -1, alpha_, beta_);
CV_Assert( [MA... | gamma_ |
37 | #include <cstdlib> // EXIT_SUCCESS
#include <csignal> // SIGINT, signal
#include <iostream> // cin, cout, endl
#include <string> // string
#include <fcntl.h> // O_WRONLY
#include <sys/mman.h> // mmap, shm_open, PROT_WRITE
#include <unistd.h> // ftruncate
// Name of shared memory object.
#define SHM_NA... | shared_memory |
38 | // Fill out your copyright notice in the Description page of Project Settings.
#include "Deadzone.h"
#include "Components/BoxComponent.h"
#include "GameFramework/PlayerController.h"
#include "GameFramework/ProjectileMovementComponent.h"
#include "GameFramework/Character.h"
// Sets default values
ADeadzone::A... | DeltaTime |
39 | /*
* Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" ... | metrics_topic_name |
40 | #include <Arduino.h>
#include <Wire.h>
#include <Arduino_LSM6DS3.h>
#include "mecanum.hpp"
#include "servo-wrapper.hpp"
// Motor pins
#define frontLeftMotorPin 5
#define backLeftMotorPin 6
#define backRightMotorPin 9
#define frontRightMotorPin 10
// Controller pins
#define rightStickHorizontalPin 2
#define rightStick... | stick |
41 |
#ifndef DLIB_SCAN_fHOG_UTILS_Hh_
#define DLIB_SCAN_fHOG_UTILS_Hh_
#include "../matrix.h"
//#include "../image_transforms.h"
#include "../array.h"
#include "../array2d.h"
//#include "object_detector.h"
#include <dlib/gui_widgets.h>
#include <dlib/image_io.h>
#include <iostream>
#define LOG_CALL_STACK() utils::call... | fileName |
42 | const int ROJO = 11;
const int AMBAR = 10;
const int VERDE = 9;
const int BLANCO = 6;
void setup()
{
pinMode(ROJO, OUTPUT); // pinMode es una función que define un pin como entrada o salida. Ponemos
pinMode(AMBAR, OUTPUT); // pinMode( [el pin sobre el... | Tiempo |
43 | #include"InfinityPCH.h"
#ifdef INFINITY_WINDOWS
#include"platform/windows/WindowsContext.h"
#include"platform/windows/WindowsWindow.h"
#include"Rasterizer.h"
constexpr const static D3D11_COMPARISON_FUNC COMPARISON_FUNCS[] =
{
D3D11_COMPARISON_LESS,
D3D11_COMPARISON_LESS_EQUAL,
D3D11_COMPARISON_GREATER,
D3D11_C... | def_settings |
44 | /*
* Copyright © 2021 <NAME>. All rights reserved.
* Contacts: <<EMAIL>>
* Licensed under the Apache License, Version 2.0
*/
template<typename T, typename V>
// V type already has the const specifier.
auto Config::apply(const Key t_key, V [MASK] , const bool t_save_file) -> bool {
using namespace std;
string... | t_val |
45 |
#include "RtAudio.h"
#include <iostream>
#include <cstdlib>
// Two-channel sawtooth wave generator.
int saw(void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *userData)
{
unsigned int i, j;
short *buffer = (short *)outputBuffer;
short *lastVal... | parameters |
46 | #include "CalibrationController.h"
void CalibrationController::init(float sampleRate) {
ParameterizedController::init(sampleRate);
interface.init();
interface.focusOutput();
init();
}
void CalibrationController::init() {
Serial.println("Calibration");
for(int i = 0; i < 8; i++) {
Hardw... | binaryValue |
47 | /*
*********************************
* Created 23 November 2013 *
* Copyright 2013, <NAME> *
* http://saikoled.com *
* Licensed under GPL3 *
*********************************
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Lice... | msgId |
48 | #include "util/get_config_path.hpp"
#include <toml++/toml.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <chrono>
#include <ctime>
#include <iostream>
#include <span>
auto does_file_exist(std::string const& filename) {
struct stat [MASK] ;
return (stat(filename.c_str(), & [MASK] ) == 0);
}
auto main(... | buffer |
49 | //
// Created by <NAME> on 14/06/2021.
//
#include "Hospital.hpp"
#include <string>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <list>
Hospital::Hospital() {
}
Pila *pila = new Pila();
list<string> ListaR;
list<string> ListaN;
list<string> ListaV;
list<stri... | horTrans |
50 | #include <iostream>
#include "Application.h"
//Include GLEW
#include <GL/glew.h>
//Include GLFW
#include <GLFW/glfw3.h>
//Include the standard C++ headers
#include <stdio.h>
#include <stdlib.h>
#include "StartMenuScene.h"
#include "OverworldScene.h"
#include "DistrictScene.h"
#include "MazeScene.h"
#include "MartSce... | offSet |
51 | #include "add.h"
#include "ui_add.h"
#include <QSqlQueryModel>
#include <QMessageBox>
Add::Add(QWidget *parent) :
QDialog(parent),
ui(new Ui::Add)
{
ui->setupUi(this);
}
Add::~Add()
{
delete ui;
}
QString Add::Sex()
{
if(ui->radioButton_man->isChecked())
{
ui->radioButton_man->setChec... | pwd |
52 | #include <cstdio>
#include <string>
#include <fstream>
#include <iostream>
#include <chrono>
#include <math.h>
#define itera 1000
using namespace std;
using namespace std::chrono;
int main(int argc, char* argv[]) {
int dimx, dimy, depth, size;
string [MASK] ;
if (argc < 3) {
cout << "Usage: " ... | line |
53 | #include "mudff_unpack.h"
void* Alloc(void *p, size_t size) { return malloc(size); }
void Free(void *p, void *address) { if (address) free(address); }
ISzAlloc alloc = { Alloc, Free };
muff_unpack::muff_unpack()
{
memset(arc_file,0,MAX_PATH);
}
muff_unpack::~muff_unpack()
{
memset(arc_file,0,MAX_PATH);
}
BYTE * m... | num_files |
54 | /* SPDX-License-Identifier: BSL-1.0 OR BSD-3-Clause */
#ifndef MPT_BASE_NUMERIC_HPP
#define MPT_BASE_NUMERIC_HPP
#include "mpt/base/detect_compiler.hpp"
#include "mpt/base/namespace.hpp"
#include "mpt/base/bit.hpp"
#include "mpt/base/saturate_cast.hpp"
#include <algorithm>
#include <limits>
#include <type_traits>... | value |
55 | #define FORCE_SENSOR_PIN A0 // the FSR and 10K pulldown are connected to A0
void setup() {
Serial.begin(9600);
Serial.println("CLEARDATA");
Serial.println("LABEL,Force Sensor Reading, Value, Type");
Serial.println("RESETTIMER");
}
void loop() {
int [MASK] = analogRead(FORCE_SENSOR_PIN);
S... | analogReading |
56 |
#include "CTBot.h"
CTBot myBot;
String ssid = "no internet"; // REPLACE mySSID WITH YOUR WIFI SSID
String pass = "<PASSWORD>"; // REPLACE myPassword YOUR WIFI PASSWORD, IF ANY
String token = "977896158:<KEY>"; // REPLACE myToken WITH YOUR TELEGRAM BOT TOKEN
uint8_t led = BUILTIN_LED; // the ... | msg |
57 | #include "AlignmentRule.h"
#include "../gameobjects/Boid.h"
Vector2 AlignmentRule::computeForce(const std::vector<Boid*>& neighborhood, Boid* boid) {
Vector2 [MASK] = Vector2::zero();
int total = 0;
// todo: add your code here to align each boid in a neighborhood
// hint: iterate over the neighborho... | averageVelocity |
58 | // NCurses 2D vector math
// (c) 2022 by <NAME>
#include <math.h>
#include "math2d.h"
static const int mat3_stack_max = 100;
static int mat3_stack_size = 0;
static Mat3 mat3_stack[mat3_stack_max];
// get current transformation
Mat3 top()
{
if (mat3_stack_size > 0)
return(mat3_stack[mat3_stack_size-1]);
... | aspect |
59 | #include <avr/sleep.h>
// PIN 9 (PIN_B1) <=> CN9 PIN 2
#define SET_DATA PORTB.OUTSET = PIN0_bm
#define CLR_DATA PORTB.OUTCLR = PIN0_bm
// PIN 8 (PIN_B0) <=> CN9 PIN 3
#define SET_SETUP PORTB.OUTSET = PIN1_bm
#define CLR_SETUP PORTB.OUTCLR = PIN1_bm
// PIN 6 (PIN_B3) <=> CN9 PIN 4
#define SET_RESET ... | game_num |
60 | // Fill out your copyright notice in the Description page of Project Settings.
//#include "SCharacter.h"
#include "../Public/SCharacter.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"
#include "GameFramework/PawnMovementComponent.h"
#include "../Public/SWeapon.h"
#include "Engine/E... | TargetFOV |
61 | #include <iostream>
#include <filesystem>
#include <fstream>
#include <vector>
using namespace std;
ifstream inputFileObj;
ofstream outputFileObj;
int main() {
namespace fs = std::filesystem;
double sum = 0;
double average = 0;
// long numberbuffer = 0;
std::string stringbuffer;
vector<long> values;
vector<std... | input_random_strings_path |
62 | #ifndef _RESOURCEPOOL_H
#define _RESOURCEPOOL_H
#include <map>
#include <list>
#include <set>
#include <vector>
#include <boost/thread.hpp>
#include <boost/foreach.hpp>
#include <boost/timer.hpp>
#include <boost/circular_buffer.hpp>
#include "ResourcePoolConfig.h"
namespace bt = boost::this_thread;
namespace bpt = ... | sum |
63 | #include <climits>
#include <cmath>
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::sqrt;
using std::vector;
bool is_prime(unsigned long int n) {
if (n < 2) {
return false;
}
// for (int i = 2; i < n; i++) {
// cout << "sqrt(" << n << "): " << sqrt(n) << endl;
for (uns... | primes |
64 | /*
* A library for controlling a Microchip RN2483 LoRa radio.
*
* @Author <NAME>
* @Date 18/12/2015
* @ModifiedBy hsilomedus
*
*/
#include "Arduino.h"
#include "rn2483.h"
extern "C" {
#include <string.h>
#include <stdlib.h>
}
//#define DEBUG_PROFILE 1
//#ifdef DEBUG_PROFILE
#define SH_DEBUG_PRINTLN(a) Seria... | send_success |
65 | //LED Lamp
//This is a simple Arduino program using existing
//libraries to run 6 LEDs to run up a small lamp.
//The CapSense, Median Filter and FastLED libraries
//were all chosen for their relative ease of use
//and availability within the Arduino IDE.
#include <CapacitiveSensor.h>
#include <MedianFilter.h>
#include... | ledMax |
66 | #include "RSA.hpp"
#include <iostream>
#include <stdio.h>
#include <vector>
NTL::ZZ inv_mod(NTL::ZZ n1, NTL::ZZ n2){
NTL::ZZ x1 = NTL::ZZ(0), x2 = NTL::ZZ(1), y1 = x1, y2 = x2;
NTL::ZZ q, x, y, z, [MASK] = NTL::ZZ(1), sav = n2;
if (n2 != 0) {
while (n2 > 0) {
q = n1 / n2;
x = n1; y =... | inverse |
67 | /*
Copyright 2019 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | result |
68 | #include <fingera_libc/base32.h>
#include <fingera_libc/hex.h>
#include <gtest/gtest.h>
#include <stdint.h>
#include <stdio.h>
#include <string>
#define EXPECT_ZERO(x) EXPECT_EQ((x), 0)
TEST(base32, custom) {
static const std::string vstrIn[] = {
"", "f", "fo", "foo", "foob", "fooba", "foobar", "abcdefghijkl... | out_size |
69 | // Author: <NAME> <<EMAIL>>
#ifndef tensor_msg_HPP
#define tensor_msg_HPP
#include <msgpack.hpp>
#include <vector>
#include <iostream>
/**
* @brief Represent a tiny class for serializing tensors
* @details each tensor consists of information about the type,
* the shape and the underlying tensor data
*/
... | elements |
70 | //
// rfnoc-hls-neuralnet: Vivado HLS code for neural-net building blocks
//
// Copyright (C) 2017 <NAME>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of... | loaded_weights |
71 | /*
* SPDX-License-Identifier: Apache-2.0
*/
#include <algorithm>
#include <cmath>
#include <numeric>
#include "onnx/defs/data_propagators.h"
#include "onnx/defs/tensor/utils.h"
namespace ONNX_NAMESPACE {
static const char* Cast_ver9_doc = R"DOC(
The operator casts the elements of a given input tensor to a data typ... | is_negative |
72 | #include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
#include <Ultrasonic.h>
#define LED D0 // Led in NodeMCU at pin GPIO16 (D0).
// Set these to run example.
#define FIREBASE_HOST "garagecardetector.firebaseio.com"
#define FIREBASE_AUTH "TuJmJEc1YJRAOtEEiS1qYxYE2KiqRDaWNkGxyLhm"//change with your Databa... | cnt |
73 |
#include <iostream>
#include "DecisionHelper.h"
int main() {
std::vector<std::string> criteria = {"coût", "temps", "bénéfice"};
std::vector<double> weights = {0.4, 0.3, 0.3};
DecisionHelper decisionHelper(criteria, weights);
std::vector<double> values(criteria.size());
std::cout << ... | threshold |
74 | /*
<NAME> 07/2023 PROJECT 1
SNHU CS
*/
#include <sstream>
#include "extra.h"
/*Establishes the clock variables which we will be interacting with to declare value and the make user inputted changes*/
Clock::Clock(int h, int m, int sec)
: h(h), m(m), sec(sec) {}
void Clock::minadd()
{
m++;
if (m >= 60) ... | number |
75 | #include "pch.hpp"
#include "plugins.hpp"
#include "utility/unused.hpp"
namespace CBSW::Unit {
class PluginChainFinal: public PluginNextHandler {
public:
PluginChainFinal(PluginFinal& final):
_final(final)
{}
int next(Arguments& arguments) noexcept {
unused(arg... | output |
76 | #include <vector>
#include <tuple>
#include <iostream>
#include <sstream>
#include <math.h>
#include <memory>
#include <numeric>
static std::string check_the_check();
static std::string check_the_check(std::string data);
static std::string check_the_check(std::vector<std::string> data);
enum class Color
{
Black,
W... | keep_finding |
77 | #include "../src/Common.h"
#include "../src/Context.h"
#include <iostream>
using std::vector;
using std::cout;
using std::endl;
int main(int argc, char *argv[], char *env[]) {
vector<Item> items{
Item{"E", ItemType::NoTerminal},
Item{"E_", ItemType::NoTerminal},
Item{"T", ItemT... | context |
78 | /***
* @Author: Heng
* @Date: 2022-10-27 03:51:31
* @LastEditTime: 2022-10-27 03:51:44
* @LastEditors: Heng
* @Description:
* @FilePath: /DataStructure/分治/最大连续子序列和.cpp
* @Heng
*/
#include <iostream>
using namespace std;
#include <climits>
#include <vector>
class Solution
{
public:
/***
* @description:... | mid_max |
79 | #include <cstring>
#include <ostream>
#include <variant>
#include <pl/numeric.hpp>
#include <pl/os.hpp>
#include <pl/overload.hpp>
#include <pl/string_view.hpp>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include "command_line_arguments.hpp"
namespace bfc {
namespace {
constexpr int maximumArgumentCount{2};
... | minimumArgumentCount |
80 | #include "server.h"
ServerNetwork::ServerNetwork(unsigned short port = 53000) : m_listenport(port) {
if (listener.listen(m_listenport) != sf::Socket::Done) {
log("Could not listen Try another port number: ");
}
}
void ServerNetwork::ConnectClients(std::vector<sf::TcpSocket*>* client_array) {... | iflag |
81 | #pragma once
#include <cstdint> // uint64_t
#include <memory> // unique_ptr
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
namespace cfp {
using ElementCountDict = std::unordered_map<std::string, uint64_t>;
/**
* @brief Abstract base for AST nodes.
*/
struct Node {
virtual... | next_mult |
82 | // Copyright (C) 2024 <NAME> <<EMAIL>>
//
// SPDX-License-Identifier: MIT
#include "hictkpy/cooler_file_writer.hpp"
#include <fmt/format.h>
#include <fmt/std.h>
#include <spdlog/spdlog.h>
#include <cassert>
#include <cstdint>
#include <filesystem>
#include <hictk/cooler/cooler.hpp>
#include <hictk/file.hpp>
#include... | count_type |
83 |
// Copyright <NAME> 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <QtGui/QApplication>
#include <QtGui/QDialog>
#include <QtGui/QVBoxLayout>
#include <coruja/object/object.hpp>
#include <coruja/objec... | layout |
84 | #include<iostream>
#include<string>
#include<stack>
using namespace std;
int main()
{
bool flag = false;
int col;
int rows = 2;
stack <char> st;
stack<int> [MASK] ;
int n1;
int n2;
string str;
string str1;
string postfix;
string postfix1;
char num1;
char num2;
char num3;
char num... | st1 |
85 | #include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <MySQL_Connection.h>
#include <MySQL_Cursor.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>
const int trigPin = 12; //D4
const int echoPin = 14; //D3
//define sound velocity in cm/uS
#define SOUND_VELOCITY 0.03... | teller |
86 | #include "pch.h"
#include "Logger.h"
Logger::Logger()
{
logFile = CreateFileA("log.txt", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (logFile == INVALID_HANDLE_VALUE)
{
printf("Create log file log.txt failed, last error: %d", GetLastError());
exit(0);
}
}
vo... | argptr |
87 | /*
* Copyright 2019 <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 by applicable law or agreed to in wr... | imageTopic |
88 | #include "sandbox_processor.h"
#include "sandbox_editor.h"
#include "../shared/gui/adjust_colour_panel.h"
#include "../shared/game/random_colors/random_colors_launcher.h"
#include "../shared/game/hex_rings/hex_rings_launcher.h"
#include "../shared/game/hexagon_automata/hexagon_automata_launcher.h"
#include "../share... | layoutString |
89 | /**
esp8266 firmware OTA
Purpose: Perform an OTA update from a bin located on a webserver (HTTP Only)
Setup:
Step 1 : Set your WiFi (ssid & password)
Step 2 : set EspFota()
Upload:
Step 1 : Menu > Sketch > Export Compiled Library. The bin file will be saved in the sketch folder (Menu > Sketch... | updatedNeeded |
90 | #include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <limits>
#include <numeric>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include "gdal.h"
#include "gdal_priv.h"
#include "ogrsf_frmts.h"
#include "cpl_error.h... | a_linear_index |
91 | /*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* 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 a... | code |
92 | /*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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 applica... | iCount |
93 | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_
#define LIGHTGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_
#include <LightGBM/metric.h>
#include <LightGBM/object... | worst_idx |
94 | #include "CineXDetailCustomization.h"
#include "PropertyEditing.h"
#include "Widgets/Input/SButton.h"
#include "Widgets/Text/STextBlock.h"
#include "Widgets/Input/SComboButton.h"
TSharedRef<IDetailCustomization> FCineXDetailCustomization::MakeInstance()
{
return MakeShareable(new FCineXDetailCustomization);
... | Classes |
95 | #include <math.h>
#include "Ball.h"
#include "Paddle.h"
const float defaultVVelocity = 0.002;
const float defaultHVelocity = 0.015;
const float defaultRadius = 0.05;
const float paddleAccelerationFactor = 0.3;
const float twoPi = 3.14159*2;
Ball::Ball(int triangleCount)
{
m_triangleCount = triangleCount;
re... | current_velocity |
96 | #ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
#include <iostream>
#include <limits>
#include <thread>
#include "config.hpp"
#include "Terrain.hpp"
#include "Drone.hpp"
#include "Menu.hpp"
#include "Scene.hpp"
bool DISPLAY = true;
enum Draw{
goToDraw
};
int main() {
{
bool fi... | tmp |
97 |
/*****************************************************************************
* Copyright [2017-2019] [MTSQuant]
*
* 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/lic... | map |
98 | // Copyright (c) 2022 Samsung Research America
//
// 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... | parameters |
99 | #include "image.h"
namespace {
constexpr int PERCENTS_MIN_LIGHTER = -99;
constexpr int PERCENTS_MIN = -100;
constexpr int PERCENTS_MAX = 100;
constexpr int PERCENTS_TO_LIGHTER_OFFSET = 100;
}
Image::Image() {}
void Image::load(const QString& filename) {
if (filename.isEmpty()) {
m_source = {};
... | percents |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.