7 days 7 books to give away

  • Context: Announcement 
  • Thread starter Thread starter Greg Bernhardt
  • Start date Start date
  • #31
mfb said:
@Greg Bernhardt will me correct if I'm wrong, but I am >90% sure he will just run a database query to get all users in the listed user groups with a post between 0:00 and 24:00 on the corresponding day, and then pick one of them randomly.
Sure. I just wondered about the where clause. Trues on the user check boxes, and maybe Time in a between case, but depending on whether the database is historized or not, there can also be a timestamp clause on a login field. The same as you've asked about the post table: here or anywhere.
 
Physics news on Phys.org
  • #32
fresh_42 said:
Good question. And will the logout before be a necessary condition to fulfill the login condition?
The login part is redundant since to post you need to login. Don't over think this whole thing :)
 
  • #33
Greg Bernhardt said:
The login part is redundant since to post you need to login. Don't over think this whole thing :)
Yes, but to think about the structure of the query is a riddle. And the urge to solve riddles counts as an occupational disease here. :smile:
 
  • Like
Likes   Reactions: Greg Bernhardt
  • #34
SELECT DISTINCT users.username FROM posts INNER JOIN users ON posts.userid = users.userid WHERE posts.posttime > x AND posts.posttime < y AND users.secondarygroups [no idea how they are stored] ORDER BY RAND ( ) LIMIT 1

Didn't use SQL queries for a long time, and I have never seen the Xenforo database, but I would expect something like that.
 
  • Like
Likes   Reactions: Greg Bernhardt
  • #35
mfb said:
SELECT DISTINCT users.username FROM posts INNER JOIN users ON posts.userid = users.userid WHERE posts.posttime > x AND posts.posttime < y AND users.secondarygroups [no idea how they are stored] ORDER BY RAND ( ) LIMIT 1

Didn't use SQL queries for a long time, and I have never seen the Xenforo database, but I would expect something like that.
Yes, I only meant, that it as well could be "SELECT DISTINCT ... from USER where ... AND USER.TIMESTAMP_LOGIN between MM.D D.YYYY and MM.D (D-1).YYYY" then copy the IDs into Excel and let a random function select a cell.
 
  • #36
This is kind of making me laugh now. You PF people are very energetic if I must say. As a bonus, you all get along pretty well hah hah
 
  • #38
berkeman said:
Oh the heck with it, heading to Amazon...
Just got the book in the mail via the PF discount link and Amazon. Looks like a cute little book, and so far it looks like it will appeal to kids nicely. We'll probably read through it pretty quickly, and then send it on the tour of the grandkids in the younger grades. Maybe it will help to inspire more interest in STEM in them... :smile:

Space Book Cover.jpg

Space Book Drops.jpg
 

Attachments

  • Space Book Cover.jpg
    Space Book Cover.jpg
    48.9 KB · Views: 692
  • Space Book Drops.jpg
    Space Book Drops.jpg
    52.5 KB · Views: 692
  • Like
Likes   Reactions: ISamson, Greg Bernhardt and lekh2003
  • #40
what are the book titles you are giving away?
 
  • #41
jedishrfu said:
what are the book titles you are giving away?
first post :)
 
  • #42
jedishrfu said:
what are the book titles you are giving away?
See post #38...
 
  • #43
Okay I thought it was different books like Oro's book or something.
 
  • #44
Ooo! I wonder who will be Tuesday’s winner?
 
  • #45
doglover9754 said:
Ooo! I wonder who will be Tuesday’s winner?
For me Tuesday's over in a couple of hours. Are the results decided when the time is up in somewhere like Hawaii?
 
  • Like
Likes   Reactions: ISamson
  • #47
I already have a copy of the book, and it is good reading. @Greg Bernhardt made it a prize (that I won) for 2nd place in last fall's on-line PF trivia contest. If my name gets picked, which is probably unlikely, because PF has quite a few people logging in, I ask that Greg pick another name. :) :)
 
  • Like
