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 |
|---|---|---|---|---|---|---|---|---|---|
f39c53a23d81109b811813ad121924e424a87574 | 1-common-tasks/functions/return-multiple-values.cpp | 1-common-tasks/functions/return-multiple-values.cpp | // Return multiple values
#include <tuple>
#include <string>
std::tuple<int, bool, std::string> foo()
{
return {128, true, "hello"};
}
int main()
{
int obj1;
bool obj2;
std::string obj3;
std::tie(obj1, obj2, obj3) = foo();
}
// Return multiple values of different types from a function.
//
// The `foo` functi... | // Return multiple values
#include <tuple>
std::tuple<int, bool, float> foo()
{
return {128, true, 1.5f};
}
int main()
{
int obj1;
bool obj2;
float obj3;
std::tie(obj1, obj2, obj3) = foo();
}
// Return multiple values of different types from a function.
//
// The `foo` function on [5-8] returns a
// [`std::t... | Rewrite return multiple values sample | Rewrite return multiple values sample
| C++ | cc0-1.0 | brunotag/CppSamples-Samples,tmwoz/CppSamples-Samples,darongE/CppSamples-Samples,mnpk/CppSamples-Samples,sftrabbit/CppSamples-Samples,thatbrod/CppSamples-Samples,vjacquet/CppSamples-Samples,rollbear/CppSamples-Samples |
e4df43e36dbdca444a6e812bdd2c9ea93360a2ec | unittests/CodeGen/DIEHashTest.cpp | unittests/CodeGen/DIEHashTest.cpp | //===- llvm/unittest/DebugInfo/DWARFFormValueTest.cpp ---------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- llvm/unittest/DebugInfo/DWARFFormValueTest.cpp ---------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures. | Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.
Also minor using namespace move so it's not hard-up against the function
definition and outside the namespace as is usual.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@192744 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymagg... |
43c0166a2b0d9133a8f9f78e7907b041a2882656 | chrome/common/default_plugin.cc | chrome/common/default_plugin.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/common/default_plugin.h"
#include "chrome/default_plugin/plugin_main.h"
#include "webkit/plugins/npapi/plugin_list.h"
namespace chr... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/default_plugin.h"
#include "chrome/default_plugin/plugin_main.h"
#include "webkit/plugins/npapi/plugin_list.h"
namespace chr... | Disable the default plugin for aura | Disable the default plugin for aura
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8143024
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@104154 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,gavinp/chromiu... |
cb075758a85489c77f77cd0229b85afdcfcc1cc1 | common/strings/display_utils.cc | common/strings/display_utils.cc | // Copyright 2017-2020 The Verible Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... | // Copyright 2017-2020 The Verible Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... | Make sure to not compare signed with unsigned. | Make sure to not compare signed with unsigned.
PiperOrigin-RevId: 312592878
| C++ | apache-2.0 | chipsalliance/verible,chipsalliance/verible,chipsalliance/verible,chipsalliance/verible,chipsalliance/verible |
2d4026e607d654a97da188246ce3ae94e2a0aed8 | views/focus/focus_manager_gtk.cc | views/focus/focus_manager_gtk.cc | // Copyright (c) 2006-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 "views/focus/focus_manager.h"
#include "base/logging.h"
namespace views {
void FocusManager::ClearNativeFocus() {
NOTIMPLEMENTED();... | // Copyright (c) 2006-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 "views/focus/focus_manager.h"
#include "base/logging.h"
namespace views {
void FocusManager::ClearNativeFocus() {
NOTIMPLEMENTED();... | Fix compilation error in the focus manager by returning NULL from unimplemented function. | Fix compilation error in the focus manager by returning NULL from unimplemented function.
Review URL: http://codereview.chromium.org/152001
git-svn-id: http://src.chromium.org/svn/trunk/src@19649 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: bdcd4cb8c491b9729276c31999d7ae5a52b5272d | C++ | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
a7a83a7d54d7cd48fba0aab116345a170c1d67bb | xls/common/init_xls.cc | xls/common/init_xls.cc | // Copyright 2020 The XLS 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 or agreed t... | // Copyright 2020 The XLS 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 or agreed t... | Remove the execution of InitRunfilesDir from InitXls. The InitXLS assumes that an executable has Runfiles and is a Runfile marker. Moreover, as XLS moves to a bazel toolchain implementation, toolchain executables are not a runfile or a runfile marker. | [BUILD] Remove the execution of InitRunfilesDir from InitXls. The InitXLS assumes that an executable has Runfiles and is a Runfile marker. Moreover, as XLS moves to a bazel toolchain implementation, toolchain executables are not a runfile or a runfile marker.
PiperOrigin-RevId: 382363810
| C++ | apache-2.0 | google/xls,google/xls,google/xls,google/xls,google/xls,google/xls |
91dce77a328101d89fa56d1923edf4e3ebf3f674 | software/src/8.0/src/M_Darwin/make.cc | software/src/8.0/src/M_Darwin/make.cc | #########################################################
# Local Compiler Rules #
#########################################################
#--objectrule--# $(CXX) $(CFLAGS) $(CDEFS) $(CINCS) -o $@ -c
#--objectsuffix--# $B
#--targetsuffix--# $B
#--tarulesuffix--# $B
#--buildtargets--# targets
.SUFFIXES :
B =
%... | #########################################################
# Local Compiler Rules #
#########################################################
#--objectrule--# $(CXX) $(CFLAGS) $(CDEFS) $(CINCS) -o $@ -c
#--objectsuffix--# $B
#--targetsuffix--# $B
#--tarulesuffix--# $B
#--buildtargets--# targets
.SUFFIXES :
B =
%... | Adjust compiler options used to build Mac executables. | Adjust compiler options used to build Mac executables.
| C++ | bsd-3-clause | VisionAerie/vision,VCommitter/vision,MichaelJCaruso/vision,vision-dbms/vision,VCommitter/vision,MichaelJCaruso/vision,MichaelJCaruso/vision,VCommitter/vision,VisionAerie/vision,c-kuhlman/vision,vision-dbms/vision,VisionAerie/vision,VisionAerie/vision,MichaelJCaruso/vision,VCommitter/vision,VisionAerie/vision,VCommitter... |
b32c999ea59c7e76e6f7c82095c2a6a2961de0a1 | src/mural/AppViewController.cc | src/mural/AppViewController.cc | #include "AppViewController.h"
namespace mural
{
AppViewController::~AppViewController()
{
delete this->view;
}
void AppViewController::initWithScriptAtPath(const char *path, int width, int height, const char *title)
{
this->view = new JavaScriptView(width, height, title);
this->view->loadScriptAtPath(pa... | #include "AppViewController.h"
// #include <thread>
namespace mural
{
AppViewController::~AppViewController()
{
delete this->view;
}
void AppViewController::initWithScriptAtPath(const char *path, int width, int height, const char *title)
{
this->view = new JavaScriptView(width, height, title);
this->vie... | Add some simple tests to check whether the operation-queue works | Add some simple tests to check whether the operation-queue works
| C++ | mit | pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated |
ec52b8c5dd906d7ee1d5abfd205a02085fa0c69f | test/CodeGenCXX/cast-conversion.cpp | test/CodeGenCXX/cast-conversion.cpp | // REQUIRES: x86-registered-target,x86-64-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
// RUN: FileCheck -check-prefix CHECK-LP32 --... | // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
// RUN: FileCheck %s
// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
// RUN: FileCheck %s
struct A {
A(int);
};
struct B {
B(A);
};
int main () {
(B)10;
B(10);
static_cast<B>(10);
}
// CHECK: ... | Check IR in this test. | Check IR in this test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@196278 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/cl... |
38a7269400a832ff12cbd4fbec00c91ae2afe468 | demos/smoke/Game.cpp | demos/smoke/Game.cpp | /*
* Copyright (C) 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | /*
* Copyright (C) 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | Fix compiler warning in smoketest | demos: Fix compiler warning in smoketest
Replaced snprintf with stringstream.
| C++ | apache-2.0 | KhronosGroup/Vulkan-Tools,KhronosGroup/Vulkan-Tools,KhronosGroup/Vulkan-Tools,KhronosGroup/Vulkan-Tools |
a0e4956b1ac64254bb504af2bad45ccf0cd58195 | Sources/Rosetta/Models/Graveyard.cpp | Sources/Rosetta/Models/Graveyard.cpp | // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.
#include <Rosetta/Commons/Constants.hpp>
#include <Rosetta/Models/Grav... | // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.
#include <Rosetta/Commons/Constants.hpp>
#include <Rosetta/Models/Ench... | Add code to remove applied enchantments | feat(card-impl): Add code to remove applied enchantments
| C++ | mit | Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp |
d29936919587e29197814238d60d19f4141c1a42 | excercise01/06.cpp | excercise01/06.cpp | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
#define MAX_INPUT_SIZE 100
bool is_palindrome(const char *string, const int begin = 0, int end = -1)
{
/* initialise parameter */
if(end == -1) end = strlen(string) - 1;
/* base case */
if(string[begin] != string[end]) return false;
if(b... | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
#define MAX_INPUT_SIZE 100
bool is_palindrome(const char *word)
{
int length = strlen(word);
char string[length]; /* Should not modify the value of ptr arg. */
strcpy(string, word);
/* base case */
if(length <= 1) return true;
if(str... | Adjust string directly instead of using index of the array | Adjust string directly instead of using index of the array
| C++ | mit | kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016 |
1ae6e480095d887215db836932c651e0f8f748dc | test/Index/pch-warn-as-error-code-split.cpp | test/Index/pch-warn-as-error-code-split.cpp | // RUN: CINDEXTEST_EDITING=1 c-index-test -test-load-source local %s -Wuninitialized -Werror=unused 2>&1 | FileCheck -check-prefix=DIAGS %s
// Make sure -Wuninitialized works even though the header had a warn-as-error occurrence.
// DIAGS: error: unused variable 'x'
// DIAGS: warning: variable 'x1' is uninitialized
/... | // RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source local %s -Wuninitialized -Werror=unused 2>&1 | FileCheck -check-prefix=DIAGS %s
// Make sure -Wuninitialized works even though the header had a warn-as-error occurrence.
// DIAGS: error: unused variable 'x'
// DIAGS: warning: variable 'x1' is uninitializ... | Add 'env' to fix test failures in windows bots. | [test] Add 'env' to fix test failures in windows bots.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@275324 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
1c1bd754ed2ea0fe0527bec39870e5fcbb859bc4 | host-interface.cpp | host-interface.cpp | #include "host-interface.hpp"
namespace phosphor
{
namespace host
{
void Host::execute(Command command)
{
// Future commits to build on
return;
}
} // namespace host
} // namepsace phosphor
| #include <queue>
#include <phosphor-logging/log.hpp>
#include "host-interface.hpp"
namespace phosphor
{
namespace host
{
using namespace phosphor::logging;
// When you see base:: you know we're referencing our base class
namespace base = sdbusplus::xyz::openbmc_project::Control::server;
std::queue<base::Host::Comma... | Support for putting entries onto queue | Support for putting entries onto queue
Change-Id: I766cdfcaef7d5d000a9e216bc3307ea12c9ce2f8
Signed-off-by: Andrew Geissler <c46de238cd554860f0bd4010b1729f1323facd9c@us.ibm.com>
| C++ | apache-2.0 | openbmc/phosphor-host-ipmid,openbmc/phosphor-host-ipmid,openbmc/phosphor-host-ipmid |
d09ba2cca3cca3a42c3918fa9be1f2b46815548f | test/Sema/warn-lifetime-analysis-nocfg-disabled.cpp | test/Sema/warn-lifetime-analysis-nocfg-disabled.cpp | // RUN: %clang_cc1 -fsyntax-only -Wno-dangling -Wreturn-stack-address -verify %s
struct [[gsl::Owner(int)]] MyIntOwner {
MyIntOwner();
int &operator*();
};
struct [[gsl::Pointer(int)]] MyIntPointer {
MyIntPointer(int *p = nullptr);
MyIntPointer(const MyIntOwner &);
int &operator*();
MyIntOwner toOwner();
... | // RUN: %clang_cc1 -fsyntax-only -Wno-dangling-gsl -Wreturn-stack-address -verify %s
struct [[gsl::Owner(int)]] MyIntOwner {
MyIntOwner();
int &operator*();
};
struct [[gsl::Pointer(int)]] MyIntPointer {
MyIntPointer(int *p = nullptr);
MyIntPointer(const MyIntOwner &);
int &operator*();
MyIntOwner toOwner... | Fix a test to test what the name suggest. | Fix a test to test what the name suggest.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@369820 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
739c6e1a819498c30abbb31511bd9e7e20ec08f7 | lib/libport/perror.cc | lib/libport/perror.cc | /**
** \file libport/perror.cc
** \brief perror: implements file libport/perror.hh
*/
#include <stdio.h>
#include "libport/cstring"
namespace libport
{
void
perror (const char* s)
{
#ifndef WIN32
::perror(s);
#else
int errnum;
const char* errstring;
const char* colon;
errnum = WSAGetLa... | /**
** \file libport/perror.cc
** \brief perror: implements file libport/perror.hh
*/
#include <cstdio>
#include <iostream>
#include "libport/cstring"
namespace libport
{
void
perror (const char* s)
{
#ifndef WIN32
::perror(s);
#else
int errnum;
const char* errstring;
const char* colon;
... | Add missing include and change existing include | Add missing include and change existing include
* lib/libport/perror.c: Change <stdio.h> into <cstdio> and add
<iostream> to get std::cerr.
| C++ | bsd-3-clause | aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport |
37a9888a468c8c5f61ef5688ff1534ab35ca79e2 | mert/TimerTest.cpp | mert/TimerTest.cpp | #include "Timer.h"
#define BOOST_TEST_MODULE TimerTest
#include <boost/test/unit_test.hpp>
#include <string>
#include <iostream>
BOOST_AUTO_TEST_CASE(timer_basic_test) {
Timer timer;
timer.start();
BOOST_REQUIRE(timer.is_running());
BOOST_REQUIRE(timer.get_elapsed_cpu_time() > 0.0);
BOOST_REQUIRE(timer.get... | #include "Timer.h"
#define BOOST_TEST_MODULE TimerTest
#include <boost/test/unit_test.hpp>
#include <string>
#include <iostream>
#include <unistd.h>
BOOST_AUTO_TEST_CASE(timer_basic_test) {
Timer timer;
const int sleep_time_microsec = 40; // ad-hoc microseconds to pass unit tests.
timer.start();
BOOST_REQUI... | Fix failure of the Timer unit test. | Fix failure of the Timer unit test.
| C++ | lgpl-2.1 | moses-smt/mosesdecoder,pjwilliams/mosesdecoder,alvations/mosesdecoder,emjotde/mosesdecoder_nmt,moses-smt/mosesdecoder,emjotde/mosesdecoder_nmt,emjotde/mosesdecoder_nmt,hychyc07/mosesdecoder,alvations/mosesdecoder,moses-smt/mosesdecoder,pjwilliams/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,pjwilliams/mosesd... |
a2772cd98479db1e8db2e9e4736cce196a0c157a | examples/listdir.cpp | examples/listdir.cpp | #include <iostream>
#include "../src/tisys.hpp"
int main(int argc, char** argv){
cout << "Example" <<endl;
Filesystem fs;
if ( argc == 1 )
fs.listdir(".");
else
fs.listdir( argv[1] );
cout << fs;
return 0;
}
| #include <iostream>
#include "../src/tisys.hpp"
using namespace std;
int main(int argc, char** argv){
cout << "Example" <<endl;
Filesystem fs;
if ( argc == 1 )
fs.listdir(".");
else
fs.listdir( argv[1] );
cout << fs;
return 0;
}
| Put the using namespace std in the cpp files | Put the using namespace std in the cpp files
| C++ | lgpl-2.1 | bombark/TiSys,bombark/TiSys |
f01c686997700495ba1d7c2a3bdeb49cc3c6d9d4 | Connector_RAW/main.cpp | Connector_RAW/main.cpp | /// \file Connector_RAW/main.cpp
/// Contains the main code for the RAW connector.
#include <iostream>
#include "../util/socket.h"
/// Contains the main code for the RAW connector.
/// Expects a single commandline argument telling it which stream to connect to,
/// then outputs the raw stream to stdout.
int main(int ... | /// \file Connector_RAW/main.cpp
/// Contains the main code for the RAW connector.
#include <iostream>
#include "../util/socket.h"
/// Contains the main code for the RAW connector.
/// Expects a single commandline argument telling it which stream to connect to,
/// then outputs the raw stream to stdout.
int main(int ... | Fix compiling of DTSC version branch. | Fix compiling of DTSC version branch.
| C++ | unlicense | DDVTECH/mistserver,rbouqueau/mistserver,rbouqueau/mistserver,rbouqueau/mistserver,DDVTECH/mistserver,rbouqueau/mistserver,DDVTECH/mistserver,DDVTECH/mistserver,DDVTECH/mistserver,rbouqueau/mistserver |
b9d6b8a06850141c9bf3b62dbe77a97e4744490e | main.cpp | main.cpp |
// Includes.
#include "UI/mainwindow.h"
#include "App/App.h"
#include "App/Factories/AdditionNFDelegate.h"
#include "App/Factories/ConstantNFDelegate.h"
#include "App/Factories/PrinterNFDelegate.h"
#include "App/Factories/TextFileNFDelegate.h"
// Qt.
#include <QApplication>
QString titleString()
{
QString name ... |
// Includes.
#include "UI/mainwindow.h"
#include "App/App.h"
#include "App/Factories/AdditionNFDelegate.h"
#include "App/Factories/ConstantNFDelegate.h"
#include "App/Factories/PrinterNFDelegate.h"
#include "App/Factories/TextFileNFDelegate.h"
#include "System/QtBasedFileSystem.h"
// Qt.
#include <QApplication>
QS... | Use Qt based file system in App. | Use Qt based file system in App.
| C++ | mit | jefaramvangorp/nodin |
e00b2440502e974715f44f54aa811c3bf7789175 | main.cpp | main.cpp | #include <QApplication>
#include <QTranslator>
#include <qtsingleapplication.h>
#include <Manager.h>
#include <Settings.h>
int main (int argc, char *argv[]) {
QtSingleApplication a (argc, argv);
if (a.sendMessage (QString ())) {
return 0;
}
a.setQuitOnLastWindowClosed (false);
a.setApplicationName (set... | #ifdef Q_OS_LINUX
# include <locale.h>
#endif
#include <QApplication>
#include <QTranslator>
#include <qtsingleapplication.h>
#include <Manager.h>
#include <Settings.h>
int main (int argc, char *argv[]) {
QtSingleApplication a (argc, argv);
if (a.sendMessage (QString ())) {
return 0;
}
#ifdef Q_OS_LINUX
... | Set numeric locale to C for proper tesseract-orc-* packages work on linux. | Set numeric locale to C for proper tesseract-orc-* packages work on linux.
| C++ | mit | OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator |
3593c0dd67e8a1771c31f3db443cbd6851b27227 | main.cpp | main.cpp |
// Includes.
#include "UI/mainwindow.h"
#include "App/App.h"
#include "App/Factories/PrinterNFDelegate.h"
#include "App/Factories/TextFileNFDelegate.h"
#include "System/QtBasedFileSystem.h"
// Qt.
#include <QApplication>
QString titleString()
{
QString name = QString::fromStdString(App::appName());
QString... |
// Includes.
#include "UI/mainwindow.h"
#include "App/App.h"
#include "App/Factories/TextFileNFDelegate.h"
#include "System/QtBasedFileSystem.h"
// Qt.
#include <QApplication>
QString titleString()
{
QString name = QString::fromStdString(App::appName());
QString version = QString::fromStdString(App::appVer... | Remove PrinterNFDelegate, has become redundant due to logger Lua node. | Remove PrinterNFDelegate, has become redundant due to logger Lua node.
| C++ | mit | jefaramvangorp/nodin |
a4e7dbc953f6b642e83e353bb30878f79e216c9f | main.cpp | main.cpp | #include <ncurses.h>
#include "ev3dev.h"
using namespace ev3dev;
int main() {
int inputKey;
const int KEY_A = 97;
const int KEY_S = 115;
const int KEY_D = 100;
const int KEY_F = 102;
const int KEY_Q = 113;
const int KEY_R = 114;
initscr();
raw();
mvprintw(1,2,"Hello world :) Press Q to quit. ");
noecho... | #include <ncurses.h>
#include "ev3dev.h"
using namespace ev3dev;
int main() {
int inputKey;
const int KEY_A = 97;
const int KEY_S = 115;
const int KEY_D = 100;
const int KEY_F = 102;
const int KEY_Q = 113;
const int KEY_R = 114;
initscr();
raw();
keypad(stdscr, TRUE);
mvprintw(1,2,"Hello world :) Press ... | Enable function and arrow keys | Enable function and arrow keys
| C++ | mit | eschmar/lego-ev3-remote |
37c2017c7d9b93e3fcf97500c70d7b930280e489 | main.cpp | main.cpp | /*
* Copyright 2013 Kamil Michalak <kmichalak8@gmail.com>
*
* 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... | /*
* Copyright 2013 Kamil Michalak <kmichalak8@gmail.com>
*
* 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... | Add basic skeleton for command line arguments parsing mechanism | Add basic skeleton for command line arguments parsing mechanism
| C++ | apache-2.0 | kmichalak/jippi |
a3fc3260b73ce3f50b8d94c7066db625a71309e7 | examples/apps/plainqt/plainqt.cpp | examples/apps/plainqt/plainqt.cpp | /* * This file is part of meego-im-framework *
*
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* Contact: Nokia Corporation (directui@nokia.com)
*
* If you have questions regarding the use of this file, please contact
* Nokia at directui@nokia.com.
*
* This library ... | /* * This file is part of meego-im-framework *
*
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* Contact: Nokia Corporation (directui@nokia.com)
*
* If you have questions regarding the use of this file, please contact
* Nokia at directui@nokia.com.
*
* This library ... | Add workaround for QT Lighthouse to example. | Add workaround for QT Lighthouse to example.
Use correct input context also in QT Lighthouse case, where the
environment variable currently does not work.
RevBy: Jon Nordby
| C++ | lgpl-2.1 | jpetersen/framework,sil2100/maliit-framework,RHawkeyed/framework,binlaten/framework,RHawkeyed/framework,sil2100/maliit-framework,sil2100/maliit-framework,Elleo/framework,sil2100/maliit-framework,Elleo/framework,jpetersen/framework |
a8a94d63d606fb6e2f4c0d24952971e3f4e13435 | message-broker/src/broker2broker.cpp | message-broker/src/broker2broker.cpp | # include "broker2broker.hpp"
# include <sstream>
#include <sys/socket.h>
/**
* @brief Initialize an outgoing message of SNDMSG type.
*/
MessageForB2B::MessageForB2B(const chattp::ChattpMessage& mesg, const string& channel_id)
{
message_buffer.set_sequence_number(b2b_counter.get());
*(message_buffer.mutable_... | # include "broker2broker.hpp"
# include <sstream>
#include <sys/socket.h>
/**
* @brief Initialize an outgoing message of SNDMSG type.
*/
MessageForB2B::MessageForB2B(const chattp::ChattpMessage& mesg, const string& channel_id)
{
message_buffer.set_sequence_number(b2b_counter.get());
*(message_buffer.mutable_... | Initialize sequence_number field for MESSAGESENT messages! | Initialize sequence_number field for MESSAGESENT messages!
| C++ | mit | Spheniscida/cHaTTP,Spheniscida/cHaTTP |
42ee2f40202dab514b2dfe24d8196690614b2e95 | restnotifier/main.cpp | restnotifier/main.cpp | #include <QApplication>
#include <QSettings>
#include <QLocale>
#include <QTranslator>
#include <QLibraryInfo>
#include "trayicon.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QApplication::setOrganizationName("Restnotifier");
app.setQuitOnLastWindowClosed(false);
// Set langua... | #include <QApplication>
#include <QSettings>
#include <QLocale>
#include <QTranslator>
#include <QLibraryInfo>
#include "trayicon.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QApplication::setOrganizationName("Restnotifier");
app.setQuitOnLastWindowClosed(false);
// Set langua... | Fix qt translation files path on Windows | Fix qt translation files path on Windows
| C++ | mit | swarmer/restnotifier,swarmer/restnotifier,swarmer/restnotifier |
9cca731b289e6cd965b2651b5f174a0a9af750c8 | src/graphics/transfer_function.cpp | src/graphics/transfer_function.cpp | #include "./transfer_function.h"
#include <QLoggingCategory>
#include <stdexcept>
#include "./texture_manager.h"
#include "../utils/gradient_utils.h"
namespace Graphics
{
// QLoggingCategory tfChan("Graphics.TransferFunction");
TransferFunction::TransferFunction(
std::shared_ptr<TextureManager> textureManager, s... | #include "./transfer_function.h"
#include <QLoggingCategory>
#include <stdexcept>
#include "./texture_manager.h"
#include "../utils/gradient_utils.h"
namespace Graphics
{
// QLoggingCategory tfChan("Graphics.TransferFunction");
TransferFunction::TransferFunction(
std::shared_ptr<TextureManager> textureManager, s... | Load gradient as floats and create float texture. | Load gradient as floats and create float texture.
| C++ | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
7d83a499876dd7c31b3969d61986ab9d65eab623 | examples/computer_architecture.cpp | examples/computer_architecture.cpp | #include <strong_types.hpp>
namespace st = strong_types;
// Create a type that counts number of cycles
struct cycle_count : st::type<cycle_count, int> {
// inherit the base class's constructors
using type::type;
};
// Create a type that counts number of instructions
struct instruction_count : st::type<instructio... | #include <strong_types.hpp>
namespace st = strong_types;
// Create a type that counts number of cycles
struct cycle_count : st::type<cycle_count, int> {
// inherit the base class's constructors
using type::type;
};
// Create a type that counts number of instructions
struct instruction_count : st::type<instructio... | Add inverse of frequency type | Add inverse of frequency type
| C++ | apache-2.0 | mariobadr/strong |
967247a849466019a604b518528efc99128a6a9a | src/fisx_detector.cpp | src/fisx_detector.cpp | #include "fisx_detector.h"
#include <math.h>
#include <stdexcept>
Detector::Detector(const std::string & name, const double & density, const double & thickness, \
const double & funnyFactor): Layer(name, density, thickness, funnyFactor)
{
this->diameter = 0.0;
this->distance = 10.0;
}
doubl... | #include "fisx_detector.h"
#include <math.h>
#include <stdexcept>
Detector::Detector(const std::string & name, const double & density, const double & thickness, \
const double & funnyFactor): Layer(name, density, thickness, funnyFactor)
{
this->diameter = 0.0;
this->distance = 10.0;
}
doubl... | Correct area and diameter calculations. | Correct area and diameter calculations.
| C++ | mit | vasole/fisx,vasole/fisx,vasole/fisx,vasole/fisx,vasole/fisx |
feef34afa133b495f6262138ac210224bc69ee3e | src/helper/unorderedContainer.cpp | src/helper/unorderedContainer.cpp | #include <mantella_bits/helper/unorderedContainer.hpp>
// C++ standard library
#include <functional>
namespace mant {
arma::uword Hash::operator()(
const arma::Col<double>& key) const {
// Start with the hash of the first value ...
arma::uword hashedKey = std::hash<double>()(key(0));
// ... and a... | #include <mantella_bits/helper/unorderedContainer.hpp>
// C++ standard library
#include <functional>
namespace mant {
arma::uword Hash::operator()(
const arma::Col<double>& key) const {
// Start with the hash of the first value ...
arma::uword hashedKey = std::hash<double>()(key(0));
// ... and a... | Return false if the size does not match | Return false if the size does not match
| C++ | mit | Mantella/Mantella,SebastianNiemann/Mantella,SebastianNiemann/Mantella,Mantella/Mantella,Mantella/Mantella,SebastianNiemann/Mantella |
89af2f4368a47830b25e9ec527c47f0f56dbae00 | src/large_double_to_float.cpp | src/large_double_to_float.cpp | /*
C++ working draft
7.9.1
If the source value is between two adjacent destination values, the result
of the conversion is an implementation-defined choice of either of those
values. Otherwise, the behavior is undefined.
*/
#include <cstdlib>
#include <iostream>
int main() {
static constexpr double kLargeDouble = 1e... | /*
http://eel.is/c++draft/conv.double#1
7 Expressions [expr]
7.3 Standard conversions [conv]
7.3.9 Floating-point conversions [conv.double]
1 A prvalue of floating-point type can be converted to a prvalue of another floating-point type.
If the source value can be exactly represented in the destination type, the resul... | Update docs on double to float | Update docs on double to float
Double to float seems to be implemenation defined, but I'll leave
it for now.
| C++ | apache-2.0 | geoffviola/undefined_behavior_study,geoffviola/undefined_behavior_study,geoffviola/undefined_behavior_study,geoffviola/undefined_behavior_study |
92832e6ff83b2bd8e292031d6d1e9034e5f41ec3 | net/disk_cache/cache_util_posix.cc | net/disk_cache/cache_util_posix.cc | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/disk_cache/cache_util.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_util.h"
namespace disk_cache... | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/disk_cache/cache_util.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_util.h"
namespace disk_cache... | Fix DeleteCache on POSIX. It wasn't successfully deleting before. | Fix DeleteCache on POSIX. It wasn't successfully deleting before.
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@2468 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 |
61621cd52a4daffb476e156b2eca41929f7f4912 | Wangscape/OptionsManager.cpp | Wangscape/OptionsManager.cpp | #include "OptionsManager.h"
#include <fstream>
#include <iostream>
#include <boost/filesystem.hpp>
#include <spotify/json.hpp>
#include "codecs/OptionsCodec.h"
#include "logging/Logging.h"
OptionsManager::OptionsManager(std::string optionsFilename)
{
loadOptions(optionsFilename);
}
void OptionsManager::loadOp... | #include "OptionsManager.h"
#include <fstream>
#include <iostream>
#include <boost/filesystem.hpp>
#include <spotify/json.hpp>
#include "codecs/OptionsCodec.h"
#include "logging/Logging.h"
OptionsManager::OptionsManager(std::string optionsFilename)
{
loadOptions(optionsFilename);
}
void OptionsManager::loadOp... | Revert "Remove extra call to create_directories" | Revert "Remove extra call to create_directories"
This reverts commit 5459242e934309842d71d2b3e064294f2f5b28cb.
This caused TestOptions.TestOptionsValues to fail.
| C++ | mit | Wangscape/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape |
97ddcd917c7b8451fc415b660e46d4dcba4ec57d | src/vast/detail/cppa_type_info.cc | src/vast/detail/cppa_type_info.cc | #include "vast/detail/cppa_type_info.h"
#include <cppa/announce.hpp>
#include "vast/chunk.h"
#include "vast/event.h"
#include "vast/expression.h"
#include "vast/schema.h"
#include "vast/segment.h"
#include "vast/to_string.h"
#include "vast/uuid.h"
namespace vast {
namespace detail {
template <typename T>
void cppa_a... | #include "vast/detail/cppa_type_info.h"
#include <cppa/announce.hpp>
#include "vast/chunk.h"
#include "vast/event.h"
#include "vast/expression.h"
#include "vast/schema.h"
#include "vast/segment.h"
#include "vast/to_string.h"
#include "vast/uuid.h"
namespace vast {
namespace detail {
template <typename T>
void cppa_a... | Fix nasty bug introduced due to naming glitch. | Fix nasty bug introduced due to naming glitch.
| C++ | bsd-3-clause | mavam/vast,vast-io/vast,mavam/vast,vast-io/vast,pmos69/vast,vast-io/vast,pmos69/vast,mavam/vast,vast-io/vast,pmos69/vast,vast-io/vast,mavam/vast,pmos69/vast |
b36fc83e6f6a1482499e471a4755e8f0aa76227a | test/cfi/target_uninstrumented.cpp | test/cfi/target_uninstrumented.cpp | // RUN: %clangxx -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
// RUN: %clangxx_cfi_diag -g %s -o %t %ld_flags_rpath_exe
// RUN: %run %t 2>&1 | FileCheck %s
// REQUIRES: cxxabi
// UNSUPPORTED: win32
#include <stdio.h>
#include <string.h>
struct A {
virtual void f();
};
void *create_B();
#ifd... | // RUN: %clangxx -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
// RUN: %clangxx_cfi_diag -g %s -o %t %ld_flags_rpath_exe
// RUN: %run %t 2>&1 | FileCheck %s
// REQUIRES: cxxabi
// UNSUPPORTED: win32
#include <stdio.h>
#include <string.h>
struct A {
virtual void f();
};
void *create_B();
#ifd... | Fix test broken by r335644 | Fix test broken by r335644
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@335657 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 |
e06890f13764eb9d887d130dbc8afaa96696455a | correctness.cpp | correctness.cpp | #include <iostream>
using namespace std;
#include "numvec.hpp"
template<typename T>
void f1(T &res, const T &x)
{
T u,y = 2*x;
y = 7*x;
y -= 1.2;
u = x + y;
y = y/x;
u = 3/x;
u += -y;
u += 1.1*x;
y = sin(u);
res = pow(x,y);
}
void test_correctness()
{
const int len = 4;
numvec<double, len> in... | #include <iostream>
using namespace std;
#include "numvec.hpp"
template<typename T>
void f1(T &res, const T &x)
{
T u,y = 2*x;
y = 7*x;
y -= 1.2;
u = x + y;
y = y/x;
u = 3/x;
u += -y;
u += 1.1*x;
y = sin(u);
res = pow(x,y);
y = pow(res,1.2);
res = pow(y,3);
}
void test_correctness()
{
const... | Test pow with scalar double exponent and integer exponent. | Test pow with scalar double exponent and integer exponent.
| C++ | mit | uekstrom/numvec |
cc1c87b88a94317a13cde6578f1dd23c05a53468 | 3RVX/MeterWnd/Meters/HorizontalTile.cpp | 3RVX/MeterWnd/Meters/HorizontalTile.cpp | // Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#include "HorizontalTile.h"
HorizontalTile::HorizontalTile(std::wstring bitmapName,
int x, int y, int units, bool reverse) :
Meter(bitmapName, x, y, units),
_reverse(reverse) {
_rect.Width = _b... | // Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#include "HorizontalTile.h"
HorizontalTile::HorizontalTile(std::wstring bitmapName,
int x, int y, int units, bool reverse) :
Meter(bitmapName, x, y, units),
_reverse(reverse) {
_rect.Width = _b... | Remove space (major changes here, people) | Remove space (major changes here, people)
| C++ | bsd-2-clause | malensek/3RVX,malensek/3RVX,malensek/3RVX |
b3b9a2ef05a4143bf05f70a4f7e7da786487b3db | pyQuantuccia/src/pyQuantuccia.cpp | pyQuantuccia/src/pyQuantuccia.cpp | #include <Python.h>
#include "Quantuccia/ql/time/calendars/unitedstates.hpp"
static PyObject*
get_holiday_date(PyObject *self, PyObject *args)
{
return NULL;
}
static PyMethodDef QuantucciaMethods[] = {
{"get_holiday_date", (PyCFunction)get_holiday_date, METH_VARARGS, NULL},
{NULL, NULL} /* Sentinel... | #include <Python.h>
#include "Quantuccia/ql/time/calendars/unitedstates.hpp"
static PyObject*
get_holiday_date(PyObject *self, PyObject *args)
{
return NULL;
}
static PyMethodDef QuantucciaMethods[] = {
{"get_holiday_date", (PyCFunction)get_holiday_date, METH_VARARGS, NULL},
{NULL, NULL} /* Sentinel... | Correct the way the module is defined. | Correct the way the module is defined.
| C++ | bsd-3-clause | jwg4/pyQuantuccia,jwg4/pyQuantuccia |
21f2a842d8503c8c32a3693aa9da26f3c068fc62 | dv/riscv_compliance/ibex_riscv_compliance.cc | dv/riscv_compliance/ibex_riscv_compliance.cc | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include <signal.h>
#include <iostream>
#include "verilated_toplevel.h"
#include "verilator_sim_ctrl.h"
ibex_riscv_compliance *top;
VerilatorSimCtrl *simctrl;
int ma... | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include <signal.h>
#include <iostream>
#include "verilated_toplevel.h"
#include "verilator_sim_ctrl.h"
ibex_riscv_compliance *top;
VerilatorSimCtrl *simctrl;
int ma... | Add exit check for setup call | [DV] Add exit check for setup call
Check the return value and exit program execution.
| C++ | apache-2.0 | lowRISC/ibex,AmbiML/ibex,lowRISC/ibex,AmbiML/ibex,AmbiML/ibex,AmbiML/ibex,lowRISC/ibex,lowRISC/ibex |
df6cb60a0a5b469aa8a9811da04bdae646dab7e6 | src/trinerdi/various/bit_hacks.cpp | src/trinerdi/various/bit_hacks.cpp | /**
* Author: Václav Volhejn
* Source: KACTL notebook (various/chapter.tex)
* Status: Tested manually, forAllSubsetMasks tested at Ptz
* Description: Various bit manipulation functions/snippets.
*/
#include "../base.hpp"
int lowestSetBit(int x) { return x & -x }
void forAllSubsetMasks(int m) { // Including m its... | /**
* Name: Bit hacks
* Author: Václav Volhejn
* Source: KACTL notebook (various/chapter.tex)
* Status: Tested manually, forAllSubsetMasks tested at Ptz
* Description: Various bit manipulation functions/snippets.
*/
#include "../base.hpp"
int lowestSetBit(int x) { return x & -x }
void forAllSubsetMasks(int m) {... | Add name for bit hacks | Add name for bit hacks
| C++ | mit | IAmWave/trinerdi-icpc,IAmWave/trinerdi-icpc,trinerdi/icpc-notebook,IAmWave/trinerdi-icpc,trinerdi/icpc-notebook,IAmWave/trinerdi-icpc,trinerdi/icpc-notebook,trinerdi/icpc-notebook,trinerdi/icpc-notebook |
778be500f9e19ae08b08c65890377eb8c674ab3b | src/gameitem.cpp | src/gameitem.cpp | #include "gameitem.h"
#include <QDeclarativeExpression>
GameItem::GameItem(QQuickItem *parent)
: QQuickItem(parent),
m_expression(0)
{
}
void GameItem::update(long delta)
{
if (m_expression)
m_expression->evaluate();
}
QDeclarativeScriptString GameItem::updateScript() const
{
return m_upda... | #include "gameitem.h"
#include <QDeclarativeExpression>
GameItem::GameItem(QQuickItem *parent)
: QQuickItem(parent),
m_expression(0)
{
}
void GameItem::update(long delta)
{
if (m_expression)
m_expression->evaluate();
}
QDeclarativeScriptString GameItem::updateScript() const
{
return m_upda... | Change declarative expression to get context and scopre from script | Change declarative expression to get context and scopre from script
| C++ | mit | arcrowel/Bacon2D,paulovap/Bacon2D,paulovap/Bacon2D,arcrowel/Bacon2D,kenvandine/Bacon2D,kenvandine/Bacon2D |
60cb0f084d7b9492ee2d366700c7aeb58805d85c | content/shell/shell_content_client.cc | content/shell/shell_content_client.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/shell/shell_content_client.h"
#include "base/string_piece.h"
namespace content {
ShellContentClient::~ShellContentClient() {
}
v... | // 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/shell/shell_content_client.h"
#include "base/string_piece.h"
#include "webkit/glue/user_agent.h"
namespace content {
ShellContent... | Use Chrome's user agent string for content_shell, since some sites (i.e. Gmail) give a degraded experience otherwise. | Use Chrome's user agent string for content_shell, since some sites (i.e. Gmail) give a degraded experience otherwise.
BUG=90445
Review URL: http://codereview.chromium.org/7980044
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102172 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | gavinp/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,adob... |
d31f710f5b394066ad28910da467078d34c2c25c | CxxLibrary/new.cc | CxxLibrary/new.cc | #include <MemoryManager.hh>
#include <cstddef>
#include <new>
void *operator new(std::size_t size)
{
return MemoryManager::get().allocate(size);
}
void *operator new[](std::size_t size)
{
return MemoryManager::get().allocate(size);
}
void operator delete(void* p)
{
MemoryManager::get().deallocate(p);
}
... | #include <MemoryManager.hh>
#include <cstddef>
#include <new>
void *operator new(std::size_t size)
{
return MemoryManager::get().allocate(size);
}
void *operator new[](std::size_t size)
{
return MemoryManager::get().allocate(size);
}
void operator delete(void* p)
{
MemoryManager::get().deallocate(p);
}
... | Add symbols for sized allocation | Add symbols for sized allocation
| C++ | bsd-2-clause | ahoka/esrtk,ahoka/esrtk,ahoka/esrtk |
0e1a5286d67cad9026e6ce23998df26f404008e6 | 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 invalid write in RenderViewHostObserver. | Fix invalid write in RenderViewHostObserver.
TBR=avi
Review URL: http://codereview.chromium.org/6813065
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@81023 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 |
d34b1350b118b548b372af3ba5da5b5732deb33e | test/video_annotator/test_video_annotator.cc | test/video_annotator/test_video_annotator.cc | #include <QtPlugin>
#include "test_video_annotator.h"
#include "fish_detector/video_annotator/mainwindow.h"
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
#endif
void TestVideoAnnotator::testLoadVideo() {
fish_detector::video_annotator::MainWindow mainwin;
mainwin.player_->loadVideo("slow_motion_drop.m... | #include <QtPlugin>
#include "test_video_annotator.h"
#include "fish_detector/video_annotator/mainwindow.h"
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
#endif
void TestVideoAnnotator::testLoadVideo() {
fish_detector::video_annotator::MainWindow mainwin;
std::string name = "C:/local/FishDetector/test... | Add content to second test | Add content to second test
| C++ | mit | BGWoodward/FishDetector |
bba499c70f91dd85196ce56a4559fa6a957f210f | chrome/browser/extensions/extension_input_method_api.cc | chrome/browser/extensions/extension_input_method_api.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/browser/extensions/extension_input_method_api.h"
#include "base/values.h"
#include "chrome/browser/chromeos/input_method/input_metho... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_input_method_api.h"
#include "base/values.h"
#include "chrome/browser/chromeos/input_method/input_metho... | Fix a build error when OS_CHROMEOS is not defined. | Fix a build error when OS_CHROMEOS is not defined.
BUG=None
TEST=Manually
Review URL: http://codereview.chromium.org/9430055
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@123311 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,dednal/chromium.src,markYoungH/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,aniru... |
e61942b8caddca14807281072d038e60dc4a1aa0 | VectorElementRemoval/VectorElementRemoval.cpp | VectorElementRemoval/VectorElementRemoval.cpp | #include <vector>
#include <iostream>
#include <algorithm>
#ifndef REMOVE_VALUES
#ifndef CHECK_VALUES
#error "define one of REMOVE_VALUES or CHECK_VALUES"
#endif
#endif
#ifdef REMOVE_VALUES
#ifdef CHECK_VALUES
#error "define either REMOVE_VALUES or CHECK_VALUES"
#endif
#endif... | #include <vector>
#include <iostream>
#include <algorithm>
#ifndef REMOVE_VALUES
#ifndef CHECK_VALUES
#error "define one of REMOVE_VALUES or CHECK_VALUES"
#endif
#endif
#ifdef REMOVE_VALUES
#ifdef CHECK_VALUES
#error "define either REMOVE_VALUES or CHECK_VALUES"
#endif
#endif... | Check vs Remove - not so not so clear | Check vs Remove - not so not so clear
| C++ | mit | hanw/cppsandbox,hanw/cppsandbox,hanw/cppsandbox,jbcoe/CppSandbox,jbcoe/CppSandbox,jbcoe/CppSandbox |
7ba148323a92090361830439bfbebd6c42af2feb | tests/unittests/MemberTests.cpp | tests/unittests/MemberTests.cpp | #include "Test.h"
TEST_CASE("Nets") {
auto tree = SyntaxTree::fromText(R"(
module Top;
wire logic f = 1;
endmodule
)");
Compilation compilation;
compilation.addSyntaxTree(tree);
NO_COMPILATION_ERRORS;
}
TEST_CASE("Continuous Assignments") {
auto tree = SyntaxTree::fromText(R"(
module Top;
... | #include "Test.h"
#include <nlohmann/json.hpp>
TEST_CASE("Nets") {
auto tree = SyntaxTree::fromText(R"(
module Top;
wire logic f = 1;
endmodule
)");
Compilation compilation;
compilation.addSyntaxTree(tree);
NO_COMPILATION_ERRORS;
}
TEST_CASE("Continuous Assignments") {
auto tree = SyntaxTree... | Add test for JSON dumping | Add test for JSON dumping
| C++ | mit | MikePopoloski/slang,MikePopoloski/slang |
b451df39a1ef2fb6ebf9bd25579d2d692aadce05 | examples/blink_modular/Atm_blink.cpp | examples/blink_modular/Atm_blink.cpp | #include <Automaton.h>
#include "Atm_blink.h"
Atm_blink & Atm_blink::begin( int attached_pin, int blinkrate )
{
const static state_t state_table[] PROGMEM = {
/* ON_ENTER ON_LOOP ON_EXIT EVT_TIMER ELSE */
/* LED_ON */ ACT_ON, -1, -1, LED_OFF, -1,
/* LED_OFF */ ACT_OFF, ... | #include <Automaton.h>
#include "Atm_blink.h"
Atm_blink & Atm_blink::begin( int attached_pin, uint32_t blinkrate )
{
const static state_t state_table[] PROGMEM = {
/* ON_ENTER ON_LOOP ON_EXIT EVT_TIMER ELSE */
/* LED_ON */ ACT_ON, -1, -1, LED_OFF, -1,
/* LED_OFF */ ACT_O... | Update blink_modular.ino: changed blinkrate argument to uint32_t | Update blink_modular.ino: changed blinkrate argument to uint32_t | C++ | mit | tinkerspy/Automaton,tinkerspy/Automaton |
82795e70b27dd54a3507916f949206184b35c7dc | ch18/Complex.cpp | ch18/Complex.cpp | #include <iostream>
using namespace std;
class Complex {
double re, im;
public:
Complex(double r, double i) : re {r}, im {i} {}
Complex operator+(Complex);
Complex operator*(Complex);
friend ostream &operator<<(ostream &os, Complex c);
};
ostream &operator<<(ostream &os, Complex c) {
os << c.re;
os << ((c.im ... | #include <iostream>
using namespace std;
class Complex {
double re, im;
public:
Complex(double r, double i) : re {r}, im {i} {}
Complex operator+(Complex);
Complex operator*(Complex);
friend ostream &operator<<(ostream &os, Complex c);
};
ostream &operator<<(ostream &os, Complex c) {
os << c.re;
os << ((c.im ... | Change to initilizer list construction | Change to initilizer list construction
| C++ | mit | eroicaleo/TheCppProgrammingLanguage |
a8a78c4c62d9b1ab22a722b952ecd8ec117ee95f | opencog/viterbi/atom_types_init.cc | opencog/viterbi/atom_types_init.cc | /**
* atom_types_init.cc
*
* Link Grammar Atom Types used during Viterbi parsing.
*
* Copyright (c) 2009 Linas Vepstas <linasvepstas@gmail.com>
*/
#include "opencog/viterbi/atom_types.definitions"
using namespace opencog;
// library initialization
#if defined(WIN32) && defined(_DLL)
namespace win {
#include <w... | /**
* atom_types_init.cc
*
* Link Grammar Atom Types used during Viterbi parsing.
*
* Copyright (c) 2009, 2013 Linas Vepstas <linasvepstas@gmail.com>
*/
#include <opencog/server/Module.h>
#include "opencog/viterbi/atom_types.definitions"
using namespace opencog;
// library initialization
#if defined(WIN32) && ... | Use the new atom types module macro | Use the new atom types module macro
We need to define this as a valid module, so that loading can
happen, error-free.
| C++ | agpl-3.0 | printedheart/opencog,jlegendary/opencog,ceefour/opencog,eddiemonroe/opencog,eddiemonroe/opencog,printedheart/opencog,iAMr00t/opencog,AmeBel/opencog,sanuj/opencog,virneo/opencog,sanuj/opencog,ArvinPan/opencog,yantrabuddhi/opencog,TheNameIsNigel/opencog,cosmoharrigan/opencog,TheNameIsNigel/opencog,ArvinPan/atomspace,virn... |
7a1586a73d522dc53ccccf4e5bf4a44226354d89 | doc/snippets/MatrixBase_eval.cpp | doc/snippets/MatrixBase_eval.cpp | Matrix2f M = Matrix2f::Random();
Matrix2f m;
m = M;
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Now we want to replace m by its own transpose." << endl;
cout << "If we do m = m.transpose(), then m becomes:" << endl;
m = m.transpose() * 1;
cout << m << endl << "which is wrong!" << endl;
cout << "Now l... | Matrix2f M = Matrix2f::Random();
Matrix2f m;
m = M;
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Now we want to copy a column into a row." << endl;
cout << "If we do m.col(1) = m.row(0), then m becomes:" << endl;
m.col(1) = m.row(0);
cout << m << endl << "which is wrong!" << endl;
cout << "Now let us ... | Make snippet run successfully again: the snippet for 'eval' was taking m=m.transpose() as an example of code that needs an explicit call to eval(), but that doesn't work anymore now that we have the clever assert detecting aliasing issues. | Make snippet run successfully again:
the snippet for 'eval' was taking m=m.transpose() as an example of code
that needs an explicit call to eval(), but that doesn't work anymore now
that we have the clever assert detecting aliasing issues.
| C++ | bsd-3-clause | madlib/eigen,madlib/eigen,madlib/eigen,madlib/eigen |
334f8b9b37aef9e650af2007f9f3f7169f284425 | unittests/Support/TimeValueTest.cpp | unittests/Support/TimeValueTest.cpp | //===- llvm/unittest/Support/TimeValueTest.cpp - Time Value tests ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- llvm/unittest/Support/TimeValueTest.cpp - Time Value tests ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Add TimeValue.Win32FILETIME, corresponding to r186374. | unittests/Support: Add TimeValue.Win32FILETIME, corresponding to r186374.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@186375 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple... |
75673accc4a87683935957234e9c196225c8a413 | gl-platform/GLPlatform.cpp | gl-platform/GLPlatform.cpp |
#include "GLPlatform.hpp"
void glPlatformInit()
{
#ifdef GL_PLATFORM_USING_WIN
glewInit();
#endif
}
|
#include "GLPlatform.hpp"
#include <stdexcept>
void glPlatformInit()
{
#ifdef GL_PLATFORM_USING_WIN
GLenum err = glewInit();
if (GLEW_OK != err)
{
throw std::runtime_error("GLEW failed to initialize.");
}
#endif
}
| Add exception if GLEW fails to initialize. | Add exception if GLEW fails to initialize.
| C++ | mit | iauns/cpm-gl-platform,iauns/cpm-gl-platform |
0b3af42d8e7556014fe7f73f7f462520ef93ce1b | src/widgets/executable_path_windows.cpp | src/widgets/executable_path_windows.cpp |
#error Still to implement
string executable_path()
{
char buffer[16 * 1024];
int bytes = GetModuleFileName(NULL, buffer, sizeof(buffer));
if (bytes == 0)
{
throw unable_to_find_executable_path{};
}
buffer[bytes] = '\0';
string executable_path{buffer};
return std::string{executable_path.cbegin(),
e... | #include <sdl_cpp/widgets/executable_path.h>
#include <string>
#include "Windows.h"
//#error Still to implement
using namespace ::std;
string executable_path()
{
char buffer[16 * 1024];
int bytes = GetModuleFileName(nullptr, buffer, sizeof(buffer));
if (bytes == 0)
{
throw unable_to_find_executable_path{};
}
... | Add executable path on Windows | Add executable path on Windows
| C++ | mit | hiddeninplainsight/sdl_cpp_wrapper,hiddeninplainsight/sdl_cpp_wrapper,hiddeninplainsight/sdl_cpp_wrapper |
aced84c48ea90d2c855b2e2c25cec87b389722cb | tests/BStringTests.cpp | tests/BStringTests.cpp | /**
* @file BStringTests.cpp
* @copyright (c) 2014 by Petr Zemek (s3rvac@gmail.com) and contributors
* @license BSD, see the @c LICENSE file for more details
* @brief Tests for the BString class.
*/
#include <gtest/gtest.h>
#include "BString.h"
namespace bencoding {
namespace tests {
using namespace test... | /**
* @file BStringTests.cpp
* @copyright (c) 2014 by Petr Zemek (s3rvac@gmail.com) and contributors
* @license BSD, see the @c LICENSE file for more details
* @brief Tests for the BString class.
*/
#include <gtest/gtest.h>
#include "BString.h"
namespace bencoding {
namespace tests {
using namespace test... | Fix the names of variables in the tests. | BString: Fix the names of variables in the tests.
| C++ | bsd-3-clause | s3rvac/cpp-bencoding,s3rvac/cpp-bencoding |
9b0e250f553f14a1df4a1fa7e5134b7c5a708d36 | src/ArduinoMockAll.cc | src/ArduinoMockAll.cc | // Copyright 2015 http://switchdevice.com
#include "Arduino.cc"
#include "EEPROM.cc"
#include "Serial.cc"
#include "SoftwareSerial.cc"
#include "serialHelper.cc"
#include "Spark.cc"
#include "WiFi.cc"
#include "Wire.cc"
#include "SPI.cc"
#include "OneWire.cc"
#include "IRremote.cc"
| // Copyright 2015 http://switchdevice.com
#include "Arduino.cc"
#include "Serial.cc"
#include "serialHelper.cc"
#include "OneWire.cc"
#include "SoftwareSerial.cc"
/* At WiTraC we don't make use of any of the following mocks. They are therefore
* commented out to save precious build time
*/
//#include "EEPROM.cc"
/... | Comment out unused mocks to save build time | Comment out unused mocks to save build time
| C++ | isc | balp/arduino-mock,balp/arduino-mock |
fd36429f1ecaee89c5bb84b5cc3b1cefe4cb4f82 | src/client/type/rastertext_win.cpp | src/client/type/rastertext_win.cpp | #include "rastertext.hpp"
bool RasterText::loadTexture()
{
return true;
}
| #include "rastertext.hpp"
// FIXME: unimplemented
Font::Font(Font const &f)
{ }
Font::~Font()
{ }
Font &Font::operator=(Font const &f)
{
return *this;
}
bool RasterText::loadTexture()
{
return true;
}
| Add placeholder font code for Windows | Add placeholder font code for Windows
| C++ | bsd-2-clause | depp/sglib,depp/sglib |
9c3ec1889b4f083de76b3477c0f90e5e8a3453b0 | src/realm/util/interprocess_mutex.cpp | src/realm/util/interprocess_mutex.cpp | /*************************************************************************
*
* REALM CONFIDENTIAL
* __________________
*
* [2011] - [2016] Realm Inc
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Realm Incorporated and its suppliers,
* if any. The int... | /*************************************************************************
*
* Copyright 2016 Realm Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... | Update header in recently added file. | Update header in recently added file.
| C++ | apache-2.0 | realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core |
39c287ec18a0d0f27950d33713371db2087887aa | chrome/browser/extensions/extension_toolstrip_apitest.cc | chrome/browser/extensions/extension_toolstrip_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"
// Disabled, http://crbug.com/30151.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_Tools... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
// Disabled, http://crbug.com/30151 (Linux and ChromeOS),
// http://crbug.com/35034 (others)... | Update bug reference link in ExtensionApiTest.Toolstrip | Update bug reference link in ExtensionApiTest.Toolstrip
TBR=erikkay
TEST=no code change
BUG=30151, 35034
Review URL: http://codereview.chromium.org/580015
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@38394 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,hujiajie/pa-chromium,ltilve/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,cro... |
362251df0b45c6aad84d4eef9836b087bc96bc2a | src/xenia/base/system_win.cc | src/xenia/base/system_win.cc | /**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2020 Ben Vanik. All rights reserved. ... | /**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2020 Ben Vanik. All rights reserved. ... | Fix dangling pointer in LaunchWebBrowser. | [Base] Fix dangling pointer in LaunchWebBrowser.
[Base] Fix dangling pointer in LaunchWebBrowser. Fixes #1614.
| C++ | bsd-3-clause | sephiroth99/xenia,sephiroth99/xenia,sephiroth99/xenia |
088699e1c1afb4e64f2de1cf993ce572c448c7c1 | src/master/curl_helper_unittest.cc | src/master/curl_helper_unittest.cc | // Copyright (c) 2015 Chaobin Zhang. All rights reserved.
// Use of this source code is governed by the BSD license that can be
// found in the LICENSE file.
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "common/util.h"
#include "master/curl_helper.h"
#include "testing/gtest/include/g... | // Copyright (c) 2015 Chaobin Zhang. All rights reserved.
// Use of this source code is governed by the BSD license that can be
// found in the LICENSE file.
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "common/util.h"
#include "master/curl_helper.h"
#include "testing/gtest/include/g... | Use license file instead of readme. | [TEST] Use license file instead of readme.
Change of LICENSE is less than README.md.
| C++ | bsd-2-clause | zhchbin/DN,zhchbin/DN,zhchbin/DN,zhchbin/DN,zhchbin/DN,zhchbin/DN |
ccef8dce5ca8d158b9812c688cdc6f7363ab476c | src/ogvr/PluginKit/DeviceToken.cpp | src/ogvr/PluginKit/DeviceToken.cpp | /** @file
@brief Implementation
@date 2014
@author
Ryan Pavlik
<ryan@sensics.com>
<http://sensics.com>
*/
// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)
// Internal Includes
#include <ogvr/Plug... | /** @file
@brief Implementation
@date 2014
@author
Ryan Pavlik
<ryan@sensics.com>
<http://sensics.com>
*/
// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)
// Internal Includes
#include <ogvr/Plug... | Fix broken builds - stubs not stubby enough. | Fix broken builds - stubs not stubby enough.
| C++ | apache-2.0 | godbyk/OSVR-Core,OSVR/OSVR-Core,d235j/OSVR-Core,d235j/OSVR-Core,OSVR/OSVR-Core,feilen/OSVR-Core,feilen/OSVR-Core,feilen/OSVR-Core,Armada651/OSVR-Core,OSVR/OSVR-Core,feilen/OSVR-Core,Armada651/OSVR-Core,Armada651/OSVR-Core,leemichaelRazer/OSVR-Core,d235j/OSVR-Core,leemichaelRazer/OSVR-Core,OSVR/OSVR-Core,godbyk/OSVR-Cor... |
d9d68a668b8f42d94ebd069a898fadffc6047866 | ch16/ex16.5/main.cpp | ch16/ex16.5/main.cpp | /***************************************************************************
* @file main.cpp
* @author Alan.W
* @date 02 Feb 2014
* 13 Oct 2014
* @remark This code is for the exercises from C++ Primer 5th Edition
* @note
***************************************************... | /***************************************************************************
* @file main.cpp
* @author Alan.W
* @date 02 Feb 2014
* 13 Oct 2014
* @remark This code is for the exercises from C++ Primer 5th Edition
* @note
***************************************************... | Use range for instead of for | Use range for instead of for | C++ | cc0-1.0 | m0000re/CppPrimer,seekertang/Cpp-Primer,zhuanggengzhen/Cpp-Primer-1,vzyw/CppPrimer,Allianzcortex/Cpp-Primer,at86/CppPrimer,buptfb/Cpp-Primer,AndychenCL/Cpp-Primer,coldmanck/Cpp-Primer,zjryan/Cpp-Primer,sunday1103/Cpp-Primer,cseryp/CppPrimer,Mugurell/Cpp-Primer,jiutianhuayu/Cpp-Primer,frank67/Cpp-Primer,lawlietye/CppPri... |
dae92abf08f280c9022936b89e3ec38ab7dde32f | test/performance/tmgas.cpp | test/performance/tmgas.cpp | #define BOOST_TEST_ALTERNATIVE_INIT_API
#include <boost/test/unit_test.hpp>
#include "ReservoirBenchmark.h"
#include "TMGas.h"
using namespace boost::unit_test;
void performMeasurement() {
int iterations = 1000;
ReservoirFactory *rFactory = new TMGas::Reservoir::Factory(16);
reservoirBenchmark(rFactory,ite... | #define BOOST_TEST_ALTERNATIVE_INIT_API
#include <boost/test/unit_test.hpp>
#include "ReservoirBenchmark.h"
#include "TMGas.h"
using namespace boost::unit_test;
void performMeasurement() {
int iterations = 100;
ReservoirFactory *rFactory = new TMGas::Reservoir::Factory(16);
reservoirBenchmark(rFactory,iter... | Reduce the size of the TMGas measurement by an order of magnitude. | Reduce the size of the TMGas measurement by an order of magnitude.
| C++ | mit | marblar/demon,marblar/demon,marblar/demon,marblar/demon |
5a6197c69d5277b55837c308dc9701bfe3915bb5 | src/Base/Renderer.cpp | src/Base/Renderer.cpp | #include "Renderer.hpp"
#include "../OpenGL/OpenGLRenderer.hpp"
#include "../Vulkan/VulkanRenderer.hpp"
Renderer::~Renderer() {
}
Renderer* Renderer::makeRenderer(BACKEND backend, Window & window){
// Create and return backend.
if(backend == BACKEND::OpenGL)
return new OpenGLRenderer(window);
... | #include "Renderer.hpp"
#include "../OpenGL/OpenGLRenderer.hpp"
#include "../Vulkan/VulkanRenderer.hpp"
Renderer::~Renderer() {
}
Renderer* Renderer::makeRenderer(BACKEND backend, Window & window){
// Create and return backend.
if(backend == BACKEND::OpenGL)
return new OpenGLRenderer(window);
... | Remove implementation of pure virtual function. | Remove implementation of pure virtual function.
| C++ | mit | Chainsawkitten/AsyncCompute,Chainsawkitten/ParticlesGLVulkan |
c59d9c33cb94307068b73bd849b22a24a12c8c88 | src/WindowMaximize.cpp | src/WindowMaximize.cpp | #include "WindowMaximize.h"
#include "WebPage.h"
#include "WebPageManager.h"
WindowMaximize::WindowMaximize(WebPageManager *manager, QStringList &arguments, QObject *parent) : WindowCommand(manager, arguments, parent) {
}
void WindowMaximize::windowFound(WebPage *page) {
QDesktopWidget *desktop = QApplication::desk... | #include <QDesktopWidget>
#include "WindowMaximize.h"
#include "WebPage.h"
#include "WebPageManager.h"
WindowMaximize::WindowMaximize(WebPageManager *manager, QStringList &arguments, QObject *parent) : WindowCommand(manager, arguments, parent) {
}
void WindowMaximize::windowFound(WebPage *page) {
QDesktopWidget *de... | Make sure to include QDesktopWidget | Make sure to include QDesktopWidget
| C++ | mit | avantcredit/capybara-webkit,tasboa/capybara-webkit,dstnation/capybara-webkit,marcisme/capybara-webkit,betelgeuse/capybara-webkit,phlizik/capybara-webkit,twalpole/capybara-webkit,thoughtbot/capybara-webkit,marcisme/capybara-webkit,mhoran/capybara-webkit,vintikzzz/capybara-webkit,irfanah/capybara-webkit,marcisme/capybara... |
8be498bec4028de6197c1ea3c28919dfc18e1547 | src/cpp/io/PartitionReader.cpp | src/cpp/io/PartitionReader.cpp | /*
* PartitionReader.cpp
*
* Created on: 15.02.2013
* Author: Christian Staudt (christian.staudt@kit.edu)
*/
#include "PartitionReader.h"
namespace NetworKit {
Partition PartitionReader::read(std::string path) {
std::ifstream file(path);
// check if file readable
if (!file) {
throw std::runtime_err... | /*
* PartitionReader.cpp
*
* Created on: 15.02.2013
* Author: Christian Staudt (christian.staudt@kit.edu)
*/
#include "PartitionReader.h"
namespace NetworKit {
Partition PartitionReader::read(std::string path) {
std::ifstream file(path);
// check if file readable
if (!file) {
throw std::runtime_err... | Simplify and fix the partition reader | Simplify and fix the partition reader
This fixes the partition reader to correctly set the upper bound of the
partition ids. Furthermore the partition reader is simplified to create
the partition directly in the partition instance instead of a separate
vector as the partition instance also simply expands a std::vector... | C++ | mit | fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit |
899b69014373138537a749ec181c9d0fcbfcd3c9 | src/Qumulus/Uml/Diagram/PackageShape.cpp | src/Qumulus/Uml/Diagram/PackageShape.cpp | /*
* Qumulus UML editor
* Author: Frank Erens
* Author: Randy Thiemann
*
*/
#include "PackageShape.h"
#include <QtGui/QBrush>
QUML_BEGIN_NAMESPACE_UD
PackageShape::PackageShape(QuUK::Element* e,
DiagramElement* p) :
SelectableShape(e, p),
mTabItem(new QGraphicsRectItem(0, 0, 30, 10, thi... | /*
* Qumulus UML editor
* Author: Frank Erens
* Author: Randy Thiemann
*
*/
#include "PackageShape.h"
#include <QtGui/QBrush>
QUML_BEGIN_NAMESPACE_UD
PackageShape::PackageShape(QuUK::Element* e,
DiagramElement* p) :
SelectableShape(e, p),
mTabItem(new QGraphicsRectItem(0, 0, 30, 10, thi... | Change default Z-order for packages. | Change default Z-order for packages.
| C++ | apache-2.0 | SynthiNet/Qumulus,SynthiNet/Qumulus,SynthiNet/Qumulus,SynthiNet/Qumulus |
3eec873f4b9c86f7fea656ebe94feccc84924db7 | example-with-ofxGui/src/main.cpp | example-with-ofxGui/src/main.cpp | #include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofGLWindowSettings settings;
settings.setGLVersion(3, 2); // Using programmable renderer. Comment out this line to use the 'standard' GL renderer.
settings.width = 1024;
settin... | #include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofWindowSettings winSettings;
winSettings.setSize(1024, 768);
ofGLWindowSettings glSettings(winSettings);
glSettings.setGLVersion(3, 2); // Using programmable renderer. Comment... | Update example for openFrameworks 0.11.0 | Update example for openFrameworks 0.11.0
| C++ | mit | musiko/ofxChromaKeyShader |
849070dca8da8d23b4622611ca706ddc367fe083 | gen/SkinPartition.cpp | gen/SkinPartition.cpp | /* Copyright (c) 2006, NIF File Format Library and Tools
All rights reserved. Please see niflib.h for licence. */
#include "SkinPartition.h"
using namespace Niflib;
//Constructor
SkinPartition::SkinPartition() : numVertices((ushort)0), numTriangles((ushort)0), numBones((ushort)0), numStrips((ushort)0), numWeightsPer... | /* Copyright (c) 2006, NIF File Format Library and Tools
All rights reserved. Please see niflib.h for licence. */
#include "SkinPartition.h"
using namespace Niflib;
//Constructor
SkinPartition::SkinPartition() : numVertices((ushort)0), numTriangles((ushort)0), numBones((ushort)0), numStrips((ushort)0), numWeightsPer... | Fix length calc based on m444x's suggestion. | Fix length calc based on m444x's suggestion.
| C++ | bsd-3-clause | BlazesRus/niflib,neomonkeus/niflib,niftools/niflib,neomonkeus/niflib,BlazesRus/niflib,amorilia/niflib,niftools/niflib,figment/niflib,figment/niflib,figment/niflib,neomonkeus/niflib,niftools/niflib,amorilia/niflib |
baa54dcd24269b9a404e9ddda3b3c432fe5490ea | src/socketmanager.cpp | src/socketmanager.cpp | #include "socketmanager.h"
std::shared_ptr<Socket> SocketManager::getSocket(const std::string& socketType) {
void* sockFile = dlopen(("sockets/" + socketType + ".so").c_str(), RTLD_NOW);
if (sockFile == nullptr)
throw SocketLoadFailed (dlerror());
void* spawnFunc = dlsym(sockFile, "spawn");
if (spawnFunc == null... | #include "socketmanager.h"
std::shared_ptr<Socket> SocketManager::getSocket(const std::string& socketType) {
void* sockFile = dlopen(("sockets/" + socketType + ".so").c_str(), RTLD_NOW);
if (sockFile == nullptr)
throw SocketLoadFailed (dlerror());
void* spawnFunc = dlsym(sockFile, "spawn");
if (spawnFunc == null... | Fix socket manager loader to use a C-style cast on the function pointer | Fix socket manager loader to use a C-style cast on the function pointer
| C++ | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
a9b27252698ffb23d91dd013ca3470237f2b3f69 | test/correctness/chunk.cpp | test/correctness/chunk.cpp | #include <stdio.h>
#include <Halide.h>
using namespace Halide;
int main(int argc, char **argv) {
Var x, y;
Var xo, xi, yo, yi;
Func f, g;
printf("Defining function...\n");
f(x, y) = cast<float>(x);
g(x, y) = f(x+1, y) + f(x-1, y);
Target target = get_jit_target_from_environment();
... | #include <stdio.h>
#include <Halide.h>
using namespace Halide;
int main(int argc, char **argv) {
Var x, y;
Var xo, xi, yo, yi;
Func f, g;
printf("Defining function...\n");
f(x, y) = cast<float>(x);
g(x, y) = f(x+1, y) + f(x-1, y);
Target target = get_jit_target_from_environment();
... | Disable shared memory test for OpenCL until bugginess is resolved. | Disable shared memory test for OpenCL until bugginess is resolved.
| C++ | mit | fengzhyuan/Halide,aam/Halide,lglucin/Halide,psuriana/Halide,adasworks/Halide,ayanazmat/Halide,adasworks/Halide,damienfir/Halide,delcypher/Halide,lglucin/Halide,lglucin/Halide,myrtleTree33/Halide,damienfir/Halide,delcypher/Halide,rodrigob/Halide,damienfir/Halide,kenkuang1213/Halide,ronen/Halide,lglucin/Halide,damienfir/... |
0254748e200e87e92147f0ecefd586172cc4de22 | io/cpp/db/io/OStreamOutputStream.cpp | io/cpp/db/io/OStreamOutputStream.cpp | /*
* Copyright (c) 2007 Digital Bazaar, Inc. All rights reserved.
*/
#include <iostream>
#include "db/io/OStreamOutputStream.h"
using namespace std;
using namespace db::io;
using namespace db::rt;
OStreamOutputStream* OStreamOutputStream::mStdoutStream =
new OStreamOutputStream(&cout);
OStreamOutputStream::O... | /*
* Copyright (c) 2007 Digital Bazaar, Inc. All rights reserved.
*/
#include <iostream>
#include "db/io/OStreamOutputStream.h"
using namespace std;
using namespace db::io;
using namespace db::rt;
OStreamOutputStream* OStreamOutputStream::sStdoutStream =
new OStreamOutputStream(&cout);
OStreamOutputStream::O... | Use s prefix for static class vars | Use s prefix for static class vars
| C++ | agpl-3.0 | digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch |
f8d3438005b0db8c1db6b7d092569902b92ae8d9 | cpp_utils/tests/task_i2c_scanner.cpp | cpp_utils/tests/task_i2c_scanner.cpp | #include <esp_log.h>
#include <FreeRTOS.h>
#include <string>
#include <Task.h>
#include <I2C.h>
#include "sdkconfig.h"
#define SDA_PIN 25
#define SCL_PIN 26
//static char tag[] = "task_cpp_utils";
class I2CScanner: public Task {
void run(void *data) override {
I2C i2c;
i2c.init((gpio_num_t)SDA_PIN, (gpio_num_t... | #include <esp_log.h>
#include <FreeRTOS.h>
#include <string>
#include <Task.h>
#include <I2C.h>
#include "sdkconfig.h"
#define DEVICE_ADDRESS 0
#define SDA_PIN 25
#define SCL_PIN 26
//static char tag[] = "task_cpp_utils";
class I2CScanner: public Task {
void run(void *data) override {
I2C i2c;
i2c.init((uint8_... | Fix params passed to i2c.init() to include DEVICE_ADDRESS in the first position. Otherwise SDA becomes SCL_PIN and SCL becomes Default. | Fix params passed to i2c.init() to include DEVICE_ADDRESS in the first position. Otherwise SDA becomes SCL_PIN and SCL becomes Default.
| C++ | apache-2.0 | nkolban/esp32-snippets,nkolban/esp32-snippets,nkolban/esp32-snippets,nkolban/esp32-snippets,nkolban/esp32-snippets |
7e475a2dd4ce71dd97af8b76ef98af0a3c9a2315 | src/phonevalidator.cpp | src/phonevalidator.cpp | #include "phonevalidator.h"
PhoneValidator::PhoneValidator(QObject *parent) :
QValidator(parent)
{
}
QValidator::State PhoneValidator::validate(QString &input, int &pos) const
{
//DDD
QRegExp ddd("(\\d{2})+");
if (ddd.exactMatch(input))
{
input.insert(input.length(), ") ");
input.i... | #include "phonevalidator.h"
PhoneValidator::PhoneValidator(QObject *parent) :
QValidator(parent)
{
}
QValidator::State PhoneValidator::validate(QString &input, int &pos) const
{
//DDD
QRegExp ddd("(\\d{2})+");
if (ddd.exactMatch(input))
{
input.insert(input.length(), ") ");
input.i... | Fix bug when deletig phone | Fix bug when deletig phone
| C++ | bsd-2-clause | enriquefynn/VertSys,enriquefynn/VertSys |
e71e8f2f5cf55227b2651e826e1771b8fc3ebcf6 | SDLut/test/SDLtestThread.cc | SDLut/test/SDLtestThread.cc |
/* Test program to test the thread callbacks
*/
#include <iostream>
#include "SDL.hh"
using namespace RAGE;
Logger testlog("testThread");
class ObjectWithThreadCall
{
public:
int threadcall(void* args)
{
testlog << nl << " --- Thread " << SDL::getCurrentThreadID() << "called --- " << std::endl;
return 0;
... |
/* Test program to test the thread callbacks
*/
#include <iostream>
#include "SDL.hh"
using namespace RAGE;
Logger testlog("testThread");
class ObjectWithThreadCall
{
public:
ObjectWithThreadCall() {}
int threadcall(void* args)
{
testlog << nl << " --- Thread " << SDL::getCurrentThreadID() << "called. Count... | Update Test Thread to show that wait() and kill() are not working as expected | Update Test Thread to show that wait() and kill() are not working as expected
| C++ | bsd-2-clause | asmodehn/sdlut,asmodehn/sdlut |
e0ed7bab32e5961d160699f13b62d1f254b8c729 | src/utils/progressBar.cpp | src/utils/progressBar.cpp | #include "utils/progressBar.h"
#include <iostream>
#include <glog/logging.h>
using namespace std;
const std::string ProgressBar::BEGINNING = "[";
const std::string ProgressBar::END = "]";
const std::string ProgressBar::FILLER = "-";
const size_t ProgressBar::LENGTH = 50;
ProgressBar::ProgressBar()
: mProgress(0)... | #include "utils/progressBar.h"
#include <iostream>
#include <cmath>
#include <glog/logging.h>
using namespace std;
const std::string ProgressBar::BEGINNING = "[";
const std::string ProgressBar::END = "]";
const std::string ProgressBar::FILLER = "-";
const size_t ProgressBar::LENGTH = 50;
ProgressBar::ProgressBar()
... | Fix progress bar rounding issue | Fix progress bar rounding issue
| C++ | mit | Kazz47/cpp_stuff,Kazz47/cpp_stuff |
52c78611d463bc0e410789f6de944daaaef2b10a | src/applicationMain.cc | src/applicationMain.cc | #include "framework/applicationcontext.hh"
#include "framework/clientcode.hh"
using Framework::ApplicationContext;
using Framework::ClientCode;
using Framework::LoadClientCode;
using System::thread;
int applicationMain()
{
ClientCode clientCode = LoadClientCode();
ApplicationContext applicationContext;
... | #include "framework/applicationcontext.hh"
#include "framework/clientcode.hh"
using Framework::ApplicationContext;
using Framework::ClientCode;
using Framework::LoadClientCode;
int applicationMain()
{
ClientCode clientCode = LoadClientCode();
ApplicationContext applicationContext;
clientCode.Application... | Remove unused reference to threads | Remove unused reference to threads
| C++ | mit | Frinter/fire-frame,Frinter/fire-frame |
0c0d27d7c0d56c58b39ec4169e677b605336122b | Benchmark/benchmark.cpp | Benchmark/benchmark.cpp | #include <QActiveResource.h>
#include <QDebug>
int main()
{
qDebug() << getenv("AR_BASE");
QActiveResource::Resource resource(QUrl(getenv("AR_BASE")), getenv("AR_RESOURCE"));
const QString field = getenv("AR_FIELD");
for(int i = 0; i < 100; i++)
{
qDebug() << i;
foreach(QActiveRes... | #include <QActiveResource.h>
#include <QDebug>
int main()
{
Q_ASSERT(getenv("AR_BASE") && getenv("AR_RESOURCE") && getenv("AR_FIELD"));
qDebug() << getenv("AR_BASE");
QActiveResource::Resource resource(QUrl(getenv("AR_BASE")), getenv("AR_RESOURCE"));
const QString field = getenv("AR_FIELD");
for... | Make sure the env variables are set | Make sure the env variables are set
| C++ | lgpl-2.1 | directededge/QActiveResource,directededge/QActiveResource,directededge/QActiveResource |
5fa17bb11188b327942d7681c3c9b8621e42f8ff | src/libhttpserver/response_stream.cpp | src/libhttpserver/response_stream.cpp | #include "response_stream.h"
void rs::httpserver::ResponseStream::Flush() {
socket_->Flush();
}
int rs::httpserver::ResponseStream::Write(const Stream::byte* buffer, int offset, int count) {
auto written = 0;
while (written < count) {
auto sentBytes = socket_->Send(buffer + written, count - w... | #include "response_stream.h"
void rs::httpserver::ResponseStream::Flush() {
socket_->Flush();
}
int rs::httpserver::ResponseStream::Write(const Stream::byte* buffer, int offset, int count) {
auto written = 0;
while (written < count) {
auto sentBytes = socket_->Send(buffer + offset + written, ... | Fix response stream writes where we have a buffer offset | Fix response stream writes where we have a buffer offset
| C++ | mit | RipcordSoftware/libhttpserver,RipcordSoftware/libhttpserver,RipcordSoftware/libhttpserver,RipcordSoftware/libhttpserver |
5ef6db5b4d3e9ab950fd6d2a2b1194c5f0e8a5c2 | src/effects/SkColorMatrixFilter.cpp | src/effects/SkColorMatrixFilter.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.
*/
#include "SkColorMatrixFilter.h"
static SkScalar byte_to_scale(U8CPU byte) {
if (0xFF == byte) {
// want to get this exact
return 1;
} else {
... | /*
* 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 "SkColorMatrixFilter.h"
static SkScalar byte_to_scale(U8CPU byte) {
if (0xFF == byte) {
// want to get this exact
return 1;
} else {
... | Simplify LightingFilter in add-free case am: 0698300cc5 am: a184d5e49d am: 7e02270397 | Simplify LightingFilter in add-free case am: 0698300cc5 am: a184d5e49d
am: 7e02270397
* commit '7e0227039795fdc9891b14697f54b888d7f69fb6':
Simplify LightingFilter in add-free case
Change-Id: I18f77ece7ae91da4965af29c4a2bf779d8a180c4
| C++ | bsd-3-clause | Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_sk... |
8c16512781e0ed5e7f8e63921aabb209a0b7c631 | base/thread_local_posix.cc | base/thread_local_posix.cc | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/thread_local.h"
#include <pthread.h>
#include "base/logging.h"
namespace base {
// static
void ThreadLocalPlatform::AllocateSl... | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/thread_local.h"
#include <pthread.h>
#include "base/logging.h"
namespace base {
// static
void ThreadLocalPlatform::AllocateSl... | Fix a typo that broke the posix build. | Fix a typo that broke the posix build.
git-svn-id: http://src.chromium.org/svn/trunk/src@1681 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 0d33ccade6de3e9eac09e0eb0a9092742762cbe9 | C++ | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
7b64a19cafc5db6689c9c604649ca7f9f5f5e992 | application_context.cpp | application_context.cpp | //
// application_context.cpp
// usbtest
//
// Created by Kristoffer Andersen on 13/07/15.
// Copyright (c) 2015 Monolit ApS. All rights reserved.
//
#include "application_context.h"
#include <display_painter.h>
extern "C" {
#include <project.h>
}
using namespace mono;
ApplicationContext ApplicationContext::sin... | //
// application_context.cpp
// usbtest
//
// Created by Kristoffer Andersen on 13/07/15.
// Copyright (c) 2015 Monolit ApS. All rights reserved.
//
#include "application_context.h"
#include "application_controller_interface.h"
#include <display_painter.h>
extern "C" {
#include <project.h>
}
using namespace mon... | Fix compile error in GCC 5. | Fix compile error in GCC 5.
| C++ | mit | getopenmono/mono_framework,getopenmono/mono_framework,getopenmono/mono_framework |
a314b98f1daf899e9562a00a39ceb2b19105d274 | You-DataStore-Tests/datastore_api_test.cpp | You-DataStore-Tests/datastore_api_test.cpp | #include "stdafx.h"
#include "CppUnitTest.h"
#include "datastore.h"
using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert;
using DataStore = You::DataStore::DataStore;
namespace YouDataStoreTests {
TEST_CLASS(DataStoreApiTest) {
public:
TEST_METHOD(DataStore_Post_Basic_Test) {
You::DataStore::DataS... | #include "stdafx.h"
#include "CppUnitTest.h"
#include "datastore.h"
using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert;
using DataStore = You::DataStore::DataStore;
namespace YouDataStoreTests {
TEST_CLASS(DataStoreApiTest) {
public:
DataStore sut;
TEST_METHOD(DataStore_Post_Basic_Test) {
bool... | Add test for put method | Add test for put method
| C++ | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
93bbc1825adede43e3fc2c7e5c7e1b811a8862ca | views/settingsview.cpp | views/settingsview.cpp | #include "settingsview.h"
#include "ui_settings.h"
SettingsView::SettingsView(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::SettingsView)
{
ui->setupUi(this);
QSettings settings;
int syncingPreference = settings.value("syncingPreference", QVariant(static_cast<int>(SyncOptions::MANUAL_ONLY))).t... | #include "settingsview.h"
#include "ui_settings.h"
SettingsView::SettingsView(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::SettingsView)
{
ui->setupUi(this);
QSettings settings;
int syncingPreference = settings.value("syncingPreference", QVariant(static_cast<int>(SyncOptions::MANUAL_ONLY))).t... | Disable wireless entry in combobox for now | Disable wireless entry in combobox for now
| C++ | mit | MorganRodgers/Macroinvertebrate-Field-Guide,MorganRodgers/Macroinvertebrate-Field-Guide,MorganRodgers/Macroinvertebrate-Field-Guide |
f42d74f41076542fc9b4f4d5fa034dfa93b3c916 | test/CodeGenCXX/new-operator-phi.cpp | test/CodeGenCXX/new-operator-phi.cpp | // RUN: clang-cc -emit-llvm-only -verify %s
// PR5454
class X {static void * operator new(unsigned long size) throw(); X(int); };
int a(), b();
void b(int x)
{
new X(x ? a() : b());
}
| // RUN: clang-cc -emit-llvm-only -verify %s
// PR5454
#include <stddef.h>
class X {static void * operator new(size_t size) throw(); X(int); };
int a(), b();
void b(int x)
{
new X(x ? a() : b());
}
| Make test more platform independent. | Make test more platform independent.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@86890 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
42ad3286352d29b8fc7bd8039aeeac55569edbe7 | testing/testCetTestSIP/set_ldpath.cc | testing/testCetTestSIP/set_ldpath.cc | #include <cstdlib>
#include <iostream>
int main() {
#ifdef __APPLE__
const char* name = "DYLD_LIBRARY_PATH";
#else
const char* name = "LD_LIBRARY_PATH";
#endif
const char* cetLDPathValue = getenv("CETD_LIBRARY_PATH");
int res = setenv("DYLD_LIBRARY_PATH", cetLDPathValue, 1);
const char* localLDPathValue = ... | #include <cstdlib>
#include <string.h>
#include <iostream>
int main() {
#ifdef __APPLE__
const char* name = "DYLD_LIBRARY_PATH";
#else
const char* name = "LD_LIBRARY_PATH";
#endif
const char* cetLDPathValue = getenv("CETD_LIBRARY_PATH");
int res = setenv("DYLD_LIBRARY_PATH", cetLDPathValue, 1);
const char*... | Add missing header on Linux | Add missing header on Linux
| C++ | bsd-3-clause | drbenmorgan/cetbuildtools2,drbenmorgan/cetbuildtools2,drbenmorgan/cetbuildtools2 |
3105902e8c7c038f42fc18c2d22b7e76d8dec4e3 | src/GeometryObject.cpp | src/GeometryObject.cpp | #include "GeometryObject.h"
GeometryObject::GeometryObject() {
}
GeometryObject::GeometryObject(const std::vector<Point3D>& vertices, const std::vector<uint8_t>& indices)
: m_vertices(vertices), m_indices(indices){
}
GeometryObject::~GeometryObject() {
}
const std::vector<Triangle3D> GeometryObject::tessella... | #include "GeometryObject.h"
GeometryObject::GeometryObject() {
m_color = RGBColor(1, 0, 0);
}
GeometryObject::GeometryObject(const std::vector<Point3D>& vertices, const std::vector<uint8_t>& indices)
: m_vertices(vertices), m_indices(indices){
m_color = RGBColor(1, 0, 0);
}
GeometryObject::~GeometryObject() {... | Initialize object color to red for testing purposes | Initialize object color to red for testing purposes
| C++ | mit | mtrebi/Rasterizer,mtrebi/Rasterizer |
02c57084261f58d202b4a794b1a7d6e44bd08247 | chrome/browser/banners/app_banner_manager_desktop.cc | chrome/browser/banners/app_banner_manager_desktop.cc | // Copyright 2015 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/banners/app_banner_manager_desktop.h"
#include "base/command_line.h"
#include "chrome/browser/banners/app_banner_data_fetcher_de... | // Copyright 2015 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/banners/app_banner_manager_desktop.h"
#include "base/command_line.h"
#include "chrome/browser/banners/app_banner_data_fetcher_de... | Disable app banners on ChromeOS. | Disable app banners on ChromeOS.
This feature has not passed launch review for M45.
BUG=491001,525871
R=benwells@chromium.org
Review URL: https://codereview.chromium.org/1321723003 .
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#346052}
| C++ | bsd-3-clause | CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltil... |
d4cf9e22ccdaeb0071208f0a1563ff58bc0254db | modules/features2d/perf/perf_fast.cpp | modules/features2d/perf/perf_fast.cpp | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using std::tr1::make_tuple;
using std::tr1::get;
typedef perf::TestBaseWithParam<std::string> fast;
#define FAST_IMAGES \
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"stitching/a3.png"
PERF... | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using std::tr1::make_tuple;
using std::tr1::get;
enum { TYPE_5_8 =FastFeatureDetector::TYPE_5_8, TYPE_7_12 = FastFeatureDetector::TYPE_7_12, TYPE_9_16 = FastFeatureDetector::TYPE_9_16 };
CV_ENUM(FastType, TYPE_5_8, TYPE_7_12, T... | Fix terrible perf test for FAST detector | Fix terrible perf test for FAST detector
| C++ | apache-2.0 | opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv |
b747bf545f7c7f1139a4e646578f28b43cbbe1db | main.cpp | main.cpp | int main()
{
}
| #include <iostream>
#include <memory>
#include <utility>
#include "parse/Parse.hpp"
using namespace parse;
using std::cout;
class TreePrinter : public tree::TermVisitor
{
public:
virtual void acceptTerm(const tree::Abstraction& term) override
{
cout << "(^";
for (const std::string& arg : te... | Test tree and try printing it | Test tree and try printing it
| C++ | mit | chbaker0/lambda |
ec6bc5a80fb20166ccc163567ee9e8c0d57d4e15 | src/windows/ConsoleWindow.cpp | src/windows/ConsoleWindow.cpp | /* BZWorkbench
* Copyright (c) 1993 - 2008 Tim Riker
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the license found in the file
* named COPYING that should have accompanied this file.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED... | /* BZWorkbench
* Copyright (c) 1993 - 2008 Tim Riker
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the license found in the file
* named COPYING that should have accompanied this file.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED... | Include stdio.h for printf() declaration. | Include stdio.h for printf() declaration.
git-svn-id: 7c9ea37791cd259b24cbb3dc83a0e12673e3c8a9@20729 08b3d480-bf2c-0410-a26f-811ee3361c24
| C++ | lgpl-2.1 | BZFlag-Dev/bzworkbench,BZFlag-Dev/bzworkbench,BZFlag-Dev/bzworkbench |
b4868da668898d53a66087af776b295fea2f2731 | test/cts/device_feature_test_cts.cc | test/cts/device_feature_test_cts.cc | /*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | /*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Increase core count for PerfettoDeviceFeatureTest | Increase core count for PerfettoDeviceFeatureTest
Increase core count limit for CtsPerfettoTestCases
PerfettoDeviceFeatureTest#TestMaxCpusForAtraceChmod to support
future devices with more cores
Bug: b/203651019
Test: atest CtsPerfettoTestCases
CQ-DEPEND: CL:1867150
Change-Id: I2246d9ef10e553df3f9d12ccde78d8009f3fd7... | C++ | apache-2.0 | google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto |
3d454a594d06e5df63ff64598361a998f2e49616 | c_src/queuemanager.cc | c_src/queuemanager.cc | #include "queuemanager.h"
#include "rdkafka.h"
QueueManager::QueueManager(rd_kafka_t *rk) : rk_(rk)
{
}
QueueManager::~QueueManager()
{
ASSERT(queues_.empty());
}
void QueueManager::add(rd_kafka_queue_t* queue)
{
CritScope ss(&crt_);
ASSERT(queues_.find(queue) == queues_.end());
//remove the queue ... | #include "queuemanager.h"
#include "rdkafka.h"
QueueManager::QueueManager(rd_kafka_t *rk) : rk_(rk)
{
}
QueueManager::~QueueManager()
{
ASSERT(queues_.empty());
}
void QueueManager::add(rd_kafka_queue_t* queue)
{
CritScope ss(&crt_);
ASSERT(queues_.find(queue) == queues_.end());
//remove the queue ... | Fix memory leak found in xcode instruments | Fix memory leak found in xcode instruments
| C++ | mit | silviucpp/erlkaf,silviucpp/erlkaf,silviucpp/erlkaf |
de0a057f04ce5354196b997bcf92085ea60461f0 | 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 | mrobinson/skia,Cue/skia,mrobinson/skia,mrobinson/skia,Cue/skia,metajack/skia,metajack/skia,mrobinson/skia,metajack/skia,Cue/skia,metajack/skia,Cue/skia,mrobinson/skia |
06cfe2efd63d9f70768aeaca1e22bc51508e07b7 | test/unique-types/main.cpp | test/unique-types/main.cpp | #include <vector>
#include <stdio.h>
#include <stdint.h>
int main (int argc, char const *argv[], char const *envp[])
{
std::vector<int> ints;
std::vector<short> shorts;
for (int i=0; i<12; i++)
{
ints.push_back(i);
shorts.push_back((short)i);
}
return 0;
}
| #include <vector>
#include <stdio.h>
#include <stdint.h>
int main (int argc, char const *argv[], char const *envp[])
{
std::vector<long> longs;
std::vector<short> shorts;
for (int i=0; i<12; i++)
{
longs.push_back(i);
shorts.push_back(i);
}
return 0;
}
| Make the first vector of "long" instead of "int" so we can tell the difference easier since "short" ends up with "short int" in the template allocators. | Make the first vector of "long" instead of "int" so we can tell the difference
easier since "short" ends up with "short int" in the template allocators.
git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@127661 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb |
0aa5dc1629e4659cb4afc656bc807f322500129e | plugin/cargoproject.cpp | plugin/cargoproject.cpp | #include "cargoproject.h"
#include "cargoprojectnode.h"
#include "utils/fileutils.h"
#include "cargoprojectmanager.h"
#include "cargoprojectfile.h"
using namespace Rust;
CargoProject::CargoProject(CargoProjectManager* projectManager, QString projectFileName)
: projectManager_(projectManager),
pr... | #include "cargoproject.h"
#include "cargoprojectnode.h"
#include "utils/fileutils.h"
#include "cargoprojectmanager.h"
#include "cargoprojectfile.h"
using namespace Rust;
CargoProject::CargoProject(CargoProjectManager* projectManager, QString projectFileName)
: projectManager_(projectManager),
pr... | Change project name to the name of the Cargo.toml's parent dir | Change project name to the name of the Cargo.toml's parent dir
| C++ | mit | BProg/Rusty-Creator |
1a5493cce5e80bdf4d00d4edecc059df0a972cd3 | chrome/browser/net/async_dns_field_trial.cc | chrome/browser/net/async_dns_field_trial.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/browser/net/async_dns_field_trial.h"
#include "base/metrics/field_trial.h"
#include "build/build_config.h"
#include "chrome/common/c... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/net/async_dns_field_trial.h"
#include "base/metrics/field_trial.h"
#include "build/build_config.h"
#include "chrome/common/c... | Enable async DNS field trial on CrOS (canary+dev channels). | [net] Enable async DNS field trial on CrOS (canary+dev channels).
BUG=143454
Review URL: https://chromiumcodereview.appspot.com/10945041
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@157744 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,dednal/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,dednal/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,ondra-novak/chromium.src,nacl-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.