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
8bce9fb2eda44d7c609ec6def79ee93d18d27a18
main.cpp
main.cpp
/* * Copyright 2017 * * Made by vincent leroy * Mail <vincent.54.leroy@gmail.com> */ // Project includes ------------------------------------------------------------ #include "MainWindow.hpp" // Qt includes ----------------------------------------------------------------- #include <QApplication> #include <QWidg...
/* * Copyright 2017 * * Made by vincent leroy * Mail <vincent.54.leroy@gmail.com> */ // Project includes ------------------------------------------------------------ #include "MainWindow.hpp" // Qt includes ----------------------------------------------------------------- #include <QApplication> #include <QFile...
Remove force creation of "Adwaita-Dark" style
Remove force creation of "Adwaita-Dark" style
C++
mit
Forbinn/HttpRequester
14dde5bf1dbbb65e7cbd464701ae756da56e82fd
guia2/particionar_merval.cpp
guia2/particionar_merval.cpp
#include "../guia1/particionar.cpp" #include "../config.hpp" #include <boost/filesystem.hpp> int main() { vec datos; datos.load(config::sourceDir + "/guia2/datos/merval.csv"); mat tuplas(datos.n_elem - 5, 6); for (unsigned int i = 0; i < datos.n_rows - 5; ++i) { tuplas.row(i) = datos.rows(spa...
#include "../guia1/particionar.cpp" #include "../config.hpp" #include <boost/filesystem.hpp> int main() { arma_rng::set_seed_random(); vec datos; datos.load(config::sourceDir + "/guia2/datos/merval.csv"); mat tuplas(datos.n_elem - 5, 6); for (unsigned int i = 0; i < datos.n_rows - 5; ++i) { ...
Revert "Guia 2 - Particionar Merval: No setear la semilla aleatoria; no estamos"
Revert "Guia 2 - Particionar Merval: No setear la semilla aleatoria; no estamos" This reverts commit 8e82588a682f8f74592115ad841df7150b24949b.
C++
unlicense
junrrein/ic2017,junrrein/ic2017
1482646524ae2069d4d63ecc8d9af5a5ae272290
src/transport/listen_tcp_socket.cpp
src/transport/listen_tcp_socket.cpp
#include <fcntl.h> #include <netinet/in.h> #include <sys/socket.h> #include <glog/logging.h> namespace { const uint32_t k_listen_backlog = 100; } int create_tcp_listen_socket(int port) { struct sockaddr_in addr; int socket_fd = socket(PF_INET, SOCK_STREAM, 0); addr.sin_family = AF_INET; addr.sin_port = ht...
#include <fcntl.h> #include <netinet/in.h> #include <sys/socket.h> #include <glog/logging.h> namespace { const uint32_t k_listen_backlog = 100; } int create_tcp_listen_socket(int port) { struct sockaddr_in addr; int socket_fd = socket(PF_INET, SOCK_STREAM, 0); int reuse_addr = 1; if (setsockopt(socket_fd...
Set SO_REUSEADDR in listening sockets
Set SO_REUSEADDR in listening sockets
C++
mit
juruen/cavalieri,juruen/cavalieri,juruen/cavalieri,juruen/cavalieri
fe326aa016d14cfc9699badebb62a1ed94b6a41f
src/wcl/network/tests/tcpclient.cpp
src/wcl/network/tests/tcpclient.cpp
#include <stdio.h> #include "wcl/network/TCPSocket.h" int main(void) { char buffer[4096]; try{ TCPSocket s("10.220.99.84", 55555); s.read((char *)buffer, 4096); printf("Client: Server Said: %s\n", buffer); s.close(); } catch( SocketException* e ) { fprintf( stderr, e->getReason().c_str() ); } return...
#include <stdio.h> #include "wcl/network/TCPSocket.h" int main(void) { char buffer[4096]; try{ TCPSocket s("127.0.0.1", 55555); s.read((char *)buffer, 4096); printf("Client: Server Said: %s\n", buffer); s.close(); } catch( SocketException* e ) { fprintf( stderr, e->getReason().c_str() ); } return 0;...
Use localhost by default in our test network client
Use localhost by default in our test network client Using a fixed ip address is a little pointless. Instead we use localhost as it exists everwhere
C++
bsd-2-clause
WearableComputerLab/LibWCL,WearableComputerLab/LibWCL,WearableComputerLab/LibWCL,WearableComputerLab/LibWCL
e7e89343d51bc18212b5de062af69c691c07d79b
td/challenge260/SemanticAnalyserTest.cpp
td/challenge260/SemanticAnalyserTest.cpp
#include "gtest/gtest.h" #include "Token.hpp" class SemanticAnalyser { public: bool analyse(const Tokens& tokens) { return tokens.empty(); } }; constexpr Token createTokenWithZeroValue(TokenType type) { return {type, 0}; } TEST(SemanticAnalyserTest, ShouldAcceptEmptyTokens) { SemanticAnalyser analyser...
#include "gtest/gtest.h" #include "Token.hpp" class SemanticAnalyser { public: bool analyse(const Tokens& tokens) { return tokens.empty(); } }; using namespace ::testing; struct SemanticAnalyserTest : public Test { SemanticAnalyser analyser; static constexpr Token createTokenWithZeroValue(TokenType ty...
Add test suite to Analyser
Add test suite to Analyser
C++
mit
lukasz-m-maciejewski/papuc_exercises,lukasz-m-maciejewski/papuc_exercises,NadzwyczajnaGrupaRobocza/papuc_exercises,NadzwyczajnaGrupaRobocza/papuc_exercises
7353c6d2c24fcfc42aa624b007ca62fd98024a18
ELF/Error.cpp
ELF/Error.cpp
//===- Error.cpp ----------------------------------------------------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
//===- Error.cpp ----------------------------------------------------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
Use "using namespace llvm" like the rest of ELF lld.
Use "using namespace llvm" like the rest of ELF lld. git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@274755 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/lld,llvm-mirror/lld
229a2f64e23766755d32f1539f893d328a205edd
test/xray/TestCases/Linux/pic_test.cc
test/xray/TestCases/Linux/pic_test.cc
// Test to check if we handle pic code properly. // RUN: %clangxx_xray -fxray-instrument -std=c++11 -fpic %s -o %t // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_logfile_base=pic-test-logging-" %run %t 2>&1 | FileCheck %s // After all that, clean up the output xray log. // // RUN: rm pic-test-logging-* #in...
// Test to check if we handle pic code properly. // RUN: %clangxx_xray -fxray-instrument -std=c++11 -ffunction-sections \ // RUN: -fdata-sections -fpic -fpie -Wl,--gc-sections %s -o %t // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_logfile_base=pic-test-logging-" %run %t 2>&1 | FileCheck %s // After all...
Expand the PIC test case for XRay
[XRay][compiler-rt][NFC] Expand the PIC test case for XRay Summary: Here we add a build with -ffunction-sections -fdata-sections and -Wl,--gc-sections to ensure that we're still able to generate XRay traces. This is just adding a test, no functional changes. Differential Revision: https://reviews.llvm.org/D36863 gi...
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
26c816582bc4d41d5bdec49a0f9f22d13aa0b52c
source/tools/cgwhite/main.cpp
source/tools/cgwhite/main.cpp
#if defined(WIN32) && !defined(_DEBUG) #pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup") #endif #include "Application.h" #include <memory> #include <gloperate-qtapplication/Viewer.h> #include <widgetzeug/dark_fusion_style.hpp> int main(int argc, char * argv[]) { Application app(argc, argv)...
#if defined(WIN32) && !defined(_DEBUG) #pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup") #endif #include "Application.h" #include <memory> #include <gloperate-qtapplication/Viewer.h> #include <widgetzeug/dark_fusion_style.hpp> int main(int argc, char * argv[]) { Application app(argc, argv)...
Remove unnecessary use of heap allocation
Remove unnecessary use of heap allocation
C++
mit
p-otto/gloperate,cginternals/gloperate,Beta-Alf/gloperate,cginternals/gloperate,Beta-Alf/gloperate,cginternals/gloperate,Beta-Alf/gloperate,hpicgs/gloperate,p-otto/gloperate,p-otto/gloperate,j-o/gloperate,Beta-Alf/gloperate,lanice/gloperate,hpicgs/gloperate,hpi-r2d2/gloperate,j-o/gloperate,p-otto/gloperate,hpicgs/glope...
93c097ff9851586be936f5dc73878f6608a3a61e
test/CodeGenCXX/linetable-virtual-variadic.cpp
test/CodeGenCXX/linetable-virtual-variadic.cpp
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s // Crasher for PR22929. class Base { virtual void VariadicFunction(...); }; class Derived : public virtual Base { virtual void VariadicFunction(...); }; void Derived::VariadicFunction(...) { } // CH...
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s // Crasher for PR22929. class Base { virtual void VariadicFunction(...); }; class Derived : public virtual Base { virtual void VariadicFunction(...); }; void Derived::VariadicFunction(...) { } // CH...
Update testcase for upstream LLVM changes.
Update testcase for upstream LLVM changes. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@302476 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
7685a657cad7173a8c7888ec60be3fe54a420e53
src/highlighter.cc
src/highlighter.cc
#include "highlighter.hh" #include "buffer_utils.hh" namespace Kakoune { void Highlighter::highlight(HighlightContext context, DisplayBuffer& display_buffer, BufferRange range) { if (context.pass & m_passes) try { do_highlight(context, display_buffer, range); } catch (runtime_error& error) ...
#include "highlighter.hh" #include "buffer_utils.hh" namespace Kakoune { void Highlighter::highlight(HighlightContext context, DisplayBuffer& display_buffer, BufferRange range) { if (context.pass & m_passes) try { do_highlight(context, display_buffer, range); } catch (runtime_error& error) ...
Fix grammar in highlight error message
Fix grammar in highlight error message
C++
unlicense
mawww/kakoune,alexherbo2/kakoune,Somasis/kakoune,mawww/kakoune,jjthrash/kakoune,lenormf/kakoune,danr/kakoune,casimir/kakoune,casimir/kakoune,jkonecny12/kakoune,mawww/kakoune,jkonecny12/kakoune,occivink/kakoune,jjthrash/kakoune,casimir/kakoune,danr/kakoune,lenormf/kakoune,lenormf/kakoune,jkonecny12/kakoune,jkonecny12/ka...
7ff64ecd6ef77b1cfeed129872c047c070f39675
src/bonefish/wamp_dealer.cpp
src/bonefish/wamp_dealer.cpp
#include <bonefish/wamp_dealer.hpp> #include <bonefish/wamp_session.hpp> #include <iostream> namespace bonefish { wamp_dealer::wamp_dealer() : m_sessions() { } wamp_dealer::~wamp_dealer() { } bool wamp_dealer::attach_session(const std::shared_ptr<wamp_session>& session) { std::cerr << "attach session: " << ...
#include <bonefish/wamp_dealer.hpp> #include <bonefish/wamp_session.hpp> #include <iostream> namespace bonefish { wamp_dealer::wamp_dealer() : m_sessions() { } wamp_dealer::~wamp_dealer() { } bool wamp_dealer::attach_session(const std::shared_ptr<wamp_session>& session) { std::cerr << "attach session: " << ...
Fix incorrect move of shared session pointer.
Fix incorrect move of shared session pointer.
C++
apache-2.0
tplgy/bonefish,tplgy/bonefish,jpetso/bonefish,jpetso/bonefish
c73739a5f8093ce98f2451d196f08e508bc17608
src/bish.cpp
src/bish.cpp
#include <iostream> #include "CompileToBash.h" #include "Parser.h" void compile_to_bash(std::ostream &os, Bish::AST *ast) { Bish::CompileToBash compile(os); ast->accept(&compile); } int main(int argc, char **argv) { if (argc < 2) { std::cerr << "USAGE: " << argv[0] << " <INPUT>\n"; std::ce...
#include <iostream> #include "CompileToBash.h" #include "Parser.h" void compile_to_bash(std::ostream &os, Bish::AST *ast) { os << "#!/bin/bash\n"; Bish::CompileToBash compile(os); ast->accept(&compile); } int main(int argc, char **argv) { if (argc < 2) { std::cerr << "USAGE: " << argv[0] << " ...
Add bash shebang (is that what it's called?) to bash output.
Add bash shebang (is that what it's called?) to bash output.
C++
mit
tdenniston/bish,AICIDNN/bish,tdenniston/bish,lw7360/bish,AOSC-Dev/bish,AICIDNN/bish,lw7360/bish,AOSC-Dev/bish
814d67f29cd528693dce96d94020d9a012c0468e
Source/SFMLIntegration/CRectangleShape.cpp
Source/SFMLIntegration/CRectangleShape.cpp
// // CRectangleShape.cpp // MenuTest // // Created by Tim Brier on 14/05/2015. // // #include "CRectangleShape.hpp" CRectangleShape::CRectangleShape(CVector2f size) { CRectangleShape(size.x, size.y); } CRectangleShape::CRectangleShape(float width, float height) : CConvexShape(4) { setPoint(0, CVector2f(0...
// // CRectangleShape.cpp // MenuTest // // Created by Tim Brier on 14/05/2015. // // #include "CRectangleShape.hpp" CRectangleShape::CRectangleShape(CVector2f size) : CRectangleShape(size.x, size.y) { } CRectangleShape::CRectangleShape(float width, float height) : CConvexShape(4) { setPoint(0, CVector2f(0.0...
Update overloaded constructor so it actually works
Update overloaded constructor so it actually works
C++
mit
sizlo/TimGameLib,sizlo/TimGameLib,sizlo/TimGameLib
ebc9cbec7504be0d0b8206e1485465d00ac6f1a8
src/cctag/Statistic.cpp
src/cctag/Statistic.cpp
#include <random> #include <vector> #include <algorithm> #include "Statistic.hpp" #include <cstdlib> namespace cctag { namespace numerical { static constexpr size_t MAX_POINTS = 1000; static constexpr size_t MAX_RANDOMNESS = 10000000; struct Randomness : public std::vector<unsigned short> { Randomness(); }; sta...
#include <algorithm> #include "Statistic.hpp" #include "utils/pcg_random.hpp" namespace cctag { namespace numerical { void rand_5_k(std::array<int, 5>& perm, size_t N) { static thread_local pcg32 rng(271828); auto it = perm.begin(); int r; for (int i = 0; i < 5; ++i) { do { r = rng(N); } ...
Use PCG32 instead of table for rand_5_k.
Use PCG32 instead of table for rand_5_k.
C++
mpl-2.0
poparteu/CCTag,poparteu/CCTag,poparteu/CCTag,poparteu/CCTag
78df6347bb62e21cb48fb2c8db4c9c626ff34ab4
excercise03/02.cpp
excercise03/02.cpp
#include <stdio.h> #include <stdlib.h> int *list; int size; int sum; int main(void) { size = 9; sum = 15; list = (int *)malloc(sizeof(int) * size); list[0] = 1; list[1] = 5; list[2] = 8; list[3] = 3; list[4] = 7; list[5] = 12; list[6] = 11; list[7] = 2; list[8] = 6; ...
Add test case in main()
Add test case in main()
C++
mit
kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016
7fae6b0ad8ae0c36cf02494520725e2575919df9
proctor/src/main.cpp
proctor/src/main.cpp
#include <omp.h> #include "proctor/detector.h" #include "proctor/proctor.h" #include "proctor/scanning_model_source.h" using pcl::proctor::Detector; //using pcl::proctor::ProctorMPI; using pcl::proctor::Proctor; using pcl::proctor::ScanningModelSource; Detector detector; Proctor proctor; int main(int argc, char **a...
#include <omp.h> #include "proctor/detector.h" #include "proctor/proctor.h" #include "proctor/scanning_model_source.h" using pcl::proctor::Detector; //using pcl::proctor::ProctorMPI; using pcl::proctor::Proctor; using pcl::proctor::ScanningModelSource; Detector detector; Proctor proctor; int main(int argc, char **a...
Use sleep instead of a busy-wait while loop to retain the output.
Use sleep instead of a busy-wait while loop to retain the output. git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@3867 a9d63959-f2ad-4865-b262-bf0e56cfafb6
C++
bsd-3-clause
otherlab/pcl,patmarion/PCL,patmarion/PCL,otherlab/pcl,otherlab/pcl,patmarion/PCL,daviddoria/PCLMirror,otherlab/pcl,patmarion/PCL,daviddoria/PCLMirror,otherlab/pcl,daviddoria/PCLMirror,daviddoria/PCLMirror,patmarion/PCL,daviddoria/PCLMirror
adc130ff7a3a5887e684a190fb55a74450b3b464
src/pic32/canwrite.cpp
src/pic32/canwrite.cpp
#include "canwrite.h" #include "canutil_pic32.h" #include "bitfield.h" #include "log.h" void copyToMessageBuffer(uint64_t source, uint8_t* destination) { for(int i = 0; i < 8; i++) { destination[i] = ((uint8_t*)&source)[i]; } } bool sendCanMessage(CanBus* bus, CanMessage request) { CAN::TxMessageB...
#include "canwrite.h" #include "canutil_pic32.h" #include "bitfield.h" #include "log.h" void copyToMessageBuffer(uint64_t source, uint8_t* destination) { for(int i = 0; i < 8; i++) { destination[i] = ((uint8_t*)&source)[i]; } } bool sendCanMessage(CanBus* bus, CanMessage request) { CAN::TxMessageB...
Add newline to end of another debug message.
Add newline to end of another debug message.
C++
bsd-3-clause
openxc/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware
28293cd75df68d1beb5b7d369198e07523bfb163
adaptors/tizen/adaptor-impl-tizen.cpp
adaptors/tizen/adaptor-impl-tizen.cpp
/* * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * 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...
/* * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * 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...
Fix a prevent issue - Resource leak
Fix a prevent issue - Resource leak - Resource leak in GetDATAStoragePath() Change-Id: If55d99124d6fa8559bd573ad7464fb44e990ac72
C++
apache-2.0
dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor
ebb72cc5945a1d6824753e7282075c69d2edc1ef
net/base/network_change_notifier_win.cc
net/base/network_change_notifier_win.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 "net/base/network_change_notifier_win.h" #include <iphlpapi.h> #include <winsock2.h> #pragma comment(lib, "iphlpapi.lib") namespace net { ...
// 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 "net/base/network_change_notifier_win.h" #include <iphlpapi.h> #include <winsock2.h> #pragma comment(lib, "iphlpapi.lib") namespace net { ...
Fix regression where we didn't ever start watching for network address changes on Windows.
Fix regression where we didn't ever start watching for network address changes on Windows. BUG=48204 TEST=NetworkChangeNotifier works on Windows Review URL: http://codereview.chromium.org/2807036 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@51574 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
adobe/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,...
537a955dd5f6e728586cbcbcf54c030206264409
net/disk_cache/cache_util_posix.cc
net/disk_cache/cache_util_posix.cc
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/disk_cache/cache_util.h" #include "base/file_util.h" #include "base/logging.h" #include "base/string_util.h" namespace disk_cache...
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/disk_cache/cache_util.h" #include "base/file_util.h" #include "base/logging.h" #include "base/string_util.h" namespace disk_cache...
Fix DeleteCache on POSIX. It wasn't successfully deleting before.
Fix DeleteCache on POSIX. It wasn't successfully deleting before. git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@2468 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/c...
94006eef2d4d6c543920705078f271c691d08f0c
scripts/template/DemoProject/src/DemoCpuCode.cpp
scripts/template/DemoProject/src/DemoCpuCode.cpp
/*** This is a simple demo project that you can copy to get started. Comments blocks starting with '***' and subsequent non-empty lines are automatically added to this project's wiki page. */ #include <stdio.h> #include <vector> #include <iostream> #include "Maxfiles.h" #include "MaxSLiCInterface.h" int...
/*** This is a simple demo project that you can copy to get started. Comments blocks starting with '***' and subsequent non-empty lines are automatically added to this project's wiki page. */ #include <stdio.h> #include <vector> #include <iostream> #include "Maxfiles.h" #include "MaxSLiCInterface.h" int...
Replace Demo with macro in CpuCode.cpp.
Replace Demo with macro in CpuCode.cpp.
C++
mit
conghui/dfe-snippets,conghui/dfe-snippets,conghui/dfe-snippets,conghui/dfe-snippets,conghui/dfe-snippets
7017f79eb59b91d44a2fb4a50a8b329e720dacba
src/geom/prep/PreparedPoint.cpp
src/geom/prep/PreparedPoint.cpp
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as p...
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as p...
Fix corner case of comparing preparedpoint to point
Fix corner case of comparing preparedpoint to point git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@4081 5242fede-7e19-0410-aef8-94bd7d2200fb
C++
lgpl-2.1
mwtoews/libgeos,strk/libgeos,WillieMaddox/libgeos,libgeos/libgeos,mwtoews/libgeos,gtourkas/libgeos,mwtoews/libgeos,rkanavath/libgeos,mwtoews/libgeos,gtourkas/libgeos,WillieMaddox/libgeos,strk/libgeos,libgeos/libgeos,gtourkas/libgeos,libgeos/libgeos,libgeos/libgeos,WillieMaddox/libgeos,WillieMaddox/libgeos,rkanavath/lib...
3a461b9528d644721e23c1485a92908808b563ea
src/gamelib/sprite/SpriteData.cpp
src/gamelib/sprite/SpriteData.cpp
#include "gamelib/sprite/SpriteData.hpp" #include <cmath> namespace gamelib { AnimationData::AnimationData() : length(1), speed(0), offset(0) { } void AnimationData::update(float fps) { offset = std::fmod(offset + speed / fps, length); } sf::IntRect AnimationDa...
#include "gamelib/sprite/SpriteData.hpp" #include <cmath> namespace gamelib { AnimationData::AnimationData() : length(1), speed(0), offset(0) { } void AnimationData::update(float fps) { if (length > 1 && speed != 0) offset = std::fmod(offset + speed / fps, l...
Fix bug causing a wrong frame index
Fix bug causing a wrong frame index Using this formula to calculate the image index offset = std::fmod(offset + speed / fps, length), a length of 1 or speed = 0 and an offset > 0 would result in a wrong index.
C++
mit
mall0c/TileEngine,mall0c/GameLib
264aad95257adba52ec768ef8ae8bf2bcdc7d187
src/main/cpp/source/cmdargs.cpp
src/main/cpp/source/cmdargs.cpp
/* MIT License Copyright (c) 2017 Blockchain-VCS 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 Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
/* MIT License Copyright (c) 2017 Blockchain-VCS 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 Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
Add Use JSON as a command line argument
Add Use JSON as a command line argument
C++
mit
ZetaChain/ZetaChain_Native,ZetaChain/ZetaChain_Native
bb64902a2264e0f19d54eb70b002b382162f208c
src/JDKSAvdeccMCU_AppMessageHandler.cpp
src/JDKSAvdeccMCU_AppMessageHandler.cpp
/* Copyright (c) 2014, J.D. Koftinoff Software, Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list ...
/* Copyright (c) 2014, J.D. Koftinoff Software, Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list ...
Add symbol to empty file
Add symbol to empty file
C++
mit
jdkoftinoff/jdksavdecc-mcu,jdkoftinoff/jdksavdecc-mcu,jdkoftinoff/jdksavdecc-mcu,jdkoftinoff/jdksavdecc-mcu
350b7fe98b34e748f8559daf25e8ebd8cbce07a0
src/librt_error.cpp
src/librt_error.cpp
#include "librt_error.h" using namespace librt; Error::Error() : errorCode_(Error::Code::Ok), message_() { } Error::Error(Error::Code errorCode, std::__cxx11::string &&message) : errorCode_(errorCode), message_(message) { } Error::Error(Error &&other) : errorCode_(other.errorCode_), message_...
#include "librt_error.h" using namespace librt; Error::Error() : errorCode_(Error::Code::Ok), message_() { } Error::Error(Error::Code errorCode, std::string &&message) : errorCode_(errorCode), message_(message) { } Error::Error(Error &&other) : errorCode_(other.errorCode_), message_(std::mov...
Remove cxx11 namespace from Error
Remove cxx11 namespace from Error
C++
mit
kicsyromy/libGearBox,kicsyromy/libremotetransmission,kicsyromy/libGearBox
dd53f364b085e0ed17945879ebec1fe07032b35c
src/Functions.cpp
src/Functions.cpp
//======================================================================= // Copyright Baptiste Wicht 2011. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //=====================================================...
//======================================================================= // Copyright Baptiste Wicht 2011. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //=====================================================...
Add the function name on the error reporting
Add the function name on the error reporting
C++
mit
vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic,wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic
18f2c58b0f4ef7da7efd275026f19c8873c93f7a
chrome/browser/sync/glue/data_type_controller.cc
chrome/browser/sync/glue/data_type_controller.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/sync/glue/chrome_report_unrecoverable_error.h" #include "chrome/browser/sync/glue/data_type_controller.h" #include "sync/uti...
// 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/sync/glue/chrome_report_unrecoverable_error.h" #include "chrome/browser/sync/glue/data_type_controller.h" #include "sync/uti...
Disable uploading of search engine datatype errors.
[Sync] Disable uploading of search engine datatype errors. Due to their prevalence, and because the ones occurring all have bugs tracking them, we're disabling the uploading until the error rate goes down. BUG=135196,130448 TEST= Review URL: https://chromiumcodereview.appspot.com/10697040 git-svn-id: de016e52bd170...
C++
bsd-3-clause
Pluto-tv/chromium-crosswalk,littlstar/chromium.src,hujiajie/pa-chromium,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,Just-D/chro...
c56c4affb25a3ea4797e0ff29ad3c81718d8ef9e
test/fuzz/fuzzer.cc
test/fuzz/fuzzer.cc
#include <string.h> #include "tree_sitter/runtime.h" void test_log(void *payload, TSLogType type, const char *string) { } TSLogger logger = { .log = test_log, }; extern "C" const TSLanguage *TS_LANG(); extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { const char *str = reinterpret_cast<c...
#include <string.h> #include "tree_sitter/runtime.h" void test_log(void *payload, TSLogType type, const char *string) { } TSLogger logger = { .log = test_log, }; extern "C" const TSLanguage *TS_LANG(); extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { const char *str = reinterpret_cast<c...
Use ts_tree_root_node in fuzz driver
Use ts_tree_root_node in fuzz driver
C++
mit
tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter
f314df3ff213aa81dce14566467b0192ff6693fc
You-DataStore-Tests/datastore_api_test.cpp
You-DataStore-Tests/datastore_api_test.cpp
#include "stdafx.h" #include "CppUnitTest.h" #include "datastore.h" using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert; namespace YouDataStoreTests { TEST_CLASS(DataStoreApiTest) { public: TEST_METHOD(Post_EmptyTask_Test) { // You::DataStore::DataStore sut; // sut.post(std::unordered_map<std::...
#include "stdafx.h" #include "CppUnitTest.h" #include "datastore.h" using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert; namespace YouDataStoreTests { TEST_CLASS(DataStoreApiTest) { public: TEST_METHOD(DataStoreDummyTest) { // You::DataStore::DataStore sut; // sut.post(std::unordered_map<std::w...
Rename incomplete test on datastore to DataStoreDummyTest
Rename incomplete test on datastore to DataStoreDummyTest
C++
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
12c92848ef4e3f70ac5787056288edf393a689ad
src/EventAction.cc
src/EventAction.cc
#include <iostream> #include "EventAction.hh" #include "G4Event.hh" #include "RunAction.hh" #include "Run.hh" EventAction::EventAction(): G4UserEventAction{}, _draw_flag("all") { } EventAction::~EventAction() { } void EventAction::BeginOfEventAction(const G4Event* evt) { G4cout << "EV: " << evt->GetEve...
#include <iostream> #include "EventAction.hh" #include "G4Event.hh" #include "RunAction.hh" #include "Run.hh" EventAction::EventAction(): G4UserEventAction{}, _draw_flag("all") { } EventAction::~EventAction() { } void EventAction::BeginOfEventAction(const G4Event*) { // G4cout << "EV: " << evt->GetEven...
Remove printout from event action
Remove printout from event action
C++
apache-2.0
Tatiana-Krivosheev/CollimationPhantom,Tatiana-Krivosheev/CollimationPhantom,Tatiana-Krivosheev/CollimationPhantom
ca8637304e85e1bd9a9c14cd83f9f9fe3d9e5aae
src/cardreader.cpp
src/cardreader.cpp
#include "cardreader.h" #include <QEvent> #include <QKeyEvent> bool CardReader::eventFilter(QObject *object, QEvent *event) { if (event->type() != QEvent::KeyPress) { return false; } if (cardNumber.isEmpty()) { writeTime.start(); } //accumulate characters QKeyEvent *keyEvent = static_cast<QKeyEvent*>(even...
#include "cardreader.h" #include <QEvent> #include <QKeyEvent> bool CardReader::eventFilter(QObject *object, QEvent *event) { if (event->type() != QEvent::KeyPress) { return false; } if (cardNumber.isEmpty()) { writeTime.start(); } //accumulate characters QKeyEvent *keyEvent = static_cast<QKeyEvent*>(even...
Simplify card string before emitting, in case any key characters are added by the return.
Simplify card string before emitting, in case any key characters are added by the return.
C++
mit
bjorgan/digcross
3cceb2a92a0355f605262263d9dc311a5d31fe59
src/hw/serial1.cpp
src/hw/serial1.cpp
#include <hw/serial.hpp> extern "C" void __serial_print1(const char* cstr) { const uint16_t port = 0x3F8; // Serial 1 while (*cstr) { while (not (hw::inb(port + 5) & 0x20)); hw::outb(port, *cstr++); } }
#include <hw/serial.hpp> extern "C" void __serial_print1(const char* cstr) { const uint16_t port = 0x3F8; // Serial 1 static bool init = false; if (!init) { init = true; // properly initialize serial port hw::outb(port + 1, 0x00); // Disable all interrupts hw::outb(port + 3, 0x80); // Enabl...
Initialize the default serial port properly
serial: Initialize the default serial port properly
C++
apache-2.0
mnordsletten/IncludeOS,alfred-bratterud/IncludeOS,AnnikaH/IncludeOS,AndreasAakesson/IncludeOS,mnordsletten/IncludeOS,mnordsletten/IncludeOS,AndreasAakesson/IncludeOS,AnnikaH/IncludeOS,ingve/IncludeOS,hioa-cs/IncludeOS,AnnikaH/IncludeOS,ingve/IncludeOS,AndreasAakesson/IncludeOS,AnnikaH/IncludeOS,mnordsletten/IncludeOS,m...
2910f9c9b9ea747bfc41e689c601c214809f7b6c
src/mainwindow.cpp
src/mainwindow.cpp
#include "mainwindow.h" #include <QGridLayout> #include <QLabel> #include <QEvent> #include <QKeyEvent> #include <iostream> MainWindow::MainWindow(QWidget *parent) { QGridLayout *layout = new QGridLayout(this); layout->addWidget(new QLabel("ARK kryssesystem")); //install cardReader as an filter which intercepts k...
#include "mainwindow.h" #include <QGridLayout> #include <QLabel> #include <QEvent> #include <QKeyEvent> #include <iostream> MainWindow::MainWindow(QWidget *parent) { QGridLayout *layout = new QGridLayout(this); layout->addWidget(new QLabel("ARK kryssesystem. Bipp et kort:")); QLabel *testLabel = new QLabel; layo...
Test qlabel for displaying string from card reader.
Test qlabel for displaying string from card reader.
C++
mit
bjorgan/digcross
353f391527cd6b57dc1b8975b8e9a86b02c2212a
tools/worldeditor/SettingsDialog.cpp
tools/worldeditor/SettingsDialog.cpp
/* Copyright (C) 2014,2015,2018 Rodrigo Jose Hernandez Cordoba 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 agree...
/* Copyright (C) 2014,2015,2018,2019 Rodrigo Jose Hernandez Cordoba 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 ...
Fix compilation against Qt 5.13.
Fix compilation against Qt 5.13.
C++
apache-2.0
AeonGames/AeonEngine,AeonGames/AeonEngine,AeonGames/AeonEngine,AeonGames/AeonEngine,AeonGames/AeonEngine
4a8ff4784d0bec8509435d1aa55d88c0c747d322
Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp
Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp
#include "Core.h" #include "IntPtr.h" #include "uhx/ue/RuntimeLibrary.h" #include "HAL/PlatformAtomics.h" static int uhx_tls_slot = 0; #if defined(_MSC_VER) unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullp...
#ifndef UHX_NO_UOBJECT #include "Core.h" #include "IntPtr.h" #include "uhx/ue/RuntimeLibrary.h" #include "HAL/PlatformAtomics.h" static int uhx_tls_slot = 0; #if defined(_MSC_VER) unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLib...
Update to latest perforce change
[CL-33310] Update to latest perforce change
C++
mit
proletariatgames/unreal.hx,proletariatgames/unreal.hx,proletariatgames/unreal.hx
f83487ae75f69d62fd68c0b81254c13d92544ac9
chrome/test/perf/perftests.cc
chrome/test/perf/perftests.cc
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/message_loop.h" #include "base/perf_test_suite.h" #include "chrome/common/chrome_paths.cc" int main(int argc, char **argv) { ch...
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/message_loop.h" #include "base/perf_test_suite.h" #include "chrome/common/chrome_paths.cc" int main(int argc, char **argv) { Pe...
Fix error [FATAL:at_exit.cc(40)] Check failed: false. Tried to RegisterCallback without an AtExitManager in (possibly unused) binary perf_tests
Fix error [FATAL:at_exit.cc(40)] Check failed: false. Tried to RegisterCallback without an AtExitManager in (possibly unused) binary perf_tests Review URL: http://codereview.chromium.org/60103 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@13899 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C++
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
907978b9f3aa6efd67153dfcaa2f37abeac6f735
week6/testMain.cpp
week6/testMain.cpp
// Test main file for the Player and Team classes #include "Player.hpp" #include "Team.hpp" int main() { // Don't do anything return 0; }
// Test main file for the Player and Team classes #include "Player.hpp" #include "Team.hpp" #include <string> #include <iostream> int main() { // Test code from the assignment description Player::Player p1("Charlotte", 24, 10, 7); Player::Player p2("Emily", 21, 13, 9); Player::Player p3("Anne", 20, 1...
Test code from assignment description
Test code from assignment description
C++
mit
colbertz2/cs161
69c873e449d001bdee357696be6db03cb0233c68
chrome/browser/default_plugin_uitest.cc
chrome/browser/default_plugin_uitest.cc
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/basictypes.h" #include "base/file_path.h" #include "build/build_config.h" #include "chrome/test/automation/tab_proxy.h" #include "chrom...
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/basictypes.h" #include "base/file_path.h" #include "build/build_config.h" #include "chrome/test/automation/tab_proxy.h" #include "chrom...
Disable DefaultPluginUITest::DefaultPluginLoadTest on windows as it crashes.
Disable DefaultPluginUITest::DefaultPluginLoadTest on windows as it crashes. BUG=57952 TEST=none TBR=thakis@chromium.org git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@61501 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,dednal/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,keishi/chromium,ChromiumWebApps/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,ltilve/chr...
871e14fd80de260d003af1471f6ef9280e1d5508
ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp
ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "AndroidTextInputState.h" #include <react/renderer/components/text/conversions.h> #include <react/renderer/debug/debugStr...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "AndroidTextInputState.h" #include <react/renderer/components/text/conversions.h> #include <react/renderer/debug/debugStr...
Fix initial render of RN Android TextInput
Fix initial render of RN Android TextInput Summary: This diff fixes the initial render of RN Android TextInput. The problem was that "attributedString" was not serialized until an event was sent from native side. Changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D23383969 fbshipit-sour...
C++
bsd-3-clause
hoangpham95/react-native,facebook/react-native,facebook/react-native,javache/react-native,myntra/react-native,myntra/react-native,janicduplessis/react-native,myntra/react-native,arthuralee/react-native,arthuralee/react-native,janicduplessis/react-native,myntra/react-native,janicduplessis/react-native,hoangpham95/react-...
e1ba182f86e66d72f4ae18e40ac4c9bf29fb85a2
samples/sprite/main.cpp
samples/sprite/main.cpp
// Copyright (C) 2015 Elviss Strazdins // This file is part of the Ouzel engine. #include "Application.h" ouzel::AppPtr ouzelMain(const std::vector<std::string>& args) { std::shared_ptr<ouzel::Application> application(new ouzel::Application()); return application; }
// Copyright (C) 2015 Elviss Strazdins // This file is part of the Ouzel engine. #include "Application.h" ouzel::AppPtr ouzelMain(const std::vector<std::string>& args) { std::shared_ptr<ouzel::Application> application = std::make_shared<ouzel::Application>(); return application; }
Use make_shared instead of new for creation of Application instance
Use make_shared instead of new for creation of Application instance
C++
unlicense
Hotspotmar/ouzel,elnormous/ouzel,elvman/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel,elnormous/ouzel,elvman/ouzel,elnormous/ouzel
78c5a1463d51d8a1e92545d4dfda18845e1f23c4
zend/fastcall.cpp
zend/fastcall.cpp
/** * fastcall.cpp * * This file holds some PHP functions implementation in C directly. * */ #include "includes.h" namespace Php { bool class_exists(const std::string &classname, bool autoload) { // we need the tsrm_ls variable TSRMLS_FETCH(); zend_class_entry **ce; int fo...
/** * fastcall.cpp * * This file holds some PHP functions implementation in C directly. * */ #include "includes.h" namespace Php { bool class_exists(const std::string &classname, bool autoload) { // we need the tsrm_ls variable TSRMLS_FETCH(); zend_class_entry **ce; int fo...
Change C99 VLA C++ dynamic array
Change C99 VLA C++ dynamic array
C++
apache-2.0
CopernicaMarketingSoftware/PHP-CPP-LEGACY,CopernicaMarketingSoftware/PHP-CPP,dreamsxin/PHP-CPP,sjinks/PHP-CPP,sjinks/PHP-CPP,carlmcdade/PHP-CPP,carlmcdade/PHP-CPP,CopernicaMarketingSoftware/PHP-CPP,dreamsxin/PHP-CPP,CopernicaMarketingSoftware/PHP-CPP-LEGACY,sjinks/PHP-CPP,carlmcdade/PHP-CPP,carlmcdade/PHP-CPP,sjinks/PH...
7c8ef89bdca8782b9aeb0f2381f2a30cf59d2f56
app/src/main/cpp/native-lib.cpp
app/src/main/cpp/native-lib.cpp
#include <jni.h> #include <string> #include "SpatialFilter.h" #include "VideoProcessor.h" extern "C" jstring Java_cn_edu_seu_evmhr_MainActivity_stringFromJNI( JNIEnv *env, jobject /* this */, jstring jFileName) { const char* jnamestr = env->GetStringUTFChars(jFileName, NULL); VideoPro...
#include <jni.h> #include <string> #include "SpatialFilter.h" #include "VideoProcessor.h" extern "C" jstring Java_cn_edu_seu_evmhr_MainActivity_stringFromJNI( JNIEnv *env, jobject /* this */, jstring jFileName) { const char* jnamestr = env->GetStringUTFChars(jFileName, NULL); VideoPro...
Move heart rate calculation to cpp
Move heart rate calculation to cpp
C++
mit
EVMHR/EVMHR,EVMHR/EVMHR
4eba3faa022cc3cbfb57c759f7b0340576db3c95
tests/main.cpp
tests/main.cpp
#include "SharedResource.h" #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE(Basic_construction) { SharedResource<int> shared_int; } BOOST_AUTO_TEST_CASE(Construction_with_argument) { SharedResource<int> shared_int(5); } BOOST_AUTO_TEST_CASE(Construction_no_default_constru...
#include "SharedResource.h" #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE(Basic_construction) { SharedResource<int> shared_int; } BOOST_AUTO_TEST_CASE(Construction_with_argument) { SharedResource<int> shared_int(5); } BOOST_AUTO_TEST_CASE(Construction_no_default_constru...
Test for SharedResourse::Accessor::isValid method added
Test for SharedResourse::Accessor::isValid method added
C++
unlicense
isapego/shared-resource,stack-trace/shared-resource
db4835b4dc6688e23b77e673dbd95afb861e9f5e
searchcore/src/vespa/searchcore/proton/bucketdb/checksumaggregator.cpp
searchcore/src/vespa/searchcore/proton/bucketdb/checksumaggregator.cpp
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "checksumaggregators.h" namespace proton::bucketdb { std::unique_ptr<ChecksumAggregator> ChecksumAggregator::create(ChecksumType type, BucketChecksum seed) { switch (type) { case Checksum...
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "checksumaggregators.h" namespace proton::bucketdb { std::unique_ptr<ChecksumAggregator> ChecksumAggregator::create(ChecksumType type, BucketChecksum seed) { switch (type) { case Checksum...
Use abort instead to signal unreachable code.
Use abort instead to signal unreachable code.
C++
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
880d9639c8141f8f95cf5e591965a3ef5e58ac4e
elsa/in/t0079.cc
elsa/in/t0079.cc
// cc.in79 // problem with templatized forward decl? // no, was a problem with templatized prototypes class istream; template<class TP> class smanip; //template<class TP> class smanip {}; template<class TP> inline istream& operator>>(istream& i, const smanip<TP>& m); //int foo(smanip<TP> &m); typedef smanip<int> sm...
// in/t0079.cc // problem with templatized forward decl? // no, was a problem with templatized prototypes class istream; template<class TP> class smanip; //template<class TP> class smanip {}; template<class TP> inline istream& operator>>(istream& i, const smanip<TP>& m); //int foo(smanip<TP> &m); typedef smanip<int...
Fix gcc compilation issue, thanks to Evan Driscoll.
Fix gcc compilation issue, thanks to Evan Driscoll.
C++
bsd-3-clause
angavrilov/olmar,angavrilov/olmar,angavrilov/olmar,angavrilov/olmar
3a01b3a95aaf7b1548aa30afcd52f195ea25a171
src/aktualizr_lite/ostree_mock.cc
src/aktualizr_lite/ostree_mock.cc
#include <ostree.h> #include <stdlib.h> extern "C" OstreeDeployment *ostree_sysroot_get_booted_deployment(OstreeSysroot *self) { (void)self; const char *hash = getenv("OSTREE_HASH"); return ostree_deployment_new(0, "dummy-os", hash, 1, hash, 1); } extern "C" const char *ostree_deployment_get_csum(OstreeDeployme...
#include <ostree.h> #include <stdlib.h> extern "C" OstreeDeployment *ostree_sysroot_get_booted_deployment(OstreeSysroot *self) { (void)self; static OstreeDeployment *deployment; if (deployment != nullptr) { return deployment; } const char *hash = getenv("OSTREE_HASH"); deployment = ostree_deployment_...
Fix mem leak in test code
aktualizr-lite: Fix mem leak in test code Pretty much the same idea as: https://github.com/advancedtelematic/aktualizr/pull/1398 Signed-off-by: Andy Doan <e3579b1e47f273529f0f929453e939a68ede9fd1@foundries.io>
C++
mpl-2.0
advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp,advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp,advancedtelematic/aktualizr,advancedtelematic/aktualizr
a877bb83bf727a8d778d10e10847cb5662482e7b
lib/Target/AArch64/AArch64MachineLegalizer.cpp
lib/Target/AArch64/AArch64MachineLegalizer.cpp
//===- AArch64MachineLegalizer.cpp -------------------------------*- C++ -*-==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===- AArch64MachineLegalizer.cpp -------------------------------*- C++ -*-==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Mark basic binops/memops as legal.
[AArch64][GlobalISel] Mark basic binops/memops as legal. We currently use and test these, and select most of them. Mark them as legal even though we don't go through the full ir->asm flow yet. This doesn't currently have standalone tests, but the verifier will soon learn to check that the regbankselect/select tests a...
C++
apache-2.0
apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror...
e922efa29ff368111350fcb3b9704c431a023e9d
jpegenc/jpegenc/loader/PPMLoader.cpp
jpegenc/jpegenc/loader/PPMLoader.cpp
#include <memory> #include "PPMLoader.hpp" std::shared_ptr<Image> PPMLoader::load(const char *pathToImage) { FILE *file = fopen(pathToImage, "r"); char magicNumber[8]; fscanf(file, "%s\n", magicNumber); int width, height; fscanf(file, "%d %d\n", &width, &height); int maxValue; fscanf(file, "%d\n", &maxValue)...
#include <memory> #include "PPMLoader.hpp" std::shared_ptr<Image> PPMLoader::load(const char *pathToImage) { FILE *file = fopen(pathToImage, "r"); char magicNumber[8]; fscanf(file, "%s\n", magicNumber); int width, height; fscanf(file, "%d %d\n", &width, &height); int maxValue; fscanf(file, "%d\n", &maxValue)...
Replace int_8 with size_t to fix conversion bug
Replace int_8 with size_t to fix conversion bug
C++
mit
relikd/jpeg-encoder,relikd/jpeg-encoder
138fd34d1a1628fcb1a4449dacc41f9cf4e38527
main.cpp
main.cpp
// Includes. #include "UI/mainwindow.h" #include "App/App.h" #include "App/Factories/AdditionNFDelegate.h" #include "App/Factories/ConstantNFDelegate.h" #include "App/Factories/PrinterNFDelegate.h" #include "App/Factories/TextFileNFDelegate.h" #include "System/QtBasedFileSystem.h" // Qt. #include <QApplication> QS...
// Includes. #include "UI/mainwindow.h" #include "App/App.h" #include "App/Factories/AdditionNFDelegate.h" #include "App/Factories/ConstantNFDelegate.h" #include "App/Factories/PrinterNFDelegate.h" #include "App/Factories/TextFileNFDelegate.h" #include "System/QtBasedFileSystem.h" // Qt. #include <QApplication> QS...
Use function to load all script files in script directory.
Use function to load all script files in script directory.
C++
mit
jefaramvangorp/nodin
1a37bb6a947ced3c9750d6e2bdd1ea90c3c12a4b
main.cpp
main.cpp
#include <QApplication> #include <QtDeclarative> #include <QDeclarativeView> #include <QDeclarativeContext> #include "settingspersistor.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QSettings settings("qmltweeter.conf", QSettings::IniFormat); settings.sync(); QDeclarativeView v...
#include <QApplication> #include <QtDeclarative> #include <QDeclarativeView> #include <QDeclarativeContext> #include "settingspersistor.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QSettings settings("qmltweeter.conf", QSettings::IniFormat); settings.sync(); QDeclarativeView v...
Remove unnecessary dynamic_cast to base class
Remove unnecessary dynamic_cast to base class Signed-off-by: Sami Rosendahl <b33c757bb777642ab0d59c699f8d5782929a814f@reaktor.fi>
C++
mit
akisaarinen/qmltweeter,akisaarinen/qmltweeter
6035382bb5b1a31f98d2b5731a2ea6d4e85fceda
lib/UserInterface/RequiredSymbols.cpp
lib/UserInterface/RequiredSymbols.cpp
// request symbols #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/CValuePrinter.h" #include "cling/Interpreter/DynamicExprInfo.h" #include "cling/Interpreter/InterpreterCallbacks.h" #include "cling/Interpreter/LookupHelper.h" #include "cling/Interpreter/ValuePrinter.h" #include "cling/Interprete...
// request symbols #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/CValuePrinter.h" #include "cling/Interpreter/DynamicExprInfo.h" #include "cling/Interpreter/InterpreterCallbacks.h" #include "cling/Interpreter/LookupHelper.h" #include "cling/Interpreter/ValuePrinter.h" #include "cling/Interprete...
Put the symbol requester func into the proper namespace!
Put the symbol requester func into the proper namespace! git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@46987 27541ba8-7e3a-0410-8455-c3a389f83636
C++
lgpl-2.1
marsupial/cling,perovic/cling,marsupial/cling,karies/cling,marsupial/cling,root-mirror/cling,karies/cling,karies/cling,root-mirror/cling,karies/cling,root-mirror/cling,perovic/cling,marsupial/cling,marsupial/cling,marsupial/cling,perovic/cling,root-mirror/cling,perovic/cling,root-mirror/cling,perovic/cling,karies/cling...
568ffbf22ad293c368b8f7a514635033ec641de8
platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp
platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp
/* * Copyright (c) , Arm Limited and affiliates. * SPDX-License-Identifier: Apache-2.0 * * 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...
/* * Copyright (c) , Arm Limited and affiliates. * SPDX-License-Identifier: Apache-2.0 * * 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...
Allow unit tests to be compiled with -fno-exception
Allow unit tests to be compiled with -fno-exception
C++
apache-2.0
mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed
2c4e0ba8f161fd9a455134b750f3695379760f25
src/tools/cli_disassembler/cli_disassembler.cpp
src/tools/cli_disassembler/cli_disassembler.cpp
/* * dis.cpp * * Created on: Sep 20, 2015 * Author: anon */ #include "arm/ARMDisassembler.h" #include <memory> #include <string> #include <cstdint> #include <iostream> using namespace std; using namespace Disassembler; int main(int argc, char **argv) { if (argc < 2) { cerr << "Usage: ./%s [th...
/* * dis.cpp * * Created on: Sep 20, 2015 * Author: anon */ #include "arm/ARMDisassembler.h" #include <memory> #include <string> #include <cstdint> #include <iostream> using namespace std; using namespace Disassembler; int main(int argc, char **argv) { if (argc < 2) { cerr << "Usage: ./%s [th...
Make sure we invert the thumb2 opcodes.
Make sure we invert the thumb2 opcodes.
C++
mit
agustingianni/retools,agustingianni/retools,agustingianni/retools,agustingianni/retools
38e4b97e6a646aa8c333956de9a7570868ed22eb
cpp/util/testing.cc
cpp/util/testing.cc
#include "util/testing.h" #include <gflags/gflags.h> #include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on command line. // Log to st...
#include "util/testing.h" #include <event2/thread.h> #include <gflags/gflags.h> #include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on c...
Call evthread_use_pthreads() in all tests.
Call evthread_use_pthreads() in all tests.
C++
apache-2.0
katjoyce/certificate-transparency,grandamp/certificate-transparency,eranmes/certificate-transparency,pphaneuf/certificate-transparency,plietar/certificate-transparency,ksmaheshkumar/certificate-transparency,plietar/certificate-transparency,aeijdenberg/certificate-transparency,plietar/certificate-transparency,benlaurie/...
cb4ad6763da261025890383a6c24a49d2fe07e25
test/clang-tidy/static-analyzer.cpp
test/clang-tidy/static-analyzer.cpp
// REQUIRES: static-analyzer // RUN: clang-tidy %s -checks='-*,clang-analyzer-*' -- | FileCheck %s extern void *malloc(unsigned long); extern void free(void *); void f() { int *p = new int(42); delete p; delete p; // CHECK: warning: Attempt to free released memory [clang-analyzer-cplusplus.NewDelete] } void g...
// REQUIRES: static-analyzer // RUN: clang-tidy %s -checks='-*,clang-analyzer-*' -- | FileCheck %s extern void *malloc(unsigned long); extern void free(void *); void f() { int *p = new int(42); delete p; delete p; // CHECK: warning: Attempt to delete released memory [clang-analyzer-cplusplus.NewDelete] } void...
Fix a lit test failure after MallocChecker changes
Fix a lit test failure after MallocChecker changes git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@349288 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
d646c6f7531a4e72e74361f451de7262ecff9095
src/arithmetics.cpp
src/arithmetics.cpp
#include "arithmetics.hpp" namespace arithmetics { int add(int a, int b) { return a + b; } int add_buggy(int a, int b) { return a + b + 1; } }
#include "arithmetics.hpp" namespace arithmetics { int add(int a, int b) { return a + b; } int add_buggy(int a, int b) { return a + b; } }
Fix bug to see Travis succeed
Fix bug to see Travis succeed
C++
mit
daixtrose/continuous-integration-demo,daixtrose/continuous-integration-demo
c192a7d41265a3ca8856c74df44ccf7db2d5b4dc
algorithms/contiguous-data/product-except-self/main_perfs.cpp
algorithms/contiguous-data/product-except-self/main_perfs.cpp
#include <numeric> #include <vector> #include SPECIFIC_HEADER int main(int /*argc*/, char** /*argv*/) { constexpr unsigned num_entries = 1e7; std::vector<int> in(num_entries); std::iota(std::begin(in), std::end(in), 0); auto out = product_except(in); bool success = out[1] == 0; return !success; }
#include <numeric> #include <vector> #include SPECIFIC_HEADER int main(int /*argc*/, char** /*argv*/) { constexpr unsigned num_entries = 10000000; std::vector<int> in(num_entries); std::iota(std::begin(in), std::end(in), 0); auto out = product_except(in); bool success = out[1] == 0; return !success; }
Fix double to unsigned error
[product-except-self][vs] Fix double to unsigned error
C++
mit
dubzzz/various-algorithms,dubzzz/various-algorithms
510d26639f1c88047a289721e4369a67f93c4748
test.cpp
test.cpp
#include <iostream> #include <algorithm> #include "io/PGMIO.hpp" #include "matrix/Matrix.hpp" using namespace sipl; int main(int argc, char** argv) { if (argc < 2) { std::cout << "Usage:" << std::endl; std::cout << " " << argv[0] << " file.pgm" << std::endl; std::exit(1); } // ...
#include <iostream> #include <algorithm> #include "io/PgmIO.hpp" #include "matrix/Matrix.hpp" using namespace sipl; int main(int argc, char** argv) { if (argc < 3) { std::cout << "Usage:" << std::endl; std::cout << " " << argv[0] << " infile.pgm outfile.pgm" << std::endl; ...
Update for removal of type-specifier from reader
Update for removal of type-specifier from reader
C++
apache-2.0
get9/sipl
87866cec8322114b768860a5971f64203b587dbd
SingleElement/SingleElement/main.cpp
SingleElement/SingleElement/main.cpp
#include <iostream> #include <fstream> #include <memory> #include "..\..\shared\ProblemEngine.h" int FindSingleElement(const std::shared_ptr<int>& inputArray, int size); int main(int argc, char * argv[]) { ProblemEngine engine("input.txt"); if (!engine.IsFileOk()) { std::cout << "Unable to open input.txt" << st...
#include <iostream> #include <fstream> #include <memory> #include "..\..\shared\ProblemEngine.h" int FindSingleElement(const std::shared_ptr<int>& inputArray, int size); int main(int argc, char * argv[]) { ProblemEngine engine("input.txt"); if (!engine.IsFileOk()) { std::cout << "Unable to open input.txt" << st...
Implement method for finding single element by counting occurrences of each bit across all elements in the input array
Implement method for finding single element by counting occurrences of each bit across all elements in the input array
C++
mit
ethanmoffat/InterviewQuestions
5345fe7dd63ebb400d46b64f56a734d6cc6e551a
test/test_labels.cc
test/test_labels.cc
#include <Eigen/Core> #include "./test.h" #include "../src/labelling/labels.h" #include "../src/labelling/label.h" TEST(Test_Labels, ChangeNotification) { Labels labels; int changedLabelId = -1; Labels::Action receivedAction; auto removeSubscription = labels.subscribe([&changedLabelId, &receivedAction]( ...
#include <Eigen/Core> #include "./test.h" #include "../src/labelling/labels.h" #include "../src/labelling/label.h" TEST(Test_Labels, ChangeNotification) { Labels labels; int changedLabelId = -1; Labels::Action receivedAction; auto removeSubscription = labels.subscribe([&changedLabelId, &receivedAction]( ...
Add test for removing a label.
Add test for removing a label.
C++
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
cfd294b728f430c3a436c1b47d132a2ad574fce6
test/cxa_thread_atexit_test.pass.cpp
test/cxa_thread_atexit_test.pass.cpp
//===--------------------- cxa_thread_atexit_test.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. // //===----------------------------------------...
//===--------------------- cxa_thread_atexit_test.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. // //===----------------------------------------...
Mark thread exit test as unsupported w/o threads
Mark thread exit test as unsupported w/o threads git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@285523 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi
a241754072e9a7a84c48c824b4f17490a1f487e7
chrome/browser/extensions/extension_webnavigation_apitest.cc
chrome/browser/extensions/extension_webnavigation_apitest.cc
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" IN_PROC_BROWSER_T...
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" IN_PROC_BROWSER_T...
Disable ExtensionApiTest.WebNavigationEvents1, flakily exceeds test timeout
Disable ExtensionApiTest.WebNavigationEvents1, flakily exceeds test timeout TBR=jochen BUG=72165 TEST=browser_tests Review URL: http://codereview.chromium.org/6286142 git-svn-id: http://src.chromium.org/svn/trunk/src@73975 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: e606e1da3ebcab3f6e962919f1861657481747...
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...
5b8e100806cc329bf192c5d921717d66e6b0fb3b
SvgWin2D.Shared/style.cpp
SvgWin2D.Shared/style.cpp
#include "pch.h" #include "style.h" using namespace Windows::Foundation; style::style() : fill_(paint_type::color, Colors::Black) , stroke_(paint_type::none, Colors::Black) , strokeWidth_(length{ 0, unit::unspecified }) { } ICanvasBrush^ style::fillBrush(ICanvasResourceCreator^ resourceCreator) { r...
#include "pch.h" #include "style.h" using namespace Windows::Foundation; style::style() : fill_(paint_type::color, Colors::Black) , stroke_(paint_type::none, Colors::Black) , strokeWidth_(length{ 1, unit::unspecified }) { } ICanvasBrush^ style::fillBrush(ICanvasResourceCreator^ resourceCreator) { r...
Set default stroke-width to 1
Set default stroke-width to 1
C++
mit
damyanp/SvgWin2D,clarkezone/SvgWin2D,damyanp/SvgWin2D,clarkezone/SvgWin2D,clarkezone/SvgWin2D,damyanp/SvgWin2D
35099f02fce57482b676add934c853764d60015a
src/compiler/util.cpp
src/compiler/util.cpp
// // Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // #include <math.h> #include <stdlib.h> #include "util.h" #ifdef _MSC_VER #include <locale.h> #else #include <sstream> #endif doub...
// // Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // #include <math.h> #include <stdlib.h> #include "util.h" #ifdef _MSC_VER #include <locale.h> #else #include <sstream> #endif doub...
Fix memory leak in float literal parsing Issue=93
Fix memory leak in float literal parsing Issue=93 Contributed by Benoit Jacob
C++
bsd-3-clause
csulmone/angle,csulmone/angle,csulmone/angle,csulmone/angle
a552617d8e267e5a35ee453bb3b12f314d1710dd
webkit/support/gc_extension.cc
webkit/support/gc_extension.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 "webkit/support/gc_extension.h" #include "v8/include/v8.h" const char kGCExtensionName[] = "v8/GCController"; namespace extensions_v8 { /...
// 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 "webkit/support/gc_extension.h" #include "v8/include/v8.h" const char kGCExtensionName[] = "v8/GCController"; namespace extensions_v8 { /...
Add GCController.minorCollect(), which triggers one minor GC cycle
Add GCController.minorCollect(), which triggers one minor GC cycle Currently there is no way to test behavior of minor GC cycles in layout tests. This patch adds the ability. In V8, with the --expose-gc option, gc() triggers 7 major GC cycles. gc(true) triggers 1 minor GC cycle. Review URL: https://chromiumcoderevie...
C++
bsd-3-clause
mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,dednal/chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,Just-D/chromium-1,M4sse/chromium.src,Just-D/chromium-1,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,littlstar/chromium.sr...
5106bd8f2d542b7589eaf2f673506b9e0e8078e4
src/runtime/profiler_inlined.cpp
src/runtime/profiler_inlined.cpp
#include "HalideRuntime.h" #include "runtime_internal.h" extern "C" { WEAK __attribute__((always_inline)) int halide_profiler_set_current_func(halide_profiler_state *state, int tok, int t) { __sync_synchronize(); state->current_func = tok + t; __sync_synchronize(); return 0; } }
#include "HalideRuntime.h" #include "runtime_internal.h" extern "C" { WEAK __attribute__((always_inline)) int halide_profiler_set_current_func(halide_profiler_state *state, int tok, int t) { // Do a volatile store to discourage llvm from reordering it. volatile int *ptr = &(state->current_func); *ptr = to...
Use a volatile store instead of a memory barrier
Use a volatile store instead of a memory barrier It's lower overhead.
C++
mit
dougkwan/Halide,delcypher/Halide,jiawen/Halide,kgnk/Halide,damienfir/Halide,dan-tull/Halide,tdenniston/Halide,aam/Halide,smxlong/Halide,tdenniston/Halide,rodrigob/Halide,aam/Halide,ayanazmat/Halide,rodrigob/Halide,fengzhyuan/Halide,damienfir/Halide,fengzhyuan/Halide,myrtleTree33/Halide,rodrigob/Halide,delcypher/Halide,...
e0887dd631ed236bb1cc502c8586e7b4a2a0e92d
src/jcon/json_rpc_debug_logger.cpp
src/jcon/json_rpc_debug_logger.cpp
#include "pch.h" #include "json_rpc_debug_logger.h" #include <QDebug> namespace jcon { void JsonRpcDebugLogger::logInfo(const QString& message) { qDebug().noquote() << message; } void JsonRpcDebugLogger::logWarning(const QString& message) { qDebug().noquote() << message; } void JsonRpcDebugLogger::logError...
#include "json_rpc_debug_logger.h" #include <QDebug> namespace jcon { void JsonRpcDebugLogger::logInfo(const QString& message) { qDebug().noquote() << message; } void JsonRpcDebugLogger::logWarning(const QString& message) { qDebug().noquote() << message; } void JsonRpcDebugLogger::logError(const QString& m...
Remove inclusion of non-existing precompiled header
Remove inclusion of non-existing precompiled header
C++
mit
zeromem88/jcon-cpp,zeromem88/jcon-cpp,joncol/jcon,zeromem88/jcon-cpp,joncol/jcon-cpp,joncol/jcon,joncol/jcon-cpp,joncol/jcon-cpp,joncol/jcon
9287d9dbb81769589d34b6f6360303ff1b2b753c
source/Pictus/reg_filter_mode_translator.cpp
source/Pictus/reg_filter_mode_translator.cpp
#include "reg_filter_mode_translator.h" #include "orz/types.h" namespace Reg { namespace Internal { boost::optional<FilterModeTranslator::external_type> FilterModeTranslator::get_value(internal_type const sval) { if (sval.empty()) return boost::none; if (sval == "Bilinear") { return Filter::Mode::Bilinear...
#include "reg_filter_mode_translator.h" #include "orz/types.h" namespace Reg { namespace Internal { boost::optional<FilterModeTranslator::external_type> FilterModeTranslator::get_value(internal_type const sval) { if (sval.empty()) return boost::none; if (sval == "Bilinear") { return Filter::Mode::Bilinear...
Fix compile errors on Linux
Fix compile errors on Linux
C++
mit
poppeman/Pictus,poppeman/Pictus,poppeman/Pictus
211391aa05ef3a8f0a0d8662c217e4c0f5217bab
src/scheduler/libcoroutine/Coro.cc
src/scheduler/libcoroutine/Coro.cc
#ifndef SCHEDULER_CORO_OSTHREAD # include "Coro.c" #endif
#include <sdk/config.h> #ifndef SCHEDULER_CORO_OSTHREAD # include "Coro.c" #endif
Include sdk/config.h before testing configuration macros.
Include sdk/config.h before testing configuration macros. * src/scheduler/libcoroutine/Coro.cc: Here.
C++
bsd-3-clause
urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,aldebaran/urbi
54b62f3af50ef93df05e9f7634b6e4406ab56cc5
lib/CodeGen/MachineDominators.cpp
lib/CodeGen/MachineDominators.cpp
//===- MachineDominators.cpp - Machine Dominator Calculation --------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===- MachineDominators.cpp - Machine Dominator Calculation --------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Fix build issue on certain compilers.
Fix build issue on certain compilers. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@45629 91177308-0d34-0410-b5e6-96231b3b80d8
C++
bsd-2-clause
dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/ll...
b3f4a400e9e403e2721c72633e5e4fd9e5b4fd80
tests/src/TestBCGlobalFile.cpp
tests/src/TestBCGlobalFile.cpp
#include "gtest/gtest.h" #include "braincloud/BrainCloudClient.h" #include "TestResult.h" #include "TestBCGlobalFile.h" #include <vector> using namespace BrainCloud; static const std::string testfileName = "png1.png"; static const std::string testFileId = "34802251-0da0-419e-91b5-59d91790af15"; static const std::strin...
#include "gtest/gtest.h" #include "braincloud/BrainCloudClient.h" #include "TestResult.h" #include "TestBCGlobalFile.h" #include <vector> using namespace BrainCloud; static const std::string testfileName = "testGlobalFile.png"; static const std::string testFileId = "ed2d2924-4650-4a88-b095-94b75ce9aa18"; static const ...
Revert updating file/folder parameter for Global File unit tests
Revert updating file/folder parameter for Global File unit tests
C++
apache-2.0
getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp,getbraincloud/braincloud-cpp
da0279d947c12814a99b700b49ffb71cada8d755
platform/android/Rhodes/jni/src/mapview.cpp
platform/android/Rhodes/jni/src/mapview.cpp
#include "JNIRhodes.h" #include "gapikey.h" #include <common/rhoparams.h> #undef DEFAULT_LOGCATEGORY #define DEFAULT_LOGCATEGORY "MapView" RHO_GLOBAL void mapview_create(rho_param *p) { #ifdef GOOGLE_API_KEY jclass clsMapView = getJNIClass(RHODES_JAVA_CLASS_MAPVIEW); if (!clsMapView) return; jmethodID m...
#include "JNIRhodes.h" #include "gapikey.h" #include <common/rhoparams.h> #undef DEFAULT_LOGCATEGORY #define DEFAULT_LOGCATEGORY "MapView" extern "C" void alert_show_popup(char *); RHO_GLOBAL void mapview_create(rho_param *p) { #ifdef GOOGLE_API_KEY jclass clsMapView = getJNIClass(RHODES_JAVA_CLASS_MAPVIEW); ...
Add alert when Google API key was not specified
Add alert when Google API key was not specified
C++
mit
watusi/rhodes,rhomobile/rhodes,pslgoh/rhodes,tauplatform/tau,pslgoh/rhodes,tauplatform/tau,watusi/rhodes,watusi/rhodes,rhomobile/rhodes,rhomobile/rhodes,watusi/rhodes,rhomobile/rhodes,pslgoh/rhodes,watusi/rhodes,tauplatform/tau,pslgoh/rhodes,watusi/rhodes,tauplatform/tau,tauplatform/tau,rhomobile/rhodes,rhomobile/rhode...
22373335dcc3d1dc36f0445e75732ef05b71e67f
src/DotGraphOutput.cc
src/DotGraphOutput.cc
#include "DotGraphOutput.hh" #include "EdgeType.hh" string getEdgeStyle(EdgeType t) { switch (t) { case EdgeType::Plane: return "[color=red]"; case EdgeType::Train: return "[color=blue,style=dotted]"; default: return ""; } } template <typename V> void DotGraphOutput<V>::output(string path) { ...
#include "DotGraphOutput.hh" #include "EdgeType.hh" #include <sstream> template <typename V> string getEdgeStyle(EdgeType t, V val) { stringstream ss; string end("\"]"); switch (t) { case EdgeType::Plane: ss << string("[color=red, label=\"") << val << end; break; case EdgeType::Train: ss << ...
Add edges values and proper labels to node in Dot output
Add edges values and proper labels to node in Dot output
C++
unlicense
Thooms/yolo-graphs,Thooms/yolo-graphs,Thooms/yolo-graphs
29e883c26c856679c645e44d831e027057550fcc
src/arch/linux/system_event/eventfd.cc
src/arch/linux/system_event/eventfd.cc
#ifdef LEGACY_LINUX // Wrappers for eventfd(), since CentOS backported the system // calls but not the libc wrappers. #include "arch/linux/system_event/eventfd.hpp" #include "utils.hpp" #include <sys/syscall.h> int eventfd(int count, int flags) { rassert(flags == 0); // Legacy kernel doesn't have eventfd2. r...
#ifdef LEGACY_LINUX // Wrappers for eventfd(), since CentOS backported the system // calls but not the libc wrappers. #include "arch/linux/system_event/eventfd.hpp" #include "utils.hpp" #include <sys/syscall.h> int eventfd(int count, UNUSED int flags) { rassert(flags == 0); // Legacy kernel doesn't have eventfd2...
Fix a compiler error glitch with some bullshit.
Fix a compiler error glitch with some bullshit.
C++
agpl-3.0
yakovenkodenis/rethinkdb,captainpete/rethinkdb,gavioto/rethinkdb,sebadiaz/rethinkdb,mcanthony/rethinkdb,bchavez/rethinkdb,lenstr/rethinkdb,ajose01/rethinkdb,jesseditson/rethinkdb,AntouanK/rethinkdb,JackieXie168/rethinkdb,sebadiaz/rethinkdb,losywee/rethinkdb,mcanthony/rethinkdb,jmptrader/rethinkdb,KSanthanam/rethinkdb,y...
dc360af41116583f1387c7f55dc5ba32d0afd19f
src/gui-qt/main.cpp
src/gui-qt/main.cpp
/* * This file is part of the UnTech Editor Suite. * Copyright (c) 2016 - 2019, Marcus Rowe <undisbeliever@gmail.com>. * Distributed under The MIT License: https://opensource.org/licenses/MIT */ #include "mainwindow.h" #include "version.h" #include <QApplication> #include <QCommandLineParser> using namespace UnTe...
/* * This file is part of the UnTech Editor Suite. * Copyright (c) 2016 - 2019, Marcus Rowe <undisbeliever@gmail.com>. * Distributed under The MIT License: https://opensource.org/licenses/MIT */ #include "mainwindow.h" #include "version.h" #include <QApplication> #include <QCommandLineParser> #include <QSettings> ...
Use an ini file to store GUI settings in windows
Use an ini file to store GUI settings in windows The `window_state` QSettings key is ~5.3KB and Microsoft's documentation recommends that we do not store values > 2048 bytes in the registry.
C++
mit
undisbeliever/untech-editor,undisbeliever/untech-editor
0169c849d903c80edd36ba6f73e18f1a5d9e7a3e
src/nwg_service.cc
src/nwg_service.cc
#include "nwg_service.h" #include "nwg_eventloop.h" namespace Nwg { Service::Service(EventLoop *eventLoop) : _eventLoop(eventLoop), _protocolCodec(nullptr), _handler(nullptr) { } Service::~Service() { _protocolCodec.reset(); _handler.reset(); } void Service::setBuffSize(int buffSize) { _buf...
#include "nwg_service.h" #include "nwg_eventloop.h" #include "nwg_basicprotocolcodec.h" namespace Nwg { Service::Service(EventLoop *eventLoop) : _eventLoop(eventLoop), _protocolCodec(nullptr), _handler(nullptr) { } Service::~Service() { _protocolCodec.reset(); _handler.reset(); } void Servi...
Create BasicProtocolCodec if _protocolCodec is null
Create BasicProtocolCodec if _protocolCodec is null @ Service::getProtocolCodec()
C++
mit
ynov/nwg,ynov/nwg
521abb2a028d7040f1a9cda36445aab054c7969d
src/PrologInterface.cpp
src/PrologInterface.cpp
#include "PrologInterface.h" void PrologLifetime::begin(int argc, char *argv[]) { if (!PL_initialise(argc, argv)) { PL_halt(EXIT_FAILURE); } } void PrologLifetime::end() { PL_halt(EXIT_SUCCESS); }
#include "PrologInterface.h" void PrologLifetime::begin(int argc, char *argv[]) { if (!PL_initialise(argc, argv)) { PL_halt(EXIT_FAILURE); } } void PrologLifetime::end() { PL_cleanup(EXIT_SUCCESS); }
Use PL_cleanup instead of PL_halt
Use PL_cleanup instead of PL_halt PL_halt halts execution (silly me, of course it does). We don't want that, so we use PL_cleanup instead.
C++
mit
henry-nazare/swipl-cpp-bindings
eb92e9cdd80c518c2ac2bb87287cfdf9eb4dee0a
atom/common/event_emitter_caller.cc
atom/common/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/event_emitter_caller.h" namespace mate { namespace internal { v8::Local<v8::Value> CallEmitWithArgs(v8::Isolate* isolate, ...
// 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/event_emitter_caller.h" #include "atom/common/node_includes.h" namespace mate { namespace internal { v8::Local<v8::Value> CallEmitWithArgs(v8::Isolate* isolat...
Use node::MakeCallback to emit events in C++
Use node::MakeCallback to emit events in C++ Fix #2165
C++
mit
JesselJohn/electron,Floato/electron,pombredanne/electron,faizalpribadi/electron,arusakov/electron,IonicaBizauKitchen/electron,mjaniszew/electron,tonyganch/electron,medixdev/electron,bpasero/electron,tonyganch/electron,tinydew4/electron,tomashanacek/electron,renaesop/electron,jjz/electron,zhakui/electron,BionicClick/ele...
b1f1c220825dc204a17b44e6bbf5278026ec00b3
terminal/GoogleLogFatalHandler.cpp
terminal/GoogleLogFatalHandler.cpp
#include "GoogleLogFatalHandler.hpp" #include "Headers.hpp" namespace google { namespace glog_internal_namespace_ { void DumpStackTraceToString(string* stacktrace); } } // namespace google static void DumpStackTraceToFileAndExit() { string s; google::glog_internal_namespace_::DumpStackTraceToString(&s); LOG(E...
#include "GoogleLogFatalHandler.hpp" #include "Headers.hpp" namespace google { namespace glog_internal_namespace_ { void DumpStackTraceToString(string* stacktrace); } } // namespace google static void DumpStackTraceToFileAndExit() { string s; google::glog_internal_namespace_::DumpStackTraceToString(&s); LOG(E...
Remove logic that isn't supported on Ubuntu/Debian
Remove logic that isn't supported on Ubuntu/Debian
C++
apache-2.0
MisterTea/EternalTCP,MisterTea/EternalTCP,MisterTea/EternalTCP
1f3eec4089d8b6d2649ee4206a686688bb6502f4
raytracer/source/common/RGBColor.cpp
raytracer/source/common/RGBColor.cpp
#include <RGBColor.h> RGBColor RGBColor::black(glm::vec3(0.f, 0.f, 0.f)); RGBColor RGBColor::red(glm::vec3(1.f, 0.f, 0.f)); RGBColor::RGBColor() : color(glm::vec3(0.f, 0.f, 0.f)) { } RGBColor::RGBColor(const glm::vec3& color) : color(color) { } glm::vec3 RGBColor::GetRGBComponents() const { return this-...
#include <RGBColor.h> RGBColor RGBColor::black(glm::vec3(0.f, 0.f, 0.f)); RGBColor RGBColor::red(glm::vec3(1.f, 0.f, 0.f)); RGBColor::RGBColor() : color(glm::vec3(0.f, 0.f, 0.f)) { } RGBColor::RGBColor(const glm::vec3& color) : color(color) { } glm::vec3 RGBColor::GetRGBComponents() const { return this-...
Correct for color order inside PNG
Correct for color order inside PNG
C++
mit
phaser/raytracer
0a608930a70236072570f6e6d3f91d2fcf08c15f
test/clang-tidy/select-checks.cpp
test/clang-tidy/select-checks.cpp
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: clang-tidy %t.cpp -fix -checks=llvm.* -- // RUN: FileCheck -input-file=%t.cpp %s namespace i { } // CHECK: } // namespace i class A { A(int i); }; // Not fixing this, because the check is in google-. // CHECK: class A { A(int i); };
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: clang-tidy %t.cpp -fix -checks=^llvm-.* -- // RUN: FileCheck -input-file=%t.cpp %s namespace i { } // CHECK: } // namespace i class A { A(int i); }; // Not fixing this, because the check is in google-. // CHECK: class A { A(int i); };
Use more specific checks filter in the test.
Use more specific checks filter in the test. git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@203097 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
1f35ec3c2c5662644c07969a1b5c5ad748764285
test/PCH/cxx-typeid.cpp
test/PCH/cxx-typeid.cpp
// XFAIL: hexagon // Test this without pch. // RUN: %clang_cc1 -include %S/cxx-typeid.h -fsyntax-only -verify %s // RUN: %clang_cc1 -x c++-header -emit-pch -o %t.pch %S/cxx-typeid.h // RUN: %clang_cc1 -include-pch %t.pch -fsyntax-only -verify %s // expected-no-diagnostics void f() { (void)typeid(int); }
// Test this without pch. // RUN: %clang_cc1 -include %S/cxx-typeid.h -fsyntax-only -verify %s // RUN: %clang_cc1 -x c++-header -emit-pch -o %t.pch %S/cxx-typeid.h // RUN: %clang_cc1 -include-pch %t.pch -fsyntax-only -verify %s // expected-no-diagnostics void f() { (void)typeid(int); }
Remove XFAIL now that the test is standalone.
Remove XFAIL now that the test is standalone. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@179538 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
850c12e91c08183bdc866581cbc86e19db0dbc8f
samples/employees.cpp
samples/employees.cpp
#include <tabulate/table.hpp> using namespace tabulate; int main() { Table employees; // Add rows employees.add_row({"Emp. ID", "First Name", "Last Name", "Department / Business Unit"}); employees.add_row({"101", "Donald", "Patrick", "Finance"}); employees.add_row({"102", "Donald", "Patrick", "Marketing an...
#include <tabulate/table.hpp> using namespace tabulate; int main() { Table employees; // Add rows employees.add_row({"Emp. ID", "First Name", "Last Name", "Department / Business Unit"}); employees.add_row({"101", "Donald", "Patrick", "Finance"}); employees.add_row({"102", "Donald", "Patrick", "Marketing an...
Reset all styles in sample
Reset all styles in sample
C++
mit
p-ranav/tabulate,p-ranav/tabulate,p-ranav/tabulate
c011b40506deb0ddf8c945a3be3c57f91fe154c4
examples/hadamard.cpp
examples/hadamard.cpp
#include <iostream> #include <ctime> #include <QCPP.h> int main() { // make it more non-deterministic srand(time(NULL)); // initialize Quantum state with 5 qubits Quantum qubits(5); // turns all qubits into every state with same probabilities qubits.Hadamard(0, 1, 2, 3, 4); // or // for(int i = 0;i < qubits...
#include <iostream> #include <ctime> #include <QCPP.h> int main() { // make it more non-deterministic srand(time(NULL)); // initialize Quantum state with 5 qubits Quantum qubits(5); // turns all qubits into every state with same probabilities qubits.hadamard(0, 1, 2, 3, 4); // or // for(int i = 0;i < qubits...
Fix functions' names according to last change
Fix functions' names according to last change
C++
mit
phirasit/QCPP
30462506f194fd4e39f833484bebbf1b2a54bc53
source/main.cpp
source/main.cpp
#include <iostream> #include <fstream> #include <spv_utils.h> #include <cstdint> int main() { // Read spv binary module from a file std::ifstream spv_file("../sample_spv_modules/test.frag.spv", std::ios::binary | std::ios::ate | std::ios::in); if (spv_file.is_open()) { std::streampos...
#include <iostream> #include <fstream> #include <spv_utils.h> #include <cstdint> int main() { // Read spv binary module from a file std::ifstream spv_file("../sample_spv_modules/test.frag.spv", std::ios::binary | std::ios::ate | std::ios::in); if (spv_file.is_open()) { std::streampos...
Add longer instruction test to sample
Add longer instruction test to sample
C++
mit
snowzurfer/spirv-utils
75ac882a986c80c3d11078b3f58e15240b46b9df
src/stdio.cpp
src/stdio.cpp
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include <stdio.h> #include "Arduino.h" asm(".global _printf_float"); asm(".global _scanf_float"); extern "C" { size_t _write(int handle, const unsigned char *bu...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include <stdio.h> #include "Arduino.h" // these are needed by the serializer, so force link asm(".global _printf_float"); asm(".global _scanf_float"); extern "C" { ...
Add note about _printf_float and _scanf_float
Add note about _printf_float and _scanf_float
C++
mit
sandeepmistry/AzureIoT,arduino-libraries/AzureIoT,obsoleted/AzureIoT,obsoleted/AzureIoT,stefangordon/AzureIoT,sandeepmistry/AzureIoT,stefangordon/AzureIoT,arduino-libraries/AzureIoT,arduino-libraries/AzureIoT
8f4ce96cdafeddd453065bf3bc569de0e8e5950e
thread_sleep.cc
thread_sleep.cc
/********************************************************************* * thread-sleep: Force Node.js to sleep * * Copyright (c) 2015 Forbes Lindesay * Copyright (c) 2015 Tiancheng "Timothy" Gu * * MIT License ********************************************************************/ #include <nan.h> #ifdef _WIN32 #i...
/********************************************************************* * thread-sleep: Force Node.js to sleep * * Copyright (c) 2015 Forbes Lindesay * Copyright (c) 2015 Tiancheng "Timothy" Gu * * MIT License ********************************************************************/ #include <nan.h> #ifdef _WIN32 #i...
Use correct type for millisec
Use correct type for millisec
C++
mit
ForbesLindesay/thread-sleep
1598639ccd2a4c49cb19be208fd99d7ed9696941
test/CodeGenCXX/debug-info-template-fwd.cpp
test/CodeGenCXX/debug-info-template-fwd.cpp
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s // This test is for a crash when emitting debug info for not-yet-completed types. // Test that we don't actually emit a forward decl for the offending class: // CHECK: [ DW_TAG_class_type ] [Derived<const __CFString, Foo>] {{.*}} [def]...
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s // This test is for a crash when emitting debug info for not-yet-completed types. // Test that we don't actually emit a forward decl for the offending class: // CHECK: [ DW_TAG_class_type ] [Derived<Foo>] {{.*}} [def] // rdar://problem...
Simplify testcase from r200797 some more.
Simplify testcase from r200797 some more. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@200798 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
ad432deba307c28a34cac8b6da0dd5200ead1236
ui/ozone/platform/drm/gpu/gpu_lock.cc
ui/ozone/platform/drm/gpu/gpu_lock.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 "ui/ozone/platform/drm/gpu/gpu_lock.h" #include <fcntl.h> #include <unistd.h> #include "base/logging.h" #include "base/posix/eintr_wrapper.h" ...
// 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 "ui/ozone/platform/drm/gpu/gpu_lock.h" #include <sys/file.h> #include <unistd.h> #include "base/logging.h" #include "base/posix/eintr_wrapper.h...
Change file locking from Posix to BSD style
[Ozone-Drm] Change file locking from Posix to BSD style Frecon requires BSD style file locks since the lock needs to be held past forking. So we also need to change the Ozone side since Posix and BSD locks don't mix. BUG=463665 Review URL: https://codereview.chromium.org/1007993007 Cr-Commit-Position: 972c6d2dc6dd5...
C++
bsd-3-clause
TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,axinging...
65d7f90c60a358b78799139e71566e7e6ad512e7
Math/NumberTheory/ExtendedEuclides.cpp
Math/NumberTheory/ExtendedEuclides.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector < ll > vl; vl arr(3); /* returs gcd(a,b) and find the coeficcients of bezout such that d = ax + by arr[0] gcd arr[1] x arr[2] y */ void extended(ll a, ll b){ ll y =0; ll x =1; ll xx =0; ll yy =1; while(b){ ll q = a / b; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector < ll > vl; vl arr(3); /* returs gcd(a,b) and find the coeficcients of bezout such that d = ax + by arr[0] gcd arr[1] x arr[2] y */ void extended(ll a, ll b){ ll y =0; ll x =1; ll xx =0; ll yy =1; while(b){ ll q = a / b; ...
Add –Bezouts identity, very useful.
Add –Bezouts identity, very useful.
C++
mit
xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book
bdb40dfe43a38e1aca502a2c593bf9e937e7b629
c++/abcdefghppp.cpp
c++/abcdefghppp.cpp
#include <cstdio> #include <algorithm> using namespace std; #define X(a,b) (x[a]*10+x[b]) int main() { int x[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9 }; do { int ab = X(0, 1), cd = X(2, 3), ef = X(4, 5), gh = X(6, 7); if ((ab >= 10 && cd >= 10 && ef >= 10 && gh >= 10) && (ab - cd) == ef && (ef + gh) =...
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define X(a,b) (x[a]*10+x[b]) int mkInt(vector<int> &v) { int ret = 0; for (vector<int>::iterator it = v.begin(); it != v.end(); ++it) { ret = ret * 10 + *it; } return ret; } int main() { int init_x[] = { 0, ...
Refactor C++ code to real C++ code
Refactor C++ code to real C++ code
C++
mit
jethrolam/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,grepml/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,grepml/ABCDEFGHPPP,grepml/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,dng8888/ABCDEF...
67bf24f6cba8824cbc447f89a8d191f881d669d9
week3/homework/solutions/problem1/clients.cpp
week3/homework/solutions/problem1/clients.cpp
#include <iostream> using namespace std; const int MAX = 100; struct Person { string firstName; string lastName; void input() { cout << "Enter person's first and last names separated by a space: "; cin >> firstName >> lastName; } void print() { cout << firstName << ' ' << lastName << '\n'; ...
#include <iostream> using namespace std; struct Person { char firstName[32]; char lastName[32]; void input() { cout << "Enter person's first and last names separated by a space: "; cin >> firstName >> lastName; } void print() { cout << firstName << ' ' << lastName << '\n'; } }; struct Clien...
Use char[] instead of std::string
Use char[] instead of std::string
C++
mit
dimitaruzunov/oop-practicum-2015-16
86d6488b059e48fb2097f4610187b5a51ee23c3c
remoting/host/event_executor_mac.cc
remoting/host/event_executor_mac.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 "remoting/host/event_executor_mac.h" namespace remoting { EventExecutorMac::EventExecutorMac(Capturer* capturer) : EventExecutor(capturer...
// 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 "remoting/host/event_executor_mac.h" #include "remoting/protocol/messages_decoder.h" namespace remoting { EventExecutorMac::EventExecutorM...
Fix build break on mac. TBR=ajwong
Fix build break on mac. TBR=ajwong git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@61726 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C++
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
1a6fbfa4969ddcad1790b8336932df99e854a956
net/disk_cache/cache_util_posix.cc
net/disk_cache/cache_util_posix.cc
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/disk_cache/cache_util.h" #include "base/file_util.h" #include "base/logging.h" #include "base/string_util.h" namespace disk_cache...
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/disk_cache/cache_util.h" #include "base/file_util.h" #include "base/logging.h" #include "base/string_util.h" namespace disk_cache...
Change NOTREACHED for a LOG(WARNING) when we can't delete the cache. This should help the unit tests.
Change NOTREACHED for a LOG(WARNING) when we can't delete the cache. This should help the unit tests. BUG:38562 Review URL: http://codereview.chromium.org/1594002 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@43446 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C++
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
951caa2aaf8903a7d7dc8f77c5739f5c932b913c
restnotifier/main.cpp
restnotifier/main.cpp
#include <QApplication> #include <QSettings> #include <QLocale> #include <QTranslator> #include <QLibraryInfo> #include "trayicon.h" int main(int argc, char **argv) { QApplication app(argc, argv); QApplication::setOrganizationName("Restnotifier"); app.setQuitOnLastWindowClosed(false); // Set langua...
#include <QApplication> #include <QSettings> #include <QLocale> #include <QTranslator> #include <QLibraryInfo> #include "trayicon.h" int main(int argc, char **argv) { QApplication app(argc, argv); QApplication::setOrganizationName("Restnotifier"); app.setQuitOnLastWindowClosed(false); // Set langua...
Allow to change path to translations
Allow to change path to translations
C++
mit
swarmer/restnotifier,swarmer/restnotifier,swarmer/restnotifier
1269e59a352ab94ef44591d52c40fea4970cbf83
brightray/common/application_info_win.cc
brightray/common/application_info_win.cc
#include "common/application_info.h" #include "base/file_version_info.h" #include "base/memory/scoped_ptr.h" #include "base/strings/utf_string_conversions.h" namespace brightray { std::string GetApplicationName() { auto module = GetModuleHandle(nullptr); auto info = make_scoped_ptr( FileVersionInfo::Create...
#include "common/application_info.h" #include "base/file_version_info.h" #include "base/memory/scoped_ptr.h" #include "base/strings/utf_string_conversions.h" namespace brightray { std::string GetApplicationName() { auto module = GetModuleHandle(nullptr); auto info = make_scoped_ptr( FileVersionInfo::Create...
Update for move of string conversion functions into base::
Update for move of string conversion functions into base::
C++
mit
renaesop/electron,seanchas116/electron,thomsonreuters/electron,renaesop/electron,biblerule/UMCTelnetHub,Floato/electron,rreimann/electron,bpasero/electron,rajatsingla28/electron,electron/electron,bpasero/electron,seanchas116/electron,miniak/electron,rajatsingla28/electron,seanchas116/electron,wan-qy/electron,gerhardber...
e62cbdffcf27278272e87de65a07dddc24605ad7
src/gpu/batches/GrDrawBatch.cpp
src/gpu/batches/GrDrawBatch.cpp
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrDrawBatch.h" GrDrawBatch::GrDrawBatch(uint32_t classID) : INHERITED(classID), fPipelineInstalled(false) { } GrDrawBatch::~GrDrawBatch() { if (fPipelineInstal...
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrDrawBatch.h" GrDrawBatch::GrDrawBatch(uint32_t classID) : INHERITED(classID), fPipelineInstalled(false) { } GrDrawBatch::~GrDrawBatch() { if (fPipelineInstal...
Fix assert accessing pipeline from initBatchTracker
Fix assert accessing pipeline from initBatchTracker Marks fPipelineInstalled as true before calling initBatchTracker. The batch subclass ought to be able to access the newly constructed pipeline object during its init. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=fal...
C++
bsd-3-clause
HalCanary/skia-hc,google/skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,tmpvar/skia.cc,Hikari-no-Tenshi/android_external_skia,qrealka/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,...
ecbf85ac43e96367fba0519e5f359295cbfa8885
gleri/rglrp.cc
gleri/rglrp.cc
// This file is part of the GLERI project // // Copyright (c) 2012 by Mike Sharov <msharov@users.sourceforge.net> // This file is free software, distributed under the MIT License. #include "rglrp.h" #define N(n,s) #n "\0" #s "\0" /*static*/ const char PRGLR::_cmdNames[] = "\0" // Dirty trick: object name is 4 by...
// This file is part of the GLERI project // // Copyright (c) 2012 by Mike Sharov <msharov@users.sourceforge.net> // This file is free software, distributed under the MIT License. #include "rglrp.h" #define N(n,s) #n "\0" #s "\0" /*static*/ const char PRGLR::_cmdNames[] = N(Error,s) N(Restate,(nnqqyyyy)) ...
Revert "Rename Error call to GLError"
Revert "Rename Error call to GLError" This reverts commit c216af3d3f0e910ba95eabe6d2f5a3574f051bd4.
C++
mit
msharov/gleri,msharov/gleri
73f7c59cfa3e54a94b6aa555be656d7ee3f35ad1
forth/forty.tas.cpp
forth/forty.tas.cpp
#include "forth_common.th" // A little Forth. .set link, 0 .global __zero __zero: __boot: S <- [reloc(_PSPinit)] R <- [reloc(_RSPinit)] I <- reloc(QUIT) // enter text interpreter goto(NEXT) .global _PSPinit .global _RSPinit _PSPinit: .word 0x007fffff _RSPinit: .word 0x00ffffff ...
#include "forth_common.th" // A little Forth. .set link, 0 .global __zero __zero: __boot: S <- [reloc(_PSPinit)] R <- [reloc(_RSPinit)] I <- reloc(QUIT) // enter text interpreter goto(NEXT) .global _PSPinit .global _RSPinit _PSPinit: .word 0x007fffff _RSPinit: .word 0x00ffffff ...
Drop interp-word pointer in ENTER
Drop interp-word pointer in ENTER
C++
mit
kulp/tenyr,kulp/tenyr,kulp/tenyr