conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Print REPL output on std::cerr instead of cout.\n" }, { "from": "human", "value": "#include <iostream>\n\n#include \"cons.h\"\n#include \"error.h\"\n#include \"eval.h\"\n#include \"init.h\"\n#include \"load.h\"\n#include \"reader.h\"\n#include \"utils.h\"\n\nnamespa...
c++
chosen
[ { "from": "system", "value": "Use CRLF in requests instead of just LF\n" }, { "from": "human", "value": "#include \"RequestParser.h\"\n#include <sstream>\n#include <vector>\n\nstd::vector<std::string> ApiMock::RequestParser::projectToCollection(std::string const& request) {\n\tstd::vector<std::s...
c++
chosen
[ { "from": "system", "value": "Address Sanitation for the win: found memory bug.\n" }, { "from": "human", "value": "#include <iostream>\n\n#include \"rapidcheck/detail/NonRandomData.h\"\n\nnamespace rc {\nRandomData::RandomData(const uint8_t *Data, size_t Size) {\n std::cout << Data << std::endl...
c++
chosen
[ { "from": "system", "value": "Add basic thresholding of green markers\n" }, { "from": "human", "value": "#include <iostream>\n\nusing namespace std;\n\nint main()\n{\n cout << \"Hello World!\" << endl;\n return 0;\n}\n\n" }, { "from": "gpt", "value": "#include <opencv2/core/cor...
c++
chosen
[ { "from": "system", "value": "Improve comments in the external interrupt pin change example\n" }, { "from": "human", "value": "#include \"board.h\"\n#include <aery32/gpio.h>\n#include <aery32/delay.h>\n#include <aery32/intc.h>\n\nusing namespace aery;\n\nvoid isrhandler_group2(void)\n{\n\tgpio_t...
c++
chosen
[ { "from": "system", "value": "fix: Add missing code that assigns new owner\n\n" }, { "from": "human", "value": "// This code is based on Sabberstone project.\n// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva\n// RosettaStone is hearthstone simulator using C++ with reinforcement...
c++
chosen
[ { "from": "system", "value": ":art: Print firmware name and version at boot\n" }, { "from": "human", "value": "#include \"Boot.hpp\"\n\nusing namespace HomieInternals;\n\nBoot::Boot(const char* name)\n: _name(name) {\n}\n\n\nvoid Boot::setup() {\n if (Interface::get().led.enabled) {\n pinMod...
c++
chosen
[ { "from": "system", "value": "Convert Sorted Array to Binary Search Tree" }, { "from": "human", "value": "/**\n * Definition for a binary tree node.\n * struct TreeNode {\n * int val;\n * TreeNode *left;\n * TreeNode *right;\n * TreeNode(int x) : val(x), left(NULL), right(NULL) {...
c++
chosen
[ { "from": "system", "value": "Use a for each loop\n" }, { "from": "human", "value": "#include \"util.h\"\n\n#include <sstream>\n#include <vector>\n\n\nHeader cpr::util::parseHeader(std::string headers) {\n Header header;\n std::vector<std::string> lines;\n std::istringstream stream(head...
c++
chosen
[ { "from": "system", "value": "Fix a compilation error on Win32\n" }, { "from": "human", "value": "#include \"GUI.hpp\"\n\n#if __APPLE__\n#import <IOKit/pwr_mgt/IOPMLib.h>\n#elif _WIN32\n#include <Windows.h>\n#pragma comment(lib, \"user32.lib\")\n#endif\n\nnamespace Slic3r { namespace GUI {\n\nIO...
c++
chosen
[ { "from": "system", "value": "Add fibonanci_loop method & Fix bug\n\n- Add fibonanci_loop method\r\n- Fix bug of F(0) =0" }, { "from": "human", "value": "#include <cstdlib>\n#include <iostream>\nusing namespace std;\n\nint const n = 50;\nlong long save[n + 1];\n\nlong long fibonanci(int n){\n\n\...
c++
chosen
[ { "from": "system", "value": "Prepare to add archive and extract\n" }, { "from": "human", "value": "#include \"compress.hpp\"\n#include \"decompress.hpp\"\n\n#include<iostream>\n#include<fstream>\n\nvoid printUsage() {\n\tstd::cout << \"Give option\\n\";\n}\n\nconst std::string COMPRESS_COMMAND ...
c++
chosen
[ { "from": "system", "value": "Set OpenGL ES version to 2 on Android\n" }, { "from": "human", "value": "// Copyright (C) 2016 Elviss Strazdins\n// This file is part of the Ouzel engine.\n\n#include \"WindowAndroid.h\"\n\nnamespace ouzel\n{\n WindowAndroid::WindowAndroid(const Size2& pSize, boo...
c++
chosen
[ { "from": "system", "value": "Add support for halo's to TextSymbolizer().\n\n\n" }, { "from": "human", "value": "/* This file is part of python_mapnik (c++/python mapping toolkit)\n * Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon\n *\n * Mapnik is free software; you can redistribute it ...
c++
chosen
[ { "from": "system", "value": "Test to see if AppVeyor styles work when not explicitly set\n" }, { "from": "human", "value": "#include \"mainwindow.h\"\n#include <QApplication>\n#include <QStyleFactory> // TODO\n\nint main(int argc, char *argv[])\n{\n using namespace HedgeEdit;\n QApplicati...
c++
chosen
[ { "from": "system", "value": "Use correct header and namespace for isfinite\n" }, { "from": "human", "value": "#include \"CalculatorBase.h\"\n#include <algorithm>\n#include <numeric>\n#include \"common.h\"\n\nnamespace tilegen\n{\nnamespace alpha\n{\n\nCalculatorBase::CalculatorBase():\n mAlp...
c++
chosen
[ { "from": "system", "value": "Fix linux cooked header ether type\n" }, { "from": "human", "value": "#include <netinet/ether.h>\n#include <netinet/ip.h>\n#include \"sll.h\"\n#include \"IPv4Processor.h\"\n#include \"LinuxCookedProcessor.h\"\n\n\nvoid LinuxCookedProcessor::process(const struct pcap...
c++
chosen
[ { "from": "system", "value": "Fix invalid write in RenderViewHostObserver.\n\nTBR=avi\nReview URL: http://codereview.chromium.org/6813065\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@81023 0039d316-1c4b-4281-b951-d872f2087c98\n" }, { "from": "human", "value": "// Copyright (c) 2011 Th...
c++
chosen
[ { "from": "system", "value": "Switch create window message from debug to info\n" }, { "from": "human", "value": "// Copyright 2016 Zheng Xian Qiu\n\n#include \"framework.h\"\n\nWindow::Window() {\n}\n\n// Display Information\n\nint Window::DISPLAY_INDEX = 0;\nbool Window::displayModeLoaded = fal...
c++
chosen
[ { "from": "system", "value": "Improve advice for attaching the debugger\n\nChange-Id: I6ca5697a8b672a1e20bcb7999cf4d9ba544f9558\nReviewed-on: https://swiftshader-review.googlesource.com/3117\nReviewed-by: Nicolas Capens <0612353e1fcebbfd4b302d9337447ca0cdfa9122@google.com>\nTested-by: Greg Hartman <1491e78d...
c++
chosen
[ { "from": "system", "value": "Make geoclue-support more robust to missing master, second attempt\n\nsvn path=/branches/marble/marble-gsoc-2009/; revision=983224\n" }, { "from": "human", "value": "#include \"MasterClient_p.h\"\n\n#include <QtCore/QString>\n#include <QtDBus/QDBusMessage>\n#include...
c++
chosen
[ { "from": "system", "value": "Update Provider to Manager from clean branch\n" }, { "from": "human", "value": "#include \"Device.h\"\n#include \"../../Drivers/SPIDisplay/SPIDisplay.h\"\n#include \"../../Drivers/DevicesInterop/GHIElectronics_TinyCLR_Devices.h\"\n#include \"../../Drivers/DevicesInt...
c++
chosen
[ { "from": "system", "value": "Remove extra stuff from simplest example\n" }, { "from": "human", "value": "#include \"helloworld.h\"\n\n#include <QCoreApplication>\n#include <QDebug>\n\n#include <qhttpserver.h>\n#include <qhttprequest.h>\n#include <qhttpresponse.h>\n\nHello::Hello()\n{\n QHttp...
c++
chosen
[ { "from": "system", "value": "Make test 64 bit safe.\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@90452 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s\n\nstruct A;\ntypedef int A::*param_t;\nstruct {\n cons...
c++
chosen
[ { "from": "system", "value": "Add triple to new test to try to pacify bots\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@369474 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clang_cc1 -emit-llvm %s -gcodeview -debug-info-kind=limited -o - | FileCheck ...
c++
chosen
[ { "from": "system", "value": "Call state pause method when not replacing state.\n" }, { "from": "human", "value": "#include \"state_machine.hpp\"\n\nnamespace kg {\n void StateMachine::startState(StateRef newState, bool isReplacing) {\n if (isReplacing && !_states.empty()) {\n ...
c++
chosen
[ { "from": "system", "value": "Add Media Router Mojo service to the renderer service registry.\nGuard access to the Media Router service using a manifest permission.\n\nBUG=464205\nR=imcheng\n\nReview URL: https://codereview.chromium.org/1164713003\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f27...
c++
chosen
[ { "from": "system", "value": "Fix test failure with GCC 4.9\n\ngit-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@302182 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "//===----------------------------------------------------------------------===//\n//\n// ...
c++
chosen
[ { "from": "system", "value": "Revert 273648 \"skia: Use medium filter quality in PaintSimplifier.\"\n\n> skia: Use medium filter quality in PaintSimplifier.\n> \n> Preventing all bitmap filtering in the paint simplifier is a bad\n> idea as it's very cache unfriendly when down-sampling due to\n> requiring bo...
c++
chosen
[ { "from": "system", "value": "Work around for gfx interop resource cleanup in cuda backend\n" }, { "from": "human", "value": "/*******************************************************\n * Copyright (c) 2016, ArrayFire\n * All rights reserved.\n *\n * This file is distributed under 3-clause BSD li...
c++
chosen
[ { "from": "system", "value": "Fix a bug found by @rperrot\n" }, { "from": "human", "value": "\n\n#include \"SimpleString.h\"\n#include <string.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nSimpleString::SimpleString ()\n: buffer(new char [1])\n{\n\tbuffer [0] = '\\0';\n}\n\n\nSimpleString::Simp...
c++
chosen
[ { "from": "system", "value": "Replace missed instance of TEST_CASE with TEST_SUITE.\n" }, { "from": "human", "value": "// Copyright 2017 The CRC32C Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file. See the AUTH...
c++
chosen
[ { "from": "system", "value": "Include main hdf5 header to successful build" }, { "from": "human", "value": "//============================================================================\n// Name : benchpress.cpp\n// Author : Ulrik Kofoed Pedersen\n// Version :\n// Copyright : ...
c++
chosen
[ { "from": "system", "value": "FIx GCC was unable to compile in Linux\n\nGCC is a case sensitive program in Linux and a #include directive was incorrectly typed.\n\nPrevious New\npaddle.h -> Paddle.h\n" }, { "from": "human", "value": "#include \"paddle.h\"\n\nint Paddle::nu...
c++
chosen
[ { "from": "system", "value": "Clean up some namespace things\n" }, { "from": "human", "value": "#include <stdio.h>\n\n#include \"mutex.h\"\n#include \"thread.h\"\n#include \"window.h\"\n\nusing System::Window;\n\nclass DisplayThreadEntry : public System::ThreadEntry {\npublic:\n\tvirtual ~Displa...
c++
chosen
[ { "from": "system", "value": "Add code to destroy window upon quit\n" }, { "from": "human", "value": "#include <GL/glew.h>\n#include <SDL2/SDL.h>\n\nint main(void)\n{\n int flags = SDL_WINDOW_OPENGL | SDL_RENDERER_PRESENTVSYNC;\n\n SDL_Init(SDL_INIT_EVERYTHING);\n auto window = SDL_CreateWind...
c++
chosen
[ { "from": "system", "value": "Test Main: Set up logging\n\nThis will prevent segfaults that would otherwise happen in tests.\n" }, { "from": "human", "value": "#include <iostream>\n#include \"gtest/gtest.h\"\n\nint main(int argc, char* argv[])\n{\n ::testing::InitGoogleTest(&argc, argv);\n ...
c++
chosen
[ { "from": "system", "value": "Remove extra blank line and include\n" }, { "from": "human", "value": "#include <glog/logging.h>\n#include <atom/atom.h>\n#include <core.h>\n\n\nint main(int argc, char **argv)\n{\n atom_initialize();\n {\n ATOM_GC;\n\n atom_attach_thread();\n\n start_cor...
c++
chosen
[ { "from": "system", "value": "Consolidate creation of storage::spi::Bucket in unit tests.\n" }, { "from": "human", "value": "// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\n\n#include \"bucketfactory.h\"\n\nusing document::B...
c++
chosen
[ { "from": "system", "value": "Create a shared_ptr from a unique_ptr\n" }, { "from": "human", "value": "#include <cstdint>\r\n#include <memory>\r\n#include <iostream>\r\n\r\nclass Box {\r\npublic:\r\n Box(int x) : x_(x) {}\r\n virtual ~Box() = default;\r\n void Print() {\r\n std::...
c++
chosen
[ { "from": "system", "value": "[TestUnits] Use ionCore alternative to system(\"PAUSE\")\n" }, { "from": "human", "value": "\r\n#define CATCH_CONFIG_RUNNER\r\n#include <catch.hpp>\r\n\r\n\r\nint main(int argc, char * const argv[])\r\n{\r\n\tint result = Catch::Session().run(argc, argv);\r\n\r\n#if...
c++
chosen
[ { "from": "system", "value": "Use var for enabling or disabling sound\n" }, { "from": "human", "value": "#include <SFML/Graphics.hpp>\n//#include \"libs/GUI-SFML/include/GUI-SFML.hpp\"\n#include <iostream>\n#include \"Game.hpp\"\n\nint main()\n{\n sf::RenderWindow window(sf::VideoMode(800, 60...
c++
chosen
[ { "from": "system", "value": "Use C++ string instead of C string\n" }, { "from": "human", "value": "#include <iostream>\n#include <opencv2/opencv.hpp>\n\n#include \"clicker.hpp\"\n\nusing namespace cv;\nusing namespace std;\n\nconst char* window_title = \"Join-Robockets Clientside Software\";\n\...
c++
chosen
[ { "from": "system", "value": "Fix a memory leak in FPDFPageFuncEmbeddertest.\n\nR=dsinclair@chromium.org\n\nReview URL: https://codereview.chromium.org/1514283002 .\n" }, { "from": "human", "value": "// Copyright 2015 PDFium Authors. All rights reserved.\n// Use of this source code is governed b...
c++
chosen
[ { "from": "system", "value": "Fix to match the enum definitions in C and nodejs for indextypes.\n" }, { "from": "human", "value": "/*******************************************************************************\n * Copyright 2013-2014 Aerospike, Inc.\n *\n * Licensed under the Apache License, V...
c++
chosen
[ { "from": "system", "value": "Use vector instead of list\n" }, { "from": "human", "value": "#include \"Controller.h\"\n#include \"JobHandler.h\"\n#include \"JobQueue.h\"\n#include \"Sensor.h\"\n#include <list>\n\nstd::list<Sensor> sensors;\nstd::list<Controller> controllers;\nstd::list<JobHandle...
c++
chosen
[ { "from": "system", "value": "Fix missing write call in SubWorldMsg" }, { "from": "human", "value": "/******************************************************************************\n * This file is part of dirtsand. *\n * ...
c++
chosen
[ { "from": "system", "value": "Use QGraphicsWebView instead of QWebView\n\nAs suggested by http://trac.webkit.org/wiki/QtWebKitTiling\n\nWorks on Qt 4.6 and up.\n" }, { "from": "human", "value": "#include <QtGui/QApplication>\n#include <QtCore/QProcess>\n#include <QtWebKit/QWebView>\n\n#if define...
c++
chosen
[ { "from": "system", "value": "Remove second argument from VideoCapture_Reading perf test\n" }, { "from": "human", "value": "#include \"perf_precomp.hpp\"\n\nusing namespace std;\nusing namespace cv;\nusing namespace perf;\nusing std::tr1::make_tuple;\nusing std::tr1::get;\n\ntypedef std::tr1::tu...
c++
chosen
[ { "from": "system", "value": "Allow for struct padding in test\n\n\nFormer-commit-id: 5beecba366bb0e643172aeace0c57cde4672956a" }, { "from": "human", "value": "#include <stdio.h>\n#include \"Halide.h\"\n\n#define CHECK(f, s32, s64) \\\n static_assert(offsetof(buffer_t, f) == (sizeof(void*) ==...
c++
chosen
[ { "from": "system", "value": "Rename to match an LLVM change\n\ngit-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@329841 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//\n//\n// ...
c++
chosen
[ { "from": "system", "value": "[profiling] Make a test more explicit. NFC.\n\nThe cxx-structors.cpp test checks that some instrumentation doesn't\nappear, but it should be more explicit about which instrumentation it\nactually expects to appear.\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@295532 ...
c++
chosen
[ { "from": "system", "value": "Work around a trivial problem with the hp compiler.\n\n\ngit-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@9540 0785d39b-7218-0410-832d-ea1e28bc413d\n" }, { "from": "human", "value": "//----------------------------------------------------------------\n// $Id$\...
c++
chosen
[ { "from": "system", "value": "Rework and fix Timer ISR size optimization.\n" }, { "from": "human", "value": "/*\n * Timer compilation example.\n * TODO\n */\n\n#include <fastarduino/FastIO.hh>\n#include <fastarduino/Timer.hh>\n\nconstexpr const Board::Timer TIMER = Board::Timer::TIMER1;\n// Defi...
c++
chosen
[ { "from": "system", "value": "Print Preview: Fix typo from r78639.\n\nBUG=76707\nTEST=page count initialized correctly in print preview.\nR=arv@chromium.org\nReview URL: http://codereview.chromium.org/6688041\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@78747 0039d316-1c4b-4281-b951-d872f2087c98\...
c++
chosen
[ { "from": "system", "value": "Replace the alpha calculator with winner-takes-all\n\nBoth will have to become instances of a base class or function type in\nfuture.\n" }, { "from": "human", "value": "#include \"TilePartitionerBase.h\"\n\nvoid TilePartitionerBase::applyWeights(const std::vector<fl...
c++
chosen
[ { "from": "system", "value": "Replace manual locking by ScopedLock\n\nChange-Id: Ice9efbc1d0445b9251ae411c344290e85e73ceac\n" }, { "from": "human", "value": "#include \"capu/util/ConsoleLogAppender.h\"\n#include \"capu/util/LogMessage.h\"\n#include \"capu/os/Console.h\"\n#include \"capu/os/Time....
c++
chosen
[ { "from": "system", "value": "Correct wrong type of variables 'number' and 'x' (int->double)\n" }, { "from": "human", "value": "#include<cmath>\n#include<iostream>\n\nusing namespace std;\n\nbool isPrimeBruteForce(int x)\n{\n\tif (x < 2)\n\t\treturn false;\n\tfloat sqroot_x = sqrt(x);\n\tfor(int...
c++
chosen
[ { "from": "system", "value": "Add missing triple to unit test.\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@181465 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -Wno-unreachable-code -Werror -emit-llvm -o - %...
c++
chosen
[ { "from": "system", "value": "Fix bug where uninitialized index buffers still wouldn't work after initialization\n" }, { "from": "human", "value": "\r\n#include \"CIndexBuffer.h\"\r\n\r\n#include <glad/glad.h>\r\n\r\n\r\nnamespace ion\r\n{\r\n\tnamespace Graphics\r\n\t{\r\n\t\tnamespace GL\r\n\t...
c++
chosen
[ { "from": "system", "value": "Put nodes into middle of scene to improve zooming\n" }, { "from": "human", "value": "#include \"MainWindow.h\"\n#include \"ui_MainWindow.h\"\n\n#include \"CuteNode.h\"\n#include \"NodeScene.h\"\n\n\nMainWindow::MainWindow(QWidget* parent)\n : QMainWindow(parent)\...
c++
chosen
[ { "from": "system", "value": "Use new website macro instead\n" }, { "from": "human", "value": "#include \"command.h\"\n#include \"../CommandHandler.h\"\n#include \"../option.h\"\n\n/* full name of the command */\n_CMDNAME(\"manual\");\n/* description of the command */\n_CMDDESCR(\"view the lynxb...
c++
chosen
[ { "from": "system", "value": "Use InMemory TagDatabase by default if none exists\n" }, { "from": "human", "value": "#include \"tag-database-factory.h\"\n#include \"tag-database-in-memory.h\"\n#include \"tag-database-sqlite.h\"\n#include <QFile>\n\n\nTagDatabase *TagDatabaseFactory::Create(QStrin...
c++
chosen
[ { "from": "system", "value": "Fix memory leak in float literal parsing\nIssue=93\n\nContributed by Benoit Jacob\n\ngit-svn-id: 947ae547afacb859f3991e003b9d6feb04be57d7@504 736b8ea6-26fd-11df-bfd4-992fa37f6226\n" }, { "from": "human", "value": "//\n// Copyright (c) 2010 The ANGLE Project Authors....
c++
chosen
[ { "from": "system", "value": "[Sync] Fix EncryptString call that should be a DecryptString call\n\nUnit tests to catch this will come in another CL.\n\nBUG=116607\nTEST=\n\nReview URL: https://chromiumcodereview.appspot.com/9585025\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@124772 0039d316-1c4b...
c++
chosen
[ { "from": "system", "value": "Fix the CanvasKit viewer build\n\nChange-Id: I82e28478bd9c52f5633e74472ab2b256961cdf45\nReviewed-on: https://skia-review.googlesource.com/c/skia/+/281050\nReviewed-by: Kevin Lubick <7cdab2cfab351f23814786ba39716e90eed69047@google.com>\n" }, { "from": "human", "value...
c++
chosen
[ { "from": "system", "value": "Make gui window a bit more responsive\n" }, { "from": "human", "value": "#include \"ofMain.h\"\n#include \"ofApp.h\"\n#include \"ofAppGLFWWindow.h\"\n\nint main() { \n ofGLFWWindowSettings settings;\n settings.width = 1280;\n settings.height = 720;\n set...
c++
chosen
[ { "from": "system", "value": "Append a size_t to a string in the correct way, using std::to_string.\n" }, { "from": "human", "value": "#include \"../kontsevich_graph_series.hpp\"\n#include <ginac/ginac.h>\n#include <iostream>\nusing namespace std;\nusing namespace GiNaC;\n\nsize_t order = 2;\n\n...
c++
chosen
[ { "from": "system", "value": "Fix license in settings example.\n\nRevBy: Jon Nordby\n" }, { "from": "human", "value": "/* * This file is part of meego-im-framework *\n *\n * Copyright (C) 2012 Mattia Barbon <mattia@develer.com>\n *\n * This library is free software; you can redistribute it and/o...
c++
chosen
[ { "from": "system", "value": "Use random for software rendering demo\n" }, { "from": "human", "value": "#define FPL_AUTO_NAMESPACE\n#include <final_platform_layer.hpp>\n\nint main(int argc, char **args) {\n\tSettings settings = DefaultSettings();\n\tCopyAnsiString(\"Software Rendering Example\",...
c++
chosen
[ { "from": "system", "value": "Remove unneeded include which is breaking build.\n\n\ngit-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2694 2bbb7eff-a529-9590-31e7-b0007b416f81\n" }, { "from": "human", "value": "/*\n * Copyright 2011 Google Inc.\n *\n * Use of this source code is governed by a...
c++
chosen
[ { "from": "system", "value": "Remove duplicate brush color set in glyph paint cycle box.\n" }, { "from": "human", "value": "#include \"side_pane.hpp\"\n\n#include <cppurses/painter/color.hpp>\n#include <cppurses/painter/glyph.hpp>\n#include <cppurses/widget/widgets/text_display.hpp>\n\nusing nam...
c++
chosen
[ { "from": "system", "value": "Fix an ASAN failure in //third_party/quic/core:tls_server_handshaker_test by always setting *cert_matched_sni in GetCertChain().\n\nPiperOrigin-RevId: 395802856\n" }, { "from": "human", "value": "// Copyright (c) 2017 The Chromium Authors. All rights reserved.\n// U...
c++
chosen
[ { "from": "system", "value": "Add tests for row vector and array\n" }, { "from": "human", "value": "#include <test/unit/math/test_ad.hpp>\n\nTEST(MathMixMatFun, reverse) {\n auto f = [](const auto& x) { return stan::math::reverse(x); };\n\n // 0 x 0\n Eigen::VectorXd x0(0);\n stan::test::exp...
c++
chosen
[ { "from": "system", "value": "Revert \"Ajout de methode de test (incomplete) de Dictionnaire\"\n\nThis reverts commit 4a9fd803dd205891d3ed0866c4c64300c5ac27c7.\n" }, { "from": "human", "value": "#include \"stdafx.h\"\n#include \"CppUnitTest.h\"\n#include \"../DNAnalyzerServer/Dictionnaire.h\"\n#...
c++
chosen
[ { "from": "system", "value": "Add extra date range widget tests\n" }, { "from": "human", "value": "/*=========================================================================\n\n Library: CTK\n \n Copyright (c) 2010 Kitware Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"Lic...
c++
chosen
[ { "from": "system", "value": "Fix building of the engine\n" }, { "from": "human", "value": "#include <iostream>\n#include \"Crown.h\"\n#include \"lua.hpp\"\n#include <unistd.h>\n\nusing namespace crown;\n\nstatic void report_errors(lua_State* state, const int status)\n{\n if (status != 0)\n {\...
c++
chosen
[ { "from": "system", "value": "Disable SIMD in jpeg turbo as suggested to check if that fixes the uninitialised memory issue.\n" }, { "from": "human", "value": "#include <Magick++/Functions.h>\n#include <Magick++/ResourceLimits.h>\n#include <Magick++/SecurityPolicy.h>\n\n#ifndef FUZZ_MAX_SIZE\n#d...
c++
chosen
[ { "from": "system", "value": "Use mdiArea directly as the window's central widget\n" }, { "from": "human", "value": "#include \"main_window.hpp\"\n#include <QVBoxLayout>\n#include <QMessageBox>\n#include \"executable_viewer.hpp\"\n\nMainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)\n...
c++
chosen
[ { "from": "system", "value": "Support signed numbers in imul\n" }, { "from": "human", "value": "#include \"common.th\"\n\n// c <- multiplicand\n// d <- multiplier\n// b -> product\n.global imul\nimul:\n pushall(h,i)\n\n i <- d == 0\n jnzrel(i, L_done)\n\nL_top:\n h <- d & 1\n i <-...
c++
chosen
[ { "from": "system", "value": "Test cereal for loading a constant variable (using a const_cast)\n" }, { "from": "human", "value": "#include \"UnitTest++/UnitTest++.h\"\n\n#include <fstream>\n#include <cereal/archives/binary.hpp>\n\nSUITE( CerealTest )\n{\n TEST( basicSaveAndLoad )\n {\n ...
c++
chosen
[ { "from": "system", "value": "sat-solver: Print variable debug output to stdout\n\nPrinting them to stderr makes it hard to see them in the context of\nregular program output when piping usually to \"grep\" or \"less\").\n" }, { "from": "human", "value": "#include \"variables.hpp\"\n\n#ifdef _VA...
c++
chosen
[ { "from": "system", "value": "Add licence (yes, this means that editinterface.cpp has no licence)\n\nsvn path=/trunk/kdelibs/interfaces/ktexteditor/; revision=266753\n" }, { "from": "human", "value": "#include \"editinterfaceext.h\"\n#include \"document.h\"\n\nusing namespace KTextEditor;\n\nuin...
c++
chosen
[ { "from": "system", "value": "Add -nologo in nmake command lines.\n" }, { "from": "human", "value": "#include \"NMakefile.hpp\"\n\n#include <configure/Build.hpp>\n#include <configure/Filesystem.hpp>\n#include <configure/quote.hpp>\n\nnamespace configure { namespace generators {\n\n\tstd::string ...
c++
chosen
[ { "from": "system", "value": "Add logging to analysis for profiling\n" }, { "from": "human", "value": "#include \"analyzer.h\"\n\n#include \"dal.h\"\n\n#include \"glog.h\"\n#include <iostream>\n\nnamespace holmes {\n\nkj::Promise<bool> Analyzer::run(DAL *dal) {\n std::vector<Holmes::Fact::Reade...
c++
chosen
[ { "from": "system", "value": "Update example to be actually somewhat useful\n" }, { "from": "human", "value": "#include <PIDController.h>\n#include <iostream>\n\nusing namespace std;\n\nint main(int argc, char *argv[])\n{\n\tPIDController* pid = new PIDController(1,0,0,-100,100);\n\n pid->on(...
c++
chosen
[ { "from": "system", "value": "Initialize libsodium in the gtest suite.\n" }, { "from": "human", "value": "#include \"gtest/gtest.h\"\n\nint main(int argc, char **argv) {\n testing::InitGoogleTest(&argc, argv);\n return RUN_ALL_TESTS();\n}\n" }, { "from": "gpt", "value": "#include \...
c++
chosen
[ { "from": "system", "value": "Modify states methods to implement the game of life\n" }, { "from": "human", "value": "#include \"../../include/core/StateCell.hpp\"\n#include \"../../include/core/Cell.hpp\"\n\nbool StateCell::isState(StateCell* state) const\n{\n return state == this; //All state ...
c++
chosen
[ { "from": "system", "value": "inefficient-qlist: Add test-case for a bug report\n\nCCBUG: 358740\n" }, { "from": "human", "value": "#include <QtCore/QList>\n\n\n\n\n\n\n\n\n\n\nstruct SmallType {\n char a[8];\n};\n\n\nstruct BigType {\n char a[9];\n};\n\n\nvoid foo()\n{\n QList<BigType>...
c++
chosen
[ { "from": "system", "value": "Add shell includes to test project for searching purposes\n" }, { "from": "human", "value": "// dllmain.cpp : Defines the entry point for the DLL application.\n#include \"stdafx.h\"\n#include \"commctrl.h\"\n#include \"accctrl.h\"\n\nBOOL APIENTRY DllMain(\n HMOD...
c++
chosen
[ { "from": "system", "value": "Define tracing unit tests with proper log level.\n" }, { "from": "human", "value": "#include \"test.h\"\n\n// When defining a facility, it has to occur before including the logger.\n#define VAST_LOG_FACILITY \"test\"\n#include \"vast/logger.h\"\n\n#if VAST_LOG_LEVEL...
c++
chosen
[ { "from": "system", "value": "[asan] Disable ODR test on Android\n\ngit-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@349585 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clangxx_asan -fno-rtti -DBUILD_SO1 -fPIC -shared %s -o %t1.so\n// RUN: %clangxx_asan -f...
c++
chosen
[ { "from": "system", "value": "Add thread to fix gcc\n" }, { "from": "human", "value": "#include \"PolarisBlock.h\"\n\n#include \"Poco/Net/ServerSocket.h\"\n#include \"Poco/Net/SocketReactor.h\"\n#include \"Poco/Net/SocketAcceptor.h\"\n#include \"PolarisConnection.h\"\n\nusing Poco::Net::ServerSo...
c++
chosen
[ { "from": "system", "value": "Check properties changes before emitting notify signal\n" }, { "from": "human", "value": "#include \"quasigame.h\"\n#include \"gamescene.h\"\n\nQuasiGame::QuasiGame(QQuickItem *parent)\n : QQuickItem(parent)\n , m_currentScene(0)\n , m_fps(DEFAULT_FPS)\n{\n...
c++
chosen
[ { "from": "system", "value": "Add alert when Google API key was not specified\n" }, { "from": "human", "value": "#include \"JNIRhodes.h\"\n\n#include \"gapikey.h\"\n\n#include <common/rhoparams.h>\n\n#undef DEFAULT_LOGCATEGORY\n#define DEFAULT_LOGCATEGORY \"MapView\"\n\nRHO_GLOBAL void mapview_c...
c++
chosen
[ { "from": "system", "value": "Fix registration of Sinh GPU Eigen kernel\n\nPiperOrigin-RevId: 378123173\nChange-Id: Ibcc42c7324fb30132790aa74b166d1807d717dd3\n" }, { "from": "human", "value": "/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n\nLicensed under the Apache License, Ve...
c++
chosen
[ { "from": "system", "value": "Make sure we shut down the app if SDL_main() returns instead of exiting.\n" }, { "from": "human", "value": "\n/* Include the SDL main definition header */\n#include \"SDL_main.h\"\n\n/*******************************************************************************\n ...
c++
chosen
[ { "from": "system", "value": "Use actual definitions of static variables.\n\n\ngit-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@2445 0785d39b-7218-0410-832d-ea1e28bc413d\n" }, { "from": "human", "value": "/* $Id$ */\n\n#include <grid/geometry_info.h>\n\n\n// enable these lines for gcc2.95\n/...
c++
chosen
[ { "from": "system", "value": "Add includes to use debugging showCanvas" }, { "from": "human", "value": "#include \"Example1.h\"\n\n#include <string.h>\n#include <GLES3/gl3.h>\n#include <jni.h>\n#include <iostream>\n#include <glm/gtc/matrix_transform.hpp>\n#include <shader_program.h>\n\nusing nam...
c++
chosen
[ { "from": "system", "value": "Add try block for receive error on connection\n\nOn subscribe, ICS3 have connection of ics communication.\nIt mean exist USB adaptor but fail servo motor.\nSo we save connection.\n" }, { "from": "human", "value": "#include<ros/ros.h>\n#include<ics3/ics>\n#include<se...
c++
chosen