« first day (2416 days earlier)      last day (41 days later) » 

12:00 AM
RELOAD! There are 6299 unanswered questions (90.0852% answered)
12:16 AM
Hey Roman! Is there actually a specific issue here? Something not working? Otherwise, this might be better suited for code reviewUkraineInTheMembrane 56 secs ago
Better formatting makes the difference that you don't look like a careless amateur. Using the most restrictive types possible avoids errors, and gives your code a chance to survive a code review. — gnasher729 15 secs ago
1:03 AM
(Wait for the hat.)
Boom there it is
I should save this picture and make it permanent.
@MathieuGuindon I feel guilty for a lot of things I have and haven't done.
1 hour later…
2:27 AM
Q: A Class to Supply an Open Database Connection during the life of a Web Request

onefootswillFor some database requests, I like to use raw ADO.NET. In the context of a web request, I have created a class which provides an open IDbConnection object. I use a Dependency Injection library ("DI") to do this, scoping the object instantiated from this class to a web request. So, disposal of ...

1 hour later…
3:50 AM
Q: A better cryptography process

jennifer ruursI am experimenting with cryptography and I was wondering if somebody has some suggestion how I could improve my code and methodology. I want my process to generate more securely the cryptography process if that is possible import java.security.GeneralSecurityException; import java.security.Key;...

Q: A generic file helper for my future projects

