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
aa0eea41690070b7669ee29aa7e3d4ce30675aef
src/tests/test_task.cpp
src/tests/test_task.cpp
#include <iostream> #include <gtest/gtest.h> #include "ell.hpp" #include "exceptions/cancelled.hpp" TEST(test_task, simple_yield) { using namespace ell; EventLoop loop; int count = 0; bool has_run = false; auto task2 = loop.call_soon([&]() { ...
Add some tests for tasks.
Add some tests for tasks.
C++
mpl-2.0
xaqq/ell
7de36b7778549a5a0574d18d1c0e99a5cec8a76d
test/std/containers/sequences/vector/vector.modifiers/resize.copy_only.pass.sh.cpp
test/std/containers/sequences/vector/vector.modifiers/resize.copy_only.pass.sh.cpp
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
Add a test for resizing of a vector with copy-only elements
[libc++] Add a test for resizing of a vector with copy-only elements See https://reviews.llvm.org/D62228#1658620 git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@371067 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
c5476121161b41a6574d073a99f251407ff8dddc
source/board/STM32/STM32F4/NUCLEO-F429ZI/NUCLEO-F429ZI-lowLevelInitialization.cpp
source/board/STM32/STM32F4/NUCLEO-F429ZI/NUCLEO-F429ZI-lowLevelInitialization.cpp
/** * \file * \brief board::lowLevelInitialization() implementation for NUCLEO-F429ZI * * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \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 ...
Add empty board::lowLevelInitialization() for NUCLEO-F429ZI
Add empty board::lowLevelInitialization() for NUCLEO-F429ZI
C++
mpl-2.0
jasmin-j/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,jasmin-j/distortos,CezaryGapinski/distortos,jasmin-j/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,jasmin-j/distortos,DISTORTEC/distortos,DISTORTEC/distortos,jasmin-j/distortos,DISTORTEC/distortos
f56f3e85f949b8c60f9b75451967352c8a7f3b96
Strings/is_anagram.cpp
Strings/is_anagram.cpp
# include <iostream> # include <algorithm> using namespace std; bool isAnagram(string str1, string str2) { if str1.size() != str2.size() return false; sort(str1.begin(), str1.end()); sort(str2.begin(), str2.end()); return str1 == str2; } int main() { string str1, str2; cout << "Enter first string" << endl; ...
Check if strings are anagram
Check if strings are anagram
C++
mit
CuriousLearner/Algorithms,CuriousLearner/Algorithms
f8af106f319019a699eebe137f11e79024fbb07c
test/fff_test_global_cpp.cpp
test/fff_test_global_cpp.cpp
extern "C"{ #include "global_fakes.h" } #include <gtest/gtest.h> DEFINE_FFF_GLOBALS; class FFFTestSuite: public testing::Test { public: void SetUp() { RESET_FAKE(voidfunc1); RESET_FAKE(voidfunc2); RESET_FAKE(longfunc0); RESET_HISTORY(); } }; #include "test_cases.inclu...
Test suite for global fakes from a cpp context
Test suite for global fakes from a cpp context
C++
mit
usr42/fff,usr42/fff,usr42/fff,usr42/fff
46325276e4ced7bde91fb37dadcdc1b9d35c72e4
Algorithms/Graph_Algorithms/DFS/DFS.cpp
Algorithms/Graph_Algorithms/DFS/DFS.cpp
#include <bits/stdc++.h> #define MAX ... vector<int> G[MAX]; /* this array may be initialized with false eg.: memset(visited, false, sizeof visited) */ bool visited[MAX]; void dfs(int at) { if(visited[at]) return; visited[at] = true; for (int i= 0; i< (int)G[at].size(); i++) dfs(G[at...
Add dfs implementation in c++
Add dfs implementation in c++
C++
mit
salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook
064fbfb1b9f9575430d38141cd6a5065b269d739
unit_tests/rule_not_at.cc
unit_tests/rule_not_at.cc
// Copyright (c) 2014-2015 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/ColinH/PEGTL/ #include "test.hh" namespace pegtl { void unit_test() { verify_analyze< not_at< eof > >( __LINE__, __FILE__, false ); verify_analyze< not_at< any > >( __LINE__, __F...
Fix wrong renames detected by git.
Fix wrong renames detected by git.
C++
mit
kneth/PEGTL,ColinH/PEGTL,ColinH/PEGTL,abduld/PEGTL,kneth/PEGTL,nlyan/PEGTL
e29f038f77772db2fde578580fc09aa2734f4fb6
chrome/browser/chromeos/extensions/info_private_apitest.cc
chrome/browser/chromeos/extensions/info_private_apitest.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chromeos/settings/cros_s...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chromeos/settings/cros_s...
Disable ChromeOSInfoPrivateTest due to DST failure.
Disable ChromeOSInfoPrivateTest due to DST failure. TBR=zelidrag@chromium.org BUG=314623 Review URL: https://codereview.chromium.org/57553003 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@232705 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
Jonekee/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,dushu1203/chromium.src,chuan9/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl...
0972dcae42eef097507fae4665e73ab2e890a2f7
Strings/LRSubs.cpp
Strings/LRSubs.cpp
#include<bits/stdc++.h> using namespace std; // Returns the longest repeating non-overlapping substring string longestRepeatedSubstring(string str){ int n = str.length(); int LCSRe[n+1][n+1]; // Setting all to 0 memset(LCSRe, 0, sizeof(LCSRe)); string res; // To store result int res_length = ...
Add algorithm to find Longest Repeated substring withot overlapping.
Add algorithm to find Longest Repeated substring withot overlapping.
C++
mit
xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book
e423e89844e9aba1fd098da2771354641486e90d
karum/printFromEndLL.cpp
karum/printFromEndLL.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *next; Node(){} Node(int d){ data=d; next=NULL; } Node *insertElement(Node *head,int d){...
Print elements from the end of linked list
Print elements from the end of linked list
C++
mit
shivan1b/codes
92758df23cf146d4e0efde116d245a351a4feda2
test/t/skip/runtest.cpp
test/t/skip/runtest.cpp
#include <test.hpp> TEST_CASE("skip") { SECTION("check that skip skips the right amount of bytes") { std::vector<std::string> filenames = { "boolean/data-true", "boolean/data-false", "bytes/data-one", "bytes/data-string", "bytes/data-binary", ...
Add tests of skip() function.
Add tests of skip() function.
C++
bsd-2-clause
mapbox/pbf.hpp,mapbox/pbf.hpp,mapbox/pbf.hpp
5765b199fe81f244d3b00fa0fbb2bb206bfdfebd
test/error/float16_t_implicit_downcast.cpp
test/error/float16_t_implicit_downcast.cpp
#include "Halide.h" #include <stdio.h> #include <cmath> using namespace Halide; // FIXME: We should use a proper framework for this. See issue #898 void h_assert(bool condition, const char *msg) { if (!condition) { printf("FAIL: %s\n", msg); abort(); } } int main() { Halide::Func f; H...
Add test case to check that implicit downcasting when a Func returns float (32 bits) but the buffer has type float16_t (16 bits) is an error.
Add test case to check that implicit downcasting when a Func returns float (32 bits) but the buffer has type float16_t (16 bits) is an error. Former-commit-id: ce812a50d7cf6bd13e7c4a2592f4f2a2484ce381
C++
mit
Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide
869601f2a25a3b06da8a367110df5da3be019611
028.cross-call-dep/main.cpp
028.cross-call-dep/main.cpp
#include <iostream> using std::cin; using std::cout; int *A; int sum; void f(int i) { A[i] = i * 3; } void g(int i) { sum += A[i]; } int main() { unsigned n; cin >> n; A = new int[n]; sum = 0; for (unsigned i = 0; i < n; ++i) { f(i); g(i); } cout << sum << '\n'; return 0; }
Add cross-call example (case 2)
Add cross-call example (case 2)
C++
mit
smanilov/loop-examples,smanilov/loop-examples
452feec84af76f377c165b01abc729ce8c17790f
test/AST/ast-dump-undeserialized.cpp
test/AST/ast-dump-undeserialized.cpp
// RUN: %clang_cc1 %s -chain-include %s -ast-dump | FileCheck -strict-whitespace %s // CHECK: TranslationUnitDecl 0x{{.+}} <<invalid sloc>> <invalid sloc> // CHECK: `-<undeserialized declarations>
Add test for current AST dump behavior
[ASTDump] Add test for current AST dump behavior git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@351606 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl...
c8ffd9de44330211b5d92896d3f0bbf7ef044117
test18_28.cpp
test18_28.cpp
#include <iostream> using namespace std; struct Base { void bar(int i) { cout << "Base::bar(int)" << endl; } protected: int ival = 0; }; struct Derived1 : virtual public Base { void bar(char c) { cout << "Derived1::bar(char)" << endl; } void foo(char c) { ...
Add solution for chapter 18, test 28
Add solution for chapter 18, test 28
C++
apache-2.0
chenshiyang/CPP--Primer-5ed-solution
4f7aa49682010bf86ce82cc8d88d411d8a28ff2f
ui/message_center/message_center_util.cc
ui/message_center/message_center_util.cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/message_center/message_center_util.h" #include "base/command_line.h" #include "ui/message_center/message_center_switches.h" namespace m...
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/message_center/message_center_util.h" #include "base/command_line.h" #include "ui/message_center/message_center_switches.h" namespace m...
Fix for crash trying to deference ash::Shell::message_center()
Fix for crash trying to deference ash::Shell::message_center() Because we don't really have a operational ash::shell in windows 7 or earlier. So we need to default to the non-rich one BUG=178429 TEST=see bug Review URL: https://codereview.chromium.org/12328129 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@18...
C++
bsd-3-clause
markYoungH/chromium.src,Chilledheart/chromium,patrickm/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,M4sse/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chro...
7c687ae2efe407f0181ec60cdf257b213011d153
gpu/src/GrGLDefaultInterface_none.cpp
gpu/src/GrGLDefaultInterface_none.cpp
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ struct GrGLInterface; const GrGLInterface* GrGLDefaultInterface() { return NULL; }
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrGLInterface.h" const GrGLInterface* GrGLDefaultInterface() { return NULL; }
Include GrGLInterface.h instead of forward declaring, since we have to get NULL defined anyway.
Include GrGLInterface.h instead of forward declaring, since we have to get NULL defined anyway. git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2280 2bbb7eff-a529-9590-31e7-b0007b416f81
C++
bsd-3-clause
Hankuo/color-emoji.skia,hbwhlklive/color-emoji.skia,hbwhlklive/color-emoji.skia,hbwhlklive/color-emoji.skia,Frankie-666/color-emoji.skia,MatChung/color-emoji.skia,Frankie-666/color-emoji.skia,Hankuo/color-emoji.skia,Hankuo/color-emoji.skia,Frankie-666/color-emoji.skia,MatChung/color-emoji.skia,Frankie-666/color-emoji.s...
9309bf44ca05e70100a4ef1653faf602e456cdd9
src/tls/hello_verify.cpp
src/tls/hello_verify.cpp
/* * DTLS Hello Verify Request * (C) 2012 Jack Lloyd * * Released under the terms of the Botan license */ #include <botan/internal/tls_messages.h> #include <botan/lookup.h> #include <memory> namespace Botan { namespace TLS { Hello_Verify_Request::Hello_Verify_Request(const MemoryRegion<byte>& buf) { if(buf.si...
Add missing source for DTLS hello verify
Add missing source for DTLS hello verify
C++
bsd-2-clause
randombit/botan,webmaster128/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,randombit/...
19bbfcf3baa2f2d93ca1603fbbf2a94241866ed2
misc/cpp/sigint.cpp
misc/cpp/sigint.cpp
extern "C" { #include <wiringPi.h> } #include <signal.h> #include <errno.h> #include <iostream> #include <thread> #include <chrono> void gpio4Callback(void) { std::cout << "Hello" << std::endl; } int main(){ sigset_t set; int sig; int *sigptr = &sig; int ret_val; sigemptyset(&set); si...
Add gpio interrupt plus signal wait
Add gpio interrupt plus signal wait
C++
mit
Kolkir/orange-pi,Kolkir/orange-pi,Kolkir/orange-pi,Kolkir/orange-pi
1c799f5ff93d11fb5191f3dabad803f2f40ec4c4
test16_41.cpp
test16_41.cpp
#include <iostream> #include <limits> using namespace std; template <typename T1, typename T2> auto sum(T1 a, T2 b) -> decltype(a + b) { return a + b; } int main() { char c1 = 127; char c2 = 127; long lng = numeric_limits<long>::max() - 200; cout << sum(c1, c2) << endl; cout <<...
Add solution for chapter 16 test 41
Add solution for chapter 16 test 41
C++
apache-2.0
chenshiyang/CPP--Primer-5ed-solution
803f6a5da3be9d5cb95afe384783c8be64c92ca3
C++_Practice/sizeof.cpp
C++_Practice/sizeof.cpp
#include <iostream> using namespace std; int main(){ string animals[][3] = { {"fox", "dog", "cat"}, {"mouse", "squirrel", "parrot"} }; for(int i = 0; i < sizeof(animals)/sizeof(animals[0]); i++){ for(int j = 0; j < sizeof(animals[0])/sizeof(string); j++){ cout << animals[i][j] << " " << flush...
Implement For Loop Using Sizeof Example
Implement For Loop Using Sizeof Example
C++
mit
Kunal57/C_Problems,Kunal57/C_Problems
362f0446ac34a68dd004072e49399014fce0bc01
heap/2195.cc
heap/2195.cc
class Solution { public: long long minimalKSum(vector<int>& nums, int k) { auto cmp = [](int left, int right){ return left > right; }; std::priority_queue<int, std::vector<int>, decltype(cmp)> q(cmp); for (const auto& num : nums) { q.emplace(std::move(num)); ...
Append K Integers With Minimal Sum
Append K Integers With Minimal Sum
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
860e912583b48fef7dc5b0399c40a7696ccfec55
src/wallet/test/wallet_test_fixture.cpp
src/wallet/test/wallet_test_fixture.cpp
// Copyright (c) 2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet/test/wallet_test_fixture.h" #include "rpc/server.h" #include "wallet/db.h" #include "wallet/wallet.h" CWallet *...
// Copyright (c) 2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet/test/wallet_test_fixture.h" #include "rpc/server.h" #include "wallet/db.h" #include "wallet/wallet.h" std::uniq...
Use unique_ptr for pwalletMain (CWallet)
Use unique_ptr for pwalletMain (CWallet)
C++
mit
domob1812/huntercore,tecnovert/particl-core,bitcoinknots/bitcoin,dscotese/bitcoin,DigitalPandacoin/pandacoin,domob1812/bitcoin,Rav3nPL/bitcoin,r8921039/bitcoin,achow101/bitcoin,rnicoll/bitcoin,lateminer/bitcoin,midnightmagic/bitcoin,pataquets/namecoin-core,pataquets/namecoin-core,wellenreiter01/Feathercoin,lbryio/lbryc...
5e933e86f69e93d71ce6871994e2473bd6467719
tests/test_portsocket.cpp
tests/test_portsocket.cpp
#include <sstream> #include <gtest/gtest.h> #include "portsocket.h" #define TEST_CLASS PortSocketTest class TEST_CLASS : public testing::Test { protected: class DummySocket : PortSocket { public: DummySocket(bool *sentinel) : sentinel(sentinel) { *sentinel = true; } int read(PortType port, Siz...
Create dumb test for better coverage
Create dumb test for better coverage
C++
mit
aroxby/cpu,aroxby/cpu
4e7797e6e1aecf271420a28a3e246d0a652c6a84
test/CodeGenCXX/cxx1y-generic-lambdas.cpp
test/CodeGenCXX/cxx1y-generic-lambdas.cpp
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s -std=c++14 | FileCheck %s template<typename> struct custom_copy_ctor { custom_copy_ctor() = default; custom_copy_ctor(custom_copy_ctor const &) {} }; // CHECK: define {{.*}} @_ZN16custom_copy_ctorIvEC2ERKS0_( void pr22354() { custom_copy_ctor<void> ...
Add a test that we emit copy-ctors for captures in generic lambdas.
PR22354: Add a test that we emit copy-ctors for captures in generic lambdas. The bug was fixed by r235921. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@236254 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
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-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl...
69cff4e5deec39396f355ad7976d34d3f306a37d
INPUTS/all-std-headers.cpp
INPUTS/all-std-headers.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <complex> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> ...
Add an input file that includes all standard C++ headers
Add an input file that includes all standard C++ headers git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@83042 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl...
fe8033a9c7b519a6e27d20b2a1e18c9104653976
seminar/livetree/main.cpp
seminar/livetree/main.cpp
#include <iostream> using namespace std; struct Node { int data; Node* left; Node* right; Node(int data, Node* left = nullptr, Node* right = nullptr) : data(data), left(left), right(right) {} }; class BinaryTree { Node* root; BinaryTree(Node* node) { root = copyNode(node); } Node* copyNod...
Add binary tree live implementation
Add binary tree live implementation
C++
mit
dimitaruzunov/data-structures-fmi-2016
3556df5303eb30593d7e35703416318218a3ccfc
data_structures/binary_tree/side_view.cpp
data_structures/binary_tree/side_view.cpp
#include <iostream> #include <queue> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int x) { data = x; left = NULL; right = NULL; } }; vector<Node *> rightView(Node *root) { vector<Node *> rightView; if (root == NULL) return rightView; queue<Node *> q; ...
Add c++ code for printing the side view of a binary tree
Add c++ code for printing the side view of a binary tree
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...
13584a6f4156e220d037340a8265e971125fd3ef
test/catch_in_noexcept.cpp
test/catch_in_noexcept.cpp
//===---------------------- catch_in_noexcept.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 EH test case checking that handlers in noexcept functions can still unwind
Add EH test case checking that handlers in noexcept functions can still unwind git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@209944 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi
b7eb46b39c7adc55049d24418f657a883461c1db
test/CodeGenCXX/extern-section-attribute.cpp
test/CodeGenCXX/extern-section-attribute.cpp
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu | FileCheck %s extern int aa __attribute__((section(".sdata"))); // CHECK-DAG: @aa = external global i32, section ".sdata", align 4 extern int bb __attribute__((section(".sdata"))) = 1; // CHECK-DAG: @bb = global i32 1, section ".sdata", align 4 int f...
Add test forgotten in r314262.
Add test forgotten in r314262. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@314268 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
f13cddf1a357436e6e9ca165f03daf490127f324
cached_calculations.cpp
cached_calculations.cpp
#include <iostream> using namespace std; long long solve(int n) { long long *res = new long long[n + 1]; switch (n) { case 1: return 1; case 2: return 2; case 3: return 3; case 4: return 6; } res[1] = 1; res[2] = 2; res[3] = 3; res[4] = 6; for (int i = 5; i <= n; i++) { ...
Add the solution to "Cached Calculations".
Add the solution to "Cached Calculations".
C++
mit
clasnake/hackermeter,clasnake/hackermeter
82039f57624ae459a0ceb4048316651ecb4fcd99
tests/misc_utils_tests.cpp
tests/misc_utils_tests.cpp
/* Copyright Eli Dupree and Isaac Dupree, 2011, 2012 This file is part of Lasercake. Lasercake 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 3 of the License, or (at you...
Add a test for i64sqrt
Add a test for i64sqrt
C++
agpl-3.0
idupree/Lasercake,elidupree/Lasercake,elidupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,Lasercake/Lasercake,elidupree/Lasercake,idupree/Lasercake,Lasercake/Lasercake,Lasercake/Lasercake,elidupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,elidupree/Lasercake,idupree/Lasercake,Lasercake/Lasercake,Lasercake/...
606b8ec49753956eacf2a75891e4c5ec60ad4ec8
photoeffects/test/glow_test.cpp
photoeffects/test/glow_test.cpp
#include <gtest/gtest.h> #include "photoeffects.hpp" using namespace cv; TEST(photoeffects, GlowTest) { Mat image(10, 10, CV_8UC1); EXPECT_EQ(10, glow(image)); }
Add tests for glow implementation
Add tests for glow implementation
C++
bsd-3-clause
ITLab-Vision/itlab-vision,ITLab-Vision/itlab-vision
a6e2c33948bf52060e48c71a5e4426b31443753a
chrome/browser/net/async_dns_field_trial.cc
chrome/browser/net/async_dns_field_trial.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/net/async_dns_field_trial.h" #include "base/metrics/field_trial.h" #include "build/build_config.h" #include "chrome/common/c...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/net/async_dns_field_trial.h" #include "base/metrics/field_trial.h" #include "build/build_config.h" #include "chrome/common/c...
Disable Async DNS field trial
[net] Disable Async DNS field trial Disabling due to http://crbug.com/121085 NOTRY=true BUG=143454 Review URL: https://chromiumcodereview.appspot.com/10894041 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@154369 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,nacl-webk...
7ec1b7a537951f80c6531103ee4787d12e696630
test/CXX/class/p6-0x.cpp
test/CXX/class/p6-0x.cpp
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x class Trivial { int n; void f(); }; class NonTrivial1 { NonTrivial1(const NonTrivial1 &); }; class NonTrivial2 { NonTrivial2(NonTrivial2 &&); }; class NonTrivial3 { NonTrivial3 operator=(const NonTrivial3 &); }; class NonTrivial4 { NonTrivial4 operator=(NonTrivial...
Test for C++11 [class]p6 (trivial classes).
Test for C++11 [class]p6 (trivial classes). git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@132889 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl...
cb63c908ea9cd3fc281d041e3f368a3dbfa344fa
LanguageEasy.cpp
LanguageEasy.cpp
#include "LanguageEasy.h" //Windows WindowMessage::WindowMessage() { MessageName = ""; Message = ""; } WindowMessage::WindowMessage(string NewMessageName, string NewMessage) { MessageName = NewMessageName; Message = NewMessage; } void WindowMessage::OutputWindow() { char MessageBuffer[9999]; char MessageNameBu...
Add Window Message Class (Continued)
Add Window Message Class (Continued) This will be used in Windows to output a message box using a object.
C++
mit
Project-CPP/Language-Easy_CPP-Addon
e55c1798b9f974e2ee7923acd63d2ff754fdd7bb
src/util.cpp
src/util.cpp
#include "logic.h" #define ARBITRARY_SIZE 20 block* blockAlloc( void ); void blockFree( block * ); //Object pool: static int mem_size {0}; static int mem_used {0}; static block* mem_array[BOARD_HEIGHT * BOARD_WIDTH / PIECES_PER_BLOCK]; block* blockAlloc( void ) { //check if enough space exists if( mem_used <= ...
Add basic skeleton for object pool
Add basic skeleton for object pool
C++
apache-2.0
MarkMcCaskey/tetrinos
d587c688b70bf676bdfe2bff880aab03d8035d59
DataStructures/Queues/queue_using_stacks.cpp
DataStructures/Queues/queue_using_stacks.cpp
#include <iostream> #include <stack> using namespace std; struct Queue { stack<int> s1, s2; }; void enqueue(Queue *Q, int data) { Q->s1.push(data); } int dequeue(Queue *Q) { int top; if (!Q->s2.empty()) { top = Q->s2.top(); Q->s2.pop(); } else { while (!Q->s1.empty()) { ...
Implement queue using only stack
Implement queue using only stack Implement enqueue and dequeue operations using 2 stacks Time complexity O(1) Signed-off-by: WajahatSiddiqui <3c3ea4adfdf19decee174766aef6add34b32b7f0@gmail.com>
C++
apache-2.0
WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace
31523df79ae46ecb4fd7ae26c6e669a761a0982a
test/Frontend/trigraphs.cpp
test/Frontend/trigraphs.cpp
// RUN: %clang_cc1 -DSTDCPP11 -std=c++11 -verify -fsyntax-only %s // RUN: %clang_cc1 -DSTDGNU11 -std=gnu++11 -verify -fsyntax-only %s // RUN: %clang_cc1 -DSTDGNU11TRI -trigraphs -std=gnu++11 -verify -fsyntax-only %s // RUN: %clang_cc1 -DSTDCPP17 -std=c++1z -verify -fsyntax-only %s // RUN: %clang_cc1 -DSTDCPP17TRI -trig...
Add test coverage for cc1's trigraph option handling.
Add test coverage for cc1's trigraph option handling. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@224714 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl...
61e3f8e0af467ebcffe7f9f7d5a8d5565ea29067
ui/compositor/test/test_suite.cc
ui/compositor/test/test_suite.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/compositor/test/test_suite.h" #include "base/command_line.h" #include "base/message_loop/message_loop.h" #include "ui/compositor/composi...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/compositor/test/test_suite.h" #include "base/command_line.h" #include "base/message_loop/message_loop.h" #include "ui/compositor/composi...
Make compositor unittests opt into real GL NullDraw contexts.
ui: Make compositor unittests opt into real GL NullDraw contexts. This breaks the dependency on the TestCompositor for the compositor_unittests. Once it's no longer in use by any test suite, we can remove it. R=vollick@chromium.org BUG=270918 NOTRY=true Review URL: https://codereview.chromium.org/179783005 git-svn-...
C++
bsd-3-clause
Jonekee/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,jarub...
c58e3aa9971efab634c2fff24232216bd826cb9d
src/01-hola-mundo/hola-mundo.cpp
src/01-hola-mundo/hola-mundo.cpp
#include <cstdio> // Libreria estandar de IO C++ int main( int argc, char *argv[] ) { /* Usamos el operador de resolucion :: para acceder a los elementos dentro de la libreria estandar std */ std::cout << "Hola mundo!" << std::endl; }
Add CPP hello world example
Add CPP hello world example
C++
mit
clinoge/primer-semestre-udone,clinoge/primer-semestre-udone,clinoge/primer-semestre-udone,clinoge/primer-semestre-udone,clinoge/primer-semestre-udone
a391ee004d786aff622c8195f71ca9191fca94fe
C++/043_Multiply_Strings.cpp
C++/043_Multiply_Strings.cpp
// 043. Multiply Strings /** * Given two numbers represented as strings, return multiplication of the numbers as a string. * * Note: The numbers can be arbitrarily large and are non-negative * * Tags: Math, String * * Similar Problems: (M) Add Two Numbers, (E) Plus One, (E) Add Binary * * Author: Kuang Qin */...
Add Solution for Problem 043
Add Solution for Problem 043
C++
mit
FreeTymeKiyan/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res
547a6f26a27c58e5c260c4c3d95291bec777be81
runAs-tool-win32/JetBrains.runAs/ShowModeConverter.cpp
runAs-tool-win32/JetBrains.runAs/ShowModeConverter.cpp
#include "stdafx.h" #include "ShowModeConverter.h" WORD ShowModeConverter::ToShowWindowFlag(const ShowMode& showMode) { if (showMode == SHOW_MODE_HIDE) { return SW_HIDE; } if (showMode == SHOW_MODE_NORMAL) { return SW_NORMAL; } if (showMode == SHOW_MODE_SHOW) { return SW_SHOW; } return 0; }
Add arg for show mode
Add arg for show mode
C++
apache-2.0
JetBrains/teamcity-runas-plugin,JetBrains/teamcity-runas,JetBrains/teamcity-runas,JetBrains/teamcity-runas,JetBrains/teamcity-runas,JetBrains/teamcity-runas-plugin
8805b3fa07ee8da0359bbe43facfcb475579511e
LinuxEventHandlerExport.cpp
LinuxEventHandlerExport.cpp
#include "LinuxEventHandler.h" #include "OSEventHandlerExport.h" std::shared_ptr<ni::EventHandler> GetOSEventHandler(ni::DeviceType devices) { return std::make_shared<ni::LinuxEventHandler>(devices); }
Add Linux event handler export function.
Add Linux event handler export function.
C++
mit
jack-karamanian/NetInput
49c7d364452ed8f6f7f78f124cfb321333a8f178
leetcode/Remove_Duplicates_from_Sorted_Array_2.cpp
leetcode/Remove_Duplicates_from_Sorted_Array_2.cpp
// // Remove_Duplicates_from_Sorted_Array_2.cpp // leetcode // // Created by 邵建勇 on 15/5/11. // Copyright (c) 2015年 John Shaw. All rights reserved. // #include <stdio.h> #include <vector> using namespace std; class Solution { public: int removeDuplicates(vector<int>& nums) { if (nums.size() == 0) { ...
Remove Duplicates from Sorted Array II
Remove Duplicates from Sorted Array II
C++
mit
John-Shaw/leetcode-solutions
f5187d5cf79b8142e132d76cc1df4490e79e4837
event/callback.cc
event/callback.cc
#include <common/buffer.h> #include <event/action.h> #include <event/callback.h> #include <event/event.h> #include <event/event_system.h> Action * Callback::schedule(void) { return (EventSystem::instance()->schedule(this)); }
Add file missed in r574.
Add file missed in r574. git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@575 4068ffdb-0463-0410-8185-8cc71e3bd399
C++
bsd-2-clause
splbio/wanproxy,diegows/wanproxy,diegows/wanproxy,splbio/wanproxy,splbio/wanproxy,diegows/wanproxy
f9c03f6bdec27c0913e7886873580ee13b415421
LeetCode-83.cpp
LeetCode-83.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <cstring> #include <cstdio> #include <map> using namespace std; /* struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; */ class Solution { public: ListNode...
Remove Duplicates from sorted list (Made general case for unsorted list).
Remove Duplicates from sorted list (Made general case for unsorted list).
C++
mit
therainmak3r/dirty-laundry
6e7d1e07fbc20a9977be3413ff491862687cd9ed
src/unittest/streamed_tcp_test.cc
src/unittest/streamed_tcp_test.cc
#include "unittest/gtest.hpp" #include "arch/streamed_tcp.hpp" namespace unittest { namespace { /* `run_in_thread_pool()` starts a RethinkDB IO layer thread pool and calls the given function within a coroutine inside of it. */ struct starter_t : public thread_message_t { thread_pool_t *tp; boost::function<...
Add a streamed tcp conn unit test
Add a streamed tcp conn unit test
C++
agpl-3.0
wkennington/rethinkdb,alash3al/rethinkdb,mcanthony/rethinkdb,mbroadst/rethinkdb,Qinusty/rethinkdb,catroot/rethinkdb,greyhwndz/rethinkdb,yaolinz/rethinkdb,KSanthanam/rethinkdb,RubenKelevra/rethinkdb,scripni/rethinkdb,dparnell/rethinkdb,sebadiaz/rethinkdb,elkingtonmcb/rethinkdb,matthaywardwebdesign/rethinkdb,eliangidoni/...
0d05ab46c656ba334bdded25ff100aa083ceee99
test/Headers/warn-sysheader.cpp
test/Headers/warn-sysheader.cpp
// Test that -Wsystem-headers works with default and custom mappings like -Werror. // Keep run lines at the bottom for line number stability. #ifdef IS_SYSHEADER #pragma clang system_header int f() { return (int)0; } // Use the old-style-cast warning as an arbitrary "ordinary" diagnostic for the purpose of testing. ...
Add a proper test for -Wsystem-headers
Add a proper test for -Wsystem-headers This will be extended as we fix issues in the current implementation. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@200054 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/cl...
e719918c7ed7f8f6391b7df4f99b0ed7b1917ec7
chapter24/chapter24_ex10.cpp
chapter24/chapter24_ex10.cpp
// Chapter 24, exercise 10: test rand(); write a program that takes two integers // n and d and calls randint(n) d times; output the number of draws for each // [0:n) and see if there are any obvious biases #include<iostream> #include<iomanip> #include<cstdlib> #include<ctime> #include<map> using namespace std; inli...
Add Chapter 24, exercise 10
Add Chapter 24, exercise 10
C++
mit
bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp
f76788bfa04d7e2cb349febe8b34eddfcb325ee2
dynamic_programing/C++/Maximum_Consecutive_Sum.cpp
dynamic_programing/C++/Maximum_Consecutive_Sum.cpp
#include <bits/stdc++.h> using namespace std; int main() { int sum = 0; int max_sum = array[0]; for (int i = 0; i < length; ++i) { sum += array[i]; sum = max(0, sum); max_sum = max(sum, max_sum); } return max_sum; }
Add Maximum consecutive sum in c++
Add Maximum consecutive sum 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...
9b0d79ddade34d4d58b1576c79fb9cc739c5763c
code/_json.cpp
code/_json.cpp
// Copyright Louis Dionne 2015 // Distributed under the Boost Software License, Version 1.0. #include <boost/hana.hpp> #include <boost/hana/struct_macros.hpp> #include <iostream> #include <string> #include <type_traits> #include <utility> using namespace boost::hana; using namespace std::literals; std::string quote...
Add an example of JSON generation
Add an example of JSON generation
C++
mit
ldionne/hana-cppnow-2015,ldionne/hana-cppnow-2015,ldionne/hana-cppnow-2015
4218a0e7a725777a2c786eac6c878541f75db952
test/asan/TestCases/speculative_load2.cc
test/asan/TestCases/speculative_load2.cc
// Verifies that speculative loads from unions do not happen under asan. // RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=detect_leaks=0 %run %t 2>&1 // RUN: %clangxx_asan -O1 %s -o %t && ASAN_OPTIONS=detect_leaks=0 %run %t 2>&1 // RUN: %clangxx_asan -O2 %s -o %t && ASAN_OPTIONS=detect_leaks=0 %run %t 2>&1 // RUN: %c...
Disable gvn non-local speculative loads under asan.
Disable gvn non-local speculative loads under asan. Summary: Fix for https://llvm.org/bugs/show_bug.cgi?id=25550 Differential Revision: http://reviews.llvm.org/D14764 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@253499 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
0eb0b5d47e7171b2a817aca383cabda797c5aae3
Source/core/dom/RemoteSecurityContext.cpp
Source/core/dom/RemoteSecurityContext.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 "core/dom/RemoteSecurityContext.h" #include "core/frame/csp/ContentSecurityPolicy.h" #include "platform/weborigin/SecurityOr...
// 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 "core/dom/RemoteSecurityContext.h" #include "core/frame/csp/ContentSecurityPolicy.h" #include "platform/weborigin/SecurityOr...
Allow replicated origins to be updated.
Allow replicated origins to be updated. Previously, replicated origins were set only when RemoteFrames were created. However, https://codereview.chromium.org/1098763003 is going to send origin updates to frame proxies when the frame navigates to another origin, so this check is no longer needed. BUG=426512 Review...
C++
bsd-3-clause
smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,smishenk/b...
66328480bb3eb6aa52e2c155657f3d19d4efea7a
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
//===-- SelectionDAGPrinter.cpp - Implement SelectionDAG::viewGraph() -----===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===--------...
Implement initial selectiondag printing support. This gets us a nice graph with no labels! :)
Implement initial selectiondag printing support. This gets us a nice graph with no labels! :) git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@19441 91177308-0d34-0410-b5e6-96231b3b80d8
C++
bsd-2-clause
chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GP...
25500b158196752cb12a88207ba1fe5c9a86f5b1
test/asan/TestCases/use-after-scope-conversion.cc
test/asan/TestCases/use-after-scope-conversion.cc
// RUN: %clangxx_asan -O0 -fsanitize-address-use-after-scope %s -o %t // RUN: not %run %t 'A' 2>&1 | FileCheck %s // RUN: not %run %t 'B' 2>&1 | FileCheck %s // Missing lifetime markers in test_a // https://bugs.llvm.org/show_bug.cgi?id=34353 // XFAIL: * struct B { B() : p('B') {} char p; }; struct C { const ...
Add use-after-scope test which fails because of bug in clang
[asan] Add use-after-scope test which fails because of bug in clang Reviewers: kcc, eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37242 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@312039 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
06d66022d9347a99be5df519c86a978fe8cbf4cb
chrome/browser/apps/app_crash_browsertest.cc
chrome/browser/apps/app_crash_browsertest.cc
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/apps/app_browsertest_util.h" #include "extensions/test/extension_test_message_listener.h" // This class of BrowserTests is a hel...
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/apps/app_browsertest_util.h" #include "extensions/test/extension_test_message_listener.h" // This class of BrowserTests is a hel...
Disable a flaky test. See crbug.com/469249.
Disable a flaky test. See crbug.com/469249. BUG=469249 TBR=kalman@chromium.org Review URL: https://codereview.chromium.org/1027833006 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#321794}
C++
bsd-3-clause
Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,ltilve/chromium,J...
22ec199fa0198220a11eb70ee55bb7ea3d1f7c60
lib/Transforms/IPO/InlineAlways.cpp
lib/Transforms/IPO/InlineAlways.cpp
//===- InlineAlways.cpp - Code to perform simple function inlining --------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Add custom inliner that handles only functions that are marked as always_inline.
Add custom inliner that handles only functions that are marked as always_inline. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@55713 91177308-0d34-0410-b5e6-96231b3b80d8
C++
bsd-2-clause
chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/as...
f3f19f4a250e59795983bcd371e08406b1b3b70c
test/clang-rename/InvalidOffset.cpp
test/clang-rename/InvalidOffset.cpp
#include "Inputs/HeaderWithSymbol.h" #define FOO int bar; FOO int foo; // RUN: not clang-rename -new-name=qux -offset=259 %s -- 2>&1 | FileCheck %s // CHECK-NOT: CHECK // CHECK: error: SourceLocation in file {{.*}}InvalidOffset.cpp at offset 259 is invalid
Add test case for r287758.
[clang-rename] Add test case for r287758. git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@287759 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
727ffe4b5f2fdbeabb99535f9e453776412199ad
test/clang-tidy/pr37091.cpp
test/clang-tidy/pr37091.cpp
// REQUIRES: shell // RUN: rm -rf %t // RUN: mkdir -p %t // This is a reproducer for PR37091. // // Verify that no temporary files are left behind by the clang-tidy invocation. // RUN: env TMPDIR=%t TEMP=%t TMP=%t clang-tidy %s -- --target=mips64 // RUN: rmdir %t
Clean up tmp files when deleting Compilation objects
[Driver] Clean up tmp files when deleting Compilation objects Summary: In rL327851 the createUniqueFile() and createTemporaryFile() variants that do not return the file descriptors were changed to create empty files, rather than only check if the paths are free. This change was done in order to make the functions race...
C++
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
721685ac6d465cd68c445a1a6e56ffa188030065
test/tree_node_unittest.cpp
test/tree_node_unittest.cpp
#include "tree_node.h" #include "gtest\gtest.h" /* This file will include all the test for the TreeNode class. */ TEST(TreeNodeTest, AddChild) { //Initialize a node with some children. TreeNode<int> focusNode; TreeNode<int> child1; TreeNode<int> child2; focusNode.addChild(&child1); focusNode.add...
Add test for the treenode.
Add test for the treenode.
C++
mit
holmgr/dsa-cozy-corner,holmgr/dsa-cozy-corner,holmgr/dsa-cozy-corner
861b541ecaa1c359e46234f23c75967f1ffa36bf
chapter25/chapter25_ex05.cpp
chapter25/chapter25_ex05.cpp
// Chapter 25, exercise 5: write an infinite loop and execute it #include<iostream> #include<exception> using namespace std; int main() try { while (true) cout << "Looping!\n"; } catch (exception& e) { cerr << "exception: " << e.what() << endl; } catch (...) { cerr << "exception\n"; return 2;...
Add Chapter 25, exercise 5
Add Chapter 25, exercise 5
C++
mit
bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp
c69a87db0553220e9ea06ee92290770d9b095da0
practice03/03.cpp
practice03/03.cpp
#include <stdio.h> int main(void) { int N; printf("Enter N= "); scanf("%d", &N); /* Get the largest number in the power of two, which satisfies less than or equal to N */ int v = 1; while(v <= N) v = v << 1; v = v >> 1; /* Calculate and print to screen */ while(v > 0) { ...
Add a solution of prob 3
Add a solution of prob 3
C++
mit
kdzlvaids/problem_solving-pknu-2016,kdzlvaids/problem_solving-pknu-2016
f6e9b5db31979252e3d659d25bb3ba48cc09b88d
1-common-tasks/input-streams/read-lines-from-stream.cpp
1-common-tasks/input-streams/read-lines-from-stream.cpp
// Read lines from a stream #include <sstream> #include <string> int main() { std::istringstream stream{"This stream\n" "contains many\n" "lines.\n"}; std::string line; while (std::getline(stream, line)) { // Process line } } // Process the contents of an ...
Add "read lines from stream" sample
Add "read lines from stream" sample
C++
cc0-1.0
sftrabbit/CppSamples-Samples,tmwoz/CppSamples-Samples,thatbrod/CppSamples-Samples,darongE/CppSamples-Samples,rollbear/CppSamples-Samples,brunotag/CppSamples-Samples,vjacquet/CppSamples-Samples,mnpk/CppSamples-Samples
c3d5831e052fb6baffc29fc4cd289fcc6a5ff388
tests/PictureUtilsTest.cpp
tests/PictureUtilsTest.cpp
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "Test.h" #include "picture_utils.h" #include "SkString.h" static void test_filepath_creation(skiatest::Reporter* reporter) { SkString result; SkString filenam...
Allow specific files and multiple inputs for picture testing tools.
Allow specific files and multiple inputs for picture testing tools. Changed the render_pictures, bench_pictures and test_pictures.py so that multiple inputs can be given. Furthermore, specific files can also be specified. Unit tests have also been added for picture_utils.cpp. Committed http://code.google.com/p/skia/...
C++
bsd-3-clause
rubenvb/skia,android-ia/platform_external_chromium_org_third_party_skia,Samsung/skia,Samsung/skia,RadonX-ROM/external_skia,MinimalOS/external_skia,Omegaphora/external_skia,SlimSaber/android_external_skia,AOSPU/external_chromium_org_third_party_skia,ctiao/platform-external-skia,Omegaphora/external_chromium_org_third_par...
46e292821cdd39bf64c166693f53f967cbd65a9b
tree/331.cc
tree/331.cc
class Solution { public: bool isValidSerialization(string preorder) { int diff = 1; std::string temp = ""; for (const auto &c : preorder) { if (c == ',') { --diff; if (diff < 0) return false; if (temp != "#") ...
Verify Preorder Serialization of a Binary Tree
Verify Preorder Serialization of a Binary Tree
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
aad26afd49fbd951d3d20339358a89356ac6af80
topcoder/SRM/144/BinaryCode/BinaryCode/main.cpp
topcoder/SRM/144/BinaryCode/BinaryCode/main.cpp
#include <vector> #include <iostream> #include <string> using namespace std; class BinaryCode { public: vector <string> decode(string message) { vector <string> result; unsigned len = message.length() + 2; int P[len]; int Q[len]; Q[0] = Q[len-1] = 0; for (unsigned i = 0; i < message.length();...
Solve SRM 144, Div 2, Problem BinaryCode
Solve SRM 144, Div 2, Problem BinaryCode
C++
mit
mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming
32fc574f505a94f0c6fce82a7232a34f33008962
mshp/algo/geo/inside_polygon.cpp
mshp/algo/geo/inside_polygon.cpp
/* * Copyright (C) 2015-2016 Pavel Dolgov * * See the LICENSE file for terms of use. */ #include <bits/stdc++.h> typedef std::pair<int, int> IntPair; typedef std::vector<IntPair> IntPairs; int vectorMul(IntPair a, IntPair b) { return a.first * b.second - b.first * a.second; } int scalarMul(IntPair a, IntPai...
Add PIP (point in polygon) problem
Add PIP (point in polygon) problem
C++
mit
zer0main/problems,zer0main/problems,zer0main/problems
f499d3ea22f32e707a3a44eb48beb9871e7c9f49
2-patterns/structural/decorator-compiletime.cpp
2-patterns/structural/decorator-compiletime.cpp
// Decorator (compile-time) class foo_concrete { public: void do_work() { } }; template <typename Foo> class foo_decorator { public: foo_decorator(Foo& f) : f{f} { } void do_work() { // Do something else here to decorate // the do_work function f.do_work(); } private: Foo& f; }; templa...
Add "compile-time decorator pattern" sample
Add "compile-time decorator pattern" sample
C++
cc0-1.0
rollbear/CppSamples-Samples,sftrabbit/CppSamples-Samples,brunotag/CppSamples-Samples,vjacquet/CppSamples-Samples,thatbrod/CppSamples-Samples,tmwoz/CppSamples-Samples,mnpk/CppSamples-Samples,darongE/CppSamples-Samples
8f1a5add0b752cdd256c2126ff70f28e1989d5b1
unit-tests/utilities/memory/test-sensor-option.cpp
unit-tests/utilities/memory/test-sensor-option.cpp
#include "../../test.h" #include "../../func/func-common.h" #include <iostream> TEST_CASE( "sensor get_option memory leak", "[live]" ) { // running this test with the following command: // `valgrind --leak-check=yes --show-leak-kinds=all --track-origins=yes ./unit-tests/build/utilities/memory/test-sen...
Add test for memory leak to be run with valgrind
Add test for memory leak to be run with valgrind
C++
apache-2.0
IntelRealSense/librealsense,IntelRealSense/librealsense,IntelRealSense/librealsense,IntelRealSense/librealsense,IntelRealSense/librealsense,IntelRealSense/librealsense,IntelRealSense/librealsense,IntelRealSense/librealsense,IntelRealSense/librealsense
480bc75403b2cf24ab9343f7a19c60961b1a9139
source/chip/STM32/STM32F7/STM32F7-lowLevelInitialization.cpp
source/chip/STM32/STM32F7/STM32F7-lowLevelInitialization.cpp
/** * \file * \brief chip::lowLevelInitialization() implementation for STM32F7 * * \author Copyright (C) 2017 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \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...
Add empty chip::lowLevelInitialization() for STM32F7
Add empty chip::lowLevelInitialization() for STM32F7
C++
mpl-2.0
CezaryGapinski/distortos,jasmin-j/distortos,jasmin-j/distortos,jasmin-j/distortos,DISTORTEC/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,jasmin-j/distortos,DISTORTEC/distortos,jasmin-j/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos
f139fc12ee9d6ce904283e18dee38490368ecd37
tests/test__copy_this_file_to_create_a_new_test.cpp
tests/test__copy_this_file_to_create_a_new_test.cpp
// Copyright © 2012 Lénaïc Bagnères, hnc@singularity.fr // 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 ...
Add test file template (to create a new test)
Add test file template (to create a new test)
C++
apache-2.0
seken/hnc
e79ba30cc69d15a9d410e5e0370577f3c4092414
tMinNumCoins.cpp
tMinNumCoins.cpp
#include <iostream> #include <vector> #include <limits> #include <algorithm> void print(std::vector<int> &solutions) { std::for_each(solutions.begin(), solutions.end(), [](auto item) { std::cout << item << " "; }); std::cout << "\n"; } class MinNumberOfCoints { public: int min(const int val) { std...
Add solution for the minimum number of coins problem.
Add solution for the minimum number of coins problem.
C++
bsd-2-clause
hungptit/algorithms
382c903669ac542ecadff56b5b96e945e09e0dc0
21_Merge_Two_Sorted_Lists.cpp
21_Merge_Two_Sorted_Lists.cpp
/** * link: https://leetcode.com/problems/merge-two-sorted-lists/ * Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next...
Add solution for 21. Merge Two Sorted Lists.
Add solution for 21. Merge Two Sorted Lists.
C++
mit
wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode
8ac585e1784a656dfa66608a2cd3114f90b88979
event_test.cc
event_test.cc
#include "wtf/event.h" #include <fstream> #include "testing/base/public/gunit.h" namespace wtf { namespace { class EventTest : public ::testing::Test { protected: void TearDown() override {} EventDefinition CreateEventDefinition(const char *name_spec) { return EventDefinition::Create<int, const char*>( ...
Add test for event.cc changes to name_spec parsing
Add test for event.cc changes to name_spec parsing
C++
bsd-3-clause
google/tracing-framework,google/tracing-framework,google/tracing-framework,google/tracing-framework
91c475757be55ddd2948197478cff7c4335efdf0
test/Modules/merge-anon-in-extern_c.cpp
test/Modules/merge-anon-in-extern_c.cpp
// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -verify %s // expected-no-diagnostics #pragma clang module build sys_types module sys_types {} #pragma clang module contents #pragma clang module begin sys_types extern "C" { typedef union { bool b; } pthread_mutex_t; } #pragma clang module end #...
Add a regression test for merging anon decls in extern C contexts.
[modules] Add a regression test for merging anon decls in extern C contexts. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@316444 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl...
83793710c281ede8de78855a32cbc9890ab5345e
1-common-tasks/memory-management/shared-ownership.cpp
1-common-tasks/memory-management/shared-ownership.cpp
// Shared ownership #include <memory> #include <utility> struct foo {}; void func(std::shared_ptr<foo> obj) { } int main() { std::shared_ptr<foo> obj = std::make_shared<foo>(); pass_shared_ownership(obj); } // Share ownership of a dynamically allocated object with another // unit of code. // // On [13], we crea...
// Shared ownership #include <memory> #include <utility> struct foo {}; void func(std::shared_ptr<foo> obj) { } int main() { std::shared_ptr<foo> obj = std::make_shared<foo>(); func(obj); } // Share ownership of a dynamically allocated object with another // unit of code. // // On [13], we create a [`std::share...
Correct shared ownership sample code
Correct shared ownership sample code
C++
cc0-1.0
tmwoz/CppSamples-Samples,vjacquet/CppSamples-Samples,sftrabbit/CppSamples-Samples,darongE/CppSamples-Samples,rollbear/CppSamples-Samples,brunotag/CppSamples-Samples,mnpk/CppSamples-Samples,thatbrod/CppSamples-Samples
01ab7e2b81c1f9f7f702482345934704093a1c7a
C++/003_Longest_Substring_Without_Repeating_Characters.cpp
C++/003_Longest_Substring_Without_Repeating_Characters.cpp
// 3. Longest Substring Without Repeating Characters /** * Given a string, find the length of the longest substring without repeating characters. * For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. * For "bbbbb" the longest substring is "b", with the lengt...
Add Solution for Problem 003
Add Solution for Problem 003
C++
mit
bssrdf/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res
afa6b5b9eb4a91be5f67aecb4f769d9e3d8b698f
f80789_8b.cpp
f80789_8b.cpp
#include <cstdio> #include <vector> using namespace std; const int N = 1 << 10; vector <int> graph[N]; bool visited[N]; int m; void input() { scanf("%d\n", &m); for (int i = 0; i < m; i++) { int u, v; scanf("%d%d", &u, &v); graph[u].push_back(v); } } void dfs(int u) { visited[u] = 1; printf...
Add a solution for task 8b
Add a solution for task 8b
C++
mit
ralcho/AdvancedProgrammingNBU
dd3dc3c5513772c252aa36e2f26408be929976be
1-common-tasks/time/fixed-time-step.cpp
1-common-tasks/time/fixed-time-step.cpp
// Fixed time step // C++11, C++14 #include <chrono> #include <thread> using namespace std::literals::chrono_literals; void some_complex_work(); int main() { using clock = std::chrono::steady_clock; clock::time_point next_time_point = clock::now() + 5s; some_complex_work(); std::this_thread::sleep_until(next_...
Add fixed time step sample
Add fixed time step sample
C++
cc0-1.0
vjacquet/CppSamples-Samples,sftrabbit/CppSamples-Samples,thatbrod/CppSamples-Samples
278beddd88c0744949eab2e8f66e9efb83d1d70f
thread_function_pointer.cpp
thread_function_pointer.cpp
#include <iostream> #include <vector> #include <thread> #include <algorithm> #include <cstdlib> void accumulator_function2(const std::vector<int> &v, unsigned long long &acm, unsigned int beginIndex, unsigned int endIndex) { acm = 0; for (unsigned int i = beginIndex; i < endIndex; ++i) { acm += v[i]; ...
Add c++11 thread creation with function pointer. It generates random vector of 1024 integers and creates two threads to summarize bottom and top half respectfully.
Add c++11 thread creation with function pointer. It generates random vector of 1024 integers and creates two threads to summarize bottom and top half respectfully. Compile with: g++ -std=c++11 thread_function_pointer.cpp -o thread_function_pointer -lpthread
C++
apache-2.0
tisma/ctorious,tisma/ctorious
06811351fe889cd1cfb7c9fb6fa4c4477efb235d
linear.cpp
linear.cpp
#include "Software/NeuralNet.h" #include "Software/Backpropagation.h" #include <iostream> /* This is example code which runs a Backpropagating neural network. It is supposed to double any input number. This is the example code from the readme of https://github.com/FidoProject/Fido To compile, run in terminal: fc...
Put example code in repo
Put example code in repo
C++
mit
FlyingGraysons/Fido,patrickelectric/Fido,patrickelectric/Fido,FlyingGraysons/Fido,FidoProject/Fido,njk345/Fido,patrickelectric/Fido,njk345/Fido,FidoProject/Fido,FidoProject/Fido,FlyingGraysons/Fido
cbbc9df143287e5fd85063822aa2c570ed8df9d5
gm/textblobblockreordering.cpp
gm/textblobblockreordering.cpp
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm.h" #include "SkCanvas.h" #include "SkTextBlob.h" namespace skiagm { class TextBlobBlockReordering : public GM { public: // This gm tests that textblobs tran...
Create new GM to target translations problems in GrAtlasTextContext
Create new GM to target translations problems in GrAtlasTextContext BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1721833005 Review URL: https://codereview.chromium.org/1721833005
C++
apache-2.0
qrealka/skia-hc,rubenvb/skia,qrealka/skia-hc,google/skia,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,tmpvar/skia.cc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,...
9ab90be6d42d75117972eff195edb7a4c9a03d2c
tests/check-bptree-set.cpp
tests/check-bptree-set.cpp
/* * Copyright (c) 2021-2022-2022, Patrick Pelissier * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * + Redistributions of source code must retain the above copyright * notice, this list of...
Add check of B+Tree / Set
Add check of B+Tree / Set
C++
bsd-2-clause
P-p-H-d/mlib,P-p-H-d/mlib
8911f0aa015c4d06e578d07e16eda56a857b77d2
C++/034_Search_for_a_Range.cpp
C++/034_Search_for_a_Range.cpp
// 034. Search for a Range /** * Given a sorted array of integers, find the starting and ending position of a given target value. * * Your algorithm's runtime complexity must be in the order of O(log n). * * If the target is not found in the array, return [-1, -1]. * * For example, * Given [5, 7, 7, 8, 8, 10] a...
Add Solution for Problem 034
Add Solution for Problem 034
C++
mit
FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res
7fd280c11be9da2eda91c74c099dde0613f52603
C++/124_Binary_Tree_Maximum_Path_Sum.cpp
C++/124_Binary_Tree_Maximum_Path_Sum.cpp
// 124. Binary Tree Maximum Path Sum /** * Given a binary tree, find the maximum path sum. * * For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The path does not need to go through the root. * * For example: * Given th...
Add Solution for Problem 124
Add Solution for Problem 124
C++
mit
FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res
bb5d72e764db703a5b6b0510ab41b8572b34c8b4
interpreter/cling/lib/Interpreter/RuntimeExceptions.cpp
interpreter/cling/lib/Interpreter/RuntimeExceptions.cpp
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Baozeng Ding <sploving1@gmail.com> // author: Vassil Vassilev <vasil.georgiev.vasilev@cern.ch> //------------------------------------------------------------------...
Add forgotten to commit file.
Add forgotten to commit file.
C++
lgpl-2.1
simonpf/root,mhuwiler/rootauto,karies/root,CristinaCristescu/root,gbitzes/root,dfunke/root,agarciamontoro/root,omazapa/root-old,sawenzel/root,mhuwiler/rootauto,zzxuanyuan/root,dfunke/root,krafczyk/root,thomaskeck/root,esakellari/root,arch1tect0r/root,BerserkerTroll/root,Y--/root,olifre/root,mattkretz/root,veprbl/root,k...
6a6fd155fec14f0e59c13f985a10c107e105389e
Algorithms/DP/longest_common_subsequence_length.cpp
Algorithms/DP/longest_common_subsequence_length.cpp
/** * Longest Common Subsequence: * Given two strings, find longest common subsequence between them. * https://www.youtube.com/watch?v=NnD96abizww&index=2&list=PLrmLmBdmIlpsHaNTPP_jHHDx_os9ItYXr */ #include <iostream> using namespace std; void print(unsigned int **T, int M, int N) { for (int i = 0; i <= M; i++...
Implement longest common subsequence length
Implement longest common subsequence length Signed-off-by: WajahatSiddiqui <3c3ea4adfdf19decee174766aef6add34b32b7f0@gmail.com>
C++
apache-2.0
WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace
08596f12bd48f1dd2d4958eed84cbb8c4d275e5d
chrome/browser/ui/crypto_module_password_dialog_openssl.cc
chrome/browser/ui/crypto_module_password_dialog_openssl.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/crypto_module_password_dialog.h" #include "base/logging.h" namespace chrome { void UnlockSlotsIfNecessary(const net::Cr...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/crypto_module_password_dialog.h" #include "base/logging.h" namespace chrome { void UnlockSlotsIfNecessary(const net::Cr...
Fix the linux redux build.
Fix the linux redux build. Broken at https://codereview.chromium.org/71013002 which modified crypto_module_password_dialog.h and crypto_module_password_dialog_nss.cc but not crypto_module_password_dialog_openssl.cc BUG=None Review URL: https://codereview.chromium.org/75653008 git-svn-id: de016e52bd170d2d4f2344f9bf9...
C++
bsd-3-clause
jaruba/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,...
f19b9ad28ac7e734565c42d4b9b6d6a441ac6ba2
client/client-multi/client-cpp/test/impl/utils/KaaTimerTest.cpp
client/client-multi/client-cpp/test/impl/utils/KaaTimerTest.cpp
/* * Copyright 2014-2015 CyberVision, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
Add unit test for timer implementation.
KAA-533: Add unit test for timer implementation.
C++
apache-2.0
kallelzied/kaa,Deepnekroz/kaa,sashadidukh/kaa,abohomol/kaa,Dubland/kaa,liuhu/Kaa,Oleh-Kravchenko/kaa,aglne/kaa,forGGe/kaa,Deepnekroz/kaa,forGGe/kaa,vtkhir/kaa,liuhu/Kaa,sashadidukh/kaa,vtkhir/kaa,forGGe/kaa,rasendubi/kaa,abohomol/kaa,aglne/kaa,aglne/kaa,Deepnekroz/kaa,sashadidukh/kaa,Deepnekroz/kaa,zofuthan/kaa,aglne/k...
fae68a5c1280df5b8808200eb366ceaa6a0dca14
src/cell_center.cpp
src/cell_center.cpp
#include <Rcpp.h> #include "s2/s2latlng.h" #include "s2/s2cellid.h" //' @title //' cell_center //' @description //' Get center of S2 cell containing a specified point //' //' @param lat latitude of interest (between -90 and +90) //' //' @param lng longitude of interest (between -180 and +180) //' //' @details //' \...
Add missing C++ source file.
Add missing C++ source file.
C++
apache-2.0
spatstat/s2,spatstat/s2,spatstat/s2,spatstat/s2
9185511590542db408c42d13df49a5b7c5e8d2d1
test/error/bad_fold.cpp
test/error/bad_fold.cpp
#include <stdio.h> #include "Halide.h" using namespace Halide; int main(int argc, char **argv) { Var x, y, c; Func f, g; f(x, y) = x; g(x, y) = f(x-1, y+1) + f(x, y-1); f.store_root().compute_at(g, y).fold_storage(y, 2); Image<int> im = g.realize(100, 1000); printf("Should have gotten ...
Add test for a bad fold.
Add test for a bad fold.
C++
mit
kgnk/Halide,jiawen/Halide,kgnk/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,jiawen/Halide,kgnk/Halide,psuriana/Halide,ronen/Halide,ronen/Halide,psuriana/Halide,kgnk/Halide,ronen/Halide,ronen/Halide,ronen/Halide,jiawen/Halide,jiawen/Halide,psuriana/Halide,psuriana/Halide,ronen/Halide,jiawen/Halide,jiawen/Halide,kgnk/H...
1cbf8d59d47ab000917f0bbfb1164a7ef8f04c1f
chapter25/chapter25_trythis3.cpp
chapter25/chapter25_trythis3.cpp
// Chapter 25, Try This 3: get bits example to work, try a few values #include<iostream> #include<iomanip> #include<bitset> using namespace std; int main() { int i; while (cin>>i) cout << dec << i << " == " << hex << "0x" << setw(8) << setfill('0') << i << " == " << bitset<8*sizeof(in...
Add Chapter 25, Try This 3
Add Chapter 25, Try This 3
C++
mit
bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp
0861d7f2d6e58257006753f80c6bdf98c6910db6
chrome/browser/extensions/api/debugger/debugger_apitest.cc
chrome/browser/extensions/api/debugger/debugger_apitest.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" // Debugger is fla...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" // Debugger is fla...
Disable flaky ExtensionApiTest.Debugger on Linux and Chrome OS.
Disable flaky ExtensionApiTest.Debugger on Linux and Chrome OS. BUG=380082 TBR=kaznacheev R=kaznacheev NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/314643003 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@274451 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
ltilve/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,dednal/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/...
7698dbabe0335104355fe6616e1de1b2a0432d30
others/DesignPattern/FactoryPattern/factory_method.cc
others/DesignPattern/FactoryPattern/factory_method.cc
#include <stdio.h> #include <string> class Shape { public: virtual void draw() = 0; }; class Rectangle : public Shape { public: void draw() override { printf("Drawing Rectangle \n"); } }; class Square : public Shape { public: void draw() override { printf("Drawing Square \n"); } }; class Circle : public Sh...
Add Factory method design pattern.
Add Factory method design pattern.
C++
apache-2.0
pshiremath/practice,pshiremath/practice
64aef477607720355ddb37c1643cdd6ccbb1a3f1
Leetcode2/026.cpp
Leetcode2/026.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { int nlen = 1, n = nums.size();; if(n <= 1) return n; for(int i=1; i < nums.size();i++){ if(nums[i] != nums[i-1]){ nums[nlen++] = nums[i]; } } return nlen; } };
Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array
C++
mit
nolink/algorithm,nolink/algorithm
2ffdcbe8d570b14d16e54e5fe2638e25dd31df1e
graphsearch/Bellman_Ford_algorithm/cpp/Bellman_Ford_algorithm.cpp
graphsearch/Bellman_Ford_algorithm/cpp/Bellman_Ford_algorithm.cpp
// // main.cpp // backToProblemSolving // // Created by Khaled Abdelfattah on 6/27/17. // Copyright © 2017 Khaled Abdelfattah. All rights reserved. // #include <bits/stdc++.h> using namespace std; typedef long long ll; #define MAX 1000000000 #define BASE1 23 #define BASE2 31 #define MOD1 1000000007 #define MOD2 ...
Add Bellman Ford Algorithm to graph search in c++
Add Bellman Ford Algorithm to graph search in c++
C++
cc0-1.0
Cnidarias/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,manikTharaka/al-go-rithms,manikTharaka/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rit...
05ac9b1d38622bceda9e623635ef57b050da236a
Tree/binary_search_tree/c++/merge_two_binary_search_tree.cpp
Tree/binary_search_tree/c++/merge_two_binary_search_tree.cpp
#include <iostream> using namespace std; /* This represents the structure of the node of the Binary Search Tree. */ struct node { node * left; node * right; int data; }; /* This function adds new data into binary search tree (BST). It takes root of the tree as parameter along with the new data to be ...
Add merging of two Binary Search Trees
Add merging of two Binary Search Trees
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...
dfe96ac74db1a621494895a42b9c03da12dd9cbc
src/ec/ec_gen.cpp
src/ec/ec_gen.cpp
#include "ec_gen.h" Handle<ScopedEVP_PKEY> EC_generate(int &nidEc) { LOG_FUNC(); Handle<ScopedEVP_PKEY> pkey; ScopedEC_KEY eckey(EC_KEY_new_by_curve_name(nidEc)); if (eckey.isEmpty()) { THROW_OPENSSL("EC_KEY_new_by_curve_name"); } if (!EC_KEY_generate_key(eckey.Get())) { THROW_OPENSSL("EC_KEY...
#include "ec_gen.h" Handle<ScopedEVP_PKEY> EC_generate(int &nidEc) { LOG_FUNC(); Handle<ScopedEVP_PKEY> pkey; ScopedEC_KEY eckey(EC_KEY_new_by_curve_name(nidEc)); if (eckey.isEmpty()) { THROW_OPENSSL("EC_KEY_new_by_curve_name"); } if (!EC_KEY_generate_key(eckey.Get())) { THROW_OPENSSL("EC_KEY...
Support CHROME like format for pkcs8, spki EC keys
Support CHROME like format for pkcs8, spki EC keys
C++
mit
PeculiarVentures/node-webcrypto-ossl,PeculiarVentures/node-webcrypto-ossl,PeculiarVentures/node-webcrypto-ossl,PeculiarVentures/node-webcrypto-ossl,surespot/node-webcrypto-ossl,surespot/node-webcrypto-ossl,surespot/node-webcrypto-ossl,surespot/node-webcrypto-ossl,surespot/node-webcrypto-ossl,PeculiarVentures/node-webcr...
dd6e3529b6c1f0585a8dd024b7a3d2136f53e78e
string/2124.cc
string/2124.cc
class Solution { public: bool checkString(string s) { bool b_found = false; for (const auto& c : s) { if (c == 'a' && b_found) return false; if (c == 'b') b_found = true; } return true; } };
Check if All A's Appears Before All B's
Check if All A's Appears Before All B's
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode