« first day (2498 days earlier)      last day (1521 days later) » 

12:00 AM
RELOAD! There are 6408 unanswered questions (90.1384% answered)
 
12:13 AM
@MisirJafarov DO NOT TELL PEOPLE WITH BROKEN CODE TO POST ON Code Review. Broken code is strictly off-topic there -- only working code is eligible for review. — mickmackusa 30 secs ago
 
@Duga wowzers
 
@Duga Nice! Their edit, explaining how to vote, is good too :D
 
12:56 AM
1
Q: Subclass instance recorder in Java

Cyber_AgentI've written a relatively small abstract class in Java which keeps track of all instances of it's sublasses. Any class which extends this abstract class will automatically have all its instances stored (via a weak reference) in a Set, which can be retrieved if a subclass ever wants to get referen...

 
1:15 AM
I haven't cost me any problem yet. But when using similar to we can use regex, so I was wondering whether there's simiplified regex version here with similar to. Cuz when my colelagues are doing the code review, they might say it's not simplified enough.. — Cherry Wu 35 secs ago
 
1:40 AM
As already suggested, you should ask this kind of review questions on Stack Exchange Code Review. — BionicCode 49 secs ago
 
 
1 hour later…
2:50 AM
0
Q: Count SQL query to LINQ code

AdrianIm doing a Count method using SLQ query but i want to transpose this into a LINQ code here's my sql query code: SELECT DEPT_NAME,JS_TITLE, SUM(CASE WHEN MALE = 1 THEN 1 ELSE 0 END) AS Male, SUM(CASE WHEN MALE = 0 THEN 1 ELSE 0 END) AS Female from DEPTS left join EMP on EMP.DEPT_ID = DEPTS.DEPT_...

0
Q: Handling custom exceptions in a Python script

Gabriel De LucaI am not a developer, but I needed to write a script. So I wrote it, and published it: https://github.com/gabriel-de-luca/simil/blob/master/simil.py I am open to review it completely, but I would particularly like to consult on the way I am checking the validity of the data. The main funct...

 
 
2 hours later…
4:26 AM
Its better to ask your question here - codereview.stackexchange.comHimanshu 20 secs ago
 
5:17 AM
 
5:50 AM
Monking
 
 
1 hour later…
6:55 AM
possible answer invalidation by Ankit Jaiswal on question by Ankit Jaiswal: codereview.stackexchange.com/posts/238148/revisions
 
7:34 AM
Hi -- there is also a Code Review stack exchange here where you might get some help: codereview.stackexchange.commrblewog 53 secs ago
Also I can change my vote later. Because I've shared both the solutions to my tech lead. She'll do the code review. — Tanzeel 23 secs ago
 
8:27 AM
Monking
@Duga I'd argue the answer arrived early, but this can go both ways.
For now, let's leave it alone and see if anyone complains.
@RMunroe No alt text? What's wrong with you today...
He forgot to write one.
Technically XKCD's have sapped titles and alt text, but, you know...
 
9:09 AM
You don't seem to have a specific problem. If you want a code review of your script, you may want to try CodeReview instead. — Aserre 17 secs ago
 
Greetings!
 
Monking @Alex
 
I haven't been here for a while. How is it going here?
 
@AlexV Most days it's a bit more quiet than it used to be, but we're doing ok I think.
 
9:34 AM
@Mast Academia, or at least the robotics and computer vision community, has quite some conference paper deadlines in February, March and April. So that's my "excuse" for being a bit less active ;-) But I frankly don't know how much of the CR community come from that background, so that maybe does not really generalize to a wider context.
 
@AlexV That could be part of it, sure. And then there's the dumpster fires on Meta.SE that cost us some users.
 
10:07 AM
I created a pull request, my tech lead did a code review of both the answer. And we agreed upon that this solution follows the best practices and structure-wise also it is correct. It will be easy to make changes if required in future. Tough I had to rename some variables username. ;-) — Tanzeel 27 secs ago
 
@Mast What's not to like about a little dumpster fire...
 
 
1 hour later…
11:31 AM
Monking
 
Monking
 
 
2 hours later…
1:22 PM
0
Q: Chunking strings to binary block-based output

EdwardThis is a follow up to Chunking strings to binary output I found the reviews quite helpful in pinpointing what to fix with my code. Here's the result of that update. The format of the output is the same as documented there, but to briefly recap: The stream format consists of blocks, each 256 ...

 
2:00 PM
0
Q: Generate a ColumnDataSource for a bokeh histogram hover displaying the names of the units in each bar

QaswedI came up with the following setup_cds function as a solution to my own SO question. My question is: how could I improve it (especially the joining of the names looks a bit clumsy to me)? (And is there really no other function in bokeh etc. doing this?) import hvplot.pandas from bokeh.models imp...

 
2:17 PM
“Secured” against what? Monkeys flinging their poo-poo at it …? Please go read How to Ask. It makes rather little sense to ask this way to begin with - you would have to specify criteria for what is considered “secure” or “insecure” first of all. But then, these kind of code review questions rather do not belong here in the first place. — CBroe 11 secs ago
 
