« first day (2236 days earlier)      last day (1771 days later) » 

12:00 AM
RELOAD! There are 6103 unanswered questions (89.8705% answered)
 
 
1 hour later…
1:09 AM
Use one or more dictionaries. Load up the dictionaries in one pass over the data in lookupSheet, then use those dictionaries when iterating over Price Build Up sheet. That gives you two consecutive (rather than nested) loops. If the code is working, you might get more detailed answers on Code Review. — John Coleman 19 secs ago
 
1:39 AM
0
Q: C++ wrapper around uniform mt19937 SequenceContainer

SparklerWith the following interface in mind EasyRandom<unsigned int> prng(a, b); auto x = prng(); // scalar auto v = prng(10); // vector I wrote the following class: // https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution template <typename T = unsigned int> class EasyRandom {...

 
2:19 AM
0
Q: Is it safe to use functional interface arguments in methods of services injected via Spring?

euhyenFirst, sorry for my poor English. I don't usually use it. Here is the working code for my spring service: @Service public class UploadService { @Inject @Qualifier("session") Session session; @Inject AsyncImageConvertService asyncImageConvertService; @Value("${aws.buck...

0
Q: Primes and SemiPrimes in Binary

Wolf LarsonI'm in the midst of re-learning python. My current effort is an implementation around prime factorization. I am attempting to reproduce something similar to the table found here (in binary): https://math.stackexchange.com/questions/586010/relative-size-of-most-factors-of-semiprimes-close Perfor...

 
 
3 hours later…
5:04 AM
0
Q: Regex pattern for Any integer between -20 and 100 including -20 and 100.Numeric 3 chars max and no decimal places

V KCan anyone please confirm if the below regex will work for this condition Any integer between -20 and 100 including -20 and 100.Numeric 3 chars max and no decimal places - E.g - -20, -18 etc.. ^((\\-([1-9]|1[0-9]|20))|([0-9]|[1-8][0-9]|9[0-9]|100))$

 
5:30 AM
possible answer invalidation by Sparkler on question by Sparkler: codereview.stackexchange.com/posts/222495/revisions
That's only some of the errors. That's the problem in not having the question list errors Aidan hasn't been able to solve: he doesn't even have an incentive to enumerate them and solve the once the ones he can. And it turns this into a "spot the mistakes" code review exercise for us, which might belong on another stack exchange site, but not this one. — Tony Delroy 59 secs ago
 
 
1 hour later…
6:50 AM
possible answer invalidation by Daan on question by Daan: codereview.stackexchange.com/posts/222464/revisions
 
7:24 AM
-1
Q: Bin Packing Js implementation using box rotation for best fit

Code GuyI have used the bin packing js implementation here https://github.com/jakesgordon/bin-packing When I specify the frame size as 800x600 and Blocks size as 150x700,150x700 it would say that, it cant accommodate However, there is ample space. The same when 700x150, 700x150 is made, it would fit i...

0
Q: App growing ugly with multiple state components. Time to migrate state to one component or time to learn redux/context?

daifucoA couple of weeks ago I started a little project, I was learning node/express/mongo and I though it was a good idea to start building some app so at least I could refresh my basic React knowledge. The App is just something to keep track of your weight, something not too complicated. You can tell...

 
7:44 AM
0
Q: Deduping files using hardlinks

martixyI'm trying to organize my gallery, and I have certain folders rife with copies. My daily work is mostly javascript and php, being your generic web developer. However I took this as an opportunity to bodge something in python, a language I normally do not use, but have always wanted to pick up at...

0
Q: Performance issue with empty lists

Mark Cilia VincentiHere's my updated version of the problem I posted at Calculating time windows for entities, adding in suggested changes as well as a change I did so that the Reflection is 'cached' in a ConcurrentDictionary and happens only once per Type. using System; using System.Collections.Concurrent; using ...

 
"Can you shorten the following record?" Why should we do your job? Anyway this seems you should post it on codereview.stackexchange.com. — HimBromBeere 20 secs ago
 
