« first day (3001 days earlier)      last day (1019 days later) » 

12:03 AM
REFRESH! There are 7708 unanswered questions (89.3744 answered)
 
 
1 hour later…
1:24 AM
 
 
2 hours later…
3:39 AM
0
Q: quant. code. to calculate trend, momentum, correlation and volatility in Pandas(Python)

DDStackoverflowI am new to quant. finance and trying to calculate trend, momentum, correlation and volatility. Below are the functions I have created import pandas as pd def roll_correlation(first_df, second_df, rolling_period): """ Rolling correlation """ return first_df.rolling(rolling_perio...

 
 
2 hours later…
5:09 AM
Monking
 
 
2 hours later…
6:41 AM
possible answer invalidation by dwjohnston on question by dwjohnston: codereview.stackexchange.com/posts/264194/revisions
possible answer invalidation by dwjohnston on question by dwjohnston: codereview.stackexchange.com/posts/264194/revisions
 
7:26 AM
0
Q: Add (echo) cutom css to Wordpress template file ? is this safe?

Gayal chamI created wordpress template and i want to add this css code only in to inside of this template only.for the security concern should i escape?. can anyone help me to solve this?. here is the code i used. <?php $style = "<style type='text/css'> .post-related {position: relative; width: 21.3...

 
7:36 AM
possible answer invalidation by Matt W on question by Matt W: codereview.stackexchange.com/posts/264258/revisions
"does it seem like I'm doing any of this correctly" SO isn't really a code review site. People are happy to help if you ask a good question. As for your error. You can't select a cell on a sheet that isn't active. So if you add the line Sheets("raw list of dates off").Activate before trying to Select the cell that error should go away. — Bee_Riii 35 secs ago
possible answer invalidation by Matt W on question by Matt W: codereview.stackexchange.com/posts/264258/revisions
 
0
Q: Project Euler #12 in Julia slower than Python?

Maxwell's DaemonMy code in Julia, almost identical as the Python code (see below), runs in 4.6 s while the Python version runs in 2.4 s. Obviously there is a lot or room for improvement. function Problem12() #= The sequence of triangle numbers is generated by adding the natural numbers. So the 7th t...

 
8:27 AM
Also keep in mind that there is CodeReview for this kind of questions codereview.stackexchange.comJohnPan 39 secs ago
 
8:41 AM
0
Q: Single user Electron application allowing basic CRUD operation on a table (stored in JSON)

Radim BačaI am completely new to JavaScript and I will be grateful for your comments on my Electron app (electron is a JS framework allowing to create of desktop apps). I needed to create an application that stores a small database and allows me to do simple operations on the data. I just include a small f...

 
9:32 AM
0
Q: Designing an URL Shortener

Kaushal28Recently I was assigned a URL shortener design problem while interviewing with a well known organization. Here is the exact problem statement: Build a simple URL shortener service that will accept a URL as an argument over a REST API and return a shortened URL as a result. The URL and shortene...

 
 
1 hour later…
11:00 AM
I’m voting to close this question because it looks like a question for the CodeReview site. — Dominique 24 secs ago
 
 
1 hour later…
12:14 PM
@user If you skip that requirement, you could also do something similar to that other question that I linked to. Although with the number of properties you have, that might be a bunch.... but that can of course be fixed by more encapsulation.
 
This might be me being thick but I cannot work out how your results are expected. You said I need to output an array of objects where only the best prices are kept. - how do you define "best prices"? Also for working code Code Review(codereview.stackexchange.com) is often better — Jamiec 35 secs ago
 
12:53 PM
0
Q: Find the highest product of three numbers in a list (Python)

msm1089I wrote the below as a solution to: Problem Find the highest product of three numbers in a list Constraints Is the input a list of integers? Yes Can we get negative inputs? Yes Can there be duplicate entries in the input? Yes Will there always be at least three integers? No Can we as...

 
1:30 PM
@SᴀᴍOnᴇᴌᴀ Does this answer really deserve a down vote?
I don't know javascript well ennough to know.
 
@pacmaninbw the answer is just straight up wrong and it's not actually reviewing the code at all ..
it just observes that OP wanted to follow functional paradigms and then purports that doing that is overkill
 
Thank you!
 
2:08 PM
0
Q: Database dynamic query

EmaborsaI am working with C#, Dapper, EF Core and Postgres. I defined an endpoint for a paginated search, where the filters and orderBy column are dynamic. The endpoint accepts a PaginationOptions instance: public class PaginationOptions { public int Page { get; set; } public int ItemsPerPage { g...

 
@pacmaninbw Achievement get! Peer pressure.
The answer was pretty bad, was going to -1. But the OP ninjaed me
 
@Peilonrayz It took me more than 5 years to get my peer pressure, they did it as a newbie!
 
Some "achievements" seem to be more "consolidation prizes" ;)
 
