« first day (2954 days earlier)      last day (1359 days later) » 

00:02
RELOAD! There are 7630 unanswered questions (89.4065% answered)
00:26
0
Q: how to make inputs work well with special characters using the locale.h library?

Eduardo Nunes for some reason the function setlocale(LC_ALL, "English") doesn't work when using an input function,(getchar, scanf, fgets,..), to get a special character, (Ç, ã, õ, é,...). #include <stdio.h> #include <stdlib.h> #include <locale.h> int cont = 0; int soma = 0; char resp...

00:42
There are lots of ways this code could be improved. But I guess you'll find that out when you get a mark back. Alternatively post in CodeReview. — blueteeth 57 secs ago
0
Q: API design of library for argument inspection & filtering

jwodderI wrote the following Python library for getting a callable's argument names, testing whether a callable takes an argument with a given name, and filtering a dict down to just the keys that a callable accepts. You can see the entire code (tests etc.) on GitHub; only the actual module itself is s...

01:15
0
Q: Count number of days within each date range in a list of date ranges

clouddreamsHappily picked up Haskell a couple days back and working on the following use case. Given a list of JSON objects with date fields and a start date, I want to create a list of weeks (here a tuple of dates, but improvements are welcome) from the start date to today plus a week, and count the number...

01:47
possible answer invalidation by Sam Talbot on question by Sam Talbot: codereview.stackexchange.com/posts/221374/revisions
possible answer invalidation by Sam Talbot on question by Sam Talbot: codereview.stackexchange.com/posts/221374/revisions
02:30
0
Q: Is there any possible issue can be found or improvised this Node.Js code below

