« first day (2586 days earlier)      last day (39 days later) » 

12:00 AM
@Duga rolled back by AJNeufeld
RELOAD! There are 6689 unanswered questions (89.9510% answered)
@Duga rolled back by AJNeufeld
12:17 AM
Q: Pull, Tag, Save, Delete Multiple Docker Containers

synsynackackFirst time posting and first real Python program that I use fairly frequently. I needed a way to pull a large amount of containers, re-tag them, save them (docker save) and clean up the recently pulled containers. I did this pretty easily with bash, though depending on the container and dependin...

This seems like a great question for Code Review. I recommend posting there. — Ryan Wildry 22 secs ago
I’m voting to close this question because questions asking for advice about working code should be posted to codereview.stackexchange.com. — Jonathon Reinhart 25 secs ago
12:50 AM
possible answer invalidation by Stephen Rauch on question by UnfreeHeX: codereview.stackexchange.com/posts/243131/revisions
1:05 AM
Q: Slow C# algorithm needs enhancement when dealing with hundreds of objects (doesn't scale)

fr332lanc3We have code that reads in a DXF/DWG file (drawing file) and then our own geometry library that converts everything into point, line, arcs, circles, and etc. objects. Then we have a Shape object which will hold one or many entities. Shapes can also contain other shapes as children and those shap...

Q: Creating nested list comprehension of files starting with specific string

jordansilvaI have a directory with 'sets' of files that start with a state name followed by 4 or 5 digits (typically indicating year). Each 'file set' contains 3 files a .txt, a .png, and a .jpg. Example of files in directory: California1998_reform_paper.txt California1998_reform_paper.pdf California199...

1:17 AM
@Malachi I mulched a boatload of trimmed hedges with it today
2 hours later…
3:05 AM
Q: Is it good idea to use expensive LINQ calls under heavy load?

dragonsI am working with cassandra using datastax c# driver. I need to pull data out from three different tables. Below is my code which does the job. private const string itemMapStmt = "FROM product_data WHERE client_id = ? PER PARTITION LIMIT 1"; private const string itemSelectStatement = "F...

