id stringlengths 1 3 | code_masked stringlengths 783 188k | target stringlengths 3 27 |
|---|---|---|
900 | #include <vector>
#include <numeric>
#include "Nutrition.h"
NutritionalValues operator+(const NutritionalValues &lhs, const NutritionalValues &rhs) {
NutritionalValues temp{};
temp.calories = lhs.calories + rhs.calories;
temp.salt = lhs.salt + rhs.salt;
return temp;
}
struct NutritionalTotals {
st... | total_salt |
901 | #pragma once
#include <assert.h>
namespace Gear {
struct Jump {
//uint16_t count;
int64_t count;
int16_t delta;
int error;
};
// encoder counts where we have our next and previous jumps
struct Jumps{
int next;
int prev;
int last;
};
// need a set nomina... | encoder_count |
902 | #include "fx.hpp"
// 基底クラス ヘッダー
#include "fx_base.hpp"
// 各エフェクト 派生クラス ヘッダー
#include "fx_overdrive.hpp"
#include "fx_distortion.hpp"
#include "fx_delay.hpp"
#include "fx_tremolo.hpp"
#include "fx_chorus.hpp"
#include "fx_phaser.hpp"
#include "fx_reverb.hpp"
#include "fx_autowah.hpp"
#include "fx_compressor.hpp"
// 各... | paramNum |
903 | /**
* @file Employee.cpp
*
* @brief Simple realization of
* structure Employee
*
* @author <NAME>
* Contact: <EMAIL>
*
*/
#include "Employee.h"
namespace NSSigns
{
const char newLine = '\n';
const char newItem = ';';
const char space = ' ';
}
Employee::Employee(const std::stri... | newInformation |
904 | #include <iostream>
#include <string>
#include <vector>
#include <curl/curl.h>
#include <nlohmann/json.hpp>
#include <mutex>
#include <thread>
#include <condition_variable>
#include <chrono>
class DiscordWebhookHandler {
public:
DiscordWebhookHandler(const std::string& webhook_url)
: webhook_u... | json_data |
905 | #include "ncpch.h"
#include "WindowsWindow.h"
//#include "../Event/ApplicationEvent.h"
#include "../Event/ApplicationEvent.h"
#include "../Event/MouseEvent.h"
#include "../Event/KeyEvent.h"
#include "../Log.h"
namespace Nutcracker {
static bool s_GLFWInitialized = false;
static void GLFWErrorCallback(int error, co... | yOffset |
906 | #include "pch-il2cpp.h"
#include "hook.h"
#include <Windows.h>
#include "includes/detours/detours.h"
#include <iostream>
#include "directx/directx.h"
#include <fstream>
#include "helpers.h"
#include "sig_scan.h"
using namespace app;
PVOID* join_original = nullptr;
bool hook(PVOID* ppPointer, PVOID pDetour, const cha... | param_3 |
907 | #include <iostream>
#include <mapbox/variant.hpp>
#include <mapbox/boost_spirit_karma.hpp>
#include <boost/spirit/include/karma.hpp>
typedef mapbox::util::variant<int, bool, std::string, float, long, uint64_t> frame;
struct visitor {
template <typename T>
void operator()(T const& val) const
{
std::... | mystring |
908 | // Copyright 2017 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | sensor_combined_pub |
909 | // <NAME>
//
// Convert adjacency list to adjacency matrix
//
// TODO:
// * Make out of order adjacencies parse correctly
// * > 2 digit vertex parsing
//
// Usage:
// ./listtomat <adjlist_file>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#define USAGE "Usage:\n\t./listtomat <adjlist_file>"
#define MAX... | brk |
910 | #ifndef WF_STDLIB_MATH_MAT4F_HDR
#define WF_STDLIB_MATH_MAT4F_HDR
#include "wfMath.h"
#include "wfVector3f.h"
#include "wfVector4f.h"
class wfMat4f {
wfPrivate::wfMathMat4 m_value;
wfMat4f(const wfPrivate::wfMathMat4 &mat) :
m_value(mat)
{ };
public:
wfMat4f() { }
wfMat4f(const wfMat4... | scale |
911 | /**
* Copyright (c) 2023 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Modified and adapted for use with Delta Debugger
* P.Beal - 2025/02/22
*/
#include "quadrature_encoder_substep.hpp"
/**
* the quadrature encoder code starts here
*/
/**
* internal helper functions (not to be u... | delta_substep |
912 | /*
Copyright 2005-2006 Adobe Systems Incorporated
Distributed under the MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the right... | shifted |
913 | #include "Display.h"
#include <Adafruit_GFX.h>
namespace
{
GFXglyph *pgm_read_glyph_ptr(const GFXfont *gfxFont, uint8_t c)
{
#ifdef __AVR__
return &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c]);
#else
// expression in __AVR__ section may generate "dereferencing type-punned pointer will ... | maxx |
914 | #include <iostream>
#define N 5
/*
unsigned int graph[N][N] =
{
{0, 0, 1, 3, 0},
{0, 0, 0, 0, 5},
{0, 2, 0, 1, 0},
{0, 0, 0, 0, 5},
{0, 0, 0, 5, 0}
};
*/
unsigned int graph[N][N] =
{
{0, 7, 9, 0, 14},
{7, 0, 10, 15, 0},
{9, 10, 0, 11, 2},
{0, 15, 11, 0, 17},
{14, 0, 2, 17, 0... | current |
915 |
#include <gflags/gflags.h>
#include <butil/logging.h>
#include <butil/time.h>
#include "client.h"
#include <ctime>
DEFINE_string(ts_ip, "127.0.0.1", "IP of ts server");
DEFINE_int32(ts_port, 8086, "TCP Port of ts server");
DEFINE_string(connection_type, "", "Connection type. Available values: single, pooled, short");... | ts_options |
916 | #include "entities/herbivore.hpp"
#include "entities/algae.hpp"
#include "entities/predator.hpp"
#include "ocean.hpp"
#include "texture_mgr.hpp"
#include "utils/rng.hpp"
#include "constants.hpp"
#include <array>
#include <algorithm>
#include <vector>
namespace {
const std::array<std::pair<int,int>,4> dirs{{{0,-1}... | hungry |
917 | #include "databasemanager.h"
#include <QDebug>
#include <QtSql/QSqlQuery>
#include <QtSql/QSqlError>
DatabaseManager::DatabaseManager(QObject *parent) :
QObject(parent)
{
m_db = QSqlDatabase::addDatabase("QMYSQL");
m_db.setHostName("localhost");
m_db.setDatabaseName("appstreet");
m_db.setUserName("r... | queryString |
918 | #include "gdexample.hpp"
#include <godot_cpp/core/class_db.hpp>
using namespace godot;
GDExample::GDExample() {
// Initialize any variables here.
time_passed = 0.0;
amplitude = 10.0;
speed = 10.0;
}
void GDExample::_process(double [MASK] ) {
time_passed += speed * [MASK] ;
Vector2 new_pos... | delta |
919 | #include <unordered_map>
#include <curl/curl.h>
#include <iostream>
#include <fstream>
#include <string>
class EnvParser {
public:
EnvParser();
void load_env(std::string fp);
uint32_t parse_env();
std::string get_var(std::string key);
private:
std::string filepath;
... | env_line |
920 | // Fill out your copyright notice in the Description page of Project Settings.
#include "CI_BaseAIController_CPP.h"
#include "PathFinding/CI_PathFollowingComponent_CPP.h"
#include "CI_BaseAIPawn_CPP.h"
#include "AI/CI_AIManager_CPP.h"
#include "AI/GOAP/CI_GOAPWorkerComponent_CPP.h"
#include "Managers/CI_TimeManager_CP... | DeltaSeconds |
921 | //===- ARMFrameLowering.cpp - ARM Frame Information -----------------------===//
//
// Part of the LLVM Project, 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
//
//===---------------------------... | IncomingArgStackToRestore |
922 | #ifndef _LAUNCHER_H_
#define _LAUNCHER_H_
#include "../utils/Reader.h"
#include "../utils/Preprocessor.h"
#include "EngineWrapper.hpp"
class Launcher {
public:
Launcher(Reader *reader, Preprocessor *processor, EngineWrapper *engine) {
reader_ = reader;
engine_ = engine;
... | img |
923 | // BonDecodeApp.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <iostream>
#include <fstream>
#include <filesystem>
#include <locale>
#include <Windows.h>
#include "IB25Decoder.h"
using namespace std;
HMODULE hDecoder = nullptr;
IB25Decoder2* LoadDecoder(const std::string& decoderPath);
//f... | readSize |
924 | #include "Lexer.hpp"
#include "Expression.hpp"
#include "IOperand.hpp"
#include "OperandFactory.hpp"
#include "Operators.hpp"
#include "Exceptions.hpp"
#include "Parser.hpp"
#include <boost/algorithm/string.hpp>
#include <string>
#include <unordered_map>
#include <regex>
std::string const Lexer::operand_regex = "\\w+\... | operands_types |
925 | // https://leetcode.com/problems/two-sum/
//
// Status: Accepted
// Runtime: 28 ms
// Score: 99.00%
//
#include <iostream>
#include <map>
#include <vector>
#include <stack>
#include <cmath>
#include <gtest/gtest.h>
#include "args.h"
#include "macros.h"
using namespace std;
// Defined in problem
struct ListNode
{
... | solution |
926 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Contact.class.cpp :+: :+: :+: ... | space_number |
927 | #include <cstdlib>
#include <fstream>
#include <iostream>
#include <memory>
#include <vector>
#include "Engine.hpp"
#include "Item.hpp"
#include "OgmoTile.hpp"
#include "Tile.hpp"
#include "Utilities.hpp"
terra::Engine::Engine(){
// Just setting up some variables
ConsoleOpen = false;
Initialized = false;
}
void te... | NewTileLayer |
928 | /***************************************************************************
* Copyright (c) 2020-present Bitplane AG Zuerich *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may... | vTimeSpec |
929 | //
// DynVect.cpp
// Vect
//
// Created by asd on 16/03/2019.
// Copyright © 2019 voicesync. All rights reserved.
//
//#define NDEBUG
#include "DynVect.hpp"
#include "Timer.h"
#include <vector>
#include <math.h>
#include <chrono>
void testDynVect() {
size_t n=1e7;
double x=10.001, err=1e-3;
au... | vv3 |
930 | // --------------------------------------------------------------------------------------------------------------------
// Copyright © 2013 BitterSkittles.
// This program is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it u... | component |
931 | // mar: Minimal ASCII reader for C++
// licence: Apache, see LICENCE file
// file: AsciiLineReader.cpp - AsciiLineReader class implementation
// author: <NAME>
#define ASCII_LINE_READER_CPP
#include "mar/AsciiLineReader.h"
namespace MAR {
AsciiLineReader::AsciiLineReader(const std::string &_file_name, size_t [MA... | _chunk_size |
932 |
// Copyright <NAME> 2012 - 2013.
// 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)
#pragma once
#include <mpi.h>
#include <shiva\error.h>
#ifndef SHIVA_VERSION
#define SHIVA_VERSION 4
#endi... | len |
933 | /*
Name: Exception.hpp
Copyright: Apache 2.0
Author: CLimber-Rong
Date: 24/08/23 18:09
Description: 异常处理的实现
*/
#pragma once
#include"stmlib.hpp"
#include"String.hpp"
//该库不依赖平台,无需移植
char* ExceptionMessage;
/*
CATCH的使用方法:
CATCH {
//在这里写上捕捉异常的代码
}
THROW(message)用于抛出异常,异常信息为message
THROW_S的作用与THROW相近,通常用于抛出“... | msg |
934 | /// file: extended_kalman_filter_demo.cpp
///
/// In this demo a 3D state is simulated.
/// The 3D state evolves according to a non-linear
/// state transition function f.
/// Further, a noisy 3D measurement sensor of this
/// 3D state is available. The measurement process
/// is described by a non-linear 3D function ... | simulation_step |
935 | //
// Created by KV on 26 february, 2017.
// On the platform Linux (Ubuntu Xenial xerus) 64Bit
//
// <EMAIL>
//
#include "event_loop.h"
#include "log.h"
#include "input_event.h"
#include "handle_command.h"
/*
* In the below data we are first initializing constructor and after that we are passing the data to the pr... | events |
936 | #ifndef TEST_H
#define TEST_H
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include "gtest/gtest.h"
// https://stackoverflow.com/a/10062016/523079
template <typename T, size_t size>
::testing::AssertionResult ArraysMatch(const T (&expected)[size], const T (&actual)[size]) {
for (size_t i(0); i < size... | array_len |
937 | //
// Created by <NAME> on 25.05.23.
//
#pragma once
#include <string>
#include <curl/curl.h>
#include <functional>
#include <utility>
void serializeString(const std::string &str, char *&ptr, size_t padding_length);
struct MemoryStruct {
char *memory;
size_t size;
};
class Connection;
class Station {
publ... | mDelay |
938 | #include "clang/Driver/Options.h"
#include "clang/AST/AST.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/ASTConsumers.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/T... | CastType |
939 | // openmsg by <NAME>
//
// To the extent possible under law, the person who associated CC0 with
// openmsg has waived all copyright and related or neighboring rights
// to openmsg.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/z... | unsigned_value |
940 | /* 运算符重载
返回类型 operator 运算符符号(形式参数列表)
{
函数体
}
1.运算符重载为类中的成员函数,此时运算符函数的形式参数个数比运算符规定的个数要少一个,原因是非静态成员
函数都有一个隐含的this指针,运算符函数可以用this指针隐式的访问类对象的成员,因此这个对象自身的数据可以
直接访问,不需要放到形式参数列表里面,少了的运算对象就是对象本身
双目运算符重载为类函数的定义形式
返回类型 类名::operator op(const 所属类型 &obj2)
{
......//this指针指向第一个对象obj1
}
... | ch1 |
941 | #include "Console.h"
Console::Console(uint32_t width, uint32_t height, uint32_t fontSize) {
this->width = width;
this->height = height;
buffer = new wchar_t[width * height];
handle = CreateConsoleScreenBuffer(GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL);
SetConsoleActive... | updateNow |
942 | #include <ctime>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <stdexcept>
#include "BinarySearchTree.h"
using namespace std;
int getKey_efficiency(int [MASK] ) {
return [MASK] ;
}
int counter;
int compareKeys_efficiency(int keyA, int keyB) {
counter++;
return keyA-keyB;
}
class Person {
pub... | content |
943 | /*
* Copyright (C) 2019 Lakoja on github.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... | lightCounter |
944 | #include "Streaming.h"
#include "SerialReceiver.h"
SerialReceiver::SerialReceiver() {
error = SR_ERR_NONE;
resetState();
startChar = SR_DFLT_START_CHAR;
stopChar = SR_DFLT_STOP_CHAR;
sepChar = SR_DFLT_SEP_CHAR;
resetState();
}
bool SerialReceiver::messageReady() {
if (state == SR_STATE_MES... | rval |
945 |
#include "my_player.h"
#include <godot_cpp/classes/input.hpp>
void MyPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_speed", "speed"), &MyPlayer::set_speed);
ClassDB::bind_method(D_METHOD("get_speed"), &MyPlayer::get_speed);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed"), "set_speed", "get_speed... | p_speed |
946 | #include "coinbutton.h"
#include <QPainter>
CoinButton::CoinButton(QWidget *parent) : QPushButton (parent)
{
this->setStat(0);
this->setStyleSheet("QPushButton{border:0px;}");
connect(&this->mTimer,&QTimer::timeout,[=](){
if (this->mStat){
this->mFrame--;
}
else {
... | pix |
947 | #include "Alarm.hpp"
namespace kjc
{
Alarm::Alarm() noexcept : _type{ Type::Unknown }
{
}
Alarm::Alarm(Type t) noexcept
: _type{ t }
{
}
Alarm::Alarm(Type t, String description) noexcept
: _type{ t }
, _description{ std::move(description) }
{
}
bool Alarm::operator==(const Alarm& other) const noexce... | descriptions |
948 | // Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BCEX_STRENCODINGS_H
#define BCEX_STRENCODINGS_H
#include <cstdint>
#include <iter... | accumulator |
949 |
#include <mdrTreeStyleTabs/ITabWidget.hpp>
#include <mdrTreeStyleTabs/Node.hpp>
#include <mdrTreeStyleTabs/TabWidgetFactory.hpp>
#include <mdrTreeStyleTabs/TreeStyleTabs.hpp>
#include <QtWidgets/QApplication>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QPushButton>
#include <QtGui/QMouseEvent>
#include <QtGu... | widget_factory |
950 | #include "Building.h"
#include <assert.h>
#include <cmath>
#include "Game.h"
const uint32_t Building::UPGRADE_COLORS[MAX_UPGRADE] { 0xFFFF00FF, 0x00FF00FF, 0x00FFFFFF, 0xFF00FFFF, 0xFF0000FF };
const int Building::LIFE_VALUES[MAX_UPGRADE] { 8, 10, 13, 15, 17 };
Building::Building(Game* game, sf::Vector2i pos, sf::V... | rads |
951 | /****************************************************************************
* Copyright 2016 BlueMasters
*
* 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... | timeout |
952 | #ifndef ASHKAL_BOUNDING_BOX_HPP
#define ASHKAL_BOUNDING_BOX_HPP
#include <cmath>
#include <ostream>
#include "Ashkal/Matrix.hpp"
#include "Ashkal/Point.hpp"
#include "Ashkal/Vector.hpp"
namespace Ashkal {
/**
* Represents an axis-aligned box defined by minimum and maximum corner
* points.
*/
class Boundi... | min_y |
953 | #include"tgepch.h"
#include"Editor2D.h"
#include"imgui/imgui.h"
#include <glm/gtc/type_ptr.hpp>
#include"TurboGE/Events/AppEvent.h"
#include"TurboGE/Renderer/Renderer2D.h"
#include"TurboGE/Application.h"
#include"TurboGE/Scene/Components.h"
#include"TurboGE/Scene/SceneSerializer.h"
#include"TurboGE/Utils/PlatformUtils.... | minWinSizeX |
954 | // SPDX-FileCopyrightText: 2012 <NAME> <<EMAIL>>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#include "example_2_rosterHandling.h"
#include "QXmppMessage.h"
#include "QXmppRosterManager.h"
#include <QCoreApplication>
xmppClient::xmppClient(QObject *parent)
: QXmppClient(parent),
m_rosterManager(findE... | jids |
955 | //
// Created by Alex on 8/27/2020.
//
#ifndef HEILANG_CODEGEN_H
#define HEILANG_CODEGEN_H
#include "visitor.h"
#include "types.h"
#include <llvm/IR/IRBuilder.h>
using namespace llvm;
class ErrorReport {
public:
void report(const char *msg) {
std::cout << msg;
}
};
struct CompileContext {
LLVMC... | ops |
956 | #include "traceroute.h"
// seconds to wait before sending another packet
const int TTL_TIMEOUT = 15;
const int PAYLOAD_SIZE = 36;
const int FIRST_TTL = 2;
const int TOTAL_OUT = 30;
const int PACKET_LEN = 64; // this is all th eoutgoing packets
// Function to print ICMP header -debug only because it clogs the output
v... | reply_received |
957 | #include "AppDelegate.h"
#include "cocos2d.h"
#include "SimpleAudioEngine.h"
using namespace CocosDenshion;
#include "GameScene/CGameLogo.h"
#include "loader/CClientLoader.h"
#include "sql/CSqliteManager.h"
#include "Platform/CCNd91Mng.h"
using namespace cocos2d;
AppDelegate::AppDelegate()
{
}
... | bRet |
958 | #include "vtk_representation.h"
#include "model.h"
#include "parameters_sim.h"
//#include <omp.h>
#include <algorithm>
#include <iostream>
#include <spdlog/spdlog.h>
icy::VisualRepresentation::VisualRepresentation()
{
int nLut = sizeof lutArrayTemperatureAdj / sizeof lutArrayTemperatureAdj[0];
// hueLut->SetNum... | option |
959 | #include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <fstream>
using namespace std;
void print(string msg, bool borderTop= true, bool borderBottom= true)
{
bool [MASK] = true;
if (borderTop)
{
cout << "+---------------------------------------------+" << endl;
cout <... | frontSpace |
960 | #include <cstdlib>
#include <deque>
#include <iostream>
#include <system_error>
#include <thread>
#include <asio.hpp>
#include "message.hpp"
using asio::ip::tcp;
using std::error_code;
typedef std::deque<message> message_queue;
class client {
public:
client(asio::io_service& io, tcp::resolver::iterator endpoint_... | write_in_progress |
961 | #include <Servo.h>
Servo myservo0;
int Echo = A4;
int Trig = A5;
// Motor control pins : L298N H bridge
#define enAPin 5 // Left motor PWM speed control
#define in1Pin 7 // Left motor Direction 1
#define in2Pin 8 // Left motor Direction 2
#define in3Pin 9 // Right motor Direction 1
#define in4Pin ... | Fdistance |
962 | // SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: 2020 <NAME> <<EMAIL>>
#include "ufwlogmodel.h"
#include <QDebug>
UfwLogModel::UfwLogModel(QObject *parent)
: LogListModel(parent)
{
}
// Regexp failed me, parsing it is.
std::map<QString, QString> parseString(const QString &line)
{
// We... | newLogs |
963 | /*
* stateLed.h
*
* Created on: 2019. 6. 23.
* Author: colson
*/
#ifndef INC_PERIPHGPIO_H_
#define INC_PERIPHGPIO_H_
#include "main.h"
class PeriphGPIO {
protected:
GPIO_TypeDef *GPIOx; /**< GPIOx*/
uint16_t GPIO_Pin; /**< GPIOx_Pin*/
GPIO_PinState PinState; /**< GPIOx_State*/
uint16_t period; ... | GPIO_Pin_ |
964 | #include "config.h"
#include <assert.h>
#include <any>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
Config::Config() {
// Default configuration
node_["column_limit"] = 80;
node_["indent_width"] = 4;
node_["use_tab"] = false;
node_["tab_width"]... | validate_character |
965 | // Copyright 2016 Open Source Robotics Foundation, 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 appli... | response |
966 |
#include "EnemyManager.h"
#include "util.h"
USING_NS_CC;
bool EnemyManager::init() {
if (!Node::init()) { return false; }
enemys_.resize(50);
for (size_t i = 0; i < enemys_.size(); ++i) {
auto enemy = Enemy::create();
enemy->setVisible(false);
enemys_[i] = enemy;
addChild(enem... | seq |
967 | #include <pluginlib/class_list_macros.h>
#include <laser_odometry_core/laser_odometry_utils.h>
#include <laser_odometry_libpointmatcher/laser_odometry_libpointmatcher.h>
#include <tf_conversions/tf_eigen.h>
#include <fstream>
namespace laser_odometry {
bool LaserOdometryLibPointMatcher::configureImpl()
{
std::st... | libpointmatcher_config_name |
968 | /* HM-LGW emulation for HM-MOD-RPI
*
* Copyright (c) 2015 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use... | escapeValue |
969 | #include "Compositor.h"
namespace WPEFramework {
namespace Plugin {
SERVICE_REGISTRATION(Compositor, 1, 0);
static Core::ProxyPoolType<Web::Response> responseFactory(4);
static Core::ProxyPoolType<Web::JSONBodyType<Compositor::Data> > jsonResponseFactory(4);
Compositor::Compositor()
: _adminL... | visible |
970 | //
// Map.cpp
// maproom-robot
//
// Created by <NAME> on 2/20/17.
//
//
#include "Map.h"
Map::Map(float width, float height, float offsetX, float offsetY, ofRectangle crop):
widthM(width), heightM(height),
offsetX(offsetX), offsetY(offsetY),
origOffsetX(offsetX), origOffsetY(offsetY),
svgExtentMin(10000), svg... | toStore |
971 | #include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <sensor_msgs/image_encodings.h>
#include <pylon/PylonIncludes.h>
#include <pylon/usb/BaslerUsbInstantCamera.h>
#include <camera_info_manager/camera_info_manager.h>
class PylonUSBCamera {
private:
// This smart pointer will receive t... | payloadSize |
972 | // pololu-cartographer.cpp
// Developed by: <NAME>, ID: 17982686
// ENSE504 2018 Assignment 1 program code
// Requires encoder.cpp and encoder.h as a library in the project.
#include "mbed.h"
#include "m3pimaze.h"
#include "encoder.h"
#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include... | wheel_cm |
973 | #include "core/application.h"
#include "core/time_delta.h"
#include "rendering/renderer_2d.h"
#include "rendering/render_command.h"
#include "events/mouse_event.h"
#include <Windows.h>
Application* Application::s_instance = nullptr;
Application::Application(const std::string& name, uint32_t width, uint32_t height)... | properties |
974 | #include "HistogramHelper.h"
#include <opencv2/opencv.hpp>
#include <tuple>
#include <iterator>
#include <map>
#include <omp.h>
#include <math.h>
#include <iostream>
const int PIXEL_RANGE = 256;
const int MAX_PIXEL_VAL = 255;
int *ExtractHistogram(cv::Mat img, int *count, int x_start, int x_end, int y_start, int y_end... | free_sw |
975 | #include "Arduino.h"
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <WiFiClient.h>
#include <ArduinoOTA.h>
#include <ThingSpeak.h>
#include <DHT.h>
#include "settings.h"
const char* ssid = SETTINGS_SSID;
const char* password = SETTINGS_<PASSWORD>;
float f;
float h;
#define DHTPIN ... | progress |
976 | import std;
import modlog;
auto main() -> int {
using namespace modlog;
using modlog::LogLevel::Debug;
using modlog::LogLevel::Error;
using modlog::LogLevel::Info;
using modlog::LogLevel::Silent;
Log(Info) << "Hello World!";
Log(Error) << "Hello World! Again...";
Log() << "Hello World! (this is INFO)"... | short_file |
977 | #pragma once
#include <chrono>
#include <functional>
#include <thread>
#include <atomic>
class Timeout {
public:
Timeout() : expired(true), try_to_expire(false) {}
Timeout(const Timeout&) = delete;
Timeout& operator=(const Timeout&) = delete;
~Timeout() {
Expire();
// 等待定时器线程结束
... | left |
978 | #include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include <iostream>
REGISTER_OP("ShiftCorr")
.Input("in0: float")
.Input("in1: float")
.Attr("max_disp: int")
.Output("output: float");
REGISTER_OP("ShiftCorrGrad")
.Input("in0: float")
.Input("in1: floa... | out_shape |
979 | #include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <iomanip>
using namespace std;
#define TEXTNAME "./audio_string.txt"
string one_mora = "BA DA FA GA HA JA KA LA MA NA PA SA TA YA ZA BE CE DE FE GE JE KE LE ME NE PE SE TE ZE AH BH CH DH FH GH IH KH LH MH NH OH PH RH SH TH ... | one_mora_count_all |
980 | #ifndef DRsimSteppingAction_h
#define DRsimSteppingAction_h 1
#include "DRsimInterface.h"
#include "DRsimEventAction.hh"
#include "G4UserSteppingAction.hh"
#include "G4LogicalVolume.hh"
#include "G4Step.hh"
using namespace std;
class DRsimSteppingAction : public G4UserSteppingAction {
public:
DRsimSteppingAction(... | IsR |
981 | /* ---------------------------------------------------------------------------
** This software is in the public domain, furnished "as is", without technical
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** main.cpp
**
** ---------------------------------------------... | audioNbChannels |
982 | /**
@file
@author <NAME>
@author <NAME>
@copyright 2014-2017 INRIA, 2014-2015 CNRS. Licensed under the Apache
License, Version 2.0. (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
@brief
*/
#pragma once
namespace humoto
{
namespace wpg03
{
const char * COMJE... | subname |
983 | #include <stdio.h>
#include <string.h>
#include <math.h>
#include <vector>
#include <exception>
#include <typeinfo>
#include <float.h>
#include <malloc.h>
#include "Calibration.h"
#define MATRIX_SIZE 7
#define u8 unsigned char
class sample{
public:
double m_x;
double m_y;
double m_z;
};
static std::vector<sample>... | norm3 |
984 | /*
* SampleDecoder.cpp
*
* Created on: Jan 14, 2011
* Author: rtoso
*/
#include <iostream>
#include <vector>
#include <new>
#include <float.h>
#include <string>
#include <fstream>
#include <sstream>
#include <limits.h>
#include <math.h>
#include <list>
#include <algorithm>
#include "SampleDecoder.h"
#include... | taxa |
985 | /**
* This file demonstrates the ability to command the control strategy.
*/
#include <stdio.h>
#include <math.h>
#include "lookup.hpp"
#include "group_command.hpp"
#include "command.hpp"
#include "mac_address.hpp"
int main(int argc, char* argv[])
{
// Try and get the requested group.
std::shared_ptr<hebi::Gro... | new_strategy |
986 | #include <MIDI.h>
const int HiHatPin = 8;
const int SnarePin = 9;
const int BassPin = 10;
const int HiTomPin = 11;
const int LowTomPin = 12;
const int CymbalPin = 13;
const int HiHatNum[] = {22,26,42,44,46};
const int SnareNum[] = {37,38,40};
const int BassNum[] = {35,36};
const int HiTomNum[] = {48,50};
const int Lo... | NoteNum |
987 | #include <cstdlib>
#include <iostream>
#include <numeric>
#include <ostream>
#include <random>
#include <fstream>
#include "hooke_jeeves.hpp"
#include "NewMHJ.hpp"
constexpr double speed_of_light = 2.99792458e8;
template <typename T, typename Vec>
auto doppler_shift(T [MASK] , Vec receiver_vel, Vec emitter_vel,
... | frequency |
988 | #include <mutex> // std::mutex
#include <queue> // std::queue<>
#include <thread> // std::thread
#include <atomic> // std::atomic<>
#include <future> // std::future<>
#include <csignal> // sigal
#include <tuple>
#include <utility> ... | fut_result |
989 | #include <iostream>
#include <fstream>
#include <cstdlib>
#include <vector>
#include <cmath>
using namespace std;
bool checkPList(string programListFile); //Validate program list file
bool checkPTrace(string programTraceFile); //Validate program trace file
bool checkPSize(long int pSize); //Validate page size
bool ch... | systemMemory |
990 | // Copyright (c) 2021 <NAME>
//
// SPDX-License-Identifier: BSL-1.0
// 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)
// This example demonstrates the use of the facility invoke_function_action that
// allows to ... | arg |
991 | //
// Copyright 2014 QuarksLab
//
// 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 ... | dotfile |
992 | #include <epoch_frame/dataframe.h>
#include <epoch_frame/series.h>
#include <epoch_frame/scalar.h>
#include <factory/array_factory.h>
#include <factory/index_factory.h>
#include <iostream>
#include <iomanip>
#include <random>
#include <chrono>
#include <vector>
#include <string>
#include <arrow/api.h>
#include <arrow/a... | fields |
993 | #include <fstream>
#include <iostream>
#include <string.h>
#include "Area.h"
using namespace std;
Area::Area() {
int [MASK] = 0;
int waterIndex = 0;
int i;
float x;
float z = -100.0f;
ifstream arch;
arch.open("resources/model/area.map");
string line;
while (getline(arch, line)... | parksIndex |
994 | /*
* SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION &
* AFFILIATES. All rights reserved. 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 Lic... | mapperResponseMsg |
995 | #include "Json.h"
static void skip_whitespace(const std::string &data,size_t &i){
for(char c=data[i];i<data.size()&&((c=data[i]),(c==' '||c=='\t'||c=='\n'||c=='#'));i++){
if(c=='#')while(i<data.size()&&data[i]!='\n')i++;//comment
}
}
static inline constexpr char unescape(char c){
switch(c) {
c... | base |
996 | #include "string"
#include "ros/ros.h"
#include "serial/serial.h"
#include "oroca_ros_tutorials/MsgTutorial.h"
#include "oroca_ros_tutorials/Header.h"
#include "std_msgs/Float64.h"
#include "std_msgs/String.h"
//#include <tf/transform_broadcaster.h>
//#include <tf/LinearMath/Quaternion.h>
// void poseCallback(tf::pos... | joint_name |
997 | /*
* CascadeEvent.cpp
*
* Created on: May 6, 2015
*
* Author: <EMAIL>
*
* Copyright 2014 IMDEA Materials Institute, Getafe, Madrid, Spain
*
* 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 Lice... | randomPos |
998 | #include <array>
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <random>
#include <limits>
#include "transit_density.hpp"
static double eps = 1000.0*std::numeric_limits<double>::epsilon();
static std::mt19937_64 rng;
static std::uniform_int_distribution<uint64_t> uint_dist;
doubl... | omega |
999 | //===-- 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.
//
//===-------------------------------------------------------... | UseAdj |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.