« first day (2649 days earlier)      last day (1359 days later) » 

12:00 AM
RELOAD! There are 6875 unanswered questions (89.8359% answered)
 
12:28 AM
0
Q: Granular vs a aggregated tests when dealing with arrays

mokagioI write code in a Test-Driven way and I often build my functions starting with tests for the easy edge cases. For example, given a flat array of Items that have a category property, return an array of Groups, each built with all the items for one of the categories in the input. One edge case I fi...

 
1:16 AM
@JohnFilleau I didn't ask people to do my work. I did mine as you can see in the question. The code I posted actually works, only I didn't come up with the most efficient implementation. If I take your argument. the code review community would be a bunch of people asking others to do their work, which make no sense. Similar sites (codewars, for example) work like that too. You try your solution and after you correctly solved an exercise, you can see other's implementation to see how you could have done better. — Miguel Duran Diaz 44 secs ago
I admit my initial downvote was because it looked like you were just looking for a higher score on your online judge. I have a bias against online judges, and I have a bias against people submitting others' work as their own. But you don't appear to have done any research on how to improve this. I think this would be a better question for Code Review if you just want improvements. — JohnFilleau 47 secs ago
 
 
1 hour later…
2:26 AM
@Duga ಠ_ಠ
 
 
2 hours later…
4:32 AM
Code review is a better forum for "how to improve" type questions. But do read their help for posting requirements before posting. — kaylum 16 secs ago
 
4:46 AM
Ben Popper on August 04, 2020
From the Samy Worm to Wanna Cry, we chat about a decade worth of security snafus.
 
 
1 hour later…
5:56 AM
0
Q: vectorized crosstabulation in Python for 2 array with 2 category each

StatguyUserI have 2 python list label and presence. I want to do cross-tabulation AND get count for each block out of 4, such as A,B,C and D ine below code. Both the lists have values True and False. I have tried pandas crosstab function, however its slower than my code which is below. One problem with my ...

 
6:37 AM
Monking
 
@JohnFilleau If it's not their own code, it's not welcome at Code Review either. — Mast 42 secs ago
 
Nvm, that's not what it stated...
 
6:52 AM
@RMunroe Used to do that by hand.
@Icepickle Welcome to The 2nd Monitor. What is your actual question? Custom flags are handled by moderators, not by 'normal' users. Cross-site duplicates is something we often indicate in a comment, since there's not much else we can do with it. What's your actual question?
If the Code Review question is not reviewable, please flag/close it as such.
If it's a duplicate of an SO question where the SO question states the code is broken, it's quite an easy case. Close it.
But does that SO question really state that?
Just because a linter says there's a problem with the code, doesn't mean it's broken.
 
7:12 AM
actually you need to go here codereview.stackexchange.comIfaruki 20 secs ago
 
7:27 AM
@Mast I mislinked the SO duplicate in my custom flag. I felt like only close voting it was maybe inappropriate for a cross site duplicate. The code works in the sense that there is no syntax error, but it doesn't do what the OP expects it to do.
I did downvote it as well, but I felt a custom flag was more appropriate for getting the question closed (that might have been my misunderstanding, I am not very active on code review till now and meta doesn't seem to have all the answers :) )
 
8:11 AM
Custom flags should not be used as super-close-votes.
Can you retract the flag?
 
8:29 AM
Sure, done :)
 
9:04 AM
To get all code review that I you are a reviewer, you need to add [Target].[System.AssignedTo] = @me clause, check my updated reply. Regarding comments, I'm afraid there is no REST API, you can check the client api as I replied in this case: stackoverflow.com/questions/61778434/…. If my reply helps you, please Accept it as an Answer, this can be beneficial to other community members reading this thread. — Cece Dong - MSFT 23 secs ago
 
9:18 AM
0
Q: Optimizing a loop

Yann22Good morning all, I'm looking to loop around to find my pattern in a large raw. For this I scan my rawdata variable 4 by 4. rawdata is heavy and it takes too long. I've tried going through a vectorization technique but it doesn't work. Thank you for(p in seq(0, length(rawdata), by = 4)){ ...

 
9:44 AM
0
Q: SEDE query calculating user reputation averages

TheLethalCoderI've created the following SEDE query which calculates the reputation averages of users on a particular site. It also optionally excludes "new" users (users with rep of 1 or 101 so note 100% accurate). DECLARE @exclude_new_users INT SET @exclude_new_users = ##ExcludeNewUsers:int?0## DECLARE @exc...

 
Monking
 
10:10 AM
0
Q: Python Avoid Loop with numpy

Sword FishThe problem is this: I have a numpy array called "contour" of N coordinates (x,y) so of dimension (N , 2) For each point in this table, I would like to create a square centered at that point and perform a test on the square formed. I wanted to know if you had a way to solve my problem without usi...

 
 