3:29 AM
Q: What is a better practice in bash scripts to test if string is empty: [[ -z ${value//[0-9]/""} ]] or ! [[ ${value//[0-9]/""} ]]?

Eduard MeilI test in a bash script if a variable value contains digits only. There are two options, both give the valid results: validate_is_pos_int(){ local value=$1 if ! [[ ${value//[0-9]/""} ]] then return 0 # True; $1 has digits only else return 1 # False; $1 contains other letters besides digi...

Q: Feedback on ArrayList using OOPs

ScorpioPlease review my code for the problem statement below. Many Thanks. You job is to create a simple banking application. There should be a Bank class It should have an arraylist of Branches Each Branch should have an arraylist of Customers The Customer class should have an arraylist of Doubles (tr...

1 hour later…
4:48 AM
Ben Popper on June 02, 2020
We’re celebrating some big birthdays for Node.js and Javascript.
1 hour later…
5:58 AM
Q: Aho-Corasick algorithm implementation

Chinmay VemuriI implemented Aho-Corasick algorithm in the following code. I would like to know whether there are any modifications which can be made in order to improve the time complexity or space complexity of the algorithm. #include <bits/stdc++.h> #define lli long long int #define inf INT_MAX using namesp...

"what can i change in the app to make it better" : Questions like these are off-topic for Stack Overflow, which deals with specific solutions to specific problems. When you do get your app to a working state, consider Code Review, which "is a question and answer site for seeking peer review of your code". — Gino Mempin 37 secs ago
6:48 AM
Q: Graph coloring in Java

Aashish PawarI'm solving the m-coloring problem using java. and I have following code that uses concept of recursion and backtracking. import java.util.Arrays; public class GraphColoring { static void graphColor(int k, int m, int n, int colors[], int graph[][]) { for (int c = 1; c <= m; c++) {...

possible answer invalidation by vulpini99 on question by vulpini99: codereview.stackexchange.com/posts/243074/revisions
7:12 AM
Q: Handling Rc pointers correctly in a parent/children tree

yolenoyerNeeds A container holds two collections: Parent instances and Child instances; their items can be searched by name; A child can return a reference to its parent; A parent can search its children by name and return one of them by reference; A Child is read-only after creation, but new children o...

Q: Kotlin/Java: should this singleton class have verify methods?

AerysSI have a singleton object, call it Bank. Bank has several methods, like addCustomer, addRent, etc. Each method has some parameters to do the job. However, the precondition is that, some methods require me to check if that object, given by the parameter exist, or does not exist, in the database. ...

Q: Haskell: Couldn't match expected type ‘[[[a]]] -> [[[a]]]’ with actual type ‘[[[a]]]’

user121392On the third nest level, the same pattern of code with the error. module Nests (nest1,nest2,nest3) where nest1 :: (Num a) => [a] -> [a] -> [a] nest1 _ [] = [] nest1 [] _ = [] nest1 (xs:ls1) (xt:ls2) = (xs+xt):nest1 ls1 ls2 nest2 :: (Num a) => [[a]] -> [[a]] -> [[a]] nest2 _ [] = [] nest2 [] _...

@CaptainObvious Broken code.
7:42 AM
We're switching to CommonMark (MSE), markdown is changing.
We've built an automated rollback if things go horribly wrong. This will require undoing the entire migration post by post so it will be yet another intense calculation. If we can avoid a rollback, we'd love to avoid a rollback. I think we have to live with some level of confusion for the time being and make sure get all sites migrated soon :) — Ham Vocke ♦ 17 hours ago
7:56 AM
We no longer have a dedicated close reason for posts requesting an explanation of code, do we?
Q: Finding min and max values of an iterable on the fly

Denis ShvetsovThis is a follow up for my question about optimizing solution for DNA Health HackerRank problem. Short re-cap: You are given 2 arrays (genes and health), one of which have a 'gene' name, and the other - 'gene' weight (aka health). You then given a bunch of strings, each containing value...

@Duga I think I've tackled the potential "but my edit didn't invalidate anything" problem by rewording the canned comment:
Please do not update the code in your question after receiving feedback in answers, doing so goes against the Question + Answer style of Code Review. This is not a forum where you should keep the most updated version in your question. Please see what you may and may not do after receiving answers. — Mast 56 secs ago
Please do not update the code in your question after receiving feedback in answers, doing so goes against the Question + Answer style of Code Review. This is not a forum where you should keep the most updated version in your question. Please see *[what you may and may not do after receiving answers](//codereview.meta.stackexchange.com/a/1765)*.
For future reference.
Possibly change 'the code' to 'any code' to prevent even more discussion.
1 hour later…
9:23 AM
Q: why we can not ask for best practice of codes?

Mehrdad Kiani Anbohi Good code reviews are the bar that all of us should strive for. They cover common and easy to follow best practices that any team can get started with, while ensuring high-quality and helpful reviews for the long term. code review says about clean code (readability, easy to unders...

9:37 AM
Q: Output is always 0 - C Program

user203124124134I wrote the following coin change code and when I run it, the output always says that 0 change is needed, instead of displaying the right amount of change. I've been trying to figure out the problem but was unsuccessful. Any help would be appreciated. #include <stdio.h> #include <ctype.h> voi...

10:01 AM
Q: Parallax effect confined in div

andreasHey so I'm creating a website and I want some text next to some images to have the parallax effect, I'm able to achieve that with some Javascript tutorial I found online but the text don't stay in their div, with every post added the text's position goes more wrong. The desired look would be for ...

10:17 AM
@Mast first site to see this change is movies: movies.meta.stackexchange.com/questions/4679/…
10:37 AM
If this code already works, it may fit better on CodeReview. — Federico klez Culloca 7 secs ago
10:51 AM
May be better suited at Code ReviewFZs 17 secs ago
If your code works, post it in Code Review to help improve it. — lnxkrnl 55 secs ago
11:14 AM
Q: Recursive function with Promise and setTimeout to ping DOM

M3RSI use this function in browser automation. It pings the document in the browser to check if an element we are looking for is available. If it's not available, it will retry after a given interval. It eventually times out. Example usage: function clickContinue() { return $(":contains('Continue...

11:38 AM
Q: SHA-256 implementation in JS

Sayan ShankhariI know you are all kinda busy with your schedules. But I seek help to my code get verified, what is wrong with it. Could you please verify taking your free time, just for fun. Primary Language: JavaScript Link: https://github.com/SayanThe01Guy/Verification/tree/master/SHA-256 Files are: index...

11:52 AM
It is not that bad of a question (which is why I didn't in fact vote to close it), but more focus would be nice. Also -- while not being off-topic here, questions which ask for how to improve working code are often better asked on Code Review. — John Coleman 55 secs ago
12:02 PM
Q: Unrecognised javascript syntax

Arnab DasI have come across a particular javascript code while looking into RxJs documentation. import { of } from 'rxjs'; import { map } from 'rxjs/operators'; map(x => x * x)(of(1, 2, 3)).subscribe((v) => console.log(`value: ${v}`)); I understand what it does but I have not come across this syntax ...

@DerKommissar how do you like it? did you do a review of it or anything that I can read?
I didn't do any reviews no, but I like it.
12:17 PM
the Trimmer is nice, lighter than a gas trimmer and has same if not more power
@Paul would you do a code review of my project, an hour or two of your work, comments, hints, best practices, not for free :-) — Jacek Wojcik 5 secs ago
@Malachi Yeah, I love the trimmer and hedge clipper.
I have the electric leaf-blower too, thing is a beast.
the leaf blower attachment?
No the actual leaf-blower.
I knew I should have bought the combo!
I had been reading the reviews for the attachment
12:23 PM
There's also a 125Mph one: homedepot.com/p/…
right now I am trying to figure out how to tell windows I updated the speed on my RAM
But I didn't need the bigger one.
Good luck with that Windows crap. Windows 10 is straight garbage.
@DerKommissar my next purchase...lol
Oh there's also a backpack leaf-blower: homedepot.com/p/…
I just bought the lawnmower
12:25 PM
I love the mower. I don't use the bagger ever I just use the muncher.
@DerKommissar what! maybe I get this one instead....lol I wish Money was not a factor...
@DerKommissar my computer sees the new memory, but still shows it as 1600 instead of 1833 in the task manager performance thingy
Might have to check BIOS / UEFI settings.
You didn't mix speeds, did you?
all the same speed
12:29 PM
@Mast IIRC it was never dedicated (the sole reason for a close reason). It's still there just under authorship. "and that the poster know why the code is written the way it is."
I went from 8GB to 32 GB, had to replace all so I went with the higher speed for the Motherboard specs
Chrome isn't liking this at all, none of my tabs would load and most still won't load
none, none will load in Chrome, not even new ones
had to restart it again
Yay Windows.
RAM is so slow by the way.
@DerKommissar what do you mean by that?
I mean it's slow. DDR4-3600 is running a bandwidth of 230Gbps, I have experimental fiber NIC's faster than that.
I only have DDR3
it's an old machine
12:50 PM
I don't remember if mine is DDR3 or DDR4.
Speed is 2133Mhz, still only 136Gbps.
I needed more for my editing software. and hopefully it will make Minecraft better too!
@DerKommissar Look at your DDR version and latencies.
Mine is DDR4 according to CPU-Z.
CAS is 15, which is pretty quick for DDR4.
Graphics Cards are so expensive, I am holding off on upgrading that until the last moment
@Peilonrayz It was never a dedicated reason, but it was more explicit.
12:52 PM
@Malachi I have a 1080TI that does Folding@Home right now.
@DerKommissar Indeed.
The actual clock on the RAM is 1066, because it's dual-channel.
Got a GTX 1660 Ti that's more than sufficient.
And my GPU has 11G dedicated.
why do they call it folding?
12:54 PM
@Mast True, but it was problematic when people are asking for an explanation of their own code. "Questions seeking an explanation of someone else's code are also of-topic."
@Malachi Because the math is about "protein folding"
@DerKommissar IIRC it's because it's double datarate. It triggers on both edges, hence doubling the clock.
@Peilonrayz I know.
@Mast Maybe, I could be wrong there.
I mostly don't care: it's fast enough and I don't have any issues.
I used to develop HDL applications dealing with DDR.
Protein folding is the physical process by which a protein chain acquires its native 3-dimensional structure, a conformation that is usually biologically functional, in an expeditious and reproducible manner. It is the physical process by which a polypeptide folds into its characteristic and functional three-dimensional structure from a random coil. Each protein exists as an unfolded polypeptide or random coil when translated from a sequence of mRNA to a linear chain of amino acids. This polypeptide lacks any stable (long-lasting) three-dimensional structure (the left hand side of the first figure...
There's a lot we don't know about how proteins fold yet. If they fold wrong, **** happens. So we want to know how it should've been folded, how to fold it correctly and how **** happens when it went wrong.
that sounds way too complex for me...lol
I am getting back into coding again, FINALLY! doing automation for our testing finally
after 2 years at this place trying to facilitate getting us to a place where we can automate on reasonably stable code.
12:58 PM
had to figure out what we test and where, (or what we should test and where)
and processes for what happens afterwards and beforewards
@Malachi I do it on and off as a hobby, but I'm not particularly good at it.
Fold.It is a puzzle game doing it by hand (helped by Lua scripts), in 3D.
I love automating tests, just haven't done it much
@Malachi Same here.
Maintaining automated tests is a pain in the behind if you don't review your code every once in a while.
@Mast that is part of my initiative, getting to the point where my team understands the reasoning behind code reviews and code quality and stuff like that.
I think it's part of the reason why they made me a Lead here, because I can bridge the gap between development and QA
1:32 PM
@Malachi That's an important skill.
2:27 PM
Q: Convert linq query to data table

mehdiI need to convert my query to data table i'am using this method to convert it but don't work with me he give me this error 'Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'System.Collections.Generic.List'. An explicit conversion exists (are you missing a cast?)' So i n...

@Mast @pacmaninbw Why is this off-topic? I'm not really seeing it, is it cause they don't have a var moment = require('moment');
Questions asking for general improvements ("How do I improve my code") are better suited for Code Review. — Shepmaster 27 secs ago
2:47 PM
@NikitaMadeev would you be interested in doing a code review for me (I will pay you for it)? — Jacek Wojcik 23 secs ago
Q: Splitting list into chunks then writing the data into a file concurrently

John Smithi have a very simple code that reads a list of bytes, splits it into chunks of an exact size and stores them in another list, then a separate function that reads those and writes the data to a file. these 2 processes happen at the same time. i cannot have any piece of code freezing and waiting fo...

posted on June 02, 2020 by valentin diverchy

I've a bit of experience with the SDL lib, but for my new project I need to play some sound in my program so I decided to use SDL-mixer. At first glance it works fine when I'm using Mix_Music pointer, but it isn't working with Mix_Chunk. Though compilation is running fine, the program is crashing right after launching. I have first coded the thing of my own following a bit of doc,

3:15 PM
Q: N-Body Optimization

Marius PopescuI've created a serial C++ code for gravitational N-Body calculation. Because I expect to have upwards of 8-71 sparse bodies (ie, where Barnes-Hut is not necessarily practical) and running for long periods of time, I want to make as much use of parallelization and vectorization as possible. I did ...

@Mast I've gone through their answers. They should be easier to read now, and should all have at least one insightful observation.
3:43 PM
Q: How do I shorten my Rust code to get integer values from regex named capture groups?

igor.solI am completely new to rust. My first rust code is simple text filter application for parsing log file and accumulating some information. Here is my code: //use std::io::{self, Read}; use std::io::{self}; use regex::Regex; fn main() -> io::Result<()> { let re_str = concat!( r"^\s+(?P<...

3:53 PM
4:33 PM
@Peilonrayz I don't remember, but probably at least in part because there is no description. No spec.
@Mast Oh, so it's UCWYA rather than MRC
4:45 PM
Code Review is the place to ask for improvements in coding style of working code. — Barmar 39 secs ago
@Peilonrayz I suspect it was both the missing include and missing spec that nailed it. I don't know if we hit MRC all 5 or if MRC was just the majority, SE made it awfully hard to review reviews with the new UI, but UWYA would've worked too.
Have you considered taking your problem to Code Review? — Michael Litchard 56 secs ago
VTC: MRC, user is 410 Gone
@Mast CBL? Code Belongs Linline
@Peilonrayz Code behind link
4:55 PM
Sorry, that's poor humour.
I've not talked to Simon (I hope I'm remembering that right) enough to remember these acronyms ;_;
But CBL is basically the bold part of AoC: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is.
Yeah it's annoying having one close reason house three close reasons. It doesn't really make sense when you say it...
True, but we only have so many.
If they'd only give us 8 or so...
4:59 PM
That would be too simple
5:12 PM
@Mast What are the names you use for the close reasons wanna make sure I am remembering them 'correctly'. AoC {AoM/authorship, CBL, ???}, CNIONWAI {broken, CNI}, MRC {context {pseudo, stub, hypo, obfuscated}, GBP}, UWYA
@Peilonrayz I don't like CNIONWAI. CNI or NWAI could both work for it, but it makes no sense together.
But at that time it's easier to say it's broken, borked, not working, whatever.
Q: Unscramble words faster in Python

AdamSo I'm currently using python to unscramble words that are retrieved from an OCR program. The current code I am using to unscramble words is this: import numpy as nm import pytesseract import cv2 import ctypes from PIL import ImageGrab def imToString(): # Path of tesseract executable...

Sometimes it is a combination (half the code missing and the other half broken), but typing that all out and remembering where the characters go...
But this is a good start
VTC	    Vote To Close
AoC	    Author of Code
MRC	    Missing Review Context
UWYA	    Unclear What You're Asking
@Mast Yeah, I've never been much of a fan of CNIONWAI, it's 'uge. ;)
AoC can be split up in CBL, not his code and lacking explanation.
But putting those last 2 in acronyms...
@Peilonrayz Looks Japanese to me.
Or a dialect of LOLCODE
5:27 PM
@Mast lacking explanation? As in asking for an explanation
I think we use authorship for "not his code"
Not ready for review
A variation of Broken
Dunno, acronyms either come naturally or not.
I mean, take this question. It would make a wonderful question, if the code was actually doing what it should be doing. And OP doesn't know.
I'd love to see him come back once it actually works. With a bit of clean-up it might even do well on HNQ.
After the edit it looks like they've got it working. But IDK C++
Me thinks it's a tad too long for HNQ, if it does get there it'd not stay.
Probably, doesn't change that I'd like it to survive there for a while.
Yet, wishing doesn't make it so.
Yeah, HNQ is biased to short and basic questions, which is a shame.
Yes, a lot of questions that should actually be downvoted for their lack of quality/research show up on there, networkwide.
6:07 PM
Q: Separate states of LED blinking and user clicking button on microcontroller

Colorful CodesI am working on a microcontroller, Azure Sphere, and I want to separate the state of the button being clicked and the led light blinking. Originally I had sleepTime set to {0,100000000} in order to capture the user clicks more accurately, however, that is not efficient. how fast the LED blinks ...

This is more of a Code Review question, but I guess you could make your map Map<String, Integer> and do System.out.println(score.get(grade.get(i))) and for the first part, use score.values() to get a set of all the grades possible — user 43 secs ago
Greetings, all
6:22 PM
Monking @Sᴀᴍ
@Mast I have retracted my vote to close. The have added unit tests. codereview.stackexchange.com/questions/243268/…
@Peilonrayz I forgot to tell you this, but thanks.
@pacmaninbw It will have to do. Retracted mine as well, even though it's still a bit iffy.
True, but it basically a good question.
6:38 PM
@Mast Np ^^
6:55 PM
Q: Replacing all keys found in a dictionary for its value in a list

RegularNormalDayGuyI have a file that is written DOS format and I need to replace some characters into others. I created a dictionary for that purposes, and now I have to read everyline from my stream and replace my values as I go. I created this piece of code in C#, however, I highly doubt that this is the way to...

I’m voting to close this question because it belongs to codereview.stackexchange.comSergey Berezovskiy 56 secs ago
7:43 PM
Q: Feedback on simple DFS

RohitGI am implementing a simple recursive Depth-First Search algorithm on graphs, using StateT and ReaderT for encapsulating all the required information. Pre-requisite definitions type Vertex = Int type Cost = Int data Edge = Edge { vertex:: Vertex, cost:: Cost } deriving (Eq, Show, Ord) newtype G...

8:07 PM
Q: Is there any solution to make my code more clean, efficient, and/or shorter? (Calculator Script)

DanielP533I written my own calculator script in javascript! It is a basic one, but works really well. I am just wondering if there is any way to make this script more efficient & clean. On first look, I feel like I did some redundant stuff in it, however I am a beginner and in no right to judge the code on...

I have put it on codereview, thanks — Matthew Stott just now
Greetings, Programs.
8:24 PM
Greetings, @Donald.McLean
If your code works as intended and you're looking to get advice on improving it then that seems like it would be abetter fit for Code Review. Stack Overflow is for code that isn't working as intended for one reason or another, so unless you actually have a specific issue with your code this is off-topic. — Mihai Chelaru 43 secs ago
how is space doing?
my son excitedly watched the launch Saturday
Q: Working out how many hours worked after a certain time

Matthew StottI am working on some custom rules in a time managment system and need to know how many hours in a shift have been before a certain time (19:00pm) and how many hours after. Shifts can start in the evening and finish in the morning so need to take that into account. So far I have the below (this i...

8:55 PM
Q: Pivot some rows to new columns in DataFrame

RafI'm after a pythonic and pandemic (from pandas, pun not intended =) way to pivot some rows in a dataframe into new columns. My data has this format: dof foo bar qux idxA idxB 100 101 1 10 30 50 101 2 11 31 51 101 3 12 32 ...

9:10 PM
@SᴀᴍOnᴇᴌᴀ Me too. Still getting ready for JWST launch, and we started work on the Roman Space Telescope.
Q: MMMRjs codereview

NANONow the thing is that I usually use Python in my projects but in this one, I am forced to use Javascript. I have seen this library which I think is pretty good and simple It is called MMMR.js Now normally if you want to use Mean, Median, Mode, Range in Javascript you have to manually program it...

9:32 PM
@CaptainObvious : AOC
If your code runs fine and efficiency is a concern, you can post it here for reviewEmma 43 secs ago
@SᴀᴍOnᴇᴌᴀ darn and I had tips ready :)
@CaptainObvious RBA
@CaptainObvious I feel bad for the OP
"I might remove my question but can you also answer what I asked or tell me a site where I can post this question."
I should have invited the user to join chat before the question was deleted
10:02 PM
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — Paul Roub just now
I’m voting to close this question because this is more appropriate for Code Review — Paul Roub 25 secs ago
Q: Pokemon Journey

Chase - Winner PlayzOK, you don't really have to read it all, but I think you get the basic Idea. Does anyone have anything small that could make my code better? I just found out about "global" and "lower()". Is there any small thing you can give me that could improve my code a lot, or at least save me some time? g...

Q: MMMRjs a product of BYTES Genesis

Syed Mohammad SannanHello there, I am Syed Mohammad Sannan a team member of BYTES Genesis We have published a product today called MMMR.js this product is licensed under the MIT license and is built by Syed Mohammad Sannan The uniqueness of this product is that it is built with and for Javascript though there ar...

@CaptainObvious wow what are the odds?
Woah I just asked a review about you guys just after I deleted it you asked it yourself what a coincidence. — NANO 5 mins ago
10:29 PM
@SᴀᴍOnᴇᴌᴀ Yeah, the OP seemed nice. Hopefully NANO comes back to give us another go
11:22 PM
Code Review may be a better place to ask. — usr2564301 21 secs ago
11:51 PM
@Peilonrayz @SᴀᴍOnᴇᴌᴀ New Disney feature cartoon "In sear of Nano"?
@CaptainObvious Do we tell them about the license?
@pacmaninbw I think it's a bit too late for that now, D:
But given that MIT is more open than CC BY-SA I'm not sure they'll mind it
maybe we should leave a comment... like "BTW per the legal page all content posted here is licensed to SE under CC BY-SA 4.0 - refer to the Subscriber Content section of stackoverflow.com/legal/terms-of-service#licensing";
it is interesting the terms like "Stack Overflow" haven't been changed to "Stack Exchange", since the "legal" link on other sites points there

« first day (2586 days earlier)      last day (39 days later) »