« first day (2391 days earlier)      last day (378 days later) » 

12:00 AM
RELOAD! There are 6258 unanswered questions (90.0791% answered)
2 hours later…
2:30 AM
Q: Homework assignment - trigger syntax issues

Dennis KimDisclaimer: this is a homework assignment, but I'm only seeking hints for syntax issues. Otherwise, I think I've got the substance (assuming syntax errors don't necessitate a change to the guts). Goal: creating a trigger (for this question, the trigger NewContract is causing the problem, but my ...

2:51 AM
Q: Scrabble Scorer in Python

pythonier500I made this Scrabble with care since it will be mainly used by family that will not understand the error codes so that is why I catch basically every possible error, to make it user friendly. I have revised this based on an earlier post and hope to improve its efficiency even more now that I hav...

@CaptainObvious Setting __name__ = "end" in an attempt to escape infinite recursion; that's one hell of a hack, sheesh.
3:49 AM
There's a number of non-idiomatic aspects to this code. Once you have a working solution, I encourage you to seek out holistic review of your code on Code Review. — Shepmaster 8 secs ago
4:14 AM
Q: The good and right way to check a string argument value

FlithorMy code void Method(string keyWord = "") { keyWord = keyWord ?? string.Empty; string key = keyWord.Trim(); if (key == "") ;//Do something without "key" else ;//Do something with "key" } What I want: Trim invalid space chars in string. Treat null or empty string...

5:03 AM
@CaptainObvious example code
5:40 AM
possible answer invalidation by Flithor on question by Flithor: codereview.stackexchange.com/posts/232674/revisions
6:17 AM
Q: Morse code encoder decoder

SrivathsI created this morse code encoder and decoder. class DecodeError(BaseException): __module__ = Exception.__module__ class EncodeError(BaseException): __module__ = Exception.__module__ code_letter = { '.-': 'A', '-...': 'B', '-.-.': 'C', '-..': 'D', '.': 'E', '..-.': 'F', '--.': 'G'...

6:30 AM
Does it work? If yes, you could ask for possible improvents on codereview.stackexchange.comJanne Karila just now
Q: Run length encoder decoder

Srivathsclass DecodeError(BaseException): __module__ = Exception.__module__ class EncodeError(BaseException): __module__ = Exception.__module__ def run_length_encode(string: str) -> str: if any(i.isdigit() for i in string): raise EncodeError('Number in string') final_string = '...

6:57 AM
Q: Elm spa structure

James SchinnerThis code is a working example of an Elm application (0.19.1) that is spread over two files. The idea is to have a file for each page of the app and have the Main.elm file import and connect the pages (exactly the same idea as the elm spa example) This is a bare bones example, that I intend to b...

I'm not sure but I think this is better in code review? — Nathan 6 secs ago
7:54 AM
@Duga sigh
Answer should go, question be fixed.
I'm voting to close this question as off-topic because it belongs on codereview. — user207421 13 secs ago
8:38 AM
This is a good fix for me, not sure if it's overkill for the element but this is something that will definitely come up in code review! — Joel Biffin 12 secs ago
9:06 AM
@CaptainObvious One more VTC please.
9:20 AM
Q: Linked List implementation in python 3.x

SrivathsI took this as a challenge and implemented linked list data structure in python class Node: def __init__(self, data, nxt=None): self.data = data self.next = nxt class LinkedList: def __init__(self, arr=None): if arr in [None, []]: self.head = None ...

Q: Alternative code to classes in Javascript

Ram AlsaifiI'm new to JavaScript and came across classes in ES6. Though they are great, I don't want to learn something that can be done in other ways. So, I created this code that does somehow similar job to what classes in JS do. Please give me feedback on whether classes does more than what I think they ...

1 hour later…
10:23 AM
Usually it is about not closed resources (files, ports, streams, zip inflaters/deflaters). Sometimes even static analysis/code review is enough. — Michal Kordas 1 min ago
10:39 AM
Q: Adding difficulty in math quiz Python

Gunmeet KourThis is for a python code that I'm trying to make. I'm a new python user and this is the first real code I've made but I can't find anywhere to as how to change the difficulty. This project is a math quiz and I want it so that if you want to change the difficulty, you can just say easy, medium or...

This is better suited for the Code Review community, — Innominatum 49 secs ago
10:55 AM
@CaptainObvious This is currently not working code for at least 4 different reasons.
1 hour later…
12:03 PM
Q: Tic-Tac-Toe with changeable board size (Part 2)

SrivathsPart 1: Tic-Tac-Toe with changeable board size (Part 1) I just revisited all my previous questions and saw that I hadn't updated my Tic-Tac-Toe code. So, I improvised my code as per @Austin Hastings suggestions Here's the updated code: import os from random import randint from textwrap import ...

1 hour later…
1:04 PM
Q: How to Map Excel rows to model

R4nc1dI have en Excel file and each row within the sheet represents an employees data. I am trying to find a cleaner why the map each row to an model public IList<Employee> ReadEmployees(byte[] file, string companyId) { var employees = new List<Employee>(); ...

Q: Python import order for only two packages

theonlygustiJust out of curiosity, what's the best way to order only two import statements at the top of a file: import numpy as np from functools import reduce According to PEP-8 standard libraries should come first, then related third parties, with a blank line in-between. So this is what it would look...

1:23 PM
This looks like a request for code review. That's better posted to codereview.stackexchange.com. — Rob Napier 58 secs ago
1:33 PM
I know this is a late comment, but did you know there is an actual Code Review site included within StackExchange? — ryyker 43 secs ago
I don't think I've written it half as good as I should've, but here it is:
Q: The context of "Lacks concrete context": let's fix it

MastEarly 2018 we changed the close reasons on Code Review. This was necessary, but now almost 2 years later it's perfectly clear there's a growing discontent with one of them: "Lacks concrete context". In this post, I'll provide a bit of ehm, context about: History on the problem Signs there is a...

@Peilonrayz @pacmaninbw @200_success @rolfl ^^ Next iteration of LCC, time go get it all of your chests and improve how we close questions.
Q: The context of "Lacks concrete context": let's fix it

MastEarly 2018 we changed the close reasons on Code Review. This was necessary, but now almost 2 years later it's perfectly clear there's a growing discontent with one of them: "Lacks concrete context". In this post, I'll provide a bit of ehm, context about: History on the problem Signs there is a...

2:05 PM
Q: Is it safe to use Super global variable $_POST in PDO QUERY

sanoj lawrencei use the following code to filter data from SQL and it works fine, and below code is vulnerable to SQL injection but all the $post values are checkbox value(its not user input) so can i use below code. Or do i need to use prepared statement as per the answer https://stackoverflow.com/a/14767651...

2:15 PM
@Mast Oh my!
@Mast Evidently I've not read it yet, but my view is that there's two groups; the meta people that think one way, and the closers that think another. At the end of the day the closers have the power, not me. I'll read over it now to see if that's taken into account :)
@Peilonrayz If you mean there's stubborn people out there voting with the wrong reason, yes, I think I mentioned that.
@Mast Ah good good. I think this'll be a good read. IDK if I can suggest anything then. :(
2:37 PM
If you want feedback on your code quality, please use codereview.stackexchange.comAkshay Anurag 15 secs ago
This place isnt meant for extensive code reviews. As said: it is best that you find real humans willing to sit down with you. Alternatively, see codereview.stackexchange.com/help/on-topic ... and then write up a question that fits that community, to ask for feedback on specific aspects of your code. — GhostCat says Reinstate Monica 7 secs ago
@pacmaninbw Clarified the question based on your comment. Better?
If not, I'll make more edits.
Code review questions should normally be considered off-topic on stackoverflow. The main goal of SO is to be an archive of solved problems that programmers are likely to encounter. Most code review questions are only useful to the original asker, and will likely never be useful to anyone else. — James Reinstate Monica Polk 58 secs ago
@Mast How is missing specification different from missing description?
2:55 PM
@pacmaninbw Specification is about the task, description about the code.
@Mast OK, that's clear.
Q: how can i enter confirmation password without hitting an extra \n in this code segment?

rajesh_chaurasiyathe following function is designed to take password from users and print # for every character enters( thanks @David Rankin - ReinstateMonica for this code.) clear_cin() is designed to clear cin before user enters password. this function works fine when user enters password. but user press enters...

Q: Configurable sub-menus based on item selection

KyleI have a "working" example (quotes because of some issues which I'll outline) in this sandbox: https://codesandbox.io/s/react-example-2m1eo I have a data.json which lists out all the choices and possible sub-menus and it gets called via import { components } from "../data.json"; Then I have a...

Q: How can i change the code for importing random questions from a group of txt file with answers?

4shwin_26import random print(' Welcome to Py Quiz\nRules:\n' '1. Each Question Carries 5 points.Totally 10 questions\n' '2. Two lifelines are allotted for the entire quiz.Lifelines and be used by entering L or l\n' ' a) 50-50 [ Elimi...

@CaptainObvious Poster is apparently banned on SO, and is asking a how to question here.
@CaptainObvious How people think it's our problem they got banned is beyond me. They had a user like that a while back on musicfans as well, was banned on music and wanted to post such questions on musicfans now.
3:51 PM
@Mast Lol, I didn't even see that until now. 😅😂
Been far too long since I've had this view on my screen:
This might actually be the first code I've written in 2019 ^^
@Kaz VBA?
@pacmaninbw Very much so.
I try really hard not to develop anything these days, but I had a spare couple of hours, and there's a manually intensive client-based spreadsheet report that takes up a significant amount of the admin team's time, so I figured I'd throw something together.
@Kaz Probably 3 years since I've used it. Haven't had to work in excel for a while.
Appraisal's coming up so it never hurts to remind the company just how fast and effortlessly I can save them time and money.
4:00 PM
Always good to remind them.
4:38 PM
There is codereview.stackexchange.com, but firstly, how do you think you can calculate all before you have read the values for first, two, and three?! — BoBTFish 59 secs ago
4:54 PM
5:31 PM
@Kaz You're always welcome back.
@Kaz Great, now the admin is unemployed :P
5:46 PM
@Mast There you go, you got my $0.02
Code Review site is better suited for such questions. — PM 77-1 41 secs ago
@rolfl Yes, thank you.
It's attracting a lot of opinions, but not yet the answer I was hoping for.
Perhaps this will come after we've all brainstormed a little about it.
Going another 2 years with the current close reason would be suboptimal.
6:07 PM
@Mast I've updated my answer, please suggest any critiques you may have :)
Q: socket.io / jwt

gabriel I am studying socket.io and ended up making a connection using react as front end js and how to back end node js I was successful but I have a question as to how I made my code I don't know if it's "safe" or if I could improve on something in my back end i have this on my app.js: Here I call ...

@Peilonrayz Heh, not bad.
Also, once you get the code working and have complete code, post this on Code Review to get suggestions. I could help you make this much neater. — Carcigenicate 50 secs ago
Have a look at Code Review. — João Nunes 28 secs ago
@azro Yes, that's why I suggested they post this on Code Review after once they have full working code. A full review is far beyond the scope of the question here. I would love to though, so I hope they take me up on my suggestion. — Carcigenicate 59 secs ago
Thank you, this seems to be working much much faster. I will upload the new code to code review now. — Bluecider just now
Qt uses C++ as it's language. Also, what is your question specifically? I see a bunch of code in front of me but I am not sure what you are specifically stuck on. If you want us to review your code you're on the wrong forum. There is a code review stack. — Sailanarmo 59 secs ago
6:55 PM
@Sailanarmo Considering the code isn't finished yet, it's too early to go to Code Review. — Mast 58 secs ago
If this is working code, then Code Review may be a more appropriate place for this question. — Cyril 47 secs ago
possible answer invalidation by nokko on question by nokko: codereview.stackexchange.com/posts/232625/revisions
@Duga that's okay - OP responded to comment requesting input values
Please add a testable user_in value — RomanPerekhrest yesterday
7:12 PM
Some of you may have noticed that I let my 6-year streak of daily appearances on Code Review lapse earlier this month, and my participation has been minimal since then. I was thinking of writing a goodbye message on Meta CR, but decided that it wouldn't be worth the effort.
I'll just leave this as a parting statement:
Ok, we have to do more than a code review. Before any suggestion, I will do a simple debugging. — mofo77 23 secs ago
7:32 PM
Q: Properly read integer in a range in C

nowoxI wanted to write a C function C99/POSIX compliant that read an integer from the user input. I wanted this function to be safe and robust but I feel it is way too complex for such simple task. I am wondering whether this code is optimal. #include <stdio.h> #include <stdlib.h> #include <string.h>...

@200_success I wish you the best 200
7:50 PM
@Mast thanks for writing this up, been discussing LCC among moderators lately. One problem is the LCC-happy close-voters. The other problem is close queue reviewers rubberstamping LCC close votes that should have never been cast in the first place.
@MathieuGuindon Please pardon my ignorance. How are they not the same problem?
one particular LCC-happy close voter does not do close queue reviews
but they're very often the first one to cast a LCC vote
Ah that makes sense :)
LCC-happy close voters wouldn't be a problem without rubberstamping going on in the review queues
recently there was a bunch of posts from 2013-2015 in the close queue, answered questions voted LCC and comments asking for clarifications 6 years later, on an answered question.
makes us look like a bunch of stuck-up elitist clowns
8:08 PM
I thought that there was a meta post that basically said "let sleeping dogs like". Yeah that's not nice :/
@200_success Bye, and good luck.
9:14 PM
@MathieuGuindon It's a complex problem, happy to help.
Q: Match blood types in C

oleskiewiczI have written a solution to the blood-type matching problem, as described at https://projectlovelace.net/problems/blood-types/. The problem is to determine whether a given recipient (in this case, argv[1]) will find a match for a blood transfusion in an array of available donors (argv + 2). I...

@200_success Oh bloody heck, can't blame you. Very sorry to see you go and I hope you'll be around every once in a while. Best of luck, and thanks for all the fish.
9:32 PM
Better fit on Code ReviewAmy 28 secs ago
@ca9163d9 Hence my use of the word "better". I never said it doesn't fit on SO. I said it's a better fit on Code ReviewAmy 43 secs ago
10:02 PM
@Amy FYI Code Review will have a very hard time working with code that has // ... comments all over the place, and routinely closes this kind of post within minutes. It would be a better fit on CR if OP was interested in feedback on any/all aspects of the code - this is just an out-of-context snippet with nested conditional logic, stripped to a bare illustrative minimum. As it stands this is absolutely NOT a better fit for CR. — Mathieu Guindon 48 secs ago
10:31 PM
You may find codereview a better platform for your question. — jibsteroos 20 secs ago
You may find codereview a better platform for your question. — jibsteroos 28 secs ago
10:59 PM
Thanks @jibsteroos, I was unaware of codereview. I'll do some reading and consider signing up. — Rounin says Je suis Monica 52 secs ago
11:17 PM
This question is opinion based. Code review questions should, instead, be asked on codereview.stackexchange.comRob 24 secs ago
@Rob that's not what makes code on topic on Code Review. 👎‎ — Peilonrayz 15 secs ago
@Duga 👍
Ok. It is better to post your code in the code review section: codereview.stackexchange.comcodrelphi 44 secs ago
I'm not fussed about coding styles, just the algorithm, does that fit with the style of question on codereview? — micsthepick 39 secs ago
@codrelphi "Code Review is for open-ended questions about code that already works correctly" In this case, that is under question — micsthepick 10 secs ago

« first day (2391 days earlier)      last day (378 days later) »