« first day (2733 days earlier)      last day (1267 days later) » 

12:00 AM
RELOAD! There are 7075 unanswered questions (89.7361% answered)
 
12:41 AM
Note that Code Review is generally the place to go for suggestions for improvement on working code. — chrylis -cautiouslyoptimistic- 32 secs ago
 
12:52 AM
0
Q: Persistent waiting room

MarcThis is an exercise to implement a waiting room for an hospital with the following requirements: Add (and remove) a patient to the queue of the waiting room Move a patient up and down the queue Show all patients in the queue The queue needs to be persisted The WaitingRoom interface: public inte...

 
1:16 AM
0
Q: Code to find entry in hash depending on hash's data

MercI wrote this code and I just can't stomach it. The idea is that there is a schema, and the goal is to find the entry with autoIncrement set to true. If it's not found, the result should be idProperty. Here you go: const idProperty = 'id' const schema = { id: { type: 'number' }, code: { type: ...

 
2:06 AM
0
Q: Pocket cube solver in Prolog

AnonymousHello I have writtern this Prolog code to solve a scrambled 2x2 rubiks cube. Also known as a a pocket cube. %the cube is represented as a fact with 24 arguments, %where each argument represents the color of the sticker at that position. %The Positions are according to cube_diagram.png %Test scra...

 
2:30 AM
0
Q: How can this VHDL code for a 64-bit timer be improved to use less resources?

tuskiomiI have code for a 64-bit timer register which can take in a 32-bit slice and depending on the inputs, place the slice in the high side or the low side, or increment the counter. library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity CSR_TIMER is Port ( clk : in STD_LOGIC...

 
2:55 AM
1
Q: Hackerrank's Queen's Attack II

BorkProblem statement A queen is standing on an nxn chessboard. The chessboard's rows are numbered from 1 to n, going from bottom to top; its columns are numbered from 1 to n, going from left to right. Each square on the board is denoted by a tuple, (r,c), describing the row, r, and column, c, where ...

 
 
2 hours later…
4:55 AM
Monking
 
 
2 hours later…
6:37 AM
0
Q: Array-indexed sum

OverLordGoldDragondef indexed_sum(a, k): N, M = a.shape out = np.zeros((N, M)) for i in range(N): for j in range(M): out[k[i, j], j] += a[i, j] a = np.random.uniform(0, 1, (N, M)) # can be any dtype k = np.random.randint(0, N, (N, M)) # must be int Can this be made faster withou...

 
7:17 AM
this question is more appropriate in codereview.stackexchange.comSpikie 1 min ago
 
0
Q: Find if duplicate items exists in a list of dictionaries

Ibrahim RahimiI am writing a script to reads rows (records) from an excel file with xlrd package and then create a dictionary for each row of excel file. Then append each dictionary to a list. After I finished reading rows from excel file and prepared the list of dictionaries; I use odoorpc to connect to the i...

 
8:09 AM
Assuming the code works, this would be more appropriate for codereview.stackexchange.comMat 21 secs ago
 
8:50 AM
possible answer invalidation by Marc on question by Marc: codereview.stackexchange.com/posts/251184/revisions
 
9:30 AM
0
Q: Prime numbers with array and OpenMP in C

rastafile#include <stdio.h> #include <string.h> #include <math.h> #include <omp.h> #define MAXN 10*1000*1000 int fillarray(unsigned maxn, int *p, int psize) { int i, top = 1; int n; p[0] = 3; printf(" 2\n 3\n"); for (n = 5;; n += 2) for (i = 0; n % p[i] != 0; i++) ...

 
10:19 AM
0
Q: Creating Two-Dimensional String Array for Plane Seats

Nicholas WhitleyI'm creating a ticket reservation system in Java, I want to use a Two-dimensional String array for managing the seats. I have enums that hold the plane model and the amount of seats available so the array pulls the rows and columns from there. I just want to see efficient my code is and how can I...

 
 
1 hour later…
11:20 AM
@CaptainObvious Don't know what you are asking, code out of context.
 
11:47 AM
@SᴀᴍOnᴇᴌᴀ 2 HNQs on the same day. 4 badges actually, got an enlightened badge as well.
 
 
1 hour later…
12:54 PM
I debated looking for something to answer to get to 20k (only need 107 rep) but I'm too lazy for that.
 
I haven't quite hit 15K yet want to get there before the end of the year.
Also want to get gold C and C++ tags at some point,
More than half way to those.
 
There you go man
 
1:37 PM
0
Q: Simple single css node parser written in rust

Damian GrzankaI am new to rust and I wrote a little program that takes a part CSS selector and returns the name of the element and two vectors containing its attributes (classes, ids) Example div#menu.big.pink => "div", ["menu'], ["big", "pink"] Because I am new to rust I am looking for improvement to make t...

 
2:26 PM
0
Q: A recursive_print Function For Various Type Arbitrary Nested Iterable Implementation in C++

JimmyHuThis is a follow-up question for A recursive_transform for std::vector with various return type and A recursive_transform for std::array with various return type. Based on these discussion about the recursive things, the another idea comes up in my mind that trying to implement a print function f...

 
This may be better suited for Code Review. I suggest reading their guidelines to confirm. — nanofarad 8 secs ago
Code review questions are offtopic on SO. — Joachim Sauer 15 secs ago
There is codereview.stackexchange.com, but please make sure to read their documentation on what and how to ask there and don't just blindly copy this post there (because it will likely be downvoted/closed there as well in its current state). — Joachim Sauer 10 secs ago
I’m voting to close this question because code review is off-topic on SO. — Joachim Sauer 44 secs ago
 
3:06 PM
Monking
 
0
Q: SQL structure to save coordinates for spigot plugin

monamonaI'm writing a spigot plugin where I give the user the possibility to send a message to the admins of the server. One of the requirements is that the coordinates of the player are stored, when the message is sent, and that it is stored in a sql table, so that admins on multiple spigot servers can ...

 
@pacmaninbw yeah I am aiming for the same for JS... it can be discouraging after having gone 2.25 x past the recommended number of answers
 
What is the recommended number of answers?
I currently have 322 answers.
@SᴀᴍOnᴇᴌᴀ ^^
 
3:21 PM
Teresa Dietrich on October 27, 2020
As many offices go fully remote, learning how to approach key meetings with your manager can pay big dividends.
 
@pacmaninbw I'm not sure if that is the most precise terminology, but I see it when I'm on my profile > Activity - in the top right corner when tracking the next tag badge it shows progress: score (total) and (number of) answers
the number of answers for gold badge is x / 200 answers
I guess because 200 is the minimum # of answers before a gold badge can be awarded
> You must have a total score of 1000 in at least 200 non-community wiki answers to achieve this badge.
 
We resolved this by simply defining a process that upon every merge from branch A to branch B with conflicts, the merge shall be done from B to A first while pushing the conflicts as-is (yes, in that commit the code will not compile). Then make another commit on branch A after resolving the conflicts. Then merge that into branch b with a pull request. This way, when a code review is done on the pull request, the reviewer can see the conflicts and how they were resolved before approving the merge. — Lucent567 56 secs ago
 
@SᴀᴍOnᴇᴌᴀ I have a score of 592 for 157 C answers and a score of 517 for 149 C++ answers.
 
I see that
 
Doh! :)
@SᴀᴍOnᴇᴌᴀ It looks to me like you are only one so so answer away from a gold for JavaScript.
 
3:34 PM
a "so so" answer in C/C++ is not the same as a "so so" answer in JS ...
 
Your high score in JavaScript is a lot higher than my highest high score.
I was thinking +2 was a so so answer, is that not the case in JavaScript?
 
0
Q: Scheduling Covid-19 testing in a hospital using a heuristic

Greedo I recently came across a problem scheduling Coronavirus testing at a hospital; the testing capacity needed to be allocated to high risk wards (combining many factors) ones which hadn't been tested recently This presents a really tricky problem when scheduling, because as well as complexity in ...

 
Too bad I generally don't look at JavaScript questions.
 
so I would need 10 so-so answers...
 
Ah I was miscalculating.
 
3:41 PM
I need 79 answers, and only 208 score for C# Gold.
 
@pacmaninbw Those two highest score answers are extreme outliers
I failed to find a comment @Mast said some time ago about JS - something like "the problem is everybody does it"
 
We need to get you more nice answers.
 
I have 30 nice answers, don't need more lol
3
 
Thanks Santa(s) but remember Serial voting is reversed
 
I have 13 and need more. ;)
 
3:46 PM
I'm not a nice guy so I really shouldn't have any "nice answers"
 
would you rather be a wise guy or a wise man?
 
I'm already a gangster which makes me a 'wise guy' by default
 
Hi John Doe, codereview.stackexchange.com is a better place for this question since you have working code, and no specific problem other than perhaps an idea that the code can be shorter or clearer. — Paul Hankin 13 secs ago
 
Do we really need a user with the name John Doe? We already have a user named anonymous.
 
My girlfriend and I keep having the "kids" discussion and this is a struggle y'all
 
3:52 PM
@pacmaninbw there are already 45 users with that username on CR
 
Their are worse discussions to have.
 
Man I don't want kids
 
John Doe?
@DerKommissar I figured that was why it was a struggle.
 
I might have to "compromise" and accept that she wants a kid or two, but fortunately we have 4-5 years to figure it out yet.
(Neither of us want kids in our 20's thank goodness)
 
@DerKommissar I think that is a good thing, but I'm not sure. People change over time also.
 
3:56 PM
That's kinda what I said, I mentioned that we should "revisit" the discussion in a year
 
My girlfriend in college didn't want kids, now she has 3.
 
I'm pretty adamant I don't want kids, like I've thought about it A LOT.
Oh snap I have to go get a cylinder of nitrogen today :D
 
1
Q: Algorithm to find all legal moves in Reversi game

John DoeI have my algorithm to find all legal moves in Reversi game. Here's the code with comments: """ -1 => no disc 0/1 => player's disc """ for row_idx, row in enumerate(board): for column_idx, column in enumerate(board): if board[row_idx][column_idx] == -1: """ ...

 
@DerKommissar maybe you could show her #11 from this list of memes
 
Trueeeeee
She also fits #2 sometimes....
😬😬😬
 
4:10 PM
at least the Eco light 🌿 is on :)
 
Oh yeah she'll be very efficient when she tells me about all her problems.
 
Possible way out of it when you're ready, "I'm just not into commitment".
 
Gonna take more than that, last time I tried to break up with her she said "we're not arguing about this today" and we're still together
(I kid I kid, I read that somewhere and thought it was hilarious.)
 
I have 2 friends that are married to each other for 30 years, they got separated 3 years ago and are in counseling. He finally admitted he had a problem with commitment about 3 weeks ago.
 
4:21 PM
That's one way of putting it.
 
We met in January and were texting until May or so, when she had a small breakdown and decided to move from OH to FL with her aunt, then she came back in September. It's been an interesting ride.
Coworker: "is the platform down? <health check URL> isn't working"
Me: "ruh roh" *looks at URL* "platform isn't down, middle part of that URL is all messed up, where did you get it?"
Coworker: "<boss>"
Me: "welp"
#PlatformAintBrokeBossJustNeedsToCheckHisEmail
 
Reminds me of an old tech support joke "I can't find the CD reader on the computer, but I love the built in coffee cup holder in the computer"
 
Reminds me of The website is down with Web Dude
I thought of that last week and meant to listen to it again
 
4:44 PM
Nomking
 
1
Q: Pushing local repository to remote repository using python Github

KrishnaThe code should do the following in order: It should download/clone the public Github repository locally. It should remove all the git history (and branches) Use the Github API to create a new Github repository initialized with the input github repository content that you downloaded locally. The...

1
Q: Fragment of code with Android MVP that checks login credentials via REST API

Abc DefI'm learning MVP for Android and am wondering if that piece of code that I wrote is correct in terms of this pattern or maybe is completely messed up. I'm wondering if there can return type other than void in contract interface like I have in Model interface, secondly context shouldn't be passed ...

 
 
1 hour later…
6:08 PM
0
Q: Sweep & prune broadphase algorithm

AudioGuyMy game engine uses the following broadphase collision detection algorithm: internal void SweepAndPrune() { // First: order all objects from left to right on the x-axis: IOrderedEnumerable<GameObject> axisList = _gameObjects.OrderBy(x => x.LeftRightMost.X); // loop through all object...

 
6:21 PM
Since this code works fine, wouldn't it be more appropriate to ask this on codereview.stackexchange.com ? — Random Davis 40 secs ago
You can read over questions on Code Review to get ideas. — Carcigenicate 25 secs ago
 
6:44 PM
@DerKommissar If so, don't. It's a very long-term commitment.
@DerKommissar I don't think it's something you want to compromise on.
 
@Mast So I got a cylinder of Nitrogen for some stuff I want to do, was laughing about the UL discussion in the regulator book
 
@DerKommissar If you're laughing with nitrogen, people will think it's helium.
 
7:22 PM
0
Q: C - How to read integer at certain place in the argument vector?

harveyI'm writing a C program that reads table data from a .txt file, applies changes to it and prints the modified table to a different .txt file. Part of the program is the function that prints and empty line before the line entered in the terminal after the irow argument. Here's how the program is c...

0
Q: Speeding up Python program that converts DOCX to PDF in Windows

tdraceThis is meant to be a performance-centric question as this type of conversion is obviously very common. I'm wondering about the possibilities for making this process faster. I have a program that creates several thousand QR codes from a list, embeds them in an MS Word docx template, and then conv...

 
7:42 PM
This site is not for "code optimization" but rather that would be the CodeReview StackExchange site. Please check out their meta site for how to write a decent question on that site first though. — Hovercraft Full Of Eels 10 secs ago
@codexo they aren't being "rude"... Stack overflow has some rules of what is considered on-topic on this site "But I want to optimize my code." questions like these are off-topic as there is already another site for that purpose. — Yatin 20 secs ago
@codexo as I said. This isn't the site for that. It is that simple... Please ask at code review... you will get your answer there... this is like asking about buying fishes in a furniture store. You are just at the wrong place :) — Yatin 54 secs ago
 
8:12 PM
0
Q: N Nested squares

DobromirMThe excercise is to print n nested squares. The nested squares are given as input by the user. Example output for n = 4: ┌────────────────────────────────┐ │ ┌────────────────────────┐ │ │ │ ┌────────────────┐ │ │ │ │ │ ┌────────┐ │ │ │ │ │ │ │ │ │ │ │ │...

 
possible answer invalidation by Bobby on question by monamona: codereview.stackexchange.com/posts/251212/revisions
This looks and sounds more like codereview than SO. — baduker 9 secs ago
 
8:36 PM
@CaptainObvious @Mast @pacmaninbw I voted not to close because I was waiting to see if the OP would respond to the question by Blindman67 but OP hasn't responded... part of me wants to close it unless OP responds saying they wrote it... does that sound logical?
 
0
Q: Fully parameterized PowerShell function for file removal

Zoran JankovI would like your opinion on my Remove-Files PowerShell function. It is used in my File-Removal-PowerShell-Script. It is designed to be very flexible so a script user can have configure it to remove files in multiple and various way as it often the chase. Remove-Files function function Remove-Fil...

 
8:58 PM
@SᴀᴍOnᴇᴌᴀ The OP was last seen 8 hours ago, but that doesn't mean it was on CR. But it is up to you.
 
@pacmaninbw Right - so the OP should have seen Blindman67's comment...
obligatory "for some values of should"
 
9:50 PM
Also please explain what you want. Is the code not working correctly? If so, in what way? If your code does work and you just want feedback on it take a look at Code ReviewMDK 42 secs ago
 
10:00 PM
@CaptainObvious @pacmaninbw is this "not working as its supposed to", as G. Silepen claims?
 
10:20 PM
> The code works and performs what it's supposed to, however I haven't yet come up with a better way of reading the [row] parameter from the argument vector. How can I read not only the first digit but the whole integer inside the string of that argument?
Not working, also this is a single function that doesn't begin to cover the whole program.
As well as code not working, it is out of context.
 
I figured the latter
 
There are a few ways to turn a string into an integer value one of them is the atoi() library function.
 
This question is better suited for CodeReview — Steve 18 secs ago
 
10:38 PM
@Barrosy That is a big question with many answers because reviews can serve many purposes. I can say that having anyone looking over your code helps. Even the most junior who is asking questions about the why and what will make you think twice about your code. Even reviewing it yourself ensures you've read over your complete change and thought about it. There is also automated code review, like Code Climate, to keep you honest on the basic stuff. — Schwern 24 secs ago
 
@SᴀᴍOnᴇᴌᴀ Everytime I look at that question, it looks worse they shouldn't use argv there because the input should be coming from stdin (standard in) based on the calling sequence at the top.
 
alright - just 1 more VTC on that one
 
 
1 hour later…
11:54 PM
0
Q: Turning a PagedList into async

Pablo Aguirre de SouzaI created a webapi with synchronous methods and I'm trying to turn it into async but I'm running into a bunch of issues. I have a PagedList class that's being returned by the repository but I get a bunch of errors when modifying the method. It was pretty simple to transform a method without a pag...

 

« first day (2733 days earlier)      last day (1267 days later) »