2:24 PM
@Peilonrayz Have you read any Charles Stross books?
 
This is a fairly ill-fitting question for code review, since you seem to be primarily interested in a review of the API of your library. The code of that library is not included in the question and therefore not reviewable. While I can understand the desire to create a nice and idiomatic API, Code Review really wants to be much more than just API review... — Vogel612 just now
 
No, I don't have the imagination to enjoy books. However I have taken a good chunk out of the Python Docs, pretty much the only 'book' I've read.
4
 
2:37 PM
I would say this is more appropriate for codereview.stackexchange.com. — Guru Stron 24 secs ago
 
2:48 PM
@SimonForsberg Unfortunately, it looks we're not switching to Kotlin after all
All that code was wasted
 
well, you learned something from writing it, didn't you?
 
Yes, always wait a few days before doing anything in case someone else tells you they don't want to go through with it after all /s
(but yeah, my next builder-like thingy won't be as horrible)
 
0
Q: Finding childs with 0 or 1 parents - DFS or BFS

Neslihan BozerI completed the following question but it seems a lot of space complexity. Do you think is there a way to complete it with graph search or so ? Thanks for the comments? Suppose we have some input data describing a graph of relationships between parents and children over multiple generations. The ...

0
Q: Refactoring overkill? C# example

user245248Say we have two operations that make http requests. public async Task<(bool success, OperationOneResult result)> OperationOneAsync() { try { var response = await _httpClient.GetAsync("urlOne"); if (response.IsSuccessStatusCode) { var result = await resp...

 
3:04 PM
Monking
 
If you can, could you create a runnable code snippet for a minimal, reproducible code example? The code you provided is too lengthy. Also, your question might be more suitable for codereview.stackexchange.com. — PIG208 40 secs ago
 
3:33 PM
@JohnRotenstein, it's not ready for code review. sometimes it doen't work — Laura Jorge 13 secs ago
 
Monking
 
3:54 PM
If you have some specific issue, we can help with that, but if you just want someone to review your code, please post it over at Code Review instead. — Magnus Eriksson 52 secs ago
 
This post in the CV querue with 2 CNW votes is tagged with and but the only "code" is the nginx configuration... should it be closed for AoC (since there isn't really code to review (unless the OP wants configration reviewed))?
 
@SᴀᴍOnᴇᴌᴀ I was torn by it as well.
 
4:14 PM
@SᴀᴍOnᴇᴌᴀ and are completely inappropriate. I read the question as only about .
 
0
Q: PHP File Upload. Whatelse can I add to make it more secure?

suchislifeI've put together an example single file upload script that attempts to cover all the things PHP could check for prior to allowing a successful file upload. Is there anything else maybe now available in PHP 7.4+ I could use to make this more secure? For example, I use filter_input below even thou...

 
If you find the question unclear commenting would be good.
 
@Peilonrayz I wanted to make sure AoC was the correct reason for closure before I comment
 
Could you explain to me why AoC would be the right reason?
 
@Peilonrayz "we require that the code be posted by an author or maintainer of the code, that the code be embedded directly"...
but please correct me if there is a better reason to close it
this is why I brought it up
 
4:20 PM
Are you only talking about the second part? Because I don't think you have any reason to think the author is not an AoM.
 
right - there is no angularJS code posted/embedded
 
I don't think the question is about Angular.js.
 
4:43 PM
@Peilonrayz right - so is CNIoWAI the correct reason to close it? ggorlen did leave a comment:
Welcome to CR! This doesn't appear to be a request for a code review or in scope based on on topic in the help center. — ggorlen Jul 17 at 0:11
I would suggest the user check out the which site link
 
@Peilonrayz okay that answers part of my questions, though in your statement "we have the code" - is that "we" as in reviewers? if so, "we" have no code other than the nginx configuration...
 
@SᴀᴍOnᴇᴌᴀ We don't have a standard close reason for types of code which aren't deemed 'code'
 
@Peilonrayz so at this point I'm wondering: does the nginx configuration count as "code", to the extent that a reviewer could use that for a review? given "Is code included directly in my question? It is fine to post supplementary code on a third-party site, but the most important parts of the code must be embedded directly in the question."
 
4:59 PM
@SᴀᴍOnᴇᴌᴀ We may have a meta. But all the standard close reasons would be inappropriate here.
 
I found one meta post that seems relevant
15
Q: Do configuration files constitute reviewable code?

200_successA question asks to have a Samba configuration file reviewed. Do we consider a configuration file to be code? It's certainly not a Turing-complete language. Is Turing completeness a defining criterion? Note that we can address many of our usual concerns, such as security, correctness in unexpect...

 
I don't participate there myself, but Code Review is a thing that exists, if what you're looking for is advice and feedback on working code. — Charles Duffy 5 secs ago
 
5:27 PM
@Peilonrayz closed, with that meta cited in a comment
 
@SᴀᴍOnᴇᴌᴀ Why did you close as CNIONWAI?
 
@Peilonrayz I did a custom reason - perhaps because 2 users picked CNIoNWAI it used that...
 
Oh nvm just SE bugging out
 
5:56 PM
0
Q: list comprehension with two variables

Bleffydef bla(m,n): return[b for a in range(1,m + 1) if a % 3 == 0 for b in range(1,n + 1) if b % 2 == 0] print(bla(9,10)) --> [3,9,2,4,6,8,10] hey im stuck how can I get both a and b outputs and not only the b output?

 
6:16 PM
those are all different questions
 
@Duga wow 3 answers by the OP
when will this stop?
maybe when the user runs out of posts on SO...
 
flagged one of the comments
jeez, they are not stopping
 
Nani, is the user a bot?!
 
ಠ_ಠ ...
> Co-founder & CEO of QA Locate
 
nah, don't think so, it's more that they are very ... enthusiastic about their post
you might have it easier by pinging a SO mod in the TL after all
 
6:22 PM
0
Q: To what degree is my VBA Array size function safe, robust, and performant

chaotic3quilibriumComing from a Java/Scala background with a strong focus on OOP+FP, I recently started working with Excel+VBA to implement a front-end for a SaaS. It was like stepping way back in time, over two decades, in software engineering trying to understand how to use and exploit VBA. In the ensuing 3 mont...

0
Q: Merkle Tree Proof of Inclusion

Tennis TubbiesI've built the below Merkle Tree. It queries the bitcoin blockchain and builds a merkle tree out of the transactions. I want to add a proof of inclusion that can recurse through the classes and I'm just stuck, is there a cleaner way to build the merkle tree and then recurse through it? I've start...

 
@Duga oooh ... mixing it up a bit...
@Vogel612 they are on it
 
6:43 PM
AFAIK, There aren't any fixes. All objects of a class type have access to each others stuff. You would need to establish code review to make sure that you access everything via getter and setters. Or you can make each object a unique type, then they wont have access. — NathanOliver 27 secs ago
 
@Peilonrayz What in the world...
 
0
Q: splitting a tuple into N-element tuples

user1095108This nice hack should allow you to split a tuple into N-element tuples, thereby effectively splitting a tuple into pairs, triples, ... For example, this allows you to split an input parameter pack, into N-element tuples. Your thoughts? template <std::size_t N> constexpr auto split(auto&& t) noexc...

 
7:38 PM
0
Q: Thread Art Generation that Creates Embroidery Files

hacker HDI have made a thread art generator that creates thread patterns from images. Mine is a bit different as it outputs an embroidery file (It embroiders quite nice, though the settings need a lot of tweaking and the output file needs resizing) The code is quite inefficient, but that's python for you....

 
8:04 PM
@CaptainObvious Seems to be theoretical based on the function names.
@Peilonrayz How would you feel about reading a book where the main characters job is Computational Demonology?
 
@pacmaninbw If the book is a plebeian picture book; sure ;) Otherwise I find my aphantasia takes 'the best parts' away from reading.
 
Sorry, no pictures at all except for the cover.
 
8:20 PM
Ah darn D:
 
@Peilonrayz Oh, you weren't kidding when you said you didn't "have the imagination to enjoy books"
@pacmaninbw They also use language like "Say we have"
 
@pacmaninbw ohhh that sounds interesting
 
@user Yeah... However, who needs imagination when you can play games and watch tv ;)
 
8:43 PM
I suppose so
You're not missing out on much - I'm usually disappointed by things that I imagine before seeing real life anyway :P
@pacmaninbw Does it have something to do with the Laundry Files?
 
9:36 PM
@user Are you sticking with Java then or what's the plan?
@user You do know though that Java and Kotlin can co-exist extremely well? You can have some code in Java and some in Kotlin, easily.
(the only annoying thing is, as always, to configure the project correctly...)
@Peilonrayz For a second I thought "Wtf is this bug in @Duga?" but I see that it's not a bug after all. Yikes.
@pacmaninbw If it would be a short story I would love it.
 
@SimonForsberg I considered suggesting she stop logging repeat comments by a single user but that is likely a rare occurrence
 
Speaking of which, if anyone has recommendations for short stories, let me know.
@SᴀᴍOnᴇᴌᴀ Yeah, not worth implementing really. Besides, it can be good to be notified about such things.
 
@SimonForsberg We're sticking with Java, unfortunately
@SimonForsberg I know, I even converted part of our project (well, IntelliJ did the heavy lifting) and was prepared to gradually do the rest
 
@SimonForsberg Nah, the bug is in my room. 8 of the bloody things D:< Manage to kill off 5, now the other 3 seem to have got the idea to leave me alone
 
@SimonForsberg I remember Flowers for Algernon was a good one, though it depends on your tastes
@user There's only two of us actually working on the code right now, and my partner's afraid we'll scare away new members if they see that complicated Kotlin code (I disagree that it's that complicated, but Java is somewhat more regular than Kotlin, and we'd have to teach it to most new members)
 
9:52 PM
@user I did not know that was a short story. I'm willing to give it a shot. (I have read a lot of IMO bad short stories as well btw)
(Although I'm not sure "The Egg" by Clarice Lispector can be considered a short story, it's more of a rant, but that one is the absolute worst I've ever read)
But ironically, "The Egg" by Dino Buzzatti is my absolute favorite of the ones I've read.
 
@SimonForsberg It's a got a bit of a sad ending, so brace yourself for that
Heh, there's another "The Egg" by Andy Weir
 
@user SPOILER ALERT!
 
Oops
@SimonForsberg Odd, I can't find this (although there is a story by her named "The Chicken")
 
@SimonForsberg I read https://en.wikipedia.org/wiki/City_of_Ember last year, as well as the prequel and two sequels
 
@user Ah, it's actually called "The egg and the chicken" electricliterature.com/this-is-your-brain-on-clarice-lispector
 
10:01 PM
possible answer invalidation by chaotic3quilibrium on question by chaotic3quilibrium: codereview.stackexchange.com/posts/264287/revisions
 
@SᴀᴍOnᴇᴌᴀ If it's not a short story but a novel, I'm afraid it's too long for me (and my friends) to read
 
@Duga Argh, that edit removed one space, but I can't add it in
 
@SimonForsberg did you look at Flowers for Algernon? according to wikipedia: _ Pages: 311 (novel)_
ah carp.... I didn't know it was a SS and a novel (-‸ლ)
 
@SᴀᴍOnᴇᴌᴀ Flowers for Algernon apparently also exists as a short story: buffaloschools.org/site/handlers/…
 
possible answer invalidation by chaotic3quilibrium on question by chaotic3quilibrium: codereview.stackexchange.com/posts/264287/revisions
 
10:06 PM
@user actually a variable name was changed, as well as a language hint...
 
@Duga I'm innocent
@SᴀᴍOnᴇᴌᴀ Claims to be a copy-pasta fix though
I haven't looked at the answer though to check if it is an invalidation or not
but if it's copy-pasta error, I'm willing to let it pass
but hey, I'm not a mod, all this is your headaches now @SᴀᴍOnᴇᴌᴀ ;)
 
@SᴀᴍOnᴇᴌᴀ Wait, where?
 
??? All I see is a space, does VBA treat it differently because of that?
 
@SimonForsberg but non-mods check for AI frequently - is that a mod-only thing?
 
10:10 PM
@SᴀᴍOnᴇᴌᴀ Huh, what do you mean?
 
@user f_ua_blnIsDefined is different than f_ua_blnIsEmpty, right?
 
@user f_ua_binIsDefined -> f_ua_binIsEmpty
IsDefined -> IsEmpty
 
@SᴀᴍOnᴇᴌᴀ Oh lol, I didn't see that
 
@SᴀᴍOnᴇᴌᴀ oh, AI as in "Answer Invalidation"...
no it's not a mod-only thing, of course not
 
10:15 PM
@SimonForsberg so why this statement?
7 mins ago, by Simon Forsberg
but hey, I'm not a mod, all this is your headaches now @SᴀᴍOnᴇᴌᴀ ;)
 
I just mean that I can maybe be a bit more free in not having to ensure that there isn't an answer invalidation
 
in case there is an edit dispute?
 
yes, in case my edit was wrong and I should have rolled back instead
Answer doesn't seem to mention this variable so all good
also, TTGTB
 
@SimonForsberg That was a wild read
 
11:00 PM
0
Q: Cryptographic hashing class using OpenSSL's EVP interface

Jason PenaI have written a cryptographic hashing class named Ccksum::DigestHasher that allows the caller to select a hashing algorithm by name via OpenSSL's EVP interface. This class is the bread and butter of my Ccksum programming project. Here is the code so far (I combined the header and source files fo...

 

« first day (3001 days earlier)      last day (1019 days later) »