docyodaI am learning Python and I know that a lot of my future projects will be based on files and managing them. How does this look? Is anything in here redundant or overcomplicated? import os import zipfile import shutil from datetime import datetime as dt class File: def __init__(self, path, d...

1 hour later…
4:56 AM
@AlexZavatone There's a button with opposing arrows and a tooltip that says "Show or hide Code Review." Click that. — Caleb 33 secs ago
5:15 AM
Q: Optimizing/parsing files into semi-complex data-structures more efficiently

Riettyto preface, I'd like to say that this code is part of the Advent of Code 2019 solutions I have been working on. Particularly #14. For this particular problem I have the following input formatting: 9 ORE => 2 A 8 ORE => 3 B 7 ORE => 5 C 3 A, 4 B => 1 AB 5 B, 7 C => 1 BC 4 C, 1 A => 1 CA 2 AB, 3...

1 hour later…
6:37 AM
Q: Chess game - how to correctly implement moving of pieces?

pavelStarted coding a simple chess game yesterday and so far everything is working all right, although I haven't gotten very far, really. I have a board, have all the pieces created, I can select a piece with a mouse (previous testing version did printouts of what piece I had selected so I'm confide...

Forgot to say: This might be off-topic for Stack Overflow. Try codereview.stackexchange.com, maybe? — Alexander Cécile 10 secs ago
2 hours later…
8:41 AM
Q: Cache most expensive data using Redis Cache in an ASP.NET Core project

AlexeiOverview I have developed a small ASP.NET Core 3.0 Web API that provides information that is rarely changed (several times a day), but often read (~ 10 K / day). Although the traffic is quite small, it was a good opportunity to use Redis Cache and the Stack Exchange client. I want to achieve t...

2 hours later…
10:40 AM
Considering you have provided written evidence for measuring performance between yours and LINQ and that your question starts with "What can I improve" and ends with "What exactly is better" gives the impression you are seeking help with code code-optimisation or at least code review. Both of which if so are sadly off-topic for SO. It may be better suited for another SE site but be sure to read the relevant FAQ; and/or re-wording your question as necessary before cross-posting. How to Ask. Good luck! — MickyD 7 secs ago
Q: Best way to show image from rest api response in vue.js

Roman ShevchenkoI have Rest api written on laravel and front end on vue.js. It is dashboard for ecommerce store where you can connect to post shipment service api to upload order shipment data and get tracking number(with .png label). So after i receive tracking number label from post service api i need possibil...

11:04 AM
Well, this poor question went HNQ...
Q: How to receive any function prototype in the class?

Hyunsooclass A { std::function<int> func A(std::function<int> _func) : func(_func) {} void Call() { func(123); } }; In this case, I can give only the function which is consist of non-return with integer parameter. I'd like to receive any function form that may has int parameter, double par...

@DerKommissar Welcome back, comrade.
@Mast I thought the requirement was that a question should have at least a net 3 score. My "will this go HNQ?" checklist has been ruined!
@Peilonrayz It's more about edits, comments, answers and having at least a positive score IIRC.
net 3 score on top of that highly increases the likelihood.
That specific question is currently at +2/-2, who knows.
Yeah I thought 2 answers + 3 net score = likelyhood of going HNQ. But clearly the bar's lower than that
11:13 AM
@Peilonrayz They may have lowered it.
possible answer invalidation by Vogel612 on question by adot710: codereview.stackexchange.com/posts/219039/revisions
@Mast Maybe. Maybe there's low site activity today 🤷‍♀️
@Peilonrayz Oh, right, part of the score is based on relative activity nowadays. When there's less activity, the bar is lower.
Also if you are still in doubt about your code -> codereview.stackexchange.com you can get a code review. — panoskarajohn 38 secs ago
Q: Basic peak editing with matplotlib

Péter LeéhUsually I have really noisy datasets, so peak detection is quite hard to do just with coding. However the human brain immediately sees what is just random noise. I decided to make a basic peak editing functionality with matplotlib. I added a toggle button to the navigation toolbar to switch on an...

11:29 AM
Pretty sure your post is still seeking code review. You might want to review your first comment too and your baseless accusation — MickyD 6 secs ago
I'm voting to close this question as off-topic because this question should be posted on StackExchange site Code Review instead. — AndrewL64 56 secs ago
1 hour later…
12:57 PM
@DerKommissar Welcome back. With that picture you really do look like a Kommissar
It makes me think of this 1980's song. youtu.be/8-bgiiTxhzM
I have a question for y'all. I'm working on a Firefox web extension that has both javascript and C++ parts.
My inclination is to post it as two cross-linked questions.
Does that sound OK?
@Edward Tell us more and we can tell. Is it a client-server idea?
It's actually a toy that might be of particular interest here.
It's a one-click extension of my autoproject code.
Q: From new Q to compiler in 30 seconds

EdwardReviewing code doesn't necessarily require actually building it, but it's often helpful to do so in order to evaluate fully. I usually create a CMake project and build from there. Since we're all about code here, naturally, I decided to automate part of the process. Specifically, here's how to...

I think the C++ portion is pretty solid, but I'm not very confident about the Javascript
@Edward Both are allowed languages I can't see why it'd be off-topic. I would agree with your idea to post them as separate questions. I've never been a fan of multi-language questions - but that opinion might be subject to sample bias.
@Edward Oh, that project. A cross-linked question would make sense, yes. Problem with a cross-linked question is that duplication of information is inevitable and shouldn't be avoided.
So, explain the project in both or link from both to a question that explains it, or it won't make much sense.
1:13 PM
@Mast It probably doesn't make much sense even if I do explain it.
Thanks, I'll plan on posting it as two pieces.
The original also had Python and C++ pieces.
I'm surprised you're still working on it.
I use it all the time.
Ah, and it gets the job done?
Open repo on github if you're interested.
Yes, it works well, but I wanted to see if I could make it better.
I haven't checked in the browser extension portion yet.
It's not finished.
@Edward Interested? Yes. I also got a backlog a mile long, so...
1:17 PM
@Mast I understand. I should be working instead of playing right now.
That's pretty interesting, I was thinking of doing something similar
@Peilonrayz You're welcome to start with this and adapt it to your own purposes. I'm deliberately writing the browser extension to be somewhat modular so that it's easily adapted.
So if somebody wants, for example, to only pick out Fortran questions...
it could automatically schedule an appointment with a psychiatrist.
I learned a lot along the way, too, which is always fun.
I'm never likely to fall in love with Javascript, but it's a remarkably complete language these days.
@Edward Not that I've used Fortran since college (BS in 1985) but what's wrong with the language? :)
1:23 PM
Nothing except that it's ancient.
True dat.
It's kind of like BASIC. Once very popular but it tended to promote really terrible (by modern standards) programming practices.
Like GOTO and single letter variables.
Don't forget global variables.
There's another kind?
1:26 PM
It's odd that they renamed Version Comparison editor to Code Review. That sucks. — Alex Zavatone 17 secs ago
@Edward Is your hat from the Sorcerers Apprentice?
@pacmaninbw Dunno. It's a Secret Hat. :)
1:52 PM
Questions about codereview is better asked at Code ReviewJens 58 secs ago
2:11 PM
Q: Java 8 use of optional

