« first day (3440 days earlier)      last day (571 days later) » 

12:05 AM
REFRESH! There are 8032 unanswered questions (89.4945 answered)
possible answer invalidation by 200_success on question by coder: codereview.stackexchange.com/posts/280037/revisions
possible answer invalidation by 200_success on question by coder: codereview.stackexchange.com/posts/280037/revisions
 
1:11 AM
"I am doing that now." - if you have a working solution, then you should post that to Code Review. If you don't have a working solution, you should post that here and tell us what's wrong with it. — ProgrammingLlama 38 secs ago
 
0
Q: Canadian and US Postal Code (Inheritance) in Java

firsttimerprogrammerI have to implement two subclasses for Canadian and US postal code in Java. For Canadian Postal code, a valid postal postal code has the rule: positions at 0,2,5 are letters. Positions at 1,4,6 are digits. Position at 3 is white space. (eg: V9A 7N2) For a valid USA postal code, it starts with two...

 
 
1 hour later…
2:31 AM
0
Q: Code getting errors although method is defined above

sxvmafirst time poster. I wanted to know why in my code the numOfAliveNeighbors has errors in the computeNewGrid class but is error-free in the class right above it - numOfAliveNeighbors. Thanks for any help everybody. public int numOfAliveNeighbors (int row, int col) { int neighboringCells = 0; ...

 
 
1 hour later…
3:40 AM
 
4:16 AM
-2
Q: Cancel an asyncronous event in the async/await model

Santhosh ShanmugamMy question is based on @aepot's answer to this question. How does cancellation work in this model? How is CancellationToken passed to the InvokeAsync method? public static class DelegateExtensions { public static Task InvokeAsync<TArgs>(this Func<object, TArgs, Task> func, object sender, TAr...

0
Q: Heartbeats per minute in vanilla HTML JS

async awaitAttached is a fun little snippet demonstrating a button to be clicked along with your heartbeat and see how many beats per minute you're at. This is a mwe of the concept, any feedback is appreciated. const $ = str => document.querySelector(str); let beatStart; let beatEnd; let beatCount = 0; ...

 
4:43 AM
0
Q: Check validity of an employee ID number in Java

firsttimerprogrammerI have to check the validity of an employee ID number. User will input the number and for odd positions, we multiply each odd position by 2 then add them together and the total must be a single digit. If multiplying and adding them afterwards will result in two-digit then we just add (no multiply...

 
 
2 hours later…
6:41 AM
Welcome to Stack Overflow. Please read How to Ask and stackoverflow.com/help/on-topic, and note well that this is not a discussion forum. We expect one, clear, specific, directly asked question - not a generic request for "criticism, advice, tips or anything". More broadly, we don't do code review here; you may try Code Review, but they have their own standards for questions. In any event, do not show us IDE screenshots. — Karl Knechtel 37 secs ago
 
 
2 hours later…
8:31 AM
Not really, because generic examples for such imports are strewn across the internet (both good and bad examples, likely). And in your specific case, it is much more likely that you need to rethink your app structure, so that the whole import problem goes away. But that requires much more time, and probably amounts to tutoring, which is not the same as providing a direct solution. A site like codereview might be of help with that, but a review of the full app code could be a bit much. — 9769953 31 secs ago
 
9:01 AM
0
Q: How to handle errors requiring program termination in Python functions?

MartinI have a main() function in my Python program which calls another function which in turn calls yet another function. There are certain conditions in those functions when the program has to call sys.exit(). One approach is to call the sys.exit() directly from the functions like this: #!/usr/bin/en...

 
 
2 hours later…
11:10 AM
0
Q: Splitting each string in a string array , getting the 2nd string of each split item, converting it into integers, then getting their sum

AzureLouiI would like to ask for help regarding how I could add the integers , originally strings that I took from a split string array, and assign the sum to a label in form. Please refer to the code below: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; u...

 
11:43 AM
 
 
2 hours later…
1:16 PM
Monking
 
Monking
 
@RMunroe built-in workout plan
 
1:42 PM
@SᴀᴍOnᴇᴌᴀ How do you fit it into a pocket? I think it would probably drag my pants down.
 
@pacmaninbw If I had to move one of those I'd likely get a cart of some sort
unless it would be feasible to hold it one's shoulder - think 80's boomboxes
 
I got a Walkman in the 90s never owned a boombox. I wouldn't try to carry any of my stereos around, the amplifier weights too much.
 
 
2:11 PM
0
Q: Several container functions rewritten as an excercise

PhilI took one of my old university excercises for another language and resolved it in c++. It consists of several higher order functions for vectors.I hope the comments are self-documenting enough. I am mainly concerned about not utilizing "modern" c++ features enough and generally writing bad c++, ...

 
3:03 PM
0
Q: Is there a way to simplify this code?

itsjsIs there a way to simplify the function so that it can be reused? Currently I am manually storing each 'price' and 'quantity' as independent variables but am unable to reuse the function. <!DOCTYPE html> <html> <head> <title>Test</title> <script> function myFun...

 
3:24 PM
@pacmaninbw I had a couple boomboxes in the 90s, as well as a walkman (which I got out last year during a power outage) and I had a couple discmans (one of which I use for my son's CDs)
 
@SᴀᴍOnᴇᴌᴀ Do you still have cassettes for music? Since I preferred to listen to my own music at work the Walkman was enough, boomboxes would not have met approval from my coworkers. I switched up Metal and Rock with classical Music (ballets and symphonies).
 
technically I do have cassettes however the walkman doesn't appear to play them anymore - so it is basically only good for the radio function
Last week our neighbors moved out and had a free pile... one day I saw a boombox with the text "Super Woofer" - hadn't seen one of those before
 
@SᴀᴍOnᴇᴌᴀ I don't see a CD player on the boombox, the graphic equalizer is nice.
 
@SᴀᴍOnᴇᴌᴀ A TRK-3D8E
Oh, not the E.
Volume bottom right of the E is different.
 
@Mast I'm not sure if that is the exact model I saw but it was something like that
I saw a guy carrying it within a few minutes... I don't remember if it was over his shoulder
my memory is fading since I haven't been eating as much pizza lately
 
3:38 PM
There even was a 4-speaker version.
 
I saw those as I was searching for images
 
In case you really dislike people walking within a mile of you.
 
@Mast Did it have a subwoofer?
 
@Mast in my city that might be useful though it might not deter the ones you'd want to deter
 
@pacmaninbw I think the thing in the middle was a woofer and the 80 had 2 of those.
 
3:40 PM
Good way to go deaf
But nice range
What Antivirus software do you guys use? I'm getting really tired of Norton and subscription is up in November.
 
4:01 PM
@pacmaninbw None.
An adblocker is essential, but AV is not.
The truly risky business I conduct in a VM, but not much.
 
@pacmaninbw I've been using Norton for a few years... got it mostly because my parents were having issues with phishing and wanted to protect their laptops
 
Monking
@pacmaninbw Common sense
2
 
I like that ^
 
Before switching to macs and an acquisition my company formerly used TrendMicro
 
4:17 PM
adblocker is a must though
 
Business-wise I have some decent experiences with Symantec.
 
0
Q: TypeError: func.toString is not a function

AdityaI was building a website with Fastify, and recently updated it to the latest version. After that, I converted my code from CommonJS to ES6. Once I did that, I suddenly ran into an error that I did not encounter before. TypeError: func.toString is not a function at Object.getFuncPreview (/home...

0
Q: Asynchronous DB session in Python (used in ASGI framework such as Sanic)

Cyril N.I've been working with Sanic as my default web framework, but coming from Flask, I had some issue with how to handle the database connection. So I built an asynchronous wrapper around it. I've also added an option to post process callbacks only when the whole process was successful (didn't thrown...

 
4:38 PM
It's not clear what the inputs and outputs of your program actually are, so it's hard to start thinking about details of how to structure your data. Also, does you code already work? If so, I recommend posting it to codereview.stackexchange.com instead of here. If your code doesn't work, then please give more details so we can help you debug it. — David Grayson 7 secs ago
 
2
Q: How do you decide if a function should return data directly (via return statement) or indirectly (e.g. updating a class property) or both?

WackGetI have some functions which update records in some database tables. When I run each function I want to know the number of records affected by each. I'm wondering what the most elegant way of returning this information is. Do I return it directly from the functions as an integer like this? $result...

 
@Mast Symantec is Norton
 
5:12 PM
0
Q: First Python Project - Uses PySimpleGUI

Trevn JonesI made my first program in Python using PySimpleGUI. The project turns a youtube video into an mp3 file and stores it in folder for spotify to access. I found this idea somewhere and just wanted to give it a go. However since it's my first program, I felt like I should try and get feedback to try...

 
5:34 PM
Welcome to SO. A more appropriate forum for this type of question is the Code Review Stack Exchange. It is not on topic here, but you'll get plenty of help over there. Best of luck! — mhodges 39 secs ago
 
5:45 PM
Jeff Tan on October 04, 2022
Learn about our newly designed tool to help make your favorite questions and answers easier to find.
 
 
1 hour later…
6:55 PM
0
Q: Return statement does not appear after running the code java

Mario MelendezI have to make a code to check if a word appears in a grid, but for some reason when I run it the return statement does not appear in the run tab, how do I fix this? public static boolean containsWord(char[][] grid, String word){ return verticalCheck(grid, word) || horizon...

 
 
1 hour later…
 
1 hour later…
9:31 PM
0
Q: What are other ways of finding Max and Min in python, other from my method?

Tam-Fils SalomonHow my method works is by sorting the list of numbers from least to greatest, finds the length of the list, then pick the first and last index integers. In the python world is this efficient or is there a better faster way; speed-wise? list = [11,2,343,32324,324,23456,437575,23534654,34624,236543...

 

« first day (3440 days earlier)      last day (571 days later) »