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
79d2b0118cba39ef0b263b28bc30b6fa63840e5d
test17_10.cpp
test17_10.cpp
#include <iostream> #include <bitset> #include <vector> using namespace std; int main() { vector<int> ivec = {1, 2, 3, 5, 8, 13, 21}; unsigned long val = 0UL; for(auto i : ivec) { val |= 1UL << i; } cout << val << endl; bitset<32> b(val); cout << b << endl; bitse...
Add solution for chapter 17 test 10
Add solution for chapter 17 test 10
C++
apache-2.0
chenshiyang/CPP--Primer-5ed-solution
bf5206d049f1eb6398b39cfd954eb79b8777c416
trunk/research/arm/pipe_fds.cpp
trunk/research/arm/pipe_fds.cpp
/** g++ pipe_fds.cpp -g -O0 -o pipe_fds About the limits: [winlin@dev6 srs]$ ulimit -n 1024 [winlin@dev6 srs]$ sudo lsof -p 21182 pipe_fds 21182 winlin 0u CHR 136,4 0t0 7 /dev/pts/4 pipe_fds 21182 winlin 1u CHR 136,4 0t0 7 /dev/pts/4 pipe_fds 21182 winlin 2u CHR ...
Revert "Revert "add test file to show the max open files.""
Revert "Revert "add test file to show the max open files."" This reverts commit ea70f29648e6ab431dfc18dddc4a4831d78e7f84.
C++
mit
keyanmca/srs-May-2014,keyanmca/srs-May-2014,ossrs/srs,Robinson10240/simple-rtmp-server,zhiliaoniu/simple-rtmp-server,ossrs/srs,Vincent0209/simple-rtmp-server,ossrs/srs,keyanmca/srs-May-2014,drunknbass/srs,Vincent0209/simple-rtmp-server,tempbottle/simple-rtmp-server,winlinvip/srs,icevl/srs,lewdon/srs,Robinson10240/simpl...
cdbf69d2cbe479a66822383f64256c9ba76c06d3
C++_Practice/outputting_text.cpp
C++_Practice/outputting_text.cpp
#include <iostream> using namespace std; int main(){ cout << "Starting Program..." << flush; cout << "This is the first line" << endl; cout << "-Item 1. " << "-Item 2. " << "-Item 3." << endl; cout << "The Program is ending." << endl; return 0; }
Implement Outputting Text Program in C++
Implement Outputting Text Program in C++
C++
mit
Kunal57/C_Problems,Kunal57/C_Problems
a255cf9597ae9c013e1455ed2330cbfdbf28ce82
chapter25/chapter25_ex07.cpp
chapter25/chapter25_ex07.cpp
// Chapter 25, exercise 7: write out the hexadecimal values from 0 to 400; write // out the hexadecimal values from -200 to 200 #include<iostream> #include<iomanip> using namespace std; int main() { cout << "0 to 400:\n\n"; for (int i = 0; i<=400; ++i) cout << hex << i << (i%16 ? '\t' : '\n'); c...
Add Chapter 25, exercise 7
Add Chapter 25, exercise 7
C++
mit
bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp
f6e6a8e577cb09df3d5abe77d7c210880018f43b
test16_48.cpp
test16_48.cpp
#include <iostream> #include <string> #include <sstream> using namespace std; template <typename T> string debug_rep(const T &t) { ostringstream ret; ret << t; return ret.str(); } template <typename T> string debug_rep(T *p) { ostringstream ret; ret << "pointer: " << p; if(p)...
Add solution for chapter 16 test 48.
Add solution for chapter 16 test 48.
C++
apache-2.0
chenshiyang/CPP--Primer-5ed-solution
7287aabed4b55fbc43d72f208af713598a627ed8
2-patterns/structural/decorator-runtime.cpp
2-patterns/structural/decorator-runtime.cpp
// Decorator (run-time) class foo { public: virtual void do_work() = 0; }; class foo_concrete : public foo { public: virtual void do_work() { } }; class foo_decorator : public foo { public: foo_decorator(foo& f) : f(f) { } virtual void do_work() { // Do something else here to decorate // the...
Add "run-time decorator pattern" sample
Add "run-time decorator pattern" sample
C++
cc0-1.0
brunotag/CppSamples-Samples,mnpk/CppSamples-Samples,thatbrod/CppSamples-Samples,sftrabbit/CppSamples-Samples,tmwoz/CppSamples-Samples,darongE/CppSamples-Samples,vjacquet/CppSamples-Samples,rollbear/CppSamples-Samples
444eaa83cc2dd7904e4deed82574696b9337de02
test/SemaTemplate/instantiate-overload-candidates.cpp
test/SemaTemplate/instantiate-overload-candidates.cpp
// RUN: %clang_cc1 -fsyntax-only -verify %s // This is the function actually selected during overload resolution, and the // only one defined. template <typename T> void f(T*, int) {} template <typename T> struct S; template <typename T> struct S_ : S<T> { typedef int type; }; // expected-note{{in instantiation}} tem...
Add a test for a subtle instantiation pattern that showed up within a Boost miscompile reduction. Clang already handles this correctly, but let's make sure it stays that way.
Add a test for a subtle instantiation pattern that showed up within a Boost miscompile reduction. Clang already handles this correctly, but let's make sure it stays that way. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@103463 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl...
af3d38c75bfc1411ff46d64446da37878bee33e7
test/error/cannot_schedule_inlined_stages.cpp
test/error/cannot_schedule_inlined_stages.cpp
#include "Halide.h" #include <stdio.h> using namespace Halide; int main(int argc, char **argv) { Func f, g; Var x, y; f(x) = x; f(x) += x; g(x) = f(x); // f is inlined, so this schedule is bad. f.vectorize(x, 4); g.realize(10); printf("There should have been an error\n"); r...
Add error test for inlined stages
Add error test for inlined stages
C++
mit
kgnk/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide
7162e06e4e5194c95d48fc7e4151491d022330dc
test/Format/xmloutput.cpp
test/Format/xmloutput.cpp
// RUN: clang-format -output-replacements-xml -sort-includes %s > %t.xml // RUN: FileCheck -strict-whitespace -input-file=%t.xml %s // CHECK: <?xml // CHECK-NEXT: {{<replacements.*incomplete_format='false'}} // CHECK-NEXT: {{<replacement.*#include &lt;a>&#10;#include &lt;b><}} // CHECK-NEXT: {{<replacement.*>&#10;<}} ...
Add test for (properly escaped) XML output.
clang-format: Add test for (properly escaped) XML output. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@250629 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl...
e52038bdd8ccf09a984ff55d43226bedb9a45515
src/loadrec.cpp
src/loadrec.cpp
#include "types.hpp" #include "constants.hpp" #include "sys/sysctl.hpp" #include <iostream> /* std::cout, std::cerr */ #include <chrono> /* std::chrono::steady_clock::now() */ #include <thread> /* std::this_thread::sleep_until() */ #include <sys/resource.h> /* CPUSTATES */ namespace { using namespace type...
Add primitive load recorder prototype
Add primitive load recorder prototype
C++
isc
lonkamikaze/powerdxx,lonkamikaze/powerdxx
3d6b0e2bb77e7ec96cafe2856984a46afc518e07
mshp/algo/brute_force/recursive/parenthesis_sequences.cpp
mshp/algo/brute_force/recursive/parenthesis_sequences.cpp
/* * Copyright (C) 2015-2016 Pavel Dolgov * * See the LICENSE file for terms of use. */ #include <bits/stdc++.h> void generate(std::string prefix, int open, int len) { if (len == prefix.size()) { std::cout << prefix << std::endl; } else { if (open < (len - prefix.size())) { gen...
Add problem about parenthesis sequences
Add problem about parenthesis sequences
C++
mit
zer0main/problems,zer0main/problems,zer0main/problems
14b78a8985693391c058340cc6cd560cf08bcd60
karum/DeleteList.cpp
karum/DeleteList.cpp
#include<iostream> #include<cstdlib> using namespace std; class Node{ public: int data; Node *next; Node(){} Node(int d){ data=d; next=NULL; } Node *insertElement(...
Add code to delete a Linked List
Add code to delete a Linked List
C++
mit
shivan1b/codes
8591e6de8c7bea614d4ed33037d48cff3a281afa
src/tests/test_datastore.cpp
src/tests/test_datastore.cpp
/* * (C) 2018 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #include "tests.h" #if defined(BOTAN_HAS_X509_CERTIFICATES) #include <botan/datastor.h> namespace Botan_Tests { class Datastore_Tests : public Test { public: std::vector<Test::Result> run() override ...
Add some basic tests of Data_Store class
Add some basic tests of Data_Store class It's deprecated, but still exposed API and still used internally.
C++
bsd-2-clause
webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,webmaster128/botan,randombit/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/...
981944cf6686935b80b8f49a03035fcfcaa50cdc
practicum/stack/matching-parentheses.cpp
practicum/stack/matching-parentheses.cpp
#include <iostream> #include <stack> #include <utility> using std::cout; using std::boolalpha; using std::stack; using std::pair; class ParenthesesPair { pair<char, char> parentheses; public: ParenthesesPair(char opening, char closing): parentheses(opening, closing) {} char opening() const { return paren...
Add solution to the matching parentheses problem with multiple kinds of parentheses. This solution uses stack data structure
Add solution to the matching parentheses problem with multiple kinds of parentheses. This solution uses stack data structure
C++
mit
dimitaruzunov/data-structures-fmi-2016
4c3bdd6f627102278cd8a6d4c78b951f04df1a89
test/catch_ptr_02.cpp
test/catch_ptr_02.cpp
//===------------------------- catch_ptr_02.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. // //===----------------------------------------...
Add test for pointer qualification conversion.
Add test for pointer qualification conversion. git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@149541 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi
3328f81103120d983cd4e6ff9f4a8143526823c9
Fall-18/Crypto/AdditiveCipher-FrequencyAttack.cpp
Fall-18/Crypto/AdditiveCipher-FrequencyAttack.cpp
#include <iostream> #include <string> void findPossiblePlainTexts(const std::string&, int); char* decrypt(const char*); int main(int argc, char** argv) { std::cout << "Letter Frequency attack on additive cipher\n"; std::cout << "Enter the cipher text: "; std::string ciphertext; std::cin >> ciphertext; int...
Add basic structure and interface
Add basic structure and interface
C++
mit
2Dsharp/college,2Dsharp/college,2Dsharp/college,2Dsharp/college,2Dsharp/college,2Dsharp/college
be3a1a96eb88e854de57927608d2b01c7bdbfc9c
kaddressbook/kcmconfigs/kcmkabldapconfig.cpp
kaddressbook/kcmconfigs/kcmkabldapconfig.cpp
/* This file is part of KAddressBook. Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at ...
Insert libkldap catalog to translate dialogbox when we "add host"
Insert libkldap catalog to translate dialogbox when we "add host" svn path=/trunk/KDE/kdepim/; revision=925535
C++
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
5bfa3b6f620c0669fca0324cb10c8c0b70b34898
tensorflow/core/tpu/tpu_api_dlsym_initializer.cc
tensorflow/core/tpu/tpu_api_dlsym_initializer.cc
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Fix TPU VM tf-nightly build
Fix TPU VM tf-nightly build PiperOrigin-RevId: 486159337
C++
apache-2.0
tensorflow/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,yong...
20e25e0079c912ed05160a40931fb5338fb2dfe9
test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp
test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp
// -*- C++ -*- //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===------------...
Check in test that demonstrates ABI break for std::function.
Check in test that demonstrates ABI break for std::function. Our C++03 and C++11 implementations of function are not ABI compatible. I've added a "test" that demonstrates this. git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@363092 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
d85773d6ce14ddd607b2cbc3b865170a45882329
addLargerToBST.cpp
addLargerToBST.cpp
// Given a Binary Search Tree (BST), modify it so that all greater values in the given BST are added to every node. #include <iostream> using namespace std; struct Node{ int data; struct Node *left; struct Node *right; }; struct Node *newNode(int x){ struct Node *newptr = new Node; newptr->data = x; newptr->le...
Add all greater nodes to a node in BST.
Add all greater nodes to a node in BST.
C++
mit
Raghav1806/Geeks-for-Geeks-DS,Raghav1806/Geeks-for-Geeks-DS
56257293deed6417ca9def35166f21659aea37b1
dynamic_programing/C++/Longest_Increasing_Subsequence.cpp
dynamic_programing/C++/Longest_Increasing_Subsequence.cpp
#include <bits/stdc++.h> using namespace std; int main() { int arr[9] = { 1, 4, 2, 3, 8, 3, 4, 1, 9}; // LIS should be {1, 2, 3, 8, 9} int f[9] = {}, LIS[9] = {}, max = 1, L = 0; // f used to record previous location of LIS for (int i = 0; i < 9; i++) { LIS[i] = 1; f[i] = i; } ...
Add longest increasing subsequence in c++
Add longest increasing subsequence in c++
C++
cc0-1.0
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
0a02b761e8b9760849744ca7bb5e3876878e4ab4
libraries/bitcoin/bitcoin_stub.cpp
libraries/bitcoin/bitcoin_stub.cpp
#include <algorithm> #include <bts/import_bitcoin_wallet.hpp> #include <fc/exception/exception.hpp> #include <fc/log/logger.hpp> #include <fc/crypto/aes.hpp> #include <fc/crypto/base58.hpp> #include <fc/crypto/hex.hpp> namespace bts { namespace bitcoin { std::vector<fc::ecc::private_key> import_bitcoin_wallet( con...
#include <algorithm> #include <fc/exception/exception.hpp> #include <fc/log/logger.hpp> #include <fc/crypto/aes.hpp> #include <fc/crypto/base58.hpp> #include <fc/crypto/hex.hpp> #include <fc/crypto/elliptic.hpp> #include <fc/filesystem.hpp> namespace bts { namespace bitcoin { std::vector<fc::ecc::private_key> impor...
Fix includes for compiling the bitcoin import stub used when berkeley db is not available
Fix includes for compiling the bitcoin import stub used when berkeley db is not available
C++
unlicense
jakeporter/Bitshares,frrp/bitshares,denkhaus/bitsharesx,bitshares/bitshares-0.x,bitshares/bitshares-0.x,camponez/bitshares,bitsuperlab/cpp-play,jakeporter/Bitshares,jakeporter/Bitshares,bitshares/devshares,bitshares/bitshares-0.x,bitshares/devshares,RemitaBit/Remitabit,bitshares/devshares,bitshares/bitshares,bitshares/...
a09dbf1f8398c1af6f4a165fc9bc5f61c4958ea1
TESTS/core/tensorIdxImporter/test_core_tensorIdxImporter.cpp
TESTS/core/tensorIdxImporter/test_core_tensorIdxImporter.cpp
#include "test_helper.h" #include "uTensor/loaders/tensorIdxImporter.hpp" #include <iostream> using std::cout; using std::endl; TensorIdxImporter t_import; Context ctx; void test_core_ntoh32(void) { uint32_t input = 63; uint32_t result = ntoh32(input); EXPECT_EQ(result, 1056964608); } void test_core_...
Add tests for idx importer
Add tests for idx importer
C++
apache-2.0
neil-tan/uTensor,neil-tan/uTensor
208b57802ee05a05ee085408a8bd42fdbea44097
C++/058_Length_of_Last_Word.cpp
C++/058_Length_of_Last_Word.cpp
// 58. Length of Last Word /** * Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. * * If the last word does not exist, return 0. * * Note: A word is defined as a character sequence consists of non-space characters only. * * F...
Add Solution for Problem 058
Add Solution for Problem 058
C++
mit
FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res
f09ab277e18eb7a4dbe65c97fb99dd51e8e8d1af
tests/StereographicProjectionTest.cpp
tests/StereographicProjectionTest.cpp
// // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2014 Bernhard Beschow <bbeschow@cs.tu-berlin.de> // #include "StereographicProjec...
Add test for Stereographic projection for real.
Add test for Stereographic projection for real.
C++
lgpl-2.1
tzapzoor/marble,quannt24/marble,quannt24/marble,probonopd/marble,probonopd/marble,tzapzoor/marble,tucnak/marble,tzapzoor/marble,tzapzoor/marble,probonopd/marble,tucnak/marble,tzapzoor/marble,tucnak/marble,tzapzoor/marble,probonopd/marble,quannt24/marble,probonopd/marble,probonopd/marble,quannt24/marble,quannt24/marble,...
3f42909ecfe46fc786cb7e9eb662bb7f6e255154
atom/browser/atom_resource_dispatcher_host_delegate.cc
atom/browser/atom_resource_dispatcher_host_delegate.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/browser/atom_resource_dispatcher_host_delegate.h" #include "atom/browser/login_handler.h" #include "atom/common/platform_util.h" #include "content/public/browser/browse...
// 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/browser/atom_resource_dispatcher_host_delegate.h" #include "atom/browser/login_handler.h" #include "atom/common/platform_util.h" #include "content/public/browser/browse...
Call OpenExternal with new true default to activate arg
Call OpenExternal with new true default to activate arg
C++
mit
thomsonreuters/electron,felixrieseberg/electron,bpasero/electron,stevekinney/electron,renaesop/electron,renaesop/electron,Floato/electron,simongregory/electron,brenca/electron,MaxWhere/electron,thompsonemerson/electron,joaomoreno/atom-shell,gerhardberger/electron,posix4e/electron,kcrt/electron,bpasero/electron,joaomore...
9d6b1e1e47b3a0b966a21a523aaea4da81e7bfef
source/chip/STM32/STM32L0/STM32L0-lowLevelInitialization.cpp
source/chip/STM32/STM32L0/STM32L0-lowLevelInitialization.cpp
/** * \file * \brief chip::lowLevelInitialization() implementation for STM32L0 * * \author Copyright (C) 2017 Cezary Gapinski cezary.gapinski@gmail.com * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with this fil...
Add empty chip::lowLevelInitialization() for STM32L0
Add empty chip::lowLevelInitialization() for STM32L0
C++
mpl-2.0
jasmin-j/distortos,DISTORTEC/distortos,jasmin-j/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,jasmin-j/distortos,jasmin-j/distortos,CezaryGapinski/distortos,jasmin-j/distortos,DISTORTEC/distortos,DISTORTEC/distortos
94d4e8673e9f8e23794d8e1b9b16b97631c37a55
tensorflow/lite/experimental/micro/openmvcam/debug_log.cc
tensorflow/lite/experimental/micro/openmvcam/debug_log.cc
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Update debug log to support redirection
Update debug log to support redirection
C++
apache-2.0
gunan/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,annarev/tensorflow,aam-at/tensorflow,sarvex/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,yongtang...
f9e8b94eb9a112e30ce3c36dbe4a216c0aafe74e
string/1047.cc
string/1047.cc
class Solution { public: string removeDuplicates(string s) { int index = 0; while (!s.empty() && index < (s.size()-1)) { if (s[index] == s[index+1]) { if ((index+2) < s.size()) { s = s.substr(0, index) + s.substr(index+2); ...
Remove All Adjacent Duplicates In String
Remove All Adjacent Duplicates In String
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
4b01ac328c71a125295885823ba530169b63b597
OpenSim/Sandbox/pseudoInverseKinematicsStudy.cpp
OpenSim/Sandbox/pseudoInverseKinematicsStudy.cpp
#include <OpenSim/OpenSim.h> main() { // A study is the top level component that contains the model and other // computational components. Study inverseKinematicsStudy; Model model("subject_01.osim"); inverseKinematicsStudy.addComponent(model); // A data Source component wraps a TimeSer...
Add pseudo code for performing an Inverse Kinematics analysis. Perform IK without using a Tool or any Analyses.
Add pseudo code for performing an Inverse Kinematics analysis. Perform IK without using a Tool or any Analyses.
C++
apache-2.0
opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core
373648999224feea265bf1edaced7b65f575eeb3
2013-nov-bronze/2-milktemp/cpp11/main.cpp
2013-nov-bronze/2-milktemp/cpp11/main.cpp
#include <fstream> #include <map> using namespace std; int main() { ifstream cin("milktemp.in"); ofstream cout("milktemp.out"); int num_cows, cold, comfortable, hot; cin >> num_cows >> cold >> comfortable >> hot; int cold_change = comfortable - cold; int hot_change = hot - comfortable; map<int, int...
Add C++11 solution for Nov. 2013 Bronze Problem 2
Add C++11 solution for Nov. 2013 Bronze Problem 2
C++
mit
hsun324/usaco-solutions,hsun324/usaco-solutions
a1fbe8611694835a647811b97e56ec62d504110a
test/SemaCXX/default-assignment-operator.cpp
test/SemaCXX/default-assignment-operator.cpp
// RUN: clang-cc -fsyntax-only -verify %s class Base { // expected-error {{cannot define the implicit default assignment operator for 'class Base'}} \ // expected-note {{synthesized method is first required here}} int &ref; // expected-note {{declared at}} }; class X : Base { // // expected-error {{...
Test case for my last patch.
Test case for my last patch. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@74216 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl...
46a78496a05531ef68d62f759241a7c1036ed7fb
src/osvr/Routing/PathNode.cpp
src/osvr/Routing/PathNode.cpp
/** @file @brief Implementation @date 2014 @author Ryan Pavlik <ryan@sensics.com> <http://sensics.com> */ // Copyright 2014 Sensics, Inc. // // All rights reserved. // // (Final version intended to be licensed under // the Apache License, Version 2.0) // Internal Includes #include <osvr/Rout...
/** @file @brief Implementation @date 2014 @author Ryan Pavlik <ryan@sensics.com> <http://sensics.com> */ // Copyright 2014 Sensics, Inc. // // All rights reserved. // // (Final version intended to be licensed under // the Apache License, Version 2.0) // Internal Includes #include <osvr/Rout...
Fix bug found by test.
Fix bug found by test.
C++
apache-2.0
Armada651/OSVR-Core,feilen/OSVR-Core,godbyk/OSVR-Core,d235j/OSVR-Core,Armada651/OSVR-Core,d235j/OSVR-Core,d235j/OSVR-Core,feilen/OSVR-Core,OSVR/OSVR-Core,godbyk/OSVR-Core,d235j/OSVR-Core,feilen/OSVR-Core,OSVR/OSVR-Core,leemichaelRazer/OSVR-Core,OSVR/OSVR-Core,Armada651/OSVR-Core,Armada651/OSVR-Core,d235j/OSVR-Core,leem...
061264c039fbce9530cf3c80fdd51999bb8f2526
src/env_vars.cc
src/env_vars.cc
#include "env_vars.hh" namespace Kakoune { EnvVarMap get_env_vars() { EnvVarMap env_vars; for (char** it = environ; *it; ++it) { const char* name = *it; const char* value = name; while (*value != 0 and *value != '=') ++value; env_vars[String{name, value}] = (*va...
#include "env_vars.hh" #if __APPLE__ extern char **environ; #endif namespace Kakoune { EnvVarMap get_env_vars() { EnvVarMap env_vars; for (char** it = environ; *it; ++it) { const char* name = *it; const char* value = name; while (*value != 0 and *value != '=') ++value;...
Define extern char **environ for OSX, which doesn't define it in a header
Define extern char **environ for OSX, which doesn't define it in a header
C++
unlicense
mawww/kakoune,Somasis/kakoune,ekie/kakoune,occivink/kakoune,mawww/kakoune,alpha123/kakoune,rstacruz/kakoune,jkonecny12/kakoune,Somasis/kakoune,danr/kakoune,jkonecny12/kakoune,danielma/kakoune,elegios/kakoune,jkonecny12/kakoune,rstacruz/kakoune,ekie/kakoune,alexherbo2/kakoune,flavius/kakoune,jkonecny12/kakoune,lenormf/k...
ce113c32d27a24552a6420ea0c082c6886708759
src/nix/main.cc
src/nix/main.cc
#include <algorithm> #include "command.hh" #include "common-args.hh" #include "eval.hh" #include "globals.hh" #include "legacy.hh" #include "shared.hh" #include "store-api.hh" namespace nix { struct NixArgs : virtual MultiCommand, virtual MixCommonArgs { NixArgs() : MultiCommand(*RegisterCommand::commands), MixC...
#include <algorithm> #include "command.hh" #include "common-args.hh" #include "eval.hh" #include "globals.hh" #include "legacy.hh" #include "shared.hh" #include "store-api.hh" namespace nix { struct NixArgs : virtual MultiCommand, virtual MixCommonArgs { NixArgs() : MultiCommand(*RegisterCommand::commands), MixC...
Add warning about "nix" being experimental
Add warning about "nix" being experimental
C++
lgpl-2.1
ehmry/nix,dezgeg/nix,peti/nix,shlevy/nix,layus/nix,zimbatm/nix,NixOS/nix,shlevy/nix,peti/nix,vcunat/nix,dtzWill/nix,zimbatm/nix,wmertens/nix,rycee/nix,dtzWill/nix,bennofs/nix,shlevy/nix,ysangkok/nix,ysangkok/nix,dezgeg/nix,peti/nix,vcunat/nix,layus/nix,ehmry/nix,ehmry/nix,rycee/nix,bennofs/nix,wmertens/nix,layus/nix,ry...
250b480c9c857748f626c44c5e159a4d0c65bac5
Lectures/Atomics/OrderingRelationships/Executable/main.cpp
Lectures/Atomics/OrderingRelationships/Executable/main.cpp
#include <iostream> #include <thread> #include <atomic> #include <vector> std::vector<int> data; bool data_ready = false; void reader_thread() { int i = 1; while (!data_ready) // 1 { std::cout << "Reader loop " << i << std::endl; ++i; std::this_thread::sleep_for(std::chrono::millis...
#include <iostream> #include <thread> #include <atomic> #include <vector> std::vector<int> data; bool data_ready = false; void reader_thread() { int i = 1; while (!data_ready) // 1 { std::cout << "Reader loop " << i << std::endl; ++i; } std::cout << "Data value: " << data[0] << st...
Update the ordering relationships example.
Update the ordering relationships example.
C++
mit
joshpeterson/DevelopingConcurrentSoftware,joshpeterson/DevelopingConcurrentSoftware
fbf777a13ccd4e62280359cb7a7afa043e4d09ff
src/core/grid.cpp
src/core/grid.cpp
#include "grid.h" #include "graphics/Renderer.h" #include "jewel.h" #include "cell.h" namespace bejeweled { Grid::Grid(int width, int height, graphics::Renderer &renderer) : width_(width), height_(height), grid_() { for (int i = 0; i < width_; ++i) { grid_.emplace_back(); for (int j = 0; j < height_; ++j) ...
#include "grid.h" #include "graphics/Renderer.h" #include "jewel.h" #include "cell.h" namespace bejeweled { Grid::Grid(int width, int height, graphics::Renderer &renderer) : width_(width), height_(height), grid_() { for (int i = 0; i < width_; ++i) { grid_.emplace_back(); for (int j = 0; j < height_; ++j) ...
Use range based for loop instead of raw loop
Use range based for loop instead of raw loop
C++
bsd-3-clause
Teider/Bejeweled,Teider/Bejeweled
45d6575e664dbf10489798643b7f612d07053297
cmake/CheckCXX11Features/cxx11-test-class_override_final.cpp
cmake/CheckCXX11Features/cxx11-test-class_override_final.cpp
class base { public: virtual int foo(int a) { return 4 + a; } int bar(int a) { return a - 2; } }; class sub final : public base { public: virtual int foo(int a) override { return 8 + 2 * a; }; }; class sub2 final : public base { public: virtual int foo(int a) override final { retur...
class base { public: virtual int foo(int a) { return 4 + a; } int bar(int a) { return a - 2; } }; class sub final : public base { public: virtual int foo(int a) override { return 8 + 2 * a; }; }; class sub2 final : public base { public: virtual int foo(int a) override final { retur...
Test override and override final
Test override and override final
C++
apache-2.0
baslr/ArangoDB,joerg84/arangodb,graetzer/arangodb,hkernbach/arangodb,joerg84/arangodb,wiltonlazary/arangodb,joerg84/arangodb,fceller/arangodb,graetzer/arangodb,arangodb/arangodb,m0ppers/arangodb,hkernbach/arangodb,wiltonlazary/arangodb,fceller/arangodb,arangodb/arangodb,joerg84/arangodb,fceller/arangodb,wiltonlazary/ar...
a7a7cc01ed27f00a97e3c6df75d7f8da370d28e8
json/test_rapid.cpp
json/test_rapid.cpp
#include "rapidjson/document.h" #include "rapidjson/filereadstream.h" #include <cstdio> #include <iostream> using namespace std; using namespace rapidjson; int main() { FILE* fp = std::fopen("./1.json", "r"); char buffer[65536]; FileReadStream frs(fp, buffer, sizeof(buffer)); Document jobj; jobj....
#include "rapidjson/document.h" #include "rapidjson/filereadstream.h" #include <cstdio> #include <iostream> using namespace std; using namespace rapidjson; int main() { FILE* fp = std::fopen("./1.json", "r"); char buffer[65536]; FileReadStream frs(fp, buffer, sizeof(buffer)); Document jobj; jobj....
Change len to proper type in RapidJSON test
Change len to proper type in RapidJSON test
C++
mit
kostya/benchmarks,chalucha/benchmarks,erickt/benchmarks,chalucha/benchmarks,chalucha/benchmarks,chalucha/benchmarks,erickt/benchmarks,erickt/benchmarks,kostya/benchmarks,erickt/benchmarks,kostya/benchmarks,erickt/benchmarks,kostya/benchmarks,erickt/benchmarks,erickt/benchmarks,kostya/benchmarks,kostya/benchmarks,chaluc...
7c31c8407b1b738efde95f08e8b809b8be6f11d0
test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp
test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
Mark test as a long-test
Mark test as a long-test Differential Revision: https://reviews.llvm.org/D38452 git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@315570 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
b5092b1aa8914490a7dd6c24d8416dec65396d93
world/world.cpp
world/world.cpp
#include <iostream> #include "SDL/SDL.h" #include "world.hpp" namespace Polarity { World *world = nullptr; World::World():physics(b2Vec2(0.0f, -10.0f)),keyState(SDLK_LAST) { std::cerr << "World has started"<<std::endl; for (int i=0; i< SDLK_LAST; ++i) { keyState[i] = false; } } void World::in...
#include <iostream> #include "SDL/SDL.h" #include "world.hpp" namespace Polarity { World *world = nullptr; World::World():physics(b2Vec2(0.0f, -10.0f)),keyState(SDLK_LAST) { std::cerr << "World has started"<<std::endl; for (int i=0; i< SDLK_LAST; ++i) { keyState[i] = false; } } void World::in...
Call physics engine with every tick
Call physics engine with every tick
C++
bsd-2-clause
cookingclub/polarity,cookingclub/polarity,cookingclub/polarity
88763ab542e8cde0c90a8aeef781e1f159e67ce9
tests/bits/block_matrix_array_02.cc
tests/bits/block_matrix_array_02.cc
//---------------------------- block_matrix_array_02.cc --------------------------- // $Id$ // Version: $Name$ // // Copyright (C) 2005 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer // to the file deal...
//---------------------------- block_matrix_array_02.cc --------------------------- // $Id$ // Version: $Name$ // // Copyright (C) 2005 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer // to the file deal...
Reduce the test to its minimum.
Reduce the test to its minimum. git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@9994 0785d39b-7218-0410-832d-ea1e28bc413d
C++
lgpl-2.1
natashasharma/dealii,nicolacavallini/dealii,spco/dealii,msteigemann/dealii,adamkosik/dealii,danshapero/dealii,mtezzele/dealii,jperryhouts/dealii,EGP-CIG-REU/dealii,danshapero/dealii,mtezzele/dealii,johntfoster/dealii,nicolacavallini/dealii,sriharisundar/dealii,andreamola/dealii,ibkim11/dealii,shakirbsm/dealii,YongYang8...
589c323e4bd5b0389ded76b58ba5fa7b0a78bfa0
Source/modules/push_messaging/PushError.cpp
Source/modules/push_messaging/PushError.cpp
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "config.h" #include "modules/push_messaging/PushError.h" #include "core/dom/ExceptionCode.h" #include "wtf/OwnPtr.h" namespace blink { PassRef...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "config.h" #include "modules/push_messaging/PushError.h" #include "core/dom/ExceptionCode.h" #include "wtf/OwnPtr.h" namespace blink { PassRef...
Use provided message for UnknownError.
[Push] Use provided message for UnknownError. BUG=None Review URL: https://codereview.chromium.org/809493002 git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@187240 bbb929c8-8fbe-4397-9dbb-9b2b20218538
C++
bsd-3-clause
PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,modulexcite/blink,XiaosongWei/blink-crosswalk,XiaosongWei/blin...
8089404a42da5674c8d6b1acd314f515141e8854
source/examples/fibgui/MainWindow.cpp
source/examples/fibgui/MainWindow.cpp
#include "MainWindow.h" #include <QBoxLayout> #include <QLabel> #include <QSpinBox> #include <fiblib/Fibonacci.h> MainWindow::MainWindow() { // Create content widget QWidget * content = new QWidget(this); setCentralWidget(content); // Create layout QBoxLayout * boxLayout = new QVBoxLayout(); ...
#include "MainWindow.h" #include <QBoxLayout> #include <QLabel> #include <QSpinBox> #include <fiblib/Fibonacci.h> MainWindow::MainWindow() { // Create content widget QWidget * content = new QWidget(this); setCentralWidget(content); // Create layout QBoxLayout * layout = new QVBoxLayout(); ...
Revert "Remove simple to fix warnings"
Revert "Remove simple to fix warnings" This reverts commit 32f2b519e23e9bb165d981a5f7b5d73dff8c869d.
C++
mit
cginternals/cmake-init,cginternals/cmake-init,hpicgs/cmake-init,j-o/cmake-init,j-o/cmake-init,hpicgs/cmake-init,j-o/cmake-init,hpicgs/cmake-init,hpicgs/cmake-init,j-o/cmake-init
8dd3d758c2b48fcc74d276da63d093ba31706c0f
tests/connect.cpp
tests/connect.cpp
#include <rusql/connection.hpp> #include <assert.h> int main(int argc, char *argv[]) { assert(argc == 5); try { rusql::connection(rusql::connection::connection_info(argv[1], argv[2], argv[3], argv[4])); } catch(...) { return 0; } return 1; }
#include <rusql/connection.hpp> #include <cassert> int main(int argc, char *argv[]) { assert(argc == 5); try { rusql::connection(rusql::connection::connection_info(argv[1], argv[2], argv[3], argv[4])); } catch(...) { return 0; } return 1; }
Change C header to C++ header
Change C header to C++ header
C++
bsd-3-clause
Wassasin/librusql,Wassasin/librusql,Wassasin/librusql
3fe291b761880a19cba9a680cd26f35cc3f19494
printing/backend/print_backend.cc
printing/backend/print_backend.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 "printing/backend/print_backend.h" namespace printing { PrinterBasicInfo::PrinterBasicInfo() : printer_status(0) {} PrinterBasicInfo::~Pri...
// 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 "printing/backend/print_backend.h" namespace printing { PrinterBasicInfo::PrinterBasicInfo() : printer_status(0), is_default(fals...
Initialize a variable in PrinterBasicInfo.
Coverity: Initialize a variable in PrinterBasicInfo. BUG=none TEST=none CID=16140 Review URL: http://codereview.chromium.org/7218029 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@89992 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,Chilledheart/chromium,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,M4sse/chromium.src,rogerwang/chromium,hgl888/chromium-c...
7d7d4823c6da9d94910b69b7a5eb1380f94c455f
main.cpp
main.cpp
#include <QApplication> #include <QIcon> #include <QSettings> #include <QString> #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); QCoreApplication::setOrganizationName("SheetMusicViewer"); QCoreApplication::setApplicationName("SheetMusicViewer"); QSettings settin...
#include <QApplication> #include <QIcon> #include <QProcess> #include <QSettings> #include <QString> #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); QCoreApplication::setOrganizationName("SheetMusicViewer"); QCoreApplication::setApplicationName("SheetMusicViewer"); ...
Add support for quit command
Add support for quit command Add optional quitCommand in application config, to specify a custom command to execute when closing application
C++
agpl-3.0
felixhaedicke/SheetMusicViewer
6041658cdd545ba938b3c9d87cab82f014e48451
tests/test_lqr_kalman.cc
tests/test_lqr_kalman.cc
#include "gtest/gtest.h" #include "test_convergence.h" // TODO: Add more extensive testing class LqrKalmanConvergenceTest: public ConvergenceTest { public: void simulate() { for(unsigned int i = 0; i < m_N; ++i) { auto u = m_lqr->control_calculate(m_x); m_x = m_b...
#include "gtest/gtest.h" #include "test_convergence.h" // TODO: Add more extensive testing class LqrKalmanConvergenceTest: public ConvergenceTest { public: void simulate() { for(unsigned int i = 0; i < m_N; ++i) { auto u = m_lqr->control_calculate(m_kalman->x()); ...
Use Kalman estimate in LQR-Kalman test
Use Kalman estimate in LQR-Kalman test Replace true system state with Kalman estimate.
C++
bsd-2-clause
oliverlee/bicycle,oliverlee/bicycle
9a77e12c4e6ceabdef5ba79b01c440bc005f4960
game/state/rules/city/vammotype.cpp
game/state/rules/city/vammotype.cpp
#include "game/state/rules/city/vammotype.h" #include "game/state/gamestate.h" namespace OpenApoc { const UString &VAmmoType::getPrefix() { static UString prefix = "VEQUIPMENTAMMOTYPE_"; return prefix; } const UString &VAmmoType::getTypeName() { static UString name = "VAmmoType"; return name; } sp<VAmmoType> VA...
#include "game/state/rules/city/vammotype.h" #include "game/state/gamestate.h" namespace OpenApoc { const UString &VAmmoType::getPrefix() { static UString prefix = "VAMMOTYPE_"; return prefix; } const UString &VAmmoType::getTypeName() { static UString name = "VAmmoType"; return name; } sp<VAmmoType> VAmmoType::...
Revert "Vehicle ammo prefix VAMMOTYPE_ to VEQUIPMENTAMMOTYPE_"
Revert "Vehicle ammo prefix VAMMOTYPE_ to VEQUIPMENTAMMOTYPE_" This reverts commit 7cf76fe3066179d7d49ccec2b428c0a142988c19.
C++
mit
pmprog/OpenApoc,pmprog/OpenApoc,FranciscoDA/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc,Istrebitel/OpenApoc,Istrebitel/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc
a6f40351b6aa59516876b3bb7ed8b2817d256f50
examples/hapticsquare/hapticbutton.cpp
examples/hapticsquare/hapticbutton.cpp
#include "hapticbutton.h" #include <QPainter> HapticButton::HapticButton(const QString &label) : QWidget(0), m_label(label), m_checked(false), m_checkable(false) { setMinimumSize(100, 100); } void HapticButton::mousePressEvent(QMouseEvent *) { if (m_checkable) { m_checked = !m_checked; emi...
#include "hapticbutton.h" #include <QPainter> HapticButton::HapticButton(const QString &label) : QWidget(0), m_label(label), m_checked(false), m_checkable(false) { setMinimumSize(100, 100); } void HapticButton::mousePressEvent(QMouseEvent *) { if (m_checkable) { m_checked = !m_checked; emi...
Make buttons look slightly better on N8
Make buttons look slightly better on N8
C++
lgpl-2.1
enthought/qt-mobility,qtproject/qt-mobility,KDE/android-qt-mobility,enthought/qt-mobility,tmcguire/qt-mobility,tmcguire/qt-mobility,kaltsi/qt-mobility,qtproject/qt-mobility,qtproject/qt-mobility,kaltsi/qt-mobility,kaltsi/qt-mobility,qtproject/qt-mobility,kaltsi/qt-mobility,KDE/android-qt-mobility,kaltsi/qt-mobility,ent...
ff8cfe5e95a43e12a4f5a95bc811f5c2ba1b53ed
test/unit/utils.cpp
test/unit/utils.cpp
#include <configure/utils/path.hpp> #include <configure/error.hpp> BOOST_AUTO_TEST_CASE(path) { using namespace configure::utils; BOOST_CHECK_THROW( relative_path("pif", "/paf"), configure::error::InvalidPath ); BOOST_CHECK_THROW( relative_path("/pif", "paf"), configure::error::InvalidPath );...
#include <configure/utils/path.hpp> #include <configure/error.hpp> namespace fs = boost::filesystem; BOOST_AUTO_TEST_CASE(path) { # define P1 "pif" # define P2 "paf" #ifdef _WIN32 # define ABS_P1 "c:\\pif" # define ABS_P2 "c:/paf" #else # define ABS_P1 "/pif" # define ABS_P2 "/paf" #endif using namespace configure::...
Fix path test on windows
Fix path test on windows
C++
bsd-3-clause
hotgloupi/configure,hotgloupi/configure,hotgloupi/configure,hotgloupi/configure,hotgloupi/configure
6e0ec780eda6ba4dea201efaefc4d81063c2a1d4
lib/cpp/src/tools/wrangleplow/main.cpp
lib/cpp/src/tools/wrangleplow/main.cpp
#include "wrangleplow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication app(argc, argv); WranglePlow::MainWindow wrangleplow; wrangleplow.show(); wrangleplow.resize(1024, 768); return app.exec(); }
#include "wrangleplow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication app(argc, argv); WranglePlow::MainWindow wrangleplow; wrangleplow.show(); wrangleplow.resize(1024, 768); wrangleplow.move(100, 100); return app.exec(); }
Move the window to a good location.
Move the window to a good location.
C++
apache-2.0
Br3nda/plow,chadmv/plow,chadmv/plow,Br3nda/plow,Br3nda/plow,chadmv/plow,chadmv/plow,Br3nda/plow,chadmv/plow,chadmv/plow,Br3nda/plow,chadmv/plow
3865fccd46223514c7ca8d23611571bf627875ab
src/placement/persistent_constraint_updater.cpp
src/placement/persistent_constraint_updater.cpp
#include "./persistent_constraint_updater.h" #include "./constraint_updater.h" PersistentConstraintUpdater::PersistentConstraintUpdater( std::shared_ptr<ConstraintUpdater> constraintUpdater) : constraintUpdater(constraintUpdater) { } void PersistentConstraintUpdater::updateConstraints( int labelId, Eigen::V...
#include "./persistent_constraint_updater.h" #include <chrono> #include <QLoggingCategory> #include "./constraint_updater.h" QLoggingCategory pcuChan("Placement.PersistentConstraintUpdater"); PersistentConstraintUpdater::PersistentConstraintUpdater( std::shared_ptr<ConstraintUpdater> constraintUpdater) : constr...
Write PersistentConstraintUpdater::updateConstraints timing to log.
Write PersistentConstraintUpdater::updateConstraints timing to log.
C++
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
7fa83316a3e1169b936fd71f5ac6a2ee259fca97
test/test_exception_address_alignment.pass.cpp
test/test_exception_address_alignment.pass.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
Add missing UNSUPPORTED for -fno-exception mode
Add missing UNSUPPORTED for -fno-exception mode git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@296957 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi
4ce94dc407de0d757d08ab641706cd9e501012ff
test/SemaCXX/inherit.cpp
test/SemaCXX/inherit.cpp
// RUN: %clang_cc1 -fsyntax-only -verify %s class A { }; class B1 : A { }; class B2 : virtual A { }; class B3 : virtual virtual A { }; // expected-error{{duplicate 'virtual' in base specifier}} class C : public B1, private B2 { }; class D; // expected-note {{forward declaration of 'D'}} class E : ...
// RUN: %clang_cc1 -fsyntax-only -verify %s class A { }; class B1 : A { }; class B2 : virtual A { }; class B3 : virtual virtual A { }; // expected-error{{duplicate 'virtual' in base specifier}} class C : public B1, private B2 { }; class D; // expected-note {{forward declaration of 'D'}} class E : ...
Add test case for r193923
Add test case for r193923 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@193924 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
4f9ce682c9d370d1a8aad2339d50602144a7ac13
stingraykit/io/ByteDataConsumer.cpp
stingraykit/io/ByteDataConsumer.cpp
#include <stingraykit/io/ByteDataConsumer.h> namespace stingray { ByteDataConsumer::ByteDataConsumer(ByteData consumer) : _consumer(consumer) { } size_t ByteDataConsumer::Process(ConstByteData data, const ICancellationToken&) { const size_t size = data.size(); STINGRAYKIT_CHECK(size <= _consumer.size(),...
#include <stingraykit/io/ByteDataConsumer.h> #include <string.h> namespace stingray { ByteDataConsumer::ByteDataConsumer(ByteData consumer) : _consumer(consumer) { } size_t ByteDataConsumer::Process(ConstByteData data, const ICancellationToken&) { const size_t size = data.size(); STINGRAYKIT_CHECK(siz...
Change std::copy to memcpy in critical places.
Change std::copy to memcpy in critical places. Sadly, std::copy(...) on gcc4.6; mstar k5cn is 1.5-2 times slower than memcpy(...). Probably the answer is in difference between __builtin_memmove(...) and __builtin_memcpy(...) on a certain MIPS machine, because libstdc++ uses __builtin_memmove(...) for std::copy(...) on...
C++
isc
GSGroup/stingraykit,GSGroup/stingraykit
fc8ddc06963d6d8a2d4a6288abfa398ab2dd5e56
qmltest/main.cpp
qmltest/main.cpp
#include "qtquick1applicationviewer.h" #include <QApplication> #include <QDeclarativeComponent> #include <QDeclarativeEngine> #include <QDeclarativeContext> #include "artworkimageprovider.h" #include "qiscp.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QtQuick1ApplicationViewer viewer; ...
#include "qtquick1applicationviewer.h" #include <QApplication> #include <QDeclarativeComponent> #include <QDeclarativeEngine> #include <QDeclarativeContext> #include "artworkimageprovider.h" #include "qiscp.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QtQuick1ApplicationViewer viewer; ...
Use setContextProperty() to make the input helper available
Use setContextProperty() to make the input helper available
C++
lgpl-2.1
oniongarlic/qiscp
75ff204fdb39676a254d94c33e03e49769fc2aff
arduino/OpenROV/CalibrationLaser.cpp
arduino/OpenROV/CalibrationLaser.cpp
#include "AConfig.h" #if(HAS_STD_CALIBRATIONLASERS) #include "Device.h" #include "Pin.h" #include "CalibrationLaser.h" #include "Settings.h" Pin claser("claser", CALIBRATIONLASERS_PIN, claser.analog, claser.out); void CalibrationLaser::device_setup(){ Settings::capability_bitarray |= (1 << CALIBRATION_LASERS_CAPA...
#include "AConfig.h" #if(HAS_STD_CALIBRATIONLASERS) #include "Device.h" #include "Pin.h" #include "CalibrationLaser.h" #include "Settings.h" Pin claser("claser", CALIBRATIONLASERS_PIN, claser.analog, claser.out); void CalibrationLaser::device_setup(){ Settings::capability_bitarray |= (1 << CALIBRATION_LASERS_CAPA...
Revert "Revert "Adding laser indicator""
Revert "Revert "Adding laser indicator"" This reverts commit 282ea0b855b20d23abed1a45d7fcfc311a9ef623.
C++
mit
codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software
949267d0fd9f037fecfcb86d567ef7d9ee60a384
3RVX/KeyboardHotkeyProcessor.cpp
3RVX/KeyboardHotkeyProcessor.cpp
#include "KeyboardHotkeyProcessor.h" #include <string> #include "SyntheticKeyboard.h" #include "HotkeyInfo.h" #include "Logger.h" std::unordered_map<std::wstring, unsigned short> KeyboardHotkeyProcessor::mediaKeyMap = CreateKeyMap(); void KeyboardHotkeyProcessor::ProcessHotkeys(HotkeyInfo &hki) { if (hki.ac...
#include "KeyboardHotkeyProcessor.h" #include <string> #include "SyntheticKeyboard.h" #include "HotkeyInfo.h" #include "Logger.h" std::unordered_map<std::wstring, unsigned short> KeyboardHotkeyProcessor::mediaKeyMap = CreateKeyMap(); void KeyboardHotkeyProcessor::ProcessHotkeys(HotkeyInfo &hki) { /* These h...
Reorganize KB HK processor for new VK hotkeys
Reorganize KB HK processor for new VK hotkeys
C++
bsd-2-clause
malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX,Soulflare3/3RVX
e22dc6252b8295db1a80a21123d61f5b6c8eb433
src/lib/RawTextGraphInput.cc
src/lib/RawTextGraphInput.cc
#include "RawTextGraphInput.hh" /* name |V| [|V| names] |E| [|E| lines formatted like start end type distance] */ template <typename V> void RawTextGraphInput<V>::input(string path) { ifstream ifs(path, ifstream::in); int v, e; string title; // Graph title fetching ifs >> title; this-...
#include "RawTextGraphInput.hh" /* name |V| [|V| names] |E| [|E| lines formatted like start end type distance] */ template <typename V> void RawTextGraphInput<V>::input(string path) { ifstream ifs(path, ifstream::in); int v, e; string title; // Graph title fetching ifs >> title; this-...
Fix a parsing issue when a vertex has space in its name
Fix a parsing issue when a vertex has space in its name
C++
unlicense
Thooms/yolo-graphs,Thooms/yolo-graphs,Thooms/yolo-graphs
f925833f5984a47e21078b7725bbf7e8d451b934
tests/auto/blackbox/testdata/enableRtti/main.cpp
tests/auto/blackbox/testdata/enableRtti/main.cpp
#include <typeinfo> class A { virtual void x() { } }; class B : public A { void x() override { } }; int main() { A a; B *b = dynamic_cast<B *>(&a); (void)b; return 0; }
#include <typeinfo> class I { public: virtual ~I() { } virtual void x() { } }; class A : public I { void x() override { } }; class B : public I { void x() override { } }; int main() { I *a = new A(); B *b = dynamic_cast<B *>(a); (void)b; delete a; return 0; }
Fix enableRtti test with GCC.
Fix enableRtti test with GCC. GCC is stricter than Clang/MSVC and fails to compile certain provably meaningless constructs like dynamic_casts that will never succeed. Change-Id: I5e1a5c965395f218c4dd6340b761c308fe41282f Reviewed-by: Christian Kandeler <3aa99dcdd3f0cac61fb81c2a11771c0cc2497607@theqtcompany.com>
C++
lgpl-2.1
qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qt-labs/qbs,qt-labs/qbs,qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs
dc933fc2352216335a804d9023172f98002f8bdd
main.cpp
main.cpp
#include "Bootil/Bootil.h" using namespace Bootil; int main( int argc, char** argv ) { CommandLine::Set( argc, argv ); BString strInFolder = CommandLine::GetArg( 0, "" ); BString strOutFolder = CommandLine::GetArg( 1, strInFolder ); if (strInFolder == "") Output::Error("Usage: gluaextract <in> [out]"); Stri...
#include "Bootil/Bootil.h" using namespace Bootil; int main( int argc, char** argv ) { Debug::SuppressPopups( true ); CommandLine::Set( argc, argv ); Console::FGColorPush( Console::Green ); Output::Msg( "GMod Lua Cache Extractor 1.0\n\n" ); Console::FGColorPop(); BString strInFolder = CommandLine::GetA...
Create output folder if does not exist. Suppress debug popups.
Create output folder if does not exist. Suppress debug popups.
C++
mit
HandsomeMatt/glua-cache-extract
5b8526186c7f836f762efba53fb64bbddebc1846
base/test/thread_test_helper.cc
base/test/thread_test_helper.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 "base/test/thread_test_helper.h" #include "base/location.h" namespace base { ThreadTestHelper::ThreadTestHelper(MessageLoopProxy* target_t...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/test/thread_test_helper.h" #include "base/bind.h" #include "base/location.h" namespace base { ThreadTestHelper::ThreadTestHelper(Mes...
Convert NewRunnableMethod() to base::Bind() in base::TestThreadHelper.
Convert NewRunnableMethod() to base::Bind() in base::TestThreadHelper. BUG=none TEST=trybot compile Review URL: http://codereview.chromium.org/8572034 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@110281 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,yitian...
f7fc64abd457bf3688109501e17f84d483d877b2
src/app/sidserver/main.cpp
src/app/sidserver/main.cpp
/******************************************************************************/ /* Author - Ming-Lun "Allen" Chou Web - http://AllenChou.net Twitter - @TheAllenChou */ /******************************************************************************/ #include "sidnet/sidnet.h" #include "sidnet/sidserver.h" ...
/******************************************************************************/ /* Author - Ming-Lun "Allen" Chou Web - http://AllenChou.net Twitter - @TheAllenChou */ /******************************************************************************/ #include "sidnet/sidnet.h" #include "sidnet/sidserver.h" ...
Fix incorrect error code handling.
Fix incorrect error code handling.
C++
mit
TheAllenChou/string-id,TheAllenChou/string-id
ae2450d2823635df4c140f638e12a5e75a1a6b59
src/compiler/build_tables/item_set_closure.cc
src/compiler/build_tables/item_set_closure.cc
#include "compiler/build_tables/item_set_closure.h" #include <algorithm> #include <set> #include "tree_sitter/compiler.h" #include "compiler/build_tables/follow_sets.h" #include "compiler/build_tables/item.h" #include "compiler/prepared_grammar.h" namespace tree_sitter { using std::set; using rules::ISymbol; ...
#include "compiler/build_tables/item_set_closure.h" #include <algorithm> #include <set> #include "tree_sitter/compiler.h" #include "compiler/build_tables/follow_sets.h" #include "compiler/build_tables/item.h" #include "compiler/prepared_grammar.h" namespace tree_sitter { using std::set; using rules::ISymbol; ...
Fix dangling reference error on gcc
Fix dangling reference error on gcc
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
50a099d8923ad2a291ed8a9a03779036826efcd9
src/material/matte_material.cpp
src/material/matte_material.cpp
#include <memory> #include "film/color.h" #include "textures/texture.h" #include "material/lambertian.h" #include "material/oren_nayer.h" #include "material/matte_material.h" #include "material/specular_reflection.h" #include "material/fresnel.h" MatteMaterial::MatteMaterial(const Texture *diffuse, float roughness) :...
#include <memory> #include "film/color.h" #include "textures/texture.h" #include "material/lambertian.h" #include "material/oren_nayer.h" #include "material/matte_material.h" #include "material/specular_reflection.h" #include "material/fresnel.h" MatteMaterial::MatteMaterial(const Texture *diffuse, float roughness) :...
Revert MatteMaterial to its standard form
Revert MatteMaterial to its standard form
C++
mit
Twinklebear/tray,Twinklebear/tray
ec464e23070445dd28908d0bb0725d83becdc52b
src/mocc-core/file_scrubber.cpp
src/mocc-core/file_scrubber.cpp
#include "file_scrubber.hpp" #include <stdio.h> #include <iostream> #include "string_utils.hpp" #include "error.hpp" using std::ifstream; namespace mocc { FileScrubber::FileScrubber(const char* fName, const char* commentFlag): stream_(fName), flag_(commentFlag){ if( !stream_.good()...
#include "file_scrubber.hpp" #include <stdio.h> #include <iostream> #include "string_utils.hpp" #include "error.hpp" using std::ifstream; namespace mocc { FileScrubber::FileScrubber(const char* fName, const char* commentFlag): stream_(fName), flag_(commentFlag){ if( !stream_.good()...
Fix overflow issue in file scrubber. npos is big
Fix overflow issue in file scrubber. npos is big
C++
apache-2.0
youngmit/mocc,youngmit/mocc,youngmit/mocc,youngmit/mocc
4893de077e29e9e27f6218a717eff6e98261df0a
src/listener.cpp
src/listener.cpp
#include "listener.h" #include "log.h" #include "buffers.h" void conditionalEnqueue(QUEUE_TYPE(uint8_t)* queue, uint8_t* message, int messageSize) { if(queue_available(queue) < messageSize + 2) { debug("Dropped incoming CAN message -- send queue (at %p) full\r\n", queue); re...
#include "listener.h" #include "log.h" #include "buffers.h" void conditionalEnqueue(QUEUE_TYPE(uint8_t)* queue, uint8_t* message, int messageSize) { if(queue_available(queue) < messageSize + 2) { debug("Dropped incoming CAN message -- send queue (at %p) full\r\n", queue); re...
Remove TODO - problem was debug() printing, not enqueing.
Remove TODO - problem was debug() printing, not enqueing.
C++
bsd-3-clause
openxc/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware
b104188304f01edad3ea29bc640dbff99a0a47f5
RgTools/avs2x.cpp
RgTools/avs2x.cpp
#include "removegrain.h" #include "clense.h" #include "repair.h" #include "vertical_cleaner.h" const AVS_Linkage *AVS_linkage = nullptr; extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) { AVS_linkage = vectors; env->AddFun...
#include "removegrain.h" #include "clense.h" #include "repair.h" #include "vertical_cleaner.h" const AVS_Linkage *AVS_linkage = nullptr; extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) { AVS_linkage = vectors; env->AddFun...
Add planar parameter to VerticalCleaner registration
Add planar parameter to VerticalCleaner registration
C++
mit
tp7/RgTools
702e785ff0c32457d741a46c15fa48b650cf9227
test/hexagon/codegen/vzero.cpp
test/hexagon/codegen/vzero.cpp
#include <Halide.h> #include "vzero.h" #include <stdio.h> using namespace Halide; // RUN: rm -f vzero.stdout; ./vzero.out; llvm-dis -o vzero.stdout vzero.bc; FileCheck %s < vzero.stdout int main(int argc, char **argv) { Target target; setupHexagonTarget(target); target.set_feature(Target::HVX_64); //CHECK: ca...
#include <Halide.h> #include "vzero.h" #include <stdio.h> using namespace Halide; // RUN: rm -f vzero.stdout; ./vzero.out; llvm-dis -o vzero.stdout vzero.bc; FileCheck %s < vzero.stdout int main(int argc, char **argv) { Target target; setupHexagonTarget(target, Target::HVX_64); //CHECK: call{{.*}}@llvm.hexagon....
Fix error in setting both HVX_64 and HVX_128 at same time
Fix error in setting both HVX_64 and HVX_128 at same time
C++
mit
psuriana/Halide,ronen/Halide,jiawen/Halide,psuriana/Halide,jiawen/Halide,kgnk/Halide,jiawen/Halide,jiawen/Halide,ronen/Halide,psuriana/Halide,ronen/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide,ronen/Halide,kgnk/Halide,psuriana/Halide,ronen/Halide,psuriana/Halide,kgnk/Halide,ronen/Halide,jiawen/Halide,ronen/Halide,psurian...
2201cc4385c85d6ec3ad32b71dcd9c22b27beec6
lib/asan/lit_tests/overflow-in-qsort.cc
lib/asan/lit_tests/overflow-in-qsort.cc
// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s // Test how well we unwind in presence of qsort in the stack // (i.e. if we can unwind through a function compiled w/o frame pointers). // https://code.google.com/p/address-sanitizer/issues/detail?id=137 #include <stdlib.h> #include <stdio.h> i...
// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s // Test how well we unwind in presence of qsort in the stack // (i.e. if we can unwind through a function compiled w/o frame pointers). // https://code.google.com/p/address-sanitizer/issues/detail?id=137 #include <stdlib.h> #include <stdio.h> i...
Allow leading underscore in function name to please output tests on Mac
[ASan] Allow leading underscore in function name to please output tests on Mac git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@170121 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
53c76a18e5eb4a2658e11aee87d9a68478a1e2cb
test/tsan/libdispatch/groups-destructor.cc
test/tsan/libdispatch/groups-destructor.cc
// RUN: %clangxx_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer' #include <dispatch/dispatch.h> #import <memory> #import <stdatomic.h> _Atomic(long) destructor_counter = 0; struct MyStruct { virtual ~MyStruct() { usleep(10000); atomic_fetch_add_explicit(&destructor...
// RUN: %clangxx_tsan %s %link_libcxx_tsan -o %t // RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer' #include <dispatch/dispatch.h> #include <memory> #include <stdatomic.h> #include <cstdio> _Atomic(long) destructor_counter = 0; struct MyStruct { virtual ~MyStruct() { usleep(10000); ...
Make test work on Linux
[TSan][libdispatch] Make test work on Linux git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@357729 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
9ac7abe37b61cebebab7808c9caeeca5d4c964b1
src/CorpusInfo.cpp
src/CorpusInfo.cpp
#include <map> #include <string> #include <boost/assign/list_of.hpp> #include <AlpinoCorpus/CorpusInfo.hh> namespace alpinocorpus { CorpusInfo const ALPINO_CORPUS_INFO( boost::assign::list_of("node"), "node", "word"); CorpusInfo const TUEBA_DZ_CORPUS_INFO( boost::assign::list_of("node")("ne")("word...
#include <map> #include <string> #include <boost/assign/list_of.hpp> #include <AlpinoCorpus/CorpusInfo.hh> namespace alpinocorpus { CorpusInfo const ALPINO_CORPUS_INFO( boost::assign::list_of("node"), "node", "word"); CorpusInfo const TUEBA_DZ_CORPUS_INFO( boost::assign::list_of("node")("ne")("word...
Add corpus info for conllx_ds.
Add corpus info for conllx_ds.
C++
lgpl-2.1
rug-compling/alpinocorpus,rug-compling/alpinocorpus,rug-compling/alpinocorpus
1ff720778e7f334de7051c09da217810870ff2de
test/Graphics/test_opengl_window.cpp
test/Graphics/test_opengl_window.cpp
// ========================================================================== // // This file is part of DO++, a basic set of libraries in C++ for computer // vision. // // Copyright (C) 2014 David Ok <david.ok8@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public // License v. 2.0. If...
// ========================================================================== // // This file is part of DO++, a basic set of libraries in C++ for computer // vision. // // Copyright (C) 2014 David Ok <david.ok8@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public // License v. 2.0. If...
Destroy window at the end of the test case.
Destroy window at the end of the test case.
C++
mpl-2.0
DO-CV/sara,DO-CV/sara,DO-CV/sara,DO-CV/sara,DO-CV/sara,DO-CV/sara
d27362e7d375d325d3144ba9d01293aac0a8b8fa
Turn/src/StoreGreetings.cpp
Turn/src/StoreGreetings.cpp
#include "../include/Common.h" #include "../include/StoreGreetings.h" #include <random> #include <string> std::string random_greeting() { std::random_device rand; std::default_random_engine rand_eng(rand()); std::uniform_int_distribution<int> uniform_dist(0, STORE_GREETINGS.size()); size_t index = uni...
#include "../include/Common.h" #include "../include/StoreGreetings.h" #include <random> #include <string> std::string random_greeting() { std::random_device rand; std::default_random_engine rand_eng(rand()); std::uniform_int_distribution<int> uniform_dist(0, STORE_GREETINGS.size()-1); size_t index = u...
Fix index range for random shop message
Fix index range for random shop message `std::uniform_int_distribution` uses a closed range. My brain was stuck in Python mode for ranges.
C++
mit
tagniam/Turn,tagniam/Turn
3c655d91ba2ad917925cbd92dffbba855b83652d
tests/src/netlib/tests_unix.cpp
tests/src/netlib/tests_unix.cpp
#include <mart-netlib/unix.hpp> #include <mart-common/PrintWrappers.h> #include <catch2/catch.hpp> #include <filesystem> #include <iostream> TEST_CASE( "unix_domain_socket_simple_member_check1", "[.][net][unix_domain_socket]" ) { mart::nw::un::Socket sock1; mart::nw::un::Socket sock2( // mar...
#include <mart-netlib/unix.hpp> #include <mart-common/PrintWrappers.h> #include <catch2/catch.hpp> #include <filesystem> #include <iostream> TEST_CASE( "unix_domain_socket_simple_member_check1", "[.][net][unix_domain_socket]" ) { mart::nw::un::Socket sock1; mart::nw::un::Socket sock2( // mar...
Use more suitable path for unix domain sockets in testcode
[netlib/test] Use more suitable path for unix domain sockets in testcode
C++
mit
tum-ei-rcs/mart-common,tum-ei-rcs/mart-common
645fa2bb2a4a579a7d0fc799814c27da4b9757e4
src/runtime/android_io.cpp
src/runtime/android_io.cpp
#include "mini_stdint.h" #define WEAK __attribute__((weak)) extern "C" { extern int __android_log_vprint(int, const char *, const char *, __builtin_va_list); WEAK int halide_printf(void *user_context, const char * fmt, ...) { __builtin_va_list args; __builtin_va_start(args,fmt); int result = __android_l...
#include "mini_stdint.h" #define WEAK __attribute__((weak)) extern "C" { extern int __android_log_vprint(int, const char *, const char *, __builtin_va_list); #define ANDROID_LOG_INFO 4 WEAK int halide_printf(void *user_context, const char * fmt, ...) { __builtin_va_list args; __builtin_va_start(args,fmt); ...
Make halide_printf output to LOG_INFO, not LOG_FATAL
Make halide_printf output to LOG_INFO, not LOG_FATAL
C++
mit
myrtleTree33/Halide,psuriana/Halide,ayanazmat/Halide,adasworks/Halide,ronen/Halide,adasworks/Halide,delcypher/Halide,gchauras/Halide,kenkuang1213/Halide,mcanthony/Halide,aam/Halide,psuriana/Halide,ayanazmat/Halide,adasworks/Halide,ayanazmat/Halide,tdenniston/Halide,dougkwan/Halide,smxlong/Halide,psuriana/Halide,jiawen/...
21173cb65e66b21689ddfdf391efd6450867dd5f
test/CodeGenCXX/cxx1z-class-deduction.cpp
test/CodeGenCXX/cxx1z-class-deduction.cpp
// RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - | FileCheck %s template<typename T> struct A { A(T = 0); A(void*); }; template<typename T> A(T*) -> A<long>; A() -> A<int>; // CHECK-LABEL: @_Z1fPi( void f(int *p) { // CHECK: @_ZN1AIiEC A a{}; // CHECK: @_ZN1AIlEC A b = p; // CHECK: @_ZN1AIxEC A c =...
// RUN: %clang_cc1 -std=c++1z %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s template<typename T> struct A { A(T = 0); A(void*); }; template<typename T> A(T*) -> A<long>; A() -> A<int>; // CHECK-LABEL: @_Z1fPi( void f(int *p) { // CHECK: @_ZN1AIiEC A a{}; // CHECK: @_ZN1AIlEC A b = p; ...
Add a triple to codegen test.
Add a triple to codegen test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@300803 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
dd76bf9f4256a5788fbdfdded94675d39bd9b2ce
tests/TestInterpreter.cpp
tests/TestInterpreter.cpp
#include "catch.hpp" #include "Interpreter.hpp" TEST_CASE("Allocation", "Make sure we can allocate a scheme interpreter") { script::Interpreter eval; }
#include "catch.hpp" #include "Interpreter.hpp" TEST_CASE("Allocation", "Make sure we can allocate a scheme interpreter") { script::Interpreter eval; REQUIRE(eval.isValid() == true); }
Make sure our interpreter is valid after construction.
Make sure our interpreter is valid after construction.
C++
mit
wibbe/scheme-cpp,wibbe/scheme-cpp
a5b6e57d7a44df19b338e0f22106bc0b2a19d8ca
src/key_listeners.cc
src/key_listeners.cc
#include <map> #include <ncurses.h> #include <string> #include <typeinfo> #include <vector> #include "configuration.hh" #include "file_contents.hh" #include "key_listeners.hh" #include "show_message.hh" #include "hooks.hh" void loop() { add_listeners(); add_hook(Hook::REFRESH,hook_show_message); while(tr...
#include <map> #include <ncurses.h> #include <string> #include <typeinfo> #include <vector> #include "configuration.hh" #include "file_contents.hh" #include "key_listeners.hh" #include "show_message.hh" #include "hooks.hh" #include "to_str.hh" void loop() { add_listeners(); add_hook(Hook::REFRESH,hook_show_me...
Fix ``loop'' as that refresh entire screen every keypress
Fix ``loop'' as that refresh entire screen every keypress
C++
mpl-2.0
czipperz/vick,czipperz/vick
49c2c3e8eeb9df1a91e9a0e06ea150b107d00ffa
test/rendering/renderablezindexcomparer_compare.cpp
test/rendering/renderablezindexcomparer_compare.cpp
#include <gtest/gtest.h> #include <gmock/gmock-matchers.h> #include "rendering/renderablezindexcomparer.hpp" #include "__mocks__/rendering/renderablemock.hpp" using testing::ElementsAre; TEST(RenderableZIndexComparer_Compare, If_first_z_index_is_less_than_second_z_index_Then_true_is_returned) { qrw::RenderableZInd...
#include <gtest/gtest.h> #include <gmock/gmock-matchers.h> #include "rendering/renderablezindexcomparer.hpp" #include "__mocks__/rendering/renderablemock.hpp" using ::testing::ElementsAre; TEST(RenderableZIndexComparer_Compare, If_first_z_index_is_less_than_second_z_index_Then_true_is_returned) { qrw::RenderableZI...
Fix broken build on ci
Fix broken build on ci
C++
mit
namelessvoid/qrwar,namelessvoid/qrwar
594862a3da3873f1fe6431a54028d2893b7c4a92
src/qt/coincontroltreewidget.cpp
src/qt/coincontroltreewidget.cpp
#include "coincontroltreewidget.h" #include "coincontroldialog.h" CoinControlTreeWidget::CoinControlTreeWidget(QWidget *parent) : QTreeWidget(parent) { } void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Space) // press spacebar -> select checkbox { event->...
#include "coincontroltreewidget.h" #include "coincontroldialog.h" CoinControlTreeWidget::CoinControlTreeWidget(QWidget *parent) : QTreeWidget(parent) { } void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Space) // press spacebar -> select checkbox { event->...
Fix crash: CoinControl "space" bug
Fix crash: CoinControl "space" bug This is a port of the pull https://github.com/bitcoin/bitcoin/pull/5700 made by fsb4000 for Bitcoin Core to fix the crash problem: CoinControl "space" bug.
C++
mit
Peerunity/Peerunity,Peerunity/Peerunity,Peerunity/Peerunity,FuzzyBearBTC/Peerunity,Peerunity/Peerunity,FuzzyBearBTC/Peerunity,FuzzyBearBTC/Peerunity,FuzzyBearBTC/Peerunity
7ccaeaaad3e5ca5f2b5a0a76fb103c80240f710d
src/tests/test-run-child-proc.cc
src/tests/test-run-child-proc.cc
#include <vector> #include "proc-service.h" // Stub out run_child_proc function, for testing purposes. void base_process_service::run_child_proc(const char * const *args, const char *working_dir, const char *logfile, bool on_console, int wpipefd, int csfd, int socket_fd, int notify_fd, int forced_not...
#include <vector> #include "proc-service.h" // Stub out run_child_proc function, for testing purposes. void base_process_service::run_child_proc(run_proc_params params) noexcept { }
Fix test stub for run_child_proc.
Fix test stub for run_child_proc.
C++
apache-2.0
davmac314/dinit,davmac314/dinit,davmac314/dinit
42942860bdcb919ea52c74e605ad92c7915acaf3
source/native/quorum_sensing.cc
source/native/quorum_sensing.cc
// This is the main function for the NATIVE version of this project. #include <iostream> #include "../QSWorld.h" int main() { std::cout << "Hello World!" << std::endl; QSWorld world; }
// This is the main function for the NATIVE version of this project. #include <iostream> #include "../QSWorld.h" int main() { std::cout << "Hello World!" << std::endl; QSWorld world(20, 20, 5); for (size_t ud = 0; ud < 100; ud++) { world.Update(); } world.Print(); }
Build native QSWorld and run it for 100 updates; no muts yet.
Build native QSWorld and run it for 100 updates; no muts yet.
C++
mit
anyaevostinar/QuorumSensingOrgs,anyaevostinar/QuorumSensingOrgs
a3987573ac64625a38c03aa89f32e43505f1ec4c
vika3/adalgluggi.cpp
vika3/adalgluggi.cpp
#include "adalgluggi.h" #include "ui_adalgluggi.h" #include <QDebug> adalgluggi::adalgluggi(QWidget *parent) : QMainWindow(parent), ui(new Ui::adalgluggi) { ui->setupUi(this); } adalgluggi::~adalgluggi() { delete ui; } void adalgluggi::on_velar_clicked() { qDebug () << "Vélar hnappur clicked"; } ...
#include "adalgluggi.h" #include "ui_adalgluggi.h" #include <QDebug> adalgluggi::adalgluggi(QWidget *parent) : QMainWindow(parent), ui(new Ui::adalgluggi) { ui->setupUi(this); } adalgluggi::~adalgluggi() { delete ui; } void adalgluggi::on_velar_clicked() { qDebug () << "Vélar hnappur clicked"; } ...
Test kóði í hætta hnapp
Test kóði í hætta hnapp
C++
mit
editomars/VLN1_h22,editomars/VLN1_h22
ed976920fdd8a5a1c6091228fa351423b641c272
src/platform/qt/RotatedHeaderView.cpp
src/platform/qt/RotatedHeaderView.cpp
/* Copyright (c) 2013-2019 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "RotatedHeaderView.h" #include <QPainter> using namespace QGB...
/* Copyright (c) 2013-2019 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "RotatedHeaderView.h" #include <QPainter> using namespace QGB...
Fix logging config section width
Qt: Fix logging config section width
C++
mpl-2.0
Iniquitatis/mgba,mgba-emu/mgba,Iniquitatis/mgba,mgba-emu/mgba,libretro/mgba,Iniquitatis/mgba,libretro/mgba,mgba-emu/mgba,libretro/mgba,libretro/mgba,mgba-emu/mgba,libretro/mgba,Iniquitatis/mgba
cb93c0e66b273d005f243391589990fd41366857
test/error/float16_t_overflow_int_conv.cpp
test/error/float16_t_overflow_int_conv.cpp
#include "Halide.h" #include <stdint.h> #include <stdio.h> #include <cmath> using namespace Halide; // FIXME: Why aren't we using a unit test framework for this? // See Issue #898 void h_assert(bool condition, const char* msg) { if (!condition) { printf("FAIL: %s\n", msg); abort(); } } int ma...
#include "Halide.h" #include <stdint.h> #include <stdio.h> #include <cmath> using namespace Halide; // FIXME: Why aren't we using a unit test framework for this? // See Issue #898 void h_assert(bool condition, const char* msg) { if (!condition) { printf("FAIL: %s\n", msg); abort(); } } int ma...
Remove isnan of an int
Remove isnan of an int Former-commit-id: 863ff0257bd565c91499d2d66927223ad4c8fb69
C++
mit
darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide
9893df5b2423b330782f0a9b02f335277b677c40
examples/undocumented/libshogun/library_gc_array.cpp
examples/undocumented/libshogun/library_gc_array.cpp
#include <shogun/base/init.h> #include <shogun/lib/common.h> #include <shogun/lib/GCArray.h> #include <shogun/kernel/Kernel.h> #include <shogun/kernel/GaussianKernel.h> #include <stdio.h> using namespace shogun; const int l=10; int main(int argc, char** argv) { init_shogun(); // create array of kernels CGCArray...
#include <shogun/base/init.h> #include <shogun/lib/common.h> #include <shogun/lib/GCArray.h> #include <shogun/kernel/Kernel.h> #include <shogun/kernel/GaussianKernel.h> #include <stdio.h> using namespace shogun; const int l=10; int main(int argc, char** argv) { init_shogun(); // we need this scope, because exit_...
Fix libshogun example (preventing segfault when shogun_exit() is called before kernel objects are destroyed)
Fix libshogun example (preventing segfault when shogun_exit() is called before kernel objects are destroyed)
C++
bsd-3-clause
Saurabh7/shogun,sorig/shogun,shogun-toolbox/shogun,sorig/shogun,sorig/shogun,sorig/shogun,Saurabh7/shogun,geektoni/shogun,lambday/shogun,Saurabh7/shogun,karlnapf/shogun,karlnapf/shogun,geektoni/shogun,shogun-toolbox/shogun,karlnapf/shogun,geektoni/shogun,besser82/shogun,shogun-toolbox/shogun,besser82/shogun,lambday/sho...
f51816b593836582877f07b17e73cc85b72ec8c2
src/generateQuery.cpp
src/generateQuery.cpp
#include "Query.hh" QString generateQuery(QString const &base, QString const &attribute, QString const &value) { QString condition = QString("@%1=\"%2\"").arg(attribute).arg(value); return generateQuery(base, condition); } QString generateQuery(QString const &base, QString const &condition) { int sub...
#include <QtDebug> #include "Query.hh" QString generateQuery(QString const &base, QString const &attribute, QString const &value) { QString condition = QString("@%1=\"%2\"").arg(attribute).arg(value); return generateQuery(base, condition); } QString generateQuery(QString const &base, QString const &cond...
Add parenthesis around predicates before query expansion.
Add parenthesis around predicates before query expansion. The query expansion gives incorrect results when the predicate is a disjunction (#132). E.g.: //node[@word="bezorgd" or @word="bezorgde"] was incorrectly expanded to: //node[@word="bezorgd" or @word="bezorgde" and CONDITION] rather than the correct //node[...
C++
lgpl-2.1
rug-compling/dact,rug-compling/dact
9637cddd639edf7c0f517b50a8bb496d6e39f763
X10_Project/Classes/Explosion.cpp
X10_Project/Classes/Explosion.cpp
#include "stdafx.h" #include "Collider.h" #include "Explosion.h" #include "ColliderManager.h" //Base Class of All Explosions bool Explosion::init() { explosion = ParticleExplosion::create(); this->addChild(explosion); isFlying = true; lifeTime = 2 * Director::getInstance()->getFrameRate(); return true; } void Ex...
#include "stdafx.h" #include "Collider.h" #include "Explosion.h" #include "ColliderManager.h" //Base Class of All Explosions bool Explosion::init() { explosion = ParticleExplosion::create(); this->addChild(explosion); isFlying = true; lifeTime = 10 * Director::getInstance()->getFrameRate(); return true; } void E...
SET explosion life time to 10 seconds
SET explosion life time to 10 seconds
C++
mit
kimsin3003/X10,kimsin3003/X10,kimsin3003/X10,kimsin3003/X10,kimsin3003/X10
e80c91e0344f03d3d627637e26b99da7547ce543
src/util/syserror.cpp
src/util/syserror.cpp
// Copyright (c) 2020-2022 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include <config/bitcoin-config.h> #endif #include <tinyformat.h> #include <util/syserror.h> #in...
// Copyright (c) 2020-2022 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include <config/bitcoin-config.h> #endif #include <tinyformat.h> #include <util/syserror.h> #in...
Increase buffer size to 1024 in SysErrorString
util: Increase buffer size to 1024 in SysErrorString Increase the error message buffer to 1024 as recommended in the manual page (Thanks Jon Atack) Github-Pull: #24933 Rebased-From: f00fb1265a8bc26e1612c771173325dbe49b3612
C++
mit
bitcoinknots/bitcoin,bitcoinknots/bitcoin,bitcoinknots/bitcoin,bitcoinknots/bitcoin,bitcoinknots/bitcoin
6abf612930ec34c350f45bedf7b80b7ad17e256f
lms/test/endian.cpp
lms/test/endian.cpp
#include "gtest/gtest.h" #include "lms/endian.h" TEST(Endian, uint16) { using lms::Endian; ASSERT_EQ(0xFECAu, Endian::letoh(Endian::htobe(uint16_t(0xCAFEu)))); ASSERT_EQ(0xFECAu, Endian::betoh(Endian::htole(uint16_t(0xCAFEu)))); } TEST(Endian, uint32) { using lms::Endian; ASSERT_EQ(0xEFBEADDEu, En...
#include "gtest/gtest.h" #include "lms/endian.h" TEST(Endian, uint16) { using lms::Endian; ASSERT_EQ(0xFECAu, Endian::letoh(Endian::htobe(uint16_t(0xCAFEu)))); ASSERT_EQ(0xFECAu, Endian::betoh(Endian::htole(uint16_t(0xCAFEu)))); } TEST(Endian, uint32) { using lms::Endian; ASSERT_EQ(0xEFBEADDEu, En...
Fix type in uint64 Endian test
Fix type in uint64 Endian test
C++
apache-2.0
lms-org/LMS,Phibedy/LMS,Phibedy/LMS,lms-org/LMS
2905cfd02eed7e02d392fcd54cb2fffed51db262
ChipSelect/src/Selector.cpp
ChipSelect/src/Selector.cpp
#include "Selector.h" bool StartsWith(const std::string& prefix, const std::string& query) { return (query.compare(0, prefix.length(), prefix) == 0); } std::string ConsumePrefix(const std::string& prefix, const std::string& query) { if (StartsWith(prefix, query)) return query.substr(prefix.length()); else ...
#include "Selector.h" bool StartsWith(const std::string& prefix, const std::string& query) { if (prefix.length() == 0) return true; if (prefix[0] == '?' && query.length() > 0) { return StartsWith(prefix.substr(1), query.substr(1)); } return (query.compare(0, prefix.length(), prefix) == 0); } std::...
Support for leading ? wildcards
Support for leading ? wildcards
C++
mit
barometz/ChipSelect,barometz/ChipSelect
62395c9666b84bcb0cb322d5f5183472712685f6
test/Parser/DelayedTemplateParsing.cpp
test/Parser/DelayedTemplateParsing.cpp
// RUN: %clang_cc1 -fdelayed-template-parsing -fsyntax-only -verify %s template <class T> class A { void foo() { undeclared(); } void foo2(); }; template <class T> class B { void foo4() { } // expected-note {{previous definition is here}} expected-note {{previous definition is here}...
// RUN: %clang_cc1 -fdelayed-template-parsing -fsyntax-only -verify %s template <class T> class A { void foo() { undeclared(); } void foo2(); }; template <class T> class B { void foo4() { } // expected-note {{previous definition is here}} expected-note {{previous definition is here}} void fo...
Remove hard coded dos line endings, let subversion translate them on update.
Remove hard coded dos line endings, let subversion translate them on update. Despite the diff, nothing but line endings changed here. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@130121 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl...
323c05c2a3baeea2a5b74b7c79900d185be7e14b
SSPSolution/SSPSolution/Progression.cpp
SSPSolution/SSPSolution/Progression.cpp
#include "Progression.h" Progression* Progression::m_instance = nullptr; Progression::Progression() { } Progression::~Progression() { } bool Progression::WriteToFile(std::string filename) { std::ofstream saveFile; saveFile.open("..\\Debug\\Saves\\" + filename + ".txt"); if (!saveFile.is_open()) { return fa...
#include "Progression.h" Progression* Progression::m_instance = nullptr; Progression::Progression() { this->m_currentLevel = 0; this->m_currentCheckpoint = 0; this->m_unlockedLevels = 0; } Progression::~Progression() { } bool Progression::WriteToFile(std::string filename) { std::ofstream saveFile; saveFile.o...
ADD intialized the Progress variables
ADD intialized the Progress variables
C++
apache-2.0
Chringo/SSP,Chringo/SSP
3afe2211715b6c82a89ed18cd1f84529c127b782
board_examples/uart/main.cpp
board_examples/uart/main.cpp
#include <hal/clock.hpp> #include <hal/uart.hpp> #include <stdio.h> #define UNUSED(expr) do { (void)(expr); } while (0) #define CURRENT_UART 1 //------------------------------------------------------------------------------ void callback (const types::buffer& buffer, uart::Uart& uart) { uart.send(buffer); ua...
#include <hal/clock.hpp> #include <hal/uart.hpp> #include <stdio.h> #define UNUSED(expr) do { (void)(expr); } while (0) #define CURRENT_UART 2 //------------------------------------------------------------------------------ void callback (const types::buffer& buffer, uart::Uart& uart) { uart.send(buffer); ua...
Change UART number in uart_example to be compatible with TI lm4f120xl.
Change UART number in uart_example to be compatible with TI lm4f120xl.
C++
mit
r-3-t/embedded,r-3-t/embedded,r-3-t/embedded
370316529eb2931f1b997b6dd19b5c12fc81283b
emulator/emulator.cpp
emulator/emulator.cpp
#include "../vm/debug.h" #include "../vm/vm.h" #include <fstream> int main(int argc, char *argv[]) { std::ifstream bytecode_if; std::streamsize bytecode_size; uint8_t *bytecode; if (argc < 3) { printf("Usage: %s <opcodes_key> <program>\n", argv[0]); return 1; } /* reading ...
#include "../vm/debug.h" #include "../vm/vm.h" #include <fstream> int main(int argc, char *argv[]) { std::ifstream bytecode_if; std::streamsize bytecode_size; uint8_t *bytecode; if (argc < 3) { printf("Usage: %s <opcodes_key> <program>\n", argv[0]); return 1; } /* reading ...
Check if input file is good
Check if input file is good
C++
mit
peperunas/pasticciotto,peperunas/pasticciotto,peperunas/pasticciotto
8b3e682dc7736cc8b6f9d16202e698cfc8b2af94
g4.cc
g4.cc
#include <exception> #include "globals.hh" #include "G4Application.hh" using namespace g4; using namespace std; /** * @short Simple main function. * * It only initializes and runs application and * prints out all exceptions. */ int main(int argc, char** argv) { try { // Run the application...
#include <exception> #include "globals.hh" #include "G4Application.hh" using namespace g4; using namespace std; /** * @short Simple main function. * * It only initializes and runs application and * prints out all exceptions. */ int main(int argc, char** argv) { try { // Run the application...
Add exiting normally to the app
Add exiting normally to the app
C++
mit
janpipek/g4application
422fa1b5817a092be87c3724ac6b4cb28c982445
chrome/browser/locale_tests_uitest.cc
chrome/browser/locale_tests_uitest.cc
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/test/ui/ui_test.h" class LocaleTestsDa : public UITest { public: LocaleTestsDa() : UITest() { launch_arguments_.AppendSw...
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/test/ui/ui_test.h" class LocaleTestsDa : public UITest { public: LocaleTestsDa() : UITest() { launch_arguments_.AppendSw...
Change zh-tw to zh-TW when it's used to find the locale data pack on Linux (case-sensitive file system).
Change zh-tw to zh-TW when it's used to find the locale data pack on Linux (case-sensitive file system). BUG=8647 TEST=Pass ui test on Linux TBR=tony Review URL: http://codereview.chromium.org/146117 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@19197 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
adobe/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/c...
c35b73969ebf0f8025cb455ce56977f6ac0658fb
src/tac/ReduceInStrength.cpp
src/tac/ReduceInStrength.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) //=====================================================...
Reduce float multiplication in strength
Reduce float multiplication in strength
C++
mit
wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic