« first day (3189 days earlier)      last day (111 days later) » 

12:00 AM
REFRESH! There are 8052 unanswered questions (89.1937 answered)
 
12:18 AM
Excellent question. Don't get discouraged--you might be able to rephrase it and possibly re-target it at the code review site or something. Man I hate SO Mods, they are absolutely the worst thing about a good site, it doesn't surprise me at all that new users are discouraged here. — Bill K 51 secs ago
 
12:47 AM
@BillK Generic Best Practices are off-topic on Code Review Stack Exchange so posting the question there wouldn't be a good idea. Such questions are off-topic because it's common to get comments like "but my code does x, and your y best practice sucks there". If you know a couple of languages; you should be able to see how arbitrary 'best practices' are. — Peilonrayz 20 secs ago
 
@Duga ouch! seems a bit harsh to the SO mods- I flagged that as unfriendly
 
 
1 hour later…
2:06 AM
0
Q: Most efficient way to track a collection of targets in range of a source object

wilderness26In my game there are space ships and each of these space ships tracks which other ships are in range of it. I need to perform certain logic when a target ship comes in range of another ship, and certain logic when the target ship leaves the range of the ship. I am looking for advice on the most p...

 
2:47 AM
This is a good fit for Code Review especially given the open-ended nature of the question and you are encouraging discussion and advice. I would however suggest that any performance gains would be found in the InRange implementation which you have not included here. It would also help to post some metrics around how long this method takes for different common inputs. Don't blindly pre-emptively optimize code, use a metric based targeted approach. — Chris Schaller 48 secs ago
 
 
2 hours later…
4:20 AM
0
Q: nginx react.js dockerfile

Sayamanhttps://github.com/bbachi/nextjs-nginx-docker https://github.com/bbachi/nextjs-nginx-docker/blob/main/Dockerfile # stage1 as builder FROM node:10-alpine as builder # copy the package.json to install dependencies COPY package.json package-lock.json ./ # Install the dependencies and make the fold...

 
5:13 AM
0
Q: C# PRNG class based on xoshiro256**

MichaelSBackground I'm creating a (probably bad) map-generation utility in C# to generate fractal terrain and similar. Nothing I do probably needs special treatment, but I thought it best to start with a good source of random values. My understanding is that C# only has two built-in sources of random num...

 
5:53 AM
Monking
 
 
2 hours later…
7:46 AM
I.e. the code does not generate an error and the verification of the generated signature is successful. That should be in the question! But what is the problem then? The code seems to be OK. If it is about a code review, there is a dedicated site for this: codereview.stackexchange.com. — Topaco just now
 
0
Q: How do I get my CSS code below to activate on scroll?

joseph blackso I have a CSS + HTML code that animate highlights text. Can be applied to any text in a paragraph multiple times. You can change colour, speed, add delays etc. Code works perfectly. However, the code causes all my planned to text to animate highlight simultaneously as soon as the webpage has fu...

 
8:09 AM
Is there a question in there? If not perhaps post on Code Review instead. — Andreas 8 secs ago
 
8:46 AM
0
Q: How to writer easier code mocking pathlib.Path.open and pathlib.path.unlink?

buhtzI use pathlib.Path.open() and pathlib.Path.unlink() in my productive code. The unittest for that work. import unittest from unittest import mock import inspect import pathlib class MyTest(unittest.TestCase): @mock.patch('pathlib.Path.unlink') def test_foobar(self, mock_unlink): #...

 
This may be more suitable for code review. One thing that should be mentioned - the list comprehension will iterate over the whole list, even if you know there is only one element that satisfy the condition, i.e. no short-circuit. @enke answer is better in that respect — buran 57 secs ago
 
9:13 AM
0
Q: Sequelize: Not getting the data when hitting API but data stored in Database

TariqueI am using Mysql database and Sequelize ORM. I have created this function which should return the list and when a value is added in the query then the list should return accordingly. But when i hit this function, i am unable to get the data. The API is giving me 200 status code but rows in result...

0
Q: Python greedy coloring and drawing

EmilioI am trying to create a program that colors a graph with four colors so that there aren’t any adjacent vertices with the same color. The program then draws the colored graph using Networkx. There is a problem, when manually giving a graph to the program the coloring works fine, but when generatin...

 
 
2 hours later…
10:46 AM
For a complete running code you can ask at Code Review to improve your code. — kelalaka 57 secs ago
 
