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
48e3dabfe614edc6ab65037de4baeb026ecd60c8
views/controls/menu/menu_config_gtk.cc
views/controls/menu/menu_config_gtk.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 "views/controls/menu/menu_config.h" #include "grit/app_resources.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/re...
// 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 "views/controls/menu/menu_config.h" #include "grit/app_resources.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/re...
Increase the base font size for touch ui
Increase the base font size for touch ui BUG=none TEST=none Review URL: http://codereview.chromium.org/6519034 git-svn-id: http://src.chromium.org/svn/trunk/src@77349 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 769188b051f6abb22b6e4a51e926b757e5fcf477
C++
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
44c13fafa5c53738b65f8fa9d7958d0f2560ef9c
src/network_impl/SimNetworkFunctions.cpp
src/network_impl/SimNetworkFunctions.cpp
/* * SimNetworkFunctions.cpp * * Created on: 18.04.2016 * Author: Marc Hartung */ #include "../../include/network_impl/SimNetworkFunctions.hpp" #include <iostream> namespace NetOff { std::string createStringFromData(const char * data) { size_t num = getIntegralFromData<size_t>(data); ...
/* * SimNetworkFunctions.cpp * * Created on: 18.04.2016 * Author: Marc Hartung */ #include "network_impl/SimNetworkFunctions.hpp" #include <iostream> namespace NetOff { std::string createStringFromData(const char * data) { size_t num = getIntegralFromData<size_t>(data); const char...
Make use of range based for loop
Make use of range based for loop
C++
bsd-3-clause
marchartung/NetworkOffloader
30d170b85b632ffe2babc4e0955b2b09851540dc
chrome/browser/ui/webui/options2/chromeos/stats_options_handler.cc
chrome/browser/ui/webui/options2/chromeos/stats_options_handler.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/utf...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/options2/chromeos/stats_options_handler.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/utf...
Fix CrOS Official build from options2 copy.
Fix CrOS Official build from options2 copy. BUG=none TEST=none TBR=csilv Review URL: http://codereview.chromium.org/8907049 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@114493 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,mohamed--abdel-maksoud/chromium.src,fuju...
22ef662b199a32a9ac511e4b6296ff7ac29a57c3
TestLimiter.cpp
TestLimiter.cpp
#include "Limiter.h" #include "Testing.h" #include <iostream> auto TestWithPeakLoadInTheBeginning(int maxAllowedRps) { const auto startTime = std::chrono::steady_clock::now(); int sentRequestsCount = 0; Limiter limiter(maxAllowedRps, 100); for (; sentRequestsCount < maxAllowedRps; ++sentRequestsCount) { ASSER...
#include "Limiter.h" #include "Testing.h" #include <iostream> auto TestWithPeakLoadInTheBeginning(int maxAllowedRps) { const auto startTime = std::chrono::steady_clock::now(); int sentRequestsCount = 0; Limiter limiter(maxAllowedRps, 10000); for (; sentRequestsCount < maxAllowedRps; ++sentRequestsCount) { ASS...
Fix final condition in test
Fix final condition in test
C++
mit
4sily/rate-limiter-cpp,4sily/rate-limiter-cpp
4ead1e1f4e3a20966b789b8208ac7934904cebef
client/source/client.cpp
client/source/client.cpp
#include<iostream> #include<boost/filesystem.hpp> using namespace boost::filesystem; //bool CopyDir(path const & source_path, path const & destination_path); int main(int argc, char *argv[]) { if(argc < 3) { std::cout << "USAGE " << argv[0] << " source destination" << std::endl; return 1...
#include<iostream> #include<boost/filesystem.hpp> using namespace boost::filesystem; //bool CopyDir(path const & source_path, path const & destination_path); int main(int argc, char *argv[]) { if(argc < 3) { std::cout << "USAGE " << argv[0] << " source destination" << std::endl; return 1...
Add comment about linking place
Add comment about linking place
C++
mit
paulkramme/backup
1e8e1a309993503e2f6ea4a71b10b6ca98daf681
test/CodeGenCXX/debug-info-thunk-msabi.cpp
test/CodeGenCXX/debug-info-thunk-msabi.cpp
// RUN: %clang_cc1 %s -triple i386-pc-windows-msvc19.0.0 -emit-obj \ // RUN: -debug-info-kind=line-tables-only -fms-extensions class __declspec(dllexport) A { A(int * = new int) {} }; // CHECK: define {{.*}}void @"\01??_FA@@AAEXXZ" // CHECK-SAME: !dbg ![[SP:[0-9]+]] // CHECK-NOT: {{ret }} // CHECK: call x86_thisc...
// RUN: %clang_cc1 %s -triple i386-pc-windows-msvc19.0.0 -emit-llvm \ // RUN: -debug-info-kind=line-tables-only -fms-extensions -o - | FileCheck %s class __declspec(dllexport) A { A(int * = new int) {} }; // CHECK: define {{.*}}void @"\01??_FA@@AAEXXZ" // CHECK-SAME: !dbg ![[SP:[0-9]+]] // CHECK-NOT: {{ret }} // ...
Add the missing FileCheck invocation to this testcase.
Add the missing FileCheck invocation to this testcase. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@287139 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl...
a02aab5aa47b6488c285a480cb6ee66b0ed215af
main.cpp
main.cpp
int main() { int *a; int *n = a; a = n; *n = 5; return 0; }
#include <stdio.h> int main() { int input; if (scanf("%d", &input) == 1) { if (input == 2) { int *a; int *n = a; a = n; *n = 5; } else { printf("OK\n"); } } return 0; }
Add a special condition so that static analyzers could write the exact condition when problem happens
Add a special condition so that static analyzers could write the exact condition when problem happens
C++
mit
mmenshchikov/bugdetection_uninitialized_value,mmenshchikov/bugdetection_uninitialized_value
8e1dd0bb4ff22137e745f56bb0a1a218de2f542f
tests/packet_queue_tests.cpp
tests/packet_queue_tests.cpp
extern "C" { #include "packet_queue.h" #include "error.h" #include "nrf51.h" #include "nrf51_bitfields.h" } #include "CppUTest/TestHarness.h" TEST_GROUP(packet_queue) { void setup(void) { } void teardown(void) { } }; TEST(packet_queue, test_packet_queue_init_succeed) {...
extern "C" { #include "packet_queue.h" #include "error.h" #include "nrf51.h" #include "nrf51_bitfields.h" } #include "CppUTest/TestHarness.h" TEST_GROUP(packet_queue) { packet_queue_t queue; void setup(void) { packet_queue_init(&queue); } void teardown(void) { ...
Test empty and non-empty queue.
Test empty and non-empty queue.
C++
bsd-3-clause
hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio
e18fe680737788e3401fd6750dbb89cfa05c75ad
src/osgDB/ImageOptions.cpp
src/osgDB/ImageOptions.cpp
#include <osgDB/ImageOptions> using namespace osgDB; ImageOptions::ImageOptions() { init(); } ImageOptions::ImageOptions(const std::string& str) { init(); _str = str; } void ImageOptions::init() { _sourceImageSamplingMode = NEAREST; _sourceImageWindowMode = ALL_IMAGE; _destination...
#include <osgDB/ImageOptions> using namespace osgDB; ImageOptions::ImageOptions() { init(); } ImageOptions::ImageOptions(const std::string& str) { init(); _str = str; } void ImageOptions::init() { _sourceImageSamplingMode = NEAREST; _sourceImageWindowMode = ALL_IMAGE; _destination...
Set default values for datatype & pixelformat.
Set default values for datatype & pixelformat. git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@2384 16af8721-9629-0410-8352-f15c8da7e697
C++
lgpl-2.1
joevandyk/osg,joevandyk/osg,joevandyk/osg,joevandyk/osg,joevandyk/osg
737146fb3175b9bca22d1a39920bc40cf438af40
source/threadingzeug/source/parallelfor.cpp
source/threadingzeug/source/parallelfor.cpp
#pragma once #include <threadingzeug/parallelfor.h> namespace threadingzeug { int getNumberOfThreads() { return std::max(static_cast<size_t>(2), static_cast<size_t>(std::thread::hardware_concurrency())); } } // namespace threadingzeug
#include <threadingzeug/parallelfor.h> namespace threadingzeug { int getNumberOfThreads() { return std::max(static_cast<size_t>(2), static_cast<size_t>(std::thread::hardware_concurrency())); } } // namespace threadingzeug
Remove pragma from source file
Remove pragma from source file
C++
mit
lanice/libzeug,cginternals/libzeug,cginternals/libzeug,lanice/libzeug,lanice/libzeug,j-o/libzeug,cginternals/libzeug,lanice/libzeug,cginternals/libzeug,j-o/libzeug,j-o/libzeug,j-o/libzeug
5c61a49f35620fbdb2f849d0d48badec196f0e94
tensorflow/core/kernels/mlir_generated/unranked_op_gpu_neg.cc
tensorflow/core/kernels/mlir_generated/unranked_op_gpu_neg.cc
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Fix registration for Neg kernel.
Fix registration for Neg kernel. There was a copy/paste bug here which was only caught with the python-based tests. Now tensorflow/python/kernel_tests:cwise_ops_unary_test_gpu passes with unranked kernels enabled. PiperOrigin-RevId: 346947580 Change-Id: I5195c6b5f44deb11469d50e925cf460c3944014d
C++
apache-2.0
sarvex/tensorflow,annarev/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_s...
c66f4ec0e28ec59ff07a50fc2433b96f56be31f3
src/thread_checker.cpp
src/thread_checker.cpp
#include "thread_checker.h" #include <windows.h> #include "Processthreadsapi.h" namespace dux { #ifdef _WIN32 ThreadChecker::ThreadChecker() : thread_id_(GetCurrentThreadId()) {} bool ThreadChecker::IsCreationThreadCurrent() const { return GetCurrentThreadId() == thread_id_; } #endif } // namespace dux
#include "thread_checker.h" #ifdef _WIN32 #include <windows.h> #include "Processthreadsapi.h" namespace dux { ThreadChecker::ThreadChecker() : thread_id_(GetCurrentThreadId()) {} bool ThreadChecker::IsCreationThreadCurrent() const { return GetCurrentThreadId() == thread_id_; } } // namespace dux #endif
Fix build on non-windows platforms.
Fix build on non-windows platforms.
C++
mit
jyaif/dux_base,jyaif/dux_base,jyaif/dux_base
cddec8a9dd019699d26da3adb0ce22bf7c7b78ba
test/depr/depr.c.headers/uchar_h.pass.cpp
test/depr/depr.c.headers/uchar_h.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 an XFAIL for Newlib's missing uchar.h
Add an XFAIL for Newlib's missing uchar.h git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@224037 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
4bc1ec3a9893680d74027a62237abf3a6beac379
src/core/formatters/text_formatter.cc
src/core/formatters/text_formatter.cc
#include <iostream> #include <ccspec/core/formatters/text_formatter.h> namespace ccspec { namespace core { namespace formatters { using std::endl; using std::exception; using std::exception_ptr; using std::list; using std::ostream; using std::rethrow_exception; // Public methods. void TextFormatter::afterEachHookFa...
#include <iostream> #include <ccspec/core/formatters/text_formatter.h> namespace ccspec { namespace core { namespace formatters { using std::endl; using std::exception; using std::exception_ptr; using std::list; using std::ostream; using std::rethrow_exception; // Public methods. void TextFormatter::afterEachHookFa...
Add line break before "Failures:"
Add line break before "Failures:"
C++
mit
tempbottle/ccspec,zhangsu/ccspec,michaelachrisco/ccspec,michaelachrisco/ccspec,zhangsu/ccspec,michaelachrisco/ccspec,tempbottle/ccspec,tempbottle/ccspec,zhangsu/ccspec
1dd306c671db20faeeaa4e85843c7a1d397a0755
chrome/browser/extensions/api/session_restore/session_restore_apitest.cc
chrome/browser/extensions/api/session_restore/session_restore_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 "chrome/browser/extensions/extension_apitest.h" IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SessionRestoreApis) { ASSERT_TRUE(RunExtensionSub...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" // Flaky on ChromeOS http://crbug.com/251199 #if defined(OS_CHROMEOS) #define MAYBE_SessionR...
Mark SessionRestoureApis as flaky on chromium os
Mark SessionRestoureApis as flaky on chromium os BUG=251199 TBR=kalman@chromium.org Review URL: https://codereview.chromium.org/17385002 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@206918 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,dednal/chro...
11d399554c76a40909d31b3eb0c150bbc0b6b5f2
libredex/ApkManager.cpp
libredex/ApkManager.cpp
// Copyright 2004-present Facebook. All Rights Reserved. #include "ApkManager.h" #include <boost/filesystem.hpp> #include <iostream> #include <sstream> namespace { bool check_directory(std::string& apkdir) { if (!boost::filesystem::is_directory(apkdir.c_str())) { std::cerr << "error: apkdir is not a writable ...
// Copyright 2004-present Facebook. All Rights Reserved. #include "ApkManager.h" #include <boost/filesystem.hpp> #include <iostream> #include <sstream> namespace { void check_directory(std::string& dir) { if (!boost::filesystem::is_directory(dir.c_str())) { std::cerr << "error: not a writable directory: " << ...
Fix compilation warning when checking for writable directory
Fix compilation warning when checking for writable directory Summary: As title. Fixes code introduced in previous diff. Fixes https://github.com/facebook/redex/issues/312 Reviewed By: thezhangwei Differential Revision: D7487716 fbshipit-source-id: 12d1fa38b4cc9b10b31991a9875731b19988c96d
C++
mit
facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex
262f434dde0c088f260c468b841bb46aa914e585
main.cpp
main.cpp
#include <iostream> #include <string> std::string parse_command(const std::string& input) { return input.substr(0, input.find(' ')); } int main() { std::cout << "PUCRS FAT16 SHELL\n"; std::cout << "$ "; std::string cmd; getline (std::cin, cmd); std::cout << "-> Will execute: " << parse_command(cmd) << "\...
#include <iostream> #include <string> std::string parse_command(const std::string& input) { return input.substr(0, input.find(' ')); } int main() { std::cout << "PUCRS FAT16 SHELL\n"; while (true) { std::cout << "$ "; std::string cmd; getline (std::cin, cmd); std::cout << "-> Will execute: " << ...
Read commands from stdin "forever"
Read commands from stdin "forever"
C++
mit
fgrehm/pucrs-fat16,fgrehm/pucrs-fat16,fgrehm/pucrs-fat16,fgrehm/pucrs-fat16
6b986a61b7ecbae0516c9325a6382a8b96a17503
src/announce.cc
src/announce.cc
#include <dns_sd.h> #include <ev++.h> int main(int argc, char *argv[]) { (void)argc; (void)argv; return 0; }
#include <iostream> #include <dns_sd.h> #include <ev++.h> #include "build_version.h" int main(int argc, char *argv[]) { if (2 != argc) { std::cerr << argv[0] << " <announce file>" << std::endl; std::cerr << "Version: " << VERSION << std::endl; return -1; } return 0; }
Check if we have enough arguments
Check if we have enough arguments
C++
isc
bertjwregeer/mdns-announce,bertjwregeer/mdns-announce
c05372cd5f82e1463c0b918ccdb208fbaa17f73c
test/unit/lel/operation/increment_decrement.cpp
test/unit/lel/operation/increment_decrement.cpp
// Copyright 2017, Dawid Kurek, <dawikur@gmail.com> #include "lel/operation/increment_decrement.hpp" #include "gtest/gtest.h" TEST(increment_decrement_test, TODO) {}
// Copyright 2017, Dawid Kurek, <dawikur@gmail.com> #include "lel/operation/increment_decrement.hpp" #include "gtest/gtest.h" TEST(increment_decrement_test, preincrement) { LeL::Operation::__PreIncrement pre_increment; int i = 5; ASSERT_EQ(6, pre_increment(i)); } TEST(increment_decrement_test, postincrement...
Add tests for pre/post inc/decrement
Add tests for pre/post inc/decrement
C++
mit
dawikur/lel,dawikur/lel,dawikur/lel
ce9518d449518523146ffdf2de7debae87ac85c2
test/test-0.cpp
test/test-0.cpp
#include "Assignment.h" #include "Course.h" #include <cstdio> #include <iostream> using namespace std; int main() { if (remove("test-0.sqlite") != 0) { cout << "Error with deletion of database file\n"; } else { cout << "Database file successfully deleted\n"; } // test instantiation of a Course objec...
#include "Assignment.h" #include "Course.h" #include <cstdio> #include <iostream> using namespace std; int main() { if (remove("test-0.sqlite") != 0) { cout << "Error with deletion of database file\n"; } else { cout << "Database file successfully deleted\n"; } // test instantiation of a Course objec...
Comment out test, need to refactor
Comment out test, need to refactor
C++
mit
honestcomrade/grade-plus
b3cb09510be89ae26fa057e083b3a8bb678ba419
Python/racy/plugins/cppunit/rc/testBundle.cpp
Python/racy/plugins/cppunit/rc/testBundle.cpp
/* ***** BEGIN LICENSE BLOCK ***** * Sconspiracy - Copyright (C) IRCAD, 2004-2010. * Distributed under the terms of the BSD Licence as * published by the Open Source Initiative. * ****** END LICENSE BLOCK ****** */ MiniLauncher::MiniLauncher( ::boost::filesystem::path profilePath ) { ::boost::filesystem::pat...
/* ***** BEGIN LICENSE BLOCK ***** * Sconspiracy - Copyright (C) IRCAD, 2004-2010. * Distributed under the terms of the BSD Licence as * published by the Open Source Initiative. * ****** END LICENSE BLOCK ****** */ MiniLauncher::MiniLauncher( ::boost::filesystem::path profilePath ) { ::boost::filesystem::pat...
Add setup/cleanup for bundle test unit
Add setup/cleanup for bundle test unit --HG-- branch : experimental
C++
bsd-3-clause
cfobel/sconspiracy,cfobel/sconspiracy,cfobel/sconspiracy
c119d46306f51757d780f8e0e44ea42221274383
main.cpp
main.cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "System/management.h" int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; // Create management object and register it as context property Management *man = new Man...
#include <ctime> #include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "System/management.h" int main(int argc, char *argv[]) { srand((unsigned)time(NULL)); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; // Create management object and register ...
Initialize seed for better random numbers.
Initialize seed for better random numbers. Signed-off-by: TheSniperFan <db7563122c08a03c83ae47e44bdc9bc661a824b1@gmail.com>
C++
mit
knorko/Multimedior,knorko/Multimedior
518ec5090aa225ac36daf4180d15d19f4d0d39ad
src/libaktualizr/logging/default_log_sink.cc
src/libaktualizr/logging/default_log_sink.cc
#include <iomanip> #include <iostream> #include <boost/log/trivial.hpp> #include <boost/log/utility/setup/console.hpp> static void color_fmt(boost::log::record_view const& rec, boost::log::formatting_ostream& strm) { auto severity = rec[boost::log::trivial::severity]; bool color = false; if (severity) { swi...
#include <iomanip> #include <iostream> #include <boost/log/trivial.hpp> #include <boost/log/utility/setup/console.hpp> static void color_fmt(boost::log::record_view const& rec, boost::log::formatting_ostream& strm) { auto severity = rec[boost::log::trivial::severity]; bool color = false; if (severity) { swi...
Allow logger to use STDERR
logging: Allow logger to use STDERR This allows libaktualizr to log to STDERR if LOG_STDERR is defined in the environment. A handy way this can be used is for something like aktualizr-get: LOG_STDERR=1 aktualizr-get .... This allows you to understand what is logging (stderr's fd) and what is the output (stdout's fd...
C++
mpl-2.0
advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp,advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp,advancedtelematic/aktualizr,advancedtelematic/aktualizr
7047ec5d3db8208b9a072f4ef3f4f372b9133936
wrappers/src/row_cs.cpp
wrappers/src/row_cs.cpp
//////////////////////////////////////////////////////////////////////////// // // Copyright 2016 Realm Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/li...
//////////////////////////////////////////////////////////////////////////// // // Copyright 2016 Realm Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/li...
Throw standard exception on illegal row access
Throw standard exception on illegal row access
C++
apache-2.0
Shaddix/realm-dotnet,realm/realm-dotnet,realm/realm-dotnet,realm/realm-dotnet,Shaddix/realm-dotnet,Shaddix/realm-dotnet,Shaddix/realm-dotnet
29696d7a1b4311f3578f3e92d9e72d782807ad61
babycam.cpp
babycam.cpp
#include <opencv2/opencv.hpp> #include <iostream> using namespace std; using namespace cv; int main() { VideoCapture cap(0); if (!cap.isOpened()) { cout << "Error opening webcam" << endl; return -1; } int frame_width = cap.get(CV_CAP_PROP_FRAME_WIDTH); int frame_height = cap.get(CV_CAP_PROP_FRAME_...
#include <opencv2/opencv.hpp> #include <iostream> using namespace std; using namespace cv; int main() { VideoCapture cap(0); if (!cap.isOpened()) { cout << "Error opening webcam" << endl; return -1; } int frame_width = cap.get(CV_CAP_PROP_FRAME_WIDTH); int frame_height = cap.get(CV_CAP_PROP_FRAME_...
Use FFmpeg mp4 codec for output
Use FFmpeg mp4 codec for output
C++
epl-1.0
toasterlovin/babycam,toasterlovin/babycam
435d2ae4a2a25be05ed5cac3fde80a0295867e95
test/test_something.cpp
test/test_something.cpp
#include "gtest/gtest.h" #include "motor_shield.h" MotorShield mshield(1, 3, 4, 5); TEST(MotorShield, Initialization) { ASSERT_TRUE(1 == 1); }
#include "gtest/gtest.h" #include "motor_shield.h" #define SPEED_L 1 #define DIR_L 2 #define SPEED_R 3 #define DIR_R 4 MotorShield mshield(SPEED_L, DIR_L, SPEED_R, DIR_R); TEST(MotorShield, Initialization) { ASSERT_EQ(0, mshield.getMinSpeed()); ASSERT_EQ(255, mshield.getMaxSpeed()); ASSERT_EQ(SPEED_L, mshiel...
Add a test for MotorShield constructor
Add a test for MotorShield constructor
C++
mit
lenon/arduino-motorshield
6a8e24dceb4142abec62177aea136768bf604714
msg.cc
msg.cc
/* * msg - user messages - implementation * Copyright(c) 2004 of wave++ (Yuri D'Elia) <wavexx@users.sf.net> * Distributed under GNU LGPL without ANY warranty. */ // c system headers #include <stdarg.h> #include <cstdio> using std::vfprintf; using std::fprintf; // data const char* prg; bool verbose = false; // ...
/* * msg - user messages - implementation * Copyright(c) 2004 of wave++ (Yuri D'Elia) <wavexx@users.sf.net> * Distributed under GNU LGPL without ANY warranty. */ // local headers #include "msg.hh" // c system headers #include <stdarg.h> #include <cstdio> using std::vfprintf; using std::fprintf; // data const ch...
Include the header for safety.
Include the header for safety. [git-p4: depot-paths = "//depot/fIcy/main/": change = 544]
C++
lgpl-2.1
avar/fIcy,wavexx/fIcy,wavexx/fIcy
42fade9c3d73532f241b9cb384e26442329d7197
1st_course/1st_sem/HomeWork_10/Hw10_1/Hw10_1/Source.cpp
1st_course/1st_sem/HomeWork_10/Hw10_1/Hw10_1/Source.cpp
#include "Graph.h"
#include "Graph.h" #include <fstream> using namespace std; void main() { setlocale(LC_ALL, "Russian"); ifstream inputFile("inputfile.txt"); int numberOfCountries = 0; List **mapOfWorld = creatingCoutries(inputFile); printMap(mapOfWorld); deleteMap(mapOfWorld); system("pause"); }
Add new functions and finished module Graph.h
Add new functions and finished module Graph.h
C++
apache-2.0
vladimirbahmetyev/Homework,vladimirbahmetyev/Homework
cb8bf5be5cd9c815c2ce19ba8c11bd3f8bf6e7a9
test/src/rgb_pixel_test.cpp
test/src/rgb_pixel_test.cpp
// // Created by Konstantin Gredeskoul on 1/23/16. // #include "gtest/gtest.h" #include "macros_color_test.h" TEST(rgb_pixel, set_color) { pixel.setColor(purple); EXPECT_EQ_COLORS(pixel.getColor(), purple); wait_for(10); EXPECT_EQ_COLORS(pixel.getColor(), purple); } TEST(rgb_pixel, fade_same_colors)...
// // Created by Konstantin Gredeskoul on 1/23/16. // #include "gtest/gtest.h" #include "macros_color_test.h" TEST(rgb_pixel, set_color) { pixel.setColor(purple); EXPECT_EQ_COLORS(pixel.getColor(), purple); wait_for(10); EXPECT_EQ_COLORS(pixel.getColor(), purple); } //TEST(rgb_pixel, fade_same_color...
Comment out broken tests for now
Comment out broken tests for now
C++
mit
kigster/librgb,kigster/librgb,kigster/librgb
c2bdd9ebc9b618f52c59a40e02c53790dfddc35d
protocols/jabber/googletalk/googletalkcalldialog.cpp
protocols/jabber/googletalk/googletalkcalldialog.cpp
/* googletalkcalldialog.cpp - Google Talk and Google libjingle support Copyright (c) 2009 by Pali Rohár <pali.rohar@gmail.com> ************************************************************************* * * * This library is free ...
/* googletalkcalldialog.cpp - Google Talk and Google libjingle support Copyright (c) 2009 by Pali Rohár <pali.rohar@gmail.com> ************************************************************************* * * * This library is free ...
Include missing headers & own header as first
protocols/jabber: Include missing headers & own header as first This makes header files standalone and fixing krazy issues.
C++
lgpl-2.1
josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136
7863a0c08db0d80949f7b436c7109a56b1f35e65
test/cpp11-migrate/Core/Reformatting.cpp
test/cpp11-migrate/Core/Reformatting.cpp
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: not cpp11-migrate -format-style=FOO -use-auto %t.cpp -- -std=c++11 // RUN: not cpp11-migrate -format-style=/tmp/ -use-auto %t.cpp -- -std=c++11 // RUN: cpp11-migrate -format-style=LLVM -use-auto %t.cpp -- -std=c++11 // RUN: FileCheck --strict-whitespace -input-file=%t...
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: not cpp11-migrate -format-style=non_existent_file.yaml -use-auto %t.cpp -- -std=c++11 // RUN: touch %T/non_format_config.yaml // RUN: not cpp11-migrate -format-style=%T/non_format_config.yaml -use-auto %t.cpp -- -std=c++11 // RUN: cpp11-migrate -format-style=LLVM -use...
Tweak lit tests to avoid false negatives
cpp11-migrate: Tweak lit tests to avoid false negatives Recent failures on a freebsd buildbot indicated a weakness in the Reformatting.cpp lit test. Tweaking the test to avoid false negatives and hopefully make the buildbot happy. git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@187153 91177308-0d34-0410-b5e6-9...
C++
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
970152ccea0debd9b914ee01211e5841eb637b16
cvd_src/i686/yuv420p_to_rgb_runner.cc
cvd_src/i686/yuv420p_to_rgb_runner.cc
#include "cvd/colourspace.h" namespace CVD { namespace ColourSpace { inline void yuv420p_to_rgb_c(const unsigned char* y, const unsigned char* u, const unsigned char* v, unsigned char* rgb, unsigned int width, unsigned int height); extern "C"{ void cvd_asm_yuv420p_to_rgb(const unsigned char*, unsigned char*,...
#include "cvd/colourspace.h" #include "cvd/utility.h" namespace CVD { namespace ColourSpace { inline void yuv420p_to_rgb_c(const unsigned char* y, const unsigned char* u, const unsigned char* v, unsigned char* rgb, unsigned int width, unsigned int height); extern "C"{ void cvd_asm_yuv420p_to_rgb(const unsign...
Patch from Achtelik Markus to fix compile error on 32bit builds.
Patch from Achtelik Markus to fix compile error on 32bit builds.
C++
lgpl-2.1
oneminot/libcvd,oneminot/libcvd,oneminot/libcvd
ab196518a271ed5389c0919629f4a121f8a2b416
Source/MathsUtilities.cpp
Source/MathsUtilities.cpp
// // MathsUtilities.cpp // TimGameLib // // Created by Tim Brier on 10/04/2015. // Copyright (c) 2015 tbrier. All rights reserved. // #include "MathsUtilities.hpp" #include <random> #include <functional> namespace MathsUtilities { std::function<int()> GetRandomGeneratorFunctionForRange(int min, int max) { ...
// // MathsUtilities.cpp // TimGameLib // // Created by Tim Brier on 10/04/2015. // Copyright (c) 2015 tbrier. All rights reserved. // #include "MathsUtilities.hpp" #include <random> #include <functional> namespace MathsUtilities { std::function<int()> GetRandomGeneratorFunctionForRange(int min, int max) { ...
Use real distribution for random float generator
Use real distribution for random float generator
C++
mit
sizlo/TimGameLib,sizlo/TimGameLib,sizlo/TimGameLib
95c8ff3d4620287b99cf5ab4770095972d2cf0d1
Settings/Control.cpp
Settings/Control.cpp
#include "Control.h" #include <sstream> Control::Control() { } Control::Control(int id, HWND parent) : _id(id), _parent(parent) { _hWnd = GetDlgItem(parent, id); } Control::~Control() { } bool Control::Text(std::wstring text) { return SetDlgItemText(_parent, _id, text.c_str()) == TRUE; } bool Control::T...
#include "Control.h" #include <sstream> Control::Control() { } Control::Control(int id, HWND parent) : _id(id), _parent(parent) { _hWnd = GetDlgItem(parent, id); } Control::~Control() { } bool Control::Text(std::wstring text) { return SetDlgItemText(_parent, _id, text.c_str()) == TRUE; } bool Control::T...
Use Win32 function instead of rolling our own
Use Win32 function instead of rolling our own
C++
bsd-2-clause
Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX,Soulflare3/3RVX
3bd5b9d46192369ff83926fbbac3adbf206db93f
lib/Driver/DriverOptions.cpp
lib/Driver/DriverOptions.cpp
//===--- DriverOptions.cpp - Driver Options Table -------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===--- DriverOptions.cpp - Driver Options Table -------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Update clang to match llvm r250901. OptTable constructor now takes an ArrayRef. NFC
Update clang to match llvm r250901. OptTable constructor now takes an ArrayRef. NFC git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@250903 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
2ae23e799a4f85edff8eae296b9e6eb663e2010c
chrome/browser/chromeos/login/textfield_with_margin.cc
chrome/browser/chromeos/login/textfield_with_margin.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 "chrome/browser/chromeos/login/textfield_with_margin.h" #include "chrome/browser/chromeos/login/helper.h" #include "ui/base/keycodes/keyboar...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/login/textfield_with_margin.h" #include "chrome/browser/chromeos/login/helper.h" #include "ui/base/keycodes/keyboar...
Fix to make the behavior of TextfieldWithMargin consistent with Textfield
Fix to make the behavior of TextfieldWithMargin consistent with Textfield Add call to views::Textfield::OnKeyPressed in TextfieldWithMargin::OnKeyPressed Without this call, HandleKeyEvent of controller will not be called by NativeTextfieldViews. BUG=None TEST=None Review URL: http://codereview.chromium.org/7284001 ...
C++
bsd-3-clause
chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,anirudhSK/chromium,ltilve/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,junmin-zhu/chromium-river...
aa4134d09b8b1b18b0da2c573e81da3f69738f84
doc/snippets/DenseBase_setLinSpaced.cpp
doc/snippets/DenseBase_setLinSpaced.cpp
VectorXf v; v.setLinSpaced(5,0.5f,1.5f).transpose(); cout << v << endl;
VectorXf v; v.setLinSpaced(5,0.5f,1.5f); cout << v << endl;
Remove confusing transpose() in setLinSpaced() docs.
Remove confusing transpose() in setLinSpaced() docs.
C++
bsd-3-clause
Zefz/eigen,pasuka/eigen,ritsu1228/eigen,ROCmSoftwarePlatform/hipeigen,ritsu1228/eigen,ritsu1228/eigen,Zefz/eigen,ROCmSoftwarePlatform/hipeigen,toastedcrumpets/eigen,ROCmSoftwarePlatform/hipeigen,TSC21/Eigen,TSC21/Eigen,toastedcrumpets/eigen,Zefz/eigen,toastedcrumpets/eigen,Zefz/eigen,ritsu1228/eigen,TSC21/Eigen,ROCmSof...
3c0b233d043e75d257217cf025b25cef40260e7b
atom/common/api/event_emitter_caller.cc
atom/common/api/event_emitter_caller.cc
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/common/api/event_emitter_caller.h" #include "atom/common/api/locker.h" #include "atom/common/node_includes.h" namespace mate { namespace internal { v8::Local<v8::Val...
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/common/api/event_emitter_caller.h" #include "atom/common/api/locker.h" #include "atom/common/node_includes.h" namespace mate { namespace internal { v8::Local<v8::Val...
Fix line length in caller.cc
Fix line length in caller.cc
C++
mit
bpasero/electron,gerhardberger/electron,shiftkey/electron,electron/electron,electron/electron,thomsonreuters/electron,Floato/electron,thomsonreuters/electron,bpasero/electron,bpasero/electron,electron/electron,gerhardberger/electron,the-ress/electron,seanchas116/electron,seanchas116/electron,shiftkey/electron,shiftkey/...
9df14930a1d9a19194666faae71cffc8c1902660
test/SemaTemplate/stack-exhaustion.cpp
test/SemaTemplate/stack-exhaustion.cpp
// RUN: %clang_cc1 -verify %s // REQUIRES: thread_support // expected-warning@* 0-1{{stack nearly exhausted}} // expected-note@* 0+{{}} template<int N> struct X : X<N-1> {}; template<> struct X<0> {}; X<1000> x; template<typename ...T> struct tuple {}; template<typename ...T> auto f(tuple<T...> t) -> decltype(f(tupl...
// RUN: %clang_cc1 -verify %s // REQUIRES: thread_support // FIXME: Detection of, or recovery from, stack exhaustion does not work on // NetBSD at the moment. Since this is a best-effort mitigation for exceeding // implementation limits, just disable the test. // UNSUPPORTED: system-netbsd // expected-warning@* 0-1{{...
Disable stack exhaustion test on NetBSD, where either the detection or recovery mechanism does not appear to work.
Disable stack exhaustion test on NetBSD, where either the detection or recovery mechanism does not appear to work. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@370801 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
92634056948c8ea72b3900c4a11cbe9cb142a1c4
chrome/browser/app_modal_dialog_queue.cc
chrome/browser/app_modal_dialog_queue.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 "chrome/browser/app_modal_dialog_queue.h" #include "chrome/browser/browser_list.h" void AppModalDialogQueue::AddDialog(AppModalDialog*...
// 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 "chrome/browser/app_modal_dialog_queue.h" #include "chrome/browser/browser_list.h" void AppModalDialogQueue::AddDialog(AppModalDialog*...
Set active_dialog_ before showing it, since showing a dialog can sometimes actually move to the next one in the queue instead.
Set active_dialog_ before showing it, since showing a dialog can sometimes actually move to the next one in the queue instead. BUG=26398 TEST=Make sure alert/confirm boxes work properly. Make sure a background tab that shows a (delayed) alert box works. Same with a background browser. Especially make sure http...
C++
bsd-3-clause
yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp...
5f23e7a403a33bd79c9a7fb95fd08be020fe0303
is_sorted/avx512.cpp
is_sorted/avx512.cpp
#include <immintrin.h> bool is_sorted_avx512(int32_t* a, size_t n) { const __m512i shuffle_pattern = _mm512_setr_epi32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15); size_t i = 0; while (i < n - 16) { const __m512i curr = _mm512_loadu_si512(reinterpret_cast<const __m512i*>(a + i)); ...
#include <immintrin.h> bool is_sorted_avx512(int32_t* a, size_t n) { static const __m512i shuffle_pattern = _mm512_setr_epi32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15); size_t i = 0; while (i < n - 16) { const __m512i curr = _mm512_loadu_si512(reinterpret_cast<const __m512i*>(a + i))...
Use static array --- const may not be sufficient
Use static array --- const may not be sufficient
C++
bsd-2-clause
WojciechMula/toys,WojciechMula/toys,WojciechMula/toys,WojciechMula/toys,WojciechMula/toys
da3a48b9680e3c82436fbe90f90c99c9bab20d4a
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
littlstar/chromium.src,dednal/chromium.src,rogerwang/chromium,nacl-webkit/chrome_deps,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,littlstar/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-cr...
01a7c3ec9ca4a8a6731a88c665a77b42f9b35c13
src/libzerocoin/sigma/test/coin_tests.cpp
src/libzerocoin/sigma/test/coin_tests.cpp
#include "../Coin.h" #include "../Params.h" #include "../../../streams.h" #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(sigma_coin_tests) BOOST_AUTO_TEST_CASE(pubcoin_serialization) { secp_primitives::GroupElement coin; coin.randomize(); sigma::PublicCoinV3 pubcoin(coin, sigma::ZQ_GOLDWASSER...
#include "../Coin.h" #include "../Params.h" #include "../../../streams.h" #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(sigma_coin_tests) BOOST_AUTO_TEST_CASE(pubcoin_serialization) { secp_primitives::GroupElement coin; coin.randomize(); sigma::PublicCoinV3 pubcoin(coin, sigma::ZQ_GOLDWASSER...
Add coin serialize deserialize priv coin
Add coin serialize deserialize priv coin
C++
mit
zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin
6ce8a8ec5f1a583ddbfe896336dde917ea5c4620
renderdoc/os/posix/apple/apple_hook.cpp
renderdoc/os/posix/apple/apple_hook.cpp
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2016-2017 Baldur Karlsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in...
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2016-2017 Baldur Karlsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in...
Apply same fix to apple
Apply same fix to apple
C++
mit
Zorro666/renderdoc,Zorro666/renderdoc,googlestadia/renderdoc,baldurk/renderdoc,cgmb/renderdoc,TurtleRockStudios/renderdoc_public,baldurk/renderdoc,TurtleRockStudios/renderdoc_public,baldurk/renderdoc,baldurk/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,etnlGD/renderdoc,etnlGD/renderdoc,cgmb/renderdoc,TurtleRockStudio...
dab961768ecc94288daad2db201f59ca71349b18
ep1/ep1.cpp
ep1/ep1.cpp
// ep1.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <gtest\gtest.h> int _tmain(int argc, _TCHAR* argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
// ep1.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <memory> #include <gtest\gtest.h> using namespace std; struct Foo { virtual int Plus(int left, int right) { return 2; } }; struct Bar : public Foo { virtual int Plus(int left, short right) { ...
Add two tests to demo 'override' specifier.
Add two tests to demo 'override' specifier.
C++
mit
codingdojotw/CppMiniTutorial,codingdojotw/CppMiniTutorial,codingdojotw/CppMiniTutorial,codingdojotw/CppMiniTutorial
e64d760ad3f44170c92a7398710c1b4f30b02b8c
src/test/sanity_tests.cpp
src/test/sanity_tests.cpp
// Copyright (c) 2012-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "compat/sanity.h" #include "key.h" #include "test/test_bitcoin.h" #include <boost/test/unit_test.hpp> BOOST_FIXTUR...
// Copyright (c) 2012-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "compat/sanity.h" #include "key.h" #include "test/test_bitcoin.h" #include <boost/test/unit_test.hpp> BOOST_FIXTUR...
Add the sanity test for libsodium.
Add the sanity test for libsodium. Tested: ./src/test/test_bitcoin --run_test=sanity_tests
C++
mit
spiritlinxl/BTCGPU,BTCGPU/BTCGPU,StarbuckBG/BTCGPU,h4x3rotab/BTCGPU,shelvenzhou/BTCGPU,shelvenzhou/BTCGPU,h4x3rotab/BTCGPU,StarbuckBG/BTCGPU,spiritlinxl/BTCGPU,h4x3rotab/BTCGPU,h4x3rotab/BTCGPU,BTCGPU/BTCGPU,h4x3rotab/BTCGPU,spiritlinxl/BTCGPU,BTCGPU/BTCGPU,shelvenzhou/BTCGPU,StarbuckBG/BTCGPU,BTCGPU/BTCGPU,shelvenzhou...
feea673502d89090d1e13c570a8e28cdd8147a42
test/scene/texture/checkerboard_test.cc
test/scene/texture/checkerboard_test.cc
/* * Unit tests for the checkerboard. * Author: Dino Wernli */ #include <gtest/gtest.h> #include "scene/texture/checkerboard.h" #include "test/test_util.h" namespace { static IntersectionData DataWithCoords(Scalar ss, Scalar tt) { Ray r(Point3(0, 0, 0), Vector3(0, 0, 1)); IntersectionData data(r); data.tex...
/* * Unit tests for the checkerboard. * Author: Dino Wernli */ #include <gtest/gtest.h> #include "scene/texture/checkerboard.h" #include "test/test_util.h" namespace { static IntersectionData DataWithCoords(Scalar ss, Scalar tt) { Ray r(Point3(0, 0, 0), Vector3(0, 0, 1)); IntersectionData data(r); data.tex...
Fix failing test due to missing checkerboard constructor param.
Fix failing test due to missing checkerboard constructor param.
C++
mit
dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer
5bff1601d98f15447211078231381376b71ce634
src/autowiring/auto_id.cpp
src/autowiring/auto_id.cpp
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved. #include "stdafx.h" #include "auto_id.h" using namespace autowiring; // Index that will be given to the next auto_id instance. Zero is reserved. static int s_index = 1; const auto_id_block auto_id_t<void>::s_block{ 0, &typeid(void), &typeid(s<v...
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved. #include "stdafx.h" #include "auto_id.h" using namespace autowiring; // Index that will be given to the next auto_id instance. Zero is reserved. static int s_index = 1; const auto_id_block auto_id_t<void>::s_block{ 0, &typeid(void), &typeid(s<v...
Fix msvc14 64-bit release mode linker error
Fix msvc14 64-bit release mode linker error We declare but never explicitly define the void `init` blocks. Somehow this still works on every other build configuration, but not VC2015 release mode. Fix this.
C++
apache-2.0
leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring
69d4b9e5fae49570c37ae8597fe3618094129f8e
cpp/codearea.cc
cpp/codearea.cc
#include "codearea.h" #include <algorithm> namespace openlocationcode { const double kLatitudeMaxDegrees = 90; const double kLongitudeMaxDegrees = 180; CodeArea::CodeArea(double latitude_lo, double longitude_lo, double latitude_hi, double longitude_hi, size_t code_length) { latitude_lo_ = latit...
#include "codearea.h" #include <algorithm> namespace openlocationcode { const double kLatitudeMaxDegrees = 90; const double kLongitudeMaxDegrees = 180; CodeArea::CodeArea(double latitude_lo, double longitude_lo, double latitude_hi, double longitude_hi, size_t code_length) { latitude_lo_ = latit...
Fix obsolete structure init in CodeArea::GetCenter()
Fix obsolete structure init in CodeArea::GetCenter() Fix structure initialization syntax which is non-standard and "obsolete since GCC 2.5" (https://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Designated-Inits.html). Just use the C99 style, as anything else doesn't work even with recent Microsoft compilers.
C++
apache-2.0
zongweil/open-location-code,bocops/open-location-code,zongweil/open-location-code,bocops/open-location-code,google/open-location-code,bocops/open-location-code,google/open-location-code,google/open-location-code,zongweil/open-location-code,google/open-location-code,zongweil/open-location-code,bocops/open-location-code,...
4ca5af44cb26e7b24dfa18d8ccb9a35616e311a8
impeller/archivist/archivist_fixture.cc
impeller/archivist/archivist_fixture.cc
// Copyright 2013 The Flutter 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 "impeller/archivist/archivist_fixture.h" #include "flutter/fml/paths.h" namespace impeller { namespace testing { ArchivistFixture::ArchivistFix...
// Copyright 2013 The Flutter 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 "impeller/archivist/archivist_fixture.h" #include "flutter/fml/paths.h" namespace impeller { namespace testing { ArchivistFixture::ArchivistFix...
Fix temporary database file deletion.
Fix temporary database file deletion.
C++
bsd-3-clause
flutter/engine,rmacnak-google/engine,chinmaygarde/flutter_engine,chinmaygarde/flutter_engine,rmacnak-google/engine,chinmaygarde/flutter_engine,flutter/engine,flutter/engine,rmacnak-google/engine,rmacnak-google/engine,rmacnak-google/engine,flutter/engine,rmacnak-google/engine,devoncarew/engine,devoncarew/engine,devoncar...
04b0cf4e1e16c3dc7f5ea9702ffe407586d4f9de
chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_mac.cc
chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_mac.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h" namespace extensions { bool CpuInfoProvider::QueryCpuTimePerProcessor(s...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h" #include <mach/mach_host.h> #include "base/mac/scoped_mach_port.h" nam...
Add code to implement querying CPU time for each processor on Mac for systemInfo.cpu API.
Add code to implement querying CPU time for each processor on Mac for systemInfo.cpu API. BUG=136519 TEST=None Review URL: https://chromiumcodereview.appspot.com/11233037 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@164863 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Fireblend/chromium-c...
a4b43089879ec8c7a8daf05b98eb1f0671a04690
skia/ext/opacity_filter_canvas.cc
skia/ext/opacity_filter_canvas.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 "skia/ext/opacity_filter_canvas.h" #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkTLazy.h" namespa...
// 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 "skia/ext/opacity_filter_canvas.h" #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkTLazy.h" namespa...
Use the canvas-based SkPaintFilterCanvas ctor in OpacityFilterCanvas
Use the canvas-based SkPaintFilterCanvas ctor in OpacityFilterCanvas Using the new constructor ensures that the proxy canvas is correctly initialized with the target canvas state. BUG=516790 R=reed@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/1287203004 Cr-Commit-Position: 972c6d...
C++
bsd-3-clause
CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/...
446ee1b23461f45803027a4f23b58b370c5b9f37
3RVX/Slider/SliderKnob.cpp
3RVX/Slider/SliderKnob.cpp
#include "SliderKnob.h" SliderKnob::SliderKnob(std::wstring bitmapName, int x, int y, int width, int height) : Meter(bitmapName, x, y, 1), _track(x, y, width, height) { _units = _track.Width - _rect.Width; } Gdiplus::Rect SliderKnob::Location() { return _rect; } void SliderKnob::Draw(Gdiplus::Bitmap *buf...
#include "SliderKnob.h" SliderKnob::SliderKnob(std::wstring bitmapName, int x, int y, int width, int height) : Meter(bitmapName, x, y, 1), _track(x, y, width, height) { _units = _track.Width - _rect.Width; } Gdiplus::Rect SliderKnob::Location() { return _rect; } void SliderKnob::Draw(Gdiplus::Bitmap *buf...
Update for new rect tracking
Update for new rect tracking
C++
bsd-2-clause
malensek/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX
b68ab1d5e02914932fa2f73100297e4c88821688
Code/Apps/mpMyFirstApp.cpp
Code/Apps/mpMyFirstApp.cpp
/*============================================================================= MYPROJECT: A software package for whatever. Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FO...
/*============================================================================= MYPROJECT: A software package for whatever. Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FO...
Make sure Im using Boost libraries, not just headers.
Make sure Im using Boost libraries, not just headers.
C++
bsd-3-clause
MattClarkson/CMakeCatchTemplate,MattClarkson/CMakeCatchTemplate,MattClarkson/CMakeCatchTemplate,MattClarkson/CMakeCatchTemplate
4d7498067fe41b496de83acef87dcb3b8ba12acc
fade_effect.cpp
fade_effect.cpp
#include "fade_effect.h" unsigned int FadeEffect::maxDelay() { return -1; } void FadeEffect::init() { // Handle a corner case in which the update just increments // a color and overflows the byte if( R() == 255 ) R(254); if( G() == 255 ) G(254); if( B() == 255 ) R(254); stage = 0; rend...
#include "fade_effect.h" unsigned int FadeEffect::maxDelay() { return -1; } void FadeEffect::init() { // Handle a corner case in which the update just increments // a color and overflows the byte if( R() == 255 ) R(254); if( G() == 255 ) G(254); if( B() == 255 ) R(254); if( R() == 0 ) R(1)...
Handle another fade effect corner case when colour is black
Handle another fade effect corner case when colour is black
C++
mit
hacktag/LEDOS,hacktag/LEDOS
338aaedf47b3b5a68f78a716c741cfd997f99025
src/main.cpp
src/main.cpp
// Nikita Kouevda // 2013/11/01 #include <iostream> #include "prime.hpp" using namespace std; int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Usage: prime number ..." << endl; return 1; } for (int i = 1; i < argc; ++i) { cout << argv[i] << " is"; if (!isPrime(atol(argv[i]))) { ...
// Nikita Kouevda // 2013/11/04 #include <iostream> #include "prime.hpp" using namespace std; int main(int argc, char *argv[]) { int i, n; char *endptr; if (argc < 2) { cerr << "usage: prime number ..." << endl; return 1; } for (i = 1; i < argc; ++i) { n = strtol(argv[i], &endptr, 10); ...
Use strtol instead of atol; verify conversion.
Use strtol instead of atol; verify conversion.
C++
mit
nkouevda/prime,nkouevda/prime
8f2cdce5a4671f4add7eb0fb339be6982d35e68f
server/handlers/MediaServiceHandler.cpp
server/handlers/MediaServiceHandler.cpp
#include "MediaServiceHandler.h" using namespace ::com::kurento::kms::api; namespace com { namespace kurento { namespace kms { MediaServerServiceHandler::MediaServerServiceHandler() { manager = MediaSessionManager::getInstance(); } MediaServerServiceHandler::~MediaServerServiceHandler() { MediaSessionManager::re...
#include "MediaServiceHandler.h" #include "log.h" using namespace ::com::kurento::kms::api; using ::com::kurento::log::Log; static Log l("MediaServiceHandler"); #define d(...) aux_debug(l, __VA_ARGS__); #define i(...) aux_info(l, __VA_ARGS__); namespace com { namespace kurento { namespace kms { MediaServerService...
Add basic log on MediaService
Add basic log on MediaService
C++
lgpl-2.1
todotobe1/kurento-media-server,Kurento/kurento-media-server,TribeMedia/kurento-media-server,shelsonjava/kurento-media-server,lulufei/kurento-media-server,TribeMedia/kurento-media-server,todotobe1/kurento-media-server,mparis/kurento-media-server,mparis/kurento-media-server,lulufei/kurento-media-server,shelsonjava/kurent...
9cc8fa72a3f23a7233866127dab85808b3f987ce
test/FrontendC++/2009-06-30-ByrefBlock.cpp
test/FrontendC++/2009-06-30-ByrefBlock.cpp
// Insure __block_holder_tmp is allocated on the stack. // RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca} // <rdar://problem/5865221> extern void fubar_dispatch_sync(void (^PP)(void)); void fubar() { __block void *voodoo; fubar_dispatch_sync(^(void){voodoo=0;}); }
// Insure __block_holder_tmp is allocated on the stack. Darwin only. // RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca} // XFAIL: * // XTARGET: darwin // <rdar://problem/5865221> // END. extern void fubar_dispatch_sync(void (^PP)(void)); void fubar() { __block void *voodoo; fubar_dispatch_sync(^(v...
Mark this test as Darwin only. Patch by Bill Wendling.
Mark this test as Darwin only. Patch by Bill Wendling. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@74829 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/...
03a972ec555cf01d9604254357e0a5274a81e371
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 #ifdef __GLIBC__ #include <execinfo.h> #endif #include <unistd.h> #endif // FreeBSD uses size_t for the return type of backtrace() #if define...
// StackTrace.cpp // Implements the functions to print current stack traces #include "Globals.h" #include "StackTrace.h" #ifdef _WIN32 #include "../StackWalker.h" #else #ifdef __GLIBC__ #include <execinfo.h> #endif #include <unistd.h> #endif void PrintStackTrace(void) { #ifdef _WIN32 // Reuse the Stack...
Use C++11 auto instead of per-platform types.
Use C++11 auto instead of per-platform types. Closes #2686.
C++
apache-2.0
birkett/MCServer,QUSpilPrgm/cuberite,johnsoch/cuberite,birkett/MCServer,mc-server/MCServer,QUSpilPrgm/cuberite,Fighter19/cuberite,ionux/MCServer,nounoursheureux/MCServer,Fighter19/cuberite,birkett/cuberite,Altenius/cuberite,nounoursheureux/MCServer,kevinr/cuberite,Fighter19/cuberite,Frownigami1/cuberite,mc-server/MCSer...
45f9a802ebbb8a16c4924307bd39635cb8fa62e6
main.cpp
main.cpp
// Includes. #include "UI/mainwindow.h" #include "App/App.h" #include "App/Factories/TextFileNFDelegate.h" #include "System/QtBasedFileSystem.h" // Qt. #include <QApplication> QString titleString() { QString name = QString::fromStdString(App::appName()); QString version = QString::fromStdString(App::appVer...
// Includes. #include "UI/mainwindow.h" #include "App/App.h" #include "System/QtBasedFileSystem.h" // Qt. #include <QApplication> QString titleString() { QString name = QString::fromStdString(App::appName()); QString version = QString::fromStdString(App::appVersion()); return QString("%1 - v%2").arg(nam...
Stop using redundant class TextFileNFDelegate.
Stop using redundant class TextFileNFDelegate.
C++
mit
jefaramvangorp/nodin
e4e64becb78bbef54e623f22da4e4f4729d30304
content/browser/renderer_host/render_view_host_observer.cc
content/browser/renderer_host/render_view_host_observer.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/renderer_host/render_view_host_observer.h" #include "content/browser/renderer_host/render_view_host.h" RenderViewHostObser...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/renderer_host/render_view_host_observer.h" #include "content/browser/renderer_host/render_view_host.h" RenderViewHostObser...
Fix heap corruption that occurs when RenderViewHostObserver calls RenderViewHost to unregister when the latter is in its destructor.
Fix heap corruption that occurs when RenderViewHostObserver calls RenderViewHost to unregister when the latter is in its destructor. TBR=dmichael Review URL: http://codereview.chromium.org/6813043 git-svn-id: http://src.chromium.org/svn/trunk/src@80946 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 14f59872a...
C++
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
13f693230bff6e2cdda360ed7478895c88ece9e9
constrained_ik/src/enum_types.cpp
constrained_ik/src/enum_types.cpp
#include <constrained_ik/enum_types.h> #include <ros/console.h> using namespace constrained_ik::constraint_types; const std::string ConstraintType::names_[] = {"Primary", "Auxiliary", "Inactive"}; const std::map<std::string, ConstraintTypes> ConstraintType::name_to_enum_map_ = boost::assign::map_list_of ("Primary", P...
#include <constrained_ik/enum_types.h> #include <ros/console.h> using namespace constrained_ik::constraint_types; const std::string ConstraintType::names_[] = {"Primary", "Auxiliary", "Inactive"}; const std::map<std::string, ConstraintTypes> ConstraintType::name_to_enum_map_ = boost::assign::map_list_of ("primary", P...
Make ConstraintType::stringToEnum not case sensitive
Make ConstraintType::stringToEnum not case sensitive
C++
apache-2.0
bmagyar/industrial_moveit,ros-industrial/industrial_moveit,bmagyar/industrial_moveit,ros-industrial/industrial_moveit
f1e30104a5a671b19d3aa2cb78fd9ae705054cc7
examples/stm32f4_discovery/uart/main.cpp
examples/stm32f4_discovery/uart/main.cpp
#include <xpcc/architecture.hpp> #include "../stm32f4_discovery.hpp" // ---------------------------------------------------------------------------- MAIN_FUNCTION { defaultSystemClock::enable(); LedOrange::setOutput(xpcc::Gpio::High); LedGreen::setOutput(xpcc::Gpio::Low); LedRed::setOutput(xpcc::Gpio::High); Led...
#include <xpcc/architecture.hpp> #include "../stm32f4_discovery.hpp" // ---------------------------------------------------------------------------- /** * Very basic example of USART usage. * The ASCII sequence 'A', 'B', 'C, ... , 'Z', 'A', 'B', 'C', ... * is printed with 9600 baud, 8N1 at pin PA3. */ MAIN_FUNCT...
Document what is expected from UART example
Document what is expected from UART example
C++
bsd-3-clause
chrism333/xpcc,chrism333/xpcc,chrism333/xpcc,dergraaf/xpcc,chrism333/xpcc,dergraaf/xpcc,dergraaf/xpcc,dergraaf/xpcc
f45431518ca6f315eb4948260b9e94e87fc8e53c
examples/hapticsquare/hapticbutton.cpp
examples/hapticsquare/hapticbutton.cpp
#include "hapticbutton.h" #include <QPainter> HapticButton::HapticButton(const QString &label) : QWidget(0), m_label(label), m_checked(false), m_checkable(false) { setMinimumSize(100, 100); } void HapticButton::mousePressEvent(QMouseEvent *) { if (m_checkable) { m_checked = !m_checked; emi...
#include "hapticbutton.h" #include <QPainter> HapticButton::HapticButton(const QString &label) : QWidget(0), m_label(label), m_checked(false), m_checkable(false) { setMinimumSize(100, 100); } void HapticButton::mousePressEvent(QMouseEvent *) { if (m_checkable) { m_checked = !m_checked; emi...
Fix cropped hapticsquare buttons on devices
Fix cropped hapticsquare buttons on devices Task: MOBILITY-1826
C++
lgpl-2.1
qtproject/qt-mobility,qtproject/qt-mobility,qtproject/qt-mobility,enthought/qt-mobility,kaltsi/qt-mobility,kaltsi/qt-mobility,KDE/android-qt-mobility,tmcguire/qt-mobility,tmcguire/qt-mobility,qtproject/qt-mobility,enthought/qt-mobility,enthought/qt-mobility,kaltsi/qt-mobility,enthought/qt-mobility,tmcguire/qt-mobility,...
a91ed49e46b3622f5fc83adf73e783ca0cf4898a
src/core/formatter.cc
src/core/formatter.cc
#include <ccspec/core/formatter.h> namespace ccspec { namespace core { using std::exception_ptr; using std::list; using std::ostream; // public methods. void Formatter::examplePassed(const ExecutionResult& execution_result) const { (void) execution_result; } void Formatter::exampleFailed(const ExecutionResult&...
#include <ccspec/core/formatter.h> namespace ccspec { namespace core { using std::exception_ptr; using std::list; using std::ostream; // public methods. void Formatter::examplePassed(const ExecutionResult&) const {} void Formatter::exampleFailed(const ExecutionResult&) const {} void Formatter::afterEachHookFailed...
Remove formal parameters to avoid complier warning
Remove formal parameters to avoid complier warning The compiler warning for unused variables can be avoided by leaving out the formal parameters instead of doing a void cast no-op.
C++
mit
michaelachrisco/ccspec,tempbottle/ccspec,michaelachrisco/ccspec,tempbottle/ccspec,tempbottle/ccspec,zhangsu/ccspec,zhangsu/ccspec,zhangsu/ccspec,michaelachrisco/ccspec
74513e16bb22e07866d13a173224ad802cbb4733
src/cpp/src/IMPL/LCIOExceptionHandler.cc
src/cpp/src/IMPL/LCIOExceptionHandler.cc
#include <exception> #include <iostream> #include <cstdlib> #include "IMPL/LCIOExceptionHandler.h" namespace IMPL { // create one globale instance of the handler LCIOExceptionHandler* LCIOExceptionHandler::_me = 0 ; /** Method catches any std::exception, prints the message to stdout * and then exits the prog...
#include <exception> #include <iostream> #include <cstdlib> #include "IMPL/LCIOExceptionHandler.h" namespace IMPL { // create one globale instance of the handler LCIOExceptionHandler* LCIOExceptionHandler::_me = 0 ; /** Method catches any std::exception, prints the message to stdout * and then exits the prog...
Remove deprecated set_unexpected and set_terminate
Remove deprecated set_unexpected and set_terminate
C++
bsd-3-clause
iLCSoft/LCIO,iLCSoft/LCIO,petricm/LCIO,iLCSoft/LCIO,petricm/LCIO,petricm/LCIO,iLCSoft/LCIO,petricm/LCIO,petricm/LCIO,petricm/LCIO,iLCSoft/LCIO,iLCSoft/LCIO
f246976d6cc90f8e529696f23bf09825af465425
src/compile.cc
src/compile.cc
#include "./compile.h" #include "tree_sitter/compiler.h" namespace node_tree_sitter_compiler { using namespace v8; NAN_METHOD(Compile) { String::Utf8Value grammar_json(info[0]); TSCompileResult compile_result = ts_compile_grammar(*grammar_json); if (compile_result.error_message) { Local<Value> error = Nan...
#include "./compile.h" #include "tree_sitter/compiler.h" namespace node_tree_sitter_compiler { using namespace v8; NAN_METHOD(Compile) { String::Utf8Value grammar_json(info[0]); TSCompileResult compile_result = ts_compile_grammar(*grammar_json); if (compile_result.error_type != TSCompileErrorTypeNone) { L...
Use the error_type field to check for errors
Use the error_type field to check for errors
C++
mit
maxbrunsfeld/node-tree-sitter-compiler,tree-sitter/tree-sitter-cli,tree-sitter/tree-sitter-cli,maxbrunsfeld/node-tree-sitter-compiler,maxbrunsfeld/node-tree-sitter-compiler,tree-sitter/node-tree-sitter-compiler,tree-sitter/node-tree-sitter-compiler,tree-sitter/tree-sitter-cli,tree-sitter/node-tree-sitter-compiler,tree-...
356d4864105ed7258fa137c12253eac2b7cc705d
src/platform/pic32/platform.cpp
src/platform/pic32/platform.cpp
#include "platform/platform.h" #include "WProgram.h" void openxc::platform::initialize() { // this is required to initialize the Wiring library from MPIDE's toolchain // (inspired by Arduino) init(); }
#include "platform/platform.h" #include "WProgram.h" extern "C" { extern void __use_isr_install(void); __attribute__((section(".comment"))) void (*__use_force_isr_install)(void) = &__use_isr_install; } void openxc::platform::initialize() { // this is required to initialize the Wiring library from MPIDE's toolchai...
Install ISR on PIC32 with updated build script.
Install ISR on PIC32 with updated build script.
C++
bsd-3-clause
ene-ilies/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware
b3fab13856ed0821e308e02ca60aa0f72cb93330
test/Layout/itanium-union-bitfield.cpp
test/Layout/itanium-union-bitfield.cpp
// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \ // RUN: | FileCheck %s union A { int f1: 3; A(); }; A::A() {} union B { int f1: 69; B(); }; B::B() {} // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union A // CHECK-NEXT: 0 | i...
// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \ // RUN: | FileCheck %s union A { int f1: 3; A(); }; A::A() {} union B { char f1: 35; B(); }; B::B() {} // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union A // CHECK-NEXT: 0 | ...
Test case B is updated to work for 32-bit and 64-bit platforms
Test case B is updated to work for 32-bit and 64-bit platforms git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@220271 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,apple/swift-clang,llvm-mirror/cl...
5e771671f1dddbf3da6ff9be1de3c093c67e8825
importer/src/utils.cpp
importer/src/utils.cpp
#include "utils.h" #include <nlohmann/json.hpp> using json = nlohmann::json; std::string get_with_def(const std::map<std::string, std::string> &m, const std::string &key, const std::string &defval) { auto it = m.find(key); if (it == m.end()) return defval; return it->second; } std...
#include "utils.h" #include <nlohmann/json.hpp> using json = nlohmann::json; std::string get_with_def(const std::map<std::string, std::string> &m, const std::string &key, const std::string &defval) { auto it = m.find(key); if (it == m.end()) return defval; return it->second; } std...
Use full tag for buildings if available
Use full tag for buildings if available
C++
mit
rinigus/geocoder-nlp,rinigus/geocoder-nlp,rinigus/geocoder-nlp
a756253127376bb2c81e9788127250fae57cfb89
test_package/package_test.cpp
test_package/package_test.cpp
#include "utils/LinearAlg2D.h" int main(int argc, char** argv) { // Pick a function that's not defined in the header. const float angle = cura::LinearAlg2D::getAngleLeft ( cura::Point(1.0, 1.0), cura::Point(1.0, 2.0), cura::Point(3.0, 3.0) ); return (angle != 0.f) ? 0 : 1; }
#include "settings/Settings.h" // For the default definition of 'CURA_ENGINE_VERSION' if none is given. #include "utils/LinearAlg2D.h" // For testing calling a simple non-header function. #include <cstdio> int main(int argc, char** argv) { // Test which version do we have here? std::fprintf(stdout, "test-package ...
Debug which version is build with test-package.
Debug which version is build with test-package. part of CURA-8830
C++
agpl-3.0
Ultimaker/CuraEngine,Ultimaker/CuraEngine
a48c6b9e4aef0566f726753bf28173f00cc3c108
src/threads/part3/recursive_problem.cpp
src/threads/part3/recursive_problem.cpp
#include <thread> #include <mutex> struct Complex { std::mutex mutex; int i; Complex() : i(0) {} void mul(int x){ std::lock_guard<std::mutex> lock(mutex); i *= x; } void div(int x){ std::lock_guard<std::mutex> lock(mutex); i /= x; } void both(int x, ...
//======================================================================= // Copyright (c) 2014 Baptiste Wicht // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //=======================================================================...
Set the code to MIT license
Set the code to MIT license
C++
mit
wichtounet/articles,HankFaan/articles
dca97dd5dab315e82be6dad0d90c51b030bea531
test/CXX/lex/lex.pptoken/p3-0x.cpp
test/CXX/lex/lex.pptoken/p3-0x.cpp
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s int a<::> = { 1, 2, 3 }; int b = a<:::a<:0:>:>; bool c = a<:0:><::b; template<int &n> void f() {} template void f<::b>(); #define x a<:: ## : b :> int d = x; // expected-error {{pasting formed ':::', an invalid preprocessing token}} expected-error {{expected unq...
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s int a<::> = { 1, 2, 3 }; int b = a<:::a<:0:>:>; bool c = a<:0:><::b; template<int &n> void f() {} template void f<::b>(); #define x a<:: ## : b :> int d = x; // expected-error {{pasting formed ':::', an invalid preprocessing token}} expected-error {{expected unq...
Test that we correctly handle reversion of line splicing etc in raw string literals. As suggested by Sean Silva.
Test that we correctly handle reversion of line splicing etc in raw string literals. As suggested by Sean Silva. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@172694 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-cl...
18d236b6fb8e5abdb3519ed47d499ac6c251c6aa
InitWeightsTest/InitWeightTestProbe.cpp
InitWeightsTest/InitWeightTestProbe.cpp
/* * InitWeightTestProbe.cpp * * Created on: Sep 6, 2011 * Author: kpeterson */ #include "InitWeightTestProbe.hpp" #include "../PetaVision/src/include/pv_arch.h" #include "../PetaVision/src/layers/HyPerLayer.hpp" #include <string.h> #include <assert.h> namespace PV { InitWeightTestProbe::InitWeightTestPro...
/* * InitWeightTestProbe.cpp * * Created on: Sep 6, 2011 * Author: kpeterson */ #include "InitWeightTestProbe.hpp" #include "../PetaVision/src/include/pv_arch.h" #include "../PetaVision/src/layers/HyPerLayer.hpp" #include <string.h> #include <assert.h> namespace PV { InitWeightTestProbe::InitWeightTestPro...
Fix thresholds of fMin, fMax and avg for test to pass
Fix thresholds of fMin, fMax and avg for test to pass git-svn-id: 173bfced7225b0a4144fa0e9d72f2fb8f54e5b79@4214 7c0444ca-5550-0410-9008-faecdbe78eb5
C++
epl-1.0
dpaiton/OpenPV,PetaVision/OpenPV,PetaVision/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV,PetaVision/OpenPV,dpaiton/OpenPV,PetaVision/OpenPV,PetaVision/OpenPV
d1476b855761795a52b5021b8995b244bf2ba248
unit_tests/sequence_tests.cpp
unit_tests/sequence_tests.cpp
#include "unit_tests/tests.hpp" #include "grune/non_terminal.hpp" using namespace grune; class sequence_tests : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(sequence_tests); CPPUNIT_TEST(test_to_string); CPPUNIT_TEST_SUITE_END(); public: void test_to_string() { non_terminal A("A"); ...
#include "unit_tests/tests.hpp" #include "grune/non_terminal.hpp" using namespace grune; BOOST_AUTO_TEST_SUITE(sequence_tests) void test_to_string() { non_terminal A("A"); non_terminal B("B"); symbol c("c"); sequence s { A, B, c }; std::string expected = "A, B, \"c\""; BOOST_CHECK_EQUAL(exp...
Convert sequence tests to Boost UTF
Convert sequence tests to Boost UTF
C++
mit
Fifty-Nine/grune
96eb52d1fb0bc8d0dd3f8222a4b9a7f883c2675e
src/lib/src/login/http-post-login.cpp
src/lib/src/login/http-post-login.cpp
#include "login/http-post-login.h" #include <QNetworkRequest> #include <QUrlQuery> #include "models/site.h" #include "network/network-manager.h" HttpPostLogin::HttpPostLogin(HttpAuth *auth, Site *site, NetworkManager *manager, MixedSettings *settings) : HttpLogin("post", auth, site, manager, settings) {} NetworkRep...
#include "login/http-post-login.h" #include <QNetworkRequest> #include <QUrlQuery> #include "models/site.h" #include "network/network-manager.h" HttpPostLogin::HttpPostLogin(HttpAuth *auth, Site *site, NetworkManager *manager, MixedSettings *settings) : HttpLogin("post", auth, site, manager, settings) {} NetworkRep...
Fix encoding of data in HTTP POST login
Fix encoding of data in HTTP POST login
C++
apache-2.0
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
218423674af8b9679c380713202b4e182d7dc584
costmap_3d/src/local_map_2d_publisher.cpp
costmap_3d/src/local_map_2d_publisher.cpp
#include <ros/ros.h> #include <nav_msgs/OccupancyGrid.h> int main(int argc, char *argv[]){ ros::init(argc, argv, "local_map_2d_publisher"); ros::NodeHandle node; ros::Publisher map_lc_pub = node.advertise<nav_msgs::OccupancyGrid>("local_map", 1); const int size = 5; nav_msgs::OccupancyGrid map_lc...
#include <ros/ros.h> #include <nav_msgs/OccupancyGrid.h> int main(int argc, char *argv[]){ ros::init(argc, argv, "local_map_2d_publisher"); ros::NodeHandle node; ros::Publisher map_lc_pub = node.advertise<nav_msgs::OccupancyGrid>("local_map", 1); const int size = 5; nav_msgs::OccupancyGrid map_lc...
Fix illegal access to member
Fix illegal access to member
C++
bsd-3-clause
DaikiMaekawa/quadrotor_navigation
95527cf28ddb3f69684ba70204e5f2e95915bf2e
tests/MedianOfTwoSortedArraysTest.cpp
tests/MedianOfTwoSortedArraysTest.cpp
#include "catch.hpp" #include "MedianOfTwoSortedArrays.hpp" TEST_CASE("Median Of Two Sorted Arrays") { Solution s; SECTION("Two nums are empty") { vector<int> nums1; vector<int> nums2; REQUIRE(s.findMedianSortedArrays(nums1, nums2) == 0.0); } SECTION("Two nums do not overlap") { vector<int> ...
#include "catch.hpp" #include "MedianOfTwoSortedArrays.hpp" TEST_CASE("Median Of Two Sorted Arrays") { Solution s; SECTION("Two nums are empty") { vector<int> nums1; vector<int> nums2; REQUIRE(s.findMedianSortedArrays(nums1, nums2) == 0.0); } SECTION("Two nums do not overlap (even case)") { ...
Update Problem 4 test case
Update Problem 4 test case
C++
mit
yanzhe-chen/leetcode
76801e89320c396f97787dab36bdd038a3ea006e
trunk/engine/qt-frontend/main.cpp
trunk/engine/qt-frontend/main.cpp
#include "../src/engine.h" #include "drawdevice.h" #include <QtGui> int main(int argc, char *argv[]) { Engine *eng = new Engine; if (!eng->loadWorldFromFile("world.rooms")) { eng->getLogger()->write("ERROR: cannot load world.rooms!", Log::ERROR); delete eng; return 1; } QAp...
#include "../src/engine.h" #include "drawdevice.h" #include <QtGui> int main(int argc, char *argv[]) { Engine *eng = new Engine; if (!eng->loadWorldFromFile("world.rooms")) { eng->getLogger()->write("ERROR: cannot load world.rooms!", Log::ERROR); delete eng; return 1; } QAp...
Use resize to specify the size of the central widget
Use resize to specify the size of the central widget
C++
mit
develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms
bb697e9fc76b1a9ad412aaf9b94855f1acb05f2a
gui/src/theme-loader.cpp
gui/src/theme-loader.cpp
#include "theme-loader.h" #include <QDir> #include <QApplication> ThemeLoader::ThemeLoader(QString path) : m_path(path) {} QStringList ThemeLoader::getAllThemes() const { return QDir(m_path).entryList(QDir::Dirs | QDir::NoDotAndDotDot); } bool ThemeLoader::setTheme(QString name) { QFile f(m_path + "/" + name + ...
#include "theme-loader.h" #include <QDir> #include <QApplication> ThemeLoader::ThemeLoader(QString path) : m_path(path) {} QStringList ThemeLoader::getAllThemes() const { return QDir(m_path).entryList(QDir::Dirs | QDir::NoDotAndDotDot); } bool ThemeLoader::setTheme(QString name) { QString dir = QString(m_path)....
Allow to use relative path images in themes
Allow to use relative path images in themes
C++
apache-2.0
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
e97a8d4c534c25845968562477fd6ef2b502db07
src/EpsilonDashboard/main.cpp
src/EpsilonDashboard/main.cpp
#include "EpsilonDashboard.h" #include <QApplication> #include <QLockFile> #include <QDebug> #include <QDir> int main(int argc, char* argv[]) { QString tmpDir = QDir::tempPath(); QLockFile lockFile(tmpDir + "/epsilonDashboard.lock"); /* Trying to close the Lock File, if the attempt is unsuccessful for 100...
#include "EpsilonDashboard.h" #include <QApplication> #include <QLockFile> #include <QDebug> #include <QDir> int main(int argc, char* argv[]) { #if QT_VERSION >= 0x050600 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QString tmpDir = QDir::tempPath(); QLockFile lockFile(tmpDir + "/ep...
Fix for High DPI Screens
Fix for High DPI Screens
C++
agpl-3.0
UCSolarCarTeam/Epsilon-Dashboard,UCSolarCarTeam/Epsilon-Dashboard,UCSolarCarTeam/Gen-5-Dashboard,UCSolarCarTeam/Epsilon-Dashboard
25c6a087dd8974c1ec1e37733f78bd9f1db351c4
lib/Target/Sparc/SparcTargetAsmInfo.cpp
lib/Target/Sparc/SparcTargetAsmInfo.cpp
//===-- SparcTargetAsmInfo.cpp - Sparc asm properties -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===-- SparcTargetAsmInfo.cpp - Sparc asm properties -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Use mergeable strings sections on sparc
Use mergeable strings sections on sparc git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@54541 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/...
301decfe2d4c0a41210488a6716dbc046aad38c8
src/webchecksieve.cc
src/webchecksieve.cc
#include <emscripten/bind.h> #include "checksieve.h" using namespace emscripten; EMSCRIPTEN_BINDINGS(sieve) { value_object<yy::position>("position") .field("column", &yy::position::column) .field("line", &yy::position::line) ; value_object<yy::location>("location") .field("be...
#include <emscripten/bind.h> #include "checksieve.h" using namespace emscripten; EMSCRIPTEN_BINDINGS(sieve) { value_object<yy::position>("position") .field("column", &yy::position::column) .field("line", &yy::position::line) ; value_object<yy::location>("location") .field("be...
Add bindings for parse_result hints.
Add bindings for parse_result hints.
C++
mit
dburkart/check-sieve,dburkart/check-sieve,dburkart/check-sieve
3fcaf5eaae9c7c44b09aacf77240320ce618ecad
src/v4/qv4unwindhelper.cpp
src/v4/qv4unwindhelper.cpp
#include <qv4unwindhelper.h> #include <wtf/Platform.h> #if CPU(X86_64) && OS(LINUX) # define USE_DW2_HELPER #elif CPU(X86) && OS(LINUX) # define USE_DW2_HELPER #elif OS(WINDOWS) // SJLJ will unwind on Windows # define USE_NULL_HELPER #elif OS(IOS) // SJLJ will unwind on iOS # define USE_NULL_HELPER #elif ...
#include <qv4unwindhelper.h> #include <wtf/Platform.h> #if CPU(X86_64) && (OS(LINUX) || OS(MAC_OS_X)) # define USE_DW2_HELPER #elif CPU(X86) && OS(LINUX) # define USE_DW2_HELPER #elif OS(WINDOWS) // SJLJ will unwind on Windows # define USE_NULL_HELPER #elif OS(IOS) // SJLJ will unwind on iOS # define USE_...
Enable DW2 unwind helper on MacOS.
Enable DW2 unwind helper on MacOS. Change-Id: I1c1671d0b3953ce2e8f57bbf68023731470e3da1 Reviewed-by: Simon Hausmann <a975102812d593b3191088e3d0aeaeb6f11dbcf5@digia.com>
C++
lgpl-2.1
matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,mgrunditz/qtdeclarat...
067d9be9210df8fe7af40063295d175a91284f36
src/vmm/src/lib/CxxAbi.cpp
src/vmm/src/lib/CxxAbi.cpp
#include <cstdlib> extern "C" void __cxa_pure_virtual() { } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); } void operator delete(void *ptr) { free(ptr); } void operator delete[](void *ptr) { free(ptr); }
#include <os/Board.h> #include <cstdio> #include <cstdlib> extern "C" void __cxa_pure_virtual() { printf("__cxa_pure_virtual() called. Probably a bad build.\n"); os::board::shutdown(); } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); } void op...
Add a basic implementation for __cxa_pure_virtual
Add a basic implementation for __cxa_pure_virtual
C++
bsd-3-clause
monocasa/remu-playground,monocasa/remu-playground
b68d5053e67fba80740d2734703c3697e7dbb575
Editor/main.cpp
Editor/main.cpp
#include <GL/glew.h> #include "editor.h" #include <util.h> #include <QtWidgets/QApplication> int main(int argc, char *argv[]) { freopen(util::savePath("editor_log.txt").c_str(), "a", stderr); QApplication a(argc, argv); Editor w; w.show(); return a.exec(); }
#include <GL/glew.h> #include "editor.h" #include <util.h> #include <QtWidgets/QApplication> int main(int argc, char *argv[]) { freopen(util::savePath("editor_log.txt").c_str(), "a", stderr); util::logWithTime("Editor started"); QApplication a(argc, argv); Editor w; w.show(); int result = a.exec(); util::logWi...
Add started and ended timestamps
Add started and ended timestamps Add "Editor started" and "Editor ended" timestamps to editor log.
C++
mit
NinjaDanz3r/NinjaOctopushBurgersOfDoom,NinjaDanz3r/NinjaOctopushBurgersOfDoom
e14bcea68bd5f6443129d429eca00a5bce2ddd10
cpp/iterators/printreverse.cpp
cpp/iterators/printreverse.cpp
#include <iostream> #include <vector> #include <string> #include <cstdlib> int main(int argc, char* argv[]) { using namespace std; vector<string> cmdlineargs(argv+1, argv+argc); for(auto rbiterv=cmdlineargs.rbegin(); rbiterv != cmdlineargs.rend(); ++rbiterv) { auto& arg = *rbiterv; ...
#include <iostream> #include <vector> #include <string> #include <cstdlib> int main(int argc, char* argv[]) { using namespace std; vector<string> cmdlineargs {argv+1, argv+argc}; for(auto rbiterv=cmdlineargs.rbegin(); rbiterv != cmdlineargs.rend(); ++rbiterv) { auto& arg = *rbiterv; ...
Use initializer list syntax to construct the vector of strings
Use initializer list syntax to construct the vector of strings
C++
mit
satishgoda/closetothemachine,satishgoda/closetothemachine
563c80c649e5696a42e1ec32d5dbff90e5404da9
content/browser/device_orientation/data_fetcher_shared_memory_android.cc
content/browser/device_orientation/data_fetcher_shared_memory_android.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 "data_fetcher_shared_memory.h" #include "base/logging.h" #include "data_fetcher_impl_android.h" namespace content { DataFetcherSharedMemory::~...
// 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 "data_fetcher_shared_memory.h" #include "base/logging.h" #include "data_fetcher_impl_android.h" namespace content { DataFetcherSharedMemory::~...
Fix |started_| variable for Device Motion Android data fetcher.
Fix |started_| variable for Device Motion Android data fetcher. Ensure proper stopping of sensors upon fetcher destruction. BUG= Review URL: https://chromiumcodereview.appspot.com/22336011 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@216522 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
TheTypoMaster/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,chuan9/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,dednal/chromium.src,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,littlstar/chromium.src,Jonekee/chromium.src,ch...
3b653aa27591a79200d10b15786d7543043a004e
src/main.cpp
src/main.cpp
#include <chrono> #include <thread> #include "AudioSubsystem.h" #include "AudioSubsystem_OpenAL.h" #include "Decoders/iWaveDataProvider.h" #include "Decoders/WAV/WAVDataProvider.h" #include "Utils.h" int main( int argc, char* argv[] ) { const char* FileName = ( argc > 1 ) ? argv[1] : "test.wav"; auto AudioSubsyste...
#include <chrono> #include <thread> #include "AudioSubsystem.h" #include "AudioSubsystem_OpenAL.h" #include "Decoders/iWaveDataProvider.h" #include "Decoders/WAV/WAVDataProvider.h" #include "Utils.h" int main( int argc, char* argv[] ) { const char* FileName = ( argc > 1 ) ? argv[1] : "test.wav"; auto AudioSubsyste...
Stop the source before exit
Stop the source before exit
C++
mit
corporateshark/PortAMP,corporateshark/PortAMP,corporateshark/PortAMP,corporateshark/PortAMP,corporateshark/PortAMP
0c33b72f642153592e1b132e9ff148d9d9f53dfc
FTP/CurlHandle.cpp
FTP/CurlHandle.cpp
#include "CurlHandle.h" #include <curl/curl.h> namespace embeddedmz { CurlHandle::CurlHandle() { curl_global_init(CURL_GLOBAL_ALL); } CurlHandle::~CurlHandle() { curl_global_cleanup(); } CurlHandle &CurlHandle::instance() { static CurlHandle inst{}; return inst; } } // namespace embeddedmz
#include "CurlHandle.h" #include <curl/curl.h> #include <stdexcept> namespace embeddedmz { CurlHandle::CurlHandle() { const auto eCode = curl_global_init(CURL_GLOBAL_ALL); if (eCode != CURLE_OK) { throw std::runtime_error{"Error initializing libCURL"}; } } CurlHandle::~CurlHandle() { curl_global_cleanup()...
Check error code on curl_init
Check error code on curl_init
C++
mit
embeddedmz/ftpclient-cpp,embeddedmz/ftpclient-cpp,embeddedmz/ftpclient-cpp
04039ac62758e3dcdbe5ac633d0fb53457124710
src/plugins/qmljstools/qmljscodestylesettingsfactory.cpp
src/plugins/qmljstools/qmljscodestylesettingsfactory.cpp
#include "qmljscodestylesettingsfactory.h" #include "qmljscodestylesettingspage.h" #include "qmljstoolsconstants.h" #include <texteditor/tabpreferences.h> #include <texteditor/tabsettings.h> #include <QtGui/QLayout> using namespace QmlJSTools; QmlJSCodeStylePreferencesFactory::QmlJSCodeStylePreferencesFactory() { } ...
#include "qmljscodestylesettingsfactory.h" #include "qmljscodestylesettingspage.h" #include "qmljstoolsconstants.h" #include <texteditor/tabpreferences.h> #include <texteditor/tabsettings.h> #include <QtGui/QLayout> using namespace QmlJSTools; QmlJSCodeStylePreferencesFactory::QmlJSCodeStylePreferencesFactory() { } ...
Fix warning about unused parameter
Fix warning about unused parameter Change-Id: I2844ebae2cd834b187f01b62d414692aa29b0605 Reviewed-on: http://codereview.qt.nokia.com/354 Reviewed-by: Qt Sanity Bot <5581206bb7e0307f0d99eb71898ae6b694149ca5@ovi.com> Reviewed-by: Jarek Kobus <021d51876099fe64879cc5072886d1d0ff71e1ac@nokia.com>
C++
lgpl-2.1
hdweiss/qt-creator-visualizer,ostash/qt-creator-i18n-uk,azat/qtcreator,malikcjm/qtcreator,AltarBeastiful/qt-creator,kuba1/qtcreator,duythanhphan/qt-creator,maui-packages/qt-creator,duythanhphan/qt-creator,colede/qtcreator,dmik/qt-creator-os2,colede/qtcreator,Distrotech/qtcreator,colede/qtcreator,omniacreator/qtcreator,...
74a60667bf22c1fed7b54172f010a37c1b8d6e55
src/Wall.cpp
src/Wall.cpp
#include "Wall.h" Wall::Wall(Vector b, Vector t) : b_(b), t_(t) { } bool Wall::OnLeft(Vector p) { return (p.i < b_.i); } bool Wall::Between(Vector p) { return (p.j < t_.j) && (p.j > b_.j); } float Wall::Left() { return b_.i - 0.1; } float Wall::Right() { return b_.i + 0.1; } void Wall::Draw() { glColor3f...
#include "Wall.h" Wall::Wall(Vector b, Vector t) : b_(b), t_(t) { } bool Wall::OnLeft(Vector p) { return (p.i < b_.i); } bool Wall::Between(Vector p) { return (p.j < t_.j) && (p.j > b_.j); } float Wall::Left() { return b_.i - 0.1; } float Wall::Right() { return b_.i + 0.1; } void Wall::Draw() { glColor3f...
Make walls draw what they actually do
Make walls draw what they actually do
C++
mit
xymostech/derelict,xymostech/derelict,xymostech/derelict
37cd651a2a1b5be978cfa0315d0015afd3bcbe62
examples/usart_serial_echo.cpp
examples/usart_serial_echo.cpp
#include "board.h" #include <aery32/all.h> using namespace aery; #define UART0_PINMASK ((1 << 0) | (1 << 1)) int main(void) { init_board(); gpio_init_pins(porta, UART0_PINMASK, GPIO_FUNCTION_A); gpio_set_pin_high(LED); /* * Initializes USART0 in async mode with 8 data bits, 1 stop bit * and no parity. Af...
#include "board.h" #include <aery32/all.h> using namespace aery; int main(void) { init_board(); /* * In UC3A: * PA00 => RXD * PA01 => TXD */ #define UART0_SERIAL_PINMASK (0x1) gpio_init_pins(porta, UART0_SERIAL_PINMASK, GPIO_FUNCTION_A); /* * Initializes USART0 in async mode with 8 data bits, 1 st...
Add more commenting to serial echo example
Add more commenting to serial echo example
C++
bsd-3-clause
denravonska/aery32,aery32/aery32,aery32/aery32,denravonska/aery32
3f18f7411295a25f25f9ae0878e1039105946774
src/main.cpp
src/main.cpp
#include <QGuiApplication> #include <QQmlEngine> #include <QQmlContext> #include <QQmlComponent> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlEngine engine; QQmlContext *objectContext = new QQmlContext(engine.rootContext()); QQmlComponent component(&engine, "main.qml"); QObject *...
#include <QGuiApplication> #include <QQuickView> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQuickView view; view.setSource(QUrl::fromLocalFile("main.qml")); view.show(); return app.exec(); }
Use QQuickView instead of QQmlEngine.
Use QQuickView instead of QQmlEngine.
C++
mit
jdmichaud/kiosk
b35790f5fba218687c64cd13a527750ac1d3c863
wold/src/test/test_wold.cpp
wold/src/test/test_wold.cpp
#include <catch.hpp> #include "../wold.hpp" namespace wold { TEST_CASE("foo", "[]") { REQUIRE(foo() == 42); } } // namespace wold
#include <catch.hpp> #include "../wold.hpp" #include <boost/spirit/home/x3.hpp> #include <iostream> namespace wold { TEST_CASE("foo", "[]") { REQUIRE(foo() == 42); } TEST_CASE("parsing", "[]") { using boost::spirit::x3::double_; using boost::spirit::x3::ascii::space; auto text = std::string("...
Add basic x3 parsing demo test
Add basic x3 parsing demo test
C++
mit
DouglasOrr/Snippets,DouglasOrr/Snippets,DouglasOrr/Snippets,DouglasOrr/Snippets,DouglasOrr/Snippets,DouglasOrr/Snippets,DouglasOrr/Snippets,DouglasOrr/Snippets
4358abf06cf57f8147915f3bb017903e3e58f2ef
src/sss-mon.cpp
src/sss-mon.cpp
#include <iostream> using namespace std; int main() { cout << "Hello, world!" << endl; }
#include <iostream> #include <chrono> #include <thread> #include <string> #include <fstream> #include <sstream> const std::string NETWORK_IF = "eth0"; using namespace std; int main() { while (true) { // Get current point in time as reference const auto now = std::chrono::steady_clock::now(); const aut...
Add code to print cpu load information and bytes sent/received
Add code to print cpu load information and bytes sent/received
C++
mit
sloede/simple_server_stats,sloede/simple_server_stats,sloede/simple_server_stats
4a690301dae7e9176f219e28f2e4f9e25d3d79a5
src/graphics/texture.cpp
src/graphics/texture.cpp
#include "graphics/texture.h" #include "graphics/opengl.h" namespace sp { void BasicTexture::setRepeated(bool) { } void BasicTexture::setSmooth(bool value) { smooth = value; } void BasicTexture::loadFromImage(Image&& image) { this->image = std::move(image); } void BasicTexture::bind() { if (handle ==...
#include "graphics/texture.h" #include "graphics/opengl.h" namespace sp { void BasicTexture::setRepeated(bool) { } void BasicTexture::setSmooth(bool value) { smooth = value; } void BasicTexture::loadFromImage(Image&& image) { this->image = std::move(image); } void BasicTexture::bind() { if (handle ==...
Clear image after GPU upload.
Clear image after GPU upload.
C++
mit
daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton
24e165ac4ca7c1328fb52c98d91406dfa76bb77e
src/avancedb/set_thread_name.cpp
src/avancedb/set_thread_name.cpp
/* * AvanceDB - an in-memory database similar to Apache CouchDB * Copyright (C) 2015-2017 Ripcord Software * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of...
/* * AvanceDB - an in-memory database similar to Apache CouchDB * Copyright (C) 2015-2017 Ripcord Software * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of...
Correct the set thread name macro
Correct the set thread name macro
C++
agpl-3.0
RipcordSoftware/AvanceDB,RipcordSoftware/AvanceDB,RipcordSoftware/AvanceDB,RipcordSoftware/AvanceDB,RipcordSoftware/AvanceDB,RipcordSoftware/AvanceDB,RipcordSoftware/AvanceDB
7778249d2d036e4de2dcdd75a50130dd3a88e65f
test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.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 warning in test - missing exception specifier for overload of operator new
Fix warning in test - missing exception specifier for overload of operator new git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@212723 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
48c3aff478b6277d58305f92b5d3825fcf25ada1
src/console/twentyfortyeight.cpp
src/console/twentyfortyeight.cpp
#include <iostream> int main() { std::cout << "hello world" << std::endl; return 0; }
#include <iostream> //#include <stdio.h> enum MoveDirection { LEFT, UP, RIGHT, DOWN }; class ConsoleMoveDirectionReader { public: MoveDirection next() { while (true) { int keyCode = std::cin.get(); if (keyCode == 97) { return MoveDirection::LEFT; b...
Move direction reader from console.
Move direction reader from console.
C++
mit
joshjcarrier/2048-cpp