2:37 PM
0
Q: Database design for Instagram-like post/comments

ettsI'd like a review of my design for an Instagram-like application where users can post and comment on pictures. I just finished a freecodecamp crash course on database design and this is the first ERD I make. If you also have suggestions for readings on this topic I'd appreciate it. This is m...

 
2:48 PM
SO is focused on question-answer and is not good place for discussions on approaches or implementation. Try codereview.stackexchange.com or probably reddit for great discussion. — skyboyer just now
 
3:14 PM
Try posting this on codereview.stackexchange.com — Michael Bianconi 28 secs ago
 
0
Q: Shell Script for wireguard management

Prajwal KoiralaSo i am trying to add a usage on my shell script and i need some help Original Script: https://github.com/complexorganizations/wireguard-manager Usage issues: https://github.com/complexorganizations/wireguard-manager/issues/170 function usage-guide() { echo "usage: ./"$(basename "$0")" [opti...

0
Q: Better pythonic way to pass condition to multiple functions

Gaurang ShahI have the following scenario where most of my functions require to return different things based on a condition. def get_root_path(is_cond_met=False): if is_cond_met: return "something" else return "something else" def get_filename(is_cond_met=False): if is_cond_me...

0
Q: Is there any more efficient way to code this “2 Sum” Questions

ChristiantoGiven an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 < index2. Please note that your returned answers (both index1 and index2 ) are not zero-b...

 
Ryan Donovan on March 06, 2020
Welcome to ISSUE #12 of The Overflow, a newsletter by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams of React Training. You can read more about it here. In this week’s newsletter, we’re seeing what’s up with Blazor, wondering if it’s legal to crack MD5 hashes, and making the most of our JavaScript console.
 
3:36 PM
0
Q: Avoiding assignment in if statement

