id stringlengths 1 3 | code_masked stringlengths 783 188k | target stringlengths 3 27 |
|---|---|---|
200 | #include <random>
#include <optional>
#include "constants.h"
#include "application_ui.h"
#include "SDL2_gfxPrimitives.h"
#include "wall.h"
#include "ellipse.h"
std::random_device rd;
Ellipse getEllipseRGBA(std::optional<Ellipse_Coordinates> coordinates, std::optional<Ellipse_Color> color)
{
Ellipse ellipse;
// Déf... | shapeY1 |
201 | #pragma once
#include "Core.h"
namespace NV
{
// Event types
enum class EventType
{
None = 0,
WindowClose, WindowResize, WindowFocus, WindowLostFocus, WindowMoved,
AppTick, AppUpdate, AppRender,
KeyPressed, KeyReleased, KeyTyped,
MouseButtonPressed, MouseButtonR... | rhs |
202 | /*
* Copyright (c) 2022 <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/sys/cbprintf.h>
#include <Arduino.h>
#include <api/Print.h>
namespace arduino
{
namespace zephyr
{
int cbprintf_callback(int c, void *ctx)
{
return reinterpret_cast<arduino::Print *>(ctx)->write((unsigned char)... | bits |
203 | /*
* CSRMatrixIO.h
*
* Created on: 9 nov. 2015
* Author: guignont
*/
#ifndef SRC_MCGS_MATRIXVECTOR_IO_CSRMATRIXIO_H_
#define SRC_MCGS_MATRIXVECTOR_IO_CSRMATRIXIO_H_
namespace HartsSolver
{
template <typename ProfileType>
void exportProfile(Exporter &exporter,Exporter::FileNode base_node,const ProfileType ... | values_ordering_node |
204 | //
// Created by <NAME>
// <EMAIL>
//
#include "audioPlayer.h"
#include "logger.h"
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdbool.h>
#define LOG_TAG "[audioPlayer.c]"
#define SLASSERT(x) \
do { ... | format_pcm |
205 |
#define _CRT_SECURE_NO_WARNINGS
#include "DataBase.h"
#include "Student.h"
#include <fstream>
#include <iostream>
// uzupelnij !!!
using namespace std;
DataBase::DataBase(const char* file)
{
strcpy(dataFileName, file);
}
void DataBase::ListData(bool akt)
{
// uzupelnij !!!
ifstream wej("data.bin", io... | wyj |
206 | #include "WindowsWindow.h"
#include "Jogo/Log.h"
namespace Jogo
{
static bool s_GLFWInitialized = false;
Window* Window::Create(const WindowProps& props)
{
return new WindowsWindow(props);
}
WindowsWindow::WindowsWindow(const WindowProps& props)
{
Init(props);
}
WindowsWindow::~WindowsWindow()
{
Shu... | enabled |
207 | #include <gui/screen1_screen/Screen1View.hpp>
#include <texts/TextKeysAndLanguages.hpp>
#include <touchgfx/containers/SlideMenu.hpp>
#include <algorithm>
#include <global_val.h>
#include <mysignal.h>
#define SCREEN_HEIGHT 260
#define SCREEN_WIDTH 200
#define MAX_X_SCALE_INDEX 6
#define MAX_Y_SCALE_INDEX 12
#define MAX... | value |
208 | #include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <cvode/cvode.h> /* main integrator header file */
#include <cvode/cvode_dense.h> /* use CVDENSE linear solver */
#include <cvode/cvode_band.h> /* use CVBAND linear solver */
#include <cvode/cvode_diag.h> ... | nSteps |
209 | #include "messagedialog.h"
#include "ui_messagedialog.h"
#include <QDialog>
#include <QImage>
#include <QDebug>
MessageDialog::MessageDialog(QString title, QString message, DialogType [MASK] , QWidget *parent) :
QWidget(parent),
ui(new Ui::MessageDialog)
{
ui->setupUi(this);
switch( [MASK] )
{
... | type |
210 | /*Author: <NAME>
File : main.cpp
Desc : Entry point to answer data structs homework questions for current homework.
Date : 3/1/23
*/
#include "tree.cpp"
#include <chrono>
int main()
{
// timer for calcNumNodes execution time--setNumNodes is the actual method that calculates the number of nodes.
auto sta... | tempFullNodes |
211 | #pragma once
#include <rclcpp/rclcpp.hpp>
#include <geometry_msgs/msg/twist.hpp>
#include "tf2/LinearMath/Quaternion.h"
#include "tf2_ros/transform_broadcaster.h"
#include "tf2_ros/buffer.h"
#include "tf2_ros/transform_listener.h"
#include "ros2_aruco_interfaces/msg/aruco_markers.hpp"
#include "nav_msgs/msg/odometry.h... | subscription_odom |
212 | #pragma once
#include <vector>
#include <cstdint>
#include "myheader.hpp"
#include "mypointfield.hpp"
class MyPointCloud2
{
public:
MyHeader header;
uint32_t height;
uint32_t width;
std::vector<MyPointField> fields;
bool is_bigendian;
uint32_t point_step;
uint32_t row_step;
std::vector<uint8_t> ... | point_step_ |
213 | // SPDX-FileCopyrightText: 2006-2025 <NAME> & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 <NAME> & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
#include <seqan3/alphabet/nucleotide/dna4.hpp>
#include <seqan3/alphabet/nucleotide/dna5.hpp>
#include <seqan3/alphabet/quality/aliases.hpp... | view2 |
214 | #include <Servo.h>
// Digital pins.
#define PIN_IR_LEFT 4
#define PIN_IR_CENTER 5
#define PIN_IR_RIGHT 6
#define PIN_HALL_EFFECT_LEFT 7
#define PIN_HALL_EFFECT_RIGHT 8
#define PIN_LASER_POWER 10
#define PIN_MOTOR_LEFT 3
#define PIN_MOTOR_RIGHT 9
// Analog pins.
#define PIN_LASER_READER 0
// Configs.
#define ROTATION... | pin_servo |
215 | #include "TestUtils.h"
#include <string.h>
#include <fstream>
namespace pcpp_tests
{
int getFileLength(const char* filename)
{
std::ifstream infile(filename, std::ifstream::binary);
if (!infile)
return -1;
infile.seekg(0, infile.end);
int length = infile.tellg();
infile.close();
return length;
}
uint8_t* rea... | buffer2Len |
216 | #ifndef _STATE_MACHINE_HPP_
#define _STATE_MACHINE_HPP_
#include <memory>
#include <functional>
#include <thread>
#include <map>
#include <exception>
#include <sstream>
class Alphabet
{
public:
explicit Alphabet(int k, std::shared_ptr<void> v = nullptr)
: key(k), value(v)
{}
virtual ~Alphabet(... | process_thread |
217 | /*
* Copyright (c) 2014, <NAME>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS A... | title |
218 | #include "instructionSet.h"
//NOTE: to link program files each file can consist of a class, each class can be called by its various functions through object creation (when START message is fetched) each class is capable of sending messages into main loop through their own messaging procedures
//These messages can then... | mainLoop |
219 | #include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <ModbusMaster.h>
ModbusMaster node;
#define SLAVE_ID 2
#define VOLTAGE_ADDR 0x0000
#define VOLTAGE_LEN 2
#define CURRENT_ADDR 0x0E
#define CURRENT_LEN 2
#define POWER_ADDR 0x14
#define POWER_LEN 2
#define KILOWATTS_HOUR... | kilowatts_hour |
220 | #include "videoControls.h"
#include "vsliderwidget.h"
const char* Property_Rate = "RateValue";
VideoControls::VideoControls(QWidget *parent)
:QWidget(parent)
{
ui.setupUi(this);
setWindowFlags(Qt::FramelessWindowHint/* | Qt::Tool*/);
setAttribute(Qt::WA_TranslucentBackground);
initVolumeSlider();
... | duration |
221 | // main.cpp
// This is the main game builder file which reads in two hands from
// text files and plays the game
// <NAME> - 6872774
#include <iostream>
#include <fstream>
#include <string>
#include "cards.h"
#include "utility.h"
using namespace std;
void AliceTurn(PlayerHand& alice, PlayerHand& bob);
void BobTurn(... | delim |
222 | // Copyright (c) 2021 PaddlePaddle Authors. 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 requir... | score_ |
223 | #include <Wire.h>
#include <stdint.h>
#include <Smartcar.h>
Car car;
const int motorSpeed = 80; //80% of the max speed
const uint8_t distanceThreshold = 25;
const uint8_t SONIC_DISC_I2C_ADDRESS = 0x09;
const uint8_t NUM_OF_SENSORS = 8; // No. of ultrasonic sensors on SonicDisc
// The packet contains NUM_OF_MEASUREMEN... | bufferIndex |
224 | //
// Histogram.cpp
// VINWidget
//
// Created by ___saradhi___ on 30/11/11.
// Copyright 2011 ___technolabssoftware___. All rights reserved.
//
#include <Histogram.h>
#include <zxing/common/IllegalArgumentException.h>
#include <zxing/common/Array.h>
#include <math.h>
#include <zxing/common/GreyscaleLuminanceSo... | secondPeakScore |
225 | /*
BMFont example implementation with Kerning, for C++ and OpenGL 2.0
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non... | InfoLogLength |
226 | #ifndef BOOPY_AI_H
#define BOOPY_AI_H
#include "../AI.h"
/**
* Goal of the AI:
* Play the moves that create the most change in board state.
* Play the moves that boop the most pieces.
*/
class Boopy_AI : public AI {
public:
Boopy_AI() { }
std::string think(std::queue<std::string> m... | most_boops |
227 | #include <openssl/evp.h>
#include <openssl/aes.h>
#include <openssl/rand.h>
#include <iostream>
#include <cstring>
#include <vector>
#include <iomanip>
#include <sstream>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h> // For using std::string with pybind11
#include <filesystem>
#include <openssl/bio.h>
#inclu... | temp_folder |
228 |
#include "BaseScene.h"
#include "../ui/BaseGuiScreen.h"
BaseScene::BaseScene(const Ogre::String [MASK] , HappyRoll2Application *application, BaseGuiScreen *gui)
: ogre_root(application->ogre_root), ogre_window(application->ogre_window),
ogre_scene_manager(nullptr), ogre_overlay_system(application->ogre_overlay_sy... | name |
229 | #include "Deserializer.hpp"
namespace oatpp { namespace mariadb { namespace mapping {
Deserializer::InData::InData(MYSQL_BIND* pBind,
const std::shared_ptr<const data::mapping::TypeResolver>& pTypeResolver)
{
bind = pBind;
typeResolver = pTypeResolver;
oid = bind->buffer_type;
isN... | anyHandle |
230 | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include <cassert>
#include <fstream>
#include <iostream>
#include "Vtop_verilator__Syms.h"
#include "ibex_pcounts.h"
#include "ibex_demo_system.h"
#include "verilated_... | ram_size_words |
231 | #ifndef RKNNPOOL_H
#define RKNNPOOL_H
#include "ThreadPool.hpp"
#include <iostream>
#include <memory>
#include <mutex>
#include <queue>
#include <vector>
// rknnModel模型类, inputType模型输入类型, outputType模型输出类型
template <typename rknnModel, typename inputType, typename outputType>
class rknnPool {
private:
int id;
std:... | modelId |
232 | #include "SDL2_gfxPrimitives.h"
#include "application_ui.h"
#include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <vector>
using namespace std;
#define EPSILON 0.0001f
struct Coords {
int x, y;
bool operator==(const Coords &other) co... | rCircle2 |
233 | // Copyright 2016-2018 California Institute 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 may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by a... | nargs |
234 | #include <esp_now.h>
#include <WiFi.h>
// Define data structure for gauge readings
typedef struct __attribute__((packed)) {
uint32_t timestamp;
uint16_t rpm;
uint16_t speed;
uint16_t coolantTemp;
uint16_t oilPressure;
uint16_t fuelLevel;
uint16_t batteryVoltage;
uint16_t boostPressure;
uint8_t checkE... | peerInfo |
235 | //-------Source Code for Course Registration System-------//
/* Created by
<NAME>
*/
#include<iostream>
#include<cstdlib>
#include<fstream>
#include<cstring>
#include<conio.h>
#include<windows.h>
using namespace std;
//Function declarations
class CourseRegistration{
char name[50],fname[50],username[20],p... | obj |
236 | #ifndef INCLUDED_HH_LRU_CACHE_HPP
#define INCLUDED_HH_LRU_CACHE_HPP
#include <experimental/iterator>
#include <functional>
#include <hh/hash.hpp>
#include <hh/optional.hpp>
#include <list>
#include <mutex>
#include <tl/expected.hpp>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
na... | found_it |
237 | /* Copyright (c) 2021 International Business Machines Corporation
Prepared by: <NAME> <<EMAIL>>
This program finds clusters of near-duplicate files of source code.
The clusters do not overlap; each input sample is either assigned to a
unique cluster or is declared to be a singleton set.
Input format is... | nchars |
238 | #include "Pch.h"
#include "MainEditorLayer.h"
#include <glm/gtc/type_ptr.inl>
#include "EditorBuiltinCamera.h"
#include "ImGuizmo.h"
#include "ModelEditor/ModelEditorLayer.h"
#include "SceneEditor/SceneEditorLayer.h"
namespace Wuya
{
MainEditorLayer::MainEditorLayer()
: ILayer("MainEditorLayer")
{
PROFILE_FUNCTI... | translate_icon |
239 | /*
* Copyright <NAME>, 2021
* Use, modification and distribution are subject to 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)
*/
#include "math_unit_test.hpp"
#include <random>
#include <boost/math/tools/cubic_roots.hpp>
#ifdef... | gen |
240 | #ifndef KEYPAD_H
#define KEYPAD_H
#include "Key.h"
#define OPEN LOW
#define CLOSED HIGH
typedef char KeypadEvent;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef struct {
byte rows;
byte columns;
} KeypadSize;
#define LIST_MAX 10 // Max number of keys on the active list.
#define MAPSIZE 10... | level |
241 | #include "appintegration.h"
#include <QDebug>
#include <QFile>
#include <QDir>
#include <QCoreApplication>
#include <QFileInfo>
#include <QStandardPaths>
#include <QProcess>
#include <QRegularExpression>
#include <QRegularExpressionMatch>
#include <QTextStream>
namespace {
/**
* @brief Updates a field in desk... | appIconPath |
242 | #include "config_parser_factory.h"
#include <algorithm>
bool ConfigParserFactory::registerConfigParser(
const std::string& name, ConfigParserCreateMethod createMethod, bool overwrite
) noexcept
{
if (overwrite) {
_createMethods.insert_or_assign(name, createMethod);
return true;
}
else {
bo... | pair |
243 | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int NUM_CITIES = 4;
//calculate distance between two cities
int dist(char city1, char city2) {
// Example for 4 cities / input size
if(city1 == 'A') {
if(city2 == 'B') return 10;
else if(city2 =... | current_city |
244 | // mine sweeper.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#define _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING
#include <ostream>
#include <istream>
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <algorithm>
#include <random>
#include <sstream>
#include <exception>
#i... | combuf |
245 | /*** libraries/EeValues/Examples/MyIdent/MyIdent.ino June 2015, <NAME> ***/
// Ardu 1.5: Required to make EeValues class compile OK.
#include <crc8.h>
#include <EeValues.h>
#include <CnUtils.h>
/* ------------------------------------------------------------------- */
#define REC_IDENT MK4CODE('I','D', 'N', 'T... | second_chance |
246 | /*
* Program Name:
* CS 207 (Lec 001) - Project
* Cyborg Headpiece (cs207-2017-project)
*
* Description:
* A cyborg headpiece, by my definition, will be a piece of
* wearable technology, affixed to the head of the wearer,
* but made to look as though it is integrated into the
* flesh of the weare... | dotZ |
247 | #include <AccelStepper.h>
#include <SoftwareSerial.h>
#include <FastLED.h>
#include <string.h>
SoftwareSerial Serial2(3,4); // RX,TX
#include "Countimer.h"
Countimer DippingTimer;
Countimer LiftingTimer;
Countimer TrayTimer;
#define LED_PIN A0
#define NUM_LEDS A1
#define BUZZER_PIN 5
#define HALL_SENSOR 6
#define TRAY... | recvInProgress |
248 | /*
XBee TX test for a Arduino Mega2560 using Serial3 as the XBee serial
input for a Series 2 XBee. This is NOT based on the examples that come with
the Arduino XBee library.
See, the examples there and most other places on the web SUCK. Andrew's
library is much easier to use than the illustrations would lead you to ... | zbtx |
249 | #include "http_server_interface.h"
Server_interface::Server_interface(std::string host, unsigned short port) {
this->host = net::ip::make_address(host);
this->port = port;
}
template <class Body, class Allocator>
http::message_generator Server_interface::handle_request(http::request<Body, http::basic_fields... | connections_acceptor |
250 | #include<mysql.h>
#include<bits/stdc++.h>
#include<fstream>
#include<string>
#include "header/Engineer.h"
MYSQL mysql;
MYSQL_RES *res;//这个结构代表返回行的一个查询结果集
MYSQL_ROW column;//一个行数据的类型安全(type-safe)的表示
using namespace std;
bool connectMysql();
void freeConnect();
bool updateData(const string& sql);
bool outMysql();
bool ... | OsWrite |
251 | #define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <chrono>
#include <math.h>
#include <thread>
#include <fstream>
#include <sys/syscall.h>
#include <string.h>
#... | lseek_ret |
252 | #include <algorithm>
#include <chrono>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <ostream>
#include <queue>
#include <tuple>
#include <unordered_map>
class LimitReachedException : public std::exception {
public:
[[nodiscard("exception")]] const char *what() const noexcept override {
re... | current_time |
253 | #include "Microtask.h"
#include "SharedPointer.h"
#include "SharedValue.h"
#include "helper.h"
using namespace llvm;
Microtask::Microtask(CallInst *fork_call)
{
_fork_call = fork_call;
// Get the microtask function from the fork calls arguments
Value *microtask_arg = fork_call->getArgOperand(2);
_fu... | tmp_reduction_data |
254 | #include <functional>
#include <iostream>
#include <spdlog/spdlog.h>
#include <docopt/docopt.h>
#include <imgui.h>
#include <imgui-SFML.h>
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/System/Clock.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/Graphics/CircleShape.hpp>
int main()//int argc, const c... | window |
255 | #include "esp_adc_cal.h"
#include "QuickMedianLib.h"
#include "esp_adc_cal.h"
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <Preferences.h>
#include "driver/touch_sensor.h"
Preferences preferences;
// #define DEBUG
#ifdef DEBUG
// TEMP - Display for debugging
#include "Free_Fonts.h"
#i... | milliVoltSampleInt |
256 | // Application.cpp
#include "Application.hpp"
#include <iostream>
#include <random>
#include <ctime>
Application::Application(int blockAmount)
: blockAmount(blockAmount) {
srand(static_cast<unsigned int>(time(0)));
if (!loadUsersFromFile("users.txt")) {
std::cerr << "Failed to load users. Exiting... | moneyAmount |
257 | #include <PZEM004Tv30.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h> //Version 1.4.6
typedef struct
{
float currentLimit;
bool restoreCmd;
}masterToNode_t;
typedef struct
{
char id;
bool overcurrentState;
}nodeToMaster_t;
const char nodeID = '1';
const uint8_t pzemTx = 16;
const uint8_t pzemRx... | overcurrentDetected |
258 | #pragma once
#include "subprocess.h"
#include <thread>
#include <chrono>
#include <fcntl.h>
#include <spawn.h>
#include <unistd.h>
#include <sys/wait.h>
namespace splib
{
namespace detail
{
struct pipe_handle
{
int handles[2] = { -1, -1 };
inline ~pipe_handle() noexcept
{
}
void close_pipe() ... | hexit |
259 | //////////////////////////////////////////////////////////////////////////
//
// Helpers.cpp : Miscellaneous helpers.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR F... | bRet |
260 | #include "network.hpp"
void forward_prop(network& net){
for(int i = 0; i < 784; i++){
if(net.A0->elements[i][0] < 0){
net.A0->elements[i][0] += 255;
}
}
apply_func(sigmoid, net.A0, net.A0);
mat* temp1 = dot(net.W1, net.A0);
add(net.B1, temp1, net.Z1);
apply_func(sigmoid, net.Z1, net.A1);
mat* temp2 =... | acc |
261 | /*
* Copyright (C) 2024 Commissariat à l'énergie atomique et aux énergies alternatives (CEA)
* 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... | nb_param |
262 | /* peer.cc
<NAME>, 12 August 2015
*/
#include <iostream>
#include <stdexcept>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <pistache/async.h>
#include <pistache/peer.h>
#include <pistache/transport.h>
namespace Pistache {
namespace Tcp {
std::atomic<size_t> ... | flags |
263 | #include "simple_license.h"
#include <WinSock2.h>
#include <IPHlpApi.h>
#include <string.h>
#include <ctime>
#include <iomanip>
#include <exception>
#include <sstream>
#include <streambuf>
#include <iterator>
#include "lib_license\aes256.h"
#pragma warning(disable : 4996) //_CRT_SECURE_NO_WARNINGS
std::ostream & PT::... | dwRetVal |
264 | #include <iostream>
#include <string>
using namespace std;
void displayWelcomeMessage()
{
cout <<"---------------------------------"<<endl;
cout <<"|Welcome to the Pos Terminal |"<<endl;
cout <<"|1. Add a Item |"<<endl;
cout <<"|2. View Cart |"<<endl;
cout <<"... | cartsize |
265 | /*
** Ncurses.cpp for arcade in /home/aubanel_m/tek2/cpp_arcade/arcade/GUIs
**
** Made by aubanel_m
** Login <<EMAIL>>
**
** Started on Thu Mar 09 21:08:53 2017 aubanel_m
** Last update Sun Apr 9 22:17:31 2017 <NAME>
*/
#include "../../Include/Ncurses.hpp"
void Ncurses::Init_Game(int y, int x)
{
WIN = ... | cmd |
266 | /*
*****************************************************************************************************************************
* COPYRIGHT (c) 2025 <NAME> (<EMAIL>) unless otherwise noted.
*
* This program and all its associated modules is free software:
* you can redistribute it and/or modify it under ... | speedCMD |
267 | #include "arduino_secrets.h"
/*----------------------------------------------------------------------------*/
/* Includes */
/*----------------------------------------------------------------------------*/
#include "thingProperties.h"
/*-----------------... | measured_intensity |
268 | #define REMOTEXY_MODE__ESP8266_HARDSERIAL_POINT
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 115200
#define REMOTEXY_WIFI_SSID "Elevator prototype"
#define REMOTEXY_WIFI_PASSWORD "<PASSWORD>"
#define REMOTEXY_SERVER_PORT 6377
// RemoteXY configu... | rightMotorSpeed |
269 | #pragma once
#include "llvm/IR/Function.h"
#include <deque>
#include <unordered_set>
#include <unordered_map>
#include <utility>
namespace llvm
{
struct Context
{
std::deque<const llvm::Value *> values; // e.g., function or instruction
Context() = default;
Context(std::initializer_list... | idx |
270 | /*
* Copyright (C) 2021 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 ... | pduStr_ |
271 | /*
* Copyright 2024 WuXi EsionTech 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 o... | addr |
272 | #include "iostream"
constexpr int SERIES_SIZE = 999;
bool sortedArrayIncludes(long *array, int size, long value)
{
for (int i = 0; i < size; i++)
{
if (array[i] > value)
return false;
if (array[i] == value)
return true;
}
return false;
}
void cleanArray(long *a... | current |
273 | // Board : Arduino Uno/Nano/Micro
// Author : <NAME>
// Date : 31 Aug 2022
// Purpose : Driver code for ADF4156 (6.2GHz Fractional-N) PLL Chip.
// Pins declarations
// Pin Name Arduino Pin Remark
// -------- ----------- ------
#define PIN_CLK 13 // Clock
#de... | ulnTemp |
274 | #include<dos.h>
#include<stdio.h>
#include<ctype.h>
#define TRUE -1
#define FALSE 0
#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX(a,b) ((a)<(b)?(b):(a))
#define INTR(com,x,y) {_DX=com;_AH=x;_AL=y;geninterrupt(0x14);}
class COMM{
int port,buf_idx;
char buf[20];
public:
int OpenComm(int )... | parity |
275 | #include <chrono>
#include <sstream>
#include <ctime>
#include "datetime.h"
#include "utilities.h"
namespace Astro {
Date::Date(int year, int month, int day, calendar c)
:
y(year), m(month), d(day), cal(c)
{
}
DateTime::DateTime(const Date& date, const Time& time)
:
d{ date }, t{ time }
{
update_jd();
... | d_hours |
276 | /*
* Copyright [2023] [MALABZ_UESTC Pinglu Zhang]
*
* 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... | total_time |
277 | #include "character.h"
#include <cstdlib>
#include <cwctype>
#include <ncurses.h>
#include <unistd.h>
bool empty_age(std::string const &age)
{
if(age.empty())
{
return false;
}
for(char val : age)
{
if(!iswdigit(val))
{
return false;
}
}
return tr... | input_age |
278 | class Solution {
public://先对数组排个序。枚举第一个数,然后设两个指针,在第一个数的后半段开始王中间收缩,if sum > target则右指针往左移, if sum < target则左指针往右移。排序O(nlogn) + 查找O(n^2) = O(n^2)
void quicksort(vector<int>& nums,int [MASK] ,int end) { // 快排
if( [MASK] >=end) return ;
int i= [MASK] ,j=end,t=nums[ [MASK] ]; // 将基准挖出形成一个坑
while(i... | start |
279 | #pragma once
#include <optional>
#include "board.hpp"
#include "matrix_algorithm.hpp"
#include "mod_int.hpp"
#include "point.hpp"
#include "snake.hpp"
#include "snake_arithmetic.hpp"
namespace snk {
namespace __details {
inline auto fill_snake_matrix(std::vector<std::vector<cell_info>>& matrix,
... | head_x |
280 | #include <vector>
#include "mbot.h"
using namespace std;
std::array<double, 36> odom_pose_covariance = {
{1e-9, 0, 0, 0, 0, 0,
0, 1e-3,1e-9, 0, 0, 0,
0, 0, 1e6, 0, 0, 0,
0, 0, 0, 1e6, 0, 0,
0, 0, 0, 0, 1e6, 0,
0, 0, 0, 0, 0, 1e-9}};
std::array<double, 36> odom_twist_covariance = {
{1e-9... | yaw |
281 | #ifndef GENERIC_UTILS_H
#define GENERIC_UTILS_H
#include <random>
//new array and multidimensional arrays
template<typename T, typename... U>
T* new_array1(int a, U... params) {
size_t s = 1*sizeof(int) + a*sizeof(T);
char* chunk = (char*) malloc(s);
int* sp = (int*) chunk;
T* data = (T*) (chunk + 1*... | _2p32 |
282 | #include "Motor.h"
#define DEBUG_LOG false
void Motor::begin(short rpm, int accel){
this->rpm = rpm;
this->accel = accel;
}
short Motor::getRPM() {
return rpm;
}
void Motor::setRPM(short rpm) {
this->rpm = rpm;
}
short Motor::getAcceleration() {
return accel;
}
void Motor::setAcceleration(int accel) {
this-... | str |
283 | #include "map.h"
#include <algorithm>
#include <iostream>
#include <windows.h>
#include "innards.h"
#include "player.h"
#include "room.h"
using namespace std;
/**
* Shows the help menu
*/
void help();
/**
* Sets up the console
*/
void setup();
/**
* Converts a string to lowercase
* @param str the string to ... | weaponDir |
284 | /*
* namespace WServer::WTypes::
*/
#include <spdlog/spdlog.h>
#include <wserver/debug.hpp>
#include <wserver/types/types.hpp>
namespace WServer {
namespace WTypes {
WSocket::~WSocket() {
__xsocket_cleanup();
xsocket_close(sockfd_);
};
WSocket::WSocket(const std::string &socket) {
if (std::regex_search(so... | addr_len |
285 | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
struct Student {
std::string name;
int rollNumber;
int marksBiology;
int marksPhysics;
int marksChemistry;
int totalMarks;
int stream; // 0 for Bio, 1 for Math
int classNumber;
bool operato... | outputFile |
286 | #include <hal/debug.h>
#include <hal/video.h>
#include <pbkit/pbkit.h>
#include <windows.h>
#include <set>
#include "debug_output.h"
#include "nxdk_ext.h"
#include "pbkit_ext.h"
#include "renderer.h"
#include "tracelib/tracer_state_machine.h"
#include "xbdm.h"
#define ENABLE_TRACER_THREAD
static constexpr int kFram... | fb_height |
287 | #include"EPaperDrive.h"
EPaperDrive::EPaperDrive(
/* args */
uint8_t BUSY_Pin,
uint8_t RES_Pin,
uint8_t DC_Pin,
uint8_t CS_Pin,
uint8_t SCK_Pin,
uint8_t SDI_Pin)
{
_BUSY_Pin = BUSY_Pin;
_RES_Pin = RES_Pin;
_DC_Pin = DC_Pin;
_CS_Pin = CS_Pin;
_SCK_Pin = SCK_Pin;
... | xus |
288 |
/**
*
* Open Source Code
*
* Author: <NAME>
*
**/
#pragma once
#include <cassert>
#include <cstdint>
#include <fstream>
#include <iostream>
#include <vector>
class BinaryWriter
{
private:
std::ofstream& writer;
public:
BinaryWriter(std::ofstream& givenWriter) : writer(givenWriter)
{
assert(write... | utf8_bytes |
289 | #include "utils.h"
boolean initConfig(ConfigStore &configStore)
{
EEPROM.begin(sizeof(ConfigStore));
return readConfig(configStore);
}
// 将配置写入flash
void writeConfig(ConfigStore &configStore) {
EEPROM.put(EEPROM_CONFIG_START, configStore);
EEPROM.commit();
}
// 从flash读取配置
boolean read... | try_count |
290 | /*
Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleServer.cpp
Ported to Arduino ESP32 by <NAME>
updates by chegewara
*/
#include <Arduino.h>
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <... | currentMillis |
291 | /*
* Copyright (C) 2025 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 ... | retSize |
292 | // ReSharper disable CppZeroConstantCanBeReplacedWithNullptr
// ReSharper disable CppCStyleCast
// ReSharper disable CppInconsistentNaming
// ReSharper disable CppClangTidyBugproneNarrowingConversions
#include <Arduino.h>
#include <SdFat.h>
#include <Keyboard.h>
#include <LCDWIKI_KBV.h> //Hardware-specific library
#i... | keys |
293 | /*
*
* Copyright (c) 2025 Project CHIP Authors
* 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... | aClustersEndpoint |
294 | #ifndef PATH_SMOOTHING_INCLUDED
#define PATH_SMOOTHING_INCLUDED
#include <eigen3/Eigen/Dense>
#include "RRTStar_DOM_kd_tree.hpp"
using namespace Eigen;
vector<Point2f> QuadraticBSplineSmoothing(const vector<RRTStarNode*>& node_path) {
vector<Point2f> res;
if (node_path.size() < 3) {
cout << "No suffi... | y_at_x_max |
295 | #include <iostream> // Biblioteca para entrada y salida en C++.
#include <vector> // Biblioteca para manejar vectores dinámicos en C++.
// Función que calcula la suma de los elementos de un vector.
// Parámetros:
// - const std::vector<int>& array: Usamos una referencia constante para evitar copias innecesarias y ... | intSum |
296 | #include "gameobjects.hpp"
std::vector<Sprite> sprites;
u8 spriteIdIndex = 0;
u8 getSpriteId(){
spriteIdIndex++;
return spriteIdIndex;
}
EventBinding::EventBinding(std::string ctgry, voidFunction func){
stateType = ctgry;
callable = func;
};
InputManager::InputManager(){
keyMaps.push_back(std... | baseTileValue |
297 | #include "kss2-bios.h"
#include "string.h"
#include "../common.h"
#define FILL_VALUE(parent, childName, dest, minVal, maxVal) \
{ \
int a = atoi(dxml_child(parent, childName) ... | restart_tag |
298 | // Kinect_Depth.cpp : 定义控制台应用程序的入口点。
//
//#include "windows.h"
#include "stdafx.h"
#include "NuiApi.h" // Kinetc数据API
#include "DepthBasics.h" // 深度图像基础定义
#include "Kinect_DepthData.h" // 深度图像基础数据
#include <iostream> // 数据流
#include <cmath>
using namespace std;
Data_Pixel Data_In_Pixel[480][640]; // ... | connect_hr |
299 | // BackgroundParser.cpp
// Implements the BackgroundParser class representing the background thread pool for parsing files / folders.
#include "BackgroundParser.h"
#include <QThread>
#include <QDir>
#include <QDebug>
#include "FileParser.h"
////////////////////////////////////////////////////////////////////... | logFileNameFilters |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.