« first day (2266 days earlier)      last day (1737 days later) » 

12:00 AM
RELOAD! There are 6251 unanswered questions (89.7339% answered)
 
12:29 AM
@SOFe, you're right. Yesterday a very evil person tried to kill me. I attributed it to premature optimization. sPaGhEtTiCaSe, Code Review, most definitely, since you have a working solution. — Cary Swoveland 51 secs ago
 
12:41 AM
You should check out the code review stack exchange — Thomas Ahle 44 secs ago
 
 
1 hour later…
2:11 AM
If you have working code that you just want help in improving, your question should be asked at Code Review instead. That's exactly the reason that site exists. This site is for questions about code that is not working. — Ken White 44 secs ago
 
2:24 AM
@Vogel612 The way the question was worded implied he was not the author.
 
3:19 AM
0
Q: Consuming multiple scoped background services in an IHostedService in .Net Core

PropagatingI'm using the following documentation to create background tasks consumed in an ASP.NET Core MVC application. I currently have a single scoped service registered to perform background tasks and it works fine. I've updated the code to the following to support multiple scoped services: Hosted Se...

 
 
2 hours later…
5:01 AM
0
Q: use if statement or switch case for get cleaner code

Janet AI work on laravel API and want make code more cleaner. I have form for registering business and businessOwner. And stylist who is working under this business registering from same function. And which case best to use there? if statements or Switch case statements? Thats why code looks so mess...

 
5:21 AM
1
Q: Symfony 4 Controller with Multiple Forms

user1392897I have several pages in my app that have multiple forms. In this example, the 'account' page has 2 forms: 1) allowing the user to change their password and 2) allowing the user to contact support. I am new to Symfony and would like to get an understanding if I am following best practices in this ...

 
5:50 AM
possible answer invalidation by Ngm on question by Ngm: codereview.stackexchange.com/posts/224264/revisions
 
 
1 hour later…
7:20 AM
0
Q: How to edit my code to make it more functional C# CODE (asp.net core - linq - entity framework)

Roxy'Pro'm working on small react-asp.net core app, and I need to get articles by it's type, there are 3 possible types: food drink candy I'm wondering what if I want in same list articles with Food and Drinks, how can I add results of context to another result, without reseting it.. Here is my curr...

 
7:40 AM
0
Q: Implementing a thread pool for task execution

user82039I wanted to experiment with a reusable thread pool that allows to add tasks and execute them repetitively. After going through, https://github.com/progschj/ThreadPool and another Stack Overflow post I came up with the implementation in https://github.com/dragsu/CPPThread. The main bit of the co...

0
Q: Using Generics in a Method correctly

Musikero31I need your help on how to refactor this. I'm currently "playing around" (if that's the proper way to say it) with generics. So I have 2 classes (EmployeeRegistration and StudentRegistration) which inherits the IRegistration class. Now, I created a method which uses generics in order not to dup...

 
8:28 AM
This question might be better suited for codereview? — Ocaso Protal 16 secs ago
 
8:40 AM
0
Q: Is having a collection of predicates on a resource in an interface vs on the resource itself a code style or is there a best practise?

Andreas AndreouI am working on a project using Java 8. I recently came upon this interface that has a number of static methods returning predicates of a class. My first inclination was that it doesn't look right and since all these methods use information from the class only, they could/should live inside the ...

 
9:20 AM
0
Q: Store coordinates in 2d grid

