Hot answers tagged

7 votes

Unit testing for a multi-dimensional array class

Simple things first - GTest provides a main() that you can use - build and link with I get a bunch of compiler ...
  • 60.8k
5 votes

Unit testing for a multi-dimensional array class

The biggest issue with your test suite is the fact that you had to manually write four versions to handle tensors of up to four dimensions. You should be able to write generic code to test arbitrary-...
  • 35.7k
3 votes

Generating random number of randomly sized Squares/Rectangles using numpy arrays

Welcome to Code Review. I'm afraid I don't have time for as detailed a review as I'd like as I have to go to work. But I wanted to mention one thing about idiomatic library use. When you use a big ...
  • 5,801
2 votes

SetTimeout to populate Javascript Object while a function looped AJAX requests to get data

Initial Review thoughts Before addressing the main question I’d like to address a few points first. Variable declaration style It is nice that seriesData is ...
1 vote

Selection algorithms (order statistic) in Java: linear time vs. sorting selector vs. Quickselect

(I'm no fan of final for interfaces and classes, this seems to carry to sealed.) one alternative to specifying ...
  • 4,998
1 vote

Create archive webpage for newsletters based on nested array

Structure Review Separating Logic from display This approach works but it would be cleaner to have the PHP code send the data to either an HTML template engine (e.g. twig, blade, Smarty etc.) or to ...

Only top scored, non community-wiki answers of a minimum length are eligible