valikI have two methods i will like to improve using optional and any other tool, @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User user = userRepository.findByUsername(username); if (user == null) { throw new Use...

2:32 PM
Q: Output the top N toys mentioned most frequently in the quotes

thadeuszlayThis question was asked during an interview as a software developer: Task: You work on a team whose job is to understand the most sought after toys for the holiday season. A teammate of yours has built a webcrawler that extracts a list of quotes about toys from different articles. ...

1 hour later…
3:44 PM
@Edward Sometimes KISS is better than the modern languages. ;)
@Edward How many modern languages still have goto though?
@DerKommissar Most of 'em, I expect.
They were fine for their time and purpose. Like Latin.
I'm mostly just poking fun.
My Fortran is rusty but it wasn't so bad.
I haven't done anything in Fortran since it was FORTRAN.
How did your Thursday appointment go?
Fine, which is not great lmao
Oh, well I hope it has a happy outcome for you.
4:04 PM
@DerKommissar Under the hood, every conditional jump is a goto.
@Edward It won't be so bad. I either end up with a new job or not, but by choice.
possible answer invalidation by rolfl, Rich Musk on question by Jameell: codereview.stackexchange.com/posts/200540/revisions
That was me ^^^ It's OK... promise.
4:25 PM
I thought you changed your name to 'rolfl, Rich Musk' lmao
blame the monkey!
@Mast Yep.
4:56 PM
Q: Add application root to path

mosheviI am creating a package to be used in our company that adds the root of the project to the system path. I will add a source_root.config file in our root directory. import sys import inspect from pathlib import Path from inspect import getsourcefile CUR_FILE = Path(getsourcefile(lambda:0)).nam...

@Edward I think you'll find Latin has far outlived (and continues to outlive) its own original times and purposes. ;)
5:17 PM
Q: Golang checks for equilateral, isosceles, or scalene triangle

badukerFor me, learning the basics of a new programming language is best done through some easy to intermediate challenges. Here's one that's rather well known and relatively simple - determine if a triangle is equilateral, isosceles, or scalene. Here's my try in Golang. Since I'm totally new to Go, I'...

5:48 PM
Whenever the next answer invalidation report by @Duga shows up, please ping me.
@rolfl ^^^ Wanna go to work? :D
@SimonForsberg - I edited it in the edit review queue, so both edits went through at the same time. May be the reason.
@rolfl I'm not interested in why that one showed up, I just want a new answer invalidation report
If you make one, please ping me :)
5:51 PM
Oh, and hi!
Q: Comparing two simple distance calculating algorithms

unknown_dcbaIs the single method printMaxDistance_a or the two methods printMaxDistance_b AND printMaxDistance_c better or respectively "more readable"? Thanks. public static void printMaxDistance_a(String s) { int first = 0; int second = 0; int max = 0; for (int i = 0; i <...

Q: nodejs 401 request retry mechanism

Abhay SehgalI'm working on a project in which I have a backend in nodejs and from there I need to call external APIs, those APIs require authentication token which is valid for 15 minutes. So if response status from external APIs is 401 then I need to generate a new token then call the request. In my backen...

2 hours later…
7:29 PM
@CaptainObvious I am surprised at how many people find the tag
1 hour later…
8:43 PM
Q: Reload polyline midpoints into parallel tables

User1973I have an Oracle GIS database that has spatial tables. The records in the spatial tables have a geometry column that contains polylines. I've written a Python 2.7.16 script that calculates the midpoint of the polylines and inserts the midpoint information into parallel tables. The script will be...

9:04 PM
Q: Octave classdef enumeration workaround

littleBOTAFAIK octave still does not support enumerations, so I've did my best to write a workaround. Question is if there is something missing in code below, or maybe something can be improved..? The reason for enumConstructor method is that on octave 4.2.0 I had errors when overloading constructor. cl...

9:30 PM
[testing] 42 AWS Tests Succeeded. 5 Duga functions migrated to AWS. 4 Duga functions that is actually being used on AWS
in Coding Projects and Advent of Code Heaven :), 8 mins ago, by Simon Forsberg
Of course I put it in The 2nd Monitor instead of here -.-
10:06 PM
Q: CodeReview question markdown downloader

EdwardThis is an update to my earlier question From Q to compiler in less than 30 seconds. As with that version, this Python script automatically downloads the markdown from any question on Code Review and saves it to a local file using Unix-style line endings. For instance, to fetch the markdown for...

10:40 PM
possible answer invalidation by greybeard on question by valik: codereview.stackexchange.com/posts/234068/revisions
1 hour later…
11:49 PM
Q: program to display summary of results, Java

Sarah CarterI've written a program for my class that takes user input on state names, and returns the state bird and flower. at the end of the program, I need to print a summary of the results, and I can't figure out how to do that. I've probably been staring at this for too long. Main class: import java...


« first day (2416 days earlier)      last day (41 days later) »