Константин ПисаныйI`m writing a function for small pygame program. The ideas is that I have a 500 pixels square screen and I want to place 5 objects per row with the size of width and height in random order and I need a function to generate and store coordinates. from random import randint def gen_coords(width...

 
This question is not a good fit for Stack Overflow, consider posting it on codereview.stackexchange.com instead. If you do so, please, remove this copy of the question. — Georgy 27 secs ago
 
10:00 AM
0
Q: Pointers and Arrays - Learning C

CamWI've recently started going through the Head First C book. I'd like to get up to speed in terms of writing good, idiomatic, modern C. I have read the first few chapters of the Modern C book too but found Head First to be a better introduction to the language. The code below is for the first, bi...

-1
Q: Return as refernce or Return void , which particise is better?

Amruth A void func1(std::string& input , std::string& output) std::string& func2(std::string& input) { return output; } Which approach is good func1 or func2 ?

0
Q: Behavior of atomics in the copy constructor

Marko BencikI am writing a class with atomic. Unfortunately I'm not an expert in atomics, and that gives me hard time. class DataCell { private: std::atomic<unsigned int> atcRefCount_; std::atomic<unsigned int> dataSize_; public: DataCell() { dataSize_ = 0; atcRefCount_ = 4294967295; ...

 
10:40 AM
0
Q: filter a select tag by an input able to find middle characters

arash koohnavardi have a select with dynamic options and values, and an input so user can type inside the input and select values get limited to those that has typed characters. i found this: similar question link function filterBuyer() { var keyword = document.getElementById("buyerFilter").value; ...

 
10:51 AM
 
1
Q: Grouping into more groups in one iteration

Henrik HansenI had a need to group the same dataset in several groups. So instead of repeatedly query the dataset, I made an extension that could do it once. The caveat is, that the result is materialized in dictionaries, because I didn't managed to find an way to avoid that. Maybe you can? public static IDi...

 
No it shouldn't @huMptyduMpty there is nothing to review here. It'd just get closed there too. — Liam 23 secs ago
@RolandDeschain seriously don't put this on code review, see my comment above. I always prefer ... exactly, opinion based, move on with you life, it does not matter. — Liam 27 secs ago
 
11:31 AM
There are a number of problems with this question. First, there's no code in the question. Questions seeking help with code must include the code in the question, not via links. Second, you're not trying to solve a specific problem. General advice like this doesn't fit here. It's too opinion-based. Sometimes questions like this might work on Code Review, but make sure you familiarize yourself with the site and their rules before posting. — Flimzy 58 secs ago
 
12:00 PM
0
Q: Powershell - Simplified Logging

kamiToday I have dealt with logging in PowerShell as well as with the different streams and the pipeline. Unfortunately, none of these solutions really met my needs. My requirements are: I need to output information from PowerShell to a file log. The file log has a predefined structure. So it's no...

0
Q: Reduce cognitive complexity of this function

zypA13510I have a JavaScript function to categorize data by their "styles" attribute, and store the key-"unicode" pair. Here's my current code: function processMetadata(metadata) { let regular = {}, solid = {}, brands = {} for (let icon in metadata) { let styles = metadata[icon].styles ...

 
12:20 PM
from the code review I dont think that's the case. Since this is a production env, there's no way I can verify this. — bhavesh patidar 53 secs ago
I'm voting to close this question as off-topic because it should've been posted on codereview (as it has been now) — Mathias R. Jessen 14 secs ago
 
12:40 PM
0
Q: Golang Stringer Interface better implementation

Guilherme FerreiraI am trying out some Go code examples (while coding a private project) to get more "in-depth" knowledge about the language. I have come across an exercise from the Go Tour website about displaying correctly an IP number, making use of type method and the Stringer interface. I found two ways to ...

0
Q: Pure (almost) CSS Masonry

yunzenI developed this CSS Masonry. It works with a CSS grid with grid-auto-rows: 1px. There is a JS recalc script in there, which recalculates the grid-row-end values (with the span prefix). Apart from that, the layout is totally up to the Browser's engine. (The --raster property is used to set vert...

 
1:00 PM
-1
Q: Class Inheritance in C# (possibly generics)

GodsentI'm working on a segment of code where it runs a number of tasks and then combine individual task results to construct a complete task result object, there's no concurrency involved so it's purely a question of the best use of class inheritance/pattern. Below is the skeleton of the code I've wri...

 
possible answer invalidation by Ngm on question by Ngm: codereview.stackexchange.com/posts/224264/revisions
 
 
1 hour later…
2:11 PM
Greetings, Programs.
 
2:25 PM
possible answer invalidation by Godsent on question by Godsent: codereview.stackexchange.com/posts/224407/revisions
 
2:55 PM
Greetings, lurkers and non-lurkers
 
0
Q: `set_includes` (string subsequence-containment) in Python 2

QuuxplusoneI've implemented C++'s std::includes algorithm in Python, so that I can use it to efficiently implement a Scrabble "can I make this word" function: def word_can_be_made_from_rack(word, rack): return set_includes(sorted(rack), sorted(word)) Here's the implementation, with some test cases: ...

 
3:35 PM
posted on July 18, 2019 by CommitStrip

 
0
Q: Python Modifying a For Loop so that Loop Ends when condition is Met

KenI have created a Python script that iterates through an HTML table.The script has an IF / ELSE section that looks for text with a decimal point. My goal is to determine if text on the HTML table contains dollar and cents values. If there is no decimal point found, then this means that data is not...

0
Q: Intuitive diff syntax

GiliI authored a design-by-contract library that provides character-level diffs for unmet expectations. I'm thinking of changing the syntax from: Actual : The dog is br own Diff : ==== ^^^==== ^=== Expected: The fox is down to: Actual : The dog is br own Diff : ====---+++==...

 
3:56 PM
Your questions doenst fit to stack overflows Q&A. Ask your question on Code Review Stack Exchange. Or do you have some sort of Problem with this existing code? — Sebastian Waldbauer 51 secs ago
 
Monking
 
2
Q: Ajax function with a callback

Mike JI have Ajax function with a callback which fetches all the Patient data however I have some perfomance issues and trying to figure out what it might be, does anyone have idea? That's my Code var patient = new Array(); function sync(arg, callback){ //ajax result $('.loader').show(); $....

0
Q: HarckerRank 2D Arrays Hourglass challenge

Bruno LemosAbout this 2D Arrays HackerRank problem, here´s my solution. I´d aprecciate some review about code quality. my_hourglasses = list() for i in range(0,4): for j in range(0,4): hourglass = list() hourglass += arr[i][j:j+3] hourglass.append(arr[i+1][j+1]) hourgl...

 
Sara Chipps on July 18, 2019

“Caustic community for new users. There is no excuse for not being kind!”  – 6 years coding

“It feels too scary and unaccessible for new developers” – 3 years coding

“People could be less brutal” – 6 years coding

“The attitude is not beginner friendly. Askers are expected to have done a lot of research before asking a question (re: both question format and content), even if they are completely new to the community or topic. Not everyone can understand or even know to look for documentation when they’re completely new to programming.” – 12 years coding experience  …

2
 
4:17 PM
I'm voting to close this question as off-topic because it is not appropriate for Stack Overflow. It should be posted to: codereview.stackexchange.comScott Marcus 46 secs ago
 
1
Q: Simple income/expenses accounting program

strangethingspyI've decided to start working on a budget application for the purposes of getting started on Rust. In its current form this program takes given expenses and income and tells the user whether they have a surplus, a deficit, or if they are breaking even. I will add more functionality to this progra...

0
Q: JAVA Shopping Cart Design

NIGAGARecently, I have appeared for coding exercise to design the Shopping Cart which should have following features: handles barcoded (like Chips) and non-barcoded item (like Banana 400gm) Can add item, remove item, increment & decrement quantity of item. Supports 2 For 1 offer for BarCoded Item. ...

 
@CaptainObvious Surprisingly good for a JAVA question.
2
 
I flagged this answer as NAA but it was disputed.... do others agree?
0
A: List all possible permutations from a python dictionary of lists

wahrwolfWhy the last answer was pretty good, it had some unneeded steps there. For the sake of one liners here my version: >>>from itertools import product >>>experiments = [dict(zip(config_overrides.keys(), value)) for value in product(*config_overrides.values())] The main difference here is that the...

 
4:40 PM
1
Q: delete forms which are displayed as images

Mike JI have a Code where I create over a form, images which are supposed to be other forms which can be edited, how ever I encountered issues for example when I'm trying quickly to delete more of them with a close button, the animation starts hanging or is sometimes not executed at all but normally th...

 
5:10 PM
The current version works correctly. Only a large number of switch-case introduces doubts. → Maybe better to ask in codereview but before asking, check if it's on-topic. — Reza Aghaei 5 secs ago
 
 
1 hour later…
6:20 PM
-1
Q: karatsuba's integer multiplication algorithm python

Anas AboureadaThis code is not passing all the test cases, can somebody help? I only pass the straight forward test then it loses precision. import math import unittest class IntegerMultiplier: def multiply(self, x, y): if x < 10 or y < 10: return x * y x = str(x) y...

 
 
1 hour later…
7:21 PM
0
Q: generic flyweighting function

TaylorI made this little function for flyweighting any type that has operator<. I followed the convention of make_unique and make_shared with make_one. Not sure if that's the best name. // Create a single instance of an object, using // operator< to determine equality. // Note that we take a value ins...

0
Q: Vanilla Javascript: Chained AJAX request

GlenUKI'd be grateful for a review of my AJAX request. If I have taken the correct approach here and especially any security concerns! I am creating a Purchase Order system for my manager (as part of an apprenticeship I am doing). There is a select html element where a supplier can be selected. I al...

 
7:49 PM
If I start answering Python questions, I know it's probably time to go to bed.
 
8:01 PM
0
Q: Java File Transfer through sockets

Ben MorrisonSo I am making a program that transfers files from one client to another. Right now I am just working on sending the file to the server and then later I will work on transferring it to the other client. Here is my client class*: public class Client implements Runnable { private Socket socke...

 
@SᴀᴍOnᴇᴌᴀ I agree. It should be a comment on Gareth's answer.
 
@SᴀᴍOnᴇᴌᴀ @200_success I don't think it requires moderator intervention though. It might not be a good answer, but I think it's enough of an answer.
Improving on other people's answers and posting them as your own has been done before, I believe.
 
8:16 PM
But this post explicitly refers to Gareth's code and nothing else. It would be kinder to convert it into a comment than to continue the debate and harassment.
 
^^
Without Gareth's answer, it might not be able to exist on its own...
 
8:33 PM
Seriously, I've been gaining so many points here it's insane
And still super regular : 3~6 votes a day
It totally feels unnatural
I'm ranked 4th this week and 23rd overall, all this rep is not normal
 
8:53 PM
This isn't code review either, but I feel there's a lot here that needs addressed first to actually help you. — Çöđěxěŕ 56 secs ago
 
0
Q: Common ToolStrip for two UserControl

OwlThere is a MainForm which contains a Panel and a ToolStrip. And there is a similarity of switch: two buttons, one is active, the other is not (property Enabled). When click they change. The Panel is filled with UserControl depending on the button. ToolStrip is common for two UserControl. For exam...

 
9:13 PM
@Morwenn your non-wiki answer score for is 1045... which should mean you earned a gold badge for that tag, right?
 
@SᴀᴍOnᴇᴌᴀ nope, I still lack 28 more answers for the gold badge
 
@Morwenn oh right, I forgot about that requirement
 
Hehe
I've got the same issue on SO
There are badges where I have the score but not enough answers
 
0
Q: Exact same code but there's an error?

Hazy000I've been following this video:https://www.youtube.com/watch?v=YXZX_6RfHjk For some reason my code for the javascript portion is this: function myMove() { var elem = document.getElementByID("myAnimation"); var pos = 0; var id = setInterval(frame, 10); function frame() { if (pos == 3...

 
9:47 PM
@SimonForsberg I see that not-an-answer flags are being declined. The only way for the community to clean this up is to downvote to -3, then vote to delete, which seems like a very harsh way to deal with it.
 
10:01 PM
0
Q: Waveront 3D Obj parser/viewer

BlaDrzzFor learning Rust I decided to make a 3D .obj viewer. I wrote a simplified OBJ parser without materials that only supports triangles. Considering I'm completely new to Rust and don't really know anyone who's good at idiomatic Rust I figured I'd ask here :) use std::fs; use crate::geometry::*; ...

 
 
2 hours later…
11:41 PM
0
Q: Integer field in Python with extra constraints

darkhorseI am trying to write an integer field in Python with the following attributes: Minimum Exclusive minimum Maximum Exclusive maximum Multiple of Value Basically, given the constraints and the value, the class will have a validate method which will return the errors if they occur. If the minimum...

 
@CaptainObvious broken, OP found error (possibly after comment by mdfst13)
2 more VTC needed to close
 

« first day (2266 days earlier)      last day (1737 days later) »