I'm learning Graph Theory and trying to solve the Dijkstra Problem. One of the best ways to solve the problem is to use Indexed Priority Queue and so, I implemented it. The code is below. Pls review and tell me how I can write it better. I'm still very much of an amateur so it would be my pleasur...
@AlexO It would be much safer and cleaner if you either made the original container to hold Wrapper<T> from the beginning or if you modified whatever code that is using the wrapper to work without it. Even if it was implemented correctly, I would very likely not accept the start_lifetime_as approach (nor any other you showed) in a code review. — user177325222 mins ago
In the following code, a user inputs a contribution amount and the program will output how many years it takes for the initial balance to double based on that fixed contribution amount:
#include <iostream>
using namespace std;
int main()
{
const double RATE = 5;
const double INITIAL_BALA...
I’m integrating Google Single Sign-On (SSO) into an existing Spring Boot REST API that uses JWT for authentication. I’m using Spring Security for OAuth2 login, and I’ve added a custom success handler to generate a JWT token for authenticated users. My question is about the right place to create a...
This seems like two questions: 1) How do I optimize this code (not on topic for Stack Overflow, but suitable for SX Code Review.) 2) What optimizations do Javascript runtimes give me for free? — Matt Morgan5 secs ago
I was hoping to put an ePet on my website like on this one: https://esheep.petrucci.ch/ The spot I would like to put it in the website is https://militarymedia.github.io/clicker . I know how to add the eSheep from the first website, but I would like the pet to be a hamster instead of a sheep, and...
@AlexanderIvanchenko Your comment on this question is good, but it should generally be accompanied by a down vote. If the OP edits the question you can up vote or remove your down vote later.
Voting is just as important as flagging, perhaps even more important.
I've completed a roadmap.sh project: https://roadmap.sh/projects/task-tracker/
It's my first rust project. So there's probably a lot of things that could be done in a more idiomatic way.
It's a CLI tool to manage a todo list save in a JSON file.
Example
Adding a new task
task-cli add "Buy groceries
@pacmaninbw I'm not aiming for it specifically, this is the first time I've looked at that scoreboard in quite some time. Considering I've 'only' voted 526 times this year, a tenth of what toolic did... There are more contenders for the record.
Besides, records are temporary. I remember breaking the all-time CV record. Luckily I'm 4th now.
When I became a moderator, I stopped clearing the queues. There's a general consensus the queues are best left to non-moderators in most occasions.
I am looking for feedback about a working trading bot (which connects to the API of the deribit website and trades on that platform) I made. I am a beginner in C++ and would like to learn some good practices and design choices that I have unknowingly missed.
CONTEXT: This was started by me as a t...
I've been looking into and experimenting with various paradigms for error handling in C++.
My goals for a robust error handling mechanism would be:
Enforce handling the error cases (in other words, make it more difficult to NOT handle the error case).
i.e. don't let things like result.value()->...