AoradonI am writing an express endpoint that edits an entry in a database. It has one required field "url" with many optional fields. To accomplish this I stacked if statements like: router.post('/', (req, res) => { let { url } = req.body; if (typeof (url) !== 'string') { res.status(200).json({...

 
Monking
 
4:05 PM
Monking
 
Monking
 
0
Q: Are my calls to an api well designed?

CarlosDnlI am working on a personal project in which I must consume data from different Rest Api, but I am not sure if I am doing it in the most efficient and safe way, public class consultarActivosFijos extends AppCompatActivity { private EditText eCodigoIngresado = null; private TextView tDesc...

 
4:37 PM
Monking
 
4:52 PM
-2
Q: Laravel 5.7 looping and creating columns on each row

Victor MelvinI want a method that post from the route in my submitFiles() Javascript that will loop through and create a contact, account name, organization for each row , using the column names associated with each value. I need to know the correct @each PHP syntax for Laravel 5.7 Javascript s...

1
Q: Concisely, robustly, temporarily stashing c++ iostream formats

jthillI got tired of the boilerplate and tedium restoring formatting context, so I made an RAII stasher that relies on the destroy-at-end-of-full-statement temporary semantics. With C++17 I can get it down to a single type, no helpers: #include <iostream> template< template<typename, class> class stre...

 
5:09 PM
posted on March 06, 2020 by CommitStrip

2
 
1
Q: bash script to bulk decode files

user219820I have written script that does the following. It uses cbl-log program to decode several log files in binary format. cbl-log only decodes 1 file at a time, so the script decodes files in bulk. If no arguments are given, it assumes log files (with extension .cbllog) are in the current directory, a...

 
@CommitStrip That's gold 😂
 
5:21 PM
@CommitStrip That's evil. I like it.
 
There are a lot of nested subscriptions, which is never a good sign. And it's hard to tell what's going on as all of the code is all mixed in together. If you can't recreate the problem in a stackblitz, you're not going to have much luck asking such an open ended question here. You're basically asking for a code review, which is best done elsewhere. — Kurt Hamilton 36 secs ago
 
 
2 hours later…
7:23 PM
IMO this belongs on Code Review: your code works, and you seek improvements or constructive feedback. SO is more suited for code that doesn't work, or "how to" questions. — Amy 13 secs ago
 
0
Q: Neural Network from scratch in c++

DMSI started writing a neural net from scratch about a month ago for fun and to learn better how they work. I think that it's close to being in working order but I'd like to have a second set of eyes look over my code and see if they can point out any errors or misconceptions in my code. I think tha...

 
This question would be more at home at codereview.stackexchange.com . — Teemu 35 secs ago
 
7:43 PM
-1
Q: C# - What should I do with empty if-brackets?

MajsI've ended up with some pretty ugly code while doing some bitmasking: if (BitmaskIntersection(north, south, west, east)) { } //Logic is executed inside these methods, and return true or false. else if (BitmaskTCross(north, south, west, east)) { } else if (BitmaskStraightBend(north, ...

0
Q: Tic-tac-toe game in Pythom

Lewis T.As a basic project, I've programmed the game of noughts and crosses (tic-tac-toe) using classes. I made three classes: Board, Player and LazyRobot, as well as the main game file. I would like to know any improvements to code or any best practices I have neglected. I know there is some repetition...

 
8:02 PM
0
Q: HSL Guessing Game in Svelte

shreyasminochaThe objective of the game is to guess the hue, saturation, and lightness values of a given color swatch across ten rounds. https://github.com/shreyasminocha/guess-the-hsl https://guess-the-hsl.now.sh This being my first svelte project, I'd like some insight into best practices, especially sve...

 
8:21 PM
-2
Q: Faster way to count the number of discrete values in a slice?

Nathan F.I'm using this right now to count the number of discrete values in a given []string. Is there a faster way to do this? func CountDiscrete(x []string) int { discrete := 0 for i,xi := range x { is_discrete := true for j,xj := range x { if i != j { ...

0
Q: PHP OOP registration & login System

Ryan StoneTrying to build out a login & registration system using PHP classes & object oriented programming, Can anyone please comment/review and suggest any improvements that could be made.. I realise theres quiet alot to review or read through so I appreciate anyones time or input to this code. Core/Ini...

0
Q: Javascript Anime Support Switch Statement for .animate() Api

Ryan StoneThis is a revision of a previous question that I asked, with new aspects that I have learnt in Javascript. It is I think better than the previous implementation as it is using switch statement's which will only run if certain conditions are ment, which means a performance gain I guess.. Can anyon...

 
9:18 PM
0
Q: Exercise: Reading from doubles from a file and printing mean, max and min (from Programming Principles and Practice using C++)

SAJW Read a sequence of double values into a vector. Think of each value as the distance between two cities along a given route. Compute and print the total distance (the sum of all distances). Find and print the smallest and greatest distance between two neighboring cities. Find and print the m...

 
9:35 PM
@CaptainObvious linked original question now has a bounty that seems like an off-topic request.... maybe I am just thinking back to off-topic on SO...
> Not Enough documentation about for the vanilla javascript .animate() Api as far As I can search for it, start a bounty on this to increase discussion & collect useful links, Articles, Answers & references..
actually the post itself seems off-topic because the OP copied code from other sources and doesn't understand the regex
> My concerns with the code is that I copied the first snippet from a blog post and I don't fully understand the RegEx that is used within it. I'm finding Regex very, very difficult to learn and is kinda confusing. Can anyone point out to me what tem and ua mean? guessing ua is shorthand for user-agent.
what do we do if we can't VTC since it has an open bounty??
 
possible answer invalidation by Cyber_Agent on question by Cyber_Agent: codereview.stackexchange.com/posts/238461/revisions
 
@Duga rolled back
 
this would be better suited for CodeReview and not StackOverflow. Secondly, instead of doing a billion if statements or switch statements or array mapping or any other conditional logic, if there's any reason why the numbers are what they are it would be better to write an algorithm. — zfrisch 58 secs ago
 
10:01 PM
@SᴀᴍOnᴇᴌᴀ flagged it per
17
A: Flagging question that has open bounty?

Martijn PietersYou'd flag the question; use other and explain why you think a moderator should look into the bounty. I recently flagged a bountied question with: This is clearly off-topic, but I cannot VtC; can the bounty be removed and the question closed please? and a moderator refunded the bounty and c...

 
10:15 PM
0
Q: Storing and calculating extremely large/small numbers in C# using a Scientific Notation struct

Erik OverflowI've been working on an incremental game that I will need to store extremely large scientific numbers. as a part of this game, precision is only important for numbers within similar magnitudes. If a number is 10^20 times larger than another one, then adding or subtracting these numbers has a "neg...

 
10:34 PM
0
Q: Logging an exception in Splunk

Kulwant SinghI am working on a production application and want to do proper logging in Splunk for an error scenario. Should I add logger.error or not, because the message is already been printed with exception stacktrace? Validate.isTrue( !CollectionUtils.isEmpty(filteredGames), "No games found for [customer...

 
10:53 PM
0
Q: Python docstyle for attributes in OOP classes?

infomin99I'm wondering how I should be writing the docstyle for a class if all it needs is 3 attributes to define this class (with the rest of the attributes from the parent being default set): class ExampleModel(BaseModel): """ Example Model. Attributes: - a (int): ... - b (...

 
Yes - array mapping, utilizing functions, etc. but this a question for CodeReview, not StackOverflow. — zfrisch 16 secs ago
 
11:38 PM
All code needs to be posted here directly as text. Also note, this site is primarily for fixing broken code. If the code is complete and works, it should be posted on Code Review. Note though, they also require that all code be in the question itself. — Carcigenicate 10 secs ago
 

« first day (2498 days earlier)      last day (1521 days later) »