doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
39702955-3894-458e-80c3-07945b5fffff | {
"language": "C++"
} | ```c++
/******************************************************************************
* Copyright 2017 The Apollo 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 Lice... | ```c++
/******************************************************************************
* Copyright 2017 The Apollo 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 Lice... |
bfd38f2e-55d7-4b99-8337-6d0b5fb4f260 | {
"language": "C++"
} | ```c++
// RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o - | FileCheck %s
// CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}}, i32 258
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
union {
int a;
float b;
} u;
class A {
protected:
void foo(int, A, d... | ```c++
// RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o - | FileCheck %s
// CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}} [protected]
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
union {
int a;
float b;
} u;
class A {
protected:
void foo(int, A... |
b25f8e9e-a35d-40ae-9ac5-a8c91f611bbc | {
"language": "C++"
} | ```c++
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied war... | ```c++
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied war... |
a8874640-ad2d-48e5-91ef-82a613c25cad | {
"language": "C++"
} | ```c++
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkSGImage.h"
#include "SkCanvas.h"
#include "SkImage.h"
namespace sksg {
Image::Image(sk_sp<SkImage> image) : fImage(std::move(image)) {}
void Image::onRe... | ```c++
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkSGImage.h"
#include "SkCanvas.h"
#include "SkImage.h"
namespace sksg {
Image::Image(sk_sp<SkImage> image) : fImage(std::move(image)) {}
void Image::onRe... |
2a5611c7-99a1-4f70-858f-0678fc673067 | {
"language": "C++"
} | ```c++
#include "document.hpp"
Document::Document(const std::string & filename) : _filename(filename) {}
Document::~Document() {}
std::string Document::filename(void) const {
return _filename;
}
void Document::append_paragraph(Paragraph * p) {
_paragraph.push_back(p);
}
size_t Document::size(void) const {
retur... | ```c++
#include "document.hpp"
Document::Document(const std::string & filename) : _filename(filename) {}
Document::~Document() {}
std::string Document::filename(void) const {
return _filename;
}
void Document::append_paragraph(Paragraph * p) {
if (p and p->size()) {
_paragraph.push_back(p);
}
}
size_t Documen... |
ba70311a-079d-4c49-b676-8f5dbd1ef66c | {
"language": "C++"
} | ```c++
//===-- GCMetadataPrinter.cpp - Garbage collection infrastructure ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------... | ```c++
//===-- GCMetadataPrinter.cpp - Garbage collection infrastructure ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------... |
e33b2531-988b-4bae-9359-69eddca8e63b | {
"language": "C++"
} | ```c++
#include "common.h"
uint8_t packet[64];
int main(void)
{
DCO::init();
ACLK::init();
SMCLK::init();
MCLK::init();
WDT::init();
WDT::enable_irq();
PORT1::init();
PORT2::init();
LED_RED::set_high();
#ifndef __MSP430_HAS_USCI__
TIMER::init();
#endif
UART::init();
printf<UART>("CC110X example start.\n"... | ```c++
#include "common.h"
uint8_t packet[64];
int main(void)
{
DCO::init();
ACLK::init();
SMCLK::init();
MCLK::init();
WDT::init();
WDT::enable_irq();
PORT1::init();
PORT2::init();
LED_RED::set_high();
#ifndef __MSP430_HAS_USCI__
TIMER::init();
#endif
UART::init();
printf<UART>("CC110X example start.\n"... |
400ac829-16e6-4012-b954-1d728e5a5732 | {
"language": "C++"
} | ```c++
#include "YarpStateDirector.hpp"
const int rd::YarpStateDirector::DEFAULT_RATE_MS = 100;
rd::YarpStateDirector::YarpStateDirector(rd::State *state) : StateDirector(state), RateThread(DEFAULT_RATE_MS)
{
}
bool rd::YarpStateDirector::Start()
{
RD_DEBUG("Starting StateDirector for id %s\n", state->getState... | ```c++
#include "YarpStateDirector.hpp"
const int rd::YarpStateDirector::DEFAULT_RATE_MS = 100;
rd::YarpStateDirector::YarpStateDirector(rd::State *state) : StateDirector(state), RateThread(DEFAULT_RATE_MS)
{
}
bool rd::YarpStateDirector::Start()
{
RD_DEBUG("Starting StateDirector for id %s\n", state->getState... |
324afadd-a867-457b-b12c-d7d4c5e3b3d7 | {
"language": "C++"
} | ```c++
// Copyright (c) 2008 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 "config.h"
#include "PluginData.h"
#include "PluginInfoStore.h"
#undef LOG
#include "webkit/glue/glue_util.h"
#include "webkit/glue... | ```c++
// Copyright (c) 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list o... |
a53276de-7f7c-4313-89d1-dca1fcb91994 | {
"language": "C++"
} | ```c++
#include <cstdio>
#include <cstdlib>
#include <signal.h>
#include <unistd.h>
#include "Updater.h"
static int DaemonPID = -1;
int RunDaemon(void *Arg) {
while (1) {
printf("daemon is running...\n");
sleep(1);
}
return 0;
}
int StartDaemon() {
static const int ChildStackSize = 1024 * 1024;
char... | ```c++
#include <cstdio>
#include <cstdlib>
#include <signal.h>
#include <unistd.h>
#include <sys/prctl.h>
#include "Updater.h"
static int DaemonPID = -1;
int RunDaemon(void *Arg) {
if (prctl(PR_SET_NAME, "loom-daemon", 0, 0, 0) == -1) {
perror("prctl");
}
while (1) {
fprintf(stderr, "daemon is running... |
8961df92-d7c9-4206-a5bd-ffe59648d350 | {
"language": "C++"
} | ```c++
//===----------------------------------------------------------------------===//
//
// Peloton
//
// transaction_manager_factory.h
//
// Identification: src/backend/concurrency/transaction_manager_factory.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===---... | ```c++
//===----------------------------------------------------------------------===//
//
// Peloton
//
// transaction_manager_factory.h
//
// Identification: src/backend/concurrency/transaction_manager_factory.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===---... |
8b0e506a-906d-43b1-8f95-0368f2e82afa | {
"language": "C++"
} | ```c++
#include "platform.hpp"
#ifndef WIN32
namespace Mirb
{
namespace Platform
{
std::string BenchmarkResult::format()
{
std::stringstream result;
result << ((double)time / 1000) << " ms";
return result.str();
}
void *allocate_region(size_t bytes)
{
void *result = mmap(0, bytes, PROT_READ... | ```c++
#include "platform.hpp"
#include "../collector.hpp"
#include <signal.h>
#ifndef WIN32
namespace Mirb
{
namespace Platform
{
std::string BenchmarkResult::format()
{
std::stringstream result;
result << ((double)time / 1000) << " ms";
return result.str();
}
void *allocate_region(size_t bytes... |
2741b341-ff31-45e4-8d7b-a47ef58f50c8 | {
"language": "C++"
} | ```c++
/* Copyright 2017 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 2017 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... |
85893a7d-4675-46be-b52c-22b0c6bee056 | {
"language": "C++"
} | ```c++
/*
* This file is part of Peli - universal JSON interaction library
* Copyright (C) 2014 Alexey Chernov <4ernov@gmail.com>
*
* Peli 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
... | ```c++
/*
* This file is part of Peli - universal JSON interaction library
* Copyright (C) 2014 Alexey Chernov <4ernov@gmail.com>
*
* Peli 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
... |
3f9d091c-74e0-4396-991c-6c573d3f621e | {
"language": "C++"
} | ```c++
// An empty test as a placeholder
#include "gtest/gtest.h"
#include <opencv2/core.hpp>
using namespace cv;
#include "AprilTags/Corners.h"
#include "AprilTags/TagFamily.h"
#include "AprilTags/Tag36h11.h"
using namespace AprilTags;
TEST( CornersTest, MakeTagMat ) {
const int WhichTag = 34;
const TagCodes &... | ```c++
// An empty test as a placeholder
#include "gtest/gtest.h"
#include <opencv2/core.hpp>
using namespace cv;
#include "AprilTags/Corners.h"
#include "AprilTags/TagFamily.h"
#include "AprilTags/Tag36h11.h"
using namespace AprilTags;
TEST( CornersTest, MakeTagMat ) {
const int WhichTag = 34;
const TagCodes &... |
4918773d-97dc-4676-9e7e-c4a14b3cdc7f | {
"language": "C++"
} | ```c++
// RUN: %clang_cc1 -fsyntax-only %s 2>&1|FileCheck %s
// <rdar://problem/9221993>
// We only care to chek whether the compiler crashes; the actual
// diagnostics are uninteresting.
// CHECK: 8 errors generated.
template<class _CharT> struct char_traits;
template<typename _CharT, typename _Traits = char_tra... | ```c++
// RUN: %clang_cc1 -fsyntax-only %s 2>&1|FileCheck %s
// <rdar://problem/9221993>
// We only care to check whether the compiler crashes; the actual
// diagnostics are uninteresting.
// CHECK: 8 errors generated.
template<class _CharT> struct char_traits;
template<typename _CharT, typename _Traits = char_tr... |
e67858c4-451f-46bc-be3b-a85d107fb986 | {
"language": "C++"
} | ```c++
/*
Author: vpetrigo
Task:
0.
,
, ,
.
,
0 ( 0 , ).
.
Sample Input 1:
4
4
2
3
0
Sample Output 1:
4
Sample Input 2:
2
1
0
Sample Output 2:
1
*/
#include <iostream>
using namespace std;
int main() {
int n;
int max = -1;
int s_max = -1;
while (c... | ```c++
/*
Author: vpetrigo
Task:
0.
,
, ,
.
,
0 ( 0 , ).
.
Sample Input 1:
4
4
2
3
0
Sample Output 1:
4
Sample Input 2:
2
1
0
Sample Output 2:
1
*/
#include <iostream>
using namespace std;
int main() {
int n;
int max = -1;
int s_max = -1;
while (c... |
2cc02fa1-c5a9-426b-8992-975113be32f4 | {
"language": "C++"
} | ```c++
////////////////////////////////////////////////////////////////////////////////
//
// cagey-engine - Toy 3D Engine
// Copyright (c) 2014 Kyle Girard <theycallmecoach@gmail.com>
//
// The MIT License (MIT)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and ... | ```c++
////////////////////////////////////////////////////////////////////////////////
//
// cagey-engine - Toy 3D Engine
// Copyright (c) 2014 Kyle Girard <theycallmecoach@gmail.com>
//
// The MIT License (MIT)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and ... |
9a0053e3-039f-4b39-bf23-9ed5eef28fa7 | {
"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_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a s... | ```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_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a s... |
64c08351-3266-4f24-8027-d67900e0f398 | {
"language": "C++"
} | ```c++
#include <silicon/api.hh>
#include <silicon/remote_api.hh>
#include <silicon/backends/websocketpp.hh>
#include "symbols.hh"
using namespace s;
int main(int argc, char* argv[])
{
using namespace sl;
auto rclient = make_wspp_remote_api(_echo(_text));
auto server_api = make_api(_echo(_text) = [rclient] (au... | ```c++
#include <silicon/api.hh>
#include <silicon/remote_api.hh>
#include <silicon/backends/websocketpp.hh>
#include "symbols.hh"
using namespace s;
int main(int argc, char* argv[])
{
using namespace sl;
auto rclient = make_wspp_remote_client(_echo(_text));
auto server_api = make_api(_echo(_text) = [rclient] ... |
7e3af3c6-7199-400d-9058-081b529963dd | {
"language": "C++"
} | ```c++
#include "details.hpp"
#include "json/json.h"
dota2::DetailsRequest &dota2::DetailsRequest::id(MatchID id)
{
query.insert({"match_id", std::to_string(id)});
return *this;
}
dota2::Details::Details(const Json::Value &json)
{
matchID = json["result"]["match_id"].asInt();
startTime = timePoint(jso... | ```c++
#include "details.hpp"
#include "json/json.h"
dota2::DetailsRequest &dota2::DetailsRequest::id(MatchID id)
{
query.insert({"match_id", std::to_string(id)});
return *this;
}
dota2::Details::Details(const Json::Value &json)
{
const auto& result = json["result"];
matchID = result["match_id"].asIn... |
cb887734-1a5a-4932-a23d-c6b44af550ca | {
"language": "C++"
} | ```c++
/*
* Copyright 2011 Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*/
#include <QtDeclarative/QDeclarativeEngine>
#include <QDeclarativeContext>
#... | ```c++
/*
* Copyright 2011 Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*/
#include <QtDeclarative/QDeclarativeEngine>
#include <QDeclarativeContext>
#... |
65cddc72-6052-4fda-9038-cd38b67b65ce | {
"language": "C++"
} | ```c++
#include <node.h>
#include <v8.h>
#include <iostream>
#include <string>
using namespace v8;
using namespace std;
Handle<Value> Prompt(const Arguments& args) {
HandleScope scope;
string retval;
cin >> retval;
return scope.Close(String::New(retval.c_str()));
}
void init(Handle<Object> exports) {
expor... | ```c++
#include <node.h>
#include <v8.h>
#include <iostream>
#include <string>
using namespace v8;
using namespace std;
Handle<Value> Prompt(const Arguments& args) {
HandleScope scope;
string retval;
getline(cin, retval);
return scope.Close(String::New(retval.c_str()));
}
void init(Handle<Object> exports) {
... |
f993a6a2-bca1-4ec6-afa8-97329da42714 | {
"language": "C++"
} | ```c++
//---------------------------- job_identifier.cc ---------------------------
// $Id$
// Version: $Name$
//
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please re... | ```c++
//---------------------------- job_identifier.cc ---------------------------
// $Id$
// Version: $Name$
//
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please re... |
f8f3a25d-05e5-4a80-92b6-3479854fd67c | {
"language": "C++"
} | ```c++
// Chapter 16, exercise 10: function grapher: user can choose among a set of
// functions (e.g., sin() and log(), provide parameters for those functions and
// then graph them
#include "Simple_window.h"
#include "Graph.h"
int main()
try {
Point tl(400,150);
Fgraph_window fwin(tl,800,605,"Function Graph... | ```c++
// Chapter 16, exercise 10: function grapher: user can choose among a set of
// functions (e.g., sin() and log(), provide parameters for those functions and
// then graph them
#include "../lib_files/Simple_window.h"
#include "../lib_files/Graph.h"
int main()
try {
Point tl(400,150);
Fgraph_window fwin(... |
be72691a-ed2a-4e15-b5b9-253fb7baab78 | {
"language": "C++"
} | ```c++
// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O1 -fmerge-functions -emit-llvm -o - -x c++ < %s | FileCheck %s
// Basic functionality test. Function merging doesn't kick in on functions that
// are too simple.
struct A {
virtual int f(int x, int *p) { return x ? *p : 1; }
... | ```c++
// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O1 -fmerge-functions -emit-llvm -o - -x c++ < %s | FileCheck %s -implicit-check-not=_ZN1A1gEiPi
// Basic functionality test. Function merging doesn't kick in on functions that
// are too simple.
struct A {
virtual int f(int x,... |
9bca72d0-7e7f-4e11-8b62-f8f52b7dcbbe | {
"language": "C++"
} | ```c++
#include <test.hpp>
TEST_CASE("default constructed varint_iterators are equal") {
protozero::const_varint_iterator<uint32_t> a{};
protozero::const_varint_iterator<uint32_t> b{};
protozero::iterator_range<protozero::const_varint_iterator<uint32_t>> r{};
REQUIRE(a == a);
REQUIRE(a == b);
... | ```c++
#include <test.hpp>
TEST_CASE("default constructed varint_iterators are equal") {
protozero::const_varint_iterator<uint32_t> a{};
protozero::const_varint_iterator<uint32_t> b{};
protozero::iterator_range<protozero::const_varint_iterator<uint32_t>> r{};
REQUIRE(a == a);
REQUIRE(a == b);
... |
2a47c1a1-441e-41d0-9570-77372ef43590 | {
"language": "C++"
} | ```c++
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
int getDecimal... | ```c++
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
int getDecimal... |
18ee86a1-08eb-4d9d-99d9-f936a93a4b2f | {
"language": "C++"
} | ```c++
#include <gloperate/gloperate.h>
#include <cpplocate/cpplocate.h>
namespace
{
std::string determineDataPath()
{
std::string path = cpplocate::locatePath("data/gloperate", "share/gloperate", reinterpret_cast<void *>(&gloperate::dataPath));
if (path.empty()) path = "./data";
else path... | ```c++
#include <gloperate/gloperate.h>
#include <cppassist/fs/FilePath.h>
#include <cpplocate/cpplocate.h>
namespace
{
std::string determineDataPath()
{
std::string path = cpplocate::locatePath("data/gloperate", "share/gloperate", reinterpret_cast<void *>(&gloperate::dataPath));
if (path.empty()) path = ... |
cf40f4a9-f691-4ca4-a08d-ca0c6903042b | {
"language": "C++"
} | ```c++
#include "SkTypeface.h"
// ===== Begin Chrome-specific definitions =====
uint32_t SkTypeface::UniqueID(const SkTypeface* face)
{
return NULL;
}
void SkTypeface::serialize(SkWStream* stream) const {
}
SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
return NULL;
}
// ===== End Chrome-specific de... | ```c++
#include "SkTypeface.h"
// ===== Begin Chrome-specific definitions =====
uint32_t SkTypeface::UniqueID(const SkTypeface* face)
{
return 0;
}
void SkTypeface::serialize(SkWStream* stream) const {
}
SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
return NULL;
}
// ===== End Chrome-specific defin... |
a6649e08-7f15-41f0-955e-003abd63bf8b | {
"language": "C++"
} | ```c++
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | ```c++
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
d33aea71-db52-4a00-b168-937b1c32a6ea | {
"language": "C++"
} | ```c++
#include "../quick.hpp"
#include "../swap.hpp"
void quick(int *data, const int size_of_data)
{
return quick(data, 0, size_of_data - 1);
}
void quick(int *data, const int start, const int end)
{
int size = end - start + 1;
if(start >= end) return; /* Base case */
/* Conquer */
int pivot = ... | ```c++
#include "../quick.hpp"
#include "../swap.hpp"
void quick(int *data, const int size_of_data)
{
return quick(data, 0, size_of_data - 1);
}
void quick(int *data, const int start, const int end)
{
int size = end - start + 1;
if(start >= end) return; /* Base case */
/* Conquer */
int pivot = ... |
aa16a27e-a55c-40c9-9f5a-5782e3d7391f | {
"language": "C++"
} | ```c++
#include "OI.h"
#include "RobotMap.h"
#include "Commands/ElevatorUpCommand.h"
#include "Commands/ElevatorDownCommand.h"
OI::OI() : joystick(JOYSTICK)
{
// Process operator interface input here.
}
```
Remove Elevatorup/down command from oi | ```c++
#include "OI.h"
#include "RobotMap.h"
OI::OI() : joystick(JOYSTICK)
{
// Process operator interface input here.
}
``` |
e7220df6-526a-47c7-bf13-07f5b36511f2 | {
"language": "C++"
} | ```c++
#include "NOTDocumentIterator.h"
using namespace sf1r;
using namespace std;
NOTDocumentIterator::NOTDocumentIterator()
{
setNot(true);
}
NOTDocumentIterator::~NOTDocumentIterator()
{
}
void NOTDocumentIterator::add(DocumentIterator* pDocIterator)
{
docIteratorList_.push_back(pDocIterat... | ```c++
#include "NOTDocumentIterator.h"
using namespace sf1r;
using namespace std;
NOTDocumentIterator::NOTDocumentIterator()
{
}
NOTDocumentIterator::~NOTDocumentIterator()
{
}
void NOTDocumentIterator::add(DocumentIterator* pDocIterator)
{
docIteratorList_.push_back(pDocIterator);
}
bool NO... |
88c99211-3838-4c5a-a94f-ada71428dbd1 | {
"language": "C++"
} | ```c++
//===-- ModuleProvider.cpp - Base implementation for module providers -----===//
//
// Minimal implementation of the abstract interface for providing a module.
//
//===----------------------------------------------------------------------===//
#include "llvm/ModuleProvider.h"
#include "llvm/Module.h"
/// ctor ... | ```c++
//===-- ModuleProvider.cpp - Base implementation for module providers -----===//
//
// Minimal implementation of the abstract interface for providing a module.
//
//===----------------------------------------------------------------------===//
#include "llvm/ModuleProvider.h"
#include "llvm/Module.h"
/// ctor ... |
5e5f1cb9-f09e-47dc-b9fe-c8117394aae7 | {
"language": "C++"
} | ```c++
#include "tclap/CmdLine.h"
#include <vector>
#include <string>
using namespace TCLAP;
using namespace std;
// https://sourceforge.net/p/tclap/bugs/30/
int main(int argc, char** argv) {
CmdLine cmd("test empty argv");
std::vector<string> args;
cmd.parse(args);
}
```
Remove unused arguments from test (fix... | ```c++
#include "tclap/CmdLine.h"
#include <vector>
#include <string>
using namespace TCLAP;
using namespace std;
// https://sourceforge.net/p/tclap/bugs/30/
int main() {
CmdLine cmd("test empty argv");
std::vector<string> args;
cmd.parse(args);
}
``` |
bb0053a6-6e96-4945-ae22-3f9ccc2f5814 | {
"language": "C++"
} | ```c++
#include <iostream>
#include <string>
#include "MatasanoConverter.h"
using namespace std;
int main() {
string hexInput("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d");
string testString = ("SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t");
... | ```c++
#include <iostream>
#include <string>
#include "MatasanoConverter.h"
using namespace std;
int main() {
string hexInput("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d");
string testString = ("SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t");
... |
ed6493e5-4f30-4d0d-87e4-3dc61ee18fad | {
"language": "C++"
} | ```c++
#include "Platform.h"
#include <stdio.h>
void testRDTSC ( void )
{
int64_t temp = rdtsc();
printf("%d",(int)temp);
}
#if defined(_MSC_VER)
#include <windows.h>
void SetAffinity ( int cpu )
{
SetProcessAffinityMask(GetCurrentProcess(),cpu);
SetThreadPriority(GetCurrentThread(), THR... | ```c++
#include "Platform.h"
#include <stdio.h>
void testRDTSC ( void )
{
int64_t temp = rdtsc();
printf("%d",(int)temp);
}
#if defined(_MSC_VER)
#include <windows.h>
void SetAffinity ( int cpu )
{
SetProcessAffinityMask(GetCurrentProcess(),cpu);
SetThreadPriority(GetCurrentThread(), THR... |
a521ee18-6e29-487d-b07f-7f3baa1645ac | {
"language": "C++"
} | ```c++
// Copyright (c) 2010 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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined... | ```c++
// Copyright (c) 2010 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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined... |
fea88795-272c-4104-a3b3-03f3ba3a4754 | {
"language": "C++"
} | ```c++
// Windy - main.cpp
// Copyright (c) 2015 Arkadiusz Bokowy
//
// This file is a part of Windy.
//
// This projected is licensed under the terms of the MIT license.
#include "Application.h"
int main(int argc, char *argv[]) {
Application app(argc, argv);
return app.exec();
}
```
Allow static build on Windows | ```c++
// Windy - main.cpp
// Copyright (c) 2015 Arkadiusz Bokowy
//
// This file is a part of Windy.
//
// This projected is licensed under the terms of the MIT license.
#include "Application.h"
#if defined(Q_OS_WIN) && !defined(_DLL)
// This sections allows static build on the Windows platform using MSVC++
// compi... |
e1817f37-6315-47c1-ae2b-58075b75d14e | {
"language": "C++"
} | ```c++
#include "motor/esra_payload_motor_mapper.hpp"
#include <array>
#include <cstddef>
#include "protocol/messages.hpp"
EsraPayloadMotorMapper::EsraPayloadMotorMapper(PWMDeviceGroup<1>& motors, Communicator& communicator)
: motors(motors),
throttleStream(communicator, 5) {
}
void EsraPayloadMotorMapper::ru... | ```c++
#include "motor/esra_payload_motor_mapper.hpp"
#include <array>
#include <cstddef>
#include "protocol/messages.hpp"
EsraPayloadMotorMapper::EsraPayloadMotorMapper(PWMDeviceGroup<1>& motors, Communicator& communicator)
: motors(motors),
throttleStream(communicator, 5) {
}
void EsraPayloadMotorMapper::ru... |
f4e89b87-8a67-4f11-9a4f-d4d9e9d8434b | {
"language": "C++"
} | ```c++
/** @file
@brief Implementation
@date 2014
@author
Ryan Pavlik
<ryan@sensics.com>
<http://sensics.com>
*/
// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)
// Internal Includes
#include <og... | ```c++
/** @file
@brief Implementation
@date 2014
@author
Ryan Pavlik
<ryan@sensics.com>
<http://sensics.com>
*/
// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)
// Internal Includes
#include <og... |
0bdeccc7-48e7-4f6a-8f67-cfb364584faa | {
"language": "C++"
} | ```c++
#include <bin/tests.hh>
BEGIN_TEST(removecallbacks, client, )
client.setCallback(&dump, "error"); // ping
urbi::UCallbackID i1 = client.setCallback(&dump, "output");
urbi::UCallbackID i2 = client.setCallback(&dump, "output");
SEND("output << 1;");
//= D output 1
//= D output 1
dumpSem--;
dumpSem--;
SEND("error ... | ```c++
#include <bin/tests.hh>
BEGIN_TEST(removecallbacks, client, )
client.setCallback(&dump, "error"); // ping
urbi::UCallbackID i1 = client.setCallback(&dump, "output");
urbi::UCallbackID i2 = client.setCallback(&dump, "output");
SEND("output << 1;");
//= D output 1
//= D output 1
dumpSem--;
dumpSem--;
SEND("error ... |
7d7b8540-e4b7-4e27-8d7f-847978a2e05a | {
"language": "C++"
} | ```c++
#include "MessageQueue.h"
#include <vector>
MessageQueue::MessageQueue(std::string identifier, std::string serverAddr, unsigned int serverPort, std::function<void(std::string) > onMessage)
: identifier(identifier), mqConnection(&mqHandler, "amqp://" + serverAddr + ":" + std::to_string(serverPort)),
channel(&mq... | ```c++
#include "MessageQueue.h"
#include <vector>
MessageQueue::MessageQueue(std::string identifier, std::string serverAddr, unsigned int serverPort, std::function<void(std::string) > onMessage)
: identifier(identifier), mqConnection(&mqHandler, "amqp://" + serverAddr + ":" + std::to_string(serverPort)),
channel(&mq... |
6fb3a93c-4dba-40bf-8ed1-8977590c3115 | {
"language": "C++"
} | ```c++
#include <functional>
#include <iostream>
#include <spdlog/spdlog.h>
#include <docopt/docopt.h>
#include <iostream>
static constexpr auto USAGE =
R"(Naval Fate.
Usage:
naval_fate ship new <name>...
naval_fate ship <name> move <x> <y> [--speed=<kn>]
naval_fate ship shoot ... | ```c++
#include <functional>
#include <iostream>
#include <spdlog/spdlog.h>
#include <docopt/docopt.h>
static constexpr auto USAGE =
R"(Naval Fate.
Usage:
naval_fate ship new <name>...
naval_fate ship <name> move <x> <y> [--speed=<kn>]
naval_fate ship shoot <x> <y>
naval... |
fe912cb3-0869-4edc-b84d-d4b765b86080 | {
"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/common/default_plugin.h"
#include "chrome/default_plugin/plugin_main.h"
#include "webkit/plugins/npapi/plugin_list.h"
namesp... | ```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/common/default_plugin.h"
#include "chrome/default_plugin/plugin_main.h"
#include "webkit/plugins/npapi/plugin_list.h"
namesp... |
5fd3c300-3191-4b7f-8592-8aa545d58979 | {
"language": "C++"
} | ```c++
#include <mart-common/experimental/tmp.h>```
Add a compilation test for mart::tmp::cartesian_value_product | ```c++
#include <mart-common/experimental/tmp.h>
#include <tuple>
namespace {
constexpr auto v_list1 = mart::tmp::value_list<int, 1, 2, 3, 4, 5>{};
constexpr auto v_list2 = mart::tmp::value_list<char, 'H', 'e', 'l', 'l', 'o'>{};
static_assert( mart::tmp::get_Nth_element( 2, v_list1 ) == 3 );
template<int First, cha... |
3e3766b8-6c41-46dd-946e-397fff0b910a | {
"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/shell/webkit_test_platform_support.h"
namespace content {
bool CheckLayoutSystemDeps() {
return true;
}
bool WebKitTestP... | ```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/shell/webkit_test_platform_support.h"
#include "third_party/skia/include/ports/SkTypeface_android.h"
namespace {
// The ro... |
ecb27b14-66d6-4947-a44a-9e48ef407345 | {
"language": "C++"
} | ```c++
#include "HumbugWindow.h"
#include "HumbugApplication.h"
#include "Config.h"
#ifdef Q_OS_MAC
#include "mac/Setup.h"
#endif
int main(int argc, char *argv[])
{
HumbugApplication a(argc, argv);
a.setApplicationName("Humbug");
a.setApplicationVersion(HUMBUG_VERSION_STRING);
QCoreApplication::setOr... | ```c++
#include "HumbugWindow.h"
#include "HumbugApplication.h"
#include "Config.h"
#ifdef Q_OS_MAC
#include "mac/Setup.h"
#endif
int main(int argc, char *argv[])
{
HumbugApplication a(argc, argv);
a.setApplicationName("Humbug");
a.setApplicationVersion(HUMBUG_VERSION_STRING);
QCoreApplication::setOr... |
bc3bff00-577a-44b5-85de-0aa8045f318a | {
"language": "C++"
} | ```c++
#include <lua.hpp>
#include <luwra.hpp>
#include <iostream>
using namespace luwra;
static
double sum3(int a, int b, double c) {
return (a + b) * c;
}
int main() {
lua_State* state = luaL_newstate();
luaL_openlibs(state);
// Build stack
lua_pushinteger(state, 13);
lua_pushinteger(state, 37);
lua_pushn... | ```c++
#include <lua.hpp>
#include <luwra.hpp>
#include <iostream>
using namespace luwra;
static
double sum3(int a, int b, double c) {
return (a + b) * c;
}
int main() {
lua_State* state = luaL_newstate();
luaL_openlibs(state);
// Build stack
lua_pushinteger(state, 13);
lua_pushinteger(state, 37);
lua_pushn... |
45a340f7-30fb-4ce8-b03a-217baa3ec3e2 | {
"language": "C++"
} | ```c++
#include <unistd.h>
#include <event/event_callback.h>
#include <event/event_main.h>
#include <io/stream_handle.h>
class Sink {
LogHandle log_;
StreamHandle fd_;
Action *action_;
public:
Sink(int fd)
: log_("/sink"),
fd_(fd),
action_(NULL)
{
EventCallback *cb = callback(this, &Sink::read_complet... | ```c++
#include <unistd.h>
#include <event/callback_handler.h>
#include <event/event_callback.h>
#include <event/event_handler.h>
#include <event/event_main.h>
#include <io/stream_handle.h>
class Sink {
LogHandle log_;
StreamHandle fd_;
CallbackHandler close_handler_;
EventHandler read_handler_;
public:
Sink(i... |
f6708006-8d3b-4b21-87d0-f5b4d9e6c8c3 | {
"language": "C++"
} | ```c++
// Copyright 2013 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 "base/android/sys_utils.h"
#include "base/sys_info.h"
#include "jni/SysUtils_jni.h"
// Any device that reports a physical RAM size less ... | ```c++
// Copyright 2013 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 "base/android/sys_utils.h"
#include "base/android/build_info.h"
#include "base/sys_info.h"
#include "jni/SysUtils_jni.h"
// Any device t... |
42a5b607-d272-46c8-a3fb-0b41cce451f2 | {
"language": "C++"
} | ```c++
/******************************************************
* This is CIR-KIT 3rd robot control driver.
* Author : Arita Yuta(Kyutech)
******************************************************/
#include <ros/ros.h>
#include <geometry_msgs/Twist.h> // cmd_vel
#include <nav_msgs/Odometry.h> // odom
#include <tf/tr... | ```c++
/******************************************************
* This is CIR-KIT 3rd robot control driver.
* Author : Arita Yuta(Kyutech)
******************************************************/
#include "third_robot_driver.hpp"
int main(int argc, char** argv)
{
ros::init(argc, argv, "Third_robot_driver_node");
... |
4697031a-f46e-4e10-8839-5e66498c32f0 | {
"language": "C++"
} | ```c++
// Day11.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "Password.h"
int main()
{
Password<8> SantasPassword(std::string("hepxcrrq"));
std::cout << SantasPassword << std::endl;
++SantasPassword;
std::cout << SantasPassword << std::endl;
system("pause");
... | ```c++
// Day11.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "Password.h"
int main()
{
Password<8> SantasPassword(std::string("hepxcrrq"));
std::cout << SantasPassword << std::endl;
++SantasPassword;
std::cout << SantasPassword << std::endl;
++SantasPassword;
... |
60c1a032-2630-44a4-a3fa-048e0aea5377 | {
"language": "C++"
} | ```c++
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "BasicListItem.h"
using namespace bb::cascades;
BasicListItem::Basic... | ```c++
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "BasicListItem.h"
using namespace bb::cascades;
BasicListItem::Basic... |
09a3162d-adfc-4671-9b8a-c44488c56782 | {
"language": "C++"
} | ```c++
#include "ics3/parameter.hpp"
ics::Parameter ics::Parameter::stretch() noexcept {
static const Parameter STRETCH(0x01, 1, 127);
return STRETCH;
}
ics::Parameter ics::Parameter::speed() noexcept {
static const Parameter SPEED(0x02, 1, 127);
return SPEED;
}
ics::Parameter ics::Parameter::current() noexc... | ```c++
#include "ics3/parameter.hpp"
ics::Parameter ics::Parameter::stretch() noexcept {
static const Parameter STRETCH(0x01, 1, 127);
return STRETCH;
}
ics::Parameter ics::Parameter::speed() noexcept {
static const Parameter SPEED(0x02, 1, 127);
return SPEED;
}
ics::Parameter ics::Parameter::current() noexc... |
dd31e1a9-1f97-4834-b86b-0e6872e82dc7 | {
"language": "C++"
} | ```c++
#include <LCDDisplay.h>
int main(int argc, char **argv)
{
std::cout << "testing display";
LCDDisplay *display = new Display();
display->refresh();
display->setMenuString("test string");
display->refresh();
display->setMenuString("new string");
display->setTrackInfoString("track string");
display->... | ```c++
#include <stdio.h>
#include <LCDDisplay.h>
int main(int argc, char **argv)
{
printf("testing display");
LCDDisplay *display = new LCDDisplay();
display->refresh();
display->setMenuString("test string");
display->refresh();
display->setMenuString("new string");
display->setTrackInfoString("track stri... |
2dd1a096-e190-4271-a69c-84a0d690c9e5 | {
"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... |
fa9d7fd3-6a46-4209-bccd-1cd0e7ce2bb8 | {
"language": "C++"
} | ```c++
#include "SearchInRotatedSortedArray.hpp"
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
int p = 0;
while (p + 1 < nums.size() && nums[p] < nums[p + 1])
p++;
if (p + 1 == nums.size())
return partialSearch(nums, 0, nums.size() - 1, target);
... | ```c++
#include "SearchInRotatedSortedArray.hpp"
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
return partialSearch(nums, 0, nums.size() - 1, target);
}
int SearchInRotatedSortedArray::partialSearch(vector<int>& nums, int p, int q, int target)
{
if (p > q)... |
af044f3f-689b-4dde-a810-447d2f4ff184 | {
"language": "C++"
} | ```c++
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include <swganh_core/badge/badge_region.h>
#include <swganh_core/connection/connection_client_interface.h>
#include <swganh_core/messages/chat_system_message.h>
#include <swganh_core/... | ```c++
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include <swganh_core/badge/badge_region.h>
#include <swganh_core/connection/connection_client_interface.h>
#include <swganh_core/messages/chat_system_message.h>
#include <swganh_core/... |
65e1e5a9-57c4-49b6-beb1-ee391002fded | {
"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 "base/logging.h"
#include "base/path_service.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrom... | ```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 "base/logging.h"
#include "base/path_service.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrom... |
32825f0a-5217-4f8c-8d97-a440e020a5c3 | {
"language": "C++"
} | ```c++
// dllmain.cpp : Implementation of DllMain.
#include "stdafx.h"
#include "resource.h"
#include "WordPerfectIndexer_i.h"
#include "dllmain.h"
CWordPerfectIndexerModule _AtlModule;
// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
hInstance;
return _At... | ```c++
// dllmain.cpp : Implementation of DllMain.
#include "stdafx.h"
#include "resource.h"
#include "WordPerfectIndexer_i.h"
#include "dllmain.h"
CWordPerfectIndexerModule _AtlModule;
HINSTANCE _AtlModuleInstance;
// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReser... |
863c4d3b-2b96-474c-bb7d-f21f42269415 | {
"language": "C++"
} | ```c++
#include <iostream>
#include <zlib.h>
#include <string>
#include "mszreader.h"
using namespace std;
using namespace iomsz;
int main( int argc, char* argv[] ) {
if ( argc <= 1 ) exit(-1);
unsigned int nbSolvers, nbFeatures, nbInstances, timeOut;
string* solversNames, *featuresNames, *instancesNames;
do... | ```c++
#include <iostream>
#include <zlib.h>
#include <string>
#include "mszreader.hh"
using namespace std;
using namespace iomsz;
int main( int argc, char* argv[] ) {
if ( argc <= 1 ) exit(-1);
unsigned int nbSolvers, nbFeatures, nbInstances, timeOut;
string* solversNames, *featuresNames, *instancesNames;
d... |
2cdc0cd3-8f5e-45d9-b8a9-9035db5e3c2e | {
"language": "C++"
} | ```c++
// Copyright (c) 2010 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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined... | ```c++
// Copyright (c) 2010 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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined... |
0d1f2ef8-0930-4649-b5ec-5ac98677869e | {
"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"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Storage) {
ASSERT_TRUE(RunExtensionTest("s... | ```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"
// This test is disabled. See bug 25746
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISA... |
928da965-6f0f-4e07-8035-4a14671528e8 | {
"language": "C++"
} | ```c++
/*
* Copyright 2004-2014 Cray Inc.
* Other additional copyright holders may be indicated within.
*
* The entirety of this work is 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... | ```c++
/*
* Copyright 2004-2014 Cray Inc.
* Other additional copyright holders may be indicated within.
*
* The entirety of this work is 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... |
027bd8a0-fbdc-43f8-89c4-88f7cb740f29 | {
"language": "C++"
} | ```c++
#include <memory>
#include "client/event_system.h"
#include "client/client_interface.h"
#include "events/connection_receiver.h"
#include "events/hub.h"
int main( int argc, char** argv )
{
auto connection = std::make_shared < events::Connection_receiver > ( "localhost", 31005 );
events::Hub::get_filter ... | ```c++
#include <memory>
#include <iostream>
#include <cstring>
#include "client/event_system.h"
#include "client/client_interface.h"
#include "client/events/events.h"
#include "events/connection_receiver.h"
#include "events/hub.h"
bool parse_args ( int argc, char** argv )
{
if ( argc > 1 )
{
if ( ( !... |
4966db0c-97de-4c6f-96c1-a98fb2a90dc7 | {
"language": "C++"
} | ```c++
#include <boost/timer/timer.hpp>
#include <iostream>
#include <string>
#include <vector>
#include "common/logging.h"
// small test program for playing around with spdlog formatting of messages
std::shared_ptr<spdlog::logger> stderrLogger(
const std::string& name,
const std::string& pattern,
const s... | ```c++
#include <boost/timer/timer.hpp>
#include <iostream>
#include <string>
#include <vector>
#include "common/logging.h"
// small test program for playing around with spdlog formatting of messages
std::shared_ptr<spdlog::logger> stderrLoggerTest(
const std::string& name,
const std::string& pattern,
con... |
5fabfa60-5909-4c7b-8114-b523dd79fb78 | {
"language": "C++"
} | ```c++
#include "dashboardcontroller.h"
#include "serialization/result.h"
ApiMock::ResponseData ApiMock::DashboardController::get(RequestData request) {
auto result = Html("<h1>Hello, world</h1>\n<p>This is an HTML result</p>");
return createResponse(HTTP_OK, &result);
}```
Read the dashboard file and return the co... | ```c++
#include "dashboardcontroller.h"
#include "serialization/result.h"
#include <fstream>
ApiMock::ResponseData ApiMock::DashboardController::get(RequestData request) {
// TODO: This is temporary, just to try the concept out. But really: files shouldn't be loaded like this:
std::ifstream dashboard("www/dashboard.... |
5e9f931f-f3a4-410d-a059-b3513cfd2b62 | {
"language": "C++"
} | ```c++
#include "RMain.h"
#include "RGlobal.h"
#include "RThread.h"
#include "REventLoop.h"
#include "RCoreApplication.h"
#include "RSpinLocker.h"
static volatile RThread *sMainThread = NULL;
RThread *
rGetMainThread()
{
return (RThread *)sMainThread;
}
void
setup()
{
}
void
loop()
{
// Do nothing, we must not d... | ```c++
#include "RMain.h"
#include "RGlobal.h"
#include "RThread.h"
#include "REventLoop.h"
#include "RCoreApplication.h"
#include "RSpinLocker.h"
static volatile RThread *sMainThread = NULL;
RThread *
rGetMainThread()
{
return (RThread *)sMainThread;
}
void
setup()
{
}
void
loop()
{
// Do nothing, we must not d... |
601f062a-9a35-4f27-baf1-9ba9e2ec35ca | {
"language": "C++"
} | ```c++
///
/// @file pi_legendre.cpp
///
/// Copyright (C) 2017 Kim Walisch, <kim.walisch@gmail.com>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///
#include <primecount.hpp>
#include <primecount-internal.hpp>
#include <imath.hpp>
#include <stdint.h>
... | ```c++
///
/// @file pi_legendre.cpp
///
/// Copyright (C) 2018 Kim Walisch, <kim.walisch@gmail.com>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///
#include <primecount.hpp>
#include <primecount-internal.hpp>
#include <isqrt.hpp>
#include <stdint.h>
... |
b8fb4f55-8c20-4f6b-b84f-26ddb447e7e6 | {
"language": "C++"
} | ```c++
#include <QtGui/QGuiApplication>
#include <QQmlContext>
#include <QStateMachine>
#include <memory>
#include "./window.h"
#include "./demo_scene.h"
#include "./input/invoke_manager.h"
#include "./input/signal_manager.h"
#include "./input/scxml_importer.h"
int main(int argc, char **argv)
{
QGuiApplication appli... | ```c++
#include <QtGui/QGuiApplication>
#include <QQmlContext>
#include <QStateMachine>
#include <QDebug>
#include <memory>
#include "./window.h"
#include "./demo_scene.h"
#include "./input/invoke_manager.h"
#include "./input/signal_manager.h"
#include "./input/scxml_importer.h"
int main(int argc, char **argv)
{
qpu... |
54bbb855-beb3-45e4-9a46-77cc19be3879 | {
"language": "C++"
} | ```c++
#include "logger.h"
// Keep it simple for now
#include <iostream>
void error_logger(luna::log_level level, const std::string &message)
{
switch (level)
{
case luna::log_level::DEBUG:
// std::cerr << "[ DEBUG] " << message << std::endl;
break;
case luna::log_level... | ```c++
#include "logger.h"
// Keep it simple for now
#include <iostream>
void error_logger(luna::log_level level, const std::string &message)
{
switch (level)
{
case luna::log_level::DEBUG:
std::cerr << "[ DEBUG] " << message << std::endl;
break;
case luna::log_level::... |
37d9d2cd-2eb3-48a9-9bd9-979f83d77543 | {
"language": "C++"
} | ```c++
// RUN: %llvmgcc -g -S -O2 %s -o %t
// RUN: grep "i1 false, i1 true. . . DW_TAG_subprogram" %t | count 2
class foo {
public:
int bar(int x);
static int baz(int x);
};
int foo::bar(int x) {
return x*4 + 1;
}
int foo::baz(int x) {
return x*4 + 1;
}
```
Tweak test for debug/metadata change,... | ```c++
// RUN: %llvmgcc -g -S -O2 %s -o - | FileCheck %s
class foo {
public:
int bar(int x);
static int baz(int x);
};
int foo::bar(int x) {
// CHECK: {{i1 false, i1 true(, i[0-9]+ [^\}]+[}]|[}]) ; \[ DW_TAG_subprogram \]}}
return x*4 + 1;
}
int foo::baz(int x) {
// CHECK: {{i1 false, i1 true(, i... |
0de6f511-ec36-42ff-9cfe-5475c83e2926 | {
"language": "C++"
} | ```c++
// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s
// Variable declarations that should trigger a warning.
int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
int vbad2 = 10; // expected-warning{{no previous extern declaration for non-sta... | ```c++
// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s
// Variable declarations that should trigger a warning.
int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
int vbad2 = 10; // expected-warning{{no previous extern declaration for non-sta... |
c884b55b-9a4a-44c2-8927-dd021173a351 | {
"language": "C++"
} | ```c++
#include "GlmConversion.hpp"
namespace Physics {
btVector3 glmToBt(glm::vec3 const& vec) {
return btVector3(vec.x, vec.y, vec.z);
}
glm::vec3 btToGlm(btVector3 const& vec) {
return glm::vec3(vec.getX(), vec.getY(), vec.getZ());
}
glm::quat btToGlm(btQuaternion const& quat)... | ```c++
#include "GlmConversion.hpp"
namespace Physics {
btVector3 glmToBt(glm::vec3 const& vec) {
return btVector3(vec.x, vec.y, vec.z);
}
glm::vec3 btToGlm(btVector3 const& vec) {
return glm::vec3(vec.getX(), vec.getY(), vec.getZ());
}
glm::quat btToGlm(btQuaternion const& quat)... |
18449941-1657-4bdd-862b-a9d09ade2947 | {
"language": "C++"
} | ```c++
// Copyright (c) 2011 Hewlett-Packard Development Company, L.P. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <QUrl>
#include <QWebView>
#include "browser.h"
Browser::Browser(QWidget *parent)
: QMainWindow(parent)
{
... | ```c++
// Copyright (c) 2011 Hewlett-Packard Development Company, L.P. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <QUrl>
#include <QWebView>
#include "browser.h"
Browser::Browser(QWidget *parent)
: QMainWindow(parent)
{
... |
f8cbde16-6586-4bba-b3e7-f36a01b03b95 | {
"language": "C++"
} | ```c++
#include "Vajra/Framework/Core/Framework.h"
#include "Vajra/Framework/Logging/Logger.h"
#include "Vajra/Framework/OpenGL/OpenGLCounter/OpenGLCounter.h"
OpenGLCounter::OpenGLCounter() {
this->init();
}
OpenGLCounter::~OpenGLCounter() {
this->destroy();
}
void OpenGLCounter::CountGlCall(const char* /* glFunct... | ```c++
#include "Vajra/Framework/Core/Framework.h"
#include "Vajra/Framework/Logging/Logger.h"
#include "Vajra/Framework/OpenGL/OpenGLCounter/OpenGLCounter.h"
OpenGLCounter::OpenGLCounter() {
this->init();
}
OpenGLCounter::~OpenGLCounter() {
this->destroy();
}
void OpenGLCounter::CountGlCall(const char* /* glFunct... |
a7e8a2ae-0aea-4e86-9790-4ecd9a59117f | {
"language": "C++"
} | ```c++
// Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h"
#include "base/basictypes.h"
#include "net/http/http_auth_handler_basic.h"
namespace net ... | ```c++
// Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h"
#include "base/basictypes.h"
#include "net/http/http_auth_handler_basic.h"
namespace net ... |
f4a6b90e-a211-4b37-b414-6f9b0b92d10c | {
"language": "C++"
} | ```c++
#include "PrimaryTreeIndex.h"
void PrimaryTreeIndex::buildIndex(Table & table, int column) {
int rowno = 0;
for(auto currentRow : table) {
index.insert( std::pair<std::string, int>(currentRow[column], rowno++) );
}
}
int PrimaryTreeIndex::size() const {
return index.size();
}
```
Use empl... | ```c++
#include "PrimaryTreeIndex.h"
void PrimaryTreeIndex::buildIndex(Table & table, int column) {
int rowno = 0;
for(auto currentRow : table) {
index.emplace(currentRow[column], rowno++);
}
}
int PrimaryTreeIndex::size() const {
return index.size();
}
``` |
5ab1f453-1a01-4b33-b310-ed8636f8da2e | {
"language": "C++"
} | ```c++
extern "C" void throw_int()
{
throw 12;
}
extern "C" void throw_id();
extern "C" int id_catchall;
extern "C" int catchall()
{
try
{
throw_id();
}
catch(...)
{
id_catchall = 1;
throw;
}
__builtin_trap();
}
```
Fix build failure in test. | ```c++
extern "C" void throw_int()
{
throw 12;
}
extern "C" void throw_id();
extern "C" int catchall()
{
try
{
throw_id();
}
catch(...)
{
throw;
}
__builtin_trap();
}
``` |
b3852080-c897-4340-b29f-bcf7e20c5aa9 | {
"language": "C++"
} | ```c++
#include "AConfig.h"
#if(HAS_STD_CALIBRATIONLASERS)
#include "Device.h"
#include "Pin.h"
#include "CalibrationLaser.h"
#include "Settings.h"
Pin claser("claser", CALIBRATIONLASERS_PIN, claser.analog, claser.out);
void CalibrationLaser::device_setup(){
Settings::capability_bitarray |= (1 << CALIBRATION_LASE... | ```c++
#include "AConfig.h"
#if(HAS_STD_CALIBRATIONLASERS)
#include "Device.h"
#include "Pin.h"
#include "CalibrationLaser.h"
#include "Settings.h"
Pin claser("claser", CALIBRATIONLASERS_PIN, claser.analog, claser.out);
void CalibrationLaser::device_setup(){
Settings::capability_bitarray |= (1 << CALIBRATION_LASE... |
d74aa179-7638-43d0-8fd1-2d7ceca7d948 | {
"language": "C++"
} | ```c++
/*=============================================================================
Library: CTK
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance wi... | ```c++
/*=============================================================================
Library: CTK
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance wi... |
f1e6b551-813b-44d8-b463-99135322876d | {
"language": "C++"
} | ```c++
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new QWidget(this);
layout = new QGridLayout(widget);
loadImageButton = new QPushButton("Load Image", widget);
conne... | ```c++
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new QWidget(this);
layout = new QGridLayout(widget);
loadImageButton = new QPushButton("Load Image", widget);
conne... |
a008b22b-637f-4813-83ec-589547a4e815 | {
"language": "C++"
} | ```c++
#include "impl_send_posture.hpp"
#include "algorithm"
#include "std_srvs/Empty.h"
SendPostureFactory SendPostureFactory::unique;
SendPostureFactory::SendPostureFactory() : sends() {}
SendPostureFactory::~SendPostureFactory() {
for (auto it = sends.begin(), end_it = sends.end();
it != end_it;
... | ```c++
#include "impl_send_posture.hpp"
#include "std_srvs/Empty.h"
#include<algorithm>
SendPostureFactory SendPostureFactory::unique;
SendPostureFactory::SendPostureFactory() : sends() {}
SendPostureFactory::~SendPostureFactory() {
for (auto it = sends.begin(), end_it = sends.end();
it != end_it;
... |
40c4c793-8892-4505-be1d-c21d7f591a4c | {
"language": "C++"
} | ```c++
#include "GenericSensor.h"
GenericSensor::GenericSensor(const char* name,
uint8_t bufsize,
unsigned long sample_interval,
unsigned long send_interval)
{
_name = name;
_interval_sampling = sample_interval;
_interva... | ```c++
#include "GenericSensor.h"
GenericSensor::GenericSensor(const char* name,
uint8_t bufsize,
unsigned long sample_interval,
unsigned long send_interval)
{
_name = name;
_interval_sampling = sample_interval;
_interva... |
1d26fb89-095b-488b-9611-cb9d7d10d2c4 | {
"language": "C++"
} | ```c++
/*
* Copyright (C) 2020 The Android Open Source Project
*
* 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... | ```c++
/*
* Copyright (C) 2020 The Android Open Source Project
*
* 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... |
ee9b6132-3905-432e-a248-c414cc90d1a8 | {
"language": "C++"
} | ```c++
// Copyright (c) 2014 Jrmy Ansel
// Licensed under the MIT license. See LICENSE.txt
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <Windows.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATT... | ```c++
// Copyright (c) 2014 Jrmy Ansel
// Licensed under the MIT license. See LICENSE.txt
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATT... |
670d5807-c5a2-461b-8000-f056d5f38ea4 | {
"language": "C++"
} | ```c++
#include "pdbreader.hh"
#include "yapdbr.hh"
void printList(atomsList &l) {
atomsList::iterator it1 = l.begin(), it2 = l.end();
for (; it1 != it2; ++it1) {
std::cout << std::get<0>(*it1) << " " << std::get<1>(*it1) << " " << std::get<2>(*it1) << "<-\n";
}
}
int main() {
std::string fi... | ```c++
#include <pdbreader.hh>
#include <yapdbr.hh>
void printList(atomsList &l) {
atomsList::iterator it1 = l.begin(), it2 = l.end();
for (; it1 != it2; ++it1) {
std::cout << std::get<0>(*it1) << " " << std::get<1>(*it1) << " " << std::get<2>(*it1) << "<-\n";
}
}
int main() {
std::string fil... |
65642aa1-05d6-4a5c-98ed-a331c8447b6c | {
"language": "C++"
} | ```c++
//===- Linux/TimeValue.cpp - Linux TimeValue Implementation -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===-----------... | ```c++
//===- Linux/TimeValue.cpp - Linux TimeValue Implementation -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===-----------... |
d8f836e6-1d88-4e1d-b4b7-de174f984cf3 | {
"language": "C++"
} | ```c++
#include <common.hpp>
void radio_reset()
{
// reset
radio::select();
radio::wcmd<radio::SRES>();
radio::release();
radio::select();
// 433MHz center freq
radio::set<radio::FREQ2>(0x10);
radio::set<radio::FREQ1>(0xa7);
radio::set<radio::FREQ0>(0x63);
// modulation
radio::set<radio::MDMCFG2>(0x1a);
... | ```c++
#include <common.hpp>
void radio_reset()
{
// reset
radio::select();
radio::wcmd<radio::SRES>();
radio::release();
radio::select();
// 433MHz center freq
radio::set<radio::FREQ2>(0x10);
radio::set<radio::FREQ1>(0xa7);
radio::set<radio::FREQ0>(0x63);
// modulation
radio::set<radio::MDMCFG2>(0x1e);
... |
d08f4e63-f836-410a-a616-282203370d32 | {
"language": "C++"
} | ```c++
#include "logic.cpp"
#include <iostream>
#include <cstdlib>
int main( void );
void printCoords( block* b );
int rotationTest( void );
int main( void )
{
std::cout << "Rotation Test : " << (rotationTest())? "PASSED\n" : "FAILED\n";
exit( EXIT_SUCCESS );
}
void printCoords( block *b )
{
for( int i = 0; i ... | ```c++
#include "logic.cpp"
#include <iostream>
#include <cstdlib>
int main( void );
void printCoords( block* b );
int rotationTest( void );
int main( void )
{
std::cout << "Rotation Test : " << (rotationTest())? "PASSED\n" : "FAILED\n";
exit( EXIT_SUCCESS );
}
void printCoords( block *b )
{
for( int i = 0; i ... |
2cbd3b90-0486-45ef-bf18-c094548fdfdc | {
"language": "C++"
} | ```c++
#include <v8.h>
#include <node.h>
#include <sys/wait.h>
#include <errno.h>
using namespace v8;
using namespace node;
static Handle<Value> Waitpid(const Arguments& args) {
HandleScope scope;
int r, target, *status = NULL;
if (args[0]->IsInt32()) {
target = args[0]->Int32Value();
r = waitpid(targ... | ```c++
#include <v8.h>
#include <node.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
using namespace v8;
using namespace node;
static Handle<Value> Waitpid(const Arguments& args) {
HandleScope scope;
int r, child, status;
if (args[0]->IsInt32()) {
child = args[0]->Int32... |
28ae5b79-2250-4cc8-b0f8-1ea9afef3995 | {
"language": "C++"
} | ```c++
#include "./transfer_function_manager.h"
#include <QLoggingCategory>
#include <stdexcept>
#include "./texture_manager.h"
#include "./texture2d.h"
#include "../utils/gradient_utils.h"
namespace Graphics
{
// QLoggingCategory tfChan("Graphics.TransferFunction");
TransferFunctionManager::TransferFunctionManager(... | ```c++
#include "./transfer_function_manager.h"
#include <QLoggingCategory>
#include <stdexcept>
#include "./texture_manager.h"
#include "./texture2d.h"
#include "../utils/gradient_utils.h"
namespace Graphics
{
// QLoggingCategory tfChan("Graphics.TransferFunction");
TransferFunctionManager::TransferFunctionManager(... |
dda0cf2e-bd48-46bb-81ca-019e3ac1dddd | {
"language": "C++"
} | ```c++
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -main-file-name cxx-virtual-destructor-calls.cpp %s -o - -fprofile-instr-generate | FileCheck %s
struct Member {
~Member();
};
struct A {
virtual ~A();
};
struct B : A {
Member m;
virtual ~B();
};
// Complete dtor
// CHECK: @__llvm_profile_nam... | ```c++
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -main-file-name cxx-virtual-destructor-calls.cpp %s -o - -fprofile-instr-generate | FileCheck %s
struct Member {
~Member();
};
struct A {
virtual ~A();
};
struct B : A {
Member m;
virtual ~B();
};
// Complete dtor
// CHECK: @__llvm_profil... |
2febdd2d-dbd2-4283-8ed2-f802fda5175c | {
"language": "C++"
} | ```c++
#include "loader.h"
#include "gridmanager.h"
#include "bytebuffer.h"
#include "file.h"
GridManager* Loader::Load()
{
size_t size;
char* buffer;
File::Load(_fileName.c_str(), buffer, size);
ByteBuffer bb(size);
bb.WriteBuffer(buffer, size);
delete[] buffer;
return GridManager::Load... | ```c++
#include "loader.h"
#include "gridmanager.h"
#include "bytebuffer.h"
#include "file.h"
GridManager* Loader::Load()
{
size_t size;
char* buffer;
if (!File::Load(_fileName.c_str(), buffer, size))
{
delete[] buffer;
return NULL;
}
ByteBuffer bb(size);
bb.WriteBuffer(buf... |
1d701baa-f54e-4b3a-a8db-b810e8546fd7 | {
"language": "C++"
} | ```c++
//===-- PluginLoader.cpp - Implement -load command line option ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===-... | ```c++
//===-- PluginLoader.cpp - Implement -load command line option ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===-... |
7e744bf4-606a-4d74-afaa-2379172a2054 | {
"language": "C++"
} | ```c++
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <vector>
#include "Thread/Mutex.hh"
#include "Thread/Thread.hpp"
int increment_value;
struct mock
{
int _data;
LilWrapper::Mutex _access;
};
void increment(struct mock *m)
{
m->_access.lock();
for (int i = 0; i < increment_value; i++)
... | ```c++
#include <iostream>
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <vector>
#include "Thread/Mutex.hh"
#include "Thread/Thread.hpp"
int increment_value;
struct mock
{
int _data;
LilWrapper::Mutex _access;
};
void increment(mock *m)
{
m->_access.lock();
for (int i = 0; i < increment... |
18443338-8e6c-4ecb-a10f-45f4741d70b2 | {
"language": "C++"
} | ```c++
// Copyright (c) 2013 The Chromium Embedded Framework 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 <AtomicWebView/Internal/WebAppOther.h>
#include <AtomicWebView/Internal/WebAppRenderer.h>
using namespace Atomic;
... | ```c++
// Copyright (c) 2013 The Chromium Embedded Framework 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 <AtomicWebView/AtomicWebView.h>
// Entry point function for sub-processes.
int main(int argc, char* argv[])
{
... |
fb59809b-6f4d-4cf6-a883-8a5aafa47a0d | {
"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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.