10:59 AM
0
Q: Java OOP Hangman - revision #2 (get word in category)

scriptaThis code gets a random word from a word list for a category chosen by the player. The categories are the names of text file containing a list of words. "Words" can contain spaces and hyphens (e.g. "Charles Darwin" counts as a word). Eventually to be incorporated into a Hangman game. The current ...

 
please try to focus your question on one specifc issue. "wahts the best and short way" is too broad. If your code is correct consider to ask for a review on : codereview.stackexchange.com463035818_is_not_a_number 12 secs ago
 
11:53 AM
0
Q: Comparing a prefix tree against a HashSet of strings in Java

coderoddeHere, I have made an attempt to find out whether a [prefix tree] is any more efficient than a simple java.util.HashSet<String>. See what I have: com.github.coderodde.text.autocomplete.PrefixTree.java: package com.github.coderodde.text.autocomplete; import java.util.ArrayDeque; import java.util.A...

0
Q: formatting flattened string into JSON-like object in C++

user3132457I have a string which contains JSON-like object flattened (stringify()ed). I need to JSON-ify it back. It's a custom format, so I wrote function to JSON-ify the string: #include <string> #include <unordered_set> #include <iostream> const std::unordered_set<std::string> reservedWords{ "coords", "...

 
12:06 PM
This is not a code review site, also you should have bigger problems to worry about — TheGeneral 24 secs ago
 
12:20 PM
0
Q: (Beginner) Mastermind game in Python

M.WhiteAfter completing an introduction to Python tutorial, I wanted to put my basic knowledge of control flow and data structures to use, and felt this was a great choice for my first program. I created the below to run in Jupyter Notebook / Visual Studio Code terminal. It behaves like an over-the-boar...

0
Q: Dinner of philosophers using the IPC

Otto von BismarckI wrote a program using the IPC that demonstrates the classic issue of the Philosopher's Dinner. A philosopher at the start of the program is attached to a shared memory, and contains on the first position the current number of philosophers and a plate for each philosopher. Every philosopher will...

 
12:33 PM
I do not need code review. It is not about code quality, I need to know if the way I applied the SignData method is correct. It seems correct, but I cannot rely on seems correct when working with cryptography. — jakubiszon 9 secs ago
My point is, this not the right site for a code review. How your code looks is irrelevant here. Apart from allocations there will be negligible performance issues unless this on a hot path in a massively scaled environment. Additionally there a no metrics to answer your question Apart from id like it to be silky smooth. Likely the whole solution and problem should be rethought and could be better, who knows? The short of this being, is if you want a code review talk to your senior developers or see the code review site ) — TheGeneral 33 secs ago
 
1:15 PM
This website is not for code review. You'll have to ask more specific questions, other than "review my code" — Shai 25 secs ago
 
 
2 hours later…
2:50 PM
stack overflow is for broken code. Code Review might help with improving it — Daniel A. White 52 secs ago
 
3:01 PM
0
Q: Lets get random, extending Pythons base random class

N3buchadnezzarSo Pythons base random class uses the https://en.wikipedia.org/wiki/Mersenne_Twister as its base for seeded random number generation. If available it can use /urandom/ though, but that is beside the point. There have been several claims that this generator is not ideal, and that other generators ...

0
Q: How can I speed up/ optimise my kivy app's widget addition

Raed AliI made a kivy app to find the rhyming words for a word entered by the user. It displays all the rhyming words as OneLineListItems in a kivy RecycleView. On clicking on one of these OneLineListItems it uses PyDictionary to display a few definitions of the word on the right-hand side of the screen,...

 
3:48 PM
this might be better suited at codereview.stackexchange.com — lucidbrot 11 secs ago
 
4:03 PM
If this code works, it's likely for it to be more appropriate for either Rust forum (users.rust-lang.org) or for Code Review Stack Exchange. If it doesn't, the question should state the problem exactly, otherwise it is simply unclear. — Cerberus 45 secs ago
I'm not a fan of the way you did your curly braces each on their own line, I usually put the starting brace on the same line as the function declaration or expression. But that is a person style choice. Your HTML also looks a bit weird but that could be a formatting issue on StackOverflow itself. That said, this question is off-topic. You may have better luck on CodeReviewGrumpyCrouton 35 secs ago
 