2 hours later…
11:51 AM
0
Q: Class data attributes that can't be fully formed in init

Robin CarterIn Python 3.7, I find myself writing this a lot: class Bar: def __init__(self): self.foo: Optional[Foo] = None def build(self, qux): self.foo = Foo(qux) I justify this to myself as: Wishing to keep __init__ light (for maximum reuseabilty) or Being unable to complete Bar...

 
12:44 PM
How did your thesis go? @Vogel612
Bound, finished and graded?
 
@Mast I'm actually driving to sign the physical copies right now because I forgot to do that before sending them in
sooo ... finished, bound, soon to be signed and graded after
 
@Vogel612 When will you know the result?
 
and quite unhappy with how it turned out for various reasons, one of them being my failure to ask for reviews and talking with my advisor
@Mast that can take some time
 
6-8 weeks?
 
basically
 
12:48 PM
I'll pester you again in 8 weeks then.
Meanwhile, best of luck.
 
1:06 PM
1
Q: Protocol with generic array-like property

acoomansI'm creating a protocol to abstract different models (hand-crafted, decodable, and thrift-generated) like so: protocol FeedItemModeling { var text: String? { get } var url: URL? { get } } protocol FeedModeling { var items: [FeedItemModeling]? { get } } This would work great except t...

 
Could someone walk the suggested-edit queue?
 
2:10 PM
This question appears to be off-topic because it is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 57 secs ago
 
2:27 PM
@JohnConde That's the help, the FAQ on asking questions is here. — Mast 42 secs ago
I'm not sure this question would be a good fit on Code Review. The magic bulletpoint here is whether the current code works as intended or not. If it does, it's ready for review. If it doesn't, it's not. If there are known safety problems, you're not looking for a review. After all, you already know what's wrong with it. — Mast 12 secs ago
 
2:40 PM
@Mast done
 
For my own information, is this question on topic for code review? I find it strange to answer a question without having much original code to reference.

https://codereview.stackexchange.com/questions/247470/setting-instance-data-attributes-to-none-in-init
 
@spyr03 There are no close votes
 
0
Q: ALL websites in my WHM redirect to same domain if i hit non ssl version of url

Parth MehtaI have a WHM cpanel with over 10 + domain say site 1 to site 10 i install ssl in site no. 8 , 9 , 10 now if i i call non ssl version like http://www... for site no 8,9,10 , it call the first site hosted on my whm no matter the domain called I have most of the websites that are related to [Matrimo...

 
@CaptainObvious Does anyone know Swift here, and can they tell me if my VTC is good or not?
 
@Peilonrayz Fair. It is a good question. I just haven't seen any others like it on the site before.
 
2:56 PM
@Mast I'm not sure we want to make "m-code" into a tag. It's ambiguous. See en.wikipedia.org/wiki/M_code
I'm more familiar with "M-code" meaning what CNC machines use.
Maybe we should keep the "Power Query" tag (only one question using it) and remove the "M-code" tag (also only one question using it -- the same one.)
What do y'all think?
 
@Edward Isn't that G-code?
If there's resistance against the tags (I didn't implement them, simply added a description), I'm not against nuking them.
@spyr03 @Peilonrayz I don't know, looks hypothetical.
If they really want an answer to that question, Software Engineering is a better place.
 
@Mast It's often called just "G-code" but there are also M-codes.
G-code (also RS-274), which has many variants, is the common name for the most widely used computer numerical control (CNC) programming language. It is used mainly in computer-aided manufacturing to control automated machine tools. G-code is a language in which people tell computerized machine tools how to make something. The "how" is defined by G-code instructions provided to a machine controller (industrial computer) that tells the motors where to move, how fast to move, and what path to follow. The two most common situations are that, within a machine tool such as a lathe or mill, a cutting...
 
@Mast I didn't really look into it
 
@Mast I think it would be better to nuke the m-code tag. It's also sometimes used to refer to the Matlab language.
Maybe the description you created could be used instead for the power-query tag?
 
Considering all languages get their own tag, what do you propose as alternative if is nuked?
 
3:09 PM
use the existing power-query tag.
 
@Edward I'd have to alter it a bit since it's not exactly the same, but sure.
I think is more technically correct, but it's also more ambiguous so we're a bit between a rock and a hard place here.
 
Microsoft calls it "PowerQuery M": docs.microsoft.com/en-us/powerquery-m
 
Of-course they do...
 
:D
 
No wonder it's so bloody ambiguous.
 
3:12 PM
Monking
 
Monking
 
Monking
 
What should we be doing with then, synonimize it to or blacklist it to prevent future ambiguity?
 
I'm thinking that we could remove and then change to and use your proposed language for that.
 
shrug
Fine with me. Any opposed?
> NOTE M is a case-sensitive language.
Now they've called the whole thing M.
That's not particularly smart.
 
