« first day (2627 days earlier)      last day (27 days later) » 

12:00 AM
RELOAD! There are 6816 unanswered questions (89.8686% answered)
12:32 AM
Code Review is a better place to ask for ways to improve working code. But read codereview.meta.stackexchange.com/questions/5777/… before reposting there. — Barmar 42 secs ago
2 hours later…
2:11 AM
Q: The best approach to validate fields

MatleyI wonder if there is a better approach to validate the object fields. For specific types of objects some fields cannot be empty: public class CredentialsValidator { public boolean validateCredentialsRequest(ValidationCredentialsRequest credentialsRequest) { switch (credentialsRequest.getCr...

2 hours later…
4:00 AM
Assembly languages contain operations for NOR, NAND and NXOR :) In regards to making your Java code cleaner, consider posting code snippets to the code review community: codereview.stackexchange.comMark McElroy 49 secs ago
1 hour later…
5:27 AM
Q: Binary PATRICiA Prefix Tree (Trie)

NeilI was wondering if we could speed-up lookup in a hash table of strings by only storing the difference between them, like HAMT? Taking this idea to it's end, I ended up with a binary PATRICiA prefix-tree data-structure. There is a great example of PATRICiA trees in Crochemore, Lecroq, 2009, (excep...

possible answer invalidation by Learner on question by Learner: codereview.stackexchange.com/posts/245299/revisions
5:52 AM
@Duga Rolled back. Terrible title too.
"Help improve my code" questions are not really suitable for Stack Overflow; we look for specific questions about actual problems. Maybe see our sibling site Code Review but of course, read their help pages before posting there. — tripleee 42 secs ago
6:09 AM
1 hour later…
7:22 AM
@Vogel612 D: Hope it goes well :)
7:51 AM
Q: JS Beginner, created a basic registration page

megadarkfriendfunction checkPassword(form){ let password = document.getElementById('pwd'); if (!password.value){ alert("Enter a Password"); } else if (password.value.length < 6){ alert("You must have 6 characters in your password"); } else{ password.style.borderColor = 'initial'...

8:08 AM
There is codereview if you want to improve working code. Make sure to explain what you are doing and why exactly, we aren't solving riddles here or there. — Sinatr 54 secs ago
possible answer invalidation by Matley on question by Matley: codereview.stackexchange.com/posts/245390/revisions
@Sinatr, thank you for informing me of codereview, but why do you feel this is a riddle or that what I am doing is somehow unclear? — Brian Kessler 11 secs ago
8:41 AM
Q: Python class implementation

pyguypyI created a python class called Score, I intend to use it to assign scores depending on 2 parameters, first the type of score - score name and second the user_input, so for example if I want to get the score of loan term, I will enter 'loan_term' as the first parameter and loan term value 36 as t...

Q: C# How to refactor my function code which speed up my function execution time

user227579See the first block of code. here i am doing cross join between a list and datatable from where i am calling a function called ExtractStandardValueFromLinkText this function has many loop which take times to complete. tell me how could i refactor the code in 2nd block to speed up the execution. a...

9:06 AM
Q: urgent code optimization

yjjmeiThis is my js code.That is an common component use for upload image with Qiniu plugin. And it's use vue and js.I think my code is not good but i don't know how to code better.I hope that experienced developers can help me review the code. I am eager to get suggestions and optimization of the code...

9:16 AM
@Peilonrayz I just got feedback from my advisor... I don't think he took more than two minutes to look at the latest version :/
@Vogel612 Oh ):
like ... I added two really not that small figures and he straight up asked for "what did you change"?
I can see why copy-editing I did would fly under someone's radar, but literally 1.5 pages of UML and Code?
Damn, that sucks
On a side note, please consider using Go conventions with regard to naming identifiers. Please consider reading this and then this. Apparent problems are: using m_ to denote "members" and using snake_case instead of camelCase. You're certainly free to do whatever you want in your own code, but you'll have hard time finding Go code formatted in a non-standard way in the wild, and will have hard time contributing to F/OSS projects. — kostix 50 secs ago
may be you should post this question codereview.stackexchange.comdeadshot 54 secs ago
9:52 AM
I'm not sure it's possible, but this isn't a good idea. It's against Go's naming convention. You could say it's "just generated code", but you generate the code so you can use it in "your" code. — icza 50 secs ago
Q: Simple tip calculator code

Ruari DouglasI have built a super simple tip calculator to help me try and get a hold of the javascript knowledge I've gained. I just wanted to see if there was any feedback I could get for it... Basic functionality is: If a letter or incorrect character is input in either the bill or the number of persons in...

10:19 AM
Q: Why is my android application crashing when connecting to socket?

hassanI am new to android development and I am attempting to connect to a server socket, however my application keeps crashing - can someone help me out? NOTE: I have added the following permission <uses-permission android:name="android.permission.INTERNET"/> This is my code: public class MainActivity...

Q: Algorithm Lists with pthon

alter0 I am trying to find an algorithm to solve the following problem with python. Given a list of integers, check if after dropping two elements of the list, is posible to divide the list in 3 where the sum of the consecutive numbers are equals. For example: A = [1, 3, 4, 2, 2, 2, 1, 1, strong text2...

11:19 AM
> If you really think that this is a problem, just enforce the policy Enforcing such a policy during code reviews by hand will not be possible, this is why I am looking for technical solutions. — Tim Keller just now
11:49 AM
Maybe you should take a look at codereview.stackexchange.comJust learned it 24 secs ago
@Justlearnedit: NO! Codereview is for full code running with no errors and producing expected results when the programmers wants to improve their coding technics. Never advice to ask there a question with errors or no code at all. — Serge Ballesta 31 secs ago
@Justlearnedit: I may be tired, but I see no code here ;-) . That is enough for the question not to be suitable for CodeReview. — Serge Ballesta just now
12:36 PM
This is off-topic here, as primarily opinion-based and too broad (see the help center for information about what's on-topic). Try our sister site, Code Review. — Chris 49 secs ago
Q: File Deletion PowerShell Script

Zoran JankovI would like your opinion of my PowerShell script for file deletion. Do I follow conventions, do I use some anti patterns? Every critique is welcome! This is the Settings.cfg file for script parameterization: WRITE_OUTPUT=true SEND_REPORT=true SMTP=smtp.mail.com PORT=25 RECEIVER=system.administra...

1:22 PM
See comments.
I've voted for not working as intended in the past, but I think missing context is a better idea now. Perhaps UWYA even, since it's absolutely lacking clarity. I'm not sure whether it's reviewable.
Huh, I add dvorak-l and dvorak-r to my X11 config, and suddenly half my WM's keybinds no longer work... :/
Q: What would be the best way to optimize this code so it is smaller and takes up less space?

John Smithresource = test["resources"][0] finding_severity_counts = test["detail"]["finding-severity-counts"] if "CRITICAL" in finding_severity_counts: critical_count = finding_severity_counts["CRITICAL"] if critical_count > CRITICAL: print("Resource {} has {} critical findings".format(re...

@Mast Can you give it another look? I'm pretty sure I've got it right
@Mast Always ;) Even more so when I'm using a tiling WM
1:58 PM
Q: Machine Learning Implementation

Austin JohnsonI am new to ML and I wanted to implement a Linear Regression to predict a golfer's scores based on certain feature supplied to my model. I would like a review to see if I'm implementing this correctly and any tips to make my model more efficient. Here is my code import pandas as pd import numpy a...

2:09 PM
@Peilonrayz Do you think it's reviewable in this form?
@Mast I'd say MRC. Pretty sure I've fixed the UWYA and it wasn't broken.
@Peilonrayz Agreed.
Sweet, I'll axe it now
It's already axed.
Unless you're planning on leaving one of your wonderful comments.
If you have working code, consider posting it on codereview.stackexchange.com. You could describe the way in which you would like to refactor and improve the code. Here, you show non-working code and ask for ways to fix it that are not possible. — Ulrich Eckhardt 31 secs ago
If the code works, but you want feedback on improving it, this may be better suited for CodeReview.SE. — L3viathan 19 secs ago
2:13 PM
@Mast I just hadn't refreshed the page in a while ;) I've added a comment about MRC
Awesome @Peilonrayz
Q: Static mockup of a website

Francky_VI'm diving into front-end stuff for the first time. I thought a good way to get started was to try to do a mockup of a website. I took the top part of Microsoft's home page. Here's a link to the codepen. Full code at the end of the question as well. Not a full/exact replica. Would need much more...

Ryan Donovan on July 13, 2020
When you’re documenting anything technical, it’s easy to forget what it’s like being ignorant of how the software works, especially if you built the thing.
2:47 PM
Q: Equated Monthly Installment (EMI) for Home Loan and Amortization Schedule

JohnAny comment on my code? public class LoanRepaymentPlan { public decimal TotalRepaymentAmount { get; private set; } public decimal CurrentOutstandingAmount { get; private set; } public decimal MonthlyRepaymentInterestAmount { get; private set; } public decimal MonthlyRepaymentAmoun...

@Feeds That has been preached for years, still isn't happening.
Not nearly enough anyway.
Understandable, since it's costly.
3:07 PM
His original code works though, his algorithm is correct. code review is appreciated but I don't think SO is the place for this. — yxor 25 secs ago
Maybe your question goes better here: codereview.stackexchange.comAlan Garrido 35 secs ago
3:35 PM
Q: c++ dynamic array code find memory leaks and bugs

DarkoNaito_09I'm trying to write a simple dynamic array class, and i'd like to know if there are some memory leaks or bugs i haven't found yet dyn_arr.h: #ifndef DYN_ARR_H_INCLUDED #define DYN_ARR_H_INCLUDED template <class T> class DynArr { public: DynArr(uint16_t startSize = 0); ~DynAr...

@CaptainObvious I question the context because there are no test cases, but overall a good question.
3:54 PM
Q: Vuejs Dynamic inputs and displaying data

ArjunI am accepting dynamic input from the user if they have any i.e - Children/Siblings/Previous Employement etc through Vue Components. A form is created and they input their data which is validated and then submitted. Submitted data is displayed in another Vue table component from which they can de...

4:51 PM
ಠ_ಠ this post was edited 3 hours ago - yet I don't see it in the reopen queue... I wonder why...
@SᴀᴍOnᴇᴌᴀ probably only counts edits to the body
5:13 PM
Q: Temperature unit conversor in Python

VinasakaI am starting to learn python and this has been my first project but I am not entirely happy, I think it could be done better. Could you help me? The strings are in Spanish but I think it does not harm understanding elegir_magnitud = int(input( """1 = Temperatura 2 = Longitud 3 = Masa 4 = Vo...

Q: How can I reduce the complexity of this ruby method?

Neils ChristoffersenI'm parsing a file made up of various sections. I have a current_section variable that tracks which portion of the file I'm currently processing and the following check_for_next_section method that returns either the next section, based on the contents of the current line, or current_section if t...

5:37 PM
Q: Filter linq query

JeffersonAny advice on how to make this code; cleaner, more effective, just overall better! Program has three options that can be passed int NewsId,Year and CategoryId. I collection all the data and then do additional filter base on the values that are being passed into the method. public List<News> GetNe...

6:01 PM
Q: Another Min Heap implementation

George BarwoodI am having a look at Rust, this is the first data structure I have tried to implement ( the standard library has a max-heap implementation, so this is a learning exercise ). /// Heap is an array organised so the smallest element can be efficiently removed. pub struct Heap<T>{ vec: Vec<T> } impl<...

1 hour later…
7:14 PM
Q: Leet code Majority element

Mosbius8Problem :- Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element always exist in the array. Example 1: Input: [3,2,3] Output: 3 Example 2: Input: [2,2,1,1,1...

7:39 PM
Q: Compression Library for C using Huffman Coding

DemonessJessThis is an update to a question I posed nearly two years ago about my implementation of Huffman Coding which I had written in C. Since then I have had time to grow as a programmer and have managed to integrate most, if not all, of the suggestions given to me then and I am looking for fresh feedba...

7:54 PM
This is not a question for Stackoverflow. You don't have a technical problem with your code, so we can't provide a technical answer. Maybe try posting this on: codereview.stackexchange.com or dba.stackexchange.comTim Lewis 35 secs ago
Q: C++ Dynamic Array Class Testing

DarkoNaito_09I'm creating a basic Dynamic Array class in C++, and I'd like to know if there are any bugs/memory leaks I haven't noticed yet. dyn_arr.h : #ifndef DYN_ARR_H_INCLUDED #define DYN_ARR_H_INCLUDED template <class T> class DynArr { public: DynArr(uint16_t startSize = 0); ~DynArr...

Q: Designing asp.net core web api to add sub classes/specialized objects

VeverkeAs an exercise, I am writing a core web api that allows keeping track of a user medias. A media can be a postcard, a photo album, a recording, a book... I would like to know what is the way to go/best practice in writing the Add (createMedia) method: [HttpPost] public async Task<ActionResult<bool>>...

8:14 PM
I’m voting to close this question because it the question is off-topic for SO and probably belongs on Code ReviewTrenton McKinney 19 secs ago
8:24 PM
@CaptainObvious @pacmaninbw RBA with a positive score, we don't see that often.
Stack Overflow is having another election. Don't forget to vote people.
Q: Benchmarking multiple implementations of a Code Kata: queue for the self-checkout tills at the supermarket

slepicI was reading this question: Why is my function timing out when run with a larger data set? And although I couldn't quite grasp the OP's implementation and so didn't feel like answering. I did some implementations of my own and created a benchmark for them. Here is the problem definition: There ...

Q: Please how can I change my code by using django’s ORM instead of for loops

TWEEDOriginal''' I recently learnt that it is wrong to use python to loop through records in my database, because it would make my web applications slow. I was wondering if it is possible to replace the code I attached with django's ORM to make this more efficient and race condition free.''' def get_book_titl...

Have a look at the following post for what it looks like a decent Matrix implementation: codereview.stackexchange.com/q/149669. — rturrado 50 secs ago
That's my 7th Constituent badge on SO already. How many elections do they even hold...
@CaptainObvious @Mast Reposted after they added the test cases I requested.
@pacmaninbw Instead of fixing a positively received question? Odd. Oh well.
8:31 PM
@CaptainObvious interesting avatar that is
On one hand I have a nagging feeling we shouldn't encourage reposts like that. On the other hand, the system is so far broken we got other things to worry about...
@Mast Me too (not #metoo)
9:08 PM
Everybody doing fine here? I have a new job, so little time to do extensive answers (and that leaves a bit to be desired for code review :| ).
@MaartenBodewes Congrats! It's all good, thanks for teaching me a few things when you were actively answering :)
@Mast Something something Diamond Duga autoclose #fixallthethings
You're welcome :)
Need 2 close votes on this question. codereview.stackexchange.com/questions/245389/…
We're three mods now again at crypto.SE, fgrieu joined, which means that we now have over 210 K of experience on board (counting crypto.SE rep alone).
Took > 6 months though.
@pacmaninbw hammered
9:15 PM
@SᴀᴍOnᴇᴌᴀ No fair, I just have my close vote priv here :P
Q: LeetCode 1463: Cherry Pickup II

EmmaI'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Given a rows x cols matrix grid representing a field of cherries. Each cell in grid represents the number of cherries that you can collect. You have two robots that...

@Peilonrayz @SᴀᴍOnᴇᴌᴀ Thanks you team mates (no reference to gender here).
@MaartenBodewes Definitely hinders good answers, you could answer either before work or after work, but you probably have other things that need doing.
@MaartenBodewes Curses, foiled again.
@MaartenBodewes do you mean you just recently earned the cast close and reopen votes privilege? We typically have "quite a few" items in the close queue every day
I'll try and check crypto related questions now and then, if just to check that the given answers are not missing anything (such as the mark, happens pretty often).
(hence why some of us have ~3k reviews in that queue)
9:20 PM
@pacmaninbw :)
@Peilonrayz Haha
Well, Simon used to wear a diamond.
We kind of had a Diamond Duga already.
@Mast I go to SO so rarely that I wouldn't know who to vote for.
@MaartenBodewes Congratulations!
For a while.
@pacmaninbw Half of them are somewhat decent, so if you don't vote for the other half you'll probably be fine. Isn't too hard to make a first selection either.
@SᴀᴍOnᴇᴌᴀ Last I checked, I'm the only one with 3k+ reviews in that queue.
@Mast Your humor is so dry that if I didn't know that you're not I might think that you were from the UK.
@Mast that's why I used the ~
9:25 PM
@SᴀᴍOnᴇᴌᴀ You and Toby are close with 2.7k+
@pacmaninbw Thanks, I think.
I learned British-English at school and have always been a great fan of Monty Python, so...
Perhaps it's a second nature of sorts.
Fawlty Towers is what got me interested I think.
John Cleese was great in those episodes.
That's when I learned there was more of that.
I've only really seen MP and the Holy Grail
I've never watched the Monty Python TV show, but the movies were great!
If either of you has Netflix, the films are on there.
At least Holy Grail and Life of Brian.
9:28 PM
I don't but I bet they are still on there
@SᴀᴍOnᴇᴌᴀ see if you can find And now for something completely different. It has a lot of cuts from the TV show.
@Mast Can confirm quite a few shows are on there. But IDK if it's region locked at all
@Peilonrayz The Dutch have one of the poorest ranges and even we got them. So everyone with a US/UK account should probably have them as well.
The Dutch voted the fish slapping dance as best Python sketch.
9:31 PM
I'm no where close to @Mast or @SᴀᴍOnᴇᴌᴀ but I do have 1905 VTC to my credit.
@pacmaninbw That's a magnificent start.
Ranked 6th even.
Definitely not bad.
I got a netflix gift card 12 years ago but never used it ( ͡ᵔ ͜ʖ ͡ᵔ )
yuri was pretty active last year, but he dropped off the face of the earth.
alecxe was more active previously too.
The meaning of life is pretty much all sketches too, and it got the universe song. Although the one from the O2 arena has a very special set of guests :)
Sorry, misnamed Galaxy song :)
9:35 PM
> This, is an ex-parrot.
I may have watched too much Doctor Who as well.
It's good sci-fi.
@Mast Can you ever watch too much Doctor Who or Monty Python?
@Mast It's aight, I'm not much of a fan
@pacmaninbw There was a time when I'd say no.
9:52 PM
@Peilonrayz What's your cup of tea then?
Personally I'm also more into serious shit, such as Airplane!
@MaartenBodewes Serious, he said.
Or more sci-fy such as Red Dwarf or indeed horror such as Braindead :P
What's more modern and also more humor than movie? Um, Deadpool I guess? Or Guardians of the Galaxy?
Thunderbirds was good.
Never watched much of Thunderbird, and I'm not planning on watching it now.
Thunderbirds, sorry :)
9:59 PM
@Mast I think if I binged it it could be fun, but I'd just get board halfway through the season. I'm a pretty big weeb atm my core group of friends are watching seasonal broadcasts atm. But western stuff I prefer action/comedy
@MaartenBodewes I don't think Leslie Nielsen has ever played in anything serious.
Shirley not :P
@Peilonrayz Western action/comedy, like a spaghetti western?
@Mast The only Thunderbirds I know is a bunch of puppets, that stuff is old!
@Peilonrayz It was marvellous.
10:02 PM
I have fond memories of it as a very very young child
@Mast lol, no XD
@MartinYork Oh boy, here we go down memory lane.
Hi @Martin
@MaartenBodewes LOL
10:07 PM
Anderbad, wasn't that the monotrain and Lady Penelope hanging under the track?
Virgil saving the day.
@MartinYork Damn, that's long
@pacmaninbw You do realize you linked to the entire room here, not to a specific remark, right?
Hey up.
Seems very quite in here.
It has definitely been more active here in the past, but we've seen worse too.
6 reviewers in the CV queue today? Almost a miracle.
10:27 PM
yeah Reinderien is really getting into it... after doing only 5 last year, started doing quite a few in March and April, then picked it up again in June...
wow I barely caught the mistake on the last message (on -> only) and updated it with 7 seconds left...
"Updated it"? I still see "on 5"
@Mast Thanks for the reminder earlier... :)
I think it was pacmaninbw actually, eh
Whoa, what's up with my client then! :O
I tried to do some yesterday on my phone or iPad... I would start looking at a post but then ended up getting distracted with something or have to help my family.... darn life
10:54 PM
Q: LeetCode 149: Max Points on a Line

EmmaI'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Example 1: Input: [[1,1],[2,2],[3,3]] Output: 3 ^ | | o...

@Mast Don't know how to link to a specific message.
@Peilonrayz What did I do now?
@pacmaninbw if you hover over a message then on the far left a down arrow will appear. Click the arrow to see a context menu and in that menu will be a link titled permalink that link can be used to refer to the message
@SᴀᴍOnᴇᴌᴀ Thank you!
11:18 PM
Q: Designing a Simple Class that caches files from AWS

DineroBackground I have a pipeline that I run and it spins up multiple EC2 instances that process many jobs. I noticed that in many parts of my pipeline i am downloading files from amazon s3 multiple times. I can save lot of time if i just cache them since after a certain stage in the pipeline those fi...

11:42 PM
@RMunroe sponsored by IKEA®?

« first day (2627 days earlier)      last day (27 days later) »