Likes   Reactions: berkeman and ISamson
  • #48
lekh2003 said:
For me Tuesday's over in a couple of hours. Are the results decided when the time is up in somewhere like Hawaii?
I’m from Hawai`i. It’s currently 5:06 pm on February 7.
 
  • #49
berkeman said:
Just got the book in the mail via the PF discount link and Amazon. Looks like a cute little book, and so far it looks like it will appeal to kids nicely. We'll probably read through it pretty quickly, and then send it on the tour of the grandkids in the younger grades. Maybe it will help to inspire more interest in STEM in them... :smile:

View attachment 219776
View attachment 219777
I just finished the last half of the book, and I want to modify my comments from the first half of the book. The last half gets a lot more sophisticated in the comments from the astronauts, and it's not a kids book overall. The first half of the book will probably appeal to younger kids (which is great), but the second half will be boring to them and fascinating to adults.

This is probably on purpose, and props to the author for being able to mix such different levels of interest into one small, easy to read and enjoyable book. Here is an example of where the author switches gears... I'll still cycle this nice book through the grandkids, but I'll now be recommending to the parents that they read the book too, especially the second half. Thanks Greg and Ariel. :smile:

Space Book Nice.jpg
 

Attachments

  • Space Book Nice.jpg
    Space Book Nice.jpg
    59.2 KB · Views: 325
Last edited:
  • #50
berkeman said:
I just finished the last half of the book, and I want to modify my comments from the first half of the book.
I call it a coffee table book. Something a guest can pick up and read a quick interesting bit about life in space.
 
  • #51
Greg Bernhardt said:
I call it a coffee table book. Something a guest can pick up and read a quick interesting bit about life in space.
But most coffee table books that I flip through have the same theme level all the way through. This one goes from very simple to some wonderful and complex existential thoughts by the folks who have been there. Very fun book -- I'm glad that I bought it. Thanks Greg.
 
Last edited:
  • #52
Greg Bernhardt said:
I call it a coffee table book. Something a guest can pick up and read a quick interesting bit about life in space.
Sounds interesting
 
  • #53
doglover9754 said:
I’m from Hawai`i. It’s currently 5:06 pm on February 7.
I got this message 2:06 February 8. That's crazy.
 
  • #54
lekh2003 said:
I got this message 2:06 February 8. That's crazy.
am?
 
  • #55
doglover9754 said:
am?
No, PM.
 
  • #56
lekh2003 said:
No, PM.
Ah right... Australia is almost a day ahead of me
 
  • #57
doglover9754 said:
Ah right... Australia is almost a day ahead of me
Yeah. It's a massive difference. Actually from the easternmost point in New Zealand and an island west of Hawaii, there is a time difference of 23 and a half hours.
 
  • #58
lekh2003 said:
Yeah. It's a massive difference. Actually from the easternmost point in New Zealand and an island west of Hawaii, there is a time difference of 23 and a half hours.
:H Why don’t I know these stuff :cry:
 
  • Like
Likes   Reactions: ISamson
  • #59
doglover9754 said:
:H Why don’t I know these stuff :cry:
This is completely random knowledge. I don;t know in what situation I would ever utilize this fact unless somebody asks me the largest time difference.

Who cares? You might know several things which I don't know.
 
  • #60
lekh2003 said:
This is completely random knowledge. I don;t know in what situation I would ever utilize this fact unless somebody asks me the largest time difference.

Who cares? You might know several things which I don't know.
T-T I guess...
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
5K
  • Sticky
  • · Replies 97 ·
4
Replies
97
Views
50K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 67 ·
3
Replies
67
Views
16K
  • · Replies 7 ·
Replies
7
Views
10K
Replies
20
Views
10K
Replies
9
Views
14K
Replies
15
Views
41K
  • Sticky
  • · Replies 48 ·
2
Replies
48
Views
68K