conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Check that region list isn't empty before attempting to retrieve a region from it\n" }, { "from": "human", "value": "/* * This file is part of Maliit framework *\n *\n * Copyright (C) 2014 Dinesh Manajipet <saidinesh5@gmail.com>\n *\n * This library is free software...
c++
chosen
[ { "from": "system", "value": "Fix typo in exception documentation" }, { "from": "human", "value": "#define SOL_ALL_SAFETIES_ON 1\n#include <sol/sol.hpp>\n#include <iostream>\n\ninline void my_panic(sol::optional<std::string> maybe_msg) {\n\tstd::cerr << \"Lua is in a panic state and will now abo...
c++
chosen
[ { "from": "system", "value": "Call InitializeMagick to make sure all initializers are called.\n" }, { "from": "human", "value": "#include <Magick++/ResourceLimits.h>\n#include <Magick++/SecurityPolicy.h>\n\n#ifndef FUZZ_MAX_SIZE\n#define FUZZ_MAX_SIZE 2048\n#endif\n\nclass FuzzingLimits {\npubli...
c++
chosen
[ { "from": "system", "value": "[asan] Switch to AsanInitFromRtl in .preinit_array.\n\nThere is no functionality change due to a check in AsanActivate.\n\n\n\ngit-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@221882 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "//===--...
c++
chosen
[ { "from": "system", "value": "Test now initializes using variables_init()\n" }, { "from": "human", "value": "#define NO_EXTERN\n#include\"variables.hpp\"\n#include\"processes.hpp\"\n#include<iostream>\n\nint main(int argc, const char* argv[]){\n\tglobals.reset(new Globals());\n\tNILATOM = global...
c++
chosen
[ { "from": "system", "value": "Replace c++ libraries by c standard libraries, make working for c language too\n" }, { "from": "human", "value": "#include<cmath>\n#include<iostream>\n\nusing namespace std;\n\nbool isPrimeBruteForce(double x)\n{\n\tif (x < 2)\n\t\treturn false;\n\tdouble sqroot_x =...
c++
chosen
[ { "from": "system", "value": "tests: Rewrite test to check intent instead of implementation.\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@107024 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s ...
c++
chosen
[ { "from": "system", "value": "Make bm_chars match its internal comment\n" }, { "from": "human", "value": "#include \"common.th\"\n#include \"vga.th\"\n\n_start:\n prologue\n b <- 0 // indicate non-completion to testbench\n\n call(init_display)\n\nrestart:\n c <- 0\n j...
c++
chosen
[ { "from": "system", "value": "Add context to why test was disabled on Windows\n\ntest/Modules/odr_hash-Friend.cpp triggers an assertion in MicrosoftMangle.cpp\nThis has been reported in PR35939\n\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@322593 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, ...
c++
chosen
[ { "from": "system", "value": "Add test for allocation/freeing heap.\n" }, { "from": "human", "value": "int main(int argc, char **argv)\n{\n\treturn 0;\n}\n\n" }, { "from": "gpt", "value": "#include \"heap.h\"\n#include <ctime>\n#include <cstdlib>\n#include <iostream>\n#include <glibm...
c++
chosen
[ { "from": "system", "value": "Raise window to foreground if another instance was launched\n" }, { "from": "human", "value": "#include \"stdafx.h\"\n#include \"SettingsUI.h\"\n#include \"SettingsSheet.h\"\n\nIMPLEMENT_DYNAMIC(SettingsSheet, CPropertySheet)\n\nSettingsSheet::SettingsSheet(\n UI...
c++
chosen
[ { "from": "system", "value": "Make the server bind to localhost. We don't really want to expose it to the world, and it pops up firewall warnings if you have an app aware firewall enabled (e.g. OSX firewall).\n" }, { "from": "human", "value": "#include \"Server.h\"\n#include \"WebPage.h\"\n#incl...
c++
chosen
[ { "from": "system", "value": "Update view for angle arrow\n" }, { "from": "human", "value": "#include <cmath>\n\n#include <ros/ros.h>\n#include <geometry_msgs/TransformStamped.h>\n#include <rviz_visual_tools/rviz_visual_tools.h>\n#include <tf2_eigen/tf2_eigen.h>\n#include <tf2_ros/transform_list...
c++
chosen
[ { "from": "system", "value": "Change image data components detection\n" }, { "from": "human", "value": "#include \"ImageData.h\"\n\n#include <OpenGL/gl3.h>\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wold-style-cast\"\n#pragma clang diagnostic ignored \"-Wunused-functio...
c++
chosen
[ { "from": "system", "value": "Fix missing LoadLibrary symbol on windows.\n\n\nFormer-commit-id: 43619e309e8a912aaf57011937121c77d2b5c16a" }, { "from": "human", "value": "#include \"runtime_internal.h\"\n\n#ifdef BITS_64\n#define WIN32API\n#else\n#define WIN32API __stdcall\n#endif\n\nextern \"C\"...
c++
chosen
[ { "from": "system", "value": "Set size policy associated with view description label\n\n* Doing so will ensure the label doesn't expand.\n" }, { "from": "human", "value": "\n// Qt includes\n#include <QLabel>\n#include <QVBoxLayout>\n\n// Visomics includes\n#include \"voView.h\"\n\n// VTK include...
c++
chosen
[ { "from": "system", "value": "Use a correct format string in the unittest JNI wrapper\n" }, { "from": "human", "value": "#include <string.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <jni.h>\n#include <android/log.h>\n\n#define LOG_TAG \"codec_unittest\"\n#define LOGI(...) __android_log...
c++
chosen
[ { "from": "system", "value": "Reset hero graphic on map change (if it was changed by a move event).\nFix RPG::Event default value for y.\nMinor cleanups.\n\n" }, { "from": "human", "value": "/////////////////////////////////////////////////////////////////////////////\n// This file is part of Ea...
c++
chosen
[ { "from": "system", "value": "Revert \"[dynamic frequency scaling] Fixed the bug on the convertCycleCount function.\"\n\nThis reverts commit 46a484a5e4288f7da92e6f789687d2d141fbcf15.\n" }, { "from": "human", "value": "#include <cmath>\n\n#include \"clock_converter.h\"\n#include \"log.h\"\n\nUInt...
c++
chosen
[ { "from": "system", "value": "Fix miner_test unit test bug\n" }, { "from": "human", "value": "#include <boost/test/unit_test.hpp>\n\n#include \"../uint256.h\"\n\nextern void SHA256Transform(void* pstate, void* pinput, const void* pinit);\n\nBOOST_AUTO_TEST_SUITE(miner_tests)\n\nBOOST_AUTO_TEST_C...
c++
chosen
[ { "from": "system", "value": "[unittest] Use Support/Thread.h instead of <thread> to fix the Windows build\n\ngit-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@256290 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "//===- unittests/TimerTest.cpp - Timer tests ---------...
c++
chosen
[ { "from": "system", "value": "Exclude skipped lines from coverage.\n" }, { "from": "human", "value": "#include <iostream>\n#include <stdexcept>\n#include <type_traits>\n\n#include \"fsm.h\"\n\nclass state_machine: public fsmlite::fsm<state_machine> {\n friend class fsm; // base class needs a...
c++
chosen
[ { "from": "system", "value": "Use `size_t` when needed instead of just `int`\n" }, { "from": "human", "value": "#include \"catch.hpp\"\n\n#include \"visual.hh\"\n#include \"configuration.hh\"\n\nusing namespace vick;\n\nTEST_CASE(\"to_visual\")\n{\n std::string first(\"assert\"), second(\"\\t...
c++
chosen
[ { "from": "system", "value": "Add small explanation to the filter dialog.\n\nsvn path=/trunk/playground/base/strigi/; revision=609264\n" }, { "from": "human", "value": "#include \"dlgfilters.h\"\n#include \"filterwidget.h\"\n \n#include <QHBoxLayout>\n#include <QVBoxLayout>\n#include <QPushButto...
c++
chosen
[ { "from": "system", "value": "Edit subsidy_limit_test to account for BIP42\n\nBecause no one wants 4 gold mines being discovered every mibillenium." }, { "from": "human", "value": "#include \"core.h\"\n#include \"main.h\"\n\n#include <boost/test/unit_test.hpp>\n\nBOOST_AUTO_TEST_SUITE(main_tests...
c++
chosen
[ { "from": "system", "value": "Fix compilation error with C++11 compliant compiler (user-defined literals)\n" }, { "from": "human", "value": "// This is an open source non-commercial project. Dear PVS-Studio, please check it.\n// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva6...
c++
chosen
[ { "from": "system", "value": "Fix bug in Tech Target Check hook module." }, { "from": "human", "value": "//Injector source file for the Tech Target Check hook module.\r\n#include \"tech_target_check.h\"\r\n#include <hook_tools.h>\r\n\r\nnamespace {\r\n\r\nconst u32 Func_GetTechUseErrorMessage = ...
c++
chosen
[ { "from": "system", "value": "Add a dtor to ensure that they are called the right number of times.\n\n\ngit-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@9721 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "\nstruct Foo { \n Foo(int); \n};\nvoid foo() {\n struct {\n ...
c++
chosen
[ { "from": "system", "value": "Disable random shape optimizations by default\n\nSince it's not very effective. It only works well when adding a new\npoly.\n" }, { "from": "human", "value": "#include \"settings.h\"\n\nint N_POLY_POINTS = 4;\nint N_COLOR_VAR = 5;\nint N_POS_VAR = 5;\nint SHAPE_OPT_...
c++
chosen
[ { "from": "system", "value": "Use entity position rather than bbox center\n\nPrevents camera jumping when the player size changes.\n" }, { "from": "human", "value": "#include \"gamelib/components/update/CameraTracker.hpp\"\n#include \"gamelib/core/rendering/CameraSystem.hpp\"\n#include \"gamelib...
c++
chosen
[ { "from": "system", "value": "examples: Add comment regarding use of std::cout.\n" }, { "from": "human", "value": "#include <franka/robot.h>\n#include <iostream>\n\nint main(int argc, char** argv) {\n if (argc != 2) {\n std::cerr << \"Usage: ./echo_robot_state <robot-hostname>\" << std::endl...
c++
chosen
[ { "from": "system", "value": "Create alias for integer and floating point type\n" }, { "from": "human", "value": "// Standard headers\n#include <cmath>\n#include <iostream>\n\n// Libraries\n#include \"Math.hpp\"\n\nconst double PI = 3.141592653589793238462643;\n\nunsigned long int factorial (uns...
c++
chosen
[ { "from": "system", "value": "Update the number of iterations\n" }, { "from": "human", "value": "#include \"GlobalContext.hpp\"\n#include \"ast/SourceFile.hpp\"\n#include \"parser/SpiritParser.hpp\"\n\nint main(int argc, char* args[])\n{\n const std::vector<std::string> argv(args+1, args+argc...
c++
chosen
[ { "from": "system", "value": "Reorganize main() for clarity and modern C++-ness.\n" }, { "from": "human", "value": "/*\n * Justin's Awesome Game Engine\n * or *\n * Just Another Game Engine\n *\n * Copyright 2016 Justin White\n *\n * See included LICENSE file for distribution and reuse.\n*/\n\n#...
c++
chosen
[ { "from": "system", "value": "Add simple event handling to quit\n" }, { "from": "human", "value": "#include <iostream>\n#include \"Board.h\"\n#include \"Renderer.h\"\n\nint main(int argc, char** argv)\n{\n\tBoard board(10, 10, 2);\n\tRenderer renderer;\n\tif(renderer.init() != 0)\n\t{\n\t\trende...
c++
chosen
[ { "from": "system", "value": "Read credentials from the keyboard if the file is not found\n" }, { "from": "human", "value": "#include \"../src/vault.h\"\n\n#include <fstream>\n#include <iostream>\n\nnamespace\n{\n\n// Copy example/credentials.txt.example to example/credentials.txt and\n// put yo...
c++
chosen
[ { "from": "system", "value": "Add a header file for linux\n" }, { "from": "human", "value": "#include \"InternalCommands.h\"\n#include \"Environment.h\"\n#include \"Feeder.h\"\n#include <iostream>\nusing namespace std;\n\nint InternalCommands::exec(int argc, char const** argv,Environment *e,Feed...
c++
chosen
[ { "from": "system", "value": "[clang] Fix failing attribute test on Windows\n\nThe test added in r344146 was failing because the ABI on Windows is\ndifferent, and that test includes ABI-specific details. The test now\nharcodes which ABI to use so we can rely on those details.\n\ngit-svn-id: ffe668792ed300d6...
c++
chosen
[ { "from": "system", "value": "Fix bug in Cpp parser base class initialization. Regression tests all pass now.\n" }, { "from": "human", "value": "#include \"PythonParserBase.h\"\n\nusing namespace antlr4;\n\nPythonParserBase::PythonParserBase(antlr4::TokenStream *input) : Parser(input)\n{\n}\n\nb...
c++
chosen
[ { "from": "system", "value": "Fix yet another Apple buildit bug\n\ngit-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@294732 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "//===------------------------- typeinfo.cpp -------------------------------===//\n//\n// ...
c++
chosen
[ { "from": "system", "value": "Fix one more clang test which didn't have \\5C in it\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@374418 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -m...
c++
chosen
[ { "from": "system", "value": "Use auto when grabbing the agent's index, otherwise we don't get vectorization\n" }, { "from": "human", "value": "#include <algorithm>\n#include <cassert>\n#include <iostream>\n#include <agency/execution_policy.hpp>\n\nint main()\n{\n using namespace agency;\n\n s...
c++
chosen
[ { "from": "system", "value": "Test what happen if task ends\n" }, { "from": "human", "value": "#include <avr/io.h>\n#include <util/delay.h>\n#include <OS.hpp>\n#include <avr/interrupt.h>\n#include \"drivers/serial.hpp\"\n\nSerial serial;\n\nmutex muteks_01;\n\nvoid Task1() {\n while (1) {\n ...
c++
chosen
[ { "from": "system", "value": "Test mmap() for large chunk of memory\n" }, { "from": "human", "value": "\n#include <cstdio>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <errno.h>\n#include <string.h>\n\nint main() {\n\tint fd = open(\"/tmp/bwtr...
c++
chosen
[ { "from": "system", "value": "Use std::signal and csignal header\n\n* Fixes #85\n" }, { "from": "human", "value": "//\n// Created by samueli on 2017-10-02.\n//\n\n#include \"ins_service.hpp\"\n#include <signal.h>\n\nvolatile sig_atomic_t is_server_running = 1;\n\nvoid kill_server(int sig)\n{\n ...
c++
chosen
[ { "from": "system", "value": "Make Hint encoding safe for passing them as GET parameter in URLs\n\nThanks @TheMarex for flagging this!\n" }, { "from": "human", "value": "#include \"engine/hint.hpp\"\n#include \"engine/base64.hpp\"\n#include \"engine/datafacade/datafacade_base.hpp\"\n\n#include <...
c++
chosen
[ { "from": "system", "value": "Mark camera transform not dirty after update\n" }, { "from": "human", "value": "// Copyright (C) 2015 Elviss Strazdins\n// This file is part of the Ouzel engine.\n\n#include \"Camera.h\"\n\nnamespace ouzel\n{\n Camera::Camera()\n {\n \n }\n\n Came...
c++
chosen
[ { "from": "system", "value": "Raise the 500px photos rpp to 10\n" }, { "from": "human", "value": "#include \"px500.h\"\n\nPx500::Px500(QObject *parent)\n : ServerBase(parent)\n{\n\n}\n\nconst QString Px500::serverBaseUrl() const\n{\n return QStringLiteral(\"https://api.500px.com/v1\");\n}\...
c++
chosen
[ { "from": "system", "value": "Remove unnecessary IRQ priority settings\n" }, { "from": "human", "value": "#include <mbed.h>\n\nextern void setup();\nextern void loop();\n\nvoid setIrqPriorities() {\n NVIC_SetPriority(UART5_IRQn, 1);\n NVIC_SetPriority(TIM5_IRQn, 2);\n NVIC_SetPriority(T...
c++
chosen
[ { "from": "system", "value": "Fix bug where EAGAIN and EWOULDBLOCK can cause data corruption.\n" }, { "from": "human", "value": "#include \"SocketHandler.hpp\"\n\nnamespace et {\nvoid SocketHandler::readAll(int fd, void* buf, size_t count) {\n size_t pos = 0;\n while (pos < count) {\n ssize...
c++
chosen
[ { "from": "system", "value": "Revert r7595 due to housekeeper warning-as-error.\n\n\n\ngit-svn-id: e8541e15acce502a64c929015570ad1648e548cd@7596 2bbb7eff-a529-9590-31e7-b0007b416f81\n" }, { "from": "human", "value": "/*\n * Copyright 2012 Google Inc.\n *\n * Use of this source code is governed b...
c++
chosen
[ { "from": "system", "value": "Set small screen + high resolution profile on Android.\n" }, { "from": "human", "value": "//\n// This file is part of the Marble Virtual Globe.\n//\n// This program is free software licensed under the GNU LGPL. You can\n// find a copy of this license in LICENSE.txt ...
c++
chosen
[ { "from": "system", "value": "Fix handling of replies to show the number of words at the end.\n" }, { "from": "human", "value": "#include \"hiredis/hiredis.h\"\n#include <cstdlib>\n#include <iostream>\n#include <fstream>\n#include <string>\n\nusing namespace std;\n\nint\nmain (int argc, const ch...
c++
chosen
[ { "from": "system", "value": "Use c++11 syntax for succinct iterator syntax\n" }, { "from": "human", "value": "#include <functional>\n#include <stack>\n#include <string>\n#include <ccspec/core/example_group.h>\n\nnamespace ccspec {\nnamespace core {\n\nusing std::function;\nusing std::stack;\nus...
c++
chosen
[ { "from": "system", "value": "Fix the Chrome Linux build by working around a compiler bug.\n\nTEST=none\nBUG=none" }, { "from": "human", "value": "// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found...
c++
chosen
[ { "from": "system", "value": "Remove check invalid self; it only created ICS3\n" }, { "from": "human", "value": "#include \"ics3/eeprom.hpp\"\n\n#include \"ics3/eepparam.hpp\"\n#include \"ics3/ics3.hpp\"\n\n#include <stdexcept>\n\nics::EepParam ics::Eeprom::get(EepParam param) const {\n try {\n...
c++
chosen
[ { "from": "system", "value": "Implement util functions to read stage2\n" }, { "from": "human", "value": "#ifndef NULL\n#ifdef __cplusplus\n#define NULL 0\n#else\n#define NULL ((void *)0)\n#endif\n#endif\n\nextern \"C\" void KMain() {\n\t__asm {\n\t\tmov\tah, 0h\n\t\tint\t010h\n\t}\n}\n" }, {...
c++
chosen
[ { "from": "system", "value": "[TSan] Make this test more portable\n\ngit-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@205300 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib0.so\n...
c++
chosen
[ { "from": "system", "value": "Use filesystem library path concatenation\n" }, { "from": "human", "value": "#include \"extract.hpp\"\n#include \"../huffman/decompress.hpp\"\n\n#include<fstream>\n#include<vector>\n#include<experimental/filesystem>\n\nvoid extract(const char* in_file, const char* o...
c++
chosen
[ { "from": "system", "value": "Add a std::string reverse test\n" }, { "from": "human", "value": "#include <algorithm>\n#include <gtest/gtest.h>\n\nTEST(array, sorting) {\n int foo[3] = {1, 3, 2};\n\n std::sort(foo, foo + 3);\n\n EXPECT_EQ(1, foo[0]);\n EXPECT_EQ(2, foo[1]);\n EXPEC...
c++
chosen
[ { "from": "system", "value": "Refactor word decoder unit tests\n\n" }, { "from": "human", "value": "#include <catch.hpp>\n\n#include \"WordDecoder.hpp\"\n\nnamespace {\n\nusing namespace Core8;\n\nTEST_CASE(\"Decode X from pattern vXvv\", \"[decoder]\") {\n REQUIRE(WordDecoder::readX(0x0F00) ==...
c++
chosen
[ { "from": "system", "value": "Disable middle click close for unclosable tabs\n" }, { "from": "human", "value": "#include <QTabBar>\n#include \"qclosabletabwidget.h\"\n\n\nQClosableTabWidget::QClosableTabWidget(QWidget *parent)\n\t: QTabWidget(parent)\n{\n\ttabBar()->installEventFilter(this);\n}\...
c++
chosen
[ { "from": "system", "value": "Remove some headers which are not frequently used\n" }, { "from": "human", "value": "# include <algorithm>\n# include <iostream>\n# include <iterator>\n# include <vector>\n# include <string>\n# include <queue>\n# include <stack>\n# include <cmath>\n# include <set>\n...
c++
chosen
[ { "from": "system", "value": "Fix if condition from initialization of joysticks.\n" }, { "from": "human", "value": "#include<iostream>\n#include\"InputHandler.h\"\n#include\"Game.h\"\n\nInputHandler *InputHandler::instance = 0;\n\nvoid InputHandler::initialiseJoysticks()\n{\n if (SDL_WasInit(...
c++
chosen
[ { "from": "system", "value": "Add regression test for PR41576 (which is already fixed in trunk,\nperhaps by r361300).\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@364340 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clang_cc1 -std=c++2a -verify %s\n/...
c++
chosen
[ { "from": "system", "value": "Fix for issue that would cause an occasional segmentation fault on Linux if already in an error state in throwV8Exception. va_list must be reinitialized after each use.\n" }, { "from": "human", "value": "#include \"edge_common.h\"\n\nv8::Local<Value> throwV8Excepti...
c++
chosen
[ { "from": "system", "value": "Remove entry from map if vector<Tuple> empty in ForgetThread::processForget()\n" }, { "from": "human", "value": "#include \"forgetthread.h\"\n\nvoid ForgetThread::launch(){\n //Aliases\n transactionHistory = transactionHistoryPtr[thread];\n tupleContent = t...
c++
chosen
[ { "from": "system", "value": "Fix building for pre-C++14 standards\n\nSkip `floaxie` test in this case, as it requires at least C++14.\n" }, { "from": "human", "value": "#include \"test.h\"\n#include \"floaxie/ftoa.h\"\n\nvoid dtoa_floaxie(double v, char* buffer)\n{\n\tfloaxie::ftoa(v, buffer);\...
c++
chosen
[ { "from": "system", "value": "IMP-241: Allow configuraiton of state-store log dir / name. Also add debug webserver to state-store.\n" }, { "from": "human", "value": "// Copyright (c) 2012 Cloudera, Inc. All rights reserved.\n//\n// This file contains the main() function for the state store proce...
c++
chosen
[ { "from": "system", "value": "Add test to retrieve a table from database.\n" }, { "from": "human", "value": "#include \"ReQL-ast-test.hpp\"\n\nclass BlankTest : public ASTTest {\npublic:\n BlankTest() : ASTTest() {\n }\n\n void setup() {\n setName(\"BlankTest\");\n }\n\n void run() {\n ...
c++
chosen
[ { "from": "system", "value": "Fix reference to unavailable nodes\n" }, { "from": "human", "value": "#include<iostream>\n\nusing namespace std;\n\nclass node{\n\tpublic:\n\t\tint data;\n\t\tnode *left, *right;\n\n\t\tnode(){}\n\n\t\tnode(int d) {\n\t\t\tdata=d;\n\t\t\tleft=NULL;\n\t\t\tright=NULL...
c++
chosen
[ { "from": "system", "value": "Clear database between each test & add a test for file insertion\n" }, { "from": "human", "value": "#include \"gtest/gtest.h\"\n\n#include \"IMediaLibrary.h\"\n\nTEST( MediaLibary, Init )\n{\n IMediaLibrary* ml = MediaLibraryFactory::create();\n ASSERT_TRUE( m...
c++
chosen
[ { "from": "system", "value": "Use cv::VideoCapture properties to get width and height.\n" }, { "from": "human", "value": "#include \"WebcamDataProvider.h\"\n\nnamespace yarrar\n{\n\nWebcamDataProvider::WebcamDataProvider(const json11::Json& config)\n : DataProvider(config)\n , m_videoCaptu...
c++
chosen
[ { "from": "system", "value": "Revert \"Ajout de 2 methode de test Dictionnaire (reste incomplet)\"\n\nThis reverts commit 5dc69e06be3c3ffd37437c1853df0078b95e0ca0.\n" }, { "from": "human", "value": "#include \"stdafx.h\"\n#include \"CppUnitTest.h\"\n#include \"../DNAnalyzerServer/Dictionnaire.h\...
c++
chosen
[ { "from": "system", "value": "Make apps/pe accept problem number as argument\n" }, { "from": "human", "value": "#include <iostream>\nusing std::cout;\nusing std::endl;\n\n#include \"problems/Factory.h\"\n#include \"util/Timer.h\"\nusing util::Timer;\n\nint main(int argc, char **argv) {\n\n auto...
c++
chosen
[ { "from": "system", "value": "Remove header from notebook tree\n" }, { "from": "human", "value": "#include \"notebooktree.h\"\n#include \"treenotebookitem.h\"\n#include \"treenotebookpageitem.h\"\n#include \"notebookexception.h\"\n\nNotebookTree::NotebookTree(QWidget* parent) :\n QTreeWidget(...
c++
chosen
[ { "from": "system", "value": "Fix bug in name demangling.\n" }, { "from": "human", "value": "// Copyright (c) 2015 Andrew Sutton\n// All rights reserved\n\n#include \"lingo/utility.hpp\"\n\n#include <cstdlib>\n#include <cxxabi.h>\n\nnamespace lingo\n{\n\nString\ntype_str(std::type_info const& t)...
c++
chosen
[ { "from": "system", "value": "Make sure skin has OSD before initializing it\n" }, { "from": "human", "value": "#include \"EjectOSD.h\"\n\n#include <Dbt.h>\n\n#include \"..\\Monitor.h\"\n#include \"..\\Skin.h\"\n\nEjectOSD::EjectOSD() :\nOSD(L\"3RVX-EjectDispatcher\") {\n _mWnd = new MeterWnd(...
c++
chosen
[ { "from": "system", "value": "Fix build error, forgot to replace a \"slots\" to \"Q_SLOTS\"\n" }, { "from": "human", "value": "#include <QtCore/QCoreApplication>\n#include <QtCore/QDebug>\n#include <QtCore/QTimer>\n\n#include <QtDBus/QtDBus>\n\n#include <QtTest/QtTest>\n\n#include <tests/lib/tes...
c++
chosen
[ { "from": "system", "value": "Use a different define to decide which CRC library to use.\n\nChange 8569018 used a #ifdef to conditionally decide which external\nlibrary to use for Crc calculation. It used OS_CHROMIUMOS to tell\nif the build was targetted at Chromium OS.\n\nHowever, it broke Chromium OS buil...
c++
chosen
[ { "from": "system", "value": "Remove debugging aids from this test and fix its expectations.\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@279034 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: rm -rf %t\n// RUN: %clang_cc1 -fsyntax-only -verify %s -fm...
c++
chosen
[ { "from": "system", "value": "Fix class name for SinogramCreatorMC\n" }, { "from": "human", "value": "/**\n * @copyright Copyright 2017 The J-PET Framework Authors. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except ...
c++
chosen
[ { "from": "system", "value": "Update fuzz driver to use new API\n" }, { "from": "human", "value": "#include <string.h>\n#include \"tree_sitter/runtime.h\"\n\nvoid test_log(void *payload, TSLogType type, const char *string) { }\n\nTSLogger logger = {\n .log = test_log,\n};\n\nextern \"C\" const ...
c++
chosen
[ { "from": "system", "value": "Add system command for holding command console\n" }, { "from": "human", "value": "/*\n * Podrios.cpp\n *\n * Created on: 2014年10月23日\n * Author: nemo\n */\n\n#include <iostream>\n\nusing namespace std;\n\n\nint main()\n{\n\tcout << \"Show Message.\" << endl;\n...
c++
chosen
[ { "from": "system", "value": "Enable the new dialog style by default; etc.\n\nEnables the new dialog and button styles by default.\nPlease file any appearance/behavior issues against msw/wittman.\n(disable: about:flags \"New Dialog Style\" or --disable-new-dialog-style)\n\nMike Wittman and I are mid-audit o...
c++
chosen
[ { "from": "system", "value": "Disable shared memory test for OpenCL until bugginess is resolved.\n\n\nFormer-commit-id: a9b27252698ffb23d91dd013ca3470237f2b3f69" }, { "from": "human", "value": "#include <stdio.h>\n#include <Halide.h>\n\nusing namespace Halide;\n\nint main(int argc, char **argv) ...
c++
chosen
[ { "from": "system", "value": "Use strerror_r instead of strerror_s for GCC/Linux\n" }, { "from": "human", "value": "#include \"Precompiled.hpp\"\n#include \"Error.hpp\"\n#include \"SmartPtr.hpp\"\n#include \"String.hpp\"\n\nstd::string errno_string(int err)\n{\n char buffer[1024];\n if (!s...
c++
chosen
[ { "from": "system", "value": "Add an item per port of each selected node\n" }, { "from": "human", "value": "#include \"properties.h\"\n\n#include <QHeaderView>\n\nProperties::Properties(QWidget* parent) : QTreeWidget(parent) {\n\tsetRootIsDecorated(false);\n\n\theaderItem()->setText(0, \"item\")...
c++
chosen
[ { "from": "system", "value": "Fix include, add namespace and copyright\n" }, { "from": "human", "value": "\n#include <openssl/eng_ossl.h>\n\n/**\n* Look for an OpenSSL-suported stream cipher (ARC4)\n*/\nStreamCipher*\nOpenSSL_Engine::find_stream_cipher(const std::string& algo_spec) const\n {\n...
c++
chosen
[ { "from": "system", "value": "Enhance debug info namespace test to check for context/scope reference\n\nThe #line directive is mostly for backend testing (keeping these files matching\nshould simplify maintenance somewhat) though the corresponding backend test\nimprovement/update doesn't verify the file inf...
c++
chosen
[ { "from": "system", "value": "GLFW: Fix the native part of Util.OpenUrl\n" }, { "from": "human", "value": "#include <ctime>\r\n\r\nclass util {\r\npublic:\r\n int static GetTimestamp() {\r\n return std::time(0);\r\n }\r\n\r\n void static OpenUrl(String url) {\r\n system(\"...
c++
chosen
[ { "from": "system", "value": "Use uint32_t as return type.\n" }, { "from": "human", "value": "#include \"main.h\"\n#include \"EventHandler.h\"\n#include \"PythonModule.h\"\n\nextern \"C\" EXPORT unsigned int VcmpPluginInit(PluginFuncs* pluginFunctions, PluginCallbacks* pluginCallbacks, PluginInf...
c++
chosen
[ { "from": "system", "value": "Break if task file don`t exists\n" }, { "from": "human", "value": "#include \"task_simple.h\"\n#include \"factory_simple.h\"\n#include \"on_tick_simple.h\"\n\n#include <fstream>\n\nusing namespace std;\n\nint main(int argc, char *argv[])\n{\n const string task_fn...
c++
chosen
[ { "from": "system", "value": "Change return value to EXIT_SUCCESS\n" }, { "from": "human", "value": "//\n// main.cpp\n//\n// Created on: 17 Mar 2015\n// Author: Guotai Wang\n//\n// Copyright (c) 2014-2016 University College London, United Kingdom. All rights reserved.\n// http://cmictig.cs...
c++
chosen
[ { "from": "system", "value": "Use preprocessor 'defined' instead of relying on the preprocessor doing this automatically.\n\n\ngit-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@6971 0785d39b-7218-0410-832d-ea1e28bc413d\n" }, { "from": "human", "value": "//---------------------------- job_ide...
c++
chosen
[ { "from": "system", "value": "Make sure to convert path to utf8 for json output of folder name.\n" }, { "from": "human", "value": "/*\n Copyright: © 2018 SIL International.\n Description: Internal keyboard class and adaptor class for the API.\n Create Date: 2 Oct 2018\n Authors: Ti...
c++
chosen
[ { "from": "system", "value": "Add timestamp field to agent logs\n" }, { "from": "human", "value": "#include <iostream>\n#include <boost/log/common.hpp>\n#include <boost/log/expressions.hpp>\n#include <boost/log/utility/setup/file.hpp>\n#include <boost/log/trivial.hpp>\n\n#ifdef HAVE_CONFIG_H\n#i...
c++
chosen
[ { "from": "system", "value": "Add NODE_ADDRESS value to slave_node program\n" }, { "from": "human", "value": "/*----------------------------------------*/\n// Test receiving messages from master\n//\n// This receives a message from master (command 0x01),\n// which tells it to turn an LED on or o...
c++
chosen
[ { "from": "system", "value": "[MPLY-8929] Fix for generation of QR code when google analytics referrer token is unset. Buddy: Jonty\n" }, { "from": "human", "value": "// Copyright eeGeo Ltd (2012-2015), All Rights Reserved\n\n#include \"WatermarkDataFactory.h\"\n\n\nnamespace ExampleApp\n{\n ...
c++
chosen
[ { "from": "system", "value": "Make apps/pe only run a problem once\n" }, { "from": "human", "value": "#include <iostream>\nusing std::cout;\nusing std::endl;\n\n#include \"problems/Factory.h\"\n#include \"util/Timer.h\"\nusing util::Timer;\n\nint main(int argc, char **argv) {\n\n auto problem =...
c++
chosen