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
f1418a86c029f7cadc54feb8c488e30860e9e9a2
cpp/007_Reverse_Integer.cpp
cpp/007_Reverse_Integer.cpp
// 7. Reverse Integer /** * Reverse digits of an integer. * * Example1: x = 123, return 321 * Example2: x = -123, return -321 * * Have you thought about this? * Here are some good questions to ask before coding. Bonus points for you if you have already thought through this! * * If the integer's last digit i...
Add Solution for 7 Reverse Integer
Add Solution for 7 Reverse Integer
C++
mit
kuangami/LeetCode,kuangami/LeetCode,kuangami/LeetCode
22f4dcb57482c96d4350b4cda945dbc166bfe9f2
1-common-tasks/random/roll-a-die.cpp
1-common-tasks/random/roll-a-die.cpp
// Roll a die #include <random> int main() { std::random_device random_device; std::mt19937 random_engine{random_device()}; std::uniform_int_distribution<int> die_distribution{1, 6}; int die_roll = die_distribution(random_engine); } // Generate a random integer according to a uniform distribution. // // The [...
Add "roll a die" sample
Add "roll a die" sample
C++
cc0-1.0
tmwoz/CppSamples-Samples,vjacquet/CppSamples-Samples,thatbrod/CppSamples-Samples,darongE/CppSamples-Samples,brunotag/CppSamples-Samples,sftrabbit/CppSamples-Samples,mnpk/CppSamples-Samples,rollbear/CppSamples-Samples
bf98ff3c20bb9fc8dcf029207f512bd9e5fc8362
misc/GetCh.cc
misc/GetCh.cc
#include <conio.h> #include <ctype.h> #include <stdio.h> int main() { printf("\nPress any keys -- Ctrl-D exits\n\n"); while (true) { const int ch = getch(); printf("0x%x", ch); if (isgraph(ch)) { printf(" '%c'", ch); } printf("\n"); if (ch == 0x4) { ...
Add a test program that dumps console input via _getch.
Add a test program that dumps console input via _getch.
C++
mit
rprichard/winpty,rprichard/winpty,rprichard/winpty,rprichard/winpty
7a5314d87f2c3c2312e67ed2dd27a2726e605d22
tSum.cpp
tSum.cpp
#include <algorithm> #include <iostream> #include <list> #include <vector> #include "gtest/gtest.h" template <typename InputIterator, typename OutputIterator> auto addCarry(InputIterator begin, InputIterator end, OutputIterator obegin, const bool carryBit) { auto oit = obegin; bool carryFlag = carryBit; f...
Add a template function which can calculate the sum of two numbers.
Add a template function which can calculate the sum of two numbers.
C++
bsd-2-clause
hungptit/algorithms
7b39f6c4cd46b8c2c966fa0aab8977a418378829
189_Rotate_Array.cpp
189_Rotate_Array.cpp
/** * link: https://leetcode.com/problems/rotate-array/ */ class Solution { public: void rotate(vector<int>& nums, int k) { if(k <= 0) return; if(k >= nums.size()) k = k % nums.size(); vector<int> tmp(nums); tmp.insert(tmp.end(), nums.b...
Add solution for 189. Rotate Array.
Add solution for 189. Rotate Array.
C++
mit
wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode
b78b2a825572ac1375af1e0b854718c753416b37
1-common-tasks/input-streams/validate-multiple-reads.cpp
1-common-tasks/input-streams/validate-multiple-reads.cpp
// Validate multiple reads #include <sstream> #include <string> int main() { std::istringstream stream{"John Smith 32"}; std::string first_name; std::string family_name; int age; if (stream >> first_name && stream >> family_name && stream >> age) { // Use values } } // Validate reading multiple v...
Add "validate multiple reads" sample
Add "validate multiple reads" sample
C++
cc0-1.0
sftrabbit/CppSamples-Samples,rollbear/CppSamples-Samples,vjacquet/CppSamples-Samples,darongE/CppSamples-Samples,mnpk/CppSamples-Samples,brunotag/CppSamples-Samples,thatbrod/CppSamples-Samples,tmwoz/CppSamples-Samples
9a2cc767b08088ba1e46c7df2244ea43dd659f06
source/aufgabe2bis4.cpp
source/aufgabe2bis4.cpp
# include <cstdlib> // std :: rand () # include <vector> // std :: vector <> # include <list> // std :: list <> # include <iostream> // std :: cout # include <iterator> // std :: ostream_iterator <> # include <algorithm> // std :: reverse , std :: generate int main () { std::list <unsigned int> l1(100); for (auto& ...
Add 3.2 Vector and List
Add 3.2 Vector and List
C++
mit
Graunarmin/programmiersprachen-aufgabenblatt-3
9978e7597edac596a63d3cf9b8485c1a8ee06dfa
examples/sync_folder_items.cpp
examples/sync_folder_items.cpp
// Copyright 2018 otris software AG // // 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 l...
Add example for SyncFolderItems operation
Add example for SyncFolderItems operation
C++
apache-2.0
otris/ews-cpp,otris/ews-cpp,m-Schlitzer/ews-cpp,bkircher/ews-cpp,bkircher/ews-cpp,m-Schlitzer/ews-cpp,m-Schlitzer/ews-cpp,otris/ews-cpp,bkircher/ews-cpp,otris/ews-cpp
89b35f18ea2fa8ad6844c61f220269686e02d817
data_structures/binary_tree.cc
data_structures/binary_tree.cc
// Copyright 2015 David Gasquez #include <cstdio> struct Node { int data; Node *left; Node *right; Node(int data): data(data), left(nullptr), right(nullptr) {} }; void print_tree_post_order(Node *tree) { if (tree->left != nullptr) { print_tree_post_order(tree->left); } if (tree->right != nullptr) {...
Add a simple binary tree code
Add a simple binary tree code
C++
unlicense
davidgasquez/tip
843cb6cc611f8cf14e611042a8118f017352c0d5
test16_51.cpp
test16_51.cpp
#include <iostream> #include <string> using namespace std; template <typename T, typename... Args> void foo(const T &t, const Args& ... rest) { cout << sizeof...(Args) << endl; cout << sizeof...(rest) << endl; } int main() { int i = 0; double d = 3.14; string s = "how now brown cow"...
Add solution for chapter 16 test 51
Add solution for chapter 16 test 51
C++
apache-2.0
chenshiyang/CPP--Primer-5ed-solution
07a801098fba8ceb4feb6fbaa911b5c67d65b604
src/testHorizon.cpp
src/testHorizon.cpp
#include "testHooks.h" #include "filter/OrientationEngine.h" #include "util/PIDcontroller.h" #include "util/PIDparameters.h" #include "filter/RCFilter.h" #include "output/Horizon.h" //TESTING "math/Vec3.cpp" //TESTING "math/Quaternion.cpp" //TESTING "math/GreatCircle.cpp" //TESTING "math/SpatialMath.cpp" PIDparameter...
Test and benchmark Horizon attitude controller
Test and benchmark Horizon attitude controller
C++
apache-2.0
MINDS-i/Drone-Tests,MINDS-i/Drone-Tests,MINDS-i/Drone-Tests
078bb13ce62d8043cd9060bb89f3f4f6307fb9a4
vulgarnet.cpp
vulgarnet.cpp
#include <mlpack/core.hpp> #include <mlpack/methods/ann/ffnn.hpp> using namespace mlpack; using namespace arma; using namespace std; PARAM_STRING_REQ("input_file", "Corpus of text to learn on.", "i"); PARAM_INT("history", "Length of history to cache.", "H", 3); int main(int argc, char** argv) { CLI::ParseCommandLi...
Load a corpus and get it into a nicer format.
Load a corpus and get it into a nicer format.
C++
bsd-3-clause
rcurtin/vulgarnet
7923e7c0ef8030bd3e24df09c75dd769faba0eb2
syzygy/pe/transforms/coff_convert_legacy_code_references_transform_unittest.cc
syzygy/pe/transforms/coff_convert_legacy_code_references_transform_unittest.cc
// Copyright 2014 Google Inc. 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...
Add missing unittest file from r1986.
Add missing unittest file from r1986. BUG= TBR=etienneb@chromium.org Review URL: https://codereview.appspot.com/50100043 git-svn-id: db59699583a60be9a535cd09cdc9132301867226@1987 15e8cca8-e42c-11de-a347-f34a4f72eb7d
C++
apache-2.0
supriyantomaftuh/syzygy,Eloston/syzygy,wangming28/syzygy,supriyantomaftuh/syzygy,wangming28/syzygy,sebmarchand/syzygy,google/syzygy,ericmckean/syzygy,sebmarchand/syzygy,pombreda/syzygy,sebmarchand/syzygy,supriyantomaftuh/syzygy,google/syzygy,wangming28/syzygy,google/syzygy,wangming28/syzygy,pombreda/syzygy,ericmckean/s...
5093ad80e898ff3bc636fb39ac96e41dbd309289
Parameters.cpp
Parameters.cpp
#include "EM_Classes.h" Transitions::Transitions(const Model &model): N(model.N), Nm(model.Nm){ F.setZero(Nm, Nm); } // updateF needs the smooth probabilities void updateF(const MatrixXd & Xtt, const MatrixXd & Xt1t, const MatrixXd & XiS, const int &T, const int & N){ for(unsigned int j = 0; j <= parSelect.N - ...
Add update algorithm to transition probabilities
Add update algorithm to transition probabilities
C++
mit
anfego22/MS-EM
77b340a6757b4b1c7f2886bcb9a519399dcf1521
Graphs/dfs.cpp
Graphs/dfs.cpp
#include <iostream> #include <vector> #include <stack> #include <string> using namespace std; typedef struct node { string val; bool visited = false; vector < node > neighbors ; } node; typedef vector < node > list_nodes; inline void dfs(node start){ stack<node> s; s.push(start); while(...
Add Module for storing the graph's algorithms and create a first version of Depth first search
Add Module for storing the graph's algorithms and create a first version of Depth first search
C++
mit
xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book
ae58d7f5252a90fd1116d113b5933ba9f028bed8
tree/538.cc
tree/538.cc
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
Convert BST to Greater Tree
Convert BST to Greater Tree
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
22e5a23311dc90bc47558e24f41da8969a6902d8
lib/CodeGen/StatepointExampleGC.cpp
lib/CodeGen/StatepointExampleGC.cpp
//===-- StatepointDefaultGC.cpp - The default statepoint GC strategy ------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Add a missing file from 225365
Add a missing file from 225365 git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@225366 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/s...
7e545d95bc92157f9f124d95aa2ed66d691d2028
test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify void test_nonaggregate(int i) { auto lambda = [i]() -> void {}; // expected-error{{lambda expressions are not supported yet}} \ // expected-note 3{{candidate constructor}} decltype(lambda) foo = { 1 }; // expected-error{{no matching constructor}} }
Add a test for the non-aggregaticity of lambda types per C++11 [expr.prim.lambda].
Add a test for the non-aggregaticity of lambda types per C++11 [expr.prim.lambda]. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@150164 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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
5ebdde8a86202cd0e0999848e0e920f72f0d26a5
chapter21/chapter21_ex03.cpp
chapter21/chapter21_ex03.cpp
// Chapter 21, Exercise 3: implement count() yourself and test it #include "../lib_files/std_lib_facilities.h" //------------------------------------------------------------------------------ template<class In, class T> int my_count(In first, In last, const T& val) { int ctr = 0; while (first !=last;) { ...
Add Chapter 21, exercise 3
Add Chapter 21, exercise 3
C++
mit
bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp
59c5cb01164937ecd52a3e74307614212d1c690f
test/libcxx/libcpp_version.pass.cpp
test/libcxx/libcpp_version.pass.cpp
// -*- C++ -*- //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===-------------------------...
Add test that _LIBCPP_VERSION matches __libcpp_version
Add test that _LIBCPP_VERSION matches __libcpp_version git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@290445 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
cfaf1aa6e35cad7abba90421c51897140fbd965c
test/correctness/specialize_to_gpu.cpp
test/correctness/specialize_to_gpu.cpp
#include <Halide.h> #include <stdio.h> using namespace Halide; int main(int argc, char **argv) { if (!get_jit_target_from_environment().has_gpu_feature()) { printf("Not running test because no gpu feature enabled in target.\n"); return 0; } // A sequence of stages which may or may not run...
Add test where specialization may place stages on the gpu
Add test where specialization may place stages on the gpu Former-commit-id: 7491333af6d74847eb5298fee58e48d4a4ca616f
C++
mit
Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide
68171035d51b7c0c8c35c46080e3a8ec7dba2f06
19.cpp
19.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { stack<ListNode*> s; s.push(head); ListNode* ret=head; ...
Remove Nth Node From End of List
Remove Nth Node From End of List
C++
mit
zfang399/LeetCode-Problems
d9ac0850cbef7ec851ff83ca2a16b70604a50290
string/1832.cc
string/1832.cc
class Solution { public: bool checkIfPangram(string sentence) { if (sentence.size() < 26) return false; std::vector<int> table(26, 0); for (const auto & c : sentence) { table[c-97] = 1; } return sum(table) == 26; } private: int sum(std::vector<...
Check if the Sentence Is Pangram
Check if the Sentence Is Pangram
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
e96ca76b91d7da68ca897860daa6713fcc5aad92
karum/stackLL.cpp
karum/stackLL.cpp
#include<iostream> #include<cstdlib> using namespace std; class Node{ public: int data; Node *next; Node(){} Node(int d){ data=d; next=NULL; } Node *push(Node *head, int data){ Node *np=new Node(data); Node *t=head; cout<<"Pushing "<<np->data<<"...\n"; if(head==NULL) return ...
Implement stack using linked list
Implement stack using linked list
C++
mit
shivan1b/codes
b664b9ee79b387725fbd08e0f9dd9e51fe3b8501
test/correctness/interleave_x.cpp
test/correctness/interleave_x.cpp
#include <stdio.h> #include "Halide.h" using namespace Halide; int main(int argc, char **argv) { //int W = 64*3, H = 64*3; const int W = 128, H = 48; Image<uint16_t> in(W, H, 2); for (int c = 0; c < 2; c++) { for (int y = 0; y < H; y++) { for (int x = 0; x < W; x++) { ...
Add test failing on hexagon.
Add test failing on hexagon. Former-commit-id: a91a9ce74fbc2b2bf486e561e5601ad438b047a9
C++
mit
Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide
ec7e844e12de1552269dc9222b46033943f781b2
tests/compiler/structreturn.cpp
tests/compiler/structreturn.cpp
// // Copyright 2013 Jeff Bush // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
Add struct return test (currently causes compiler assertion)
Add struct return test (currently causes compiler assertion)
C++
apache-2.0
FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziProcessor,hoangt/NyuziPr...
a6b24f5fa8e8688ab3138d3c0c68523e46530c65
217_contains_duplicate.cc
217_contains_duplicate.cc
// https://leetcode.com/problems/contains-duplicate/ // The naive version shown as version 1 could get time limit exceeded. Since the // problem is a query for the existance. It's easy to come up with a solution using // map. // Version 1 class Solution { public: bool containsDuplicate(vector<int>& nums) { ...
Add a solution for problem 217: Contains Duplicate.
Add a solution for problem 217: Contains Duplicate.
C++
apache-2.0
shen-yang/leetcode_solutions,shen-yang/leetcode_solutions,shen-yang/leetcode_solutions
ca9122276c585a5ae733b4d0c6b8d1f9f9db8a1c
uniq_lines.cpp
uniq_lines.cpp
//The purpose of this program is to get the number of uniq source phrases in the document //In order to use a smaller probing_hash_table #include "helpers/line_splitter.hh" #include "util/file_piece.hh" #include "util/file.hh" #include "util/usage.hh" #include <stdio.h> #include <fstream> #include <iostream> int ma...
Determine the number of unique lines.
Determine the number of unique lines.
C++
bsd-2-clause
XapaJIaMnu/ProbingPT,XapaJIaMnu/ProbingPT,XapaJIaMnu/ProbingPT,XapaJIaMnu/ProbingPT
b77327e29523ef011ac9d8c3f73526245efd15f0
tensorflow/core/util/xla_config_proxy.cc
tensorflow/core/util/xla_config_proxy.cc
/* Copyright 2019 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 2019 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 a typo in XlaConfigProxy.
Fix a typo in XlaConfigProxy.
C++
apache-2.0
yongtang/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,arborh/tensorflow,gautam1858/tensorflow,arborh/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,jhseu/tensorflow,aldian/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-experimental_l...
9a45c066895d1657371e565e48258d2ead85e4d6
chapter24/chapter24_trythis2.cpp
chapter24/chapter24_trythis2.cpp
// Chapter 24, Try This 2: run conversion test functions, modify f() to print // the variables #include<iostream> #include<iomanip> using std::cout; void f(int i, double fpd) { cout << std::setprecision(15); char c = i; cout << "c = i: " << int(c) << '\n'; short s = i; cout << "s = i: " << s << '...
Add Chapter 24, Try This 2
Add Chapter 24, Try This 2
C++
mit
bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp
f52d80d29cf83630bf3e00e239a311a09f084e9c
interview/corporations/OddNumberFirst.cpp
interview/corporations/OddNumberFirst.cpp
/* * Author: matthew6868(mxu.public@outlook.com) * Date: 2016-10-20 * Corporation: Zoom Video Communication, Inc, 软视(杭州)有限公司 */ void makeOddNumberFisrt(std::vector<int> &data) { //std::partition(v.begin(), v.end(), [v](int i) {return v[i] % 2 == 1; }); if (data.size() > 1) { int left = 0, right = data.size() -...
Add interview question odd number fist from Zoom Inc.
Add interview question odd number fist from Zoom Inc.
C++
apache-2.0
matthew6868/codeassets,matthew6868/codeassets,matthew6868/codeassets,matthew6868/codeassets,matthew6868/codeassets
ad7cb47eabe2a5f01e628385c1cc443f8f18b9ee
others/DS/BT/build_tree_from_traversal.cc
others/DS/BT/build_tree_from_traversal.cc
#include <stdio.h> typedef struct _NODE { int data; _NODE* left; _NODE* right; } NODE; void printInorder(NODE* root) { if (root) { printInorder(root->left); printf("%c ", root->data); printInorder(root->right); } } NODE* newNode(int data) { NODE* node = new NODE(); node->data = data; node...
Build the binary tree from Inorder and PreOdertraversal.
Build the binary tree from Inorder and PreOdertraversal.
C++
apache-2.0
pshiremath/practice,pshiremath/practice
89d973ff70da9b91e2a39ee6642422186d585b88
vector_test.cpp
vector_test.cpp
#include <iostream> #include "matrix/Vector" using namespace sipl; int main() { VectorXi v(3); v[0] = 1; v[1] = 2; v[2] = 3; std::cout << v << std::endl; }
Test driver for Vector class
Test driver for Vector class
C++
apache-2.0
get9/sipl
efabb3eb783c6b4091865040dd6d86adf7208510
code/cpp/bst.cpp
code/cpp/bst.cpp
#include <iostream> #include <set> #include <cassert> template <typename T> struct node { T data; node *left = nullptr, *right = nullptr; node(T data): data(data) {} }; template <typename T> class tree { node<T>* root = nullptr; public: bool contains(const T& data) { auto curr = root; ...
Write and test binary search tree in cpp
Write and test binary search tree in cpp
C++
mit
gharrma/MMASS,gharrma/MMASS
b077400682ec7e34ce26bdf2fcd3ccfa9ab5009b
C++/173_Binary_Search_Tree_Iterator.cpp
C++/173_Binary_Search_Tree_Iterator.cpp
// 173. Binary Search Tree Iterator /** * Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. * * Calling next() will return the next smallest number in the BST. * * Note: next() and hasNext() should run in average O(1) time and uses O(h) memory, ...
Add Solution for Problem 173
Add Solution for Problem 173
C++
mit
FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res
247fd9e4c39e4eec7f4246567d952ddd1b1d4a60
Math/Pow/fast_pow.cpp
Math/Pow/fast_pow.cpp
#include <bits/stdc++.h> using namespace std; ll modular_pow(ll base, int exponent, ll modulus){ ll result = 1; while (exponent > 0){ /* if y is odd, multiply base with result */ if (exponent & 1) result = (result * base) % modulus; /* exponent = exponent/2 */ exponent = exponent >> 1; /* base = base...
Add algorithm for modular pow.
Add algorithm for modular pow.
C++
mit
xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book
17159a0312352a0b89b68c21fd5b351de38cf557
src/RemoveDuplicatesfromSortedList.cpp
src/RemoveDuplicatesfromSortedList.cpp
//Given a sorted linked list, delete all duplicates such that each element appear only once. // //For example, //Given 1->1->2, return 1->2. //Given 1->1->2->3->3, return 1->2->3. #include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next...
Remove Duplicates from Sorted List
Remove Duplicates from Sorted List https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list/
C++
mit
lzz5235/leetcode
b21ed59190064808902601694d7ee3abc7a4e973
test/unit/serialization/xml_parser_trim.cpp
test/unit/serialization/xml_parser_trim.cpp
#include "catch.hpp" #include <mapnik/debug.hpp> #include <mapnik/xml_tree.hpp> #include <mapnik/xml_loader.hpp> TEST_CASE("xml parser") { SECTION("trims whitespace") { // simple and non-valid mapnik XML reduced from the empty_parameter2.xml // test case. this is to check that the xml parsing routine is t...
Add test for XML parser whitespace trimming behaviour.
Add test for XML parser whitespace trimming behaviour. This tests the at the XML parser trims whitespace from XML text nodes. This was already the behaviour of the libxml2 parser, but not the rapidxml parser. Note that this makes #2878 pass for the rapidxml parser as well as the libxml2 parser. It seems that Travis u...
C++
lgpl-2.1
mbrukman/mapnik,lightmare/mapnik,pnorman/mapnik,mapnik/mapnik,mbrukman/mapnik,naturalatlas/mapnik,zerebubuth/mapnik,pramsey/mapnik,Uli1/mapnik,mapnik/mapnik,mbrukman/mapnik,cjmayo/mapnik,lightmare/mapnik,CartoDB/mapnik,whuaegeanse/mapnik,Uli1/mapnik,mapycz/mapnik,mapnik/mapnik,naturalatlas/mapnik,pramsey/mapnik,pramsey...
1944e0cba346909d3ad8012d76670646ffa19482
tensorflow/core/kernels/cwise_op_asin.cc
tensorflow/core/kernels/cwise_op_asin.cc
/* Copyright 2015 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 2015 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...
Add complex support for tf.math.asin
Add complex support for tf.math.asin This PR address the feature requested by 54317 in adding complex support for tf.math.asin. This PR fixes 54317. Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>
C++
apache-2.0
tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,yongtang/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,gautam1858/ten...
442b85beeb6ac8617889eef0cc28b99c6957dd1f
test/server_worker.cpp
test/server_worker.cpp
#include "gtest/gtest.h" #include "worker.h" #include "requests.pb.h" class TestMessageWorker : public traffic::MessageWorker { protected: bool set_up() { return true; } bool process_summary() { summary = true; return true; } bool process_statistics() { statistic = true; return true; } public: bool ...
Add simple test for message prototype
Add simple test for message prototype Signed-off-by: Jan Losinski <577c4104c61edf9f052c616c0c23e67bef4a9955@wh2.tu-dresden.de>
C++
bsd-3-clause
agdsn/traffic-service-server,agdsn/traffic-service-server
0626d1d4cd94b06510111cc43387310175a00fb6
snippets/struct_and_priority_queue.cpp
snippets/struct_and_priority_queue.cpp
#include <iostream> #include <queue> using namespace std; struct edge{ int to, weight; edge(){} edge(int _to, int _weight){ to = _to; weight = _weight; } bool operator < (edge e) const { return weight > e.weight; } }; typedef priority_queue<edge> pq; int main(){ ...
Add useful structure for combininig with more powerful structure.
Add useful structure for combininig with more powerful structure.
C++
mit
xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book
090fca56ebcc56086ba7a1797209204e2c15ab30
practicum/working-with-files/print-binary-file-bytes.cpp
practicum/working-with-files/print-binary-file-bytes.cpp
#include <iostream> #include <fstream> using std::ifstream; using std::ios; using std::cout; int main() { ifstream text_file("lines.txt", ios::binary); char buffer[100]; while (text_file.read(buffer, 100).gcount()) { for (int i = 0; i < text_file.gcount(); ++i) { cout << (int)buffer[i] << ' '; } ...
Add program which prints the bytes in a file as numbers in base-ten number system
Add program which prints the bytes in a file as numbers in base-ten number system
C++
mit
dimitaruzunov/data-structures-fmi-2016
15260b85dd044b1e9bd5812a44a3661a8926cb32
greedy/1657.cc
greedy/1657.cc
class Solution { public: bool closeStrings(string word1, string word2) { std::vector<int> v1(26, 0), v2(26, 0); std::unordered_set<char> s1, s2; for (const auto& c: word1) { v1[c-'a']++; s1.emplace(c); } for (const auto& c: word2) { v2[c-'a...
Determine if Two Strings Are Close
Determine if Two Strings Are Close
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
d87682ed3c3e5d748d13a5c4f1cbb267aa756b31
test/Analysis/misc-ps-region-store.cpp
test/Analysis/misc-ps-region-store.cpp
// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=regio...
Add failing test case for C++ static analysis.
Add failing test case for C++ static analysis. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@91578 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
318bb50037be0c48588f1e26d9f844496ec1c3ad
297_serialize_and_deserialize_binary_tree.cc
297_serialize_and_deserialize_binary_tree.cc
// https://leetcode.com/problems/serialize-and-deserialize-binary-tree/ // Use level order or preorder traversal to serialize since these two methods // saves parents before childs. It would be convenient to deserialize. /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode ...
Add a solution for problem 297: Serialize and Deserialize Binary Tree.
Add a solution for problem 297: Serialize and Deserialize Binary Tree.
C++
apache-2.0
shen-yang/leetcode_solutions,shen-yang/leetcode_solutions,shen-yang/leetcode_solutions
68e54bbdd29f09c88fe03d5840b6cbb2307eefb6
dp/max_continuous_product/max_product.cc
dp/max_continuous_product/max_product.cc
/* * ===================================================================================== * * Filename: max_product.cc * * Description: max product algorithms * * Version: 1.0 * Created: 02/05/2015 05:56:41 PM * Revision: none * Compiler: gcc * * Author: (...
Add maximum continuous product of sub array
Add maximum continuous product of sub array
C++
mit
norlanliu/algorithm
63f469a77d9ebd0bc680a5febd9f61145f516595
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
metajack/skia,mrobinson/skia,mrobinson/skia,metajack/skia,Cue/skia,mrobinson/skia,metajack/skia,mrobinson/skia,mrobinson/skia,Cue/skia,Cue/skia,Cue/skia,metajack/skia
f36529478f5fd899a97718b18412e0bfa54f8f30
test/warning/parallel_size_one.cpp
test/warning/parallel_size_one.cpp
#include <Halide.h> #include <stdio.h> using namespace Halide; int main(int argc, char **argv) { Func f; Var x, y; f(x, y) = x + y; f.bound(y, 0, 1); f.parallel(y); f.realize(10, 1); return 0; }
Add a test for the warning about parallel for loops of size one
Add a test for the warning about parallel for loops of size one Former-commit-id: c38732b7ff4d5b3bdfbbbd5cbc9175ab09d079fc
C++
mit
darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide
f7475f9b086f788f740cbe3158ca7e817d1d20e7
tests/unit/fem/test_pa_kernels.cpp
tests/unit/fem/test_pa_kernels.cpp
#include "mfem.hpp" #include "catch.hpp" #include <fstream> #include <iostream> using namespace mfem; namespace pa_kernels { template <typename INTEGRATOR> double test_vector_pa_integrator(int dim) { Mesh *mesh; if (dim == 2) { mesh = new Mesh(2, 2, Element::QUADRILATERAL, 0, 1.0, 1.0); } if (di...
Add consistency test for PA vector mass and diffusion
Add consistency test for PA vector mass and diffusion
C++
bsd-3-clause
mfem/mfem,mfem/mfem,mfem/mfem,mfem/mfem,mfem/mfem
70cdb060af47c46c27a621d675bf32e68a3955bc
Primes/primality_test.cpp
Primes/primality_test.cpp
#include <iostream> #include <math.h> using namespace std; typedef long long ll; bool is_prime(ll n){ if (n < 2) return false; if (n < 4) return true; if (n % 2 == 0 || n % 3 == 0) return false; if (n < 25) return true; for(int i = 5; i*i <= n; i += 6){ if(n % i == 0 || n % (i + 2) == 0) ...
Add algorithm primaly test .
Add algorithm primaly test .
C++
mit
xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book
f9c29e160c4919048ebb60fe548fbd3ce63a8a8d
test/containers/sequences/array/iterators.pass.cpp
test/containers/sequences/array/iterators.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. // //===----------------------------------------...
Implement tests for NULL iterators for <array> re: N3644
Implement tests for NULL iterators for <array> re: N3644 git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@187809 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
7afa86a1412cb392d85d918a45c3d4b7d4f1943c
test/test_rune.cpp
test/test_rune.cpp
#include <peelo/text/rune.hpp> #include <cassert> int main() { peelo::rune auml(0x00e4); assert(auml.equals(0x00e4)); assert(auml.equals_icase(0x00c4)); assert(auml.compare('a') > 0); assert(auml.compare(0x00e4) == 0); assert(auml.compare(0x00f6) < 0); assert(auml.compare_icase('A') > 0); assert(auml....
Add test case for rune class.
Add test case for rune class.
C++
bsd-2-clause
peelonet/peelocpp-text
35911ce76bed5fa64dcc368cbd81f6ec7b71aa75
test/CXX/temp/temp.names/p4.cpp
test/CXX/temp/temp.names/p4.cpp
// RUN: %clang_cc1 -fsyntax-only -verify %s struct meta { template<typename U> struct apply { typedef U* type; }; }; template<typename T, typename U> void f(typename T::template apply<U>::type); void test_f(int *ip) { f<meta, int>(ip); }
Add a test case for r95555.
Add a test case for r95555. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@95562 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-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-cl...
f63e1fc769133d9a831612ccb3a4dd85b377ac9e
string/1662.cc
string/1662.cc
class Solution { public: bool arrayStringsAreEqual(vector<string>& word1, vector<string>& word2) { std::string s1 = "", s2 = ""; for (const auto& word : word1) { s1 += word; } for (const auto& word : word2) { s2 += word; } return s1 == s2; ...
Check If Two String Arrays are Equivalent
Check If Two String Arrays are Equivalent
C++
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
15a188aad2bd1b7d6dfcdeaa1069608a2e598f70
cpp/lambda_return.cpp
cpp/lambda_return.cpp
#include <iostream> /** * Need to use 'auto' return type to return a lambda since we can't type it's * type. This is only possible in C++14 or later. */ auto func(void) { auto lmb = [](int x){ return x+1; }; return lmb; } int main(void) { auto lmb = func(); std::cout << "Lambda: " << lmb(1) << std::endl;...
Add c++ lambda return type test
Add c++ lambda return type test
C++
bsd-3-clause
dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps
984751e5a78835b76fc7f2a09d08161c75c1fc81
test/FrontendC++/2010-03-16-SinkStores.cpp
test/FrontendC++/2010-03-16-SinkStores.cpp
// RUN: %llvmgxx -S %s -o - | FileCheck %s #include <utility> typedef std::pair<int,int> P; // CHECK: @_ZZ1fvE1X {{.*}} undef P f() { static const P X = P(1,2); return X; }
Check that P is not zero initialized.
Check that P is not zero initialized. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98627 91177308-0d34-0410-b5e6-96231b3b80d8
C++
bsd-2-clause
chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/ll...
d21899a5cde289088efc92c1c8046df039ebef8d
karum/deleteNodeDLL.cpp
karum/deleteNodeDLL.cpp
#include<iostream> #include<cstdlib> using namespace std; class Node{ public: int data; Node *prev, *next; Node(){} Node(int d){ data=d; prev=NULL; next=NULL; } Node *insertNode(Node *head, int d){ Node *np=new Node(d); Node *t=head; if(head==NULL) return np; while(t->next!=NULL) t=t-...
Add code to delete node in doubly linked list
Add code to delete node in doubly linked list
C++
mit
shivan1b/codes
ff06e84c217d23338a4b60faa86103086f100ae3
winwebcheck.cpp
winwebcheck.cpp
#pragma once #include <Windows.h> #include <WinINet.h> #include <IOStream> #include <String> #pragma comment(lib, "WinINet.lib") std::string replaceAll(std::string subject, const std::string& search, const std::string& replace) { size_t pos = 0; while ((pos = subject.find(search, pos)) != std::string::np...
Rename to be more descriptive correction
Rename to be more descriptive correction
C++
bsd-2-clause
TimSC/rsa-license-key
2357dc6ddb03307ebe8287a8fd8a4ed21217e0cb
test/gtest_main.cpp
test/gtest_main.cpp
/* * gtest_main.cpp * * Created on: May 12, 2015 * Author: Vance Zuo */ #include "gmock/gmock.h" #include <stdio.h> int main(int argc, char **argv) { printf("Running main() from gtest_main.cpp\n"); testing::InitGoogleMock(&argc, argv); return RUN_ALL_TESTS(); }
Add google testing framework main
Add google testing framework main To run, requires gmock/gmock.h, gmock/gmock-gtest-all.cc, and gtest/gtest.h (obtainable from https://code.google.com/p/googlemock/).
C++
mit
vancezuo/sudoku-solver
10c2716bf452f334b1ed57e771518b66d1c51998
Algorithms/Sort_Algorithms/Shell_Sort/shell_sort.cpp
Algorithms/Sort_Algorithms/Shell_Sort/shell_sort.cpp
#include <iostream> using namespace std; // function to sort a using shellSort int shellSort(int a[],int n) { for(int shell=n/2;shell>0; shell/=2) { for(int i=shell;i<n;i++) { int tmp=a[i]; int j; for (j=i;(j>=shell) && (a[j-shell]>tmp); j-=shell) a[j]=a[j-shell]; a[j]=tmp; } } r...
Add shell sort in cpp
Add shell sort in cpp
C++
mit
salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook
179b44970eeb682ecb5eddce1ef402caba592b66
mshp/algo/geo/line_and_circle.cpp
mshp/algo/geo/line_and_circle.cpp
/* * Copyright (C) 2015-2016 Pavel Dolgov * * See the LICENSE file for terms of use. */ #include <bits/stdc++.h> typedef std::pair<double, double> DoublePair; typedef std::vector<DoublePair> DoublePairs; // circle int x, y, r; // line int A, B, C; bool pointOfLine(DoublePair point) { double factor = A * poi...
Add intersection of line and circle
Add intersection of line and circle
C++
mit
zer0main/problems,zer0main/problems,zer0main/problems
1b42f4a48447de14fcfab41b3133add0c662fe17
Leetcode2/109.cpp
Leetcode2/109.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), le...
Convert Sorted List to Binary Search Tree
Convert Sorted List to Binary Search Tree
C++
mit
nolink/algorithm,nolink/algorithm
c58933d7ef36d5a649e1245c996bd1e17a9f698b
examples/hello_then.cpp
examples/hello_then.cpp
#include <agency/agency.hpp> #include <iostream> #include <mutex> int main() { using namespace agency; std::cout << "Starting predecessor and continuation tasks asynchronously..." << std::endl; std::mutex mut; // asynchronously create 5 agents to greet us in a predecessor task std::future<void> predecesso...
Add an example program for bulk_then
Add an example program for bulk_then
C++
bsd-3-clause
egaburov/agency,egaburov/agency
f5e885edb248129103f485026518c26fef136cb4
das-test.cc
das-test.cc
// Test the DAS class. // Read attributes from one or more files, printing the resulting table to // stdout. If a file is named `-' read from stdin for that file. The option // `-d' causes new/delete run-time debugging to be turned on. // // jhrg 7/25/94 // $Log: das-test.cc,v $ // Revision 1.1 1994/08/02 18:08:38 ...
Test driver for DAS (and AttrTable) classes.
Test driver for DAS (and AttrTable) classes.
C++
lgpl-2.1
OPENDAP/libdap,OPENDAP/libdap4,OPENDAP/libdap4,OPENDAP/libdap4,OPENDAP/libdap,OPENDAP/libdap4,OPENDAP/libdap4,OPENDAP/libdap4,OPENDAP/libdap,OPENDAP/libdap
dc571e541032dec404a939c243062ba0f5852808
DataStructures/Graphs/is_bipartite.cpp
DataStructures/Graphs/is_bipartite.cpp
// http://www.geeksforgeeks.org/bipartite-graph/ #include<iostream> #include<queue> #define V 4 using namespace std; bool isBipartite(int Graph[][V], int src) { int color[V]; for (int i = 0; i < V; i++) color[i] = -1; color[src] = 1; queue<int> q; q.push(src); while (!q.empty()) { ...
Implement is bipartite for a given graph
Implement is bipartite for a given graph Signed-off-by: WajahatSiddiqui <3c3ea4adfdf19decee174766aef6add34b32b7f0@gmail.com>
C++
apache-2.0
WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace,WajahatSiddiqui/Workspace
0b44758786215a3f970a925705a06b1a77cf652a
test/math/test-sequence-integration-alphabet.cpp
test/math/test-sequence-integration-alphabet.cpp
/* Copyright 2015 Rogier van Dalen. This file is part of Rogier van Dalen's Mathematical tools library for C++. This library 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 (a...
Test integration of sequence and alphabet
Test integration of sequence and alphabet Ignore-this: d19eba6f3b80112fef83eb68eb3eae6d darcs-hash:20150123164458-fa073-9c85fae8c0d94177f4a4858c283d28f0021045c5
C++
apache-2.0
rogiervd/math,rogiervd/math
8a1ab1de12931a2fca63daca221b99c7935a8fcf
FindTheIncArrayWithTheLargestSumOfArray.cpp
FindTheIncArrayWithTheLargestSumOfArray.cpp
// Write a program to find the increasing array with the largest sum of array. #include <stdio.h> const int MIN = -2147483647; void importArray(int array[], int &length); void exportArray(int array[], int length); void exportArray(int array[], int length, int from, int to); void handleRequirement(int array[], int le...
Add problem: Write a program to find the increasing array with the largest sum of array.
Add problem: Write a program to find the increasing array with the largest sum of array.
C++
mit
vhnam/Basic,vhnam/Basic
13abd3bb083e4133aecc5d6ad0fbadab8abfe085
test/opengl/user_state_check.cpp
test/opengl/user_state_check.cpp
#include <csetjmp> #include <unistd.h> #if defined(__APPLE__) #include <OpenGL/gl.h> #else #include <GL/gl.h> #endif #include "Halide.h" #include "HalideRuntimeOpenGL.h" std::string error_message; /* ** Don't rely on func.set_error_handler() mechanism, it doesn't seem to catch ** the user OpenGL state errors. That ...
Add (failing) test that halide reports user error when called with OpenGL in bad state
Add (failing) test that halide reports user error when called with OpenGL in bad state
C++
mit
jiawen/Halide,kgnk/Halide,psuriana/Halide,ronen/Halide,ronen/Halide,ronen/Halide,jiawen/Halide,jiawen/Halide,ronen/Halide,jiawen/Halide,ronen/Halide,kgnk/Halide,ronen/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,kgnk/Halide,ronen/Halide,psuriana/Halide,kgnk/Halide,jiawen/Halide,psuriana/Halide,kgnk/Halide,jiawen/Hali...
8a45241f22838ebeffb7609e4ce633a6d0f36b5e
test19_1.cpp
test19_1.cpp
#include <iostream> #include <new> #include <cstdlib> using namespace std; void* operator new (size_t size) { cout << "operator new(" << size << ")" << endl; if(void *mem = malloc(size)) { return mem; } else { throw bad_alloc(); } } void operator delete(void *mem) noexc...
Add solution for chapter 19, test 1
Add solution for chapter 19, test 1
C++
apache-2.0
chenshiyang/CPP--Primer-5ed-solution
ba6bafb40116c3a63f0e971729157a9434bcce1a
AlgosDataStructs/test/t_stl_user_template.cc
AlgosDataStructs/test/t_stl_user_template.cc
#include <iostream> #include <vector> #include <list> template <template<class,class> class Container, class Object> class UDTContainer{ private: Container<Object,std::allocator<Object> > m_cointainer; public: }; int main(){ UDTContainer<std::vector,std::string> obj_udtc; }
Update gitignore and added a test class that accepts STL class as a template template argument
Update gitignore and added a test class that accepts STL class as a template template argument
C++
mit
phoenix1584/techquest1984,phoenix1584/techquest1984
5acbd4f727744848ebe6bdbc678943bef21c8c6e
practice04/05.cpp
practice04/05.cpp
#include <stdio.h> #include <stdlib.h> /* rand(), srand() */ #include <time.h> /* time() */ int count_one_came_out_when_throwing_dice(const int count) { int rc = 0; for(int i = 0; i < count; ++i) if(rand() % 6 + 1 == 1) ++rc; return rc; } int main(void) { srand(time(NULL)); const int ma...
Add solution of prob 5
Add solution of prob 5
C++
mit
kdzlvaids/problem_solving-pknu-2016,kdzlvaids/problem_solving-pknu-2016
d5d6778fb91d018cbd57456cae71289640ea8e66
test/CodeGenCXX/predefined-expr-sizeof.cpp
test/CodeGenCXX/predefined-expr-sizeof.cpp
// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s // CHECK: store i32 49, i32* %size // CHECK: store i32 52, i32* %size template<typename T> class TemplateClass { public: void templateClassFunction() { int size = sizeof(__PRETTY_FUNCTION__); } }; // CHECK: store i32 27, i32* %size // CHECK: store i32 30, i32...
Add test for dependent PredefinedExprs.
Add test for dependent PredefinedExprs. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@81550 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,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-cl...
c06e60ac82775902266c8e3305dd3efaa999de45
swap_without_auxillary.cpp
swap_without_auxillary.cpp
/* * Copyright 2010, NagaChaitanya Vellanki * * Author NagaChaitanya Vellanki * * Swapping two variables without auxillary */ #include <iostream> #include <inttypes.h> using namespace std; int main() { int32_t a = 10; int32_t b = 20; cout << "a is " << a << ",b is " << b << endl; a = a + b; b = a - b...
Add Swapping without a auxillary variable
Add Swapping without a auxillary variable
C++
isc
chaitanyav/fun_code,chaitanyav/fun_code
012e3afee26d06bd6f810d8bcefcdf8979985781
ModelData.cpp
ModelData.cpp
#include "EM_Classes.h" Model::Model(const int &N_, const int &lagsS_, const int &lagsY_, const bool &sigma_, const bool &beta_, const bool &meanCorrected): N(N_), lagsS(lagsS_), lagsY(lagsY_), sigma(sigma_), beta(beta_), meanCorrected(meanCorrected){} Model::Model(const int &N_ = 2, const int &lagsS_= 0, ...
Create constructors for classes Data and Model
Create constructors for classes Data and Model
C++
mit
anfego22/MS-EM
6cdd3dc2dca00b45940eb43840383cef5341aecc
solution237.cpp
solution237.cpp
/** * Delete Node in a Linked List * * cpselvis(cpselvis@gmail.com) * Oct 8th, 2016 */ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: void deleteNode(ListNode* node) { if (node != NULL) { node -> val = node -> next -> val; node ...
Delete Node in a Linked List.
Delete Node in a Linked List.
C++
mit
cpselvis/leetcode
669554782b0fc05974ed1a5857093fe25a99b919
others/DS/BT/convert_to_sum_tree.cc
others/DS/BT/convert_to_sum_tree.cc
#include <stdio.h> typedef struct _NODE { int data; _NODE* left; _NODE* right; } NODE; NODE* newNode(int data) { NODE* node = new NODE(); node->data = data; node->left = nullptr; node->right = nullptr; return node; } int toSumTree(NODE* root) { if (root == nullptr) return 0; int old_value = roo...
Convert the given tree for sum property.
Convert the given tree for sum property.
C++
apache-2.0
pshiremath/practice,pshiremath/practice
4e3010055f516cb1bf9d0e1306cdd8197b478757
cpp/155_Min_Stack.cpp
cpp/155_Min_Stack.cpp
// 155. Min Stack /** * Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. * * push(x) -- Push element x onto stack. * pop() -- Removes the element on top of the stack. * top() -- Get the top element. * getMin() -- Retrieve the minimum element in the stack. * * Ex...
Add Solution for 155 Min Stack
Add Solution for 155 Min Stack
C++
mit
kuangami/LeetCode,kuangami/LeetCode,kuangami/LeetCode
17cca59fe16c3571b657bb0908f171fd673127ad
countingsort4.cpp
countingsort4.cpp
#include <iostream> #include <string> #include <map> #include <list> using namespace std; typedef struct node { int num; string str; }c_node; int main() { int n; cin >> n; c_node *a = new c_node[n]; for (int i = 0; i < n; i++) { cin >> a[i].num >> a[i].str; } map< int, list<string> > int_list_map; for (int...
Add the solution to "The Full Counting Sort".
Add the solution to "The Full Counting Sort".
C++
mit
clasnake/hackerrank,clasnake/hackerrank
1fdda369d3b94dae227abda0a10522fb60647d35
test/FixIt/messages.cpp
test/FixIt/messages.cpp
// RUN: %clang_cc1 -fsyntax-only -std=c++11 2>&1 %s | FileCheck -strict-whitespace %s struct A { unsigned int a; }; // PR10696 void testOverlappingInsertions(int b) { A var = { b }; // CHECK: A var = { b }; // CHECK: ^ // CHECK: static_cast<unsigned int>( ) }
Add a test for r158229 (overlapping fixits). This was PR10696!
Add a test for r158229 (overlapping fixits). This was PR10696! git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@158238 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/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,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/cl...
2b4693b582cca6e37f79ca945e7f236eb3b951bf
C++/035_Search_Insert_Position.cpp
C++/035_Search_Insert_Position.cpp
// 035. Search Insert Position /** * Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. * * You may assume no duplicates in the array. * * Here are few examples. * [1,3,5,6], 5 -> 2 * [1,3,5,6], 2 -> 1 * [1...
Add Solution for Problem 035
Add Solution for Problem 035
C++
mit
FreeTymeKiyan/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res
d79e6a750a0ab87d6db18c1ecc4493223c57273a
tests/unit/operation/overlay/OverlayOpUnionTest.cpp
tests/unit/operation/overlay/OverlayOpUnionTest.cpp
// // Test Suite for geos::operation::OverlayOp class for UNION #include <tut.hpp> // geos #include <geos/operation/overlay/OverlayOp.h> #include <geos/geom/Geometry.h> #include <geos/geom/GeometryFactory.h> #include <geos/geom/PrecisionModel.h> #include <geos/io/WKBReader.h> #include <geos/io/WKTReader.h> // std #in...
Add basic test for geos::operation::OverlayOp with UNION.
Add basic test for geos::operation::OverlayOp with UNION. Test union of four segments (linestrings) of a suqare. git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@4153 5242fede-7e19-0410-aef8-94bd7d2200fb
C++
lgpl-2.1
libgeos/libgeos,rkanavath/libgeos,strk/libgeos,mwtoews/libgeos,gtourkas/libgeos,libgeos/libgeos,mwtoews/libgeos,gtourkas/libgeos,rkanavath/libgeos,gtourkas/libgeos,mwtoews/libgeos,rkanavath/libgeos,mwtoews/libgeos,libgeos/libgeos,rkanavath/libgeos,gtourkas/libgeos,strk/libgeos,mwtoews/libgeos,mwtoews/libgeos,rkanavath/...
52577cec3ff91da9ec127b7ba1ada110e279e51b
others/DS/BT/top_view.cc
others/DS/BT/top_view.cc
#include <stdio.h> #include <map> #include <vector> typedef struct _NODE { int data; _NODE* left; _NODE* right; } NODE; NODE* NewNode(int data) { NODE* node = new NODE(); node->data = data; node->left = node->right = nullptr; return node; } void PrintTopViewUtil(NODE* node, int level, std::map<int, in...
Print top view of the binary tree.
Print top view of the binary tree.
C++
apache-2.0
pshiremath/practice,pshiremath/practice
20360fa47dd162f712af72c676471267c2f0dea2
tests/test-slur/test-slur.cpp
tests/test-slur/test-slur.cpp
// Description: Print slur linking info #include "humlib.h" using namespace hum; int main(int argc, char** argv) { if (argc != 2) { return 1; } HumdrumFile infile; if (!infile.read(argv[1])) { return 1; } cerr << "ANALYZING SLURS" << endl; infile.analyzeKernSlurs(); cerr << "DONE ANALYZ...
Add test program for slur parsing.
Add test program for slur parsing.
C++
bsd-2-clause
craigsapp/minHumdrum,craigsapp/humlib,humdrum-tools/minHumdrum,craigsapp/minHumdrum,humdrum-tools/minHumdrum,craigsapp/humlib,craigsapp/minHumdrum,craigsapp/humlib,humdrum-tools/minHumdrum
f272b824373e4d17e3312dfe0232d47257b97eca
time_converter.cpp
time_converter.cpp
#include <iostream> #include <string> using namespace std; int main() { string time12; cin >> time12; char p = time12[time12.size() - 2]; if (p == 'P') { int t = (int)time12[0] - '0'; t = t * 10; t += (int)time12[1] - '0'; if (t < 12) { t += 12; } cout << t; for (int ...
Add a solution for time converter task
Add a solution for time converter task
C++
mit
ralcho/AdvancedProgrammingNBU
0a1376c3c0aed0c18c60b07a43bec8b1fb6a7b54
app/main.cpp
app/main.cpp
#include <iostream> int main() { std::cout << "Hello, World!" << std::endl; return 0; }
#include <iostream> #include <stdlib.h> #include "exampleConfig.h" #include "example.h" /* * Simple main program that demontrates how access * CMake definitions (here the version number) from source code. */ int main() { std::cout << "C++ Boiler Plate v" << PROJECT_VERSION_MAJOR << "." ...
Update example to demonstrate version numbers.
Update example to demonstrate version numbers.
C++
unlicense
bsamseth/cpp-project,bsamseth/cpp-project
9579f8d830f34c205f653b66ee4439059c0cbe1d
excercise06/02.cpp
excercise06/02.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "../excercise04/make_random_data/make_random_data.hpp" #include "../excercise04/sort/heap.hpp" #include "../excercise04/sort/swap.hpp" #include "priority_queue/priority_queue.hpp" #define MIN_SIZE 100 #define MAX_SIZE 100000 #d...
Add a solution of prob 2
Add a solution of prob 2
C++
mit
kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016
ed190760423c32a62ba913250fb6c7e72c59c422
cpp/p015.cpp
cpp/p015.cpp
/* * Lattice paths * * Starting in the top left corner of a 2×2 grid, and only being able to move * to the right and down, there are exactly 6 routes to the bottom right corner. * * How many such routes are there through a 20×20 grid? */ #include <iostream> using Long = unsigned long long int; // Forward decl...
Add solution to problem 15 in C++.
Add solution to problem 15 in C++.
C++
mit
PeterFeicht/euler
6e05568e3887e0f2e01e58ef41eb5e2ed22551f0
mark_and_toys.cpp
mark_and_toys.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int n, money; cin >> n >> money; int *toys = new int[n]; for (int i = 0; i < n ; i++) { cin >> toys[i]; } sort(toys, toys + n); int sum = 0; int count = 0; for (int i = 0; i < n; i++) { if (sum + toys[i] > money) { break; } e...
Add the solution to "Mark and Toys".
Add the solution to "Mark and Toys".
C++
mit
clasnake/hackerrank,clasnake/hackerrank
6c8323639fac3523774f1eab8186cca37bdf4e2c
test/core/engine_test.cc
test/core/engine_test.cc
// Copyright [2016] <Malinovsky Rodion> #include "core/engine.h" #include "gtest/gtest.h" // Implement Engine test // 1. Create a fixture, take base code from EngineLauncher // 2. create cond var, which will emulate SIGINT // 3. run engine -> create server socket // 4. create tcp client and write data to server sock...
Add stub for engine test with test plan
Add stub for engine test with test plan
C++
mit
malirod/cppecho,malirod/cppecho,malirod/cppecho
4516e4579445ff475b4e040b0c9834e86b14c1eb
test/correctness/float16_t_implicit_upcast.cpp
test/correctness/float16_t_implicit_upcast.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 to check implicit upcasting of float16_t works.
Add test to check implicit upcasting of float16_t works.
C++
mit
ronen/Halide,ronen/Halide,psuriana/Halide,tdenniston/Halide,psuriana/Halide,delcypher/Halide,kgnk/Halide,adasworks/Halide,smxlong/Halide,psuriana/Halide,mcanthony/Halide,smxlong/Halide,psuriana/Halide,tdenniston/Halide,adasworks/Halide,kgnk/Halide,delcypher/Halide,tdenniston/Halide,adasworks/Halide,jiawen/Halide,kgnk/H...
5a7d7b42c6dcfb7bdb08fdde20ead787acce6e1c
Source/System/FieldContainer/Node/OSGNodeTest.cpp
Source/System/FieldContainer/Node/OSGNodeTest.cpp
#include <UnitTest++.h> // Unit tests for vec classes #include <OpenSG/OSGNode.h> #include <OpenSG/OSGNameAttachment.h> TEST(CreateNode) { OSG::NodePtr n = OSG::Node::create(); CHECK(n != OSG::NullFC); } // --- Cloning --- // TEST(TreeCloningName) { OSG::NodePtr root = OSG::Node::create(); OSG::Node...
Add node test. Fails for now. Need to figure out a way to handle osgInit.
Add node test. Fails for now. Need to figure out a way to handle osgInit. git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@176 4683daeb-ad0f-0410-a623-93161e962ae5
C++
lgpl-2.1
jondo2010/OpenSG,jondo2010/OpenSG,jondo2010/OpenSG,jondo2010/OpenSG,jondo2010/OpenSG
8a358f72742ce1fb8bd01615f0c7e6b43bf5f892
src/classad/fuzzer.cpp
src/classad/fuzzer.cpp
#include "classad/classad_distribution.h" #include <string> #include <string.h> #include <sys/types.h> /* This is the driver for the classad fuzz tester. * Note this is intentionally not in the cmake file, it should not be built * by default. * * To use, compile all of classads with clang -fsanitize=fuzzer-nolin...
Add fuzzing driver to classads HTCONDOR-814
Add fuzzing driver to classads HTCONDOR-814
C++
apache-2.0
htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor
84f524b3b4a04d1f77610757a6ad88db5c182185
C++/145_Binary_Tree_Postorder_Traversal.cpp
C++/145_Binary_Tree_Postorder_Traversal.cpp
// 145 Binary Tree PostOrder Tranversal /** * Given a binary tree, return the postorder traversal of its nodes' values. * * For example: * Given binary tree {1,#,2,3}, * 1 * \ * 2 * / * 3 * return [3,2,1]. * * Note: Recursive solution is trivial, could you do it iteratively? * * Tag: Tree, Stac...
Add 145 Binary Tree Postorder Traversal
Add 145 Binary Tree Postorder Traversal
C++
mit
FreeTymeKiyan/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,bssrdf/LeetCode-Sol-Res,FreeTymeKiyan/LeetCode-Sol-Res
a09ccda05deacdb42ac066a8395e0d2a6b715bb5
Sorting/sum-exists-in-two-arrays.cpp
Sorting/sum-exists-in-two-arrays.cpp
/******************************************************************************* Sum exists in two arrays ======================== -------------------------------------------------------------------------------- Problem ======= Given two arrays A[] and B[] and a number K, check if a + b == K where a belongs to A and...
Check if sum exists in two arrays
Check if sum exists in two arrays
C++
mit
divyanshu013/algorithm-journey
32bca1ca03e668b2352a032faf1ff28795704c1c
src/sys/path_win.cpp
src/sys/path_win.cpp
#include "path.hpp" void Path::init() { // FIXME: unimplemented } #include <stdlib.h> IFile *Path::openIFile(std::string const &path) { // FIXME: unimplemented abort(); return NULL; }
Add placeholder Windows path code
Add placeholder Windows path code
C++
bsd-2-clause
depp/sglib,depp/sglib
0f4330c708753761313ce24e01223d6f0c130218
test/SemaCXX/no-implicit-builtin-decls.cpp
test/SemaCXX/no-implicit-builtin-decls.cpp
// RUN: clang -fsyntax-only -verify %s void f() { void *p = malloc(sizeof(int) * 10); // expected-error{{no matching function for call to 'malloc'}} } int malloc(double);
Add test case to insure that implicit builtin declarations for C library functions aren't created in C++
Add test case to insure that implicit builtin declarations for C library functions aren't created in C++ git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@64513 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl...
3f57711517d1229d8e05537ad203a6a99497fd92
float_fmt.cpp
float_fmt.cpp
#include <cmath> #include <fmt/format.h> struct ieee754 { int sign; int biased_exponent; uint64_t fraction; uint64_t significand() const { return 0x10'0000'0000'0000 | fraction; } int exponent() const { return biased_exponent - 1023; } explicit ieee754(double value) { auto bits = fmt::internal::bit_cast<uint...
ADD floating point format library example.
ADD floating point format library example. Compile with: g++ float_fmt.cpp -o float_fmt -lfmt
C++
apache-2.0
tisma/ctorious,tisma/ctorious
f96c27f503073b474faf0648321cf54a99aa92ea
specs/unit/core/math/utils.specs.cpp
specs/unit/core/math/utils.specs.cpp
// Copyright (c) 2017 Pierre Fourgeaud // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include <bandit/bandit.h> #include "core/math/utils.h" using namespace bandit; using namespace snowhouse; using namespace CodeHero; go_bandit([]() { describe("::Clamp", []()...
Add test for Clamp function in math/utils
Add test for Clamp function in math/utils
C++
mit
pierrefourgeaud/CodeHero
9f78052f8fed0f4785b464e45d40f8197bf4f03b
tensorflow/core/ops/filesystem_ops.cc
tensorflow/core/ops/filesystem_ops.cc
/* Copyright 2021 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 2021 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...
Set NoOutputs as the shape inference function for the FileSystemSetConfiguration op.
Set NoOutputs as the shape inference function for the FileSystemSetConfiguration op. PiperOrigin-RevId: 416909316 Change-Id: I1dea750ba447776ab4b927273b3559baa98dbca1
C++
apache-2.0
tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yon...
2f8380451e6560dab79b8e30b250d2ecb2e132ba
tensorflow/tsl/platform/default/cuda_libdevice_path.cc
tensorflow/tsl/platform/default/cuda_libdevice_path.cc
/* Copyright 2016 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 2016 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 missing qualifier for std::string
Fix missing qualifier for std::string PiperOrigin-RevId: 471087779
C++
apache-2.0
tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorfl...