« first day (2918 days earlier)      last day (1396 days later) » 

00:01
RELOAD! There are 7531 unanswered questions (89.4723% answered)
00:16
Also related: Checking if a number is prime in NASM Win64 Assembly shows some tricks, like a stopping condition after your trial divisor passes the square root. BTW, when you want all primes from 1..n, a sieve (of Eratosthenes) is a good approach, but that would be a total rewrite. — Peter Cordes 14 secs ago
00:30
0
Q: Finding all pairs of elements in an array that sum to a target value using multiple pointers

PixDI was thinking about this problem where you should make a function that takes an array and a target value and then it will find all the pair values that sums up to that target value. Of course there is the naive way which includes nested loops, but I want to avoid the O(n^2) time complexity so I ...

 
2 hours later…
02:27
0
Q: Javascript speed of an animated object (planet orbiting sun)

YasserSo I am pretty new to JavaScript and I thought I might make an animation demonstrating a planet orbiting a sun in an elliptical orbit using Kepler's laws. I am struggling to get the speed right. So I want the speed of the planet to be slower further away from the sun, and faster closer to the su...

 
1 hour later…
03:42
Monking
Monking
 
1 hour later…
05:29
What's the neutral version of a singular? Himself, herself, themself? Theirself?
Context:
Your total program isn't that big (as in, we've seen way worse). Could you include the full code into the question? We tend to only review what's in the question itself and for licensing (and other) reasons we encourage the author of the post to do that themself. — Mast 34 secs ago
0
Q: Parking places design

Michu93I got a question: Design a parking system. There are 3 types of parking spaces: big, medium and small. Implement ParkingSystem class(int big, int medium, int small). Constructor takes a number of places of types. So ParkingSystem(1,2,3) means there are 1 big place, 2 medium and 3 small. Add metho...

05:53
@Mast oneself?
Turns out English.SE has a closed question about it.
Dupe of this.
I was imagining that would be a source to search
I also see multiple well-known sources mention singular they -e.g. Merriam-webster, Time. Grammarly
TTGTB
06:16
possible answer invalidation by Ayxan Haqverdili on question by Ayxan Haqverdili: codereview.stackexchange.com/posts/260165/revisions
0
Q: Logical next step in Django newsfeed web app

nick_rinaldifirst time posting to code review. In sum, I'm hoping to get feedback on my current code from someone more experienced in Django, and in the concepts I'm trying to implement. Let me preface by saying that I am a novice to Django. This is my first time using the framework. Here's the gist of my go...

 
1 hour later…
07:38
0
Q: .Net 5.0 Get User Email From Claims

DMurFrom searching online I have identified two ways to get the user email, but I don't know if either has pro's/con's beyond Option.1 being a larger number of lines of code? Option.1 I have a dedicated  ClaimsPrincipalExtension.cs  class, which I can call from anywhere in my app using var email = C...

07:57
This may be more suitable on codereview.stackexchange.com if your code works. — Nigel Ren 32 secs ago
 
1 hour later…
08:58
@Mast If you ever need to know a pronoun (but not a neopronoun) I think Wikipedia's pronoun page is pretty good
For working code, you might try codereview.stackexchange.comJarod42 5 secs ago
@SᴀᴍOnᴇᴌᴀ "oneself" is archaic and ambiguous (both first and third person). But would otherwise work
09:11
For codereview consider to use dedicated site. — Sinatr 9 secs ago
0
Q: class uploade file(photo,video,..) laravel

Afshin TavakolianI am working on a project, the previous programmer used this method to save photos, videos, etc. if (empty($data['large_image'])) { $large_image = $article->large_image;} else { if ($request->hasFile('large_image')) { //uploads $cover_img_large = $data['cover_img_large']; //echo '<pre>...

0
Q: Enemy damaging with regen system

drlightSmall project i made to practice my c++, im a beginner and want to know all about optimizing code. Enemy starts off with 10 HP and we can damage them for 1 HP by pressing F1, If their HP is below their max they regenerate 1 point each second. #include <time.h> #include <Windows.h> #include <iostream

10:05
0
Q: Keras: Using Autoencoders for prediction

AnimeartistI have a dataset which I divided into two sections horizontally. Column A of first section is the input variable and Column A of second section is the target variable. I am trying to build a Denoising Autoencoder that is trained using the target variable. Column A consists of string values which ...

10:41
@Peilonrayz Apparently I was looking for the epicene reflexive, thanks. I'll bookmark that when I get home.
11:31
You might want to consider asking about this on codereview.stackexchange.com. I don't know the guidelines there, so you'll need to read up before posting, but... that would be a more-aligned q&a site. On Stack Overflow, this really is opinion-based, and also, there's no way to know what the people providing feedback are specifically focused on - you would need to ask them. — David Makogon 18 secs ago
0
Q: Need input on naming convention for variables, function and components for a mini React/Typescript App

ryanI always got this feedback to improve upon the naming convention for variables and functions/components. A few days back I have submitted the coding challenge for an interview and I didn't make it to the final round. There were primarily 2 feedback npm install failed (not true as I ran the Githu...

As phrased, this questions is primarily opinion based, which is off-topic and subject to closure... "How can I improve" does not have a specific end goal. Perhaps you would do better on codereview.stackexchange.com. You can use the profile tool in MATLAB to look for your bottlenecks if speed is the aim. You included Monte Carlo in the title but I'm not sure that's related from what you've shown - it's not mentioned again in the question. Please have a think about how this could be improved to be more specific and edit the question to make it on topic — Wolfie 7 secs ago
11:58
If you do want a general review on Code Review, be sure to read the posting guidelines there first - the requirements are very different to here on SO. — Toby Speight 40 secs ago
0
Q: i have task: Write a program in OOP style that dynamically opens the database, tables and columns in it. i created code but its not in OOP

giorgiWrite a program in OOP style that dynamically creates a database, spreadsheet, and columns. E.g. After launching the program: It is in interactive mode We are asked what name we want to create the database with; After creating the database, the program asks us under what name to create the table...

0
Q: Check loop condition before entering the loop

NephI've got this Java 8 code: for(int i=0;i<1000;i++) { int a = doStuff(); for(int j=0;j<a;j++) { doMoreStuff(); } } It's possible for a to be <=0 and it won't doMoreStuff() then of course but does it still initialize j every time? In that case, wouldn't you want to check a bef...

12:27
0
Q: Reading data from multiple different resource bundle property files in Java

notescrewI have class structure to read the data from resource bundle (property files). import java.util.Locale; import java.util.Objects; import java.util.ResourceBundle; /** * The class will be used to read the resource bundle to achieve localization * and internationalization * */ public class Res...

13:16
0
Q: Making pixels of RGB barcode suitable for scanning

QuestionLimitGoBrrrrrSimilar to Microsoft's HCCB before its discontinuation near 2015, Im trying to make a 2D barcode that uses RGB pixels to encode more than two possible states (Black/White). Theoretically, at 100% data capacity, you could hold 16,777,216 different integers in a single pixel. However, this level of...

13:39
0
Q: C# String formatting

user241512my requirement is to format the input values to particular format as "##.###/##.###" Example - My input value can have alphabets, alphanumeric, numeric Expired -- > if alphabet, output as three space 2 --> only numeric, add "/" + "0" to format as "##.###/##.###" 3/2 --> "##.###/##.###" 0...

Ohh, lots of things: Promise constructor antipattern, the Collection Kerfuffle, throwing errors in callbacks, magic constants. But if your code is working you should probably ask here codereview.stackexchange.com. — Yury Tarabanko 8 secs ago
I’m voting to close this question because it belongs to codereview.stackexchange.comYury Tarabanko just now
14:03
1
Q: C++20 : N-dimensional minimal Matrix class

frozencaI wrote a N-dim matrix (tensor) class, based on my previous 2D matrix implementation(2D Matrix in C++20 and Strassen's algorithm), accepting many helpful reviews from here. MatrixBase.h #ifndef FROZENCA_MATRIXBASE_H #define FROZENCA_MATRIXBASE_H #include <algorithm> #include <array> #include <ca...

14:23
Monking
1
A: Request to add an extra moderator given the 2021 election results

CatijaWe've discussed this request internally and with the moderators and we decided that there's universal support for this request and so I've just made Mast a moderator on this site, joining Sᴀᴍ Onᴇᴌᴀ and Peilonrayz as a third winner of the election. Just to throw a few things out there... having an...

8
@Mast congrats for now beeing a mod
8
may the force be with you
that's only in about a week
Taco Tuesday / Star Wars Day
Death day of Yahoo! Answers, too.
14:38
@Mast No problem. And congratulations! :D
14:52
@Catija Yay!
1
Q: Send a set of screen grabs by email

VasperI have written a script that takes 3 screenshots of a given page, packs them into a zip, and then sends them to a given email address. I tried to make the code as clear and readable as possible, so everything is in separate functions. I wonder if the code below can be improved based on best pract...

15:04
I'm glad my being in the election helped Mast.
IIUC you could be called up too if the need came, because there was a 5th participant
@Heslacher Thank you all.
It's my pleasure to serve & lead.
Well I'm gonna go back to bed and sleep this vaccine shot off
3
that sounds like a good plan, TBH :)
@DerKommissar It definitely helps.
15:18
I was wondering why my friend had an appointment for tomorrow labeled Hangover - then I realized it is because today he gets shot #2
3
@SᴀᴍOnᴇᴌᴀ I woke up with a temp of 93.5F this morning (borderline hypothermic) at 1:30am, and at one point I was about to pass out. I think I've made it out of the woods now, but it's definitely been an experience.
I ... got really grumpy and tired but that's it. It's interesting to hear how different people's experiences are. Probably a combination of which vaccine along with their own biological responses.
15:41
@DerKommissar wow - I didn't know this but according to the Mayo Clinic "Hypothermia occurs as your body temperature falls below 95º F (35º C)."
I can clear up any questions in that case. I am not looking for a code review for sample code I wrote to ask a question. I am looking for an answer I can use to implement a proper solution. — Francisco Aguilera 14 secs ago
15:53
@SᴀᴍOnᴇᴌᴀ Yeah, my thermometer isn't super accurate so I don't want to say I did have it, but it was rough.
@Catija I had no effects from round 1, but round 2 has messed with me terrible. Along with the temperature stuff I also was super weak this morning, couldn't even walk up or down stairs when I first got up. Some Advil and some Theraflu fixed me up mostly so far.
If I understood this correctly (that you're looking for potentially more efficient solutions), then this is more fitting for Code review. — El_Vanja 35 secs ago
@pacmaninbw Feeling better yet?
@Mast Good enough that I went through the queues this morning. My leg muscles still ache and the arm where I got the shot still hurts.
@SᴀᴍOnᴇᴌᴀ Definitely a hangover.
When I wasn't sleeping yesterday I was watching TV. That was about the only thing I was good for.
16:16
I’m actually gonna turn some TV on and maybe take a nap now, took the second half of today off work
do they tell you to take any Painkillers or Tylenol or anything like that when you get one of these vaccines? are they things they tell you not to take?
@Malachi If you'll be doing anything remotely dangerous right after the vaccine, like driving or operating machinery, I'd definitely advise against it.
Aspirin (Paracetamol), maybe. Nothing stronger.
But I'm not a doctor, so that's not medical advice.
just curious what kinds of things I might be able to do to make the experience less ... not sure what word I am looking for here
I'd take the next day off if at all possible.
@Catija The bit that annoys me is one of the most common cold/flu symptoms I get is pressure in my ears that affects my hearing. It takes weeks for it to clear, and in the meantime, my existing hearing loss is made worse. From my second shot, I got body aches, a sore arm, and that.
16:35
@Donald.McLean I got sinus headaches rather than hearing loss.
@Mast My problems really didn't start until about 4 hours after the second shot.
Yea, "right after" could be reworded better as "in the next few hours".
Because just like with new medication, it takes a while to know what the effects on you personally will be and it will range from nothing to inconvenience to hazardous.
16:56
@Mast good - I will have to drive home about 40 km after getting mine
s/40/26/
@RMunroe Also, a bit of personal space. People used to be terrible at that.
17:17
@pacmaninbw I win. Hearing loss and a bit of mild pressure is way better than sinus headaches.
@DerKommissar Ooof, that sounds bad. :( Yeah, round 1 was nothing for me, either. Round two was like I said, some tiredness and a bit of aching but nothing that kept me in bed.
@Mast OMG... in lines, I just want people to back off so much more now. 6 feet is a lot, sure, but give me 2-3 feet please, you're not going to get there any faster by being six inches away from me!
@Catija I get more space in lines nowadays than on the motorway at times.
@Donald.McLean Dunno, hearing loss can be pretty crummy if it lasts for a couple weeks.
@SᴀᴍOnᴇᴌᴀ That's a little bit longer than my 20 mile drive.
@pacmaninbw I over-estimated ... its 17 miles so 26 KM... but I do have to cross state-lines i.e. the Columbia River
17:26
@Catija I guess that's a personal preference thing. Since I've experienced both, I'd take the additional hearing loss for a month over a sinus headache for an hour.
Distance isn't everything. From the Brooklyn bridge to the George Washington bridge is only 12 miles. Will take you half an hour.
Without congestion.
I... think I'll keep driving in Texas instead of NYC, thanks ;)
@Mast No kidding. My old commute was 20 miles. My current commute is 35-40 (depending on best route), but the time isn't much different because most of it is outside of major commuter routes.
My current commute is about 10 feet.
Ok, mine is about 20 feet, since my office is on the opposite side of the house from the bedroom. But, if I actually had to drive to my regular, on-site, office...
I expect to see more of a need for on-site presence soon, since we're ramping up for launch.
The James Webb Space Telescope (JWST or "Webb") is a joint NASA-ESA-CSA space telescope that is planned to succeed the Hubble Space Telescope as NASA's flagship astrophysics mission. The JWST will provide improved infrared resolution and sensitivity over Hubble, and will enable a broad range of investigations across the fields of astronomy and cosmology, including observing some of the most distant events and objects in the universe, such as the formation of the first galaxies. The primary mirror of the JWST, the Optical Telescope Element, is composed of 18 hexagonal mirror segments made of gold...
17:34
I was looking up when the launch date was going to be, when I remembered that probably isn't published due to pirates.
And by "improved infrared resolution and sensitivity" what they really mean is that this is an entirely new type of telescope that will literally be able to see things that have never been seen before.
No, the launch date is well publicized: October 31. It's the shipping arrangements and security that are hush-hush.
@Donald.McLean Could you poke one of the PR guys that it's not on the official-looking launch page?
I think they're just being careful, considering how many times launch has been delayed so far. When I first started working here, someone told me that there had been three separate "one year to launch" parties for HST.
Haha
That's funny, sad and unfortunate at the same time.
Wikipedia has the launch date and references a NASA press release.
17:58
@Donald.McLean Congrats! That's a great achievement!
0
Q: search in the table is not working when search data is made blank in react

ryanI have a mini-app that consists of a search bar and a table with data. The data is searchable using the search bar. I am using lodash debounce to filter the table data when a user enters something in the search bar. So far so good. The problem arises when the search word is erased by pressing the...

0
Q: deleting list of devices using ansible

AhmFMTeam, My code: works and does the job. delete partition by unmounting paths if it is not root and is present in defined list in vars. caveat: I have observed that at times some devices are left unmounted and when I rerun task they then get deleted. not sure what is the issue. steps: loops throug...

18:22
if you already have a working solution you should post on codereview.stackexchange instead of here. — I wrestled a bear once. 46 secs ago
@Donald.McLean heh 'm reminded of the Bud light commercial swear jar
3
My 2c is that this code isn't unclean in its current state. You may want to reword your question- asking for a code review may not be received well. However, if you foresee adding a lot more fields to this query- you may be able to ask how to dynamically generate these Q chains based on a list. — rob 27 secs ago
18:49
0
Q: Float to binary conversion

C--I wrote a program to convert float to it's binary IEEE754 representation in C. Any improvements to this is appreciated #include <stdio.h> #include <stdlib.h> void binary(float num) { int n = *(int *) &num; //Evil bit hack from Quake3 Q_sqrt function int size = sizeof(n) * 8; char *s ...

19:07
This question seems more suited for code review stack exchangeJHBonarius 5 secs ago
My Commute, if I went into the office, would be about 75-120 minutes depending on time of day and traffic, one way. I love being able to work remotely
my current commute is literally falling out of bed.
if I went to the office, it's <10 minutes on my bicicle at a relaxed pace
I'd love that.
the first part is actually somewhat horrible
I'm turning into a recluse
I've been going to my work every day, straight through the pandemic.
That's no fun either.
19:16
yea, I can see why, but it's just not healthy for me to have my workplace in the same room as I have my bed (and relaxation area)
I can make it work, but it's just ... not good
I have a computer in my bedroom, and I can't wait to get the downstairs back so I can move it out of there
for several reasons I don't like it in my bedroom.
I have a home-office of 6m2. I wouldn't want to have my rig in my bedroom.
my work machine is definitely never going to be in my Bedroom
6m2?
never mind
6 meters squared?
yeap
that's about enough for a large table, a chair and maybe the tiniest sliver of area to walk in
I will have a much better office when our tenant moves out... long story
19:34
Apparently, I have 12.26 square meters of space in my home office. That's the size of the third of four bedrooms in my house.
@Malachi Welp, closer to 9 actually, but sloping walls and all that. So 6-ish usable.
I used to have 12m2. I miss the difference.
@Mast that's actually larger than my whole room :D
I've got the tiniest sliver more than 11m² to myself
I have a much smaller space, but it keeps me from cluttering it up, the cats help with that too
My wife has 12m2.
Having any room as a home office is already a great help.
She works from home half the time, I don't.
I don't have an entire room at the moment, more of a nook or cranny that is hidden in a corner of the house.
19:53
If there are no errors in your code, please consider posting the question on codereview.stackexchange.com instead. — Janez Kuhar 41 secs ago
In our old house, I had a corner of the finished basement. Not bad, but
I'd like a proper basement.
20:50
@Mast sounds gross
Gross?
Is that a word joke?
In Dutch, a 'gros' is 12x12.
yes - gross as in 12 dozen
maybe I should have used the term groß
I'm not German, you're not German.
@Mast touché
yeah yeah neither of us are French (right?)
21:02
We're not French either.
21:13
my mom tells me I am French Canadian, does that count?
0
Q: Implementing BFS for Adj List

cndy2761I am trying to implement a BFS to get the path from a starting vertex using the code below, where can I go from here? class Node: def __init__ (self, value): self.vertex = value self.next = None class Graph: def __init__(self, vertices): self.vx = vertices ...

@Malachi like (some) people say about Minot (ND): Why not?
21:29
May be a good question for codereview.stackexchange.comAndy 56 secs ago
I recommend posting to Code Review. — Thomas Matthews 31 secs ago
If your code works fine but you're just looking to make it more efficient, it's better suited for Code Reviewdwirony 11 secs ago
@CaptainObvious ಠ_ಠ not sure if working as expected... I left a comment
Sounds iffy.
22:13
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 40 secs ago
22:27
0
Q: Squeeze extra performance from an OpenGL fragment shader

RodiaI hit 58 FPS with an OpenGL shader I'm working on, on a very old Android device I use for benchmarking. I moved everything I could to the vertex shader and I'm almost there, but I can't imagine how to optimize it any more. precision mediump float; varying vec3 uvx3; varying mat3 matb; varying vec...

possible answer invalidation by Owl66 on question by Owl66: codereview.stackexchange.com/posts/242052/revisions
@Duga Smells like it, second opinion by someone with more recent C++ experience? @pacmaninbw
Might be harmless.
22:52
0
Q: Parallel 3D Discrete Cosine Transformation Implementation in Matlab

JimmyHuI am trying to implement 3D Discrete Cosine Transformation calculation in Matlab with parallel computing parfor. The formula of 3D Discrete Cosine Transformation is as follows. The experimental implementation The experimental implementation of 3D Discrete Cosine Transformation function is DCT3D....

If your code works and you just want someone to review it (and suggest improvement), there is another site you can post it on: Code Review. Stack Overflow is more for when you can't get your code working and need help to solve it. It's not easy to know about the different sites here on Stack Exchange, there's a lot of them :-) For future reference, make sure the question is clear on what it is you're really asking about and that it follows this sites guidelines. — Magnus Eriksson 26 secs ago

« first day (2918 days earlier)      last day (1396 days later) »