What is the newest installment of 'Random Thoughts' on Physics Forums?

  • Thread starter Thread starter Evo
  • Start date Start date
  • Tags Tags
    Random Thoughts
Click For Summary
The discussion revolves around frustrations with current documentary programming, particularly criticizing the History Channel's focus on sensational topics like time travel conspiracies instead of real historical content. Participants express disappointment over National Geographic's sale to Fox, fearing a decline in quality programming. The conversation shifts to lighter topics, including humorous anecdotes about everyday life, such as a malfunctioning kitchen fan discovered to be blocked by installation instructions. There are also discussions about the challenges of understanding various dialects in Belgium, the complexities of language, and personal experiences with weather and housing in California. Members share their thoughts on food, including a peculiar dish of zucchini pancakes served with strawberry yogurt, and delve into mathematical concepts related to sandwich cutting and the properties of numbers. The thread captures a blend of serious commentary and lighthearted banter, reflecting a diverse range of interests and perspectives among participants.
  • #10,171
A bit of messed up, leap-year trivia for ya from https://learn.microsoft.com/en-us/office/troubleshoot/excel/determine-a-leap-year

"Because versions of Microsoft Excel earlier than Excel 97 handle only years from 1900 to 2078, only the year 1900 is subject to the 100/400 exclusion rule of leap years in Microsoft Excel. However, in order to be compatible with other programs, Microsoft Excel treats the year 1900 as a leap year."​

So, because Microsoft wanted to maintain backwards compatibility with older systems that did things wrong, they continue to be wrong. Gahh! :headbang:

TLDR take-home: Don't inherently trust Microsoft Excel when it comes to leap-years (particularly 1900 or before).
 
Physics news on Phys.org
  • #10,172
collinsmark said:
Don't inherently trust Microsoft Excel
Even shorter. <Once bitten twice shy emoji>
 
  • Like
Likes collinsmark
  • #10,173
Some people had a bad day.
https://www.yahoo.com/news/train-derails-crashing-truck-carrying-220213463.html

In this day and age of rapid communication, why can't the responsible individuals communicate? The trucking company, or perhaps the escorts, should have conferred with the railroad as to the schedule, or that simply should have check the line to see if it was clear to take a 134 foot beam across the line. It's not clear from the video why the truck was stopped on the crossing, but ordinarily, one does not stop on a crossing - ever. Trains have the right of way - always.
 
  • Wow
  • Sad
Likes Rive and pinball1970
  • #10,174
Astronuc said:
In this day and age of rapid communication, why can't the responsible individuals communicate?

I don't know the exact requirements there but transferring irregular/oversized cargo usually requires special permit (with detailed plan about the whole route) and often done with security cars around and checkup points on the way... This one looks quite amateurish - or, rather: done attempted cheap...
Astronuc said:
It's not clear from the video why the truck was stopped on the crossing
Let me guess: the newbie driver got lost, so stopped to check the map - and totally forgot the actual length of the truck :doh:
 
  • #10,175
More images and video of the collision and aftermath. The truck driver was unharmed, but two crew members, the locomotive engineer (operator) and conductor, were injured. The lead locomotive ended up on its side in a creek. Fortunately, hazardous cargo was not involved, but diesel fuel did leak from at least one locomotive (lead).

https://newschannel9.com/news/local...d9xcYFnHJ61jQf3nLvALwN6Z1ICOqfkLKCSuIoLT_hEq0

Twitter feed
 
  • #10,176
Christmas preparations has a certain fractal-like property.
Be it cleaning or shopping: the closer it is, the more and more details popping up endlessly.
We planned to finish up everything by the end of November, but still working on it o0)
 
  • #10,177
Borg said:
Leap years are every four years except if the year is divisible by 400. The year 2000 was not a leap year.

collinsmark said:
Yes, but so is 2024.
That's not quite right. The year 2000 was a leap year.

Every year evenly divisible by 4 is a leap year, unless...

