id stringlengths 1 3 | code_masked stringlengths 783 188k | target stringlengths 3 27 |
|---|---|---|
800 | #include <atomic>
#include <iostream>
#include <wing/WingMySQL.hpp>
static std::atomic<uint64_t> count { 0 };
static std::atomic<uint64_t> errors { 0 };
static std::chrono::seconds duration;
static size_t threads;
static size_t connections;
static std::string hostname;
static uint16_t port;
static std::string user;
... | total_success |
801 | #include "StringsAndDirectories.h"
#include <iostream>
#include <windows.h>
#include <sstream>
#include <fstream>
#include <string>
#pragma once
// Logger: handles receiving and then writing logs to a file
//===========================================================
class Logger
{
private:
HANDLE hFile;
publi... | strFilenameNoExtension |
802 | /**
* @file glsl-test.cpp
* @brief Simple testing application for GLSL.
*/
#include "image_gpu.h"
#include <cstdio>
#include <cstdlib>
#include <chrono>
#include <thread>
#include <opencv2/opencv.hpp>
#define TIMEDIFF(start) (duration_cast<microseconds>(steady_clock::now() - start).count())
using ... | height |
803 | //
// main.cpp
// SectorReverser
//
// Created by <NAME> on 8/8/22.
//
#include <stdio.h>
#include <fstream>
#include <vector>
#include <iostream>
#include <unordered_map>
#include "boost/algorithm/string.hpp"
#include "boost/json/src.hpp"
#include <string>
const std::unordered_map<uint32_t, std::string> outdoorFl... | pIter2 |
804 | // coronet - An experimental networking library that supports both the
// Universal Model of the Networking TS and the coroutines of
// the Coroutines TS.
//
// Copyright <NAME> 2017
// Copyright <NAME> 2017
//
// Use, modification and distribution is subject to the
// Boost Software License, Ve... | s_value |
805 | /*
Register access functions for RISC-V system registers.
SPDX-License-Identifier: Unlicense
https://five-embeddev.com/
*/
#include "riscv-csr.hpp"
static volatile riscv::csr::uint_xlen_t saved_mtvec;
int main(void) {
riscv::csr::all [MASK] ;
auto cause = [MASK] .mcause.read();
if (cause &... | csrs |
806 | /*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | waitpid_result |
807 | /* ---------------------------------------------------------------------
*
* Copyright (C) 1999 - 2019 by the deal.II authors
*
* This file is part of the deal.II library.
*
* The deal.II library is free software; you can use it, redistribute
* it, and/or modify it under the terms of the GNU Lesser General
* Pu... | outer_radius |
808 | //
// Created by Liming on 2023/6/21.
//
#include "BooleanCalculation.h"
#include "ConstantRegion.h"
#include "BracketsCalculationTwo.h"
#include "MExceptional.h"
static ME::BracketsCalculationTwo BRACKETS_CALCULATION_2;
std::string ME::BooleanCalculation::formatStr(std::string string) {
return std::regex_replac... | rend |
809 | #include "kmeans.h"
#include <iostream>
#include <limits>
namespace kmeans {
void Kmeans::pick_center() {
centers_.reset(new std::vector<Sample>);
centers_->resize(k_);
for (int i = 0; i != k_; ++i) {
size_t index = rand() % samples_->size();
(*centers_)[i] = (*samples_)[index];
}
}
v... | output_data |
810 | //
// Created by lars on 2024-10-08.
//
#include <string>
#include <iostream>
#include "kedelkloppersprook.h"
// Funktion, um das nächste Wort in einer Zeile zu extrahieren
std::string nextWord(std::string& line) {
std::string word;
int endWord = line.find_first_of(" .,");
if (endWord == 0) {
word ... | translation |
811 | // ~~ Task ~~
// There is a matrix filled with water. There are mines in some random places.
// Ship must move from left down corner (start point) to right up corner (end
// point). Ship can move only up and right with 1/2 probability for each
// direction. When ship moves to cell with mine - it is destroyed. Use Monte... | destination_symbol |
812 | /*
* Copyright 2021 WebAssembly Community Group participants
*
* 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... | success |
813 | /*
*
* Copyright © 2017 <NAME>(<NAME>)/<EMAIL>.
*
* 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 ... | extra_err_msg |
814 | #ifndef VALEAN_CREF_
#define VALEAN_CREF_
#include <utility>
template<typename T>
class cowned;
template<typename T>
class cref;
template<typename T>
class cref_guard;
template<typename T>
class cref {
public:
cref(cowned<T>* own_) :
own(own_) {
own->refCount++;
}
~cref() {
own->refCount--;
}
... | contents_ |
815 | #include <array>
#include <memory>
#include <string>
#include <utility>
#include "everybot_node/sensors/joint_state.hpp"
using everybot::everybot::sensors::JointState;
JointState::JointState(
std::shared_ptr<rclcpp::Node> & nh,
const std::string & topic_name,
const std::string & frame_id)
: Sensors(nh, frame_... | last_position |
816 | // FalconX FC
// Functions library
// <NAME> Dec 4th 2018
#include "functions.h"
#include "utils/defines.h"
#include "motorControl.h"
#include "variables.h"
#include "Arduino.h"
void mixer(int throttle, int pitch, int roll, int yaw) {
/* ---------- PITCH CONTROL ---------- */
if (pitch > MID_VAL) {
motorWrite(0, ... | var2 |
817 | #include <Maths.h>
inline Vector2D Vector2D::operator-()
{
return Vector2D{ -x, -y };
}
inline Vector2D Vector2D::operator+(Vector2D const other)
{
return Vector2D{ x + other.x, y + other.y };
}
inline Vector2D Vector2D::operator-(Vector2D const other) const
{
return Vector2D{ x - other.x, y - other.y };... | newVec |
818 | #include <iostream>
#include <sys/time.h>
#include <unistd.h>
#include <unbound_array.hpp>
using namespace datastructures;
using namespace std;
template<typename T, size_t ALPHA, size_t BETA>
auto testArray(UnboundArray<T, ALPHA, BETA> &a, int num) -> void;
auto main(int argc, char** argv) -> int
{
int num = 10000... | useconds |
819 | #include "DeviceInfoLedger.h"
DeviceConfigLedger *DeviceConfigLedger::_instance;
DeviceInfoLedger *DeviceInfoLedger::_instance;
static Logger _deviceInfoLog("app.devinfo");
//
// DeviceConfigLedger
//
// [static]
DeviceConfigLedger &DeviceConfigLedger::instance() {
if (!_instance) {
_instance = new Devi... | map |
820 | #include <SPI.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h> // See https://pubsubclient.knolleary.net/
//The following libraries must be installed into your arduino libraries folder
#include <MFRC522.h> //from the library manager, search for frc and install MFRC522 By GithubCommunity Version 1.4.3
#includ... | rfidUIDValue |
821 | /*
* lock-free queue
*/
#include "common.h"
#include <stdio.h>
#ifndef _RING_H
#define _RING_H
namespace valois {
namespace base {
template<typename T>
class Ring {
public:
Ring():_arr(nullptr), _head(0), _tail(0), len(0) {};
Ring(long ring_len):_head(0), _tail(0), len(ring_len) {
if(createRing(ri... | _new_tail |
822 | #include <gui/screen2_screen/Screen2View.hpp>
#include <gui/screen2_screen/Screen2Presenter.hpp>
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/Application.hpp>
Screen2Presenter::Screen2Presenter(Screen2View& v)
: view(v)
{
}
void Screen2Presenter::activate()
{
// Start the countdown when S... | newCount |
823 | /*
Wifi secure connection example for ESP32
Running on TLS 1.2 using mbedTLS
2017 - <NAME> - Apache 2.0 License.
*/
#include <WiFiClientSecure.h>
const char* ssid = "YourSSID"; // your network SSID (name of wifi network)
const char* password = "<PASSWORD>"; // your network password
const char* server ... | newState |
824 | /**
* @file big_int.cc
* @brief Main source file for the big int library
*
* This file contains the source code and the DS used in the big int library
*
* @author <NAME> https://tonyjosi97.github.io/profile/
* @copyright Copyright (C) 2021 <NAME>
* @bug No known bugs.
*/
#i... | rabin_miller_lambda |
825 | /*
Dijkstra's shortest path algo
*/
#include<iostream>
#include<list>
#include<set>
#include<vector>
#include<climits>
using namespace std;
class Node{
public:
int dist;
int cnode;
};
class Comp{
public:
bool operator()(const Node &a , const Node &b){
... | dst |
826 | #include "define.h"
#include "utils.h"
const int N_TURNS = 5;
const int N_VERTICES_PER_TURN = 360;
const int N_VERTICES_MAX = N_VERTICES_PER_TURN * N_TURNS;
Window window{};
void SetupWindow() {
window.title = "Spiral Artifacts";
SetupDefaultWindow();
window.display_mode = GLUT_SINGLE | GLUT_RGB;
}
vert... | delta |
827 | #include "process.hpp"
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/select.h>
#include <fcntl.h>
Process::~Process() {
if (infd >= 0) close(infd);
if (outfd >= 0) close(outfd);
if (errfd >= 0) close(errfd);
if (inpipe >= 0) close(inpipe);
if (outpipe >= 0) close(outpipe);
... | argv |
828 |
#include <vector>
#include <string>
#include "Utils.cpp"
#include "Types.cpp"
#include "Diagnostics.cpp"
using namespace std;
namespace L10ns {
static Flag help_flag = Flag(FlagKind::Help, "--help", "-h", "Print help description.", /*has_value*/ false);
static Flag language_flag = Flag(FlagKind::Language, "--langua... | has_project_file |
829 | #include "icvar.h"
#include <map>
#include <string>
#include <sstream>
#include <fstream>
#include <vector>
#include <iostream>
#include <iomanip>
static_assert(sizeof(ConCommandHandle) == 8, "unexpected size for ConCommandHandle");
static_assert(sizeof(ConVarHandle) == 8, "unexpected size for ConVarHandle");
static ... | outputPath2 |
830 | #include <stdio.h>
#include "Socket.h"
#include "Common.h"
#include "LogWrite.h"
#define PROGRAM "TEST"
#define node "test"
#define topic "odom"
int main(int argc,char*argv[])
{
auto set = [](int sfd)->void{
srand(time(0));
int [MASK] = rand() % 10;
Fson request;
request.se... | randnum |
831 | /*
* Copyright (c) 2023-2025, NVIDIA CORPORATION. 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 ... | spirvSize |
832 | #include<bits/stdc++.h>
#include<sstream>
using namespace std;
int main()
{
int k = 0, index = 0;
string [MASK] ;
getline(std::cin, [MASK] );
int length = [MASK] .length();
for(int i=0; i<length; i++) {
if( [MASK] [i] == '%') {
k = 1;
index = i;
break;
... | expression |
833 | #include "anApplication.h"
#include "Device/anShaders.h"
#include "Device/anTexture.h"
#include "anFont.h"
#include "State/anStateManager.h"
anApplication::anApplication(const anApplicationCreationDescription& desc)
: mFramesPerSecond(0)
{
memset(&mApplicationDesc, 0, sizeof(anApplicationCreationDescription));
mApp... | onEvent |
834 | #include "island.h"
Island::Island() {
label = 0;
team = Team::NONE;
attackPower = 5;
}
Island::Island(int labelId)
{
label = labelId;
team = Team::NONE;
attackPower = 5;
}
Island::Island(int labelId, Resource *res)
{
label = labelId;
resource = res;
team = Team::NONE;
attackP... | playerTeam |
835 | /* ----------------------------------------------------------------
*
* sgp4.cpp
*
* this file contains the sgp4 procedures for analytical propagation
* of a satellite. the code was originally released in the 1980 and 1986
* spacetrack papers. a detailed discussion of th... | delmotemp |
836 | /**
* @file main.cpp
* @date 12/7/2022
*
* @brief MapApp program
*/
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QLocale>
#include <QTranslator>
#include "gridmap.h"
int main(int argc, char *argv[])
{
// registering needs to be called before QGuiApplication!
qmlRegisterType<Gri... | engine |
837 | //
// Convex Hull Trick
//
// verified
// COLOCON 2018 Final C - スペースエクスプローラー高橋君
// https://beta.atcoder.jp/contests/colopl2018-final-open/tasks/colopl2018_final_c
//
#include <iostream>
#include <vector>
#include <deque>
#include <algorithm>
using namespace std;
// Convex Hull Trick
/*
直線の傾きに単調性を仮定しない
... | cht |
838 | #include <vector>
#include <iostream>
#include <math.h>
#include <chrono>
#include <thread>
using namespace std;
bool isPrime(int n)
{
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i += 6)
{
... | primes |
839 | // Copyright 2021
//
// 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 writing, sof... | capture_height |
840 | #include "Joint/modules/Window.h"
#include <iostream>
#include "Joint/core/Application.h"
namespace Joint {
Window::Window(int width, int [MASK] , const char* title)
: window{nullptr } {
static bool glfwInitialized{ false };
// Initialize GLFW
if (!glfwInitialized) {
... | height |
841 | /*
NonBlockingBreathingLed 0.1
by <NAME> - 2015
edited by CodingSpiderFox 2017-10-28
12 May 2015
http://www.arduinoelettronica.com/
https://arduinoelectronics.wordpress.com/
http://minibianpi.wodpress.com/
Use a exp + sin function to recreate a
non-blocking breathing led effect
Released under GPL v.2 license
*/
... | key |
842 | #include <iostream>
#include <priority_queue.hpp>
#include <timer.h>
#include <types.h>
int main() {
yb::PriorityQueue<yb::TimerEvent, yb::TimerEvent::ComparatorAsc> queue;
yb::TimerEvent data(false, 3_s,std::bind([](int i) {
std::cout << "Function with int parameter: " << i << std::endl;
}, 10));... | data5 |
843 | #include <initializer_list>
#include <iostream>
#include <memory>
#include <utility>
template <typename tkey, typename tvalue>
class BinarySearchTree {
public:
class BinarySearchTreeNode {
public:
BinarySearchTreeNode(tkey key, tvalue value)
: key_(key), value_(value), left_(nullptr),... | list_initialized_bst |
844 | // Copyright 2022 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "iree/compiler/Codegen/Common/GPU/CommonGPUPasses.h"
#include "iree/compiler/Codegen/Pas... | rewriter |
845 | // Copyright 2024 The Hay Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "device.h"
#include <cstring>
#ifdef __HIP__
#include <fmt/format.h>
#include <hip/hip_... | hip_error_code |
846 | //===- Main.cpp -----------------------------------------------------------===//
//
// 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
//
//... | outputGenerated |
847 | #include <iostream>
#include <sstream>
#include <vector>
using namespace std;
const string FREE_WORKER_LABEL = "Free";
const string WORKING_WORKER_LABEL = "Working";
const string SECCESSFUL_MESSAGE = "OK";
const string ADD_STAGE_COMMAND = "add_stage";
const string ADD_CAR_COMMAND ... | need_timeleft |
848 | /**
* Given two strings s and t, return true if t is an anagram of s, and false
otherwise.
An Anagram is a word or phrase formed by rearranging the letters of a different
word or phrase, typically using all the original letters exactly once.
Example 1:
Input: s = "anagram", t = "nagaram"
Output: true
Example 2:
... | count_map |
849 | #include <Ufox.h>
#include <LowPower.h>
#include <SoftwareSerial.h>
#include <Arduino.h>
#include <SensorModbusMaster.h>
//Pines empleados
#define btn 13
#define RXLED 17
#define LED 9
#define PwrSensor A0 //pin para encender max485 y elevador de voltaje para sensor
#define P... | bateria |
850 | #include <array>
#include <iostream>
#include <orge.h>
#include <vector>
#define TRY(n) \
if (!(n)) { \
std::cout << orgeGetErrorMessage() << std::endl; \
return 1; \
}
#define CHECK(n) \
if (!(n)) { \
std::cout << orgeGetErrorMessage() << std::endl; \
continue; \
}
const std::vector<float> VERTICES{
-1... | samplerIndex |
851 | /*
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2006 <NAME> (www.grinninglizard.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is g... | _tabsize |
852 | /*
* common.cpp
* 公共方法接口
*
* Created on: 2018年1月1日
* Author: Lzy
*/
#include "common.h"
#include <QWidget>
#include <QHeaderView>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <QApplication>
void cm_ClipBoardSet(const QString &str)
{
QClipboard *board = QApplication::clipboard(... | regExp |
853 | #include "Game.h"
#include "GameObject.h"
#include "PerlinNoiseGenerator.h"
GameObject* player;
const char* playerFilePath;
GameObject* clipboardObject;
const char* clipboardFilePath;
SDL_Renderer* Game::renderer = nullptr;
// Perlin Noise
PerlinNoiseGenerator* noise1D;
PerlinNoiseGenerator* noise2D;
// Game constru... | xpos |
854 | #include<string>
#include<iostream>
#include<vector>
#include<fstream>
#include<sstream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main()
{
/*
srand(time(NULL));
string temp;
string file_name;
string out_file_name;
int set_effect;
cout << "What .ppm file should I open?" << endl;
cin ... | _continue |
855 | #pragma once
#include <thread>
#if _WIN32
#include "platform/windows/host_info.hpp"
namespace asa { namespace api = windows; }
#elif _AIX
#include "platform/aix/host_info.hpp"
namespace asa { namespace api = aix; }
#else
#include "platform/posix/host_info.hpp"
namespace asa { namespace api = posix; }
#endif
namespace... | interval_s |
856 | #ifndef ANIMATIONCOMPONENT_H
#define ANIMATIONCOMPONENT_H
class AnimationComponent
{
private:
class Animation
{
public:
//Variables
Sprite& sprite;
Texture& textureSheet;
float animationTimer;
float timer;
bool done;
int width;
int height;
IntRect startRect;
IntRect currentRect;
IntRect endRec... | mod_percent |
857 | // Dummy CPU intensive app
extern "C" {
#include <base/hash.h>
#include <base/log.h>
#include <runtime/runtime.h>
#include <runtime/smalloc.h>
#include <runtime/storage.h>
}
#include "thread.h"
#include "timer.h"
#include <iostream>
uint64_t g_runtime_sec;
void MainHandler(void */*arg*/)
{
barrier();
auto ... | spin_cnt |
858 | #include <limits>
#include<algorithm>
#include <iostream>
#include "ray-tracer.h"
#include <opencv2/opencv.hpp>
namespace MD {
void make_ray(const raytracer & context, int x, int y, ray3 & ray) {
double nx = context.width;
double ny = context.height;
double l = -nx / (2 * nx);
double r = nx / (... | frame010 |
859 | /**
* \file iconproxymodel.cpp
* Implement the `IconProxyModel` class
*
* \author <NAME>
*
* \copyright Copyright <NAME> 2018 Distributed under the Boost
* Software License, Version 1.0. (See accompanying file ../LICENSE_1_0.txt
* or copy at https://www.boost.org/LICENSE_1_0.txt
*/
#include <QFileSystemMode... | role |
860 | #include"SceneNode.hpp"
void SceneNode::attachChild(ScenePtr child) {
child->mParent = this;
mChildren.push_back(std::move(child));
}
SceneNode::ScenePtr SceneNode::detachChild(const SceneNode& node) {
auto [MASK] = std::find_if(mChildren.begin(), mChildren.end(),
[&] (ScenePtr& p) -> bool { return... | found |
861 | /*
* Copyright (C) PrivateWeb Software (https://github.com/PrivateWebSoftware) - All Rights Reserved
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution
*/
#include <QG... | engine |
862 | /*
* Copyright (C) 2015 The Scorpion Programming Language
*
* 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... | status |
863 |
extern "C" {
#include "ffplay.h"
#define MAX_AUDIO_FRME_SIZE 2 * 44100
/**
* flush pkt
*/
static AVPacket flush_pkt;
static int av_sync_type = AV_SYNC_AUDIO_MASTER;
void global_init() {
/**
* register
*/
av_register_all();
avformat_network_init();
/**
* init flush pkt
*/
... | audio_track_play_mid |
864 | /**
* @file buffer.cpp
* @brief buffer
* @author Ichheit, <<EMAIL>>
* @date 2022-08-18
*/
#include "buffer.h"
#define ERR_EXIT(msg) do { fprintf(stderr, "[buffer error]: %s\n", msg); exit(EXIT_FAILURE); } while (0)
#define NOT_ERR_EXIT(exp, msg) do { if (!(exp)) { ERR_EXIT(msg); } } while (0)
namespace wsv
{
B... | readSize |
865 | #ifndef UTILS_H
#define UTILS_H
#include <string>
#include <vector>
#include <memory>
#include <functional>
#include <fstream>
#include <regex>
namespace Utils
{
std::vector<std::string> readInput(std::string filePath) {
std::ifstream file(filePath);
std::vector<std::string> [MASK] ;
wh... | lines |
866 | #pragma comment(lib, "comsupp.lib")
#include "MSWord.h"
#include "ComOperate.h"
#include <Ole2.h>
#include <comutil.h>
/*
* === 特别注意 ===
* 在使用AutoWrap函数时,如果使用DISPATCH_METHOD,并且带有参数,需要将参数顺序倒过来!
* 再说一遍,顺序倒过来!
*
* MSDN上关于word的VBA操作说明:
* https://msdn.microsoft.com/EN-US/library/office/ff837519.aspx
*... | TableOfContentsCount |
867 | /*
Copyright 2018 <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 writing, software
distributed u... | bt_cfg |
868 | /*
*@file : Date.cpp
*
*@author (A) : <NAME>.
*@version : 25-2-2016
*
*Implementation of the Date.h header file
*
*This work is licensed under the
*Creative Commons Attribution-NonCommercial-ShareAlike 4.0
*International License. To view a copy of this license,
*visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
... | noOfDays |
869 | //
// Created by huailiang on 2022/5/2.
//
#include "astc.h"
//#define _DEBUG
int ReadDim(ifstream &ifs) {
uint8_t dim[3];
ifs.read((char *) (&dim[0]), sizeof(uint8_t));
ifs.read((char *) (&dim[1]), sizeof(uint8_t));
ifs.read((char *) (&dim[2]), sizeof(uint8_t));
int [MASK] = dim[0] + (dim[1] <... | decoded_dim |
870 | /**
* 带头结点
**/
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
typedef int ElemType;
typedef struct LNode {
ElemType data;
struct LNode *next;
} LNode, *LinkList;
bool InitList(LinkList &L) {
L = (LNode *)malloc(sizeof(LNode));
if (L == nullptr) {
return false;
}
L->nex... | len |
871 | /*
* Fid_Bass.cpp
* Prototipo3
*
* Created by Limulo.
* http://www.limulo.net
*/
#include "Fid_Bass.h"
// COSTRUTTORE /////////////////////////////////////////////////
Fid_Bass::Fid_Bass(int _fid, int _sid)
{
std::cout << "Constructiong derived!\n" << std::endl;
fid = _fid;
sid = _sid;
c_innerRadi... | _fColor |
872 | /** MQTT Publish von Sensordaten */
#include "mbed.h"
#include "OLEDDisplay.h"
// #include "Motor.h"
// #include "Servo.h"
#include "MbedJSONValue.h"
#include "http_request.h"
#include "config.cpp"
#if MBED_CONF_IOTKIT_HTS221_SENSOR == true
#include "HTS221Sensor.h"
#endif
#if MBED_CONF_IOTKIT_BMP180_SENSOR == true
#... | encoder |
873 | #pragma once
#include <THString.h>
#include <THDllLoader.h>
#include <THTime.h>
#include <THSystem.h>
#include <THThread.h>
extern "C"
{
typedef HANDLE (__stdcall *OpenCommPort)(int nPort,int nBaudRate);
typedef BOOL (__stdcall *ClosePortHandle)(HANDLE hPort);
typedef BOOL (__stdcall *CallClock)(HANDLE hP... | tmpMoney |
874 | #include <Adafruit_VC0706.h>
#include <SPI.h>
#include <SD.h>
#include <SoftwareSerial.h>
#include <TimerOne.h>
#include <Wire.h>
#include <RTClib.h>
#include <EEPROM.h>
#define chipSelect 10
#define cameraTX 3
#define cameraRX 4
#define switchPin 2
#define ledPin 5
//ms betwen photos
#define photoDelayLength 300000 ... | imgFile |
875 | #include <ESP32Servo.h>
// Define joystick pins
const int JOY_X = 35; // Horizontal (X)
const int JOY_Y = 34; // Vertical (Y)
const int JOY_BTN = 32; // Button (SEL)
// Servo objects
Servo servo1; // Base rotation
Servo servo2; // Shoulder
Servo servo3; // Gripper or elbow
// State
int currentServo = 0;... | angleY |
876 | /**************************************************************************/
/*!
@file GSL1680.cpp
@author Skallwar
@thanks to wolfmanjm for the source code this lib is bassed on : https://github.com/wolfmanjm/GSL1680
*/
#include <Arduino.h>
#include <Wire.h>
#include <stdint.h>
#include "GSL1680.... | addr |
877 | #include <iostream>
using namespace std;
class IllegalCoordinateException{
private:
int first,second;
public:
IllegalCoordinateException(pair<int,int> [MASK] ){
first = [MASK] .first;
second = [MASK] .second;
}
string theCoordinate() const{
ret... | coordinates |
878 | #include "streamdumper.h"
#include <cstdio>
#include <iostream>
using namespace std;
StreamDumper::StreamDumper(const std::string &file_name, int64_t [MASK] ) :
bytes_to_go( [MASK] )
{
if ( file_name == std::string( "stdout" ) ) {
use_stdout = true;
file = stdout;
} else {
use... | bytes_to_dump |
879 | // Copyright 2017 <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 writing, so... | aEnd |
880 | /**
* @file apps/cda-caen-daq/main.cxx
* @short Main file for the cda-caen-daq application
*
* This file stores the code that runs the cda-caen-daq application.
* It is rather simple, it reads a few simple command line options,
* then sets up CaenDAQWindow to do the rest of the job.
*
... | lvl |
881 | /*
* Copyright 2005-2009 WSO2, Inc. http://wso2.com
*
* 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... | iterations |
882 | #include <weekend/base/camera.hpp>
#include <weekend/base/hittable.hpp>
#include <weekend/base/hittable_list.hpp>
#include <weekend/base/material.hpp>
#include <weekend/base/sphere.hpp>
using namespace weekend;
using weekend::base::camera;
using weekend::base::dielectric;
using weekend::base::hittable;
using weekend::... | material_center |
883 | // example.cpp
//
// 正则表达式解析库演示
//
// 与2004年在北京写于创意鹰翔公司
// 版权申明:
// 作者放弃除著作署名权之外的任何权益。你可以在保留此申明的前提下,自由的,无限制的
// 分发、修改和使用本函数库。
// 如果你有任何建议和BUG汇报,欢迎你联系原始作者:<EMAIL>
//
// 原始作者 : lanzhengpeng(兰征鹏)
// Modify time : 2005-03-12 16:58
// 历史: 参看re_history.txt
//---------------------------------------------------------------... | rrw |
884 | #include <vector>
#include <string>
#include "Lexer.h"
Lexer::Lexer() = default;;
Lexer::Lexer(const Position& p, const ProgramString&) {
current = p;
};
Lexer::~Lexer() = default;
std::vector<Token> Lexer::next() {
std::vector<Token> v;
if (!current.end_of_program()) {
Position start = curre... | skip |
885 | /*
* Copyright (C) 2008, <NAME> and <NAME>, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the f... | serial_size |
886 | //===-- ARMBaseInstrInfo.cpp - ARM Instruction Information ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | DstRegS |
887 | #include "Arduino.h"
#include "touchButton.h"
#include <UTFT.h>
#include <UTouch.h>
touchButton::touchButton(UTFT &glcddev, int x, int y, int xs, int ys, char [MASK] )
{
x1 = x;
y1 = y;
xsize = xs;
ysize = ys;
use = [MASK] ;
glcd = &glcddev;
toggle = false;
}
boolean touchButton::isTouched(int tx, int... | myuse |
888 | //
// Copyright 2017 <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 wri... | wrap |
889 | // 作者:卜知道
// 时间:2023 02 13
// 网址:https://www.buzhidao.icu
// 相关主题:math
// time complexity: O(n)
// space complexity: O(1)
class Solution
{
public:
void check_if_add(char &c, int &af)
{
if (c > '1')
{
c -= 2;
af = 1;
}
else
af = 0;
}
s... | len_a |
890 | #include <iostream>
#include "video.h"
#include "pelicula.h"
#include "serie.h"
#include <typeinfo>
using namespace std;
int main() {
int choice;
vector<video*> videos;
videos.push_back(new pelicula(1, "<NAME>", 1.5, "accion", 4.2));
videos.push_back(new pelicula(2, "Witches get stitches", 2.1, "misteri... | userInput |
891 | #include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include "DHT.h"
#include <SoftwareSerial.h>
#include <String.h>
#define DHTPIN A0
#define DHTTYPE DHT11
#define trigPin 5
#define echoPin 4
DHT dht(DHTPIN, DHTTYPE);
RF24 radio(10, 9); // CE, CSN
SoftwareSerial myserial(3, 2);
const byte add... | distance |
892 | #include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_set>
using namespace std;
typedef pair<int,int> iPair;
#define mp make_pair
vector<int> path;
unordered_set<int> graph[100001];
bool visited[100001];
int temp;
int main() {
int n, m, temp, a, b;
scanf("%i %i", &n, &m);
for (i... | currpath |
893 | #include <GLFW/glfw3.h>
#include <cstdlib>
#include <windows.h>
int main(void)
{
GLFWwindow* window;
if (!glfwInit()) return -1;
glfwWindowHint(GLFW_RESIZABLE, false);
window = glfwCreateWindow(800, 800, "joe", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
... | blue |
894 | #include<bits/stdc++.h>
using namespace std;
struct node{
int key;
node *left, *right;
};
node *newNode(int [MASK] ){
node *temp = new node;
temp->key= [MASK] ;
temp->left=temp->right=NULL;
return temp;
}
void inorder(node *root){
if(root !=NULL){
inorder(root->left);
cout<<root->key<<endl;
inorder(root-... | item |
895 | /**
* @file pipe_pair.h
* @author <NAME> <<EMAIL>>
* @date 2020/08/07
* @copyright Copyright (C) 2020 jc-lab.\n
* This software may be modified and distributed under the terms
* of the Apache License 2.0. See the LICENSE file for details.
*/
#include <atomic>
#include <vector>
#include <... | new_sd |
896 | #include <iostream>
#include <cstring>
#include <fstream>
#include <cstdlib>
#include <cmath>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <thread>
using namespace std;
int main(int argc, char const *argv[]) {
char *nameOrIpAddress = (char*)malloc(1024*sizeof(char));
... | commandPort |
897 | #include <TutorialUtils.hpp>
#ifdef N_MAC_OSX_FRAMEWORKS
#include <NCore/NCore.hpp>
#include <NBiometricClient/NBiometricClient.hpp>
#include <NBiometrics/NBiometrics.hpp>
#include <NMedia/NMedia.hpp>
#include <NLicensing/NLicensing.hpp>
#else
#include <NCore.hpp>
#include <NBiometricClient.hpp>
#in... | sample_num_per_identity |
898 | #include "rclcpp/rclcpp.hpp"
#include "quadruped_gait_planner/GaitPlanner.hpp"
#include <memory>
#include <chrono>
#include <cstdlib>
#include <cmath>
using namespace std::chrono_literals;
using std::placeholders::_1;
using std::placeholders::_2;
GaitPlanner::GaitPlanner() : Node("gait_planner_node")
{
RCLCPP_INFO... | default_gait_parameters |
899 | #pragma once
#include <cstdlib>
#include <vector>
#include <stdexcept>
#include <array>
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_factories.hpp>
#include <windows.h>
#pragma warning(push)
#pragma warning(disable: 4996)
#include "./vstsdk2.4/pluginterfaces/vst2.x/aeffectx.h"
#pragm... | module_path |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.