Do you stay away from C++ too? You can do this there too
https://en.cppreference.com/w/cpp/utility/source_location/line
Do you stay away from C++ too? You can do this there too
https://en.cppreference.com/w/cpp/utility/source_location/line
This stuff is normally used for creating human readable error messages. E.g. printing the line of your code that actually set off the exception
The add
function in the example above probably traverses the call stack to see what line of the script is currently being executed by the interpreter, then reads in that line in the original script, parses the comment, and subs in the values in the function call.
This functionality exists so when you get a traceback you can see what line of code triggered it in the error message
Git doesn’t automatically recursively add all files in the directory to the repository though - VSCode decided that should be the default behavior, while other editors (intellij) ask if you want to add newly created files to version control
The library is a mile from me too, that’s a 30 minute round trip, or I have to drive and pay for parking
I bought a $60 inkjet 10+ years ago. Every 3-4 years I buy a multipack of aftermarket ink for $30. Every 18 months when the cartridge dries up half full in my printer I chuck it knowing the $5 of ink I just wasted saved me $400 in billable hours
if I didn’t have a printer I would need a standalone scanner, which costs almost the same amount
Driving to Staples to print a $0.10 page wastes $50 worth of time and gas
A cheap printer pays for itself very quickly.
The curl that ships with apt is ubiquitous enough that I trust doing sudo curl xxx yyy
more than enough if it means avoiding typing curl xxx /tmp/yyy && sudo mv /tmp/yyy yyy
Is curl so untrusted that you would prefer to use 3 commands (one which still needs root permissions) instead?
“the perfect scale”
Proceeds to list completely arbitrary temperatures and link them to completely subjective opinions
I can make all the same points about celsius with the added bonus of 0 and 100 being universally applicable and objectively measured
Sort of fine is even an exaggeration. I gifted my GF don’t starve together the other week and steam froze and crashed 3 times just trying to log in. After an hour of trying and failing to get to the library page we just gave up. This is on the current model MBP
Yeah but then ALL even numbers would be slow to compute because you would have to chain through every odd before you know that 2
is even.
Depends on the expected distribution of input values
473ml is abundantly common in Canada because it’s the most common size used in the US (16oz)
When I bought my laptop i was using windows and didn’t research Linux compatibility :(
And yup. A decade ago was when Linux turned a corner on the wifi driver front, 11 years ago was hell
10 years ago was the turning point. I remember as late as 2010 -2012 having to use NDISwrapper to install the windows XP wifi drivers because there were no native drivers so you had to run the windows drivers through an emulation layer to get wifi to work. Even within the past 5 years I’ve had to compile my own fixes for realtek chips because the auto installed drivers were not working optimally
Ticking the non-free driver box was child’s play. As late as like 2012 I remember needing to download NDISwrapper so I could make the windows drivers work through a compatibility layer
Safari only introduced a date input field like 2 years ago
This has already been patched on all 64 bit OSes though - whatever 32 bit systems are still in existence in another 15 years will just roll their dates back 50 years and add another layer of duct tape to their jerry-rigged existence
Author is bad at math. 50% range reduction and a 50% base cost increase. The upgraded model has a 30% range reduction for a 100% cost increase
You should look at how OPs example works first maybe
The python interpreter isn’t parsing comments, the add() function is just getting the current line number from the call stack context, and using a regex to spit out the numbers to the right of the “#” on the current executing line of the source code.