8:00 AM
possible answer invalidation by Pierre.Sassoulas on question by Pierre.Sassoulas: codereview.stackexchange.com/posts/222379/revisions
 
0
Q: PHP - PDO - Elegant and secure way to create dynamic query

RocstarI want to create a dynamic query to display all the invoices if the user has moderator rank and when the user is a simple member, only his invoices public function getAllBill($user_rank, $user_id){ $sql = 'SELECT * FROM invoice_user INNER JOIN users on users.user_id = invoice_user.user_id'...

0
Q: std::mutex best practice

arturnSince when an exception is thrown the only code is ensured to being run is the destructor, code like this might generate a memory leak std::mutex foo; foo.lock(); // My code which might throw an exception foo.unlock(); Is it a best practice do something similar to this or might there is other ...

 
8:44 AM
0
Q: Heavily limited premature compiler translates text into excecutable python code

TVSuchtymy goal is to write a smaller compiler-like program, which allows me to draw geometric shapes into a 3D Diagram. There is no need for turning-completeness and the program should only be viewed as an exercise and not as a program used by anybody. However, I want the program to have a compiler-like...

 
@KashifAhmadKhan but thats not what SO is for. If you have code and want it reviewed, go to codereview — BugFinder 55 secs ago
 
9:13 AM
@KashifAhmadKhan I didnt say add it here.. I said go to codereview. this is closed. — BugFinder 11 secs ago
If the code works you can go to CodeReview. If it doesn't you will need to tell us what goes wrong. As it stands this way too much code and too little infor to be answered here. — TaW 33 secs ago
 
10:04 AM
-1
Q: Best way to check if data exists in database using service, Unit of Work and Repository Pattern in c#

Guru Rahaventhar NWhat is the best way to check if an data exists in the database i am using service, unit of work and repository pattern I don't how check the data in present in database are not using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;...

 
10:44 AM
0
Q: from given array create new array with length

Manjeet ThakurI'm learning "Go language" and enjoy its simplicity. I have written code and Benchmarking for the very small problem in go, The problem is let's suppose I have given array [1,2,3,5] and length is 10. so here function f takes two parameters array and length f(array, length) and produce the outp...

 
@Duga no invalidation
@Duga not mentioned in the answer either
@Duga added non-working code
 
11:04 AM
-2
Q: How can I use fetch to store both image and text at a same time?

Potato23I tried using formData.append() to mix both image and JSon object, but it is not working... Only image goes to the server but not username,usereamil and userpassword, it shows empty for them This is my function when user click image to upload _submit = async() => { var {Username} = this.st...

 
11:24 AM
0
Q: How to use dictionaries to optimize VBA code currently using arrays and loops to update a table based on another one?

PBPBSub UpdateManualUpdates() Application.ScreenUpdating = False Dim lookUpSheet As Worksheet, updateSheet As Worksheet Dim valueToSearch As String Dim i As Long, t As Long Set lookUpSheet = Worksheets("Manual price changes") Set updateSheet = Worksheets("Price Build-up") Dim lookUp...

 
11:35 AM
I now have a much more complete script in Code Reviewaduguid 52 secs ago
 
0
Q: Finding primes, memory-error

ReignI was trying to write Sieve for the first time and I come up with this code def sieve(num): numbers = set(range(3, num, 2)) for i in range(3, int(num**(1/2))): num_set = {i*c for c in range(i, num//2)} numbers = numbers - num_set return list(sorted((2, *numbers))) T...

 
12:04 PM
0
Q: Python adding partialmethods to a class at compile time

justinfayI am writing a class for delayed operations on variables which are resolved at a later time. I am using pythons operator overloading but my class definition seems very boilerplatey. Is there a more succinct way to define the following class? class Forward: def resolve(self, env): r...

 
12:44 PM
0
Q: Iterable hashtable implementation in C

ossI'm just finished my version of iterable hashtable. I want to review code in general (code style, data structures, remarks about the algorithms) and I have some questions: I don't know how to implement errors in return-value way. So, I chose way when we contain error flag variable in struct. Is...

 
1:04 PM
0
Q: Print out an number without knowing its length firstly in LC-3 Assembly language

Danh Nguyễn The picture above is my homework. I just don't know how to solve the problem when printing out a number when it contains a vary of numbers which can lead to 5,6 or 7 characters per number. I think we must have a general solution for that case, if there're only 2 characters then I can do it, but...

 
1:24 PM
0
Q: Keep record of the system bootcount in non volatile memory

Arthur PassosI have a system which contains an EEPROMManager class. This class is responsible for providing methods to store, read and erase data. This class works with sections. I need to keep record of the system boot count, the logic is quite simple, the system boots, reads the previous boot count contain...

0
Q: Find 4 points which form a square with the biggest area

eanmosI have set of points on the coordinate plane. I need to find the 4 points which form a square with the biggest area. I'm new in JavaScript so I'd like to get any suggestions about code style, patterns, code idioms, etc. Thank you in advance! "use strict"; /* * Point */ (function() { fun...

0
Q: I just started programming today and came up with a problem regarding basic calculation

zeroKHi everybody hope I'm at the right spot here ;) I just started c (or programming in gerneral today) and I ran into the problem of not being able to calculate with fractions when using integers instead of doubles. This is the code where I tried different options: #include <stdio.h> #include <std...

 
1:44 PM
0
Q: Misra C++ 2008: 5-0-15 doubts about the benefits

ArsenalI'm writing code for embedded systems (IAR compiler) and it should adhere to Misra C++ 2008. This limits the available features of the language quite a bit (no C++1x features, use of the standard library is banned as well). We use PC-Lint to check for adherence. Rule 5-0-15 of Misra states: ...

 
2:24 PM
0
Q: Parallel Miller-Rabin Prime Test in Haskell

user668074I implemented a prime number finder using the Miller-Rabin prime test in Haskell and it seems to be working. You enter a number and it finds the next prime following that number. I also tried to make it parallel and I'm looking for some advice for how I can speed up the parallel version. Right n...

 
2:40 PM
SO is not a code review site, nor is Code Review a bugfix site. — Agi Hammerthief 59 secs ago
This question should be at codereview codereview.stackexchange.comarieljuod 50 secs ago
 
3:05 PM
possible answer invalidation by shannon on question by shannon: codereview.stackexchange.com/posts/222463/revisions
The code is not complete, and could be improved in many (many, maaannnyy...) ways. Maybe, if and only if you can create an minimal reproducible example and expect a review, this question could be better suited for codereview.stackexchange.com ... — Marco13 19 secs ago
 
@Marco13 MVCEs are off-topic on Code Review. Instead complete verifiable programs are on-topic. — Peilonrayz 34 secs ago
 
@Duga @dfhwze shall we roll that back? I see you and the OP have a chat going on
I would roll it back to revision 16
~enlarges eyes after realizing how many revisions there are
 
3:20 PM
@SᴀᴍOnᴇᴌᴀ that particular edit doesn't seem to be an invalidation
 
@SᴀᴍOnᴇᴌᴀ For me no rollback is required
 
@Vogel612 okay. I am just afraid of users getting in the habit of changing code after receiving answers, which the help center states not to do
 
He did alot of edits because I kept demanding for improving the quality of the question
maybe he should self-answer and close, he found his own mistake
 
@SᴀᴍOnᴇᴌᴀ maybe I will just leave a comment on that topic
 
2
Q: Sodoku solver with arrays of bitsets

BomazI wrote a quick sodoku solver as an exercise and am curious how to make it faster. Parsing and printing is largely irrelevant only there for readability. How can I make the code cleaner and faster? #include <array> #include <tuple> #include <bitset> #include <cassert> #include <optional> #include <

 
3:44 PM
0
Q: Function to parse a Javascript object and return a CSV

PittoThis function converts a Javascript Object into a CSV. var dataFromAPI = [{"name":"first"},{"name":"sec,ond"},{"name":"third 'jibberish"},{"name":"fourth, jibberish"}] function convertToCSVandDownload(objArray) { var csvOutput = ""; Object.keys(objArray).forEach(function(key) { ...

 
@Martinus33: You can correct it yourself (just click "edit"). Seems to be fine; you could ask on Code Review for a full review of your JSON-LD (I’m not 100 % sure if this is on-topic there, but I think there were a few questions like that in the past). — unor 33 secs ago
possible answer invalidation by Reign on question by Reign: codereview.stackexchange.com/posts/222518/revisions
 
@Duga rolled back and left a comment
 
4:01 PM
Monking
 
Greetings, Programs.
 
Greetings, User
 
Jon Ericson on June 18, 2019

Analytical

Documentation badges

Tumbleweed and Reversal

Julia Silge’s analysis demonstrated that the Tumbleweed badge wasn’t serving its purpose.

Meg Risdal is our Product Manager who led us to make these changes.

Jane Willborn wrote the code.

Nick Craver made sure the Lifejacket and Lifeboat triggers don’t break the site.

Ben Voigt suggested the trigger we used first for Winter Bash hats and now for two new badges.

A bunch of people tested those triggers on our sites and prodded us to keep considering something like these new badges. We also got a bunch of feedback about Reversal and especially Tumbleweed that helped us understand how they worked in practice. We’ve got an amazing community here! …

 
Opinions about this question?
 
4:19 PM
 
> In other words, the system is working for about 200,000 users a year and failing for about 150,000. That’s sobering.
2
 
Uh! I thought I was in Code review! — Calaf 55 secs ago
 
0
Q: Modular and clean event-handling JS programming

CalafIn the following code we use the function Incrementer (capitalized for clarity, despite that it's to be used without new), to instantiate a number. Incrementer provides a method increment to augment a counter in a span. We have two such counters, and so we define Incrementer to avoid code duplic...

 
@Vogel612 lol
 
might be interesting how these queries look for code review.
18.5k scholars, 1.8k tumbleweeds
 
4:28 PM
I'm about to score another Tumbleweed on SO...
 
not anymore, sorry :)
 
@Vogel612 Previously CR was doing quite well and had a low amount of Tumbleweed. Guess that went up a little lately.
 
let alone that your latest question got a few comments
 
Asking questions on SO is hard.
You wouldn't say with the amount of crap that gets through, but it is.
Oh well, that's life.
 
Try finding a pearl in the ocean, same problem.
 
4:36 PM
Welcome to Stack Overflow! If you believe that the code works correctly, consider presenting your work (with its unit tests) in a more-complete fashion over at Code Review. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. Before you do that, make sure to read A guide to Code Review for Stack Overflow users first, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". — Toby Speight 16 secs ago
@epascarello Yes, it works, but it's fragile. That's an important thing to keep in mind, IMO. Put another way: I wouldn't pass this in a code review. But it's hard to say what the "right" solution is without more context. — Aaron Beall 23 secs ago
 
5:27 PM
Can moderators convert a comment to an answer?
 
possible answer invalidation by ii69outof247 on question by ii69outof247: codereview.stackexchange.com/posts/222481/revisions
 
@Duga rolled back and commented
 
good jorb
 
possible answer invalidation by Aashish Upadhyay on question by Aashish Upadhyay: codereview.stackexchange.com/posts/222492/revisions
 
@Duga rolled back by Mathieu Guindon
 
6:22 PM
0
Q: Binary Search Tree to store objects now with improvements

ii69outof247Objective: I'm trying to create a BST in order to insert Packet objects for search purposes. Packet holds information like partId, description, price, and partCount. This is a follow up question of this post. I have since revised it so that: No or minimal memory leaks Includes minimized Names...

 
6:45 PM
0
Q: Binary Search Tree to store objects now with improvements

ii69outof247Objective: I'm trying to create a BST in order to insert Packet objects for search purposes. Packet holds information like partId, description, price, and partCount. This is a follow up question of this post. I have since revised it so that: No or minimal memory leaks Includes minimized Names...

 
7:01 PM
should probably be on code review stack — mavriksc 28 secs ago
 
@Mast I posted a question the other day, and got two answers that provided worse code then I did in the question... So it's not just questions ;P
 
Welp, I got my first Lifejacket badge. Apparently they work.
@Peilonrayz Posting a good question that gets good answers is hard, yes, I should've been more specific :P
 
@Mast Yeah, the more I lurk in SO's Python room the more I believe SO is an IRL infinite monkey simulator.
2
 
2
Q: A recursive Boggle solver

EML`Boggle is a word game in which letters are randomly placed in a 4x4 grid e.g: A D Q P N L E M O S R T V K J H Words can be started from any letter and are formed by finding a sequence of connecting letters. Letters may connect diagonally, vertically or horizontally. Example words on the abo...

 
Hello and welcome to StackOverflow. I am certain this question is too abstract to answer. What you are describing is neither a good or bad practice. I suggest actually implementing it the way you describe, and then having someone code review it. By the way, the statement "It doesn't hold the objects themselves, just their pointers" doesn't really apply to Java. Java doesn't have pointers. Your lists will "hold the object themselves". — DavidS 54 secs ago
 
7:26 PM
0
Q: Handling username and filename in a servlet call efficiently

TanIs the code mentioned below an efficient way to get the zip file from the server? The code works fine but I'm wondering if I should throw some exceptions for the following conditions: 1) if(param1 == null || param2 == null) 2) } else if ("".equals(param1) || "".equals(param2)) { The way I cal...

-1
Q: Find pairs of reviewers such that both reviewers gave a rating to the same book

ksevelyarDescription: Find pairs of reviewers such that both reviewers gave a rating to the same book Eliminate duplicates don't pair reviewers For each pair, return the names of both reviewers in the pair in alphabetical order Solution http://www.sqlfiddle.com/#!17/c1fc4/3/0 SELECT MIN(rev1.name)...

 
7:43 PM
This is somewhat broad for the scope of this site - you might have better luck at Code Review. — K.Dᴀᴠɪs 8 secs ago
I wonder if your data model is correct. I don't understand what an EmailAddress needs a sender and a recipient id for. I feel that a better data model would make it easier to get the information you need. If you're in for improvement in this area consider posting a new question, maybe on Code Review. — Gert Arnold 35 secs ago
 
8:06 PM
@DavidS - Lists, then, are just reference groups, no? This configuration would need a code review after implimentation - that is, if no other path seemed better - as you said, to make sure it was the optimal build strategy. — KeepAtIt 57 secs ago
 
8:21 PM
@K.Dᴀᴠɪs But I suspect this code does not quite work as intended; ActiveSheet and a common lastrow? Having said that, there are many areas in it for improvement, so if it works (more by luck than design) I could have a go at it in Code Review in a couple of days! — AJD 52 secs ago
 
8:32 PM
These attempts you talk about ... post them into your question as well.. people can focus on these to fix. Now your question is just fit for the SO sister site "Code Review". — ZF007 42 secs ago
 
8:46 PM
0
Q: Compact command line argument parser : Revisited

766F6964This question is a follow up to my previous one which can be found here. The user dfhwze suggested me to look into compiler construction and recommended me to write a lexer and a parser that would process the input step by step. I am very grateful that he pointed me into this direction, because I...

 
 
1 hour later…
9:59 PM
See the File Browser GUI for use of good icons in a tree. — Andrew Thompson 6 secs ago
 
10:28 PM
1
Q: Print a game grid with cells having different values based on some rules

jakstackCan this style be improved? Is there a more Scala idiomatic style to do this? In a game of Connect4: we start with an empty grid two players place pieces X and O on the grid the first player to achieve 4 pieces in a line wins! this is a text based console game Here is the code I wrote to pri...

 
possible answer invalidation by EML on question by EML: codereview.stackexchange.com/posts/222546/revisions
 
11:28 PM
0
Q: Collect maximum fruits in two baskets of at most 2 types of fruits

thadeuszlayThe task is taken from LeetCode In a row of trees, the i-th tree produces fruit with type tree[i]. You start at any tree of your choice, then repeatedly perform the following steps: Add one piece of fruit from this tree to your baskets.  If you cannot, stop. Move to the next t...

 

« first day (2236 days earlier)      last day (1771 days later) »