Tenesh Vignesanlooking for advice on improving or finding a possible issue in this code snippet for Node.Js var mysql = require('mysql'); var con = mysql.createConnection({ host: "localhost", user: "yourusername", password: "yourpassword", database: "mydb" }); con.query("SELECT clientId FROM c...

02:46
 
5 hours later…
07:52
possible answer invalidation by David Meik on question by David Meik: codereview.stackexchange.com/posts/261570/revisions
possible answer invalidation by David Meik on question by David Meik: codereview.stackexchange.com/posts/261570/revisions
08:51
Probably better off asking in Code Review. — Ouroborus 52 secs ago
09:17
possible answer invalidation by irtexas19 on question by irtexas19: codereview.stackexchange.com/posts/262658/revisions
@Duga That question should be simply closed. It's self-admittedly pseudo-code, despite Reinderen adding , and it lacks necessary context, such as the types of A and B.
@Duga Seems okay - adding missing context code
@Duga Rolled back, with comment
@blueteeth Please don't recommend Code Review for questions containing known-broken code: it is not ready for review until it's fixed. — Toby Speight 1 min ago
possible answer invalidation by Toby Speight on question by caseym: codereview.stackexchange.com/posts/251437/revisions
possible answer invalidation by Toby Speight on question by caseym: codereview.stackexchange.com/posts/251437/revisions
09:38
@Duga I split the code into two for and converted header comments into real headers - answer unaffected.
10:28
Maybe better ask this question on Code Review. — mkrieger1 42 secs ago
10:59
Monking
@Duga Closed.
@CaptainObvious Closed.
possible answer invalidation by Toby Speight on question by Eduardo Nunes: codereview.stackexchange.com/posts/262660/revisions
11:15
0
Q: Python 3 approximate pi using 9 algorithms

Xeнεi ΞэnвϵςNote: this script requires gmpy2, if you are using Python 3.9.5 x64 on Windows 10 21H1 like me, then you need to download the pre-built gmpy2 wheel from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/. So this is a script that approaches pi using 9 algorithms (actually only 7, two of the algori...

0
Q: Is there a better approach to group the props and get the count of an object of arrays in javascript, less code but native approach

user3416431Could anyone help me with below logic implementation. I am new to Javascript and have been practicing advanced functions. The below code does the job but is there a better way to achieve the same? I want to make my code perfect. I am grouping by location and then getting the sentiments count. // ...

@Duga Fine, code fencing.
possible answer invalidation by Toby Speight on question by Eduardo Nunes: codereview.stackexchange.com/posts/262660/revisions
12:04
0
Q: User input, floats, ints and ranges

N3buchadnezzarIntro So I am writing a larger script where a part of it is checking user input. Maybe I have a menu where the user can choose different options, or maybe I want them to write in some number/s. After some thinking I decided to write an all encompassing function to handle all the different user in...

1
Q: Monty Hall simulation - very first OOP project

henrynI mainly write code for data analysis so don't think about or use OOP at all on the day job. I thought I'd have a go at a simple Monty Hall simulation in an object-oriented style to figure out how it works - specifically I based it on this: https://www.reddit.com/r/dailyprogrammer/comments/n94io8...

12:54
0
Q: Using Functional programming to untangle deeply nested loops (Kotlin)

SidProblem statement for better understanding: Let's say we assign a unique number to each alphabet, a=1, b=2, c=3...z=26 then find the frequency of the sum of each word for all possible three letter words (with or without meaning). E.g. abc has sum of 6, yzx has a sum of 75, zzz has the sum of 7...

13:19
0
Q: Simple Dice Game in Java

Alex AleccoI'm creating a dice game where 2 players have their own dice, each has his own turn to throw his dice , players can either lose the score entirely or gain score depending on where they stand on the window , and the game ends when any player stands on the finish lane first , the winner is the play...

 
1 hour later…
14:20
@Duga Code fence
Er, @Duga, why are you double-reporting so much lately?
14:53
@TobySpeight It's a bit bugged and Duga is no longer under active development.
0
Q: R coding: creating a name variable to use with select

Elina BochkovaI am wondering if this is correct: VAR <- c("City") data %>% select(salary, age, VAR) melt(id.vars = c("Salary2", "Age2","City")) -> finalData I get the message: Note: Using an external vector in selections is ambiguous. ℹ Use `all_of(VAR)` instead of `VAR` to silence this message. ℹ See <h...

@Coenicorn The only thing that really jumped out at me was that you're using string to hold a single character, so perhaps you could change your grid array from string[,] to char[,], and then replace things like Grid[0, i] = "#"; with Grid[0, i] = '#'; (a char is represented by ' whereas a string by "). If you want code review, there is a dedicated Stack Exchange site for it, which might be useful to you: Code Review. Note that only working code is accepted there. — Llama 20 secs ago
ok, maybe this is not a good place for code review.. I solved my own problem by adding random val bewtween 1-50 and use it instead of statick 10. I will take this down. thanks guys. — hanabbs 19 secs ago
BTW, your last question (which you deleted before I could comment), might be on topic for Code Review, but you should check their help center first to make sure. You should also be aware that deleting downvoted questions can eventually lead to a question ban. — Heretic Monkey 25 secs ago
 
1 hour later…
16:14
0
Q: Find the most similar pair of rows from a table

rahulI have a list of n cities and hourly weather prediction for each one of them for h hours. I'm writing a script to find a pair of cities which has the most similar weather. And to represent the similarity in terms of a percentage scale. An example dataset with 5 hour forecast for 3 cities are as f...

0
Q: How to turn this recursive algorithm into an iterative

randoI have this algorithm I wrote but I do not really know if it is possible to convert it to iterative one. I am trying to get the adjacency nodes for every node in cube-like shape. The adjacent nodes must satisfy two conditions: It is a gray node. It is within a radius of distance def find_contin...

16:25
It's probably off topic here to ask for code review. But with a small program like that you could write unit tests for bot VB and Python and then make sure the code passes the same tests. — Robert 57 secs ago
16:39
0
Q: Best practices for writing documentation comments when using Vavr with Java

PrashantI am using Vavr with Java. Here is an simple example of a service that my application has: Option<User> findUserByEmail(String email); I am very confused about how to write a good documentation comment for such a code. Basically, the method in question returns a Option<User>. So when documen...

0
Q: Script to copy Egde-Chromium browsing history from a remote machine. Try-catch, custom object building

user2978216There are some Kiosk machines for people to attend a survey (running by 3th party). To measure how much they are in use I wrote a script to pull Edge-Chromium browsing history from a remote machine function Copy-FileRemotely { [CmdletBinding()] param ( [Parameter(Mandatory = $...

I guess I took it down cause I simply did not understand why asking for code review w/ the real code was getting 2 negavtive points? I just don't understand the logic behind that — hanabbs 48 secs ago
 
1 hour later…
17:54
0
Q: Image Processing Median Filter in C

JimmyHuI am attempting to perform Median Filter with size 3 x 3 in C language. The function MedianFilter33 has been implemented as follows. The experimental implementation The basic structures: typedef struct RGB { unsigned char R, G, B; } RGB; typedef struct BMPIMAGE { char FILENAME[MAX_PATH]...

 
1 hour later…
18:57
possible answer invalidation by albert on question by albert: codereview.stackexchange.com/posts/262629/revisions
possible answer invalidation by albert on question by albert: codereview.stackexchange.com/posts/262629/revisions
19:42
I’m voting to close this question because asking for improvements / review is off-topic on SO, should be on codereview.stackexchange.com instead. — luk2302 12 secs ago
19:59
0
Q: UTF-8 to UTF-16 using C++20 concepts and ranges

Ayxan HaqverdiliA follow-up for this previous question. I took into account previous reviews, and tried to make a simple API. I had never done anything non-trivial with C++20 concepts and ranges until now, so I am sure I have a lot of things to fix. I added many helper concepts. Interestingly, while there are va...

go to link, I don't believe this question is for the stack overflow community — The shape 42 secs ago
I think that this question is for codereview.stackexchange.com not stack overflow — The shape 51 secs ago
@Theshape this looks good as per SO standards. Read: A guide to Code Review for Stack Overflow usersanky 56 secs ago
Answering mistakes sounds like a code review (afaik stackoverlow is for answering specific question in programming, and I've seen several similar question). Either way, there's nothing I can do to move the question that you can't. — dm2 10 secs ago
20:24
0
Q: Multithreaded pathfinding in Unity C#

xcryptI've tried to implement multithreaded pathfinding in an attempt to increase performance, but if anything, performance seems to actually decrease when I enable multithreading. Is there anything I should do differently in order to see a performance gain from multithreading? using System; using Syst...

0
Q: What to add to a Flappy Bird JavaScript code

IDKI have a 200 line fully functional flappy bird code but I was told it's suppose to be 250 lines. I don't know what more I can add to the js of the game to improve it and make it longer. I was told I can maybe add a pause button but I only know how to do it through css and not through JS. any sugg...

0
Q: How to refactor this spec

megasI've written this spec but I think it's not ideal. Is there a way to improve this spec? describe "diversity of parsing" do [ ":)", ":]", ":D", ":‑)", ":-]", ":-3", ":3", ":->", ":>", "8-)", "8)", ":-}", ":}", ":o)", ":c)", ":^)", "=]", "=)" ].each do |emoticon| body = { "a"

@CaptainObvious Closed it for lacking a description, but OP decided to remove it a second before I could post the comment.
20:51
@Duga Rolled back by Mast
21:14
0
Q: (C#) Sudoku board validation algorithm. It is already fast on my machine and I wonder how I can make it significantly faster, if at all (for fun)

C4OcI tested this algorithm on 9x9 boards and on average, if the board passed to the function is a (valid) solution, it takes 0.13-0.14 seconds for 1 million executions on my machine. I ran my code in Release mode in Visual Studio and timed it using Stopwatch. I found the idea to use summing of all d...

22:04
0
Q: Caesar cipher/beginnings of a crypto library in Rust

Egg-FaultAs a hobby project (and to learn the language), I'm working on a crypto library in Rust. The following is a component thereof, which implements encryption with and the cracking of the Caesar cipher. My primary interest is whether the code follows best practices, with a secondary concern regarding...

22:54
0
Q: I have web-app and In JUnit tests I need use TomcatJNDI to get connection so Is this still unit testing?I'm using Mockito

DozezQuestThis is my Service class where I use corresponding Dao public class TaxiServiceCarCategory { private final CarCategoryDao categoryDao; public TaxiServiceCarCategory(CarCategoryDao carCategoryDao){ this.categoryDao = carCategoryDao; } public boolean insertCarCategory(CarCat...


« first day (2954 days earlier)      last day (1359 days later) »