Unless it is also evenly divisible by 100, in which case it is not a leap year, unless...

Unless it is also evenly divisible by 400, in which case it is a leap year.

[Edit: this is how the Gregorian calendar works. Other calendars may have different rules.]
So 2100 is lap, but 2060 is not?
 
  • #10,178
Trying to see how to get Python to take a positive Integer as input and output the string 1234...n
I know how to use 'a'+ 'b' , to get the string ab when a,b are given , but my efforts to do from this a loop from 1 to n haven't
worked . Thinking of starting with n as an integer, then adding ##1*10^{n-1} +2*10^{ n-2} +...n*10^{0} ## and then converting it into a string using 'str'.
 
  • #10,179
Use str(i + 1) to convert the integer to a string and then just append it to your string, no? Or you could make a list of integrrs-as-strings snd use str's join method.
 
  • Like
Likes WWGD
  • #10,180
Ibix said:
Use str(i + 1) to convert the integer to a string and then just append it to your string, no? Or you could make a list of integrrs-as-strings snd use str's join method.
Thanks, yes, I was thinking of using recursion starting with the trivial string 1 and then appending/concatenating 2, then 3, and so on , up to n.
 
  • Like
Likes Ibix
  • #10,181
I wouldn't call that recursion, but yes it should work.
 
  • Like
Likes WWGD
  • #10,182
WWGD said:
So 2100 is lap, but 2060 is not?
The other way around. 2100 will not be a leap year, but 2060 will be.

1600: Leap year
1700: Not leap year
1800: Not leap year
1900: Not leap year
2000: Leap year
2100: Not leap year
2200: Not leap year

A leap second skips a whole second, but a leap year only skips a day. What month should we leap?
 
  • #10,183
Algr said:
The other way around. 2100 will not be a leap year, but 2060 will be.

1600: Leap year
1700: Not leap year
1800: Not leap year
1900: Not leap year
2000: Leap year
2100: Not leap year
2200: Not leap year

A leap second skips a whole second, but a leap year only skips a day. What month should we leap?
Ok, my program to determine leaps will include a link to a page with a list of leaps.
And a comment: If you don't like it, go take a leap!
 
  • Like
Likes Algr
  • #10,184
At the supermarket:
" Have you seen the egg nog?"
No, I watch it all the time, and it never nogged.
" Ok, where's the Jojoba "
( Stoning): " You cannot say the name Jojoba!"
 
  • #10,185
I like this picture (looks kind of like a hammerhead shark):

Screenshot 2022-12-22 at 9.40.31 AM.png
 
  • Like
Likes pinball1970
  • #10,186
Screenshot 2022-12-22 at 12.28.14 PM.png
 
  • Like
  • Haha
Likes Ibix, collinsmark, pinball1970 and 1 other person
  • #10,187
Dang. Wind chill is -25 degrees F here right now. :oldcry:
 
  • Wow
Likes pinball1970 and berkeman
  • #10,188
Ibix said:
I wouldn't call that recursion, but yes it should work.
( This was re Python code that a positive integer n and ouputs the string 123..n )

I ended up using:
Python:
n=int(input)
for i in range(1,n+1):
     print(i, end = "")