3:24 PM
Typical Microsoft...
 
It should clearly be power-query-M then, since its case sensitive :P
 
Yea, tags don't do that :P
 
For the record, this is straight from the documentation:
 
just testing...
 
Well, they have solved the issue of camelCase vs snake_case by allowing spaces in variable names...
 
Yeaaahhh, about that.
That's just a bad idea.
Although, technically, it's not that different from a dictionary key.
 
Clearly The People had been clamoring for variable names with embedded spaces...
 
Don't tell the rest, but I think it was a manager trying to be smart.
 
@antman If there is no specific question/issue, would rather suggest to use codereview.stackexchange.comcchantep 54 secs ago
@cchantep when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the code above might be closed as off-topic because it is missing context. — Sᴀᴍ Onᴇᴌᴀ 47 secs ago
 
3:57 PM
This is super helpful thanks! I noticed it also returns work item relations for people I've assigned the code review to like so: ``` { "rel": "System.LinkTypes.Hierarchy-Forward", "source": { "id": 420905, "url": "dev-tfs:8080/tfs/HylandCollection/_apis/wit/workItems/42090‌​5" }, "target": { "id": 420906, "url": "dev-tfs:8080/tfs/HylandCollection/_apis/wit/workItems/42090‌​6" } }``` Is it possible to just return the source work item? — user5924660 24 secs ago
 
4:17 PM
Inspired by you. I have seen you on codereview and here working on programming. I am still learning it :) — Sai Sreenivas 5 secs ago
 
4:39 PM
I’m voting to close this question because this question should be asked on codereview.stackexchange.combarny 37 secs ago
 
4:53 PM
0
Q: Determine the complexity of sorting a binary array

