« first day (3307 days earlier)      last day (36 days later) » 

12:01 AM
REFRESH! There are 8077 unanswered questions (89.3086 answered)
1:01 AM
Q: Basic authentication used to call a REST API, but how to determine if a wrong password is entered?

user162124I'm using the following HTTP Basic Authentication with PHP to prompt the user for a username & password which is then passed to a REST API call to start or stop a process. As written this works great, as long as the user enters the correct username & password. However, if they enter the wrong p...

4 hours later…
4:36 AM
2 hours later…
7:14 AM
Q: Is this a correct implementation of factory method pattern?

Efstathios ChatzikyriakidisBelow, I have an implementation of the factory method pattern in Python. I don't like that I have to pass to get_instance the data object always with communities and documents initialized because I don't know which algorithm is going to be used. For example, dominant algorithm uses only communiti...

7:39 AM
Q: Kosaraju's algorithm in C simple implementation

Node.JSI am wondering can I please get some feedback for my simple implementation of the Kosaraju algorithm. More specifically how I de-allocate the things I allocated using malloc and method names. /** * Kosaraju's algorithm implementation which is a linear time algorithm * to find the strongly conne...

8:28 AM
Q: Rust program to print citations in Chicago author-date style

MaxI have written a Rust program that lets you input a citation's metadata in a Bibtex-like format and generates a bibliography entry formatted in Markdown that conforms (more or less) to the Chicago Author-Date style described here. Currently, it supports citations for Books, JournalArticles, and N...

2 hours later…
10:32 AM
Q: Closing handles in Powershell; handling partial cases in a DRY fashion

aphidPowershell contains no "goto" statement which is the normal way C++ code closes or 'frees' handles at the end of functions that use several or many handles (pointers). When interating with the win32 API (or the managed equivalents which are thin wrappers around it) some functions return handles o...

1 hour later…
11:33 AM
@Mast I might take this job for this U.S. company with the Norwegian parent company and try to convince them to let me migrate to Norway lol
1 hour later…
12:37 PM
Q: Calculate the first largest factor of 600851475143

Amir MotefakerٍProblem description: The prime factors of 13195 are 5, 7, 13 and 29. Largest prime factor 13195 is 29. What is the largest prime factor of the number 600851475143 ? Prime Factor: any of the prime numbers that can be multiplied to give the original number. Example: Find the prime factors of 100...

Yes. It's usually possible to make code shorter, and you can use a dictionary. But on StackOverflow you should ask more specific answers. Maybe this question fits better on codereview.stackexchange.com ? — Håken Lid 12 secs ago
1:01 PM
Q: Can I optimize my implementation of generating Fibonacci series using recursion?

Rahul ShivsharanMy function accepts a number, which generates total Fibonacci numbers. I am using recursion. Please follow the code below, var fibo = (n) => { var fibonacci = fibonacci; var fiboNums = [], prevNum = 0, currentNum = 0; fibonacci(n, prevNum, currentNum); console.log(fiboNu...

We have 2 pipelines in the "Pipeline" section. One for Dev and one for Prod. They are pretty straight forward with a Build SSIS task and Publish Artifact task. We have 2 pipelines in the "Releases" section (dev and prod). They use the Deploy SSIS task. We are using triggers /continuous integration to link everything together. A pull request from a new branch builds and releases on the dev pipelines, to our dev env. and requests a code review. Once approved, the original developer can complete the review that merges into master branch, and runs the build and release production pipelines. — David Squires 32 secs ago
1:51 PM
Q: Resources/Advice for Stochastic Simulation Python

StephenI am quite new to writing code and I am trying to reproduce the simulations found in Fig.2 of this paper on the age incidence of CML (https://www.pnas.org/doi/pdf/10.1073/pnas.0607006103). I think I've written the P(t) [Eq.1] function correctly; from scipy.integrate import quad def prob(t,z,N,r,q...

@johndenverabella I'm happy to look at your code. Post it on Code Review and shoot me a link! — simbabque 54 secs ago
2:19 PM
@CaptainObvious Code Not Implemented.
possible answer invalidation by rs028 on question by rs028: codereview.stackexchange.com/posts/211717/revisions
possible answer invalidation by rs028 on question by rs028: codereview.stackexchange.com/posts/211717/revisions
2:53 PM
@Duga Commented and rolled back.
We are not code review - we are StackOverflow, we will help you fix your code if it's broken and you're unable to after doing the research, not optimize it — Can O' Spam 56 secs ago
And even code review is unlikely to help. Will it work on other normal devices. - you'll find out through testing it on other devices, it is impossible to look at code and say yep, this'll be fine on andriod, ios, windows, mac and linuxCan O' Spam 29 secs ago
3:10 PM
@DerKommissar You miss all the shots you don't take.
but i need a feedback for my code questions belong on codereview.stackexchange.com0stone0 6 secs ago
I’m voting to close this because questions seeking code feedback should be asked on codereview.stackexchange.com0stone0 52 secs ago
3:30 PM
Q: daemon in a producer-consumer

MikeThe daemon program is associated with a message queue with a predefined key, to be blocked later when waiting for messages. The two programs implement a producer-consumer problem. The process sends a message to the queue, and the daemon wakes up to write the message it receives in a file. daemon ...

4:05 PM
4:20 PM
Q: improved "tee" utility

MikeWe have modified the tee program with your suggestions from the previous pull request. Did I implement well? I would like to optimize the program even more, what else could I improve? What other possible issues are being implemented? #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #in...

4:30 PM
@MaartenBodewes im going to post it on stack exchange code review thingy and if you may have time you can look at it if you want to — zero 8 secs ago
5:06 PM
possible answer invalidation by greybeard on question by ajax333221: codereview.stackexchange.com/posts/276244/revisions
Q: Can someone tell me if my AES GCM c++ implementation is secure?

zeroso I have written a c++ program that encrypts files using the crypto++ library with AES-256Bit(GCM mode). What's going to be added later is that it stores the keys for the files in a file e.g. keys.txt and encrypts that file again with maybe a different algorithm which apparently adds security in...

6:05 PM
@Duga With 4 answers, I can't really tell, especially since this isn't one of my programming languages.
@CaptainObvious Has one answer now.
Let's see if @TobySpeight or vnp can spot anything.
7:01 PM
@pacmaninbw Transcription of an image, so should be fine.
Although comparison against someone else's code is always a bit iffy for other reasons.
1 hour later…
8:12 PM
@Lorand Yes, using getopt would be better (collect -e operands in a data structure of some kind). Overall this question isn't really suited for Stack Overflow, as it is asking for improvements / refactoring to a functional program. I'll hesitantly suggest codereview.stackexchange.com, but you will want to frame your question more clearly, and improve your understanding of your own code, as they generally expect higher quality submissions than SO. Alternatively, try rephrasing this question to focus in on your misunderstanding of getline breaking up lines (which it does not). — Oka 38 secs ago
1 hour later…
9:21 PM
If you have a bug or a question, ask about them. We do not do code reviews here. — Moshe9362 30 secs ago
10:08 PM
Q: java String default value in for each loop

ahmad naserwhat is the default value in x in this for each loop str = ""; for (String x : temp) str += x + " "; return str.trim(); ```

@CaptainObvious Closed.
2 hours later…
11:48 PM
Q: Playing a game of ConHex in Python

agtoeverBackground ConHex is game by Michail Antonow where two players try to create a connected chain of cells from one side of the board to the other side. They do this by claiming one empty position each turn. If a player first possesses at least half of the positions of a cell, the cell belongs to th...


« first day (3307 days earlier)      last day (36 days later) »