commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
11a77b3fea6f62236504eca10702af75a03f37e1 | src/MOLPUpdateComputation.cpp | src/MOLPUpdateComputation.cpp | #include "MOLPUpdateComputation.hpp"
MOLPUpdateComputation::MOLPUpdateComputation(MOLP a, MOLP b) : molpA(a), molpB(b) {
}
bool noDominance() {
return (molpA.empty() ||
molpB.empty() ||
molpA.isInA1AreaOf(molpB) ||
molpB.isInA1AreaOf(molpA));
}
void MOLPUpdateComputation::initIterator... | #include "MOLPUpdateComputation.hpp"
MOLPUpdateComputation::MOLPUpdateComputation(MOLP a, MOLP b) : molpA(a), molpB(b) {
}
bool MOLPUpdateComputation::noDominance() {
return (molpA.empty() ||
molpB.empty() ||
molpA.isInA1AreaOf(molpB) ||
molpB.isInA1AreaOf(molpA));
}
void MOLPUpdateCo... | Fix the scope of noDominance() | MUC: Fix the scope of noDominance()
| C++ | lgpl-2.1 | tvincent2/mo-solver |
4a9c40fcdd59d1db73c252ec03b5fc251b74318c | ab/test/TestMemory.cpp | ab/test/TestMemory.cpp | #include <Ab/Config.hpp>
#include <Ab/Memory.hpp>
#include <Ab/Test/BasicTest.hpp>
#include <gtest/gtest.h>
namespace Ab {
namespace Test {
class TestMemory : public BasicTest {};
TEST_F(TestMemory, initAndKill) {
Memory m;
ASSERT_EQ(m.init(Memory::defaultConfig()), MemoryError::SUCCESS);
m.kill();
}
} // names... | #include <Ab/Config.hpp>
#include <Ab/Memory.hpp>
#include <Ab/Test/BasicTest.hpp>
#include <gtest/gtest.h>
namespace Ab {
namespace Test {
class TestMemory : public BasicTest {};
TEST_F(TestMemory, initAndKill) {
Memory m;
ASSERT_EQ(m.init(Memory::defaultConfig()), MemoryError::SUCCESS);
m.kill();
}
TEST_F(Test... | Add a basic memory grow test | Add a basic memory grow test
Signed-off-by: Robert Young <42c59959a3f4413d6a1b4d7b4f99db457d199e49@gmail.com>
| C++ | apache-2.0 | ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab |
5024af989b7ec9a4a346aae7ca140664f3557794 | src/heuristic.cc | src/heuristic.cc | /**
* \file heuristic.cc
*
*
*
* \author Ethan Burns
* \date 2008-10-13
*/
#include "util/fixed_point.h"
#include "heuristic.h"
Heuristic::Heuristic(const SearchDomain *d) : domain(d), weight(fp_one) {}
Heuristic::~Heuristic() {}
void Heuristic::set_weight(float weight)
{
weight = fp_one * weight;
}
fp_ty... | /**
* \file heuristic.cc
*
*
*
* \author Ethan Burns
* \date 2008-10-13
*/
#include "util/fixed_point.h"
#include "heuristic.h"
Heuristic::Heuristic(const SearchDomain *d) : domain(d), weight(fp_one) {}
Heuristic::~Heuristic() {}
void Heuristic::set_weight(float wt)
{
weight = fp_one * wt;
}
fp_type Heuri... | Fix a shadowed data member. | Fix a shadowed data member.
| C++ | mit | eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf |
78a85317416a91b0442acfff35f9626552538755 | src/omnicore/test/version_tests.cpp | src/omnicore/test/version_tests.cpp | #include "omnicore/version.h"
#include "config/bitcoin-config.h"
#include <string>
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(omnicore_version_tests)
BOOST_AUTO_TEST_CASE(version_comparison)
{
BOOST_CHECK(OMNICORE_VERSION > 900300); // Master Core v0.0.9.3
}
/**
* The following tests are very ... | #include "omnicore/version.h"
#include "config/bitcoin-config.h"
#include <string>
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(omnicore_version_tests)
BOOST_AUTO_TEST_CASE(version_comparison)
{
BOOST_CHECK(OMNICORE_VERSION > 1000000); // Omni Core v0.0.10.0
}
/**
* The following tests are very ... | Update unit tests for 0.0.11.0-dev | Update unit tests for 0.0.11.0-dev
| C++ | mit | OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore |
e47b98fbdcc0af22063dae7cdf2ee699d18c05d7 | config/config_type_pointer.cc | config/config_type_pointer.cc | #include <string>
#include <config/config.h>
#include <config/config_type_pointer.h>
#include <config/config_value.h>
ConfigTypePointer config_type_pointer;
bool
ConfigTypePointer::set(ConfigValue *cv, const std::string& vstr)
{
if (pointers_.find(cv) != pointers_.end())
return (false);
Config *config = cv->con... | #include <string>
#include <config/config.h>
#include <config/config_type_pointer.h>
#include <config/config_value.h>
ConfigTypePointer config_type_pointer;
bool
ConfigTypePointer::set(ConfigValue *cv, const std::string& vstr)
{
if (pointers_.find(cv) != pointers_.end())
return (false);
/* XXX Have a magic None... | Support pointers to "None" as used in the wanproxy.conf. | Support pointers to "None" as used in the wanproxy.conf.
| C++ | bsd-2-clause | wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy |
6825098429c995d75516bb288ebf00f304d3a44a | src/Labels.cpp | src/Labels.cpp | //=======================================================================
// Copyright Baptiste Wicht 2011.
// 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)
//=====================================================... | //=======================================================================
// Copyright Baptiste Wicht 2011.
// 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)
//=====================================================... | Use thread local storage for label counter | Use thread local storage for label counter
| C++ | mit | wichtounet/eddic,vogelsgesang/eddic,vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic,wichtounet/eddic |
6b88d013faed6b0fc20a58756e12143a713e709f | src/methods.cc | src/methods.cc | /*
** © 2014 by Philipp Dunkel <pip@pipobscure.com>
** Licensed under MIT License.
*/
void FSEvents::emitEvent(const char *path, UInt32 flags, UInt64 id) {
if (!handler) return;
NanScope();
v8::Local<v8::Value> argv[] = {
NanNew<v8::String>(path),
NanNew<v8::Number>(flags),
NanNew<v8::Number>(id)
}... | /*
** © 2014 by Philipp Dunkel <pip@pipobscure.com>
** Licensed under MIT License.
*/
void FSEvents::emitEvent(const char *path, UInt32 flags, UInt64 id) {
if (!handler) return;
NanScope();
v8::Local<v8::Value> argv[] = {
NanNew<v8::String>(path),
NanNew<v8::Number>(flags),
NanNew<v8::Number>(id)
}... | Replace deprecated NanRawString with NanUtf8String | Replace deprecated NanRawString with NanUtf8String
| C++ | mit | pmq20/fsevents,eccenca/fsevents,xzyfer/fsevents,xzyfer/fsevents,pmq20/fsevents,xzyfer/fsevents,strongloop/fsevents,bnoordhuis/fsevents,pmq20/fsevents,gdi2290/fsevents,gdi2290/fsevents,aredridel/fsevents,eccenca/fsevents,bnoordhuis/fsevents,strongloop/fsevents,gdi2290/fsevents,strongloop/fsevents,eccenca/fsevents,bnoord... |
61958d9d693cd5d3215509aaa3f4974308d8b461 | src/default_benchmarks.cpp | src/default_benchmarks.cpp | /*
* Copyright © 2017 Collabora Ltd.
*
* This file is part of vkmark.
*
* vkmark 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 2.1 of the License, or (at your option) any late... | /*
* Copyright © 2017 Collabora Ltd.
*
* This file is part of vkmark.
*
* vkmark 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 2.1 of the License, or (at your option) any late... | Add device-local variations of the vertex scene to the default benchmarks | main: Add device-local variations of the vertex scene to the default benchmarks
| C++ | lgpl-2.1 | vkmark/vkmark,vkmark/vkmark,vkmark/vkmark |
43ecf065ad908a143044a208058a244c9d7155d8 | libyuriks/math/Sphere.cpp | libyuriks/math/Sphere.cpp | #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), 2*dot(o... | #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), 2*dot(o... | Remove duplicated call to std::cos | Remove duplicated call to std::cos
| C++ | apache-2.0 | yuriks/NoiseRay,yuriks/NoiseRay |
afc5ab6514692990311c6d701301c96a576f3ec8 | vespalib/src/vespa/vespalib/datastore/free_list.cpp | vespalib/src/vespa/vespalib/datastore/free_list.cpp | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "free_list.h"
#include <cassert>
namespace vespalib::datastore {
FreeList::FreeList()
: _free_lists()
{
}
FreeList::~FreeList()
{
assert(_free_lists.empty());
}
void
FreeList::attach(BufferFree... | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "free_list.h"
#include <algorithm>
#include <cassert>
namespace vespalib::datastore {
FreeList::FreeList()
: _free_lists()
{
}
FreeList::~FreeList()
{
assert(_free_lists.empty());
}
void
FreeLi... | Include algorithm to get definition of std::find | Include algorithm to get definition of std::find
| C++ | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
ee7162f51dcc2915219f4ac641581d27eb31bde9 | src/filefinder.cpp | src/filefinder.cpp | #include "filefinder.h"
#if ! defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600
#define _XOPEN_SOURCE 600 /* Get nftw() and S_IFSOCK declarations */
#endif
#include <ftw.h>
namespace{
std::vector<node> *nodes;
int dirTree(const char *pathname, const struct stat *sbuf, int type,
struct FTW *ftwb){
std::s... | #include "filefinder.h"
#if ! defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600
#define _XOPEN_SOURCE 600 /* Get nftw() and S_IFSOCK declarations */
#endif
#include <ftw.h>
namespace{
std::vector<node> *nodes;
int dirTree(const char *pathname, const struct stat *, int type,
struct FTW *ftwb){
std::strin... | Remove unused variable in file finder, | Remove unused variable in file finder,
| C++ | mit | actinium/search,actinium/search |
0f07a65f501e5860fa5164af826281cb05633723 | tests/test-getusername.cpp | tests/test-getusername.cpp | #include <string>
#include <vector>
#include <unistd.h>
#include <gtest/gtest.h>
#include <scxcorelib/scxstrencodingconv.h>
#include "getusername.h"
TEST(GetUserName,simple)
{
// allocate a WCHAR_T buffer to receive username
DWORD lpnSize = L_cuserid;
WCHAR_T lpBuffer[lpnSize];
BOOL result = GetUserName(lpBuffer,... | #include <string>
#include <vector>
#include <unistd.h>
#include <gtest/gtest.h>
#include <scxcorelib/scxstrencodingconv.h>
#include "getusername.h"
class GetUserNameTest : public ::testing::Test {
protected:
DWORD lpnSize;
std::vector<WCHAR_T> lpBuffer;
BOOL result;
std::string userName;
GetUserNameTest(): user... | Use test fixture in GetUserName unit tests | Use test fixture in GetUserName unit tests
| C++ | mit | daxian-dbw/PowerShell,KarolKaczmarek/PowerShell,daxian-dbw/PowerShell,kmosher/PowerShell,kmosher/PowerShell,bingbing8/PowerShell,KarolKaczmarek/PowerShell,bingbing8/PowerShell,JamesWTruher/PowerShell-1,jsoref/PowerShell,KarolKaczmarek/PowerShell,JamesWTruher/PowerShell-1,bmanikm/PowerShell,bingbing8/PowerShell,PaulHigi... |
96dc7e1aecba90488cec2618f8037d36fd2bfd92 | viewer/KVProxy.cpp | viewer/KVProxy.cpp | #include "KVProxy.h"
#include "KVProxy_p.h"
#include <iostream>
KVProxy::KVProxy(QObject *parent, unsigned short port) :
QObject(parent), p("127.0.0.1", port)
{
// Make the poll timer tell the proxy to poll; this will be started with
// a timeout of 0, so it will effectively poll on every event loop tick
connect(&... | #include "KVProxy.h"
#include "KVProxy_p.h"
#include <iostream>
#include <string>
KVProxy::KVProxy(QObject *parent, unsigned short port) :
QObject(parent), p("127.0.0.1", port)
{
// Make the poll timer tell the proxy to poll; this will be started with
// a timeout of 0, so it will effectively poll on every event lo... | Print proxy errors to qDebug | Print proxy errors to qDebug
| C++ | mit | KanColleTool/KanColleTool,kevin01523/KanColleTool,kevin01523/KanColleTool,kevin01523/KanColleTool,KanColleTool/KanColleTool |
277ab134d44347c288d6798cab9251348baae802 | src/examples/gamewindow/main.cpp | src/examples/gamewindow/main.cpp | #include <QGuiApplication>
#include <QQuickView>
int main(int argc, char *argv[]) {
QGuiApplication app(argc, argv);
QQuickView view;
view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
view.show();
return app.exec();
}
| #include <QGuiApplication>
#include <QQuickView>
#include <QDeclarativeEngine>
#include <QDir>
int main(int argc, char *argv[]) {
QByteArray data = "1";
qputenv("QML_IMPORT_TRACE", data);
QGuiApplication app(argc, argv);
QQuickView view;
view.engine()->addImportPath("../../imports");
view.s... | Add import path to gamewindow example | Add import path to gamewindow example
| C++ | mit | arcrowel/Bacon2D,paulovap/Bacon2D,kenvandine/Bacon2D,arcrowel/Bacon2D,kenvandine/Bacon2D,paulovap/Bacon2D |
2fce8efbe4a589332930d2aecc995b7ef8ed6b6d | template/main.cpp | template/main.cpp | //Precompiled header are used in this project
#include "stdafx.h"
//Include Annwvyn Engine.
#include <Annwvyn.h>
//Every Annwvyn classes are in the Annwvyn namespace
using namespace Annwvyn;
//Include our level/stages here
#include "myLevel.hpp"
AnnMain() //The application entry point is "AnnMain()". return type in... | //Precompiled header are used in this project
#include "stdafx.h"
//Include Annwvyn Engine.
#include <Annwvyn.h>
//Every Annwvyn classes are in the Annwvyn namespace
using namespace Annwvyn;
//Include our level/stages here
#include "myLevel.hpp"
AnnMain() //The application entry point is "AnnMain()". return type in... | Fix template game by using default event listener | Fix template game by using default event listener
| C++ | mit | Ybalrid/Annwvyn,Ybalrid/Annwvyn,Ybalrid/Annwvyn |
43b5a44977a265a694f38ee0188d44bb7032c962 | kazbase/file_utils.cpp | kazbase/file_utils.cpp | #include <string>
#include <fstream>
#include <streambuf>
#include "exceptions.h"
#include "file_utils.h"
namespace file_utils {
std::vector<unicode> read_lines(const unicode& filename) {
unicode contents = read(filename);
return unicode(contents).split("\n");
}
unicode read(const unicode& filename) {
... | #include <string>
#include <fstream>
#include <streambuf>
#include "exceptions.h"
#include "file_utils.h"
namespace file_utils {
std::vector<unicode> read_lines(const unicode& filename) {
unicode contents = read(filename);
return unicode(contents).split("\n");
}
unicode read(const unicode& filename) {
... | Improve the file reading code to not be so buggy | Improve the file reading code to not be so buggy
| C++ | bsd-2-clause | Kazade/kazbase,Kazade/kazbase |
fd9487174ee153cf5f741787bab238d256f2d2e0 | ppapi/tests/mojo/test_mojo.cc | ppapi/tests/mojo/test_mojo.cc | // Copyright 2014 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 "ppapi/tests/mojo/test_mojo.h"
#include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h"
REGISTER_TEST_CASE(Mojo);
TestMojo::TestM... | // Copyright 2014 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 "ppapi/tests/mojo/test_mojo.h"
#include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h"
REGISTER_TEST_CASE(Mojo);
TestMojo::TestM... | Make Mojo test more strict. | Pepper: Make Mojo test more strict.
Mojo's MessagePipe constructor uses assert() to check that
MojoCreateMessagePipe returns OK. This change makes the test explicitly
check the return value of MojoCreateMessagePipe, giving more correct
test behavior for Release builds.
Review URL: https://codereview.chromium.org/8970... | C++ | bsd-3-clause | axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/... |
0cf0f89c04e0b28f8c8efefae84c1ff7f6b06e5f | test/output/test_type_name.cpp | test/output/test_type_name.cpp | #include <mettle.hpp>
using namespace mettle;
struct my_type {};
namespace my_namespace {
struct another_type {};
}
suite<> test_type_name("type_name()", [](auto &_) {
_.test("primitives", []() {
expect(type_name<int>(), equal_to("int"));
expect(type_name<int &>(), regex_match("int\\s*&"));
expect(ty... | #include <mettle.hpp>
using namespace mettle;
struct my_type {};
namespace my_namespace {
struct another_type {};
}
suite<> test_type_name("type_name()", [](auto &_) {
_.test("primitives", []() {
expect(type_name<int>(), equal_to("int"));
expect(type_name<int &>(), regex_match("int\\s*&"));
expect(ty... | Fix type_name tests under Windows | Fix type_name tests under Windows
| C++ | bsd-3-clause | jimporter/mettle,jimporter/mettle |
26cf6ecd7bc8cda6032e0510646c27d455ed940b | Settings/Tabs/About.cpp | Settings/Tabs/About.cpp | #include "About.h"
#include "../../3RVX/Updater.h"
#include "../resource.h"
void About::Initialize() {
INIT_CONTROL(LBL_TITLE, Label, _title);
std::wstring version = Updater::MainAppVersionString();
_title.Text(L"3RVX " + version);
}
void About::LoadSettings() {
}
void About::SaveSettings() {
}
| #include "About.h"
#include "../Updater.h"
#include "../resource.h"
void About::Initialize() {
INIT_CONTROL(LBL_TITLE, Label, _title);
std::wstring version = Updater::MainAppVersionString();
_title.Text(L"3RVX " + version);
}
void About::LoadSettings() {
}
void About::SaveSettings() {
}
| Update about tab for Updater move | Update about tab for Updater move
| C++ | bsd-2-clause | malensek/3RVX,malensek/3RVX,malensek/3RVX |
40ed429b17b3d38715314cdc843b9484271927b9 | test/ofp/driver_unittest.cpp | test/ofp/driver_unittest.cpp | // Copyright (c) 2015-2017 William W. Fisher (at gmail dot com)
// This file is distributed under the MIT License.
#include "ofp/driver.h"
#include "ofp/unittest.h"
using namespace ofp;
class MockChannelListener : public ChannelListener {
public:
void onChannelUp(Channel *channel) override {}
void onChannelDown... | // Copyright (c) 2015-2017 William W. Fisher (at gmail dot com)
// This file is distributed under the MIT License.
#include "ofp/driver.h"
#include "ofp/unittest.h"
using namespace ofp;
class MockChannelListener : public ChannelListener {
public:
void onChannelUp(Channel *channel) override {}
void onChannelDown... | Fix driver test so it doesn't fail if another oftr process is running. | Fix driver test so it doesn't fail if another oftr process is running.
| C++ | mit | byllyfish/oftr,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr,byllyfish/libofp |
e1164b9ec5c34399cc9725bc511141d9a99304d6 | sieve/example.cpp | sieve/example.cpp | #include "sieve.h"
#include <cmath>
namespace
{
bool is_prime(int n)
{
if (n % 2 == 0) {
return false;
}
const int max_factor = static_cast<int>(std::sqrt(n));
for (int probe = 2; probe <= max_factor; ++probe) {
if (n % probe == 0) {
return false;
}
}
return ... | #include "sieve.h"
#include <algorithm>
#include <list>
#include <numeric>
namespace sieve
{
std::vector<int> primes(int n)
{
std::vector<int> result;
std::list<int> candidates(n-1);
std::iota(candidates.begin(), candidates.end(), 2);
while (!candidates.empty()) {
const int next = candidates.f... | Implement the algorithm as described in the problem | Implement the algorithm as described in the problem
| C++ | mit | exercism/xcpp,lukasz-m-maciejewski/xcpp,patricksjackson/xcpp,exercism/xcpp,oalbe/xcpp,patricksjackson/xcpp,lukasz-m-maciejewski/xcpp,oalbe/xcpp |
35d3f4a4dfcde61c816c6331d82cea06e486d19e | source/gloperate/source/painter/Painter.cpp | source/gloperate/source/painter/Painter.cpp |
#include <gloperate/painter/Painter.h>
namespace gloperate
{
Painter::Painter(const std::string & name, ResourceManager & resourceManager, const std::string & relDataPath)
: Object(name)
, m_resourceManager(resourceManager)
, m_relDataPath(relDataPath)
, m_backgroundColor(1.0, 1.0, 1.0)
{
}
Painter::~Painter()
{
... |
#include <gloperate/painter/Painter.h>
namespace gloperate
{
Painter::Painter(const std::string & name, ResourceManager & resourceManager, const std::string & relDataPath)
: Object(name)
, m_resourceManager(resourceManager)
, m_relDataPath(relDataPath)
, m_backgroundColor(0.0, 0.0, 0.0)
{
}
Painter::~Painter()
{
... | Change default background color to black | Change default background color to black
| C++ | mit | j-o/gloperate,lanice/gloperate,lanice/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,hpicgs/gloperate,Beta-Alf/gloperate,lanice/gloperate,j-o/gloperate,p-otto/gloperate,cginternals/gloperate,p-otto/gloperate,cginternals/gloperate,cginternals/gloperate,cginternals/gloperate,p-otto/gloperate,hpicgs/gl... |
5889e309961b865fbb2c4ed7f704c315c005a63c | src/core/SkPictureRecorder.cpp | src/core/SkPictureRecorder.cpp | /*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifdef SK_BUILD_FOR_ANDROID
#include "SkPicturePlayback.h"
#endif
#include "SkPictureRecorder.h"
SkCanvas* SkPictureRecorder::beginRecording(int width, int height,
... | /*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Need to include SkTypes first, so that SK_BUILD_FOR_ANDROID is defined.
#include "SkTypes.h"
#ifdef SK_BUILD_FOR_ANDROID
#include "SkPicturePlayback.h"
#endif
#include "SkP... | Include SkTypes to fix Android frameworks build | Include SkTypes to fix Android frameworks build
Since Android's defines are included in SkUserConfig (rather than
being defined in the build file), we need to include something that
includes SkUserConfig (transitively; meaning just about anything)
before we can use any build macros. Include SkTypes, "the correct
way t... | C++ | bsd-3-clause | nox/skia,MarshedOut/android_external_skia,vvuk/skia,AOSPU/external_chromium_org_third_party_skia,todotodoo/skia,xin3liang/platform_external_chromium_org_third_party_skia,OptiPop/external_skia,boulzordev/android_external_skia,AOSP-YU/platform_external_skia,nox/skia,MonkeyZZZZ/platform_external_skia,todotodoo/skia,codeau... |
c4ba9de9bff58e2bb7bb0bec012c7cb211212907 | src/blif_lexer.cpp | src/blif_lexer.cpp | #include "blif_lexer.hpp"
#include "blif_lexer.gen.hpp" //For blifparse_lex_*()
extern YY_DECL; //For blifparse_lex()
namespace blifparse {
Lexer::Lexer(FILE* file, Callback& callback)
: callback_(callback) {
blifparse_lex_init(&state_);
blifparse_set_in(file, state_);
}
Lexer::~Lexer() {
blifparse_... | #include "blif_lexer.hpp"
//Windows doesn't have unistd.h, so we set '%option nounistd'
//in blif_lexer.l, but flex still includes it in the generated
//header unless YY_NO_UNISTD_H is defined to 1
#define YY_NO_UNISTD_H 1
#include "blif_lexer.gen.hpp" //For blifparse_lex_*()
extern YY_DECL; //For blifparse_lex()
... | Remove unistd.h inclusion for Windows | Remove unistd.h inclusion for Windows
| C++ | mit | kmurray/libblifparse,kmurray/libblifparse |
2923f653f4a62b19fadcc3b8075b1bfe5ac4072e | src/insert_mode.cc | src/insert_mode.cc | #include <ncurses.h>
#include "../../../src/contents.hh"
#include "../../../src/key_aliases.hh"
#include "../../vick-move/src/move.hh"
void enter_insert_mode(contents& contents, boost::optional<int>) {
char ch;
contents.is_inserting = true;
while((ch = getch()) != _escape) {
contents.cont[contents... | #include <ncurses.h>
#include "../../../src/contents.hh"
#include "../../../src/key_aliases.hh"
#include "../../vick-move/src/move.hh"
void enter_insert_mode(contents& contents, boost::optional<int>) {
char ch;
contents.is_inserting = true;
while((ch = getch()) != _escape) {
contents.cont[contents... | Fix ``enter_replace_mode`` so that it works properly | Fix ``enter_replace_mode`` so that it works properly
| C++ | mpl-2.0 | czipperz/vick-insert-mode |
aa07419246cef12a88e09fe2f7e9ac5df2279f96 | samples/penguins/Penguin.cpp | samples/penguins/Penguin.cpp | #include "Penguin.h"
void Penguin::processEvents(SDL_Event* a_event)
{
if (a_event->type == SDL_KEYDOWN)
{
switch (a_event->key.keysym.sym)
{
case SDLK_LEFT:
{
} break;
case SDLK_RIGHT:
{
} break;
}
}
}
void Penguin::update(float a_deltaT)
{
}
void Penguin::startJump()
{
if (m_onTheG... | #include "Penguin.h"
void Penguin::processEvents(SDL_Event* a_event)
{
if (a_event->type == SDL_KEYDOWN)
{
switch (a_event->key.keysym.sym)
{
case SDLK_LEFT:
{
} break;
case SDLK_RIGHT:
{
} break;
}
}
}
void Penguin::update(float a_deltaT)
{
}
void Penguin::startJump()
{
if (m_jumpin... | Fix compile error on penguin sample game | Fix compile error on penguin sample game
| C++ | mit | sergiosvieira/yda,sergiosvieira/yda,sergiosvieira/yda |
4a6a2dde5fc8a2b56321109c8f3151b841dbb662 | sketching/benchmark_utils.cc | sketching/benchmark_utils.cc | // Copyright 2020 The Google Research 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... | // Copyright 2020 The Google Research 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... | Improve benchmarks by batching data. | Improve benchmarks by batching data.
PiperOrigin-RevId: 304062816
| C++ | apache-2.0 | google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,... |
b071df54e22d8c1a7dec3ddaef7494b4625ebdce | MailboxQt/msglistener.cpp | MailboxQt/msglistener.cpp | #include "msglistener.h"
#include <ei_connect.h>
namespace Mailbox {
MsgListener::MsgListener(int fd, QObject *parent) :
QThread(parent),
m_fd(fd)
{
}
void MsgListener::run()
{
}
} // namespace Mailbox
| #include "msglistener.h"
#include <ei_connect.h>
namespace Mailbox {
MsgListener::MsgListener(int fd, QObject *parent) :
QThread(parent),
m_fd(fd)
{
}
void MsgListener::run()
{
int length;
erlang_msg msg;
ei_x_buff buff;
ei_x_new(&buff);
length = ei_xreceive_msg_tmo(m_fd, &msg, &buff,... | Add Basic Message Recieve implementation | Add Basic Message Recieve implementation
Single shot message recieve implementation added
| C++ | lgpl-2.1 | willpenington/mailslot,willpenington/mailbox,willpenington/mailbox,willpenington/mailslot |
14f59872a905c9786c25eddd18d25c90a2692474 | content/browser/renderer_host/render_view_host_observer.cc | content/browser/renderer_host/render_view_host_observer.cc | // 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"
RenderViewHostObser... | // 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"
RenderViewHostObser... | Fix heap corruption that occurs when RenderViewHostObserver calls RenderViewHost to unregister when the latter is in its destructor. | Fix heap corruption that occurs when RenderViewHostObserver calls RenderViewHost to unregister when the latter is in its destructor.
TBR=dmichael
Review URL: http://codereview.chromium.org/6813043
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@80946 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C++ | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
d09927a429c8625506049e927133730ca596adef | tensorflow/core/profiler/utils/errors.cc | tensorflow/core/profiler/utils/errors.cc | /* 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 law or a... | /* 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 law or a... | Improve error messages of the Profiler. | Improve error messages of the Profiler.
PiperOrigin-RevId: 306947180
Change-Id: Idbebe90f3d29c6a2234424852b1dcfb06507af8d
| C++ | apache-2.0 | aam-at/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,karllessard/tensorflow,petewarden/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,fre... |
77cc8805c0980b262434f41fb8f69659fefbefe7 | src/agent.cpp | src/agent.cpp | #include <algorithm>
#include "url.h"
#include "agent.h"
#include "directive.h"
namespace Rep
{
Agent& Agent::allow(const std::string& query)
{
directives_.push_back(Directive(escape(query), true));
sorted_ = false;
return *this;
}
Agent& Agent::disallow(const std::string& qu... | #include <algorithm>
#include "url.h"
#include "agent.h"
#include "directive.h"
namespace Rep
{
Agent& Agent::allow(const std::string& query)
{
directives_.push_back(Directive(escape(query), true));
sorted_ = false;
return *this;
}
Agent& Agent::disallow(const std::string& qu... | Remove redundant escaping in allowed check. | Remove redundant escaping in allowed check.
| C++ | mit | seomoz/rep-cpp,seomoz/rep-cpp |
aadca9d157a8f202403d4428f325ae9fbe81a83c | test/test.cpp | test/test.cpp | // Copyright 2015 Adam Grandquist
#include "./test.hpp"
#include "./ReQL.hpp"
void
consume(ReQL::Cursor<ReQL::Result> cursor) {
for (auto && : cursor) {}
}
| // Copyright 2015 Adam Grandquist
#include "./test.hpp"
#include "./ReQL.hpp"
void
consume(ReQL::Cursor<ReQL::Result> cursor) {
for (auto &&_ : cursor) {}
}
| Add blank name for loop syntax. | Add blank name for loop syntax.
| C++ | apache-2.0 | grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core |
4cc4021a7e99e54105bbc4233eda79940832c772 | core/src/api/CosmosConfigurationDefaults.cpp | core/src/api/CosmosConfigurationDefaults.cpp | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from wallet.djinni
#include "CosmosConfigurationDefaults.hpp" // my header
namespace ledger { namespace core { namespace api {
std::string const CosmosConfigurationDefaults::COSMOS_DEFAULT_API_ENDPOINT = {"http://lite-client-0e27eefb-4031-4859-... | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from wallet.djinni
#include "CosmosConfigurationDefaults.hpp" // my header
namespace ledger { namespace core { namespace api {
std::string const CosmosConfigurationDefaults::COSMOS_DEFAULT_API_ENDPOINT = {"https://cosmos.coin.staging.aws.ledger... | Fix forgetting generating interfaces for explorer | Fix forgetting generating interfaces for explorer
| C++ | mit | LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core |
25222d38fcc2835bfc772f770a1a59299058911e | main.cpp | main.cpp | //
// Created by Alex Gurung
//
#include "helper.h"
void testnums(unsigned long long int hail){
unsigned long long int orghail = hail;
while(hail!= 0){
hail = testHail(hail); //Within helper.h file, testHail returns the next hailstone number, or 0 if you get to 4
}
cout << orghail << endl;
}
in... | //
// Created by Alex Gurung
//
#include "helper.h"
void testnums(unsigned long long int hail){
unsigned long long int orghail = hail;
while(hail!= 0){
hail = testHail(hail); //Within helper.h file, testHail returns the next hailstone number, or 0 if you get to 4
}
cout << orghail << endl; //Th... | Test commit EMAIL PROBLEM MEANS COMMITS DONT COUNT | Test commit
EMAIL PROBLEM MEANS COMMITS DONT COUNT
| C++ | mit | Alex-Gurung/HailStoneTester |
61b15ee2161161630853a580cf3871a87d1251b6 | src/Vector.cpp | src/Vector.cpp | #include <cstring>
#include "Vector.h"
Vector::Vector() {
capacity = 8;
data = new int[8];
}
void Vector::add(int value) {
size += 1;
if (size > capacity) {
reserve(capacity * 2);
}
data[size - 1] = value;
}
void Vector::reserve(int newCapacity) {
capacity = newCapacity;
int* newData = new int[ca... | #include <cstring>
#include "Vector.h"
Vector::Vector() {
capacity = 8;
data = new int[8];
}
void Vector::add(int value) {
size += 1;
if (size > capacity) {
reserve(capacity * 2);
}
data[size - 1] = value;
}
void Vector::reserve(int newCapacity) {
capacity = newCapacity;
int* newData = new int[ca... | Fix memory leak for reserving new arrays | Fix memory leak for reserving new arrays
| C++ | mit | simplyianm/cpp-cs-concepts,simplyianm/cpp-cs-concepts |
2f73cf5345425e9b3545244ded7df08ba204c8b9 | PWM/src/main.cpp | PWM/src/main.cpp | /**
******************************************************************************
* @file main.c
* @author Ac6
* @version V1.0
* @date 01-December-2013
* @brief Default main function.
******************************************************************************
*/
#include "stm32f4x... | /**
******************************************************************************
* @file main.c
* @author Ac6
* @version V1.0
* @date 01-December-2013
* @brief Default main function.
******************************************************************************
*/
#include "stm32f4x... | Add sample code for PWM | Add sample code for PWM | C++ | mit | michprev/flyhero-esp32,michprev/flyhero-esp32 |
f8561caa2c981a6f09b02bad89e931cb0419de0c | src/cpp/desktop/DesktopNetworkAccessManager.cpp | src/cpp/desktop/DesktopNetworkAccessManager.cpp | /*
* DesktopNetworkAccessManager.cpp
*
* Copyright (C) 2009-11 by RStudio, Inc.
*
* This program is licensed to you under the terms of version 3 of the
* GNU Affero General Public License. This program is distributed WITHOUT
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
* MERCHANTABILI... | /*
* DesktopNetworkAccessManager.cpp
*
* Copyright (C) 2009-11 by RStudio, Inc.
*
* This program is licensed to you under the terms of version 3 of the
* GNU Affero General Public License. This program is distributed WITHOUT
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
* MERCHANTABILI... | Revert "use file based webkit cache in desktop mode" (was crashing when opening the history pane on linux) | Revert "use file based webkit cache in desktop mode" (was crashing when opening the history pane on linux) | C++ | agpl-3.0 | JanMarvin/rstudio,sfloresm/rstudio,maligulzar/Rstudio-instrumented,jar1karp/rstudio,githubfun/rstudio,pssguy/rstudio,brsimioni/rstudio,suribes/rstudio,jzhu8803/rstudio,pssguy/rstudio,vbelakov/rstudio,githubfun/rstudio,edrogers/rstudio,nvoron23/rstudio,maligulzar/Rstudio-instrumented,jar1karp/rstudio,piersharding/rstudi... |
18a76819ef8b32e8c988211b6f348bc40c1734d0 | test/asan/TestCases/Linux/function-sections-are-bad.cc | test/asan/TestCases/Linux/function-sections-are-bad.cc | // Check that --gc-sections does not throw away (or localize) parts of sanitizer
// interface.
// RUN: %clang_asan -m64 %s -Wl,--gc-sections -o %t
// RUN: %clang_asan -m64 %s -DBUILD_SO -fPIC -o %t-so.so -shared
// RUN: %t 2>&1
#ifndef BUILD_SO
#include <assert.h>
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib... | // Check that --gc-sections does not throw away (or localize) parts of sanitizer
// interface.
// RUN: %clang_asan %s -Wl,--gc-sections -o %t
// RUN: %clang_asan %s -DBUILD_SO -fPIC -o %t-so.so -shared
// RUN: %t 2>&1
// REQUIRES: asan-64-bits
#ifndef BUILD_SO
#include <assert.h>
#include <dlfcn.h>
#include <stdio.h>... | Mark this test as 64-bit specific | Mark this test as 64-bit specific
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@204319 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
de0f0fb96e57f48c45b7bb93be0625524acc13ae | graph/floyd.cpp | graph/floyd.cpp | #include <iostream>
using namespace std;
int main() {
int a[100][100];
int d[100][100];
a = d;
for (int k = 0; k < n; k++) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
}
}
}
} | #include <iostream>
using namespace std;
int main() {
int n = 4;
int a[n][n];
int d[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> a[i][j];
d[i][j] = a[i][j];
}
}
for (int k = 0; k < n; k++) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n;... | Update Floyd with input output | Update Floyd with input output
| C++ | mit | jamesjaya/mylib |
ccd20178ba5e9ce57e0ac73bb66a5053c3e8e12d | opt/simplify_cfg/SimplifyCFG.cpp | opt/simplify_cfg/SimplifyCFG.cpp | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "SimplifyCFG.h"
#include "ControlFlow.h"
#include "DexClass.h"
#include "IRCode.h"
#include "Walkers.h"
void SimplifyCF... | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "SimplifyCFG.h"
#include "ControlFlow.h"
#include "DexClass.h"
#include "IRCode.h"
#include "Walkers.h"
void SimplifyCF... | Fix integer casting issues in Mac OSS build | Fix integer casting issues in Mac OSS build
Summary:
We were getting the following error:
```
error: return type 'long long' must match previous return
type 'long' when lambda expression has unspecified explicit return type
```
Addresses https://github.com/facebook/redex/issues/328.
Reviewed By: minjang
Diff... | C++ | mit | facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex |
afd46543bb8bd2a9d55a48db5a5dc1859d185fd6 | src/search/closed_list.cc | src/search/closed_list.cc | /* -*- mode:linux -*- */
/**
* \file closed_list.cc
*
*
*
* \author Ethan Burns
* \date 2008-10-09
*/
#include <map>
#include "state.h"
#include "closed_list.h"
void ClosedList::add(const State *s)
{
m[s->hash()] = s;
}
const State *ClosedList::lookup(const State *c) const
{
// this is stupid: apparently y... | /* -*- mode:linux -*- */
/**
* \file closed_list.cc
*
*
*
* \author Ethan Burns
* \date 2008-10-09
*/
#include <map>
#include "state.h"
#include "closed_list.h"
void ClosedList::add(const State *s)
{
m[s->hash()] = s;
}
const State *ClosedList::lookup(const State *c) const
{
map<int, const State *>::const_... | Use a const_iterator in ClosedList::lookup. | Use a const_iterator in ClosedList::lookup.
| C++ | mit | eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf |
8d2106f44e67853eb7d2c5863e545f5f784d6040 | src/cpp/ast/EarlyBailoutMethodInvocation.cpp | src/cpp/ast/EarlyBailoutMethodInvocation.cpp |
/**************************************************
* Source Code for the Original Compiler for the
* Programming Language Wake
*
* EarlyBailoutMethodInvecation.cpp
*
* Licensed under the MIT license
* See LICENSE.TXT for details
*
* Author: Michael Fairhurst
* Revised By:
*
*******************************... |
/**************************************************
* Source Code for the Original Compiler for the
* Programming Language Wake
*
* EarlyBailoutMethodInvecation.cpp
*
* Licensed under the MIT license
* See LICENSE.TXT for details
*
* Author: Michael Fairhurst
* Revised By:
*
*******************************... | Add type hint for java codegen | Add type hint for java codegen
| C++ | mit | MichaelRFairhurst/wake-compiler,MichaelRFairhurst/wake-compiler,MichaelRFairhurst/wake-compiler,MichaelRFairhurst/wake-compiler |
ff38f1baa4687ba9f5bf2616c0680f6acf195801 | cpp/runtimes/cluster-controller-runtime/JoynrRuntime.cpp | cpp/runtimes/cluster-controller-runtime/JoynrRuntime.cpp | /*
* #%L
* %%
* Copyright (C) 2011 - 2013 BMW Car IT GmbH
* %%
* 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 requir... | /*
* #%L
* %%
* Copyright (C) 2011 - 2013 BMW Car IT GmbH
* %%
* 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 requir... | Fix cluster controller runtime not defining addBroadcast() | [cpp] Fix cluster controller runtime not defining addBroadcast()
Change-Id: Ie28ecd9b6139672315704ff1f0d7b2b2ba4d9c85
| C++ | apache-2.0 | clive-jevons/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,clive-jevons/joynr,clive-jevons/joynr,bmwcarit/joynr,clive-jevons/joynr,clive-jevons/joynr,clive-jevons/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr |
91f64f31db0ca2bbbb527ac538088ac8f4e09aba | test/Misc/permissions.cpp | test/Misc/permissions.cpp | // REQUIRES: shell
// MSYS doesn't emulate umask.
// FIXME: Could we introduce another feature for it?
// REQUIRES: shell-preserves-root'
// RUN: umask 000
// RUN: %clang_cc1 -emit-llvm-bc %s -o %t
// RUN: ls -l %t | FileCheck --check-prefix=CHECK000 %s
// CHECK000: rw-rw-rw-
// RUN: umask 002
// RUN: %clang_cc1 -em... | // REQUIRES: shell
// MSYS doesn't emulate umask.
// FIXME: Could we introduce another feature for it?
// REQUIRES: shell-preserves-root
// RUN: umask 000
// RUN: %clang_cc1 -emit-llvm-bc %s -o %t
// RUN: ls -l %t | FileCheck --check-prefix=CHECK000 %s
// CHECK000: rw-rw-rw-
// RUN: umask 002
// RUN: %clang_cc1 -emi... | Fix typo in test's REQUIRES line | Fix typo in test's REQUIRES line
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@193507 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
2047de14cdc7d863049e2b9a894b8dc4ba9bfae1 | third_party/llvm-7.0/stubs/Stubs.cpp | third_party/llvm-7.0/stubs/Stubs.cpp | // Copyright 2019 The SwiftShader 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 b... | // Copyright 2019 The SwiftShader 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 b... | Fix warning treated as error | Fix warning treated as error
Bug: chromium:963658
Change-Id: I7db9bd4b5cec57c65298cdef512d18e31d4182f5
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31594
Presubmit-Ready: Ben Clayton <1f693eb7158dc33015048c09d6712f74dabddf79@google.com>
Kokoro-Presubmit: kokoro <2ac7b1f3fa578934c95181d4272b... | C++ | apache-2.0 | bkaradzic/SwiftShader,google/swiftshader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader |
11f95ac7024daf9e7e142c46387dff0f7cd8b6e8 | chrome/browser/extensions/extension_tabs_apitest.cc | chrome/browser/extensions/extension_tabs_apitest.cc | // 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"
#include "chrome/browser/browser.h"
#include "chrome/browser/pref_service.h"
#include "chrom... | // 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"
#include "chrome/browser/browser.h"
#include "chrome/browser/pref_service.h"
#include "chrom... | Disable ExtensionApiTest.Tabs on Mac. TEST=no random redness on Mac OS X 10.6 bot BUG=37387 TBR=skerner@ | Disable ExtensionApiTest.Tabs on Mac.
TEST=no random redness on Mac OS X 10.6 bot
BUG=37387
TBR=skerner@
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@40616 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | yitian134/chromium,gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium... |
998581e6910ccf34390d2b021124cf449b361295 | test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp | test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp | /**
* Copyright 2014 Truphone
*/
#include "XmppHarness.h"
#include "CommandFactory.h"
#include "XmppResourceStore.h"
#include "XmppHelpCommand.h"
#include "XmppPresenceCommand.h"
#include "XmppConnectCommand.h"
#include "XmppMessageCommand.h"
namespace truphone
{
namespace test
{
namespace cascades
{
XmppHarnes... | /**
* Copyright 2014 Truphone
*/
#include "XmppHarness.h"
#include "CommandFactory.h"
#include "XmppResourceStore.h"
#include "XmppHelpCommand.h"
#include "XmppPresenceCommand.h"
#include "XmppConnectCommand.h"
#include "XmppMessageCommand.h"
#include "XmppDisconnectCommand.h"
namespace truphone
{
namespace test
{
... | Add the disconnect command to the factory. | Add the disconnect command to the factory.
| C++ | bsd-3-clause | trulabs/labs-truphone-cascades-test,trulabs/labs-truphone-cascades-test,trulabs/labs-truphone-cascades-test |
4a971ed00a61187fce1c4060be82d55ad46cae9b | chrome/browser/metrics/metrics_service_unittest.cc | chrome/browser/metrics/metrics_service_unittest.cc | // 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/metrics/metrics_service.h"
#include <string>
#include "base/base64.h"
#include "testing/gtest/include/gtest/gtest.h"
clas... | // 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 <ctype.h>
#include <string>
#include "chrome/browser/metrics/metrics_service.h"
#include "testing/gtest/include/gtest/gtest.h"
// Ensure t... | Clean up MetricsService unit test. | Clean up MetricsService unit test.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/10119030
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@133439 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | adobe/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,adobe/chrom... |
51961e5b3c59f1f6988819f7d111782e7ec9b15c | DiskSampling/PoissonDiskSampling.cpp | DiskSampling/PoissonDiskSampling.cpp | #include "PoissonDiskSampling.h"
PoissonDiskSampling::PoissonDiskSampling(int pointWidth, int pointHeight, double pointMinDist, double pointCount) :
m_width(pointWidth),
m_height(pointHeight),
m_minDist(pointMinDist),
m_pointCount(pointCount),
m_cellSize(m_minDist / 1.414214f),
m_gridWidth(ceil(m_width / m_cellS... | #include "PoissonDiskSampling.h"
#include <random>
PoissonDiskSampling::PoissonDiskSampling(int pointWidth, int pointHeight, double pointMinDist, double pointCount) :
m_width(pointWidth),
m_height(pointHeight),
m_minDist(pointMinDist),
m_pointCount(pointCount),
m_cellSize(m_minDist / 1.414214f),
m_gridWidth(cei... | Implement Generate() : create firstPoint and assign it | Implement Generate() : create firstPoint and assign it
| C++ | mit | utilForever/PolyMapGenerator |
14cd7cb7bf408122f077746953b0f3d5e5305d41 | src/planner/main_action_planner/src/main_action_planner_node.cpp | src/planner/main_action_planner/src/main_action_planner_node.cpp | #include "main_action_planner_node.hpp"
int main(int argc, char** argv) {
ros::init(argc, argv, "test_action_planner_node");
ros::NodeHandle nh {"~"};
StateChecker status {nh};
while (ros::ok()) {
auto posture_key = status.getPostureKey();
RequestPosture* rp_p = RequestPostureFactory::get(posture_key[... | #include "main_action_planner_node.hpp"
int main(int argc, char** argv) {
ros::init(argc, argv, "test_action_planner_node");
ros::NodeHandle nh {};
StateChecker status {nh};
while (ros::ok()) {
auto posture_key = status.getPostureKey();
RequestPosture* rp_p = RequestPostureFactory::get(posture_key[0],... | Use relational node handle for topic communicate | Use relational node handle for topic communicate
| C++ | mit | agrirobo/arcsys2,agrirobo/arcsys2 |
dfef367f9bd6e474bbeb0bf15b0e9ae982fba803 | src/rib_converter_base.cpp | src/rib_converter_base.cpp | /*=========================================================================
Program: Converter Base Class
Language: C++
Copyright (c) Brigham and Women's Hospital. All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR ... | /*=========================================================================
Program: Converter Base Class
Language: C++
Copyright (c) Brigham and Women's Hospital. All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR ... | Call setQueue in setup function. | Call setQueue in setup function. | C++ | bsd-3-clause | openigtlink/ROS-IGTL-Bridge |
51a1d61bc0d15b5ceb87f915bf6271a5d6f171a7 | src/robot_editor.cpp | src/robot_editor.cpp | #include "robot_editor.h"
#include "robot_preview.h"
#include <cstdlib>
RobotEditor::RobotEditor()
{
main_window_ui_.setupUi(&main_window_);
robot_preview_ = new RobotPreview(main_window_ui_.rvizFrame);
QObject::connect(main_window_ui_.actionExit, SIGNAL(triggered()), this, SLOT(exitTrigger()));
QObject::connec... | #include "robot_editor.h"
#include "robot_preview.h"
#include <cstdlib>
RobotEditor::RobotEditor()
{
main_window_ui_.setupUi(&main_window_);
robot_preview_ = new RobotPreview(main_window_ui_.rvizFrame);
QObject::connect(main_window_ui_.actionExit, SIGNAL(triggered()), this, SLOT(exitTrigger()));
QObject::connec... | Exit menu action now works. | Exit menu action now works.
| C++ | bsd-3-clause | rhololkeolke/robot_editor |
1e4e9be492f162d3c64e7a5207e434b48a7e3c27 | src/main.cpp | src/main.cpp | #include <QtQuick>
#include <sailfishapp.h>
#include <QScopedPointer>
#include <QQuickView>
#include <QQmlEngine>
#include <QGuiApplication>
#include "factor.h"
void loadTranslations() {
QString langCode = QLocale::system().name().mid(0, 2);
const QString Prefix("sailfactor_");
if (QFile::exists(QString... | #include <QtQuick>
#include <sailfishapp.h>
#include <QScopedPointer>
#include <QQuickView>
#include <QQmlEngine>
#include <QGuiApplication>
#include "factor.h"
static void loadTranslations() {
QString langCode = QLocale::system().name().mid(0, 2);
const QString Prefix("sailfactor_");
if (QFile::exists(... | Make loadTranslations() a static function. | Make loadTranslations() a static function.
| C++ | mit | lanurmi/sailfactor,lanurmi/sailfactor |
197948bede96e5a64579e2641ab0beed9c9b53de | OpenGestureControl/main.cpp | OpenGestureControl/main.cpp | #include <functional>
#include <QApplication>
#include <QMenu>
#include <QObject>
#include <QSystemTrayIcon>
#include <QTranslator>
#include "piemenu.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false);
QTranslator translator;
translator.load(QLoc... | #include <functional>
#include <QApplication>
#include <QMenu>
#include <QObject>
#include <QSystemTrayIcon>
#include <QTranslator>
#include "piemenu.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false);
QTranslator translator;
translator.load(QLoc... | Make quit tray menu option work | Make quit tray menu option work
| C++ | mit | OpenGestureControl/Desktop,OpenGestureControl/Desktop |
913b4c37a914597be4387420a106da8d4e17c770 | polaris_shared/src/packets/server/ShipBlockPacket.cpp | polaris_shared/src/packets/server/ShipBlockPacket.cpp | ShipBlockPacket::ShipBlockPacket(uint8_t ip1, uint8_t ip2, uint8_t ip3, uint8_t ip4, uint16_t port) {
static const uint8_t ipBits[] = { ip1, ip2, ip3, ip4};
memcpy(this->ipaddr, ipBits, sizeof(ipBits));
this->port = port;
}
ShipBlockPacket::~ShipBlockPacket() {
delete[] ipaddr;
}
PacketData ShipBlockP... | #include <string.h>
#include "ShipBlockPacket.h"
ShipBlockPacket::ShipBlockPacket(uint8_t ip1, uint8_t ip2, uint8_t ip3, uint8_t ip4, uint16_t port) {
static const uint8_t ipBits[] = { ip1, ip2, ip3, ip4};
memcpy(this->ipaddr, ipBits, sizeof(ipBits));
this->port = port;
}
ShipBlockPacket::~ShipBlockPacket... | Stop deleting my includes clion | Stop deleting my includes clion
| C++ | agpl-3.0 | PolarisTeam/PolarisLegacy,PolarisTeam/PolarisLegacy |
afe170774a34b0866dc5a61c5d73c591f35dd2f1 | lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp | lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp | //===-- AVRMCAsmInfo.cpp - AVR asm properties -----------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- AVRMCAsmInfo.cpp - AVR asm properties -----------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Migrate to new MCAsmInfo CodePointerSize | [AVR] Migrate to new MCAsmInfo CodePointerSize
Reviewers: dylanmckay, rengolin, kzhuravl, jroelofs
Reviewed By: kzhuravl, jroelofs
Subscribers: kzhuravl, llvm-commits
Differential Revision: https://reviews.llvm.org/D32154
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@300641 91177308-0d34-0410-b5e6-96231b3... | C++ | apache-2.0 | GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror... |
20f7464ed32dc9a6fbd3929926f658bffa8cc748 | voice_engine/test/auto_test/standard/voe_base_misc_test.cc | voice_engine/test/auto_test/standard/voe_base_misc_test.cc | /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | Fix MaxChannels test; 32 -> 100. | Fix MaxChannels test; 32 -> 100.
TBR=henrika
Review URL: https://webrtc-codereview.appspot.com/1060010
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 6ed8ebcef92ed9bbb0e7d50a09295aa216f1422f
| C++ | bsd-3-clause | sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc |
d56be2b8ed0a2ead3a85b164a216519cd495b94e | Source/WindowsFiberImpl.cpp | Source/WindowsFiberImpl.cpp | #include "Flax/WindowsFiberImpl.h"
#include <cassert>
#include <Windows.h>
namespace flax {
WindowsFiberImpl::WindowsFiberImpl(Fiber* fiber, FiberMainFunction mainFunction, bool isMainFiber)
: address(nullptr), mainFiber(isMainFiber), fiberAndMain(fiber, mainFunction) {
assert(fiber && mainFunction);
if (... | #include "Flax/WindowsFiberImpl.h"
#include <cassert>
#include <Windows.h>
namespace flax {
WindowsFiberImpl::WindowsFiberImpl(Fiber* fiber, FiberMainFunction mainFunction, bool isMainFiber)
: address(nullptr), mainFiber(isMainFiber), fiberAndMain(fiber, mainFunction) {
assert(fiber && mainFunction);
if (... | Add additional check to assert call | Add additional check to assert call
| C++ | mit | aaronmjacobs/Flax |
232e9e4c5b70e6a77b82d0e408551d713e67966d | database/cpp/db/database/sqlite3/Sqlite3Connection.cpp | database/cpp/db/database/sqlite3/Sqlite3Connection.cpp | /*
* Copyright (c) 2007 Digital Bazaar, Inc. All rights reserved.
*/
#include <iostream>
#include "db/database/sqlite3/Sqlite3Connection.h"
#include "db/database/sqlite3/Sqlite3Statement.h"
using namespace std;
using namespace db::database;
using namespace db::database::sqlite3;
Sqlite3Connection::Sqlite3Connect... | /*
* Copyright (c) 2007 Digital Bazaar, Inc. All rights reserved.
*/
#include <iostream>
#include "db/database/sqlite3/Sqlite3Connection.h"
#include "db/database/sqlite3/Sqlite3Statement.h"
using namespace std;
using namespace db::database;
using namespace db::database::sqlite3;
Sqlite3Connection::Sqlite3Connect... | Set mHandle to NULL after closing. | Set mHandle to NULL after closing.
| C++ | agpl-3.0 | digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch |
f91b4c62913375ae7f6c0a16e7edd9f0f2b2a443 | test/asan/TestCases/Windows/oom.cc | test/asan/TestCases/Windows/oom.cc | // RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: asan-32-bits
#include <malloc.h>
int main() {
while (true) {
void *ptr = malloc(200 * 1024 * 1024); // 200MB
}
// CHECK: failed to allocate
}
| // RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: asan-32-bits
#include <malloc.h>
int main() {
while (true) {
void *ptr = malloc(200 * 1024 * 1024); // 200MB
}
// CHECK: allocator is terminating the process instead of returning 0
}
| Fix allocator OOM test on Windows. | [Sanitizers] Fix allocator OOM test on Windows.
Summary:
Point of failure is different after D34243, hence the change of the
message.
Reviewers: eugenis
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D34292
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@305580 91177308-... | C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
f9b33b36916b07f227f43220ff44fa3ba71fd2b3 | realsense/enhanced_photography/enhanced_photography_extension.cc | realsense/enhanced_photography/enhanced_photography_extension.cc | // Copyright (c) 2015 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "realsense/enhanced_photography/enhanced_photography_extension.h"
#include <string>
#include "realsense/enhanced_photography/enhanced_photogra... | // Copyright (c) 2015 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "realsense/enhanced_photography/enhanced_photography_extension.h"
#include <string>
#include "base/at_exit.h"
#include "realsense/enhanced_pho... | Fix DCHECK of AtExitManager failure | [EP][WIN] Fix DCHECK of AtExitManager failure
Fix #113
| C++ | bsd-3-clause | halton/realsense-extensions-crosswalk,crosswalk-project/realsense-extensions-crosswalk,crosswalk-project/realsense-extensions-crosswalk,halton/realsense-extensions-crosswalk,halton/realsense-extensions-crosswalk,halton/realsense-extensions-crosswalk,jondong/realsense-extensions-crosswalk,crosswalk-project/realsense-ext... |
718acdbd6427a2f2af3bb8da8220455066cae8ce | lib/sanitizer_common/sanitizer_allocator.cc | lib/sanitizer_common/sanitizer_allocator.cc | //===-- sanitizer_allocator.cc --------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- sanitizer_allocator.cc --------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Use __libc_malloc/__libc_free instead of malloc/free inside internal allocator on Linux (important for TSan) | [Sanitizer] Use __libc_malloc/__libc_free instead of malloc/free inside internal allocator on Linux (important for TSan)
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@158261 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
3efd18ec2b794f09ffca64039deefa14500c7dd9 | src/obstacle_avoidance.cpp | src/obstacle_avoidance.cpp | #include <ros/ros.h>
#include <geometry_msgs/Twist.h>
namespace quadrotor_obstacle_avoidance {
int main(int argc, char *argv[]){
ros::init(argc, argv, "quadrotor_obstacle_avoidance");
ros::NodeHandle node;
ros::Publisher cmd_pub = node.advertise<geometry_msgs::Twist>("cmd_vel", 10);
geometry... | #include <ros/ros.h>
#include <geometry_msgs/Twist.h>
int main(int argc, char *argv[]){
ros::init(argc, argv, "quadrotor_obstacle_avoidance");
ros::NodeHandle node;
ros::Publisher cmd_pub = node.advertise<geometry_msgs::Twist>("cmd_vel", 10);
ros::Duration(1).sleep();
geometry_msgs::... | Fix building error of node | Fix building error of node
| C++ | bsd-3-clause | DaikiMaekawa/quadrotor_navigation |
55c58da86afa491768a0b895e7f1285ecad8d7b2 | 2017/pc/aula3/exercicio.cpp | 2017/pc/aula3/exercicio.cpp | #include <iostream>
#include <string>
using namespace std;
typedef struct {
String nome;
String cpf;
float saldo;
} Conta;
float get_saldo( Conta &conta ) {
return conta.saldo;
}
void set_saldo( Conta &conta ) {
conta.saldo;
}
int main() {
Conta conta;
init_conta( conta );
return 0... | #include <iostream>
#include <string>
using namespace std;
typedef struct {
String nome;
String cpf;
float saldo;
} Conta;
int main() {
Conta conta;
init_conta( conta );
return 0;
}
| Revert "Criando estruturas de dados" | Revert "Criando estruturas de dados"
This reverts commit d3dd310602e5139dcbfabaca4c4835b064c0b958.
| C++ | mit | LorhanSohaky/UFSCar,LorhanSohaky/UFSCar,LorhanSohaky/UFSCar,LorhanSohaky/UFSCar,LorhanSohaky/UFSCar,LorhanSohaky/UFSCar,LorhanSohaky/UFSCar,LorhanSohaky/UFSCar |
2c3ef0931385d82be1783b46729a8744fffff7fa | chrome/common/thumbnail_support.cc | chrome/common/thumbnail_support.cc | // 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/common/thumbnail_support.h"
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
#if defined(OS_WIN)
#include ... | // 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/common/thumbnail_support.h"
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
#if defined(OS_WIN)
#include ... | Revert "Temporarily disable in-browser thumbnailing on Win and Mac." | Revert "Temporarily disable in-browser thumbnailing on Win and Mac."
This reverts commit 4cc7f1d81a2e9a88a25bc211af457ca7af200d0e.
Now the cause of http://crbug.com/130916 was identified and fixed, I'll re-enable in-browser thumbnailer on Win and Mac.
BUG=130916,120003
TEST=Manual
Review URL: https://chromiumcodere... | C++ | bsd-3-clause | timopulkkinen/BubbleFish,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,keishi/chromium,pozdnyakov/chromium-c... |
8e055ff6c42808855045453cd975625cc9d78d46 | src/amx_profiler/function_info.cpp | src/amx_profiler/function_info.cpp | // AMX profiler for SA-MP server: http://sa-mp.com
//
// Copyright (C) 2011-2012 Sergey Zolotarev
//
// 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/l... | // AMX profiler for SA-MP server: http://sa-mp.com
//
// Copyright (C) 2011-2012 Sergey Zolotarev
//
// 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/l... | Fix num_calls initialized to 1 instead of 0 | Fix num_calls initialized to 1 instead of 0
| C++ | bsd-2-clause | Zeex/samp-plugin-profiler,Zeex/samp-plugin-profiler |
3ad3d44f15d81189b68fb5cc2f9463f07ffbdf9b | gpu/src/GrGLDefaultInterface_none.cpp | gpu/src/GrGLDefaultInterface_none.cpp |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
struct GrGLInterface;
const GrGLInterface* GrGLDefaultInterface() {
return NULL;
}
|
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrGLInterface.h"
const GrGLInterface* GrGLDefaultInterface() {
return NULL;
}
| Include GrGLInterface.h instead of forward declaring, since we have to get NULL defined anyway. | Include GrGLInterface.h instead of forward declaring, since we have to get NULL defined anyway.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2280 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | Khaon/android_external_skia,Asteroid-Project/android_external_skia,zhaochengw/platform_external_skia,MinimalOS-AOSP/platform_external_skia,sombree/android_external_skia,mmatyas/skia,Euphoria-OS-Legacy/android_external_skia,mydongistiny/android_external_skia,ench0/external_chromium_org_third_party_skia,geekboxzone/mmall... |
c78aebb5b07c7e1c6f50b2c460658b8202306fbf | remoting/jingle_glue/ssl_adapter.cc | remoting/jingle_glue/ssl_adapter.cc | // 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 "remoting/jingle_glue/ssl_adapter.h"
#if defined(OS_WIN)
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#else
#include "remo... | // 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 "remoting/jingle_glue/ssl_adapter.h"
#if defined(OS_WIN)
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#else
#include "remo... | Use NSS for SSL encryption of XMPP connection on Windows. | Use NSS for SSL encryption of XMPP connection on Windows.
Review URL: http://codereview.chromium.org/10169012
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@133247 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,dednal/chromium.src,hgl888/chromium-crosswalk-efl,cro... |
a381f9d3121b52b4f13b7fba34eb71a26fa7b931 | src/main.cpp | src/main.cpp | #include "Emulator.hpp"
int main(const int argc, char* argv[]) {
Emulator emulator;
emulator.run();
} | #include <iostream>
#include <string>
#include <stdexcept>
#include <limits>
#include "Emulator.hpp"
void printHelpMessage() {
std::cout
<< "A NES emulator. Takes .nes files.\n\n"
<< "Usage: turbones [options] <path-to-rom-file>\n\n"
<< "Options:\n"
<< "\t-h --help\n"
<< "... | Add basic command line argument parsing. | Add basic command line argument parsing.
| C++ | mit | TaylorLewis/turbones |
023b3e453147b1b637c317a44b24ffe6fc67289a | searchlib/src/vespa/searchlib/attribute/multi_value_mapping2.cpp | searchlib/src/vespa/searchlib/attribute/multi_value_mapping2.cpp | // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/log/log.h>
#include "multi_value_mapping2.h"
#include "multi_value_mapping2.hpp"
#include <vespa/vespalib/stllike/string.h>
LOG_SETUP(".searchlib.attribute... | // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/log/log.h>
#include "multi_value_mapping2.h"
#include "multi_value_mapping2.hpp"
#include <vespa/vespalib/stllike/string.h>
#include "multivalue.h"
#include... | Add explicit instantiation of variants to be used in production. | Add explicit instantiation of variants to be used in production.
| C++ | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
c45c3a7b34353d000eb3e538e1b12529b87aeff0 | tests/aconcurrentunittests/main.cpp | tests/aconcurrentunittests/main.cpp | #include <QString>
#include <QtTest>
#include <execinfo.h>
#include <signal.h>
#include <unistd.h>
#include <TestRunner>
#include <QtQuickTest/quicktest.h>
#include "aconcurrenttests.h"
#include "aconcurrent.h"
void dummy() {
// Dummy function. It is not called.
// It just prove it won't create any duplicated ... | #include <QString>
#include <QtTest>
#include <TestRunner>
#include <QtQuickTest/quicktest.h>
#include "aconcurrenttests.h"
#include "aconcurrent.h"
void dummy() {
// Dummy function. It is not called.
// It just prove it won't create any duplicated symbols
auto worker = [](int value) {
return valu... | Fix a build issue in Windows | Fix a build issue in Windows
| C++ | apache-2.0 | e-fever/aconcurrent |
9d3849abe6b4df2c7e4e6a1ac28fa5a8282dd558 | examples/dummy.cpp | examples/dummy.cpp | // This program is free software licenced under MIT Licence. You can
// find a copy of this licence in LICENCE.txt in the top directory of
// source code.
//
#include "../include/turing_machine.hpp"
using namespace turingmachine;
class do_nothing final: public tm_abstract_problem {
public:
const char *name() c... | // This program is free software licenced under MIT Licence. You can
// find a copy of this licence in LICENCE.txt in the top directory of
// source code.
//
#include "../include/turing_machine.hpp"
using namespace turingmachine;
class do_nothing final: public tm_abstract_problem {
public:
const char *name() c... | Add comment to make it clear | Add comment to make it clear
| C++ | mit | calincru/Turing-Machine |
67cbfa6161de9c8ba72fb49552549b5250b5a5ad | examples/types.cpp | examples/types.cpp | #include <lua.hpp>
#include <luwra.hpp>
#include <iostream>
using namespace luwra;
// You may add custom specializations of luwra::Value in order to retrieve them from the stack.
template <>
struct Value<char> {
/**
* Retrieve the value at position `n`.
*/
static inline
char Read(State* state, int n) {
auto... | #include <lua.hpp>
#include <luwra.hpp>
#include <iostream>
using namespace luwra;
// You may add custom specializations of luwra::Value in order to retrieve them from the stack.
template <>
struct Value<char> {
/**
* Retrieve the value at position `n`.
*/
static inline
char Read(State* state, int n) {
auto... | Use Push to push a value | example: Use Push to push a value
| C++ | bsd-3-clause | vapourismo/luwra |
9bb950ab0eed02689a064b02382e2a851f48f86d | modules/vapor/test/TestSuite/main.cpp | modules/vapor/test/TestSuite/main.cpp | #include <CppUnit/framework/TestSuite.h>
#include <CppUnit/textui/TestRunner.h>
#include <TestCases/Socket/SocketTest.h>
#include <TestCases/Thread/ThreadTest.h>
#include <TestCases/IO/Socket/InetAddrTest.h>
using namespace vpr;
int main (int ac, char **av)
{
TestRunner runner;
//-----------------------------... | #include <CppUnit/framework/TestSuite.h>
#include <CppUnit/textui/TestRunner.h>
#include <TestCases/Socket/SocketTest.h>
#include <TestCases/Thread/ThreadTest.h>
#include <TestCases/IO/Socket/InetAddrTest.h>
//using namespace vpr;
int main (int ac, char **av)
{
TestRunner runner;
//---------------------------... | Put sock test in vprTest namespace | Put sock test in vprTest namespace
git-svn-id: 769d22dfa2d22aad706b9a451492fb87c0735f19@4515 08b38cba-cd3b-11de-854e-f91c5b6e4272
| C++ | lgpl-2.1 | godbyk/vrjuggler-upstream-old,vrjuggler/vrjuggler,vancegroup-mirrors/vrjuggler,LiuKeHua/vrjuggler,godbyk/vrjuggler-upstream-old,godbyk/vrjuggler-upstream-old,vancegroup-mirrors/vrjuggler,vrjuggler/vrjuggler,godbyk/vrjuggler-upstream-old,MichaelMcDonnell/vrjuggler,vancegroup-mirrors/vrjuggler,vancegroup-mirrors/vrjuggle... |
94fcf226fca7f58205d79a03f157638bb45e899a | runtime/bin/crypto_macos.cc | runtime/bin/crypto_macos.cc | // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(HOST_OS_MACOS)
#include <errno.h> // NOLINT
#include <fcntl... | // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(HOST_OS_MACOS)
#include <errno.h> // NOLINT
#include <fcntl... | Disable checking of sigprof on mac. | [vm/sigprof] Disable checking of sigprof on mac.
Fixes https://github.com/dart-lang/sdk/issues/41239
Change-Id: I397f70c7d9977bbf8ce33ce649c7d82e02fd26a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151880
Reviewed-by: Ryan Macnak <d738b7f001baf9789095d7dc549cff6de60b011d@google.com>
Commit-Queue: Alexan... | C++ | bsd-3-clause | dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk |
8378e2cfb05dbdddc57d58b8a6b1ecb04ca9f4cb | ReQL-expr-test.cpp | ReQL-expr-test.cpp | #include "ReQL-test.hpp"
#include "catch.h"
using namespace ReQL;
TEST_CASE("Connection", "[c++][connect]") {
Connection conn = connect();
REQUIRE(conn.isOpen());
} | #include "ReQL-test.hpp"
#include "catch.h"
using namespace ReQL;
TEST_CASE("Connection", "[c++][connect]") {
Connection conn = connect();
REQUIRE(conn.isOpen());
}
TEST_CASE("Expr", "[c][expr]") {
SECTION("string") {
_ReQL_Op_t string;
const uint32_t size = 12;
uint8_t buf[size] = "Hello World... | Add string c constructor test. | Add string c constructor test.
| C++ | apache-2.0 | grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core |
c26756739d1020cae9e618397f55542b84c066ef | stingraykit/diagnostics/AbortWrap.cpp | stingraykit/diagnostics/AbortWrap.cpp | // Copyright (c) 2011 - 2019, GS Group, https://github.com/GSGroup
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
// provided that the above copyright notice and this permission notice appear in all copies.
// THE SOFTWARE IS PROVIDED "AS IS" A... | // Copyright (c) 2011 - 2019, GS Group, https://github.com/GSGroup
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
// provided that the above copyright notice and this permission notice appear in all copies.
// THE SOFTWARE IS PROVIDED "AS IS" A... | Use ANSI compatible __typeof__ instead of GNU's typeof | Use ANSI compatible __typeof__ instead of GNU's typeof
| C++ | isc | GSGroup/stingraykit,GSGroup/stingraykit |
730d2a6f55da1a6a58c9cb15e4355b008dd67b2d | ouzel/osx/RendererOGLOSX.cpp | ouzel/osx/RendererOGLOSX.cpp | // Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "RendererOGLOSX.h"
namespace ouzel
{
namespace graphics
{
bool RendererOGLOSX::init(const WindowPtr& window,
uint32_t newSampleCount,
TextureFil... | // Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "RendererOGLOSX.h"
namespace ouzel
{
namespace graphics
{
bool RendererOGLOSX::init(const WindowPtr& window,
uint32_t newSampleCount,
TextureFil... | Call free in OSX renderer's init | Call free in OSX renderer's init
| C++ | unlicense | elnormous/ouzel,elvman/ouzel,elnormous/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel,elvman/ouzel,elnormous/ouzel |
8f5dc2f9e9ee03ef6b28eb4d4dc210c0fd3eec2c | compiler/parserlib_tests/parsertest.cpp | compiler/parserlib_tests/parsertest.cpp | #include "parsertest.h"
#include "fileast.h"
#include "scanner.h"
#include "myexception.h"
#include <QtTest/QtTest>
ParserTest::ParserTest(QObject *parent) : QObject(parent)
{
}
void ParserTest::initTestCase() {
}
void ParserTest::cleanupTestCase() {
}
void ParserTest::dummySuccess() {
}
Q_DECLARE_METATYPE(FileA... | #include "parsertest.h"
#include "fileast.h"
#include "parser.h"
#include "scanner.h"
#include "myexception.h"
#include <QtTest/QtTest>
ParserTest::ParserTest(QObject *parent) : QObject(parent)
{
}
void ParserTest::initTestCase() {
}
void ParserTest::cleanupTestCase() {
}
void ParserTest::dummySuccess() {
}
Q_DE... | Test now outputs the log | Test now outputs the log
| C++ | mit | bisthebis/Boboscript,bisthebis/Boboscript |
8d9223102e794c0368dbb0960183e53a22ed848a | summstats.cpp | summstats.cpp | #include <iostream>
#include <Sequence/variant_matrix/msformat.hpp>
#include <Sequence/summstats.hpp>
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cerr.tie(nullptr);
std::cout.setf(std::ios::fixed);
std::cout.precision(6);
std::cout << "pi\tS\tD\tthetaH\tH\n";
... | #include <iostream>
#include <Sequence/variant_matrix/msformat.hpp>
#include <Sequence/summstats.hpp>
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cerr.tie(nullptr);
std::cout.setf(std::ios::fixed);
std::cout.precision(6);
std::cout << "pi\tS\tD\ttH\n";
do {
... | Rename columns to be compatible with sample_stats++ | :art: Rename columns to be compatible with sample_stats++
| C++ | mit | heavywatal/msutils,heavywatal/msutils |
1cff4f528dc680cb6d3d97227276a307243c08ea | src/classes/casexponent.cpp | src/classes/casexponent.cpp | #include "casexponent.h"
// CasExpression CasExponent::getE(){
// return e;
}
| #include "casexponent.h"
// CasExpression CasExponent::getE(){
// return e;
//}
| Fix problem with broken } | Fix problem with broken }
| C++ | bsd-3-clause | Tombert/CASOTMM |
decaf09efeea9cf06d1dea2abd730922c3775162 | test/lsan/TestCases/leak_check_before_thread_started.cc | test/lsan/TestCases/leak_check_before_thread_started.cc | // Regression test for http://llvm.org/bugs/show_bug.cgi?id=21621
// This test relies on timing between threads, so any failures will be flaky.
// RUN: %clangxx_lsan %s -o %t
// RUN: LSAN_OPTIONS="log_pointers=1:log_threads=1" %run %t
#include <assert.h>
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
voi... | // Regression test for http://llvm.org/bugs/show_bug.cgi?id=21621
// This test relies on timing between threads, so any failures will be flaky.
// RUN: %clangxx_lsan %s -o %t
// RUN: LSAN_OPTIONS="log_pointers=1:log_threads=1" %run %t
#include <assert.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
pthr... | Test case fix: mode debug output, synchronization instead of sleep(). | [LSan] Test case fix: mode debug output, synchronization instead of sleep().
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@260564 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
089f9c39a7a4a44dfa6bbbc9f9b5e9d41d9396f2 | numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp | numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/io.pass.cpp | //===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------... | Fix bug in test; found by AddressSanitizer | Fix bug in test; found by AddressSanitizer
git-svn-id: 273b07cebdae5845b4a75aae04570b978db9eb50@177464 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | bsd-3-clause | lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx |
3983c5b96e415fe8b1bc9a24161c8939c8332064 | agent/src/main.cpp | agent/src/main.cpp | #include <iostream>
#include <system_error>
#include "controllers/main/MainModule.hpp"
#include "network/bsdsocket/Manager.hpp"
#include "network/sniffer/SnifferManager.hpp"
int main()
{
tin::controllers::main::ControllerQueue ctrlQueue;
tin::network::bsdsocket::ManagerQueue netManagerQueue;
tin::control... | #include <iostream>
#include <system_error>
#include "controllers/main/MainModule.hpp"
#include "network/bsdsocket/Manager.hpp"
#include "network/sniffer/Manager.hpp"
#include "network/sniffer/events/ChangeFilter.hpp"
int main()
{
tin::controllers::main::ControllerQueue ctrlQueue;
tin::network::bsdsocket::Ma... | Add a simple example of sniffer manager | Add a simple example of sniffer manager
| C++ | mit | mdziekon/eiti-tin-ftp-stattr,mdziekon/eiti-tin-ftp-stattr,mdziekon/eiti-tin-ftp-stattr |
df35dd056461a0ff49549167cbff6e0ce5a24749 | src/lug/System/Exception.cpp | src/lug/System/Exception.cpp | #include <lug/System/Exception.hpp>
#include <sstream>
lug::System::Exception::Exception(const char *typeName, const std::string &description, const char* file, const char* function, uint32_t line)
: _typeName{typeName}, _description{description}, _file{file}, _function{function}, _line{line} {}
const std::string... | #include <lug/System/Exception.hpp>
#include <sstream>
lug::System::Exception::Exception(const char *typeName, const std::string &description, const char* file, const char* function, uint32_t line)
: _typeName{typeName}, _description{description}, _file{file}, _function{function}, _line{line} {}
const std::string... | Change style of function display to match Debug.hpp | Change style of function display to match Debug.hpp
| C++ | mit | Lugdunum3D/Lugdunum,Lugdunum3D/Lugdunum,Lugdunum3D/Lugdunum |
773ed728bd96849f9482b4cc21541998b385287f | matrix/imageprovider.cpp | matrix/imageprovider.cpp | #include "imageprovider.h"
matrix::ImageProvider::ImageProvider() : QQuickImageProvider{QQuickImageProvider::Pixmap}
{
if (!default_image_.load(":/img/res/img/default.png")) {
default_image_ = QPixmap{256, 256};
default_image_.fill(QColor{"#ff00ff"});
}
}
QPixmap matrix::ImageProvider::requestPixmap(con... | #include "imageprovider.h"
matrix::ImageProvider::ImageProvider() : QQuickImageProvider{QQuickImageProvider::Pixmap}
{
if (!default_image_.load(":/img/res/img/default.png")) {
default_image_ = QPixmap{256, 256};
default_image_.fill(QColor{"#ff00ff"});
}
}
QPixmap matrix::ImageProvider::requestPixmap(con... | FIx handling of image size | FIx handling of image size
| C++ | mit | mpxe/axion |
0014879b61be00c5c6364168e2699b1cf0016aa7 | fnet/src/vespa/fnet/config.cpp | fnet/src/vespa/fnet/config.cpp | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "config.h"
FNET_Config::FNET_Config()
: _minEventTimeOut(0),
_pingInterval(0),
_iocTimeOut(0),
_maxInputBufferSize(0x10000),
_maxOutputBufferSize(0x10000),
... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "config.h"
FNET_Config::FNET_Config()
: _minEventTimeOut(0),
_pingInterval(0),
_iocTimeOut(0),
_maxInputBufferSize(0x10000),
_maxOutputBufferSize(0x10000),
... | Disable direct write by default. | Disable direct write by default.
| C++ | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
9fc2e6947a64d849a8a003892c72b1e471f57634 | src/test-map.cpp | src/test-map.cpp | #include "map.h"
#include "screen.h"
#include <sstream>
Map CreateMap(int seed)
{
return GenerateRandomMap(std::mt19937(seed));
}
int GameMain()
{
SetTitle("Map test");
int seed = 1;
Map map = CreateMap(seed);
Screen screen;
while(true)
{
screen.Clear();
std::ostringstr... | #include "map.h"
#include "screen.h"
#include <sstream>
Map CreateMap(int seed)
{
return GenerateRandomMap(std::mt19937(seed));
}
int GameMain()
{
SetTitle("Map test");
int seed = 1;
Map map = CreateMap(seed);
Screen screen;
while(true)
{
screen.Clear();
std::ostringstr... | Split apart effect interface and implementations. | Split apart effect interface and implementations.
| C++ | mit | sgorsten/roguelike,sgorsten/roguelike |
cd233a94eeb1e10aef6b3214d0035b00c78b66b9 | src/Interpreter.cpp | src/Interpreter.cpp | #include "Interpreter.hpp"
#include "modules/error-handler/ErrorHandler.hpp"
tkom::Interpreter::Interpreter(const std::vector<std::string>& arguments)
{
try
{
modules::ErrorHandler::error("Hello world!");
}
catch (std::exception& e)
{}
modules::ErrorHandler::warning("Hello world!");
... | #include "Interpreter.hpp"
#include "modules/error-handler/ErrorHandler.hpp"
#include "modules/lexer/Lexer.hpp"
#include <iostream>
using Interpreter = tkom::Interpreter;
using ErrorHandler = tkom::modules::ErrorHandler;
using Lexer = tkom::modules::Lexer;
Interpreter::Interpreter(const std::vector<std::string>& ar... | Create a simple example of file tokenization | Create a simple example of file tokenization
| C++ | mit | mdziekon/eiti-tkom-interpreter,mdziekon/eiti-tkom-interpreter |
0c91af0a793118bbf19592a4f34e2e996c71eeff | src/MainApplication/Gui/main.cpp | src/MainApplication/Gui/main.cpp | #include <qapplication.h>
#include <MainApplication/Gui/MainWindow.hpp>
#include <Core/CoreMacros.hpp>
#ifdef OS_LINUX
#include <X11/Xlib.h>
#endif
int main(int argc, char** argv)
{
#ifdef OS_LINUX
XInitThreads();
#endif
QApplication app(argc, argv);
QSurfaceFormat format;
format.setVersion(4, 4);
... | #include <qapplication.h>
#include <MainApplication/Gui/MainWindow.hpp>
#include <Core/CoreMacros.hpp>
int main(int argc, char** argv)
{
QApplication app(argc, argv);
QSurfaceFormat format;
format.setVersion(4, 4);
format.setProfile(QSurfaceFormat::CoreProfile);
format.setSamples(0);
format.s... | Remove useless X11 threads on linux | Remove useless X11 threads on linux
| C++ | bsd-3-clause | Zouch/Radium-Engine,Zouch/Radium-Engine,AGGA-IRIT/Radium-Engine,AGGA-IRIT/Radium-Engine |
c18e17980cf6e28e736432b780cd3ae91b6597be | lib/asan/lit_tests/Darwin/reexec-insert-libraries-env.cc | lib/asan/lit_tests/Darwin/reexec-insert-libraries-env.cc | #include <stdio.h>
// Make sure ASan doesn't hang in an exec loop if DYLD_INSERT_LIBRARIES is set.
// This is a regression test for
// https://code.google.com/p/address-sanitizer/issues/detail?id=159
// RUN: %clangxx_asan -m64 %s -o %t
// RUN: %clangxx -m64 %p/../SharedLibs/darwin-dummy-shared-lib-so.cc \
// RUN: ... | #include <stdio.h>
// Make sure ASan doesn't hang in an exec loop if DYLD_INSERT_LIBRARIES is set.
// This is a regression test for
// https://code.google.com/p/address-sanitizer/issues/detail?id=159
// RUN: %clangxx_asan -m64 %s -o %t
// RUN: %clangxx -m64 %p/../SharedLibs/darwin-dummy-shared-lib-so.cc \
// RUN: ... | Remove the 'alarm' script which isn't present on OS X by default. The test may hang now if a regression occurs. | [ASan] Remove the 'alarm' script which isn't present on OS X by default.
The test may hang now if a regression occurs.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@175155 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
3909c78c547500694d66f4b33e22dd98c1574bcd | thrift/lib/cpp2/async/ClientChannel.cpp | thrift/lib/cpp2/async/ClientChannel.cpp | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... | Implement getClientHostId with uname() under Linux by default. | Implement getClientHostId with uname() under Linux by default.
Reviewed By: yfeldblum
Differential Revision: D25673372
fbshipit-source-id: c0d8feb89100c1096697ba86ed93dcbf52fe2530
| C++ | apache-2.0 | facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift |
4b0d23db088b011c0309169d779af4477c59db04 | server/worker.cpp | server/worker.cpp |
#include <boost/assert.hpp>
#include "worker.h"
#include "requests.pb.h"
bool traffic::MessageWorker::process(std::string &result, void *data, size_t size)
{
(void) result;
request::Request request;
request.ParseFromArray(data, size);
if (request.has_statistic())
return process_statistics();
else if (reque... |
#include <boost/assert.hpp>
#include "worker.h"
#include "requests.pb.h"
bool traffic::MessageWorker::process(std::string &result, void *data, size_t size)
{
(void) result;
request::Request request;
request.ParseFromArray(data, size);
switch (request.Payload_case()) {
case request::Request::kStatistic:
r... | Use the generated oneo proto enum | Use the generated oneo proto enum
Signed-off-by: Jan Losinski <577c4104c61edf9f052c616c0c23e67bef4a9955@wh2.tu-dresden.de>
| C++ | bsd-3-clause | agdsn/traffic-service-server,agdsn/traffic-service-server |
a6d421cab330a4596169e876798eacc7062a1007 | Models/StateSpace/tests/dynamic_regression_test.cc | Models/StateSpace/tests/dynamic_regression_test.cc | #include "gtest/gtest.h"
#include "Models/ChisqModel.hpp"
#include "Models/PosteriorSamplers/ZeroMeanGaussianConjSampler.hpp"
#include "Models/StateSpace/DynamicRegression.hpp"
#include "Models/StateSpace/StateModels/LocalLevelStateModel.hpp"
#include "Models/StateSpace/StateModels/SeasonalStateModel.hpp"
#include "Mo... | #include "gtest/gtest.h"
#include "Models/ChisqModel.hpp"
#include "Models/PosteriorSamplers/ZeroMeanGaussianConjSampler.hpp"
#include "Models/StateSpace/DynamicRegression.hpp"
#include "Models/StateSpace/StateModels/LocalLevelStateModel.hpp"
#include "Models/StateSpace/StateModels/SeasonalStateModel.hpp"
#include "Mo... | Test file for dynamic regression model. | Test file for dynamic regression model.
| C++ | lgpl-2.1 | steve-the-bayesian/BOOM,steve-the-bayesian/BOOM,steve-the-bayesian/BOOM,steve-the-bayesian/BOOM,steve-the-bayesian/BOOM |
4011c7d82e0f83caa484d9610235cdcdd7df7b7c | src/Unix/FileSystem/Entities/Validators/UnixExecutablePathValidator.cpp | src/Unix/FileSystem/Entities/Validators/UnixExecutablePathValidator.cpp | #include "UnixExecutablePathValidator.h"
using namespace clt::filesystem::entities;
using namespace clt::filesystem::entities::validators;
bool
UnixExecutablePathValidator::isPathValid(const Path& path, std::vector<ValidatorBrokenRules> & brokenRules) const {
//TODO: must be a file with executable right
return path.... | #include "UnixExecutablePathValidator.h"
using namespace clt::filesystem::entities;
using namespace clt::filesystem::entities::validators;
bool
UnixExecutablePathValidator::isPathValid(const Path& path, std::vector<ValidatorBrokenRules> & brokenRules) const {
if (!path.exists()) {
brokenRules.push_back(ValidatorBr... | Add exception management on Unix | Add exception management on Unix
| C++ | mit | aphilippe/ClappLauncher,aphilippe/AppLauncher,aphilippe/AppLauncher,aphilippe/AppLauncher,aphilippe/ClappLauncher,aphilippe/ClappLauncher |
14aec658c614702e807c776bf304d236235a0bcb | src/tests/main.cc | src/tests/main.cc | /** @file
*
* A brief file description
*
* @section license License
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this... | /** @file
*
* A brief file description
*
* @section license License
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this... | Enable debug output in the tests. | Enable debug output in the tests.
| C++ | apache-2.0 | jpeach/zfsd,jpeach/zfsd,jpeach/zfsd,jpeach/zfsd,jpeach/zfsd |
11f8f65d024fbd1e4e36ec1dfbd9bb8ebadeae8b | benchmark/pairwise-levenshtein/build_index.cpp | benchmark/pairwise-levenshtein/build_index.cpp | #include <iostream>
int main(int argc, char *argv[]) {
if (argc != 2) {
std::cerr << "You must specify exactly a single input filename." << std::endl;
exit(EXIT_FAILURE);
}
}
| #include <iostream>
#include <fstream>
int main(int argc, char *argv[]) {
if (argc != 2) {
std::cerr << "You must specify exactly a single input filename." << std::endl;
exit(EXIT_FAILURE);
}
std::ifstream file(argv[argc - 1]);
std::ofstream index("index.plain");
index << file.rdbu... | Implement index building for pairwise levenshtein | Implement index building for pairwise levenshtein
| C++ | mit | xhochy/libfuzzymatch,xhochy/libfuzzymatch |
afb3d1a29e8a945c1a1ba02a5a6ea86add7698b7 | Sequences/matrix_fibo.cpp | Sequences/matrix_fibo.cpp | #include <iostream>
/* This program computes fibo using
* and optimization of the matrix way
*/
/*REFERENCES
* https://en.wikipedia.org/wiki/Fibonacci_number#Matrix_form
* http://www.geeksforgeeks.org/program-for-nth-fibonacci-number/
*/
using namespace std;
const int MAX = 1000;
int f[MAX] = {0};
int fib(... | #include <iostream>
/* This program computes fibo using
* and optimization of the matrix way
*/
/*REFERENCES
* This method is contributed by Chirag Agarwal.
* https://en.wikipedia.org/wiki/Fibonacci_number#Matrix_form
* http://www.geeksforgeeks.org/program-for-nth-fibonacci-number/
*/
using namespace std;
con... | Add the contributor of the method | Add the contributor of the method
| C++ | mit | xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book |
c6b7b1cd008e7e97dda2a85bca40a8b02b60a1d3 | src/math_container.cpp | src/math_container.cpp | #include "math_container.h"
using std::complex;
/******************************************************/
/*solve the equation cosh(x)=exp(y), input y, return x*/
/******************************************************/
complex<double> coshx_eq_expy(double y)
{
complex<double> ey={exp(y),0};
return log(ey-sqrt... | #include "math_container.h"
using std::complex;
/******************************************************/
/*solve the equation cosh(x)=exp(y), input y, return x*/
/******************************************************/
complex<double> coshx_eq_expy(double y)
{
complex<double> ey={exp(y),0};
complex<double> ga... | Update coshx_eq_expy, make the return value pure real or pure imaginary. | Update coshx_eq_expy, make the return value pure real or pure imaginary.
| C++ | mit | hshi/math_lib_hao,hshi/math_lib_hao |
a50ca44bc46424a7d386fa54fc70da2dde18ffea | chrome/browser/ui/touch/frame/browser_non_client_frame_view_factory_touch.cc | chrome/browser/ui/touch/frame/browser_non_client_frame_view_factory_touch.cc | // 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/views/frame/browser_non_client_frame_view.h"
#include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h"
#include... | // 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/views/frame/browser_non_client_frame_view.h"
#include "base/command_line.h"
#include "chrome/browser/ui/panels/panel_brow... | Use the normal panel-frame until there's a touch-friendly version. | Use the normal panel-frame until there's a touch-friendly version.
BUG=none
TEST=browser_test:WindowOpenPanel
Review URL: http://codereview.chromium.org/7192001
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@89364 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.