amalgamateThe challenge is to sort an integer array containing only ones and zeros with the lowest complexity possible. As always, I am interested in any improvements suggested but in this question I am most interested in whether the complexity that I have assigned to the algorithm is correct (as well as t...

 
5:23 PM
@Peilonrayz ಠ_ಠ wat? isn't that hypothetical? if not, what does that code do (beyond setting instance data)?
 
2 hours ago, by Peilonrayz
@Mast I didn't really look into it
But yeah
 
VTC applied, left comments.
If more comments are necessary, put them in.
 
can we "close to vote"? (ˆڡˆ)
> Also the temp stack has incorrect generic type. Closing to vote... Btw a queue with O(n) insertion complexity? Congratz. Is it intent? – slepic 10 hours ago
maybe if one owns a shop or other venue that can be shut
 
5:52 PM
You can lead a horse to water, but you can't make him drink codereview.stackexchange.com/questions/186542/….\
See the answer
 
I saw the question earlier today and wondered about its on-topicness
 
Wrong forum. Look into codereview's stack exchange. SO is not meant for questions like these. — Error - Syntactical Remorse 56 secs ago
 
6:16 PM
@pacmaninbw: Fairs points but please see my above comment. You can't extend the form control without calling the constructor() and super(). At a minimum my answer draws attention to that, so it is a code review. — Phillip Berger 38 mins ago
grmbl
Yes yes, but, no.
Don't do that!
2
 
@Mast There is enough in what he says that I can't flag it for moderator attention but he is definitely missing the point. The other problem is how the answer starts out, it is just wrong.
The only good news is that the idiot that up voted the answer takes the question out of the unanswered questions category.
 
possible answer invalidation by Peter on question by infinitezero: codereview.stackexchange.com/posts/244057/revisions
 
6:34 PM
0
Q: Wrote my first game on Pygame - Looking for some feedback

Souvik SahaI just completed the first release for my first game on Python, called Dungeon Ball. I'm looking for people to test out the app and give me some feedback and constructive criticism. I'd like to use this project as a way to improve my programming skills and hopefully learn some efficient programmi...

0
Q: Blocking Queue in C++ using semaphores

wgeminiThis is mostly an exercise for me to try to understand the differences between semaphores and locks. It's a long and rambling because it took me quite a few tries to understand the concepts. Please bear with me. I am hoping you can either confirm that the lesson I learned was correct or pointing ...

-1
Q: How can I make the quickview open in mobile?

AceThe current code works well in browsers and smoothly opens product quick view, but I want an option for opening the quick-view trigger on mobile screens. Currently, it shows no option for user to open up quick-view on a mobile screen. I am confused and not sure how I should approach this. Please ...

 
@Duga that's okay - excess code fence removed
 
@pacmaninbw Yea.
We're probably not supposed to do this, but mayhaps it's better just to let it be.
Why did he bounty a question to answer it himself though.
 
wow
sounds like something from a movie that was unexpected
 
It's technically close enough.
Not the hill I want to die on.
Considering the question is from Feb '18, shrug.
@SᴀᴍOnᴇᴌᴀ Something something inquisition perhaps.
The more I think about it, the better it sounds to just let the answer be.
 
yeah... we can't win everything
 
6:46 PM
It's a bit of a pointing out a bug thing without telling he's pointing out the bug thing.
In a roundabout way, it's something of a review.
Just not really written like one.
 
7:05 PM
Anyone interested in making this question by a new user go hot?
 
7:24 PM
@SᴀᴍOnᴇᴌᴀ can't Duga link to a particular revision ?
 
@Mast He's trying to get more up votes for his answer. He has a minor psych problem he needs to show how smart he is. That's indicated by the I actually solved this.
@Mast How do we do that?
 
8:15 PM
0
Q: Faster and cleaner SHA-1 leading zero histogram with Python

kelalakaI've written a python code for finding the distribution of the leading zeros of SHA-1. Using random inputs and hashing than counting. Normally it is expected to fit the n/2^i curve where n is the number of trials. After this, a plot is drawn. import hashlib import random import matplotlib.pyplot ...

 
8:29 PM
@anki like Kevin Garnett said (plus a couple extra words):
Jun 21 '16 at 8:22, by Dan Pantry
Anything is possible with power of JavaScript
 
8:41 PM
0
Q: Birthday messages at start of new day with time zone support

DaniellMy goal is to let users specify their DOB and time zone, I want to send them a birthday message when the day just started in their time zone (00:00) regardless of where my server is hosted, I am using date-fns and date-fns-tz for the date/time helpers and postgres to query my database import { zo...

 
@VLAZ: That's ridiculous. The code works, if the OP is to be believed. It just needs to be improved, not fixed. That is what code review is about. — TonyK 5 secs ago
 
9:06 PM
1
Q: Nodejs async with express server

Beno OdrI use the following code which works as expected, which use open ID connect to login user, as Im pretty new to node and express, it will be great if I can get some tips for the async usage if im doing it right and the error handling. The code is doing connect via oidc layer https://en.wikipedia.o...

 
9:24 PM
This question should be asked at codereview.stackexchange.com. Review their site instructions and move your question over there. Note that a "move" is not a "copy;" you will have to delete your question here to prevent a cross-post from occurring. — Robert Harvey just now
 
9:52 PM
Closed mostly because it's off-topic and belongs on codereview. Using duplicate as a close reason works because the entire foundation of the code is that it can be safe without stdatomic.h, which is not the case even on x86-64. Compile-time ordering of memcpy vs. the pointer assignments isn't guaranteed, and like I said inlining these functions into caller loops would probably be a disaster. — Peter Cordes 37 secs ago
 
1
Q: Collect messages from a job to send in body of one email

JamesI have a Spring service that calls a few methods to @Service @RequiredArgsConstructor @Slf4j public class CarService { private final CarRepository carRepo; private final Mail mail; public void syncCars(Set<CarInfo> carInfos) { carInfos.forEach(carInfo -> ...

 
10:22 PM
0
Q: Ranking Tennis No.1s

cloudy_eclispsePreviously, I built a scraper to get ranking data for ATP # 1 over the years. See Webscraping tennis data, and follow ups. Now, I use the data to rank the players on the basis of how many weeks they've spent at #1. I'd appreciate general feedback on code style and structure. The Scraper class is ...

0
Q: c++ std::function implementation

user222866When I first tried to implement std::function I thought it would as easy as creating a class that holds a function pointer. Consequently, I quickly figured out that I was wrong when I tried to use it with a capturing lambda and got an error message. As a result, I quit and until recently I wonder...

 
10:47 PM
0
Q: after initial r*view here is a rewrite of my c++ timerqueue ported to rust

pm100Purpose. Provides a background task queue so that code can ask for a function to be run at a specified point in the future. They indicate what to run (a closure) and when to run it (also a name just used for tracing). My use case is typically 2-3 items queued at any time, typical items are very ...

 
11:12 PM
0
Q: Dict vs. tuple of tuples vs. ordered tuple

Alexey LeshchenkoA function in a package I'm developing should take a list of IDs as input, make async calls to a server for each of the provided IDs and return server responses for each ID. I'm trying to choose between three options of the type of what the function returns: a dict with every call to the server ...

 
11:37 PM
0
Q: Generating a recursive list

user228700Given a list of numbers p[i] for i=1,...,n what is the best way to generate a list N[i] in python where each element of N[i] is such that N[1]=1*(1/p[0]) N[2]=2*(1/p[1])-2*N[1] N[3]=3*(1/p[2])-3*N[1]-2*N[2] N[4]=4*(1/p[3])-4*N[1]-3*N[2]-2*N[3] ... N[n]=n*(1/p[n-1])-n*N[1]-(n-1)*N[2]-...-2*N[n...

 

« first day (2649 days earlier)      last day (1359 days later) »