« first day (3009 days earlier)      last day (991 days later) » 

12:03 AM
REFRESH! There are 7722 unanswered questions (89.3679 answered)
 
 
6 hours later…
5:51 AM
I’m voting to close this question because it belongs on codereview.stackexchange.comSelcuk 8 secs ago
Thank you @Selcuk for the suggestion. I'm new in Stackoverflow. May be I will try on the codereview.stackexchange.com. — inurwansah 41 secs ago
 
6:21 AM
0
Q: std::array polymorphism

Tom HuntingtonIs this a sensible thing to do to get modern c++ features? Maybe I should just use std::vector template <typename T, unsigned N> struct polymorphic_std_array : std::array<T, N>, std::span<T> { polymorphic_std_array(std::array<T,N> a) : std::array<T, N>(a) , std::span<T>(*stati...

 
7:01 AM
possible answer invalidation by Toby Speight on question by murage kibicho: codereview.stackexchange.com/posts/265527/revisions
 
7:37 AM
0
Q: PHP class with many properties, getters and setters

Bib IvanovCan someone tell me is this good practice or somekind of design pattern. I want to avoid big class with many properties, setters and getters, and other methods. Object properties match database table columns, so i have 34 columns, 34 object properties, 34 object setters and 34 object getters. In ...

0
Q: Virtual keyboard for typing Latin with diacritics characters

inurwansahI'm developing a notepad with virtual keyboard integration. The purpose is to provide a free tool to type the Latin letters with diacritics. I came this far, but due my limitation and lack of coding knowledge I think will need partners to improve the app. I really appreciate your inputs and sugge...

 
codereview, make sure to post the code as text. — Sinatr 43 secs ago
 
 
1 hour later…
8:53 AM
0
Q: Hidden html elements after search click

JRRSimply i should hide areas of my template after search click and return to its original state with the cleaning of the input related to each button. I don't know if my code exploits all the resources of angular or js and looks clear/clean. To my mind it sounds redunting and repetitive. No forms o...

 
9:11 AM
possible answer invalidation by bbasaran on question by bbasaran: codereview.stackexchange.com/posts/265504/revisions
possible answer invalidation by bbasaran on question by bbasaran: codereview.stackexchange.com/posts/265504/revisions
 
0
Q: Add time to the snake game

keywan11Time spent in the game over and starting again and the number of baits eaten to play the game Time spent in the game over and starting again and the number of baits eaten to play the game Time spent in the game over and starting again and the number of baits eaten to play the game Time spent in t...

 
10:04 AM
If I saw this code in a code review on Bitbucket, I would reject it. — Tim Biegeleisen 5 secs ago
 
0
Q: a Logistic Regression model for MNIST binary classification

AlbertJI wrote a Logistic Regression model that classifies MNIST digits. I used tensorflow & keras only for import the dataset. from tensorflow import keras import time import numpy as np (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data() I sliced the dataset for binary classificat...

 
11:00 AM
0
Q: remote file follow using python

Zohar81I've created an on-demand class that can be initiated to collected any new data written to file from start_recording call until stop_recording which close the connection and retrieve the collected data so far. It uses in test cases for obtaining relevant logs during the time where a certain opera...

 
 
1 hour later…
0
Q: Draw System.Drawing.Rectangle and calculate average color over all pixels

DanielI have a picture in my Picturebox. I draw a rectangle with the mouse and with this procedure I want to form the average color over all pixels by looping over those pixels. The procedure is already working but I would like to have it optimized because I can imagine there is still room for improvem...

 
12:34 PM
As soon as you start to have other operators or many tokens in between the ? and then : like (, ), ., … and the expression between ? and : or after the : get really long it is hard to see what belongs to the ternary, and what isn't. And that is horrible for code reviews and maintainability. — t.niese 31 secs ago
No @OlivierRogier, asking for code to be rewritten in a different style is off-topic for Code Review. That site is only for reviewing finished code. — Toby Speight 21 secs ago
 
@Duga One of the posters than answered rolled it back. I've left a comment.
It invalidated an answer.
 
12:49 PM
@TobySpeight Sometimes refactoring, beyond a simple concept, espacially large code, is better posted on codereview because stackoverflow is for problem solving: Is it appropriate to ask for help refactoring or simplifying code?Olivier Rogier 23 secs ago
@OlivierRogier Do not conflate something being off-topic on Stack Overflow as making the thing on-topic elsewhere. This question, which you have suggested be posted on Code Review, should not be posted on Code Review. — Peilonrayz 59 secs ago
@TobySpeight This question is closed for needs details or clarity, not "off-topic", as we don't really know what function(s) is expected and how it should be organized (too wide and opinion-based for me). The OP should edit and improve it to show the way to help. I suggested CodeReview because I think this question as-is is more than a writing question and has no value on StackOverflow. — Olivier Rogier 47 secs ago
This question needs to be improved for it to be reopened on Stack Overflow. When the refactoring is done, it could be a good idea to ask for review of the finished program on Code Review. It's a good idea to read A guide to Code Review for Stack Overflow users before posting your first review request, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". — Toby Speight just now
 
1:07 PM
0
Q: Minimum range query Segment tree

Eren YeagerQuestion link : https://cses.fi/problemset/task/1649 Given an array of n integers, your task is to process q queries of the following types: update the value at position k to u what is the minimum value in range [a,b] ? Input: First line n and q: the number of values and queries. The second lin...

 
1:32 PM
1
Q: Preprocessing invalid xml before feeding it to a parser

apple1417As part of a larger project I'm writing to learn C++, I'm trying to read through some almost-XML files generated by another program. Unfortunately this program uses its own custom escaping logic, so some of these files aren't actually valid XML. As far as I can tell, its escape logic works like t...

 
@CaptainObvious I couldn't determine whether this is working code, or an off-topic "fix it for me".
 
1:48 PM
The code example you have provided is not a minimal reproducible example. In this code example there is absolutely no need to use CALL at all. I really don't think inappropriate is the word you want to use. Maybe you are looking for the best or most efficient way to solve your problem. Regardless the question is off topic because it does not provide a problem or error that needs fixing. If you want opinions on making your code better then post on CodeReviewSquashman 37 secs ago
Before you post at Code Review, make sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight 49 secs ago
 
2:40 PM
 
0
Q: Dynamically indexing numpy array

AeliusI want to create a function that takes a numpy array, an axis and an index of that axis and returns the array with the index on the specified axis fixed. What I thought is to create a string that change dynamically and then is evaluated as an index slicing in the array (as showed in this answer)...

 
3:14 PM
1
Q: Rainbow Trails Video Effect

Stephen MeschkeThis is an effect to augment juggling videos: The goal of this effect is to add a rainbow trail to a video using a tracked set of points. Link to source video Link to source data Link to complete Python script Link to complete video This is how the scrip works step-by-step: Look at the relevant ...

 
Monking
 
Philippe Beaudette on July 29, 2021
Here’s a brief recap of what we accomplished in Q2, along with details on our Q3 plans.
 
3:34 PM
If your code works, but you want to improve it, I would look at posting on codereview.stackexchange.comblackbrandt 43 secs ago
 
Monkking
 
Monk King?
 
-1
Q: Write a Program in C to read N numbers from a file , sort and store into the same file

Abhinav Ashish#include <stdio.h> #include <stdlib.h> int main(){ FILE *fptr; char fname[30]; int arr[20]; printf("Enter the name of file: "); gets(fname); fptr = fopen(fname,"r"); return 0; } data in file such as 15 17 81 14 8 Output is given in same file as 8 14 17 15 81

 
@RMunroe too bad it isn't gold-mines...
 
Landmines made of gold? No thank you
 
4:30 PM
0
Q: I made a Python code test from devskiller several times, but i keep getting a low score,can someone appoint what is wrong with my code?

Gustavo MarinhoThe test consists in create a class with function to receive a database, have the option to add more values to database and need a "verifySeries" function, what i don't understand is: my code passed trough all of tests after my first failure i tried to let the code most compact and light as possi...

 
@TobySpeight got two CVs and now RBA
 
4:55 PM
0
Q: Collecting data from list and then removing

JeffersonI created this sample and wanted any advice on how to make this code; cleaner, more effective, just overall better! I am collecting the days data from the NegativeScheduleSentence model and ScheduleSentencePart model and removing the model from the concepts object. only to have to re-add them ba...

0
Q: Pandas split column into multiple: performance improvement

jaumebonetAim of the Code: The aim of the function I'm working on is to take a particular column from a DataFrame that contains multiple <tag><content> pairs in the form of a string and expand them into individual columns in an efficient way. An example file can be found here (aprox. 3M entries), which can...

 
@SᴀᴍOnᴇᴌᴀ What do you want from someone that uses an altered Windows Flag as their avatar?
 
@pacmaninbw I saw that... I guess the same thing I want for most people - happiness
 
5:21 PM
0
Q: Optimizing my service method

RandyI have a Item Service that is Called from an Asp.Net Core Controller. I thought my most expensive (time wise) method could use some peer review: public async Task<IEnumerable<EcommerceItemDto>> GetAllItemsAsync(string customerNumber, string category = "All", int page = 0, int pageSize = 9999)...

 
0
Q: A test say that my code isn't good enough, can someone give me a help, to tell me what is wrong with my code?

Gustavo Marinhothe introduction is this: You are a member of a biotechnology programming team that is responsible for creating a system for lab technicians, which will assist them with drug analysis. Your goal is to create the application that will let them input their findings into the system, provide a meanin...

 
7:02 PM
0
Q: Segmentation error

Bárbara PereiraI was running a c++ code in ubuntu using g++ -g x_m_data.cpp -o outfile_1 command line. The code runs nicely and it doesn't indicate any errors, but when I use the command line /outfile_1 to open the file, the program indicates an segmentation error. I would like some help how to fix this. The co...

 
7:28 PM
0
Q: A simple Qt + MQTT doorbell application

taiBsuSo I built a house recently and didn't want to rely on "privacy-questionnable" systems like Google Home or Amazon whatever so I decided to build a doorbell system myself. Hardware I use a RPI4B+ as doorbell hardware and MQTT as communication platform between my home server, the doorbell hardware ...

 
 
1 hour later…
8:40 PM
I’m voting to close this question because it is asking for a code reviewQuentin 49 secs ago
Hello! If you're looking for general review and critique of a working piece of code, you should consider posting this to CodeReview.SE instead. — Brian 38 secs ago
 
9:10 PM
0
Q: Correct synchronization of reads and writes to ConcurrentHashMap and ConcurrentLinkedQueue

MikeI am writing a web application (Servlets, JDBC, no Spring - for learning purposes) that accepts orders from customers, while registered couriers can choose which one of these orders they want to deliver. Several couriers may want to deliver the same order, in which case the system creates a conte...

 
The use-cases I mentioned in golang.org/issue/33848 were “self-contained builds, language-agnostic code review, and ephemeral patches”. That's a lot more than just availability. — bcmills 21 secs ago
 
10:00 PM
0
Q: Leetcode kth largest element without using heaps

D_S_XI was working on kth largest element problem on leetcode Question Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 1: Input: nums = [3,2,1,5,6,4], k = 2 Out...

 

« first day (3009 days earlier)      last day (991 days later) »