Code from last line is pretty handy. Prints everything (here in the range (1,n+1)) and adjoins/appends that which is at the 'end' part = (Here the empty string ), therefore output is 1234..n (not sure why we're using n+1 rather than n)

There was another way of adjoining through ("".join(i,j) ), which does output the string 'ij' , but I would have had to iterate with a base case. Will try it some other time.

Though nots ure why I was told to include:

if __name__ == '__main__':
 
  • #10,189
dlgoff said:
Dang. Wind chill is -25 degrees F here right now. :oldcry:
The wind is not letting up. Here is what a Google search shows:
Dangerously cold wind chills from 25 below zero to 40
below zero.
 
  • Wow
Likes pinball1970 and Ibix
  • #10,190
dlgoff said:
The wind is not letting up. Here is what a Google search shows:
Dangerously cold wind chills from 25 below zero to 40
below zero.
Sorry to hear. Are you required to go out? Do you have enough provisions to last you through it?
 
  • Like
Likes pinball1970
  • #10,191
WWGD said:
(not sure why we're using n+1 rather than n)
Because range(a,b) gives a, a+1,..., b-1, consistent with range(b) giving 0, 1,..., b-1.
WWGD said:
There was another way of adjoining through ("".join(i,j) ), which does output the string 'ij' , but I would have had to iterate with a base case. Will try it some other time.
This lets you do it as a one-liner, assuming you've read in n already:
Python:
print("".join([str(i+1) for i in range(n)]))
(You may be able to omit the square brackets - not 100% sure off the top of my head.)
WWGD said:
Though nots ure why I was told to include:

if __name__ == '__main__':
__name__ stores the name of the python module, and if it is __main__ then it's the entry file - i.e., the user ran python thismodule.py, rather than the module being brought in via an import statement. If you put any "script" style code (rather than class/variable/function definitions) in that if statement then you can include the module via import in another program, and all your classes etc are available to that program without whatever script you wrote getting executed. The primary use I've made of this is to write some working demo code inside a library:
Python:
class MyClass:
    def whatever(self):
        return "whatever"
if __name__ == "__main__":
    print("Demo of MyClass' whatever() method:")
    c = MyClass()
    print(c.whatever())
Then if a user runs this module they get a little demo, but if they import it they just get the class and no random output from my little demo script. It's a bit pointless if your python file doesn't define anything you could ever possibly reuse, but using it anyway is probably not a bad habit to get into.
 
  • Like
Likes WWGD
  • #10,192
WWGD said:
Sorry to hear. Are you required to go out? Do you have enough provisions to last you through it?
I'm retired, so will be staying inside. I will only go out to drive to my mailbox. I've got enough to eat for a while. Thanks.
 
  • Like
Likes pinball1970, WWGD, Ibix and 1 other person
  • #10,193
dlgoff said:
I'm retired, so will be staying inside. I will only go out to drive to my mailbox. I've got enough to eat for a while. Thanks.
Just in case, the US Soccer team may be flying over , something may happen to the flight. In case you get too hungry. ;).
 
  • Haha
Likes dlgoff
  • #10,194
Still unclear why/how Quic/Http3 with UDP is preferred to Https with TCP/IP . Of the two, only Https with Tcp/Ip has ways of verifying whether packets arrived.

 
  • #10,195
WWGD said:
Still unclear why/how Quic/Http3 with UDP is preferred to Https with TCP/IP . Of the two, only Https with Tcp/Ip has ways of verifying whether packets arrived.

 
  • Like
Likes WWGD
  • #10,196
dlgoff said:
Dang. Wind chill is -25 degrees F here right now. :oldcry:
It's 17 degrees F and the wind chill is still -25 degrees F and every thing is ice covered. I hate winter.
 
  • #10,197
dlgoff said:
It's 17 degrees F and the wind chill is still -25 degrees F and every thing is ice covered. I hate winter.
I think of it this way: it's the season to eat rich, heavy foods that would knock you out if you ate them in winter.
 
  • Like
Likes dlgoff
  • #10,198
  • Like
Likes Borg
  • #10,199
Merry Christmas Physics Forums.
 
  • Like
Likes WWGD, BillTre, OmCheeto and 3 others
  • #10,200
Merry Christmas! 🍻
 
  • Like
Likes WWGD, pinball1970, BillTre and 2 others

Similar threads

  • · Replies 2K ·
63
Replies
2K
Views
57K
  • · Replies 3K ·
89
Replies
3K
Views
159K
  • · Replies 2K ·
76
Replies
2K
Views
170K
  • · Replies 4K ·
134
Replies
4K
Views
235K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3K ·
112
Replies
3K
Views
360K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
5
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K