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 |
|---|---|---|---|---|---|---|---|---|---|
8020efd626e718afae2bd896434d2363128797c3 | demo/io_demo.cpp | demo/io_demo.cpp | // Written by : Chirantan Mitra
#include <matrix.h>
#include <cmath>
class testFunctionoid
{
public:
double operator() (double x, double y)
{
return (sin(x * y) + 1.0) / 2.0;
}
};
using namespace CMatrix;
int main()
{
int size = 5;
Matrix<double> matrix(size, siz... | // Written by : Chirantan Mitra
#include <matrix.h>
#include <cmath>
class testFunctionoid
{
public:
double operator() (double x, double y)
{
return (sin(x * y) + 1.0) / 2.0;
}
};
using namespace CMatrix;
int main()
{
int size = 5;
Matrix<double> matrix(size, siz... | Use correct API for fillByPosition() | Use correct API for fillByPosition()
| C++ | mit | chiku/cmatrix |
1d47b3920e9060ce2ce7010bf793cb82f79e1e53 | src/utils.cpp | src/utils.cpp | // Copyright 2015 Alessio Sclocco <alessio@sclocco.eu>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applic... | // Copyright 2015 Alessio Sclocco <alessio@sclocco.eu>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applic... | Use auto to avoid repeat the type twice. | Use auto to avoid repeat the type twice.
| C++ | apache-2.0 | isazi/utils |
7e227597175457b3adb9b9a7f94f30aeca787938 | test/Modules/var-templates.cpp | test/Modules/var-templates.cpp | // RUN: %clang_cc1 -fmodules -std=c++14 -emit-llvm %s -o - -triple %itanium_abi_triple | FileCheck %s
#pragma clang module build A
module A {}
#pragma clang module contents
#pragma clang module begin A
template<int> int n = 42;
decltype(n<0>) f();
#pragma clang module end
#pragma clang module endbuild
#pragma clang m... | // RUN: %clang_cc1 -fmodules -std=c++14 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
#pragma clang module build A
module A {}
#pragma clang module contents
#pragma clang module begin A
template<int> int n = 42;
decltype(n<0>) f();
#pragma clang module end
#pragma clang module endbuild
#pragma clang modu... | Use an even more precise triple to avoid errors on Darwin, where we don't use comdats for inline entities. | Use an even more precise triple to avoid errors on Darwin, where we don't use comdats for inline entities.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@319835 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,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,apple/swift-cl... |
6f94b1eea8e8badf309b958550aba853a5b7cfd8 | Examples/Plugins/org.mitk.example.gui.customviewer/documentation/doxygen/code_snippets/MinimalApplicationSnippet.cpp | Examples/Plugins/org.mitk.example.gui.customviewer/documentation/doxygen/code_snippets/MinimalApplicationSnippet.cpp | /*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
=================... | /*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
=================... | Remove undeclared symbols in snippet | Remove undeclared symbols in snippet
| C++ | bsd-3-clause | MITK/MITK,MITK/MITK,MITK/MITK,MITK/MITK,MITK/MITK,MITK/MITK |
a953a5f1834d89124c3381389cdb5e1c24155f45 | test/tools/lldb-gdbserver/main.cpp | test/tools/lldb-gdbserver/main.cpp | #include <cstdlib>
#include <cstring>
#include <iostream>
#include <unistd.h>
static const char *const RETVAL_PREFIX = "retval:";
static const char *const SLEEP_PREFIX = "sleep:";
static const char *const STDERR_PREFIX = "stderr:";
int main (int argc, char **argv)
{
int return_value = 0;
for (int i = 1; i <... | #include <cstdlib>
#include <cstring>
#include <iostream>
#include <unistd.h>
static const char *const RETVAL_PREFIX = "retval:";
static const char *const SLEEP_PREFIX = "sleep:";
static const char *const STDERR_PREFIX = "stderr:";
int main (int argc, char **argv)
{
int return_value = 0;
for (int i = 1; i <... | Fix up TestLldbGdbServer C++ test slug exe. | Fix up TestLldbGdbServer C++ test slug exe.
Missing header for Linux, replaces with iostreams.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@208794 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb |
2ffa37d07dac2559059bcbd2c106f5bc0eb328bc | xchainer/native_device_test.cc | xchainer/native_device_test.cc | #include "xchainer/native_device.h"
#include <gtest/gtest.h>
#include "xchainer/native_backend.h"
namespace xchainer {
namespace {
TEST(NativeDeviceTest, Ctor) {
NativeBackend backend;
{
NativeDevice device{backend, 0};
EXPECT_EQ(&backend, &deivce.backend());
EXPECT_EQ(0, device.ind... | #include "xchainer/native_device.h"
#include <gtest/gtest.h>
#include "xchainer/native_backend.h"
namespace xchainer {
namespace {
TEST(NativeDeviceTest, Ctor) {
NativeBackend backend;
{
NativeDevice device{backend, 0};
EXPECT_EQ(&backend, &deivce.backend());
EXPECT_EQ(0, device.ind... | Add allocation test for native_device (check ptr is not null) | Add allocation test for native_device (check ptr is not null)
| C++ | mit | ktnyt/chainer,keisuke-umezawa/chainer,wkentaro/chainer,keisuke-umezawa/chainer,wkentaro/chainer,tkerola/chainer,wkentaro/chainer,keisuke-umezawa/chainer,jnishi/chainer,chainer/chainer,okuta/chainer,wkentaro/chainer,niboshi/chainer,pfnet/chainer,jnishi/chainer,hvy/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,nib... |
96143db1fbd41c56df88d974e7a50d2036edb2e1 | Sources/Rosetta/Enchants/Enchants.cpp | Sources/Rosetta/Enchants/Enchants.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/Cards/Cards.hpp>
#include <Rosetta/Enchants/Effects.... | // 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/Cards/Cards.hpp>
#include <Rosetta/Enchants/Effects.... | Add code to attack/health regex and parse it | feat(card-impl): Add code to attack/health regex and parse it
| C++ | mit | Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp |
1e86ace32ab277a6c784764ac0bb010a0d2f5258 | Magick++/fuzz/encoder_list.cc | Magick++/fuzz/encoder_list.cc | #include <iostream>
#include <Magick++/Blob.h>
#include <Magick++/Image.h>
extern "C" int main() {
size_t nFormats;
Magick::ExceptionInfo ex;
const Magick::MagickInfo **formats = GetMagickInfoList("*", &nFormats, &ex);
for (size_t i = 0; i < nFormats; i++) {
const Magick::MagickInfo *format = formats[i];... | #include <iostream>
#include <list>
#include <Magick++/Image.h>
#include <Magick++/STL.h>
int main() {
std::list<Magick::CoderInfo> coderList;
coderInfoList(&coderList, Magick::CoderInfo::TrueMatch, Magick::CoderInfo::AnyMatch, Magick::CoderInfo::AnyMatch);
for (std::list<Magick::CoderInfo>::iterator it = code... | Use `coderInfoList` and prepare for a `writable` flag | Use `coderInfoList` and prepare for a `writable` flag
| C++ | apache-2.0 | Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick |
e9d09e90e4f98646c5283a78d7a9c55c2f2724d2 | chrome/browser/ui/cocoa/last_active_browser_cocoa.cc | chrome/browser/ui/cocoa/last_active_browser_cocoa.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/ui/cocoa/last_active_browser_cocoa.h"
#include "chrome/browser/ui/browser_list.h"
namespace chrome {
Browser* GetLastActiv... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h"
#include "chrome/browser/ui/browser_finder.h"
namespace chrome {
Browser* GetLastAct... | Remove BrowserList::GetLastActive usage in cocoa-land. | Remove BrowserList::GetLastActive usage in cocoa-land.
BUG=129187
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11369111
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@166398 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,dednal/chromium.src,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,ondra-novak/chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromiu... |
362f35be2202a487406b6e110fb03eae91fdc14d | src/keytar_mac.cc | src/keytar_mac.cc | #include "keytar.h"
#include <Security/Security.h>
namespace keytar {
bool AddPassword(const std::string& service,
const std::string& account,
const std::string& password) {
OSStatus status = SecKeychainAddGenericPassword(NULL,
ser... | #include "keytar.h"
#include <Security/Security.h>
namespace keytar {
bool AddPassword(const std::string& service,
const std::string& account,
const std::string& password) {
OSStatus status = SecKeychainAddGenericPassword(NULL,
ser... | Fix build on OS X. | :lipstick: Fix build on OS X.
| C++ | mit | eHealthAfrica/node-keytar,ehealthafrica-ci/node-keytar,adelcambre/node-keytar,atom/node-keytar,thesbros/node-keytar,ehealthafrica-ci/node-keytar,thesbros/node-keytar,xeno-io/keytar,adelcambre/node-keytar,thesbros/node-keytar,eHealthAfrica/node-keytar,havoc-io/keytar,xeno-io/keytar,adelcambre/node-keytar,eHealthAfrica/n... |
076d9e67fffdf3ff376b2f55cae9221c8da1e878 | excercise04/sort/bubble.cpp | excercise04/sort/bubble.cpp | #include "bubble.hpp"
#include "swap.hpp"
void bubble(int *data, const int size_of_data)
{
if(size_of_data <= 0) return;
for(int i = 0; i < size_of_data; ++i)
if(data[i] > data[i + 1]) swap(data[i], data[i + 1]);
return bubble(data, size_of_data - 1);
}
| #include "bubble.hpp"
#include "swap.hpp"
void bubble(int *data, const int size_of_data)
{
if(size_of_data <= 0) return;
for(int i = 0; i + 1 < size_of_data; ++i)
if(data[i] > data[i + 1]) swap(data[i], data[i + 1]);
return bubble(data, size_of_data - 1);
}
| Fix the loop expr of Bubble sort | Fix the loop expr of Bubble sort
| C++ | mit | kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016 |
da228ef560bbb2a18148da2ecf549e8d1be51d91 | test/C++Frontend/2003-08-21-EmptyClass.cpp | test/C++Frontend/2003-08-21-EmptyClass.cpp | // This tests compilation of EMPTY_CLASS_EXPR's
struct empty {};
void foo(empty E);
void bar() { foo(empty()); }
| // This tests compilation of EMPTY_CLASS_EXPR's
struct empty {};
void foo(empty) {}
void bar() { foo(empty()); }
| Remove name, add body. Causes llvmg++ segfault! | Remove name, add body. Causes llvmg++ segfault!
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@8045 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,... |
a16a9eab4fa7da5bd741e1b4dbc5315768dec6ad | src/OSSupport/StackTrace.cpp | src/OSSupport/StackTrace.cpp |
// StackTrace.cpp
// Implements the functions to print current stack traces
#include "Globals.h"
#include "StackTrace.h"
#ifdef _WIN32
#include "../StackWalker.h"
#else
#include <execinfo.h>
#include <unistd.h>
#endif
// FreeBSD uses size_t for the return type of backtrace()
#if defined(__FreeBSD__) && (__FreeBS... |
// StackTrace.cpp
// Implements the functions to print current stack traces
#include "Globals.h"
#include "StackTrace.h"
#ifdef _WIN32
#include "../StackWalker.h"
#else
#include <execinfo.h>
#include <unistd.h>
#endif
// FreeBSD uses size_t for the return type of backtrace()
#if defined(__FreeBSD__) && (__FreeBS... | Define stacktrace functions only if __GLIBC__ is defined | Define stacktrace functions only if __GLIBC__ is defined
| C++ | apache-2.0 | birkett/cuberite,johnsoch/cuberite,marvinkopf/cuberite,birkett/MCServer,mc-server/MCServer,QUSpilPrgm/cuberite,Schwertspize/cuberite,marvinkopf/cuberite,nounoursheureux/MCServer,marvinkopf/cuberite,Altenius/cuberite,birkett/MCServer,nounoursheureux/MCServer,Fighter19/cuberite,Altenius/cuberite,mc-server/MCServer,kevinr... |
0bb6d9499b42be340d03106dd1360cb505625059 | projects/OG-Language/ServiceTest/stdafx.cpp | projects/OG-Language/ServiceTest/stdafx.cpp | /**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
CAbstractTest::Main (argc, argv);
return 0;
}
#endif /* ifndef __cplusplus_cli */
| /**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#include "Service/Service.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
if ((argc == 3) && !strcmp (argv[1], "jvm")) {
return ServiceTestJVM ... | Verify JVM libraries found in the filesystem as being 1.7 or higher during tests. | [PLAT-3017] Verify JVM libraries found in the filesystem as being 1.7 or higher during tests.
| C++ | apache-2.0 | ChinaQuants/OG-Platform,jeorme/OG-Platform,codeaudit/OG-Platform,DevStreet/FinanceAnalytics,DevStreet/FinanceAnalytics,nssales/OG-Platform,nssales/OG-Platform,jeorme/OG-Platform,ChinaQuants/OG-Platform,nssales/OG-Platform,jeorme/OG-Platform,jerome79/OG-Platform,jerome79/OG-Platform,codeaudit/OG-Platform,jeorme/OG-Platf... |
1244d724835b35e2a622271f05f6e025acb88d70 | src/modes/metal/registration.cpp | src/modes/metal/registration.cpp | #include <occa/defines.hpp>
#include <occa/modes/metal/registration.hpp>
namespace occa {
namespace metal {
modeInfo::modeInfo() {}
bool modeInfo::init() {
return OCCA_METAL_ENABLED;
}
styling::section& modeInfo::getDescription() {
static styling::section section("Metal");
if (sec... | #include <occa/defines.hpp>
#include <occa/modes/metal/registration.hpp>
namespace occa {
namespace metal {
modeInfo::modeInfo() {}
bool modeInfo::init() {
#if OCCA_METAL_ENABLED
// Only consider metal enabled if there is a device
return api::metal::getDeviceCount();
#else
return false;
#e... | Check device count before claiming to be enabled | [Metal] Check device count before claiming to be enabled
| C++ | mit | libocca/occa,libocca/occa,libocca/occa,libocca/occa |
79c6d239635d659b7d51f34bff27f3d3a1af9e16 | src/rdb_protocol/configured_limits.cc | src/rdb_protocol/configured_limits.cc | #include "rdb_protocol/configured_limits.hpp"
#include <limits>
#include "rdb_protocol/wire_func.hpp"
#include "rdb_protocol/func.hpp"
namespace ql {
configured_limits_t
from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments)
{
if (arguments->has_optarg("array_limit")) {
// Fak... | #include "rdb_protocol/configured_limits.hpp"
#include <limits>
#include "rdb_protocol/wire_func.hpp"
#include "rdb_protocol/func.hpp"
namespace ql {
configured_limits_t
from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments)
{
if (arguments->has_optarg("array_limit")) {
// Fak... | Use PRIi64 macro to work around clang weirdness. | Use PRIi64 macro to work around clang weirdness.
| C++ | agpl-3.0 | bpradipt/rethinkdb,gavioto/rethinkdb,greyhwndz/rethinkdb,JackieXie168/rethinkdb,jesseditson/rethinkdb,jmptrader/rethinkdb,catroot/rethinkdb,JackieXie168/rethinkdb,gavioto/rethinkdb,AntouanK/rethinkdb,wkennington/rethinkdb,mcanthony/rethinkdb,bchavez/rethinkdb,jmptrader/rethinkdb,losywee/rethinkdb,AntouanK/rethinkdb,pap... |
cc5bbe09569d159a53b019b9cb6ed77d88bf6a72 | net/http/http_auth_handler_basic_unittest.cc | net/http/http_auth_handler_basic_unittest.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 "testing/gtest/include/gtest/gtest.h"
#include "base/basictypes.h"
#include "net/http/http_auth_handler_basic.h"
namespace net {
TEST... | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/gtest/include/gtest/gtest.h"
#include "base/basictypes.h"
#include "net/http/http_auth_handler_basic.h"
namespace net {
TEST... | Add an HTTP basic auth unit test for an empty username. | Add an HTTP basic auth unit test for an empty username.
R=eroman
BUG=297
Review URL: http://codereview.chromium.org/8859
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@4109 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | adobe/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of... |
ebfa9a9ddb3ebbf234d5ac216fca4c0b164e9985 | src/main/display/Screen.cpp | src/main/display/Screen.cpp | #include <stdint.h>
#include <ncurses.h>
#include "display/Screen.h"
Screen::Screen()
{
//Initialized the screen
initscr();
//Start with a clean slate
clear();
//Don't echo entered characters on the screen
noecho();
//Hide the cursor
curs_set(false);
//Refresh the screen (to our blank state)
/// @todo Why... | #include <stdint.h>
#include <ncurses.h>
#include "display/Screen.h"
Screen::Screen()
{
//Initialized the screen
initscr();
//Start with a clean slate
clear();
//Don't echo entered characters on the screen
noecho();
//Enable getting function keys
keypad(stdscr, true);
//Hide the cursor
curs_set(false);
/... | Enable function keys in ncurses mode. | Enable function keys in ncurses mode.
This required simply a call to keypad(), and now the full range of keyboard keys becomes available to the game.
| C++ | mit | Kromey/roglick |
a502533f273976ada75808201734b22a06508c12 | src/hpp-corbaserver.cc | src/hpp-corbaserver.cc | // Copyright (C) 2009, 2010 by Florent Lamiraux, Thomas Moulard, JRL.
//
// This file is part of the hpp-corbaserver.
//
// This software is provided "as is" without warranty of any kind,
// either expressed or implied, including but not limited to the
// implied warranties of fitness for a particular purpose.
//
// Se... | // Copyright (C) 2009, 2010 by Florent Lamiraux, Thomas Moulard, JRL.
//
// This file is part of the hpp-corbaserver.
//
// This software is provided "as is" without warranty of any kind,
// either expressed or implied, including but not limited to the
// implied warranties of fitness for a particular purpose.
//
// Se... | Create ProblemSolver instance with method create. | Create ProblemSolver instance with method create.
| C++ | bsd-2-clause | humanoid-path-planner/hpp-corbaserver,humanoid-path-planner/hpp-corbaserver |
06dbe9a68cf09213e1b63fecf8a91fe386508c63 | src/engine/dyn_engine/dyn_engine.cpp | src/engine/dyn_engine/dyn_engine.cpp | /**
* Dynamically Loaded Engine
* (C) 2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#include <botan/dyn_engine.h>
#include <botan/internal/dyn_load.h>
namespace Botan {
namespace {
extern "C" {
typedef Engine* (*creator_function)(void);
typedef void (*destructor_function)(Engine*);
}... | /**
* Dynamically Loaded Engine
* (C) 2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#include <botan/dyn_engine.h>
#include <botan/internal/dyn_load.h>
namespace Botan {
namespace {
extern "C" {
typedef Engine* (*creator_function)(void);
typedef void (*destructor_function)(Engine*);
... | Add a version info function which returns a u32bit. The currently expected value is 20100728 (ie, today). This will allow for checking for and/or working around changes to interfaces. | Add a version info function which returns a u32bit. The currently
expected value is 20100728 (ie, today). This will allow for checking
for and/or working around changes to interfaces.
| C++ | bsd-2-clause | randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/... |
24f2ac23ead3707b28a494afc5f55ed50bbfccaf | folly/test/CpuIdTest.cpp | folly/test/CpuIdTest.cpp | /*
* Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | /*
* Copyright 2017-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | Update cpuid test to expect failure on non intel cpu | Update cpuid test to expect failure on non intel cpu
Summary: Found that testing would fail on aarch64 since mmx is an Intel thing. Changed it to just check for x64.
Reviewed By: yfeldblum
Differential Revision: D6670050
fbshipit-source-id: 6ce4b45bb5ef02d65305636d6ac28be7631ddf1b
| C++ | apache-2.0 | rklabs/folly,rklabs/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly,rklabs/folly,rklabs/folly,rklabs/folly |
036a3840cf7ad5eb72e2b827052ed9c67980eca9 | chrome/browser/extensions/extension_storage_apitest.cc | chrome/browser/extensions/extension_storage_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"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Storage) {
ASSERT_TRUE(RunExtensionTest("storage"... | // 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"
// Started failing with r29947. WebKit merge 49961:49992.
IN_PROC_BROWSER_TEST_F(DISABLED_Ex... | Disable test failing since r29947. | Disable test failing since r29947.
TBR=tony@chromium.org
Review URL: http://codereview.chromium.org/338006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@29966 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | axinging/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,ondra-nov... |
61ecdab3120486020e3853e7ae4573994868e973 | 3RVX/Slider/VolumeSlider.cpp | 3RVX/Slider/VolumeSlider.cpp | #include "VolumeSlider.h"
#include "..\Controllers\Volume\CoreAudio.h"
#include "..\Error.h"
#include "..\Settings.h"
#include "..\Skin.h"
#include "SliderKnob.h"
VolumeSlider::VolumeSlider(CoreAudio &volumeCtrl) :
SliderWnd(L"3RVX-VolumeSlider", L"3RVX Volume Slider"),
_settings(*Settings::Instance()),
_volumeCtrl(v... | #include "VolumeSlider.h"
#include "..\Controllers\Volume\CoreAudio.h"
#include "..\Error.h"
#include "..\Settings.h"
#include "..\Skin.h"
#include "SliderKnob.h"
VolumeSlider::VolumeSlider(CoreAudio &volumeCtrl) :
SliderWnd(L"3RVX-VolumeSlider", L"3RVX Volume Slider"),
_settings(*Settings::Instance()),
_volumeCtrl(v... | Apply glass to volume slider | Apply glass to volume slider
| C++ | bsd-2-clause | malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX |
fa0bf2e55b9d9be4674eda1ea799016a49d3ec84 | tests/leak_test.cc | tests/leak_test.cc | #include <gtest/gtest.h>
/**
* A test case that leaks memory, to check that we can spot this in valgrind
*/
TEST(Leak, ThisTestLeaks) { EXPECT_TRUE(new int[45]); }
#ifndef __NO_MAIN__
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
#endif | #include <gtest/gtest.h>
/**
* A test case that leaks memory, to check that we can spot this in valgrind
*/
TEST(Leak, ThisTestLeaks) {
int* temp = new int[45];
int temp2 = *temp++;
std::cout << temp2;
}
#ifndef __NO_MAIN__
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return R... | Fix the leak test (so that it keeps leaking). | Fix the leak test (so that it keeps leaking).
It appears that gcc 9 fixes the leak automatically, so valgrind doesn't
detect it. Now we actually use the leaky variable, which seems to do the
trick.
Signed-off-by: Patrick Vacek <a38520cbbe2e974bc8b7ea86877dd3c7115ca2d7@gmail.com>
| C++ | mpl-2.0 | advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/aktualizr |
b7791efd5dad228e5d8ddcdef7735dc33b63cf28 | examples/Avahi/main.cpp | examples/Avahi/main.cpp | #include <avahi-client/client.h>
#include <dns_sd.h>
int main(int argc, char** argv) {
}
| #include <avahi-client/client.h>
#include <avahi-compat-libdns_sd/dns_sd.h>
int main(int argc, char** argv) {
}
| Fix inclusion path as suggested by @ruslo. | Fix inclusion path as suggested by @ruslo.
| C++ | bsd-2-clause | isaachier/hunter,pretyman/hunter,ErniBrown/hunter,ingenue/hunter,alamaison/hunter,x10mind/hunter,daminetreg/hunter,daminetreg/hunter,ikliashchou/hunter,caseymcc/hunter,ledocc/hunter,xsacha/hunter,vdsrd/hunter,designerror/hunter,xsacha/hunter,ledocc/hunter,zhuhaow/hunter,Knitschi/hunter,headupinclouds/hunter,daminetreg/... |
52a53627330f07d3102a11e2d7da5c23e365ba8f | test/FrontendC++/msasm.cpp | test/FrontendC++/msasm.cpp | // RUN: %llvmgcc %s -fasm-blocks -S -o - | FileCheck %s
// Complicated expression as jump target
// XFAIL: *
// XTARGET: x86,i386,i686
void Method3()
{
// CHECK: Method3
// CHECK-NOT: msasm
asm("foo:");
// CHECK: return
}
void Method4()
{
// CHECK: Method4
// CHECK: msasm
asm {
bar:
}
// CHECK: return
}
| // RUN: %llvmgxx %s -fasm-blocks -S -o - | FileCheck %s
// Complicated expression as jump target
// XFAIL: *
// XTARGET: x86,i386,i686
void Method3()
{
// CHECK: Method3
// CHECK-NOT: msasm
asm("foo:");
// CHECK: return
}
void Method4()
{
// CHECK: Method4
// CHECK: msasm
asm {
bar:
}
// CHECK: return
}
| Use llvmgxx for C++ test. | Use llvmgxx for C++ test.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@84066 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,... |
115071a08e5bb786313b92eeca9afb81d5f43d16 | test/libcxx/diagnostics/nodiscard.pass.cpp | test/libcxx/diagnostics/nodiscard.pass.cpp | // -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===-------------------------... | // -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===-------------------------... | Fix nodiscard test when modules are enabled | Fix nodiscard test when modules are enabled
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@318618 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
5a977d4034502b3c0829e15b53b0890d3d09515a | lib/Target/SparcV9/SparcV9StackSlots.cpp | lib/Target/SparcV9/SparcV9StackSlots.cpp | //===- StackSlots.cpp - Specialize LLVM code for target machine ---------===//
//
// This pass adds 2 empty slots at the top of function stack. These two slots
// are later used during code reoptimization for spilling the register values
// when rewriting branches.
//
//===--------------------------------------------... | //===- StackSlots.cpp - Specialize LLVM code for target machine ---------===//
//
// This pass adds 2 empty slots at the top of function stack. These two slots
// are later used during code reoptimization for spilling the register values
// when rewriting branches.
//
//===--------------------------------------------... | Put class in anonymous namespace | Put class in anonymous namespace
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@5197 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOp... |
cced995b4d1a029cd25959994fde53dfebdfb2bf | gui/src/aboutwindow.cpp | gui/src/aboutwindow.cpp | #include "aboutwindow.h"
#include "ui_aboutwindow.h"
AboutWindow::AboutWindow(const QString &version, QWidget *parent)
: QDialog(parent), ui(new Ui::AboutWindow)
{
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this);
ui->labelCurrent->setText(version);
ui->labelCreator->setText(ui->labelCreator->text().replac... | #include "aboutwindow.h"
#include "ui_aboutwindow.h"
AboutWindow::AboutWindow(const QString &version, QWidget *parent)
: QDialog(parent), ui(new Ui::AboutWindow)
{
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this);
// Set window title according to the current build
QString labelVersion = version;
#ifdef NI... | Add nightly version in about window | Add nightly version in about window
| C++ | apache-2.0 | Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber |
17b8c04f5937a81fef4ea0036a6d99c9fe32b066 | src/Room.cpp | src/Room.cpp | #import <iostream>
class Room {
private:
const int width;
const int height;
public:
Room(){}
Room(int w, int h) {
width = w;
height = h;
}
void print_dimensions();
};
void Room::print_dimensions() {
std::cout << width << "x" << height << std::endl;
}
int main() {
Room a_room... | #import <iostream>
class Room {
private:
const int width;
const int height;
public:
Room(){}
Room(int w, int h) {
width = w;
height = h;
}
void print_dimensions();
bool loadFromXMLFile();
};
void Room::print_dimensions() {
std::cout << width << "x" << height << std::endl;
}
... | Add start of xml parser for room | Add start of xml parser for room
| C++ | mit | Squarific/Project-Arcade,Squarific/Project-Arcade,Squarific/Project-Arcade,Squarific/Project-Arcade,Squarific/Project-Arcade |
756163dbc1c2d1adb9842cd25a2415424237f791 | test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp | test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | Add one more test for optional | Add one more test for optional
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@333252 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
97b6334a62800587c8252216d517b52d1a1d08b1 | test/CodeGenCXX/debug-info-limited.cpp | test/CodeGenCXX/debug-info-limited.cpp | // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A"
// CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}}
class A {
public:
int z;
};
A *foo (A* x) {
A *a = new A(*x);
return a;
}
// CHECK: !DICompositeType(... | // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck --check-prefix=CHECK-C %s
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A"
// CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}}
class A {
pu... | Fix testcase for MSVC targets where the output ordering is different. | Fix testcase for MSVC targets where the output ordering is different.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@266449 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 2785c796d94f1b17157cf4fa9f6f7eda10efc9f6)
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang |
2a92dee217ccf5618e05ca758d2909b3ef71d129 | lib/display/ColorSettings.cpp | lib/display/ColorSettings.cpp | //===-- ColorSettings.cpp - Stylistic Setup for Colors ------------- c++ --===//
//
// UWH Timer
//
// This file is distributed under the BSD 3-Clause License.
// See LICENSE.TXT for details.
//
//===-----------------------------------------------------------... | //===-- ColorSettings.cpp - Stylistic Setup for Colors ------------- c++ --===//
//
// UWH Timer
//
// This file is distributed under the BSD 3-Clause License.
// See LICENSE.TXT for details.
//
//===-----------------------------------------------------------... | Fix the color inversion on the black score | Fix the color inversion on the black score
| C++ | bsd-3-clause | Navisjon/uwh-display,jroelofs/uwh-display,jroelofs/uwh-display,Navisjon/uwh-display,jroelofs/uwh-display,Navisjon/uwh-display,Navisjon/uwh-display |
409f24de4c78b2f7da1ba49cd68520f2f78e453e | YieldEngine.cpp | YieldEngine.cpp | #include <iostream>
void dummy();
int main()
{
dummy();
}
void dummy() {
std::cout<<"Welcome to the yield calculator \n";
}
|
#include <iostream>
#include <map>
using namespace std;
double timeInYears(const string period);
double cashDiscountValue(const string period, double rate);
int main()
{
map<string, double> yields;
// 1) Assignment using array index notation
yields["1W"] = 0.445060000;
yields["1M"] = 0.526890000;
... | Add code to calculate yield for cash instruments | Add code to calculate yield for cash instruments
| C++ | agpl-3.0 | tchirch1/YieldEngine |
e8d80b7dba2329bb4ee2e507bfd6496053df542b | test/Modules/self-referencing-lambda.cpp | test/Modules/self-referencing-lambda.cpp | // RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/self-referencing-lambda %s -verify -emit-obj -o %t2.o
// expected-no-diagnostics
#include "a.h"
| // RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/self-referencing-lambda %s -verify -emit-obj -std=c++14 -o %t2.o
// expected-no-diagnostics
#include "a.h"
| Update test to mention it requires C++14. | [Modules] Update test to mention it requires C++14.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@328283 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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
9eb298249ed3816db4c689275c84b33b36df8d07 | src/labelling/labels.cpp | src/labelling/labels.cpp | #include "./labels.h"
#include <vector>
std::function<void()>
Labels::subscribe(std::function<void(Action action, const Label &)> subscriber)
{
int erasePosition = subscribers.size();
subscribers.push_back(subscriber);
return [this, erasePosition]()
{
subscribers.erase(subscribers.begin() + erasePosition)... | #include "./labels.h"
#include <vector>
std::function<void()>
Labels::subscribe(std::function<void(Action action, const Label &)> subscriber)
{
int erasePosition = subscribers.size();
subscribers.push_back(subscriber);
return [this, erasePosition]()
{
subscribers.erase(subscribers.begin() + erasePosition)... | Fix Labels::getById so that it doesn't insert default labes. | Fix Labels::getById so that it doesn't insert default labes.
This was the case when calling getById with a not existing id.
| C++ | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
09e528c22b49bfc5e047d4a6d9c3c3aee9dd4815 | src/IPOCS/Packets/SetOutputPacket.cpp | src/IPOCS/Packets/SetOutputPacket.cpp | #include "SetOutputPacket.h"
IPOCS::SetOutputPacket::SetOutputPacket()
{
this->RNID_PACKET = 13;
}
IPOCS::Packet* IPOCS::SetOutputPacket::create()
{
return new IPOCS::SetOutputPacket();
}
uint8_t IPOCS::SetOutputPacket::parseSpecific(uint8_t buffer[])
{
this->RQ_OUTPUT_COMMAND = (SetOutputPacket::E_RQ_OUTPUT_C... | #include "SetOutputPacket.h"
IPOCS::SetOutputPacket::SetOutputPacket()
{
this->RNID_PACKET = 13;
}
IPOCS::Packet* IPOCS::SetOutputPacket::create()
{
return new IPOCS::SetOutputPacket();
}
uint8_t IPOCS::SetOutputPacket::parseSpecific(uint8_t buffer[])
{
this->RQ_OUTPUT_COMMAND = (SetOutputPacket::E_RQ_OUTPUT_C... | Fix set order serialization bug | Fix set order serialization bug
| C++ | mit | GMJS/gmjs_ocs,GMJS/gmjs_ocs |
e8db1991251d17986819d6b1023847b66125a6bc | config/main.cpp | config/main.cpp | /* BEGIN_COMMON_COPYRIGHT_HEADER
* (c)LGPL2+
*
* LXDE-Qt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org
*
* Copyright: 2013 Razor team
* Authors:
* Kuzma Shapran <kuzma.shapran@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under the te... | /* BEGIN_COMMON_COPYRIGHT_HEADER
* (c)LGPL2+
*
* LXDE-Qt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org
*
* Copyright: 2013 Razor team
* Authors:
* Kuzma Shapran <kuzma.shapran@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under the te... | Use new LXQt header files. | Use new LXQt header files.
| C++ | lgpl-2.1 | ThomasVie/lxqt-globalkeys,lxde/lxqt-globalkeys,lxde/lxqt-globalkeys,stefonarch/lxqt-globalkeys,stefonarch/lxqt-globalkeys,ThomasVie/lxqt-globalkeys |
bbf817bf12838c59d32f1981fcc51e5bce81a4a1 | src/platform/qt/RotatedHeaderView.cpp | src/platform/qt/RotatedHeaderView.cpp | /* Copyright (c) 2013-2019 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "RotatedHeaderView.h"
#include <QPainter>
using namespace QGB... | /* Copyright (c) 2013-2019 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "RotatedHeaderView.h"
#include <QPainter>
using namespace QGB... | Fix logging config section width | Qt: Fix logging config section width
| C++ | mpl-2.0 | libretro/mgba,libretro/mgba,libretro/mgba,libretro/mgba,libretro/mgba |
e1def04920e2be0dc61ee377a74993fc2447a36a | chromeos/system/devicetype.cc | chromeos/system/devicetype.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 "chromeos/system/devicetype.h"
#include <string>
#include "base/sys_info.h"
namespace chromeos {
namespace {
const char kDeviceType[] = "CHRO... | // 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 "chromeos/system/devicetype.h"
#include <string>
#include "base/sys_info.h"
namespace chromeos {
namespace {
const char kDeviceType[] = "DEVI... | Use the correct lsb key when fetching the CrOS device type. | Use the correct lsb key when fetching the CrOS device type.
This fixes a typo where the wrong key was used. The data is exposed under
a different key.
BUG=341356
Review URL: https://codereview.chromium.org/1220253007
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#337452}
| C++ | bsd-3-clause | CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerB... |
ae71ae652c6ff04452127f48bc49110f3fc72292 | src/tests/test_Functional.cpp | src/tests/test_Functional.cpp | #include "Mocks.hpp"
namespace testing {
enum level : std::uint8_t { debug, info, warn, error };
} // namespace testing
namespace blackhole { namespace sink {
template<>
struct priority_traits<testing::level> {
static inline
priority_t map(testing::level lvl) {
switch (lvl) {
case testing::... | #include "Mocks.hpp"
namespace testing {
enum level : std::uint8_t { debug, info, warn, error };
} // namespace testing
namespace blackhole { namespace sink {
template<>
struct priority_traits<testing::level> {
static inline
priority_t map(testing::level lvl) {
switch (lvl) {
case testing::... | Fix message scope level for functional test. | Fix message scope level for functional test.
| C++ | mit | antmat/blackhole,3Hren/blackhole,antmat/blackhole,noxiouz/blackhole |
0caf11901ed80afe21a08c339efc5b4ae218b1bd | sw/src/devicethread.cpp | sw/src/devicethread.cpp | #include "devicethread.h"
DeviceThread::DeviceThread()
{
exit = false;
}
void DeviceThread::finish()
{
exit = true;
}
DeviceThread::run()
{
int ret;
while(!exit)
{
if(!board.isConnected())
{
ret = board.attachDevice();
if(ret < 0)
{
//Failed to attach
wait(3000);
... | #include "devicethread.h"
DeviceThread::DeviceThread()
{
exit = false;
}
void DeviceThread::finish()
{
exit = true;
}
DeviceThread::run()
{
int ret;
while(!exit)
{
if(!board.isConnected())
{
ret = board.attachDevice();
if(ret < 0)
{
//Failed to attach
wait(3000);
... | Handle get command response parsin | Handle get command response parsin
| C++ | bsd-3-clause | OSCARAdapter/OSCAR,OSCARAdapter/OSCAR |
49648deceee54713441d4fbea6727f629b9249c6 | test/tsan/mmap_large.cc | test/tsan/mmap_large.cc | // RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
#if defined(__FreeBSD__)
// The MAP_NORESERVE define has been removed in FreeBSD 11.x, and even before
// that, it was never implemented. So just define it to zero.
#undef M... | // RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
#if defined(__FreeBSD__)
// The MAP_NORESERVE define has been removed in FreeBSD 11.x, and even before
// that, it was never implemented. So just define it to zero.
#undef M... | Use MAP_ANON instead of MAP_ANONYMOUS | [tsan] Use MAP_ANON instead of MAP_ANONYMOUS
In mmap_large.cc, let's use MAP_ANON instead of MAP_ANONYMOUS, because MAP_ANONYMOUS is only available on OS X 10.11 and later.
Differential Revision: http://reviews.llvm.org/D15180
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@254601 91177308-0d34-0410-b5e6-9623... | C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
dfb7f24b09f730fa678222c67e0deaced827b89b | platforms/stm32f3discovery/pwm_config.cpp | platforms/stm32f3discovery/pwm_config.cpp | #include <hal.h>
#include <pwm_config.hpp>
PWMDriver *pwmPlatformInit(void) {
pwmStart(&PWMD8, &motor_pwm_config);
palSetPadMode(GPIOC, 6, PAL_MODE_ALTERNATE(4));
palSetPadMode(GPIOC, 7, PAL_MODE_ALTERNATE(4));
palSetPadMode(GPIOC, 8, PAL_MODE_ALTERNATE(4));
palSetPadMode(GPIOC, 9, PAL_MODE_ALTERNATE(4));
... | #include <hal.h>
#include <pwm_config.hpp>
PWMDriver *pwmPlatformInit(void) {
pwmStart(&PWMD8, &motor_pwm_config);
palSetPadMode(GPIOC, 6, PAL_MODE_ALTERNATE(4));
palSetPadMode(GPIOC, 7, PAL_MODE_ALTERNATE(4));
palSetPadMode(GPIOC, 8, PAL_MODE_ALTERNATE(4));
palSetPadMode(GPIOC, 9, PAL_MODE_ALTERNATE(4));
... | Use `f` suffix on floating point numbers. | Use `f` suffix on floating point numbers.
| C++ | mit | OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control |
e4807770bd6ec7b312cf7871756f5d81a05721b2 | src/autowiring/test/TupleTest.cpp | src/autowiring/test/TupleTest.cpp | // Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#include "stdafx.h"
#include <autowiring/auto_tuple.h>
#include <string>
class TupleTest:
public testing::Test
{};
TEST_F(TupleTest, CallTest) {
autowiring::tuple<int, int, std::string> t(101, 102, "Hello world!");
ASSERT_EQ(101, autowiring::get... | // Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved.
#include "stdafx.h"
#include <autowiring/auto_tuple.h>
#include <string>
class TupleTest:
public testing::Test
{};
TEST_F(TupleTest, CallTest) {
autowiring::tuple<int, int, std::string> t(101, 102, "Hello world!");
ASSERT_EQ(101, autowiring::get... | Add a test to verify get's return value behavior | Add a test to verify get's return value behavior
This is a pretty critical trait for `autowiring::get` to have, it should be guaranteed via a test.
| C++ | apache-2.0 | leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,codemercenary/autowiring,codemercenary/autowiring,codemercenary/autowiring,codemercenary/autowiring,leapmotion/autowiring,codemercenary/autowiring,codemercenary/autowiring |
ef55de50c1c83559a70bccfe6439c7b8284e2b75 | test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc | test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc | // Tests -fsanitize-coverage=inline-8bit-counters
//
// REQUIRES: has_sancovcc,stable-runtime
// UNSUPPORTED: i386-darwin, x86_64-darwin, x86_64h-darwin
//
// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1
#include <stdio.h>
#include <assert.h>
const char *first_counter;
extern "C"
void __sanitiz... | // Tests -fsanitize-coverage=inline-8bit-counters
//
// REQUIRES: has_sancovcc,stable-runtime
// UNSUPPORTED: i386-darwin
//
// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1
#include <stdio.h>
#include <assert.h>
const char *first_counter;
extern "C"
void __sanitizer_cov_8bit_counters_init(const... | Stop marking this test as unsupported on Darwin | [sanitizer-coverage] Stop marking this test as unsupported on Darwin
The bug that was causing this to fail was fixed in r305429.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@305942 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 |
75c4dda684ecacc0fbdebc0dcf4c79d3c30b3518 | Main.cpp | Main.cpp | // Native C++ Libraries
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
// C++ Interpreter Libraries
#include <Console.h>
#include <Varible.h>
#include <Include.h>
using namespace std;
int main()
{
RESTART:
string input = "";
ConsoleOutCheck(input);
CheckForInt(input);
CheckForIntAfte... | // Native C++ Libraries
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
// C++ Interpreter Libraries
#include <Console.h>
#include <Varible.h>
#include <Include.h>
using namespace std;
int main()
{
cout << "CPP Interpreter v0.1. Here you can type C++ code in the terminal and get instant f... | Add a message on the start of CPP-Interpreter. | Add a message on the start of CPP-Interpreter.
Add a greeting message to show on the beginning of the program. Also add
a current command pointer.
| C++ | mit | Project-CPP/CPP-Interpreter |
d0eba8d313e51d45cbdb028096518cbb08043913 | test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp | test/std/utilities/time/time.traits/time.traits.is_fp/treat_as_floating_point.pass.cpp | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | Fix bad test that was previously getting ifdef-ed away | Fix bad test that was previously getting ifdef-ed away
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@272722 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
11ac3934b1adeda7102fdcc9e715da8c93e9d49b | test/blackbox/0_sizeof_lambdas.cpp | test/blackbox/0_sizeof_lambdas.cpp | // Copyright 2017, Dawid Kurek, <dawikur@gmail.com>
#include "lel.hpp"
#include "gtest/gtest.h"
class sizeof_lambdas_test : public ::testing::Test {
protected:
LeL::Placeholder<'x'> _x;
LeL::Placeholder<'y'> _y;
};
TEST_F(sizeof_lambdas_test, base_placeholder_is_1) {
ASSERT_EQ(1, sizeof(_x));
}
TEST_F(sizeo... | Add tests on sizeof lambdas | Add tests on sizeof lambdas
Most of them are disabled for now; they will be fine to run when
Empty Base Optimization will be implemented
| C++ | mit | dawikur/lel,dawikur/lel,dawikur/lel | |
f195357836e712b85591b22c47e63e327c657ceb | test/CodeGenCXX/virtual-implicit-copy-assignment.cpp | test/CodeGenCXX/virtual-implicit-copy-assignment.cpp | // RUN: clang-cc -emit-llvm -o - %s | FileCheck %s
struct D;
struct B {
virtual D& operator = (const D&);
};
struct D : B { D(); virtual void a(); };
void D::a() {}
// CHECK: @_ZTV1D = {{.*}} @_ZN1DaSERKS_
| // RUN: clang-cc -emit-llvm -o - %s | FileCheck %s
struct D;
struct B {
virtual D& operator = (const D&);
};
struct D : B { D(); virtual void a(); };
void D::a() {}
// CHECK: @_ZTV1D = {{.*}} @_ZN1DaSERKS_
// CHECK: define linkonce_odr {{.*}} @_ZN1DaSERKS_
| Tweak test to check for a bit more. | Tweak test to check for a bit more.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@90302 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
9b0d7caa7159c3ade65cdfc642ab4c20d97d40c4 | test/asan/TestCases/Windows/shadow_mapping_failure.cc | test/asan/TestCases/Windows/shadow_mapping_failure.cc | // RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <stdio.h>
char bigchunk[1 << 30];
int main() {
printf("Hello, world!\n");
scanf("%s", bigchunk);
// CHECK-NOT: Hello, world!
// CHECK: Shadow memory range interleaves with an existing memory mapping.
// CHECK: ASan shadow was su... | // RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: asan-32-bits
#include <stdio.h>
char bigchunk[1 << 30];
int main() {
printf("Hello, world!\n");
scanf("%s", bigchunk);
// CHECK-NOT: Hello, world!
// CHECK: Shadow memory range interleaves with an existing memory mapping.
//... | Disable irrelevant unittest on win64 | [compiler-rt/asan] Disable irrelevant unittest on win64
Summary:
This test is allocating a 1gig chunk to make shadow allocation failed,
but on 64-bits architecture the test is working.
Reviewers: rnk
Subscribers: kubabrecka, llvm-commits, wang0109, chrisha
Differential Revision: https://reviews.llvm.org/D22553
git... | C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
c9608787a82a3c7a091a74e3dcca3c4c85e0ab31 | test/ToJsonWriterTests.cpp | test/ToJsonWriterTests.cpp | #include <UnitTest++.h>
#include "../src/ToJsonWriter.h"
SUITE(ArticleToJsonWriterTests)
{
TEST(WriteArticleWithoutLinks)
{
ToJsonWriter atj;
Article a("Farm");
CHECK_EQUAL("{\"Farm\":[]}", atj.convertToJson(&a));
}
TEST(WriteArticleWithOneLink)
{
ToJsonWriter atj;... | #include <UnitTest++.h>
#include "../src/ToJsonWriter.h"
SUITE(ArticleToJsonWriterTests)
{
TEST(WriteArticleWithoutLinks)
{
ToJsonWriter atj;
Article a("Farm");
CHECK_EQUAL("{\"Farm\":{\"forward_links\":[]}}", atj.convertToJson(&a));
}
TEST(WriteArticleWithOneLink)
{
... | Change requirements for json writer: | Change requirements for json writer:
must not include links as "plain array", but inside another object.
so later, I can add e.g. "reverse links".
| C++ | mit | dueringa/WikiWalker |
b81eaaa1f40d512ebc54b06680bf66afeb4e51bc | chapter24/chapter24_trythis1.cpp | chapter24/chapter24_trythis1.cpp | // Chapter 23, Try This 1: replace 333 in example with 10
#include<iostream>
#include<iomanip>
int main()
{
float x = 1.0/10;
float sum = 0;
for (int i = 0; i<10; ++i) sum += x;
std::cout << std::setprecision(15) << sum << '\n';
} | // Chapter 24, Try This 1: replace 333 in example with 10
#include<iostream>
#include<iomanip>
int main()
{
float x = 1.0/10;
float sum = 0;
for (int i = 0; i<10; ++i) sum += x;
std::cout << std::setprecision(15) << sum << '\n';
} | Correct typo (23 to 24) | Correct typo (23 to 24)
| C++ | mit | bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp |
e0eb6f9851ed15f8ca6252c4995bd8c8ef9f8a49 | src/cli/auxiliary.cpp | src/cli/auxiliary.cpp | /*
* auxiliary.cpp - Auxiliary public functions
*
* Copyright 2010 Jesús Torres <jmtorres@ull.es>
*
* 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... | /*
* auxiliary.cpp - Auxiliary public functions
*
* Copyright 2010 Jesús Torres <jmtorres@ull.es>
*
* 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... | Add null at the of argv when converting from std::vector<std:string> | Add null at the of argv when converting from std::vector<std:string>
| C++ | apache-2.0 | aplatanado/simpleshell |
7cbb7a11ab078932df5bea14ce1db57c24cd78e1 | tools/LsanSuppressions.cpp | tools/LsanSuppressions.cpp | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkTypes.h"
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif
#if __has_feature(address_sanitizer)
extern "C" {
const char* __lsan_default_sup... | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkTypes.h"
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif
#if __has_feature(address_sanitizer)
extern "C" {
const char* __lsan_default_sup... | Add another NVIDIA LSAN suppression. | Add another NVIDIA LSAN suppression.
Change-Id: Ied919cacc0fde26b75a12b469bc4850d6f8a2f40
Reviewed-on: https://skia-review.googlesource.com/c/177804
Auto-Submit: Ben Wagner <3ef7217be91069877d94f7907ce5479000772cd3@google.com>
Commit-Queue: Ben Wagner <3ef7217be91069877d94f7907ce5479000772cd3@google.com>
Commit-Queue:... | C++ | bsd-3-clause | HalCanary/skia-hc,google/skia,google/skia,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,rubenvb/skia,rubenvb/skia,... |
d2e797050141f7b26f6abfa68ce5cbb4758d9a03 | 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 | pasuka/eigen,ROCmSoftwarePlatform/hipeigen,Zefz/eigen,ritsu1228/eigen,toastedcrumpets/eigen,ritsu1228/eigen,ritsu1228/eigen,ritsu1228/eigen,ROCmSoftwarePlatform/hipeigen,ROCmSoftwarePlatform/hipeigen,pasuka/eigen,ROCmSoftwarePlatform/hipeigen,toastedcrumpets/eigen,pasuka/eigen,pasuka/eigen,toastedcrumpets/eigen,ritsu12... |
dbc90714f5d3b759abd1276fe10ad6a75d2be2cc | main.cpp | main.cpp | #include "mainwindow.hpp"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("KShare");
a.setOrganizationName("ArsenArsen");
a.setApplicationVersion("1.0");
MainWindow w;
w.show();
return a.exec();
}
| #include "mainwindow.hpp"
#include <QApplication>
#include <QCommandLineParser>
#include <QDebug>
#include <stdio.h>
bool verbose = false;
void handler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
QByteArray localMsg = msg.toLocal8Bit();
switch (type)
{
case QtDebugMsg:
... | Add command line options. WE GOING 1.0 | Add command line options. WE GOING 1.0
| C++ | mit | ArsenArsen/KShare,ArsenArsen/KShare |
d4a6da5f5d27fa1d3653baaf392b99a0c893b456 | chrome/browser/extensions/extension_get_views_apitest.cc | chrome/browser/extensions/extension_get_views_apitest.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined(TOOLKI... | // 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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
IN_PROC_BROWSER_TE... | Enable ExtensionApiTest.GetViews on all platforms. | Enable ExtensionApiTest.GetViews on all platforms.
BUG=none
TEST=passes everywhere
Review URL: http://codereview.chromium.org/8520013
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@110104 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | yitian134/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/... |
59f101eb496401f64933d27e365346d03ac8c0a8 | src/platform/qt/main.cpp | src/platform/qt/main.cpp | /* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPl... | /* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPl... | Fix Windows build when Qt Multimedia is disabled | Qt: Fix Windows build when Qt Multimedia is disabled
| C++ | mpl-2.0 | iracigt/mgba,sergiobenrocha2/mgba,zerofalcon/mgba,Touched/mgba,MerryMage/mgba,iracigt/mgba,jeremyherbert/mgba,libretro/mgba,MerryMage/mgba,libretro/mgba,fr500/mgba,sergiobenrocha2/mgba,jeremyherbert/mgba,sergiobenrocha2/mgba,iracigt/mgba,libretro/mgba,askotx/mgba,libretro/mgba,zerofalcon/mgba,mgba-emu/mgba,Anty-Lemon/m... |
94c4b1e3b5432d0e7bef3357cb99af11574b6858 | src/Commands/DefaultDrive.cpp | src/Commands/DefaultDrive.cpp | #include "OI.h"
#include "Commands/DefaultDrive.h"
#include "Subsystems/Chassis.h"
#include "Misc/ToggleClass.h"
/// Default constructor of the class.
DefaultDrive::DefaultDrive()
{
Requires(Chassis::GetInstance());
shifterToggle = new Toggle<bool>(false, true);
}
/// Called just before this Command runs the first... | #include "OI.h"
#include "Commands/DefaultDrive.h"
#include "Subsystems/Chassis.h"
#include "Misc/ToggleClass.h"
/// Default constructor of the class.
DefaultDrive::DefaultDrive()
{
Requires(Chassis::GetInstance());
shifterToggle = new Toggle<bool>(false, true);
}
/// Called just before this Command runs the first... | Return to driving on Joysticks | Return to driving on Joysticks
| C++ | mit | team3130/Geneva |
08a69d9cd37655b8c60a60784d3fca31c48e447b | lumina-desktop/panel-plugins/showdesktop/LHomeButton.cpp | lumina-desktop/panel-plugins/showdesktop/LHomeButton.cpp | //===========================================
// Lumina-DE source code
// Copyright (c) 2015, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#include "LHomeButton.h"
#include "../../LSession.h"
#include <LuminaX11.h>
LHo... | //===========================================
// Lumina-DE source code
// Copyright (c) 2015, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#include "LHomeButton.h"
#include "../../LSession.h"
#include <LuminaX11.h>
LHo... | Change the icon for the "showdesktop" plugin to be an image of the desktop (user-desktop) instead of a house. | Change the icon for the "showdesktop" plugin to be an image of the desktop (user-desktop) instead of a house.
| C++ | bsd-3-clause | trueos/lumina,sasongko26/lumina,cpforbes/lumina,cpforbes/lumina,Nanolx/lumina,Nanolx/lumina,sasongko26/lumina,trueos/lumina,Nanolx/lumina,sasongko26/lumina,cpforbes/lumina,trueos/lumina,sasongko26/lumina,trueos/lumina,pcbsd/lumina,trueos/lumina,sasongko26/lumina,sasongko26/lumina,harcobbit/lumina,harcobbit/lumina,pcbsd... |
0087c0814748ca0a934e7044d45823ee3b94df2e | src/tibb/TableView/BasicListItem.cpp | src/tibb/TableView/BasicListItem.cpp | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "BasicListItem.h"
using namespace bb::cascades;
BasicListItem::BasicListIte... | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "BasicListItem.h"
using namespace bb::cascades;
BasicListItem::BasicListIte... | Reset list item image when setting empty URL. | Reset list item image when setting empty URL.
This fixes an issue with empty space appearing
where the left image would go when no image is provided.
| C++ | apache-2.0 | appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry |
35892c521a70fcf75a6f2f001bc983b993675364 | Chapter_01/Exercise_01_21/sum_two_sales_data.cpp | Chapter_01/Exercise_01_21/sum_two_sales_data.cpp | /**
* @file
* sum_two_sales_data.cpp
* @author
* Henrik Samuelsson
*/
#include <iostream>
#include "Sales_item.h"
/**
* @brief
* Reads two sales_item's objects prints the sum.
* @note
* The exercise instructions in the book state that the two objects have
* the same ISBN. It is assu... | /**
* @file
* sum_two_sales_data.cpp
* @author
* Henrik Samuelsson
*/
#include <iostream>
#include "Sales_item.h"
/**
* @brief
* Reads two sales_item's objects and prints the sum.
* @note
* The exercise instructions in the book state that the two objects have
* the same ISBN. It is ... | Edit of comments in 1.21. | Edit of comments in 1.21. | C++ | unlicense | HenrikSamuelsson/C_Plus_Plus_Primer |
e015a96183090b36e664657cbdd93ff2cc2c3521 | ogles_gpgpu/common/proc/blend.cpp | ogles_gpgpu/common/proc/blend.cpp | #include "../common_includes.h"
#include "blend.h"
using namespace ogles_gpgpu;
const char *BlendProc::fshaderBlendSrc = OG_TO_STR
(
#if defined(OGLES_GPGPU_OPENGLES)
precision highp float;
#endif
varying vec2 textureCoordinate;
varying vec2 textureCoordinate2;
uniform sampler2D inputImageTexture;
uniform samp... | #include "../common_includes.h"
#include "blend.h"
using namespace ogles_gpgpu;
const char *BlendProc::fshaderBlendSrc = OG_TO_STR
(
#if defined(OGLES_GPGPU_OPENGLES)
precision highp float;
#endif
varying vec2 textureCoordinate;
varying vec2 textureCoordinate2;
uniform sampler2D inputImageTexture;
uniform samp... | Update filter for newer TwoInptProc::render() mechanism | Update filter for newer TwoInptProc::render() mechanism
Filter previously required tex1 and tex2 to be provided in specific order
| C++ | apache-2.0 | headupinclouds/ogles_gpgpu,hunter-packages/ogles_gpgpu,hunter-packages/ogles_gpgpu,hunter-packages/ogles_gpgpu,headupinclouds/ogles_gpgpu,hunter-packages/ogles_gpgpu,headupinclouds/ogles_gpgpu,headupinclouds/ogles_gpgpu |
a1be84c70a22dc2c076ccf7b22cff94c07840eb9 | server/src/os/windows.cpp | server/src/os/windows.cpp | #include "signal_handlers.h"
#include <cstring>
#include <iostream>
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
namespace keron {
namespace server {
std::atomic_int stop(0);
static BOOL handler(DWORD fdwCtrlType)
{
switch (fdwCtrlType) {
case CTRL_C_EVENT:
case CTRL_CLOSE_EVENT:
std::cout << "The ... | #include "signal_handlers.h"
#include <cstring>
#include <iostream>
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
namespace keron {
namespace server {
std::atomic_int stop(0);
static BOOL handler(DWORD fdwCtrlType)
{
switch (fdwCtrlType) {
case CTRL_C_EVENT:
case CTRL_CLOSE_EVENT:
std::cout << "The ... | Use store instead of "=" for atomic. | Use store instead of "=" for atomic.
| C++ | mit | KeronTeam/Keron,KeronTeam/Keron,KeronTeam/Keron |
0d6e94f763c42b1f5a4b457cb62b1bfbeeb05e57 | crypto/ec_signature_creator_openssl.cc | crypto/ec_signature_creator_openssl.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 "crypto/ec_signature_creator.h"
#include "base/logging.h"
namespace crypto {
// static
ECSignatureCreator* ECSignatureCreator::Create(ECPr... | // 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 "crypto/ec_signature_creator.h"
#include "base/logging.h"
namespace crypto {
// static
ECSignatureCreator* ECSignatureCreator::Create(ECPr... | Remove wrong parameter from ECSignatureCreator's constructor in openssl implement. | Remove wrong parameter from ECSignatureCreator's constructor in openssl implement.
The wrong parameter was unused and broke the linux redux build.
TBR=wtc
BUG=None.
TEST=Linux redux bot should be green.
Review URL: https://chromiumcodereview.appspot.com/9234024
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@11... | C++ | bsd-3-clause | yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,ad... |
39af6423fe192ee2bf8f7de138db2f7bf20d2621 | ppapi/shared_impl/instance_impl.cc | ppapi/shared_impl/instance_impl.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 "ppapi/shared_impl/instance_impl.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_input_event.h"
namespace ppapi {
InstanceImpl::~I... | // 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 "ppapi/shared_impl/instance_impl.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_input_event.h"
namespace ppapi {
InstanceImpl::~I... | Fix return value when unfiltered keyboard events are registered. | Fix return value when unfiltered keyboard events are registered.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7489011
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@93662 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | robclark/chromium,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-cr... |
0b48cc6a103d94ddda575174bf532221272a4509 | modules/ti.Media/gst/gst_media_binding.cpp | modules/ti.Media/gst/gst_media_binding.cpp | /**
* Appcelerator Titanium - licensed under the Apache Public License 2
* see LICENSE in the root folder for details on the license.
* Copyright (c) 2009 Appcelerator, Inc. All Rights Reserved.
*/
#include "gst_media_binding.h"
namespace ti
{
GstMediaBinding::GstMediaBinding(SharedKObject global) : MediaBinding(... | /**
* Appcelerator Titanium - licensed under the Apache Public License 2
* see LICENSE in the root folder for details on the license.
* Copyright (c) 2009 Appcelerator, Inc. All Rights Reserved.
*/
#include "gst_media_binding.h"
namespace ti
{
GstMediaBinding::GstMediaBinding(SharedKObject global) : MediaBinding(... | Fix bug in URL parsing | Fix bug in URL parsing
| C++ | apache-2.0 | wyrover/titanium_desktop,jvkops/titanium_desktop,jvkops/titanium_desktop,jvkops/titanium_desktop,appcelerator/titanium_desktop,appcelerator/titanium_desktop,wyrover/titanium_desktop,jvkops/titanium_desktop,appcelerator/titanium_desktop,wyrover/titanium_desktop,appcelerator/titanium_desktop,wyrover/titanium_desktop,wyro... |
a8b0ea0bbd71a37cfa64c402aa85e29f5cdbea40 | lib/Testing/Support/SupportHelpers.cpp | lib/Testing/Support/SupportHelpers.cpp |
#include "llvm/Testing/Support/SupportHelpers.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "gtest/gtest.h"
using namespace llvm;
using namespace llv... |
#include "llvm/Testing/Support/SupportHelpers.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "gtest/gtest.h"
using namespace llvm;
using namespace llv... | Fix silly error in unittest helper. | Fix silly error in unittest helper.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@341505 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift... |
1f3832e3c342e4da256ad1e2971fb6b921b112ba | src/bindings/javascript/parentedentity.cpp | src/bindings/javascript/parentedentity.cpp |
#include <emscripten/bind.h>
#include "libcellml/parentedentity.h"
using namespace emscripten;
EMSCRIPTEN_BINDINGS(libcellml_parentedentity)
{
class_<libcellml::ParentedEntity, base<libcellml::Entity>>("ParentedEntity")
.smart_ptr<std::shared_ptr<libcellml::ParentedEntity>>("ParentedEntity")
.fu... |
#include <emscripten/bind.h>
#include "libcellml/parentedentity.h"
using namespace emscripten;
EMSCRIPTEN_BINDINGS(libcellml_parentedentity)
{
class_<libcellml::ParentedEntity, base<libcellml::Entity>>("ParentedEntity")
.smart_ptr<std::shared_ptr<libcellml::ParentedEntity>>("ParentedEntity")
.fu... | Remove removeParent from javascript ParentedEntity. | Remove removeParent from javascript ParentedEntity.
| C++ | apache-2.0 | nickerso/libcellml,hsorby/libcellml,nickerso/libcellml,hsorby/libcellml,nickerso/libcellml,cellml/libcellml,hsorby/libcellml,cellml/libcellml,nickerso/libcellml,cellml/libcellml,cellml/libcellml,hsorby/libcellml |
c79066fefd3108803ddbfc8f44f379513767cbdb | 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: de016e52bd170d2d4f2344f9bf92d50478b649e0@19649 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | keishi/chromium,anirudhSK/chromium,ltilve/chromium,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,littlstar/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-cros... |
218110b33cd00864b2f3577a4165540380a4fbb0 | potentate_permutation.cpp | potentate_permutation.cpp | #include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
typedef map< string, vector<string> > Graph;
typedef struct
{
int finish_time;
int visited;
}State;
void dfs(Graph &g, string v, map<string, State*> &state, int &dfs_time)
{
state[v]->visited = 0;
df... | Add the solution to "Potentate Permutation". | Add the solution to "Potentate Permutation".
| C++ | mit | clasnake/hackermeter,clasnake/hackermeter | |
92718373c6507ba535f66521dec280a87f194a96 | test_concurrent.cpp | test_concurrent.cpp | #include <iostream>
#include <execution_policy>
int main()
{
std::async(std::con(10), [](std::concurrent_group &g)
{
std::cout << "agent " << g.child().index() << " arriving at barrier" << std::endl;
g.wait();
std::cout << "departing barrier" << std::endl;
}).wait();
return 0;
}
| Add test for concurrent groups | Add test for concurrent groups
| C++ | bsd-3-clause | egaburov/agency,egaburov/agency | |
65f6642e88ac39f2c1129f9b92b3fafd55dc32df | test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp | test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp | // RUN: clang-cc -fsyntax-only -verify %s
struct NonDefaultConstructible {
NonDefaultConstructible(const NonDefaultConstructible&);
};
template<typename T, typename U>
struct X {
static T member;
};
template<typename T, typename U>
T X<T, U>::member; // expected-error{{no matching constructor}}
// Okay; this is... | Test explicit specializations of static data members that are declarations, not definitions | Test explicit specializations of static data members that are declarations, not definitions
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@83904 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | 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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... | |
e830ca7d0c0eef25e53517ed0f6c623a0fc63c8d | trunk/research/st/huge-threads.cpp | trunk/research/st/huge-threads.cpp | /*
g++ huge-threads.cpp ../../objs/st/libst.a -g -O0 -DLINUX -o huge-threads && ./huge-threads 32756
*/
#include <stdio.h>
#include <stdlib.h>
#include "../../objs/st/st.h"
void* pfn(void* arg) {
char v[32*1024]; // 32KB in stack.
for (;;) {
v[0] = v[sizeof(v) - 1] = 0xf;
st_usleep(1000 * 1000)... | Add huge coroutine test program | Research: Add huge coroutine test program
| C++ | mit | winlinvip/srs,winlinvip/srs,ossrs/srs,winlinvip/simple-rtmp-server,ossrs/srs,ossrs/srs,ossrs/srs,winlinvip/srs,winlinvip/srs,winlinvip/srs,winlinvip/srs,ossrs/srs,ossrs/srs | |
852cbb02621372724ceb19b1e268fa458b1b9d7f | util.cc | util.cc | /*
* Copyright (c) 2008, Thomas Jaeger <ThJaeger@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS... | /*
* Copyright (c) 2008, Thomas Jaeger <ThJaeger@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS... | Fix build failure on Fedora | Fix build failure on Fedora
| C++ | isc | RaphaelRochet/easystroke,RaphaelRochet/easystroke,thjaeger/easystroke,thjaeger/easystroke |
de8128ceebbd5f2e67e54fdfc8aeec76d1eca550 | week3/homework/solutions/problem2/destinations.cpp | week3/homework/solutions/problem2/destinations.cpp | #include <iostream>
using namespace std;
struct Destination {
char city[32];
int kilometers;
};
int main() {
Destination plovdiv = { "Plovdiv", 165 }, varna = { "Varna", 469 };
cout << plovdiv.city << " " << plovdiv.kilometers << endl;
cout << varna.city << " " << varna.kilometers << endl;
D... | Add solution to the second problem | Add solution to the second problem
Use simple struct initialization without explicit constructors
| C++ | mit | dimitaruzunov/oop-practicum-2015-16 | |
dc9346812adefded42f0c5a81466781e428a356a | 109.cpp | 109.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), le... | Convert Sorted List to Binary Search Tree | Convert Sorted List to Binary Search Tree | C++ | mit | zfang399/LeetCode-Problems | |
daed8aec193fe970bfe252364c08013825ccbaa1 | examples/usage/usage.cpp | examples/usage/usage.cpp | #include "ntp-time.h"
NtpTime* ntpTime;
String hhmmss(unsigned long int now) //format value as "hh:mm:ss"
{
String hour = String(Time.hourFormat12(now));
String minute = String::format("%02i",Time.minute(now));
String second = String::format("%02i",Time.second(now));
return hour + ":" + minute + ":" + se... | Update to version 0.1.0 Add millisecond resolution | Update to version 0.1.0 Add millisecond resolution
Add interface to return unix epoch to millisecond resolution. Miscellaneous fixes and cleanup. | C++ | bsd-2-clause | ClassTech/NtpTime | |
45082353a9aeb53fb6e649f00a20d5efb7e600bf | samples/hsm_wiki_samples/source/ch4/done_states.cpp | samples/hsm_wiki_samples/source/ch4/done_states.cpp | // done_states.cpp
#include "hsm/statemachine.h"
using namespace hsm;
class Character
{
public:
Character();
void Update();
// Public to simplify sample
bool mOpenDoor;
private:
friend struct CharacterStates;
StateMachine mStateMachine;
};
struct CharacterStates
{
struct BaseState : StateWithOwner<Characte... | Add sample for section: Done States | Add sample for section: Done States
| C++ | mit | amaiorano/hsm,amaiorano/hsm | |
e1677d97281d7e5059e15ed456e03cb02e475f08 | test/SemaCXX/cxx0x-compat.cpp | test/SemaCXX/cxx0x-compat.cpp | // RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wc++0x-compat -verify %s
namespace N {
template<typename T> void f(T) {} // expected-note {{here}}
namespace M {
template void f<int>(int); // expected-warning {{explicit instantiation of 'N::f' must occur in namespace 'N'}}
}
}
template<typename T> void f(T) {} ... | Add more testing for -Wc++0x-compat warnings. | Add more testing for -Wc++0x-compat warnings.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@141685 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... | |
28b8f23712e0c838a69b782da2f1cf522605ceb5 | examples/guess/submissions/wrong_answer/guess_tle.cc | examples/guess/submissions/wrong_answer/guess_tle.cc | #include <cstdio>
using namespace std;
// Test that if the validator says WA, that's the verdict given even if we
// TLE afterwards (realistically because we tried to read from stdin and didn't
// get a response we expected).
int main(void) {
printf("-1\n");
fflush(stdout);
for (;;);
}
| Add a test for the TLE -> WA behavior | Add a test for the TLE -> WA behavior
| C++ | mit | Kattis/problemtools,godmar/problemtools,godmar/problemtools,Kattis/problemtools,ghamerly/problemtools,jsannemo/problemtools,jsannemo/problemtools,Kattis/problemtools,Kattis/problemtools,ghamerly/problemtools,jsannemo/problemtools,jsannemo/problemtools,ghamerly/problemtools,godmar/problemtools,godmar/problemtools,ghamer... | |
ca0ee2aea49025b9757e2d1ab499955cef611c3d | modules/instrument/test/forceplatetype4Test.cpp | modules/instrument/test/forceplatetype4Test.cpp | #include <cxxtest/TestDrive.h>
#include "forceplateTest_def.h"
#include <openma/instrument/forceplatetype4.h>
CXXTEST_SUITE(ForcePlateType4Test)
{
CXXTEST_TEST(wrench)
{
ma::instrument::ForcePlateType4 fp("FP");
forceplatetest_fill_sample10_type4(&fp);
forceplatetest_compare_wrench_at_origin(&fp, fp4... | Test for the force platform Type-4. | Test for the force platform Type-4.
| C++ | bsd-3-clause | OpenMA/openma,OpenMA/openma,OpenMA/openma,OpenMA/openma | |
b8c5bb4a3e301177fd53b90ca8f918aab62fbc34 | doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp | doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp | /****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms ... | Add missing code snippet file | Add missing code snippet file
src_gui_widgets_qmainwindow.cpp is referred to from
restoring-geometry.qdoc
Copied the version from Qt4, API of involved classes has not changed
Change-Id: Ifc8e68b9e8f7ef81357699537fdc70b50dd0d476
Reviewed-by: Jerome Pasion <c10995d24f6b454503389e8d00d837aef038985d@digia.com>
Reviewed-b... | C++ | lgpl-2.1 | kobolabs/qtdoc,kobolabs/qtdoc,kobolabs/qtdoc,kobolabs/qtdoc | |
84a6371d320476b27e262acca53c913c8bad2ac4 | chrome/browser/extensions/api/idle/idle_apitest.cc | chrome/browser/extensions/api/idle/idle_apitest.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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "net/base/mock_host_resolver.h"
// Sometimes this te... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "net/base/mock_host_resolver.h"
// This test is flak... | Disable ExtensionApiTest.Idle on all platforms, since it's flaky everywhere. | Disable ExtensionApiTest.Idle on all platforms, since it's flaky everywhere.
BUG=130138
TBR=brg@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10828248
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@150998 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | axinging/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,Chilledheart/ch... |
30ce058227536541228d9bd2101f33384e96609f | ITP1_10D/distance2.cpp | ITP1_10D/distance2.cpp | #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
void calcMinkowskiDistance(const int& p, const int& numberOfData, const int* x, const int* y);
void calcChebyshevDistance(const int& numberOfData, const int* x, const int* y);
int main() {
int numberOfData(0);
cin >> numberOfData;
... | Add answer for ITP 1-11 D | Add answer for ITP 1-11 D
| C++ | cc0-1.0 | yfurukawa/AOJ | |
1eb9eb812a6f190608e7732b5d79cfc91742627a | tests/app_suite/ntuser_tests_win.cpp | tests/app_suite/ntuser_tests_win.cpp | /* **********************************************************
* Copyright (c) 2011 Google, Inc. All rights reserved.
* **********************************************************/
/* Dr. Memory: the memory debugger
*
* This library is free software; you can redistribute it and/or
* modify it under the term... | Add a test for NtUserSystemParametersInfo syscall to app_suite | Add a test for NtUserSystemParametersInfo syscall to app_suite
git-svn-id: fe3cd4388a6e5a968b09397a3d721fe124e8117a@398 5b54908e-ead4-fc18-b48a-0285e6dbc711
| C++ | lgpl-2.1 | rnk/drmemory,rnk/drmemory,rnk/drmemory,rnk/drmemory | |
af585a0b79f3341a43b468984e80def8dbd48a81 | test18_20.cpp | test18_20.cpp | #include <iostream>
using namespace std;
namespace primerLib {
void compute() {
cout << "primerLib::compute()" << endl;
}
// void compute(const void *p) {
// cout << "primerLib::compute(const void *)" << endl;
// }
}
void compute(int i) {
cout << "::compute(int)" ... | Add solution for chapter 18 test 20 | Add solution for chapter 18 test 20 | C++ | apache-2.0 | chenshiyang/CPP--Primer-5ed-solution | |
1e55073864ddde2e781aed17b21caf0626f3c443 | test17_23.cpp | test17_23.cpp | #include <iostream>
#include <regex>
#include <string>
using namespace std;
int main() {
string zipcode("(\\d{5})([-]?\\d{4})?");
regex r(zipcode);
string s;
smatch m;
while(getline(cin, s)) {
if(regex_match(s, m, r)) {
cout << "valid: " << m.str() << endl;
... | Add solution for chapter 17 test 23 | Add solution for chapter 17 test 23 | C++ | apache-2.0 | chenshiyang/CPP--Primer-5ed-solution | |
7eb87a30c6eda98a058e222c3b99e91668a9a394 | preorder.cpp | preorder.cpp | #include <iostream>
#include <string>
using namespace std;
struct Node
{
string s;
Node *left;
Node *right;
};
Node *new_node(string s)
{
Node *temp = new Node();
temp->s = s;
temp->left = NULL;
temp->right = NULL;
return temp;
}
bool add_edge(Node *root, Node *father, Node *child)
{
if (root == NULL) {
r... | Add the solution to "Preorder perusal". | Add the solution to "Preorder perusal".
| C++ | mit | clasnake/hackermeter,clasnake/hackermeter | |
2414ff8930527d6fc031f8eeab9497b7f272c8bf | week3/problem1/person_with_dog.cpp | week3/problem1/person_with_dog.cpp | #include <iostream>
#include <string>
using namespace std;
class Dog {
string name;
public:
Dog(string _name = "") {
name = _name;
}
void greet() {
cout << "Bark, bark! I am " << name << ", a talking dog." << endl;
}
};
class Person {
string name;
int age;
Dog dog;
pub... | Add solution to the Person with a dog problem | Add solution to the Person with a dog problem
| C++ | mit | dimitaruzunov/oop-practicum-2015-16 | |
0a9585c2770529b4802cc5a65c181c442a8d82be | examples/FibonacciCalculator.cpp | examples/FibonacciCalculator.cpp | #include "FixedThreadPool.h"
#include <iostream>
using namespace std;
using namespace tpool;
void InputPrompt(const unsigned int cnt)
{
cout << "[" << cnt << "] In: ";
}
unsigned int GetFibonacciNumber(const unsigned int i)
{
if (i < 2)
{
return i;
}
else
{
return GetFibonacciNumber(i -... | Add an Fibonacci example to show the usage of AddTask. | Add an Fibonacci example to show the usage of AddTask.
| C++ | mit | airekans/Tpool,airekans/Tpool,airekans/Tpool | |
bbb5702674a6dcf022ff077594427e2fba6f336e | test/unit/math/prim/fun/mdivide_left_tri_low_test.cpp | test/unit/math/prim/fun/mdivide_left_tri_low_test.cpp | #include <stan/math/prim.hpp>
#include <test/unit/math/prim/fun/expect_matrix_eq.hpp>
#include <gtest/gtest.h>
#define EXPECT_MATRIX_NEAR(A, B, DELTA) \
for (int i = 0; i < A.size(); i++) \
EXPECT_NEAR(A(i), B(i), DELTA);
TEST(MathMatrixPrim, mdivide_left_tri_low_val) {
using stan::math::mdivide_left_tri_l... | Add prim test for mdivide_left_tri_low | Add prim test for mdivide_left_tri_low
| C++ | bsd-3-clause | stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math | |
dc1d6c649faa39049a1124563a9d54cc16c7f370 | content/renderer/media/media_stream_audio_source.cc | content/renderer/media/media_stream_audio_source.cc | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/media/media_stream_audio_source.h"
namespace content {
MediaStreamAudioSource::MediaStreamAudioSource(
int render_view_id... | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/media/media_stream_audio_source.h"
namespace content {
MediaStreamAudioSource::MediaStreamAudioSource(
int render_view_id... | Fix use of invalid pointer in MediaStreamAudioSource. If the source is not initiated correctly it can happen that the |audio_capturer_| is not set. MediaStreamAudioSource::DoStop will then crash. | Fix use of invalid pointer in MediaStreamAudioSource.
If the source is not initiated correctly it can happen that the |audio_capturer_| is not set.
MediaStreamAudioSource::DoStop will then crash.
BUG= 340492
R=xians@chromium.org
Review URL: https://codereview.chromium.org/153643003
git-svn-id: de016e52bd170d2d4f2344... | C++ | bsd-3-clause | jaruba/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,ondra-novak/chrom... |
28bf0003fa6641b98400c28a2f7c2393c70313f2 | unit-tests/Sound_test.cpp | unit-tests/Sound_test.cpp | #include "catch.hpp"
#include <iostream>
#include <string>
#include "audio/Sound.h"
const std::string sound_file = "sound.wav";
TEST_CASE("Initial value(s) in Sound", "[Sound]")
{
Sound* sound = new Sound();
// volume should be at max
CHECK(sound->get_volume() == 100);
delete sound;
}
TEST_CASE("Opening sound... | Add Sound unit testing source. | Add Sound unit testing source.
| C++ | lgpl-2.1 | mdclyburn/hume | |
af5eb4a84994c8e3759684acb683e08eb4fbe955 | DataStructures/Graphs/adj_matrix_representation.cpp | DataStructures/Graphs/adj_matrix_representation.cpp | #include <iostream>
#include<stdlib.h>
#include <string.h>
using namespace std;
struct Graph {
int V,E;
int **adj;
};
Graph* createGraph(int V, int E) {
Graph *G = new Graph();
if (!G) return NULL;
G->V = V;
G->E = E;
G->adj = new int*[G->V]; //row count
for (int i = 0; i < G->V; i++... | Implement Graph using Adjacency Matrix | Implement Graph using Adjacency Matrix
Signed-off-by: WajahatSiddiqui <3c3ea4adfdf19decee174766aef6add34b32b7f0@gmail.com>
| C++ | apache-2.0 | WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace | |
04a86cffee3c0e403ebf01ddc00dc683b082b126 | test/case/decl_scopes.cpp | test/case/decl_scopes.cpp | class global {
};
namespace n {
void external_func() {
class floating_func {
};
}
enum normal_enum {};
enum class class_enum{};
struct str_test {};
namespace m {
class in_namespace {
class in_class {
};
void main() {
... | Add testing file to check output for declaration scopes. | Add testing file to check output for declaration scopes.
| C++ | mit | search-rug/cpptool | |
9db7885530379f34da4c66d7ea47825e94621f74 | content/renderer/gpu/delegated_compositor_output_surface.cc | content/renderer/gpu/delegated_compositor_output_surface.cc | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/gpu/delegated_compositor_output_surface.h"
namespace content {
DelegatedCompositorOutputSurface::DelegatedCompositorOutputSur... | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/gpu/delegated_compositor_output_surface.h"
namespace content {
DelegatedCompositorOutputSurface::DelegatedCompositorOutputSur... | Set max pending frames to the default instead of 1 with ubercomp. | aura: Set max pending frames to the default instead of 1 with ubercomp.
R=jbauman, piman
BUG=286548
Review URL: https://codereview.chromium.org/26069002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@227195 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | hgl888/chromium-crosswalk,patrickm/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,ltilve/chromium,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,Just-D/chromium-1,patrickm/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,Chilledhea... |
f1808e23f5f238170edb3d666b06bf295ee68303 | test/EventHandler/main.cpp | test/EventHandler/main.cpp |
#include "mbed.h"
#include "EventHandler.h"
class VTest {
public:
int vprint(void *arg) {
if (arg) {
int* i = static_cast<int *>(arg);
printf("Class Print Integer: %d from %p\r\n", *i, arg);
} else {
printf("Class Null Arg\r\n");
}
return (int)(ar... | Add a trivial test for EventHandler | Add a trivial test for EventHandler
| C++ | apache-2.0 | 0xc0170/mbed-drivers,sg-/mbed-drivers,bremoran/mbed-drivers,iriark01/mbed-drivers,0xc0170/mbed-drivers,iriark01/mbed-drivers,bremoran/mbed-drivers,sg-/mbed-drivers | |
34a671c122a3b51c12af92ca4cbfd3d7687df517 | Strings/regex.cpp | Strings/regex.cpp | #include <iostream>
#include <iterator>
#include <regex>
#include <string>
using namespace std;
int main(){
string s = "123daniel , jajaja, lol, 234234534, I am from Earth";
regex tel("\\d{8},\\sI");
auto words_begin = sregex_iterator(s.begin(), s.end(), tel);
auto words_end = sregex_iterator();
... | Add code for regular expresions in c++. | Add code for regular expresions in c++.
| C++ | mit | xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.