« first day (2929 days earlier)      last day (1073 days later) » 

12:02 AM
RELOAD! There are 7570 unanswered questions (89.4376% answered)
 
12:15 AM
We would need a lot more information about what the exact usecase is. Like: what is the data? What is the required data format, both for the input and the output of your algorithm? How critical is timing? How many priority modifications will there be? But all of that would make this question too big for stackoverflow. That's rather what codereview.stackexchange.com is for. — Finomnis just now
 
12:56 AM
0
Q: How do you transform this code into pure functional javascript?

Ridhwaan Shakeelvar files = []; for (const entry of Object.entries(collection)) { var folder = ""; entry.forEach(item => { if (typeof item == "string") { folder = item; } if (typeof item == "object") { ...

 
1:54 AM
Code review is typically outside of scope here (which is why Code Review exists). A Stack Overflow question is expected to be about a specific, clearly-posed, well-specified error. If you don't know if there are any errors, this is not the place. — Charles Duffy 18 secs ago
 
2:24 AM
I’m voting to close this question because reviewing working code is better handled at Code Review. — Ken Y-N 28 secs ago
 
2:58 AM
0
Q: PowerShell script binary-decimal-hexadecimal-ipv4 convertor

Xeнεi Ξэnвϵς This is a fully functional PowerShell script I wrote not long ago that converts data (numerical data) among 4 data formats: binary, decimal, hexadecimal and ipv4. It supports 12 conversions, it can convert number from each type to the other three type, it can convert: binary to decimal | bi...

 
3:22 AM
0
Q: Is there a way to simplify code that requires different math symbols

FlubOticI have fully completed my Connect Four project, but the way I checked for a winning position is very repetitive. I feel bad for not being able to find a better solution for this. I have four instances of almost the same code. The only difference is the subtraction and addition signs. Probably eas...

 
 
1 hour later…
Nominally at least, if the code is working but needs improvement, the question should be asked on Code Review. Stack Overflow is for questions where the code doesn't work — but such code is explicitly off-topic for Code Review. — Jonathan Leffler 5 secs ago
 
5:24 AM
0
Q: Python Rabin-Karp Code Optimization

Brian KoHere's the Rabin-Karp implementation that I've written in Python: from functools import lru_cache from itertools import islice from typing import List, Optional BASE = 139 MOD = 2 ** 31 - 1 @lru_cache(maxsize=None) def char_to_int(c: str) -> int: return ord(c) + 1 def calculate_hash(s: s...

 
6:14 AM
Monking
 
7:01 AM
0
Q: How do I divide Dao and Dao-Cache into different modules?

study_20160808I want to improve performance for api. I design cache in dao layer. I use caffine cache. Basic code is: CacheConfig.java @Configuration public class CacheConfig { @Autowired private AppDao appDao; @Bean(value = "appCache") public LoadingCache<String, App> appCache() { re...

 
You may want to get to know codereview.stackexchange.com. — deceze ♦ 43 secs ago
 
7:40 AM
Monking
 
8:26 AM
That is probably a better question for codereview.stackexchange.comLukas Thaler 24 secs ago
 
8:38 AM
0
Q: De-/Serialization of structs representing TCP messages

Richard NeumannI wrote two template functions to serialize and deserialize structs representing messages to be sent and received via a TCP socket: /* * Convert a byte string into a packet. */ template <typename PacketType> PacketType deserialize(std::string &buf, bool partialProcessing = false) { PacketTy...

 
Thanks - I did not notice I'd copied my code into the wrong line. thanks for the code review! — djnz 12 secs ago
 
8:59 AM
"Any advice on the code?" - does "stop using BinaryFormatter, as a matter of urgency" count? (context: blog.marcgravell.com/2020/03/…). However, I suspect this might get closed as not being a good fit, in that it seems to be asking for code review — Marc Gravell ♦ 59 secs ago
Thanks Mark. I am new on the forum so dont know exactly how to ask questions correct:) The above code did not work and i dont know how to make it work. It wasn't meant as a code review. — Beginner_new 24 secs ago
 
9:27 AM
0
Q: Check if IP address list has subnet or is supernet

WarokI need to iterate over a list of IP addresses, to check if the elements inside are subnets/supernets between them, for this I use the IP-address library. Currently I have the following problem: my second iterator (which I use to iterate over the rest of the list) always starts at 0 and therefore...

 
 
2 hours later…
11:03 AM
I see no question here... What is your problem? If you don't have a problem and just want your code reviewed, there's an SE site for thatLaurent S. 47 secs ago
 
11:31 AM
Asking for "improvements" is better if asked on codereview.stackexchange.comevolutionxbox 30 secs ago
You might want to direct this to Code Review, but do a search there first and also make sure you read their on topic and how to ask articles first. — El_Vanja just now
 
Monking
 
11:53 AM
0
Q: OOP in Javascript with classes

OmenI am learning OOP in Javascript and I have done two small projecs which i have uploaded onto Github. I would really appreciate it if someone checks out my code and sees if it is adequate enough. The links are below. https://github.com/bobaram/flash-OOp-project https://github.com/bobaram/course-fo...

 
12:24 PM
yup, the method. note that this question might be better suited to codereview.stackexchange.comSam Mason 14 secs ago
 
12:51 PM
Greetings, Programs.
 
1:39 PM
Ben Popper on May 11, 2021
There are requirements that make software engineers sweat. Massive distribution to thousands of nodes. High reliability and availability. Multiple distinct platforms. Rapid network growth. his is the world SpaceX’s Starlink program, which has set a goal to provide high-speed broadband internet to locations where access has been unreliable, expensive, or completely unavailable.
 
1:53 PM
Maybe codereview.stackexchange.com might be a better spot to get feedback/kudos. — JonSG 41 secs ago
 
2:19 PM
This is too broad, could you provide a minimal example to reproduce the error? Otherwise, post this at CodeReview? — NelsonGon 12 secs ago
 
3:06 PM
Ahoy!
 
1
Q: Asp.net core response caching with custom key values

RobertI'm trying to build a response cache with custom key values (from headers and cookies). Here's the code I have so far, and it kinda works, but I need a second opinion or suggestions for improvements. Are there any possible errors, faster key generation methods etc. Here's the code for middleware ...

0
Q: How to Change For loop to Stream in Java

Sean SinI'm working on a mission. Regarding this mission, the reviewer asked me to change the form to stream, how can I solve this? public int next(int memberIndex) { int result = 0; for(int i = 0; i < last(); i++){ memberIndex = current(i).next(memberIndex); result = memberIndex; ...

 
@CaptainObvious Not sure, but I think code is not working as expected.
 
6
A: "Please refactor my code" requests

Simon Forsberg We have a consensus view that questions asking for re-writes of code are off-topic Citation needed. I don't agree about this at all. Refactor Linq Expression Simple code refactoring in javascript These questions are not off-topic. This is closed as unclear what you are asking because there is...

That for loop to stream post appears to be off-topic because it also is unclear what you are asking since there is very little description about what the code does
 
@SᴀᴍOnᴇᴌᴀ AHA, thanks.
 
@CaptainObvious RBA
 
3:16 PM
@SᴀᴍOnᴇᴌᴀ Based on the RBA due to my comment I think they were asking for a rewrite of the code.
 
@SᴀᴍOnᴇᴌᴀ I've never liked that answer.
 
3:33 PM
0
Q: RSI stock algorithm works, but feels too unoptimized

NessPThis is an Relative Strength Index algorithm able to buy and sell stock based on values from basic stock CSVs. It works correctly and well, but I'm not sure if it can be better optimized as it basically repeats itself twice to operate on the two stock values it's given. I can only use python itse...

0
Q: splitting very large csv file into hundred of thousands csv files based on colulm values

NDAGIJIMANA AdolpheI would like to split a very big csv file with hundreds of millions of row into small hundred of thousand files based on column value. I have tried many options: I have tried opening file and not closing but there is a limit for the number of opened file at the same time, by using this function ...

 
@CaptainObvious Smells like broken code, but let's see if we can get a reaction from OP.
 
Moznng
 
3:58 PM
0
Q: What is more efficient? using conditions before for loops? or vice versa?

ezzeddinI'd like to know what is more efficient and performant for the following two cases: Using conditions before for loops: if food == 'tomato': for i in range(1,000,000): <some logic> elif food == 'banana': for i in range(1,000,000): <some other logic> OR to use one for loop before th...

 
 
1 hour later…
5:18 PM
 
5:35 PM
I’m voting to close this question because it belongs to codereview.stackexchange.comrkosegi 40 secs ago
 
6:24 PM
0
Q: Repeated casting vs Saving two references

MethalousIn unity I have some code that finds all components of an interface type IJump. I know these interfaces are also MonoBehaviors, otherwise they would not be on the GameObject. In one script I need to refer to it as both an IJump and a MonoBehavior, but I'm not sure which approach is best. Saving ...

0
Q: Basic Espresso test

Bart FriederichsI am trying to get a grip on Android UI testing, and from a lot of trying and examples, I figured out this (working test): @Test public void FirstScan_ShouldSetSource() { try(ActivityScenario<ManualMoveActivity> scenario = ActivityScenario.launch(ManualMoveActivity.class)) { scenario...

 
7:00 PM
If you have a working solution, then you're basically asking us to do code review, which isn't within the scope of the site. I would normally suggest to take this question over to the Code Review site, but it would be as low quality there as it is here. If you really want to know if there's a different method that would be more beneficial for your application, then you'd have to present much more about what you're doing and how exactly you're using this data. Consider posting on Code Review if you're able to expand the question to show all relevant factors. — El_Vanja 33 secs ago
 
7:12 PM
This question should be asked on codereview.stackexchange.com instead - Stack Overflow is not really suited for questions like "how can my code be improved?" — kaya3 44 secs ago
 
-1
Q: Refactoring multiple if conditions

Dr.GHow to refactor many IF statements with multiple conditions like this? Is there a pattern for this? if(A == value1 && B == value1) { //do something } if(A == value1 && B == value2) { //do something } if(A == value1 && B == value3) { //do something } if(A == value1 && B == valueN) ...

 
7:35 PM
@0x5453 that wouldn't pass a code review with me — Peter Wood 8 secs ago
 
1
Q: Chain of Responsibility design

Альберт АлександровI'm trying to design a chain of responsibility pattern. It slightly differ from traditional way when handler does only one action on a request, f.e. handles http response considering status code. But my handlers have to do two actions. Below is an (dummy) example where handler asks a question fir...

 
Perhaps Code Review would have opinions. — Peter Wood 30 secs ago
 
8:01 PM
0
Q: How to process 1 Million requests per hour with synchronous SpringBoot application

Saurabh SharmaContext I've a scenario - I need to expose a rest endpoint and provide a post method , which will be used by a fronend to receive form values (name, email, address). With these details I need ti call a third party api (that could take upto 10 seconds to respond). Additionally , I need to store th...

 
8:21 PM
Since it appears that this code functions properly, this would probably best best as a question on Code Review Stack Exchange. — Jacob Lee 51 secs ago
 
8:31 PM
@CaptainObvious closed because there is no code...
I went with AoC... maybe I should have used a different reason
 
 
1 hour later…
9:39 PM
If this is working code you think could be improved, see Code Review. If you're not sure if it works, you need to test it. If you know it doesn't work, give a minimal reproducible example to illustrate the problem. — jonrsharpe 51 secs ago
Welcome to Stack Overflow! This site is intended primarily for specific questions and answers, perhaps your question would be more on-topic at codereview.stackexchange.com or another site? — Patrick L 51 secs ago
 
@SᴀᴍOnᴇᴌᴀ I closed it with a custom reason - AoC felt slightly wrong
 
10:33 PM
@SᴀᴍOnᴇᴌᴀ Ehh, yeah hard call on what to pick. I think your choice isn't wrong and you comment is good.
 
11:03 PM
If this doesn't work, what's the problem? If it does, head over to Code Review SE for a code review. — Woodford 26 secs ago
 

« first day (2929 days earlier)      last day (1073 days later) »