« first day (3135 days earlier)      last day (46 days later) » 

12:00 AM
REFRESH! There are 7953 unanswered questions (89.2463 answered)
 
12:25 AM
0
Q: Is this code right ? or my syntax is wrong

Emanuel bassI'm trying to create multiple rows in my db with an array. This array has multiple objects of products chosen by the client. createInvoice: async function (req,res){//OK var params = req.body; var user = req.user.data; var promesErrors = []; var sub_total = 0; ...

 
12:49 AM
0
Q: Euler Project Problem #3 Optimization Needed

fabinfabinfabinWell I was solving Problem 3 from Project Euler, but I just found out that my code is really bad, it would take so much time to finish processing the code and I honestly do not know how to optimize it. Problem Statement The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime f...

 
 
1 hour later…
2:04 AM
0
Q: Yahtzee Project (CPP)

Aidan HonorI am working on a Yahtzee project, but I can’t figure out how to score some parts, and how to check if the player got it. I am fairly new to C++ so anything you can help with is great! (Full code at bottom) Parts I am curious about bool fhouse(int array[]) { return false; } How should I chec...

 
 
2 hours later…
4:17 AM
This question is more suited for codereview.stackexchange.com — smac89 51 secs ago
 
4:34 AM
0
Q: Design a pattern using python

xawefogI want to print the below pattern * * * * * * * * * * * * * * * My logic written for row in range(1,6): for col in range(1,6): if row is col: print(row * '* ') Can someone review the code and suggest any improvements needed The code which i have written is it a right approach ?

 
 
1 hour later…
6:16 AM
 
 
2 hours later…
8:25 AM
possible answer invalidation by Toby Speight on question by Dojje: codereview.stackexchange.com/posts/270633/revisions
 
8:44 AM
0
Q: get address parts based on requested parts

BobbyI have different format of address in an array, those format looks like this lastname/firstname/_/country/postalCode/_/regionId/city/addressFirst/addressSecond/_/phone lastname => a part of the address (noted AddressPart) / => a separation _ => a line break the above entire would do lastname firs...

 
9:21 AM
Monking
 
9:38 AM
@Duga I just de-prettified the sample output
 
10:12 AM
Codereviews are not ideal for SO (there is a different site here for that). And I'd say, that this reads just fine. If you are looking for options, you can do the groupBy in one swoop. E.g. map.groupBy{ it.name }{ it.date }.collect{ name, dates -> [name: name, worklog: dates.collect{ date, times -> [date: date, totalTimeSpend: times.timeSpent.sum()] }] } - note the second closure to groupBy to also group by date as next level. — cfrick 29 secs ago
 
 
4 hours later…
2:01 PM
"I am just running as many static analysis tools as I can to a code" Well, that's asking for a flood of false positives. If you do that, it should probably be in combination with code reviews. You either need to be a C or C++ expert or have one in your team which you can consult. Regarding MISRA-C and MISRA-C++, most tools for it are commercial. There is an open source static analyser called Frama C but I haven't used it. — Lundin 50 secs ago
 
Don't use Promise object in recursive function, use async/await instead. And what is the question ? Is it some kind of code review? — Nur 52 secs ago
 
2:33 PM
0
Q: Heart beat RTL module

DrakonofHeart rate or blink generator. Clocked from the system frequency, but calculated from a constant of 120MHz. Has a prescaler with values 2, 3, 5, 6, for even heart beat / blinking. The IS_DEBUG parameter is required for debugging for easy control over the rhythm, this parameter reduces 120MHz to 1...

 
 
1 hour later…
4:00 PM
Monking
@CaptainObvious it does somewhat sound like request to add features... and mick's comment affirms it
Am I incorrect in reading that you would like help adding features to this script? I mean, it is not currently filtering/sanitizing/validating files the way you desire. We are not meant to bake new functionality in your supplied code as far as I know. When you know how many elements your explode should return, a limit parameter is a good idea. My mind went to sscanf() when I saw that you wanted an int val from the middle of the string. — mickmackusa 10 hours ago
is it asking too much?
 
Seems like the questions are 100% about CNI
 
4:33 PM
Monking
 
0
Q: how to save toString into txt file using PrintWriter instead of FileOutputStream

solin case i want to save toString into txt file using PrintWriter instead of FileOutputStream as my code public static void save() { try { FileOutputStream output = new FileOutputStream("bank.txt"); String data = "Acc Data\n"; // header string byte[] array = data.g...

 
5:03 PM
This sounds like a question that would be well-suited for codereview.stackexchange.comJoshua Voskamp 29 secs ago
 
5:15 PM
possible answer invalidation by Stephen Williams on question by Stephen Williams: codereview.stackexchange.com/posts/270620/revisions
When you use WASM, does the Chrome app store require the source code for code review before publishing? — zino 27 secs ago
 
5:35 PM
possible answer invalidation by Stephen Williams on question by Stephen Williams: codereview.stackexchange.com/posts/270620/revisions
 
5:55 PM
I’m voting to close this question because it belongs on the Code Review Stack Exchange site. — Basil Bourque 19 secs ago
 
 
1 hour later…
7:09 PM
@Duga rolled back
@Duga ^^
 
 
1 hour later…
8:23 PM
0
Q: Want to know if I have too much going on in the main class. Is it possible to create these methods inside the Assignments class or does this look ok?

John SThe assignment is to develop a list of homework assignments. It has to be able to add a new assignment, remove an assignment, provide a list of the assignments in the order they were assigned, and find the assignment(s) with the earliest due date. Just want to make sure I am doing this correctly....

 
9:15 PM
0
Q: Working on my introductory programming capstone. This is a beginner class, but I would like to know of ways to make it more streamlined?

SnazzyJoeEverything currently works exactly as requested by the instructor, I've included as much possible commented documentation as I can think of to make it easier for people to see what the required criteria is for the project! Let me know what you guys think, I would really appreciated it! """ Criter...

 
 
1 hour later…
10:30 PM
0
Q: Advent of Code 2021, Day 3 in Haskell

ScriptimThis is a working solution to today's Advent of Code puzzle, written in Haskell. However, I feel like this solution is not optimal. module BinaryDiagnostic (parseInput, part1, part2) where import Control.Monad (liftM2) import Data.List (group, maximumBy, sort, transpose) import Data.Ord (com...

 
11:20 PM
0
Q: tried to make blackjack in python, deck that should only contain standard cards somehow has 52s in it

help![Text](https://imgur.com/QQrunWL] def shuffle(): global deck positions = [i for i in range(52)] deck = [i for i in range(52)] cards = [A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K] for c in cards: for r in range(4): ind = random.randint(0, (len(positions) - 1)) ...

 

« first day (3135 days earlier)      last day (46 days later) »