This may be better fitted for Code Reviewrob 26 secs ago
Is there a concrete programming question here or would you like the community to review your code? If the latter, then this question is off topic here on SO and should be asked on the code review sister site of SO! — Shadow 41 secs ago
I’m voting to close this question because it is off topic for StackOverflow, please try CodeReviewRiggsFolly 48 secs ago
 
4:20 PM
0
Q: URI Rewrite Nginx

user254599I would like to rewrite URI with NGINX I want to reach foo.bar.com on 443 and redirect to http://local_IP:8080/ur/CouponEngineService Proxy pass is not working Here is my settings: server { client_max_body_size 40M; listen 443 ssl; server_name foo.bar...

0
Q: data sent through a `pipe` from parent to child

Otto von BismarckI wrote a program that uses a pipe to send messages from a parent to a child. Question: Is this the correct way I sent the messages? Could I have done otherwise? What can I improve? my code: //Parent/child processes communicating via a pipe #include <stdio.h> #include <unistd.h> #include <string.h>...

 
@rob when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the code above would likely be closed as off-topic because it is missing context. — Sᴀᴍ Onᴇᴌᴀ 37 secs ago
 
Prashanth Chandrasekar on January 26, 2022
It’s hard to believe we’re already four weeks into the New Year, especially as everything we have to celebrate from 2021 is still fresh in my mind.
 
@CaptainObvious code appears to be changed but still has issue similar to question asked yesterday 😏
 
4:58 PM
Monking
 
5:13 PM
0
Q: Accessing a common memory area of ​two or more processes

Otto von BismarckI wrote a program that demonstrates the principle of shared memory, creating two areas of shared memory, of different sizes. Is memory access correct? I want some positive and negative arguments for implementation code: #include <stdio.h> #include <sys/ipc.h> #include <sys/shm.h> int main() { key...

0
Q: Is the code readable to get the first job?

user254603I want to know if that code is correct and readable. In class avatar, I make validation. I check if the field is not empty and if the photo extension is correct. If not, an appropriate exception is to be thrown. In class avatar update I make avatar updating. This class is responsible for updating...

 
5:59 PM
 
Also your ad hominem statement “if you're programming for linux users you wouldn't be trying to provide info from a windows perspective anyway” is completely false as I, assuming I am aware of respective issue, would definitely point this out in code review and teaching if there is ever any chance that the resulting may be run cross-platform (i.e. just about always). <sarcasm>After all, the person in question may have would up on StackOverflow after searching for “file creation time” and gone “oh the C in ctime is for creation” after quickly skimming over your answer.</sarcasm> — ntninja 42 secs ago
 
6:30 PM
Monking
 
 
1 hour later…
7:53 PM
0
Q: R language optimize converting mpfr to gmp

Carl WitthoftI wrote a function to convert, without loss of precision, a mpfr - class value to a gmp bigq value. (This particular operation is not available in the R libraries Rmpfr and gmp, tho' there are functions to convert in the other direction). My code works but feels clumsy to me. Any suggestions to ...

 
8:20 PM
0
Q: tokstr, a better version of strtok/strsep/et-al

Paul Vixiei'm a strtok_r() hater. i don't want to make a copy of my input string that it can destroy. after decades of struggle and strife i drafted a modern replacement that optimizes for the clarity of the caller. i call it tokstr, and it is writ in C for callers in C. example: tokstr_h ts = tokstr_s...

 
Hi and Welcome to SO. Please take the tour first. Then read how to ask questions here. After that edit the question to meet the guidelines and provide a minimal reproducible example for debugging details. JS code alone without reference is hard to understand. Also note, that SO is not a Code Review Service. — tacoshy 40 secs ago
 
8:53 PM
If your current code works, the question might be better suited to codereview.stackexchange.com. — jfaccioni 48 secs ago
@jfaccioni, this doesn't look like a review request, so recommending Code Review probably isn't appropriate. — Toby Speight 50 secs ago
 
9:27 PM
Questions about improving otherwise working code may be better suited for Code Review, but be sure to follow their content guidelines and How to Ask to ensure an on-topic question. — jmoerdyk 28 secs ago
 
10:59 PM
0
Q: Define multiple buttons for Windows commands

user18013413I'm teaching myself Python. I put this on another stack exchange site and someone recommended I put it here. If it doesn't fit, please remove it and let me know. I wrote this code for work to help me troubleshoot end users PCs (it opens a GUI with a selection of buttons). It's written in python u...

 

« first day (3189 days earlier)      last day (111 days later) »