doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
a982a72b-5b2f-4ed9-aad6-3d3f834b0a9b | {
"language": "C++"
} | ```c++
// tagged_sqlite.cpp : Defines the entry point for the application.
//
#include "tagged_sqlite.h"
using namespace std;
int main() {
using db = define_database<
class mydb,
define_table<class customers, define_column<class id, std::int64_t>,
define_column<class name, std::stri... | ```c++
// tagged_sqlite.cpp : Defines the entry point for the application.
//
#include "tagged_sqlite.h"
using namespace std;
int main() {
using db = define_database<
define_table<class customers, //
define_column<class id, std::int64_t>,
define_column<class name, std:... |
1fbefcd0-eace-477d-9cfa-9484a14958f5 | {
"language": "C++"
} | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
// Disabled, http://crbug.com/30151.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLE... | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
// Disabled, http://crbug.com/30151 (Linux and ChromeOS),
// http://crbug.com/35034 (... |
67e994fa-a53f-40b2-9238-fcf1077014bb | {
"language": "C++"
} | ```c++
#include "http_server/parse_path.hpp"
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
namespace http {
namespace server3 {
bool parse_path(const std::string &path, int &z, int &x, int &y)
{
std::vector<std::string> splits;
... | ```c++
#include "http_server/parse_path.hpp"
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
namespace http {
namespace server3 {
bool parse_path(const std::string &path, int &z, int &x, int &y)
{
std::vector<std::string> splits;
... |
fde710ef-1a74-4ce2-907b-294667f62afe | {
"language": "C++"
} | ```c++
#include "generator/emitter_simple.hpp"
#include "generator/feature_builder.hpp"
#include "base/macros.hpp"
namespace generator
{
EmitterSimple::EmitterSimple(feature::GenerateInfo const & info) :
m_regionGenerator(std::make_unique<SimpleGenerator>(info)) {}
void EmitterSimple::GetNames(std::vector<std::st... | ```c++
#include "generator/emitter_simple.hpp"
#include "generator/feature_builder.hpp"
#include "base/macros.hpp"
namespace generator
{
EmitterSimple::EmitterSimple(feature::GenerateInfo const & info) :
m_regionGenerator(std::make_unique<SimpleGenerator>(info)) {}
void EmitterSimple::GetNames(std::vector<std::st... |
809db708-dde9-4ef9-b471-6c40ba108581 | {
"language": "C++"
} | ```c++
#include <iostream>
#include "pinocchio/multibody/model.hpp"
#include "pinocchio/multibody/parser/lua.hpp"
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE UrdfTest
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE ( ParsingLuaFile )
BOOST_AUTO_TEST_CASE ( buildModel )
{
std::string filename ... | ```c++
//
// Copyright (c) 2015 CNRS
//
// This file is part of Pinocchio
// Pinocchio is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later... |
86da8a7d-8d84-462d-aead-66be452485ee | {
"language": "C++"
} | ```c++
#define CATCH_CONFIG_MAIN
#include <catch.hpp>
/*
* Catch main file for faster compilation. This file is the only one defining the
* main function.
*/
```
Disable error dialog on Windows | ```c++
#define CATCH_CONFIG_RUNNER
#include "catch.hpp"
// On Windows, disable the "Application error" dialog box, because it
// requires an human intervention, and there is no one on Appveyor.
//
// On UNIX, does nothing
void silent_crash_handlers();
int main(int argc, char* argv[]) {
silent_crash_handlers();
... |
bdcda91e-b742-4bb2-8d17-449fd6b9f9ad | {
"language": "C++"
} | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_view_host_observer.h"
#include "content/browser/renderer_host/render_view_host.h"
RenderViewHo... | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_view_host_observer.h"
#include "content/browser/renderer_host/render_view_host.h"
RenderViewHo... |
5181bcd0-c230-4950-88fc-066b30601a21 | {
"language": "C++"
} | ```c++
#define CATCH_CONFIG_RUNNER
#include "Catch/catch.hpp"
#include <memory>
#include "decoration.hpp"
#include "printing.hpp"
#include "TestUtils.hpp"
int
main(int argc, const char *argv[])
{
PrintingSettings::set(std::make_shared<TestSettings>());
decor::disableDecorations();
// Remove destinatio... | ```c++
#define CATCH_CONFIG_RUNNER
#include "Catch/catch.hpp"
#include <boost/algorithm/string/predicate.hpp>
#include <cstdlib>
#include <cstring>
#include <memory>
#include "decoration.hpp"
#include "printing.hpp"
#include "TestUtils.hpp"
int
main(int argc, const char *argv[])
{
// Drop all `GIT_*` environm... |
22962286-cf21-4960-b60d-b736c667206b | {
"language": "C++"
} | ```c++
#include "../src/Sphere.h"
#include "../src/Plane.h"
void World::build() {
vp.set_hres(200);
vp.set_vres(200);
vp.set_pixel_size(1.0);
tracerPtr = new MultipleObjects(this);
backgroundColor = RGBColor(0.0f, 0.0f, 0.0f);
Sphere* sphere_ptr = new Sphere;
sphere_ptr->setCenter(glm::vec3(0.0f, -25.0f, 0.0... | ```c++
#include "../src/Sphere.h"
#include "../src/Plane.h"
#include <iostream>
using namespace std;
void World::build() {
vp.set_hres(200);
vp.set_vres(200);
vp.set_pixel_size(1.0);
tracerPtr = new MultipleObjects(this);
backgroundColor = RGBColor(0.0f, 0.0f, 0.0f);
Sphere* sphere_ptr = new Sphere;
sphere_... |
e0735360-d099-49b8-a722-ba865263a16b | {
"language": "C++"
} | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
// Disabled, http://crbug.com/30151.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLE... | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
// Disabled, http://crbug.com/30151 (Linux and ChromeOS),
// http://crbug.com/35034 (... |
b3e72017-304f-490e-bc77-db98612b1a28 | {
"language": "C++"
} | ```c++
#include "qmimedatabase.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
if (argc <= 1) {
printf( "No filename specified\n" );
return 1;
}
QString option;
int fnPos = 1;
if (argc > 2) {
... | ```c++
#include "qmimedatabase.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
if (argc <= 1) {
printf( "No filename specified\n" );
return 1;
}
QString option;
int fnPos = 1;
if (argc > 2) {
... |
f4ec579b-c0ed-4fdb-8522-4faaefb3e929 | {
"language": "C++"
} | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... |
b59583ff-de29-416d-ae9f-7786e0db2496 | {
"language": "C++"
} | ```c++
#include <gloperate/painter/PipelineOutputCapability.h>
#include <gloperate/base/collection.hpp>
#include <gloperate/pipeline/AbstractPipeline.h>
namespace gloperate
{
/**
* @brief
* Constructor
*/
PipelineOutputCapability::PipelineOutputCapability(const gloperate::AbstractPipeline & pipeline)
: Abst... | ```c++
#include <gloperate/painter/PipelineOutputCapability.h>
#include <gloperate/base/collection.hpp>
#include <gloperate/pipeline/AbstractPipeline.h>
namespace gloperate
{
/**
* @brief
* Constructor
*/
PipelineOutputCapability::PipelineOutputCapability(const gloperate::AbstractPipeline & pipeline)
: Abst... |
df0f6c15-0c1d-4d57-bada-c8b9c1f28ec3 | {
"language": "C++"
} | ```c++
#include "types.h"
#include <cassert>
namespace nadam {
MessageInfo::MessageInfo(std::string name, uint32_t size, bool isVariableSize)
: name{name}, size{size}, isVariableSize{isVariableSize},
hash{constructHash(name, size, isVariableSize)} {
assert(name.length());
}
util::sha1::hash MessageInfo::construc... | ```c++
#include "types.h"
#include <cassert>
namespace nadam {
MessageInfo::MessageInfo(std::string name, uint32_t size, bool isVariableSize)
: name(name), size(size), isVariableSize(isVariableSize),
hash(constructHash(name, size, isVariableSize)) {
assert(name.length());
}
util::sha1::hash MessageInfo::construc... |
552bd1aa-056a-4bf2-bbca-21d391ed3737 | {
"language": "C++"
} | ```c++
#include <iostream>
#include "Shell.h"
#include "RemoteCommand.h"
namespace RhIO
{
RemoteCommand::RemoteCommand(std::string fullName_, std::string desc_)
: fullName(fullName_), desc(desc_), origin(""), name("")
{
auto found = fullName.find_last_of("/");
if (found > 0) {
... | ```c++
#include <iostream>
#include "Shell.h"
#include "RemoteCommand.h"
namespace RhIO
{
RemoteCommand::RemoteCommand(std::string fullName_, std::string desc_)
: fullName(fullName_), desc(desc_), origin(""), name("")
{
auto found = fullName.find_last_of("/");
if (found != std::string::... |
01c5632f-139e-4cc2-a523-ba23bcd34220 | {
"language": "C++"
} | ```c++
#include "listener.h"
#include "log.h"
#include "buffers.h"
void conditionalEnqueue(QUEUE_TYPE(uint8_t)* queue, uint8_t* message,
int messageSize) {
if(queue_available(queue) < messageSize + 2) {
debug("Dropped incoming CAN message -- send queue (at %p) full\r\n",
queue);
... | ```c++
#include "listener.h"
#include "log.h"
#include "buffers.h"
bool conditionalEnqueue(QUEUE_TYPE(uint8_t)* queue, uint8_t* message,
int messageSize) {
if(queue_available(queue) < messageSize + 2) {
return false;
}
for(int i = 0; i < messageSize; i++) {
QUEUE_PUSH(uint8_t, queu... |
a4fd75a6-5f23-4973-9a3a-0c1cf4ce50fc | {
"language": "C++"
} | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/in_process_webkit/webkit_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(WebKitThreadTest, ExposedInChr... | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/in_process_webkit/webkit_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(WebKitThreadTest, DISABLED_Exp... |
6418d7cd-b832-4482-9523-34681f1c2f5f | {
"language": "C++"
} | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "base/logging.h"
// static
void RenderWidgetHostView::GetDefaultS... | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "base/logging.h"
// static
void RenderWidgetHostViewBase::GetDefa... |
6a1cd0e7-f680-4f80-a39c-9ff80b721547 | {
"language": "C++"
} | ```c++
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2016 Ben Vanik. All rights reserved. ... | ```c++
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2016 Ben Vanik. All rights reserved. ... |
1c1788b8-c9f2-4335-80b9-1670896787e6 | {
"language": "C++"
} | ```c++
#include <gtest/gtest.h>
TEST(MathTest, TwoPlusTwoEqualsFour) {
EXPECT_EQ(2 + 2, 4);
}
int main(int argc, char **argv) {
::testing::InitGoogleTest( &argc, argv );
return RUN_ALL_TESTS();
}```
Make sure Travis detects failing test | ```c++
#include <gtest/gtest.h>
TEST(MathTest, TwoPlusTwoEqualsFour) {
EXPECT_EQ(2 + 2, 5);
}
int main(int argc, char **argv) {
::testing::InitGoogleTest( &argc, argv );
return RUN_ALL_TESTS();
}
``` |
a8f12859-ad70-41eb-b6b0-7cd3d00fe8bf | {
"language": "C++"
} | ```c++
#include "removegrain.h"
#include "clense.h"
#include "repair.h"
#include "vertical_cleaner.h"
const AVS_Linkage *AVS_linkage = nullptr;
extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) {
AVS_linkage = vectors;
env-... | ```c++
#include "removegrain.h"
#include "clense.h"
#include "repair.h"
#include "vertical_cleaner.h"
const AVS_Linkage *AVS_linkage = nullptr;
extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) {
AVS_linkage = vectors;
env-... |
feb8a600-8f4e-4444-9d2c-4dcd474ce236 | {
"language": "C++"
} | ```c++
#include "Sprite.h"
Sprite::Sprite() : Node()
{
// Image
m_sprite_path = "";
}
Sprite::Sprite(std::string p_sprite_path) : Sprite()
{
m_sprite_path = p_sprite_path;
}
Sprite::~Sprite() {}
std::string Sprite::getSpritePath()
{
return m_sprite_path;
}```
Use more useful ances... | ```c++
#include "Sprite.h"
Sprite::Sprite() : Node()
{
// Image
m_sprite_path = "";
}
Sprite::Sprite(std::string p_sprite_path) : Node()
{
// Image
m_sprite_path = p_sprite_path;
}
Sprite::~Sprite() {}
std::string Sprite::getSpritePath()
{
return m_sprite_path;
}``` |
fe5a8c8c-0ca6-412b-af04-c8ddb318a939 | {
"language": "C++"
} | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/renderer_logging.h"
#include "base/logging.h"
#include "googleurl/src/gurl.h"
namespace renderer_logging {
// Sets... | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/renderer_logging.h"
#include "base/logging.h"
#include "googleurl/src/gurl.h"
namespace renderer_logging {
// Sets... |
d1e6812d-5bcd-4fd8-a76f-23a9932ca034 | {
"language": "C++"
} | ```c++
Matrix2f M = Matrix2f::Random();
Matrix2f m;
m = M;
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Now we want to replace m by its own transpose." << endl;
cout << "If we do m = m.transpose(), then m becomes:" << endl;
m = m.transpose() * 1;
cout << m << endl << "which is wrong!" << endl;
cout <<... | ```c++
Matrix2f M = Matrix2f::Random();
Matrix2f m;
m = M;
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Now we want to copy a column into a row." << endl;
cout << "If we do m.col(1) = m.row(0), then m becomes:" << endl;
m.col(1) = m.row(0);
cout << m << endl << "which is wrong!" << endl;
cout << "Now ... |
4ccc9dff-7b31-4651-8071-4ff28f55cb1c | {
"language": "C++"
} | ```c++
#include "CogServer.h"
#include "QueryProcessor.h"
#include "WordSenseProcessor.h"
using namespace opencog;
int main(int argc, char *argv[])
{
CogServer server;
// Cheapo hack to get the query processory up and running.
// XXX fix me with some more permanent, appropriate solution.
QueryProcess... | ```c++
#include "CogServer.h"
#include "QueryProcessor.h"
#include "WordSenseProcessor.h"
#include "Config.h"
using namespace opencog;
static void usage(char* progname) {
cerr << "Usage: " << progname << " [-c <config-file>]\n\n";
}
int main(int argc, char *argv[]) {
// check command line
if ((argc == 1)... |
9c234f82-6488-4825-8e75-f41aca66a7cc | {
"language": "C++"
} | ```c++
#include <iostream>
#include <sqlpp11/postgresql/postgresql.h>
#include <sqlpp11/postgresql/insert.h>
//#include <sqlpp11/sqlpp11.h>
#include "Sample.h"
int Returning(int argc, char **argv) {
// Configuration
auto config = std::make_shared<sqlpp::postgresql::connection_config>();
// DB connection
sq... | ```c++
#include <iostream>
#include <sqlpp11/postgresql/postgresql.h>
#include <sqlpp11/postgresql/insert.h>
//#include <sqlpp11/sqlpp11.h>
#include "Sample.h"
int Returning(int argc, char **argv) {
// Configuration
//auto config = std::make_shared<sqlpp::postgresql::connection_config>();
// DB connection
... |
073ff1fc-fa0c-430a-b27f-f8265e3d93d7 | {
"language": "C++"
} | ```c++
#include "perceptioninfoprivate.h"
#include "btperceptioninfoscriptable.h"
using namespace GluonEngine;
PerceptionInfoPrivate::PerceptionInfoPrivate(QObject * parent)
: QSharedData()
{
info = new btPerceptionInfoScriptable(parent);
QScriptValue extensionObject = engine.globalObject();
script = 0;
}
Perce... | ```c++
#include "perceptioninfoprivate.h"
#include "btperceptioninfoscriptable.h"
using namespace GluonEngine;
PerceptionInfoPrivate::PerceptionInfoPrivate(QObject * parent)
: QSharedData()
{
info = new btPerceptionInfoScriptable(parent);
QScriptValue extensionObject = engine.globalObject();
script = 0;
}
Perce... |
84ad3aa1-5c6f-4bab-b7ef-703f32e2caef | {
"language": "C++"
} | ```c++
#include "simplegameworld.h"
void SimpleGameWorld::addEntity(shared_ptr< gamefw::Entity > entity)
{
m_entity_list.push_back(entity);
}
void SimpleGameWorld::update()
{
foreach(shared_ptr<gamefw::Entity> entity, m_entity_list) {
entity->m_position.x += entity->m_velocity_local.x *
... | ```c++
#include "simplegameworld.h"
void SimpleGameWorld::addEntity(shared_ptr< gamefw::Entity > entity)
{
m_entity_list.push_back(entity);
}
void SimpleGameWorld::update()
{
foreach(shared_ptr<gamefw::Entity> entity, m_entity_list) {
entity->m_position.x += entity->m_velocity_local.x *
... |
e98e7649-03a8-49da-aec7-aa2d9c0e8fd1 | {
"language": "C++"
} | ```c++
#include "util/file_piece.hh"
#include "util/file.hh"
#include "util/scoped.hh"
#include "util/string_piece.hh"
#include "util/tokenize_piece.hh"
#include "util/murmur_hash.hh"
#include "util/probing_hash_table.hh"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fstream>
#include <io... | ```c++
#include "util/file_piece.hh"
#include "util/file.hh"
#include "util/scoped.hh"
#include "util/string_piece.hh"
#include "util/tokenize_piece.hh"
#include "util/murmur_hash.hh"
#include "util/probing_hash_table.hh"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fstream>
#include <io... |
430633ca-437c-4eff-be83-4c67e31a9ebb | {
"language": "C++"
} | ```c++
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | ```c++
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... |
36dc9483-1e27-4ce3-9b9a-b2309f2fabf8 | {
"language": "C++"
} | ```c++
// Clang on MacOS can find libc++ living beside the installed compiler.
// This test makes sure our libTooling-based tools emulate this properly with
// fixed compilation database.
//
// RUN: rm -rf %t
// RUN: mkdir %t
//
// Install the mock libc++ (simulates the libc++ directory structure).
// RUN: cp -r %S/Inp... | ```c++
// Clang on MacOS can find libc++ living beside the installed compiler.
// This test makes sure our libTooling-based tools emulate this properly with
// fixed compilation database.
//
// RUN: rm -rf %t
// RUN: mkdir %t
//
// Install the mock libc++ (simulates the libc++ directory structure).
// RUN: cp -r %S/Inp... |
480d9570-d518-48ad-aa97-5c4b2b4445eb | {
"language": "C++"
} | ```c++
#include "texture.hpp"
#include <string>
#include <SDL_image.h>
const std::string Texture::filename(const std::string &name)
{
return "/textures/" + name;
}
Texture::Texture(const Adapter &adapter, const std::string &name)
{
SDL_Surface *surface = IMG_Load(adapter.filename<Texture>(name).c_str());
glG... | ```c++
#include "texture.hpp"
#include <string>
#define STB_IMAGE_IMPLEMENTATION
#define STBI_ASSERT(x)
#define STBI_ONLY_PNG
#include <stb_image.h>
const std::string Texture::filename(const std::string &name)
{
return "/textures/" + name;
}
Texture::Texture(const Adapter &adapter, const std::string &name)
{
GL... |
0be55bd4-a200-4883-bf7d-790367c3e9f8 | {
"language": "C++"
} | ```c++
#include "line.hpp"
// Include standard headers
#include <cmath> // NAN, std::isnan, std::pow
#include <string> // std::string
#include <vector> // std::vector
namespace geometry
{
// constructor.
// can be used for creating n-dimensional lines.
Line::Line(std::vector<float> point1, std::... | ```c++
#include "line.hpp"
// Include standard headers
#include <cmath> // NAN, std::isnan, std::pow
#include <string> // std::string
#include <vector> // std::vector
namespace geometry
{
// constructor.
// can be used for creating n-dimensional lines.
Line::Line(std::vector<float> point1, std::... |
393c6a42-e156-4c3c-8b42-79cdea0dc83d | {
"language": "C++"
} | ```c++
#include <MinConsole.hpp>
#include <Windows.h>
namespace MinConsole
{
void* GetOutputHandle()
{
static void* Handle = nullptr;
if( Handle == nullptr )
{
Handle = GetStdHandle(STD_OUTPUT_HANDLE);
}
return Handle;
}
void SetTextColor(Color NewColor)
{
SetConsoleTextAttribute(
GetOutputHandle(),
sta... | ```c++
#include <MinConsole.hpp>
#include <Windows.h>
#include <mutex>
namespace MinConsole
{
void* GetOutputHandle()
{
static void* Handle = nullptr;
std::once_flag HandleCached;
std::call_once(HandleCached, [=]()
{
Handle = GetStdHandle(STD_OUTPUT_HANDLE);
});
return Handle;
}
void SetTextColor(Color New... |
7d5634a5-306f-400b-8669-a2d0912950ce | {
"language": "C++"
} | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h"
#include "base/rand_util.h"
#include "build/build_config.h"
#if defin... | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h"
#include "base/rand_util.h"
#include "build/build_config.h"
#if defin... |
753518d4-4340-4594-96a9-87e782e7cb4a | {
"language": "C++"
} | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#if defined(OS_CHROMEOS)
#include "base/basictypes.h"
#include "base/string_util.h"
#endif
namespace l10n_util {
// Return... | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#if defined(OS_CHROMEOS)
#include "base/basictypes.h"
#include "base/string_util.h"
#endif
namespace l10n_util {
// Return... |
b1ae1d96-003e-47d7-8f4e-9ed63922ba3c | {
"language": "C++"
} | ```c++
#include "OptionsManager.h"
#include <fstream>
#include <boost/filesystem.hpp>
#include <spotify/json.hpp>
#include "codecs/OptionsCodec.h"
OptionsManager::OptionsManager(std::string optionsFilename)
{
loadOptions(optionsFilename);
}
void OptionsManager::loadOptions(std::string optionsFilename)
{
s... | ```c++
#include "OptionsManager.h"
#include <fstream>
#include <iostream>
#include <boost/filesystem.hpp>
#include <spotify/json.hpp>
#include "codecs/OptionsCodec.h"
OptionsManager::OptionsManager(std::string optionsFilename)
{
loadOptions(optionsFilename);
}
void OptionsManager::loadOptions(std::string opti... |
10732845-3e8e-441c-97f8-a170e0f85b4f | {
"language": "C++"
} | ```c++
#include "SkinManager.h"
#include "Skin.h"
SkinManager *SkinManager::instance;
SkinManager *SkinManager::Instance() {
if (instance == NULL) {
instance = new SkinManager();
}
return instance;
}
SkinManager::~SkinManager() {
delete _skin;
}
void SkinManager::LoadSkin(std::wstring skinX... | ```c++
#include "SkinManager.h"
#include "Skin.h"
#include "SkinV3.h"
SkinManager *SkinManager::instance;
SkinManager *SkinManager::Instance() {
if (instance == NULL) {
instance = new SkinManager();
}
return instance;
}
SkinManager::~SkinManager() {
delete _skin;
}
void SkinManager::LoadSki... |
6a5868a0-4f6b-44e7-9e72-ded47f7dfb14 | {
"language": "C++"
} | ```c++
// Test that verifies TSan runtime doesn't contain compiler-emitted
// memcpy/memmove calls. It builds the binary with TSan and passes it to
// check_memcpy.sh script.
// RUN: %clangxx_tsan -O1 %s -o %t
// RUN: llvm-objdump -d %t | FileCheck %s
int main() {
return 0;
}
// CHECK-NOT: callq {{.*<(__intercepto... | ```c++
// Test that verifies TSan runtime doesn't contain compiler-emitted
// memcpy/memmove calls. It builds the binary with TSan and passes it to
// check_memcpy.sh script.
// RUN: %clangxx_tsan -O1 %s -o %t
// RUN: llvm-objdump -d %t | FileCheck %s
// REQUIRES: compiler-rt-optimized
int main() {
return 0;
}
//... |
b0695c0f-c1e0-4298-8547-9869afdc4bef | {
"language": "C++"
} | ```c++
#include "JSON.h"
#include <string>
namespace ouroboros
{
JSON::JSON()
:mpArr(nullptr)
{}
JSON::JSON(const std::string& aJSON)
:mpArr(parse_json2(aJSON.c_str(), aJSON.length()))
{}
JSON::~JSON()
{
free(mpArr);
}
bool JSON::exists(const std::string& aPath) const
{
if (mpArr)
{
const jso... | ```c++
#include "JSON.h"
#include <string>
#include <cstdlib>
namespace ouroboros
{
JSON::JSON()
:mpArr(nullptr)
{}
JSON::JSON(const std::string& aJSON)
:mpArr(parse_json2(aJSON.c_str(), aJSON.length()))
{}
JSON::~JSON()
{
free(mpArr);
}
bool JSON::exists(const std::string& aPath) const
{
if (mpAr... |
c58576b8-06ea-4fb3-b82e-0d6d4232a563 | {
"language": "C++"
} | ```c++
#include <string>
#include <ccspec/core/hooks.h>
#include <ccspec/core/example_group.h>
namespace ccspec {
namespace core {
void before(std::string entity, Hook hook) {
ExampleGroup* parent_group = groups_being_defined.top();
if (entity == "each")
parent_group->addBeforeEachHook(hook);
else... | ```c++
#include <string>
#include <ccspec/core/hooks.h>
#include <ccspec/core/example_group.h>
namespace ccspec {
namespace core {
void before(std::string entity, Hook hook) {
ExampleGroup* parent_group = groups_being_defined.top();
if (entity == "each" || entity == "example")
parent_group->addBeforeE... |
63cacde5-8211-490e-af7f-09921778e8b2 | {
"language": "C++"
} | ```c++
#include <client/client.h>
#include <server/server.h>
#include <err.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int separator;
char** compile_argv;
separator = 0;
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--") == 0) {
separator... | ```c++
#include <client/client.h>
#include <server/server.h>
#include <err.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int separator;
char** compile_argv;
separator = 0;
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--") == 0) {
separator... |
fae498b0-8bbf-4be6-9a65-fef5c414ec9f | {
"language": "C++"
} | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... |
709e2b24-618b-44e8-8c96-4a50a9112432 | {
"language": "C++"
} | ```c++
// RUN: %clang_cc1 -fsyntax-only -verify %s
template<typename T>
struct X1 {
friend void f6(int) { } // expected-error{{redefinition of}} \
// expected-note{{previous definition}}
};
X1<int> x1a;
X1<float> x1b; // expected-note {{in instantiation of}}
```
Add test case from PR6952... | ```c++
// RUN: %clang_cc1 -fsyntax-only -verify %s
template<typename T>
struct X1 {
friend void f6(int) { } // expected-error{{redefinition of}} \
// expected-note{{previous definition}}
};
X1<int> x1a;
X1<float> x1b; // expected-note {{in instantiation of}}
template<typename T>
struct X... |
490552a4-3875-4d57-b4ed-5636502f7ec0 | {
"language": "C++"
} | ```c++
#include <iostream>
using namespace std;
class Greeting {
protected:
string s;
public:
Greeting(){
s = "Hello, ";
}
virtual ~Greeting() { }
virtual void printGreeting() = 0;
};
class GitHubGreeting : public Greeting {
public:
GitHubGreet... | ```c++
#include <iostream>
using namespace std;
class Greeting {
protected:
string s;
public:
Greeting(){
s = "Hello, ";
}
virtual ~Greeting() { }
virtual void printGreeting() = 0;
};
class GitHubGreeting : public Greeting {
public:
GitHubGreet... |
739e5289-aad0-4262-bfd0-a7437cca2308 | {
"language": "C++"
} | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h"
#include "base/file_path.h"
#include "base/file_uti... | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h"
#include "base/bind.h"
#include "base/file_path.h"
... |
ca9f41b2-6174-4311-ab99-7ffc700b42ca | {
"language": "C++"
} | ```c++
#include "gtest/gtest.h"
#include "Models/GaussianModel.hpp"
#include "test_utils/test_utils.hpp"
#include <fstream>
namespace {
using namespace BOOM;
using std::endl;
using std::cout;
class ParamPolicy2Test : public ::testing::Test {
protected:
ParamPolicy2Test() {
GlobalRng::rng.seed(86... | ```c++
#include "gtest/gtest.h"
#include "Models/GaussianModel.hpp"
#include "test_utils/test_utils.hpp"
#include <fstream>
namespace {
using namespace BOOM;
using std::endl;
using std::cout;
class ParamPolicy2Test : public ::testing::Test {
protected:
ParamPolicy2Test() {
GlobalRng::rng.seed(86... |
43866020-3ee0-49e6-9100-33aebe1a668e | {
"language": "C++"
} | ```c++
#pragma once
#include <glkernel/Kernel.h>
#include <glm/vec2.hpp>
#include <glkernel/Kernel.h>
#include <glkernel/uniform_noise.h>
#include <glkernel/normal_noise.h>
#include <glkernel/square_points.hpp>
namespace glkernel
{
void test()
{
{ auto noise = glkernel::Kernel<float>(); }
{ auto noi... | ```c++
#include <glkernel/Kernel.h>
#include <glm/vec2.hpp>
#include <glkernel/Kernel.h>
#include <glkernel/uniform_noise.h>
#include <glkernel/normal_noise.h>
#include <glkernel/square_points.hpp>
namespace glkernel
{
void test()
{
{ auto noise = glkernel::Kernel<float>(); }
{ auto noise = glkernel... |
77aaf079-1b77-4c8b-88cb-be65b538e63d | {
"language": "C++"
} | ```c++
#include "ros/ros.h"
#include "sensor_msgs/LaserScan.h"
#include "OpenniLaserScanner.h"
class MyMwListener : public OpenniLaser::OpenniLaserScanner::Listener
{
public:
sensor_msgs::LaserScan scan;
void readyForNextData(OpenniLaser::OpenniLaserScanner* scanner)
{
openni::VideoFrameRef frame;
scan = scanne... | ```c++
#include "ros/ros.h"
#include "sensor_msgs/LaserScan.h"
#include "OpenniLaserScanner.h"
class MyMwListener : public OpenniLaser::OpenniLaserScanner::Listener
{
public:
sensor_msgs::LaserScan scan;
void readyForNextData(OpenniLaser::OpenniLaserScanner* scanner)
{
openni::VideoFrameRef frame;
scan = scanne... |
b0537ebd-8614-40fd-9374-8706b9424f88 | {
"language": "C++"
} | ```c++
#include "stdafx.h"
#include "AutowiringTest.h"
#include "Autowired.h"
#include "TestFixtures/SimpleObject.h"
#include "TestFixtures/SimpleReceiver.h"
TEST_F(AutowiringTest, VerifyAutowiredFast) {
// Add an object:
m_create->Inject<SimpleObject>();
// Verify that AutowiredFast can find this object
Auto... | ```c++
#include "stdafx.h"
#include "AutowiringTest.h"
#include "Autowired.h"
#include "TestFixtures/SimpleObject.h"
#include "TestFixtures/SimpleReceiver.h"
TEST_F(AutowiringTest, VerifyAutowiredFast) {
// Add an object:
m_create->Inject<SimpleObject>();
// Verify that AutowiredFast can find this object
Auto... |
a3e6ec9d-13d9-4cd9-89e2-ca7fe4b24749 | {
"language": "C++"
} | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/network_change_notifier_helper.h"
#include <algorithm>
#include "base/logging.h"
namespace net {
namespace internal {
Net... | ```c++
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/network_change_notifier_helper.h"
#include <algorithm>
#include "base/logging.h"
namespace net {
namespace internal {
Net... |
51fdfe1a-8f80-47d4-a045-f8457487371c | {
"language": "C++"
} | ```c++
/*
* Rectangular Window Function Unit for Jamoma DSP
* Copyright © 2009 by Trond Lossius
*
* License: This code is licensed under the terms of the "New BSD License"
* http://creativecommons.org/licenses/BSD/
*/
#include "TTRectangularWindow.h"
#define thisTTClass RectangularWindow
#define thisTTClassNa... | ```c++
/*
* Rectangular Window Function Unit for Jamoma DSP
* Copyright © 2009 by Trond Lossius
*
* License: This code is licensed under the terms of the "New BSD License"
* http://creativecommons.org/licenses/BSD/
*/
#include "TTRectangularWindow.h"
#define thisTTClass RectangularWindow
#define thisTTClassNa... |
d085991e-dd6b-4d77-9cd1-acbf6f52b69a | {
"language": "C++"
} | ```c++
// Copyright (C) 2017 Elviss Strazdins
// This file is part of the Ouzel engine.
#include <bcm_host.h>
#include "WindowResourceRasp.hpp"
#include "utils/Log.hpp"
namespace ouzel
{
WindowResourceRasp::WindowResourceRasp()
{
bcm_host_init();
}
WindowResourceRasp::~WindowResourceRasp()
... | ```c++
// Copyright (C) 2017 Elviss Strazdins
// This file is part of the Ouzel engine.
#include <bcm_host.h>
#include "WindowResourceRasp.hpp"
#include "utils/Log.hpp"
namespace ouzel
{
WindowResourceRasp::WindowResourceRasp()
{
bcm_host_init();
}
WindowResourceRasp::~WindowResourceRasp()
... |
093da237-d7a1-4d39-aac0-cc698a5233c9 | {
"language": "C++"
} | ```c++
#include<ros/ros.h>
#include<servo_msgs/IdBased.h>
#include<ics3/ics>
ics::ICS3* driver {nullptr};
ros::Publisher pub;
void move(const servo_msgs::IdBased::ConstPtr& msg) {
servo_msgs::IdBased result;
try {
result.angle = driver->move(msg->id, ics::Angle::newDegree(msg->angle));
result.id = msg->id... | ```c++
#include<ros/ros.h>
#include<servo_msgs/IdBased.h>
#include<ics3/ics>
ics::ICS3* driver {nullptr};
ros::Publisher pub;
void move(const servo_msgs::IdBased::ConstPtr& msg) {
servo_msgs::IdBased result;
try {
const auto& now_pos = driver->move(msg->id, ics::Angle::newDegree(msg->angle));
result.angle... |
0ead5beb-e45f-45d2-9075-1d01e6964f5d | {
"language": "C++"
} | ```c++
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... | ```c++
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... |
1484ab67-bb05-4b04-9d52-7be0ebfdb363 | {
"language": "C++"
} | ```c++
#include "square.h"
#include <gtest/gtest.h>
TEST(TestSuite, squareTwo)
{
const double ret = square(2);
ASSERT_EQ(5, ret);
}
TEST(TestSuite, squareFour)
{
const double ret = square(4.1);
ASSERT_EQ(16.81, ret);
}
// Run all the tests that were declared with TEST()
int main(int argc, char **argv){
tes... | ```c++
#include "square.h"
#include <gtest/gtest.h>
TEST(TestSuite, squareTwo)
{
const double ret = square(2);
ASSERT_EQ(4, ret);
}
TEST(TestSuite, squareFour)
{
const double ret = square(4.1);
ASSERT_EQ(16.81, ret);
}
// Run all the tests that were declared with TEST()
int main(int argc, char **argv){
tes... |
6c4703a7-e46e-4125-b584-bad7437bf68b | {
"language": "C++"
} | ```c++
#include "../test.h"
#include <QUrl>
#include "../../src/input/scxml_importer.h"
TEST(Test_ScxmlImporter, foo)
{
ScxmlImporter importer(QUrl::fromLocalFile("../config/simple_state.xml"));
}
```
Test for now starts an application. | ```c++
#include "../test.h"
#include <QUrl>
#include <QStateMachine>
#include <QGuiApplication>
#include <QWindow>
#include <QKeyEvent>
#include <thread>
#include <chrono>
#include "../../src/input/scxml_importer.h"
TEST(Test_ScxmlImporter, foo)
{
int zero = 0;
QGuiApplication application(zero, static_cast<char **... |
33c59b09-d674-4e8b-882b-4d1c3d4a712f | {
"language": "C++"
} | ```c++
/**
* Copyright (c) 2016-present, Facebook, 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 appl... | ```c++
/**
* Copyright (c) 2016-present, Facebook, 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 appl... |
e8036acf-3f29-46ef-bfc3-81cda57a1edb | {
"language": "C++"
} | ```c++
#include "qmimedatabase.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
if (argc <= 1) {
printf( "No filename specified\n" );
return 1;
}
const QString fileName = QFile::decodeName(argv[1]);
//... | ```c++
#include "qmimedatabase.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
if (argc <= 1) {
printf( "No filename specified\n" );
return 1;
}
QString option;
int fnPos = 1;
if (argc > 2) {
... |
b7ff4469-5a4a-44ba-9fea-c421f9d4b1e9 | {
"language": "C++"
} | ```c++
#include <iostream>
#include <vector>
#include <iomanip>
#include <cmath>
#include <random>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
// Implementation of the One-Time Pad key generation
int main(int argc, char* argv[])
{
if(ar... | ```c++
#include <iostream>
#include <vector>
#include <iomanip>
#include <cmath>
#include <random>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
// Implementation of the One-Time Pad key generation
int main(int argc, char* argv[])
{
if(ar... |
b3e3c5bf-6d30-400e-aedb-ec3755b0806e | {
"language": "C++"
} | ```c++
#include "common.th"
_start:
prologue
c <- 67
call(totient)
illegal
// Computes the number of values less than C that are relatively prime to C.
// Stores the result in B.
totient:
b <- 0
d <- c
loop:
k <- d == a
jnzrel(k, done)
pushall(b,c,d)
call(gcd)
k <- b <> 1
k <- k + 1
p... | ```c++
#include "common.th"
_start:
prologue
c <- 67
call(totient)
illegal
// Computes the number of values less than C that are relatively prime to C.
// Stores the result in B.
totient:
b <- 0
d <- c
loop:
k <- d == a
jnzrel(k, done)
pushall(b,c,d)
call(gcd)
k <- b <> 1
popall(b,c,d)
... |
853dfa5b-d098-46af-b947-e6b17e558598 | {
"language": "C++"
} | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... |
6075b966-1eb5-474a-8ff2-6df0df251dd6 | {
"language": "C++"
} | ```c++
#include "SubstringWithConcatenationOfAllWords.hpp"
#include <unordered_map>
using namespace std;
vector<int> SubstringWithConcatenationOfAllWords::findSubstring(string s, vector<string>& words)
{
vector<int> ret;
size_t seglen = words[0].size();
size_t nsegs = words.size();
if (nsegs == 0 || s.size() ... | ```c++
#include "SubstringWithConcatenationOfAllWords.hpp"
#include <unordered_map>
using namespace std;
vector<int> SubstringWithConcatenationOfAllWords::findSubstring(string s, vector<string>& words)
{
vector<int> ret;
size_t strlen = s.size();
size_t numw = words.size();
if (strlen == 0 || numw == 0) retu... |
3a6ceb78-5b44-4960-afbd-eab1e81a8672 | {
"language": "C++"
} | ```c++
#include <motor/multirotor_quad_x_motor_mapper.hpp>
#include <array>
MultirotorQuadXMotorMapper::MultirotorQuadXMotorMapper() {
}
void MultirotorQuadXMotorMapper::init() {
PWMMotorMapper::init();
}
void MultirotorQuadXMotorMapper::run(actuator_setpoint_t& input) {
// Calculate output shifts
std::array<... | ```c++
#include <motor/multirotor_quad_x_motor_mapper.hpp>
#include <array>
MultirotorQuadXMotorMapper::MultirotorQuadXMotorMapper() {
}
void MultirotorQuadXMotorMapper::init() {
PWMMotorMapper::init();
}
void MultirotorQuadXMotorMapper::run(actuator_setpoint_t& input) {
// Calculate output shifts
// TODO(yoo... |
00749dfb-da67-49c9-85a9-d65407f675f9 | {
"language": "C++"
} | ```c++
#include <puppet/compiler/settings.hpp>
#include <boost/filesystem.hpp>
#include <unistd.h>
using namespace std;
namespace fs = boost::filesystem;
namespace sys = boost::system;
namespace puppet { namespace compiler {
string settings::default_code_directory()
{
auto home = getenv("HOME");
... | ```c++
#include <puppet/compiler/settings.hpp>
#include <boost/filesystem.hpp>
#include <unistd.h>
using namespace std;
namespace fs = boost::filesystem;
namespace sys = boost::system;
namespace puppet { namespace compiler {
string settings::default_code_directory()
{
auto home = getenv("HOME");
... |
4e3b4784-0c31-4a36-b8b1-4de923fd290d | {
"language": "C++"
} | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... | ```c++
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... |
f91b96a3-2b14-4e11-b028-e1941fa11961 | {
"language": "C++"
} | ```c++
// Native C++ Libraries
#include <iostream>
#include <string>```
Add C++ Interpreter Libraries to the main source. | ```c++
// Native C++ Libraries
#include <iostream>
#include <string>
// C++ Interpreter Libraries
#include <Console.h>
``` |
ba268f7b-02af-4048-8998-b89db93066be | {
"language": "C++"
} | ```c++
/******************************************************************
*
* Copyright 2014 Samsung Electronics All Rights Reserved.
*
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ... | ```c++
/******************************************************************
*
* Copyright 2014 Samsung Electronics All Rights Reserved.
*
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ... |
65ccb4ca-3f67-4b3a-8961-c74714046a02 | {
"language": "C++"
} | ```c++
#include <cmath>
#include <stdexcept>
#include "Layer/filter.hpp"
#include "Utility/utility.hpp"
using namespace Convolutional;
using namespace Convolutional::Layer;
Filter::Filter(std::size_t size) :
bias{Utility::GetRandomNumberBetween(-1.0, 1.0)} {
// TODO jnf: constexpr check if size is perfect square
w... | ```c++
#include <cmath>
#include <stdexcept>
#include "Layer/filter.hpp"
#include "Utility/utility.hpp"
using namespace Convolutional;
using namespace Convolutional::Layer;
Filter::Filter(std::size_t size) :
bias{Utility::GetRandomNumberBetween(-1.0, 1.0)} {
// TODO jnf: constexpr check if size is perfect square
w... |
e37b9912-cb09-4307-b09a-0469df8ee7ab | {
"language": "C++"
} | ```c++
#include <iostream>
#include "..\..\shared\ProblemEngine.h"
int FindShortestPath(const int * const data, int size);
int main(int argc, char * argv[])
{
ProblemEngine<> engine("input.txt");
if (!engine.IsFileOk())
{
std::cout << "Unable to open input.txt" << std::endl;
return 1;
}
auto testCases = en... | ```c++
#include <iostream>
#include "..\..\shared\ProblemEngine.h"
int FindShortestPath(int ** data, int rowSize);
int** CreateMatrix(const int * const input, int rowSize)
{
auto ret = new int*[rowSize];
for (int i = 0; i < rowSize; ++i)
{
ret[i] = new int[rowSize];
for (int j = 0; j < rowSize; ++j)
ret[i]... |
53c5f2d2-2060-4f87-8ef3-1257ed648664 | {
"language": "C++"
} | ```c++
#include <cstdlib>
#include <ATK/EQ/BesselFilter.h>
#include <ATK/EQ/IIRFilter.h>
#include <ATK/Mock/SimpleSinusGeneratorFilter.h>
int main(int argc, char** argv)
{
ATK::SimpleSinusGeneratorFilter<double> generator;
generator.set_output_sampling_rate(1024 * 64);
generator.set_amplitude(1);
generator.s... | ```c++
#include <cstdlib>
#include <ATK/EQ/BesselFilter.h>
#include <ATK/EQ/IIRFilter.h>
#include <ATK/Mock/SimpleSinusGeneratorFilter.h>
int main(int argc, char** argv)
{
ATK::SimpleSinusGeneratorFilter<double> generator;
generator.set_output_sampling_rate(1024 * 64);
generator.set_amplitude(1);
generator.s... |
986f9ef9-d102-4b33-b17c-a27df6180996 | {
"language": "C++"
} | ```c++
// Copyright 2017 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... | ```c++
// Copyright 2017 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... |
3a59927b-fd35-4bb5-8c11-82f63f0d6e3c | {
"language": "C++"
} | ```c++
#include <Python.h>
#include "Quantuccia/ql/time/calendars/unitedstates.hpp"
static PyObject*
get_holiday_date(PyObject *self, PyObject *args)
{
return NULL;
}
static PyMethodDef QuantucciaMethods[] = {
{"get_holiday_date", (PyCFunction)get_holiday_date, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}
};
st... | ```c++
#include <Python.h>
#include "Quantuccia/ql/time/calendars/unitedstates.hpp"
static PyObject*
get_holiday_date(PyObject *self, PyObject *args)
{
return Py_None;
}
static PyMethodDef QuantucciaMethods[] = {
{"get_holiday_date", (PyCFunction)get_holiday_date, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}
};
... |
44c2b41c-a034-4817-85aa-02321d5f135a | {
"language": "C++"
} | ```c++
#include <iostream>
#include <string>
#include <utility>
#include <map>
#include <vector>
#include <functional>
#include <useful/sort.hpp>
#include <useful/range.hpp>
using namespace useful;
using wcount = std::map<std::string, int>;
int main(void) {
wcount words;
std::string word;
while (std::cin >> wor... | ```c++
#include <iostream>
#include <string>
#include <utility>
#include <map>
#include <vector>
#include <functional>
#include <algorithm>
#include <useful/sort.hpp>
#include <useful/range.hpp>
using namespace useful;
using wcount = std::map<std::string, int>;
int main(void) {
wcount words;
std::string word;
w... |
9e2cfbe0-8a59-423e-974e-45dc59589c38 | {
"language": "C++"
} | ```c++
#include <aerial_autonomy/common/html_utils.h>
#include <gtest/gtest.h>
#include <iostream>
/// \brief TEST
/// Simple Html table tests
TEST(HtmlTableWriterTests, SimpleTable) {
HtmlTableWriter table_writer;
table_writer.beginRow();
table_writer.addHeader("Header");
table_writer.beginRow();
double dat... | ```c++
#include <aerial_autonomy/common/html_utils.h>
#include <gtest/gtest.h>
#include <iostream>
/// \brief TEST
/// Simple Html table tests
TEST(HtmlTableWriterTests, SimpleTable) {
HtmlTableWriter table_writer;
table_writer.beginRow();
table_writer.addHeader("Header");
table_writer.beginRow();
double dat... |
a4e37e15-46f8-43de-848d-93f8e7aa2fb1 | {
"language": "C++"
} | ```c++
#include "KVNetworkAccessManager.h"
#include <QDebug>
#include "KVNetworkReply.h"
KVNetworkAccessManager::KVNetworkAccessManager(QObject *parent) :
QNetworkAccessManager(parent)
{
}
QNetworkReply *KVNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
{
Q... | ```c++
#include "KVNetworkAccessManager.h"
#include <QDebug>
#include "KVNetworkReply.h"
KVNetworkAccessManager::KVNetworkAccessManager(QObject *parent) :
QNetworkAccessManager(parent)
{
}
QNetworkReply *KVNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
{
Q... |
0e9e40ce-811d-4bd4-9931-924e8c9de6ef | {
"language": "C++"
} | ```c++
// Tests -fsanitize-coverage=inline-8bit-counters
//
// REQUIRES: has_sancovcc,stable-runtime
// UNSUPPORTED: i386-darwin
//
// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1
#include <stdio.h>
#include <assert.h>
const char *first_counter;
extern "C"
void __sanitizer_cov_8bit_counters_ini... | ```c++
// Tests -fsanitize-coverage=inline-8bit-counters
//
// REQUIRES: has_sancovcc,stable-runtime
// UNSUPPORTED: i386-darwin, x86_64-darwin
//
// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1
#include <stdio.h>
#include <assert.h>
const char *first_counter;
extern "C"
void __sanitizer_cov_8b... |
c79b2e00-3b67-4601-ba8d-abaf6f7764bc | {
"language": "C++"
} | ```c++
#include <QTest>
#include "test-suite.h"
#include "custom-network-access-manager.h"
#include <iostream>
int main(int argc, char *argv[])
{
#ifdef HEADLESS
QCoreApplication a(argc, argv);
#else
QGuiApplication a(argc, argv);
#endif
QMap<QString,int> results;
int failed = 0;
CustomNetworkAccessManage... | ```c++
#include <QTest>
#include "test-suite.h"
#include "custom-network-access-manager.h"
#include <iostream>
int main(int argc, char *argv[])
{
#ifdef HEADLESS
QCoreApplication a(argc, argv);
#else
QGuiApplication a(argc, argv);
#endif
QStringList testSuites;
for (int i = 1; i < argc; ++i)
testSuites.ap... |
fb486c0d-6d6c-4915-9d3d-9b2510c84f62 | {
"language": "C++"
} | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "b... | ```c++
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "b... |
478394fd-c048-4612-affa-8891e2401829 | {
"language": "C++"
} | ```c++
#include <%QAPP_INCLUDE%>
#include "%INCLUDE%"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
%CLASS% w;
#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
w.showMaximized();
#else
w.show();
#endif
return a.exec();
}
```
Remove special showMaximized case for Maemo 5 | ```c++
#include <%QAPP_INCLUDE%>
#include "%INCLUDE%"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
%CLASS% w;
#if defined(Q_WS_S60)
w.showMaximized();
#else
w.show();
#endif
return a.exec();
}
``` |
647c4fc4-7a64-437a-97c7-fba442d98ebb | {
"language": "C++"
} | ```c++
#include <string>
#include <ccspec/core/hooks.h>
#include <ccspec/core/example_group.h>
namespace ccspec {
namespace core {
void before(std::string scope, Hook hook) {
ExampleGroup* parent_group = groups_being_defined.top();
if (scope == "each" || scope == "example")
parent_group->addBeforeEach... | ```c++
#include <string>
#include <ccspec/core/hooks.h>
#include <ccspec/core/example_group.h>
namespace ccspec {
namespace core {
void before(std::string scope, Hook hook) {
ExampleGroup* parent_group = groups_being_defined.top();
if (scope == "each" || scope == "example")
parent_group->addBeforeEach... |
41b41d08-c6da-44bc-a585-35ad8bb2b0c2 | {
"language": "C++"
} | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/find_bar_host.h"
#include "base/logging.h"
#include "ui/base/events/event.h"
void FindBarHost::AudibleAlert... | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/find_bar_host.h"
#include "base/logging.h"
#include "ui/base/events/event.h"
void FindBarHost::AudibleAlert... |
bd276764-c2ba-4cbe-82f4-9e447810b76f | {
"language": "C++"
} | ```c++
//===--- UnaryStaticAssertCheck.cpp - clang-tidy---------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------... | ```c++
//===--- UnaryStaticAssertCheck.cpp - clang-tidy---------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------... |
b7808e28-648d-4d22-af2f-538b31e0b54f | {
"language": "C++"
} | ```c++
// Copyright (C) 2017 Elviss Strazdins
// This file is part of the Ouzel engine.
#include <bcm_host.h>
#include "WindowResourceRasp.hpp"
#include "utils/Log.hpp"
namespace ouzel
{
WindowResourceRasp::WindowResourceRasp()
{
bcm_host_init();
}
WindowResourceRasp::~WindowResourceRasp()
... | ```c++
// Copyright (C) 2017 Elviss Strazdins
// This file is part of the Ouzel engine.
#include <bcm_host.h>
#include "WindowResourceRasp.hpp"
#include "utils/Log.hpp"
namespace ouzel
{
WindowResourceRasp::WindowResourceRasp()
{
bcm_host_init();
}
WindowResourceRasp::~WindowResourceRasp()
... |
77ea573f-9a85-4285-a6d6-e97e08ae20cb | {
"language": "C++"
} | ```c++
/*************************************************************************
> File Name: ruleOfFive.cpp
> Author: Chan-Ho Chris Ohk
> E-mail: utilForever@gmail.com, utilForever@kaist.ac.kr
> Created Time: 2015/4/24
> Personal Blog: https://github.com/utilForever
***************************************************... | ```c++
/*************************************************************************
> File Name: ruleOfFive.cpp
> Author: Chan-Ho Chris Ohk
> E-mail: utilForever@gmail.com, utilForever@kaist.ac.kr
> Created Time: 2015/4/26
> Personal Blog: https://github.com/utilForever
***************************************************... |
bcc70f67-2cd1-4466-b81c-a31d99352b07 | {
"language": "C++"
} | ```c++
#include "check_unique_char.h"
```
Add functions to new problem for CheckUniqueChar | ```c++
// Solution to problem from Crack Coding interviews. Implement an
// algorithm to determine if a string has all unique characters
#include "check_unique_char.h"
CheckUniqueChar::CheckUniqueChar() {
}
CheckUniqueChar::~CheckUniqueChar() {
}
// Takes O(n) running time
bool CheckUniqueChar::solver_boolean(std... |
603e5b28-6366-4b99-a01b-bc59d614e530 | {
"language": "C++"
} | ```c++
#include <GL/gl.h>
#include <orz/exception.h>
#include "hw3d_opengl_texture.h"
namespace Hw3D
{
Texture::Lock OpenGlTexture::LockRegion(const Geom::RectInt ®ion, bool readOnly)
{
return Texture::Lock();
}
void OpenGlTexture::UnlockRegion()
{
}
OpenGlTexture::OpenGlTexture(Geom::SizeInt dimensions... | ```c++
#include <GL/gl.h>
#include <orz/exception.h>
#include "hw3d_opengl_texture.h"
#include "hw3d_opengl_common.h"
namespace Hw3D
{
Texture::Lock OpenGlTexture::LockRegion(const Geom::RectInt ®ion, bool readOnly)
{
return Texture::Lock();
}
void OpenGlTexture::UnlockRegion()
{
}
OpenGlTexture::OpenGl... |
85ef88f5-97b7-460d-bfbc-226e4b56e808 | {
"language": "C++"
} | ```c++
#include "CppUTest\CommandLineTestRunner.h"
#include <stdio.h>
#include "mbed.h"
#include "testrunner.h"
#include "test_env.h"
/**
Object 'console' is used to show prints on console.
It is declared in \cpputest\src\Platforms\armcc\UtestPlatform.cpp
*/
Serial console(STDIO_UART_TX, STDIO_UART_RX);
int main(int ... | ```c++
#include "CommandLineTestRunner.h"
#include <stdio.h>
#include "mbed.h"
#include "testrunner.h"
#include "test_env.h"
/**
Object 'console' is used to show prints on console.
It is declared in \cpputest\src\Platforms\armcc\UtestPlatform.cpp
*/
Serial console(STDIO_UART_TX, STDIO_UART_RX);
int main(int ac, char*... |
c12b7578-23b8-4b5b-b8b8-07441ea1666a | {
"language": "C++"
} | ```c++
#include <inttypes.h>
#include <stdio.h>
extern "C" bool _TSsop2leFT3lhsNSs5int643rhsS__NSs4bool(int64_t l, int64_t r) {
return l <= r;
}
extern "C" double _TSsop1sFT1aNSs6double_S_(double x) {
return -x;
}
extern "C" void _T3fib5printFT1iNSs5int64_T_(int64_t l) {
printf("%lld\n", l);
}
extern "C" v... | ```c++
#include <inttypes.h>
#include <stdio.h>
extern "C" void _T3fib5printFT1iNSs5int64_T_(int64_t l) {
printf("%lld\n", l);
}
extern "C" void _T3fib5printFT1iNS_6double_T_(double l) {
printf("%f\n", l);
}
extern "C" void _T5nbody5printFT1iNSs6double_T_(double l) {
printf("%f\n", l);
}
// This cannot be imp... |
fd2daf39-2a7d-4ee2-826e-3cc951fcb60f | {
"language": "C++"
} | ```c++
#include <QPixmap>
#include "restdialog.h"
RestDialog::RestDialog(QWidget *parent) :
QDialog(parent)
{
Qt::WindowFlags flags = windowFlags();
setWindowFlags((flags & ~Qt::WindowContextHelpButtonHint) |
Qt::WindowStaysOnTopHint);
ui_restDialog = QSharedPointer<Ui::RestDialog>... | ```c++
#include <QPixmap>
#include <QDesktopWidget>
#include "restdialog.h"
RestDialog::RestDialog(QWidget *parent) :
QDialog(parent)
{
Qt::WindowFlags flags = windowFlags();
setWindowFlags((flags & ~Qt::WindowContextHelpButtonHint) |
Qt::WindowStaysOnTopHint);
ui_restDialog = QSha... |
29e7e9d9-28d1-4201-b885-8b4e114a63c9 | {
"language": "C++"
} | ```c++
#include "behaviours/audio_voice_fade_behaviour.h"
#include "../audio_voice.h"
#include "audio_facade.h"
#include "halley/utils/utils.h"
using namespace Halley;
AudioVoiceFadeBehaviour::AudioVoiceFadeBehaviour(float fadeTime, float sourceVolume, float targetVolume, bool stopAtEnd)
: curTime(0)
, fadeTime(fad... | ```c++
#include "behaviours/audio_voice_fade_behaviour.h"
#include "../audio_voice.h"
#include "audio_facade.h"
#include "halley/utils/utils.h"
using namespace Halley;
AudioVoiceFadeBehaviour::AudioVoiceFadeBehaviour(float fadeTime, float sourceVolume, float targetVolume, bool stopAtEnd)
: curTime(0)
, fadeTime(fad... |
f08f3191-6d83-421f-aa2a-55a803cb0622 | {
"language": "C++"
} | ```c++
// RUN: %clangxx -w -fsanitize=bool %s -o %t
// RUN: %run %t 2>&1 | FileCheck %s
#include <iostream>
extern "C" {
void __ubsan_get_current_report_data(const char **OutIssueKind,
const char **OutMessage,
const char **OutFilename,
... | ```c++
// RUN: %clangxx -w -fsanitize=bool %s -o %t
// RUN: %run %t 2>&1 | FileCheck %s
// __ubsan_on_report is not defined as weak. Redefining it here isn't supported
// on Windows.
//
// UNSUPPORTED: win32
#include <iostream>
extern "C" {
void __ubsan_get_current_report_data(const char **OutIssueKind,
... |
9f74bd3f-294c-4048-8611-513d5e3a7dce | {
"language": "C++"
} | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/extensions/api_definitions_natives.h"
#include <algorithm>
#include "chrome/common/extensions/features/base_feature... | ```c++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/extensions/api_definitions_natives.h"
#include <algorithm>
#include "chrome/common/extensions/features/base_feature... |
b0902fd9-4523-4af5-9556-aee5c6aca8f4 | {
"language": "C++"
} | ```c++
#include <cstdio>
#include <cstdlib>
#include "util/debug.hpp"
bool nest::mc::util::failed_assertion(const char *assertion, const char *file,
int line, const char *func)
{
std::fprintf(stderr, "%s:%d %s: Assertion `%s' failed.\n", file, line, func, assertion);
std:... | ```c++
#include <cstdlib>
#include <iostream>
#include "util/debug.hpp"
bool nest::mc::util::failed_assertion(const char *assertion, const char *file,
int line, const char *func)
{
// Explicit flush, as we can't assume default buffering semantics on stderr/cerr,
// and ab... |
c2d82ee3-0868-4ae7-934f-f152fa17e1e9 | {
"language": "C++"
} | ```c++
#include "./Sphere.hpp"
#include "./misc.hpp"
#include <algorithm>
#include <cmath>
namespace yks {
Optional<float> intersect(const vec3& origin, float radius, const Ray& r) {
const vec3 o = r.origin - origin;
const vec3 v = r.direction;
float t1, t2;
const int solutions = solve_quadratic(dot(v, v), ... | ```c++
#include "./Sphere.hpp"
#include "./misc.hpp"
#include <algorithm>
#include <cmath>
namespace yks {
Optional<float> intersect(const vec3& origin, float radius, const Ray& r) {
const vec3 o = r.origin - origin;
const vec3 v = r.direction;
float t1, t2;
const int solutions = solve_quadratic(dot(v, v), ... |
148be647-f195-4aab-9088-19bf313b3e1f | {
"language": "C++"
} | ```c++
/*
* AnimationTask.cpp
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <esp_log.h>
#include "nvs_flash.h"
#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#inc... | ```c++
/*
* AnimationTask.cpp
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <esp_log.h>
#include "nvs_flash.h"
#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#inc... |
f4462bcb-2c4e-44f3-b75a-7485107204a1 | {
"language": "C++"
} | ```c++
/*
* AnimationTask.cpp
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <esp_log.h>
#include "AnimationTask.h"
#include "sdkconfig.h"
static char tag[] = "AnimationTask";
Animati... | ```c++
/*
* AnimationTask.cpp
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <esp_log.h>
#include "AnimationTask.h"
#include "sdkconfig.h"
static char tag[] = "AnimationTask";
Animati... |
df79a5a7-e734-46e8-92fc-8528700ef186 | {
"language": "C++"
} | ```c++
#include <boost/test/unit_test.hpp>
#include "../uint256.h"
extern void SHA256Transform(void* pstate, void* pinput, const void* pinit);
BOOST_AUTO_TEST_SUITE(miner_tests)
BOOST_AUTO_TEST_CASE(sha256transform_equality)
{
unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0... | ```c++
#include <boost/test/unit_test.hpp>
#include "../uint256.h"
extern void SHA256Transform(void* pstate, void* pinput, const void* pinit);
BOOST_AUTO_TEST_SUITE(miner_tests)
BOOST_AUTO_TEST_CASE(sha256transform_equality)
{
unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0... |
b9b51048-a851-448c-822e-dff278953c80 | {
"language": "C++"
} | ```c++
//=======================================================================
// Copyright Baptiste Wicht 2011-2012.
// 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)
//=========================================... | ```c++
//=======================================================================
// Copyright Baptiste Wicht 2011-2012.
// 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)
//=========================================... |
70847749-f787-44aa-babd-1996689ea1f0 | {
"language": "C++"
} | ```c++
#include "tags/tag-database-factory.h"
#include <QFile>
#include "tags/tag-database-in-memory.h"
#include "tags/tag-database-sqlite.h"
TagDatabase *TagDatabaseFactory::Create(QString directory)
{
if (!directory.endsWith("/") && !directory.endsWith("\\")) {
directory += "/";
}
const QString typesFile = di... | ```c++
#include "tags/tag-database-factory.h"
#include <QFile>
#include "tags/tag-database-in-memory.h"
#include "tags/tag-database-sqlite.h"
TagDatabase *TagDatabaseFactory::Create(QString directory)
{
if (!directory.endsWith("/") && !directory.endsWith("\\")) {
directory += "/";
}
const QString typesFile = di... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.