Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   New Countdown To Kickoff 2015 Website (http://www.chiefdelphi.com/forums/showthread.php?t=130919)

Team118Joseph 26-10-2014 21:01

New Countdown To Kickoff 2015 Website
 
I have created a Webpage that counts down to kickoff!
http://frccountdown.hosthorde.net/

I'm running the server off of a Beaglebone Black.

cjl2625 26-10-2014 21:14

Re: New Countdown To Kickoff 2015 Website
 
Nice, I'll be checking this frequently.
I like watching the milliseconds fly by :P

devg29 26-10-2014 21:16

Re: New Countdown To Kickoff 2015 Website
 
i am putting this on my favorites bar:D

Bryce Paputa 26-10-2014 21:28

Re: New Countdown To Kickoff 2015 Website
 
http://imgur.com/fBpIAup

Here's a screenshot of my countdown, it's just stored locally on my computer and set to my home screen. Clicking on the portal area expands it to take up the entire area. I can post the code if anyone wants, but it probably won't work perfectly on very many browsers.

Bryce Paputa 26-10-2014 21:41

Re: New Countdown To Kickoff 2015 Website
 
Mine is set to 10am EST. I think this is the broadcast time, but I never actually looked it up. Really the hours and minutes are just for show.

Team118Joseph 26-10-2014 21:47

Re: New Countdown To Kickoff 2015 Website
 
The broadcast starts at 10:30 EST and 9:30 CST
That is 142029900 in epoch seconds for the software

Bryce Paputa 26-10-2014 21:52

Re: New Countdown To Kickoff 2015 Website
 
Quote:

Originally Posted by Team118Joseph (Post 1405835)
The broadcast starts at 10:30 EST and 9:30 CST
That is 142029900 in epoch seconds for the software

Thanks, with javascript you can just enter it in year, month, day, hour, minute, second, millisecond format instead of calculating the time in seconds.

Team118Joseph 26-10-2014 21:59

Re: New Countdown To Kickoff 2015 Website
 
I decided to use the milliseconds and convert it over with this code

Code:

                var d = new Date();
                var time_until = (kickoff_date - d.getTime());
                var days = Math.floor(time_until/86400000);
                time_until = time_until%86400000
                var hours = Math.floor(time_until/3600000);
                time_until = time_until%3600000
                var minutes = Math.floor(time_until/60000);
                time_until = Math.floor(time_until%60000);
                var seconds = Math.floor(time_until/1000);
                var milliseconds = Math.floor(time_until%1000);


Bryce Paputa 26-10-2014 23:03

Re: New Countdown To Kickoff 2015 Website
 
Code:

                                var kickoff = new Date(2015, 0, 3, 10, 30, 0, 0)
                                        var diff = kickoff - new Date()
                                        var d = Math.floor(diff/1000.0/60.0/60.0/24.0)
                                        diff -= d * 1000 * 60 * 60 * 24
                                        var h = Math.floor(diff/1000.0/60.0/60.0)
                                        diff -= h * 1000 * 60 * 60
                                        var m = Math.floor(diff/1000.0/60.0)
                                        diff -= m * 1000 * 60
                                        var s = Math.floor(diff/1000)
                                        dDiv.innerHTML = d
                                        hDiv.innerHTML = h
                                        mDiv.innerHTML = m
                                        sDiv.innerHTML = s
                                        document.title = d + " Days Until Kickoff"

Here's how I did it, just a little bit easier to read and modify. The -= vs %= difference for the calculation is interesting.

Team118Joseph 26-10-2014 23:13

Re: New Countdown To Kickoff 2015 Website
 
The %= is modulus equal. Its used to get the remainder of the division. I use it to get the leftover hours, minutes, ext. then use that for the next equation. Once you start using modulus its hard to stop :].

Bryce Paputa 26-10-2014 23:16

Re: New Countdown To Kickoff 2015 Website
 
Quote:

Originally Posted by Team118Joseph (Post 1405852)
The %= is modulus equal. Its used to get the remainder of the division. I use it to get the leftover hours, minutes, ext. then use that for the next equation.

Of course, it's just interesting that we did the exact same calculation differently.

Team118Joseph 26-10-2014 23:21

Re: New Countdown To Kickoff 2015 Website
 
I was also wondering if anyone had some cool robot pictures I could use for the background. I was thinking of either having the page choose a random robot background or showing a robot of the day.

waialua359 27-10-2014 03:55

Re: New Countdown To Kickoff 2015 Website
 
Im not creating a link to this!
Everytime I see one of these, I cringe at how little days left we have before the 6 weeks of hell.:eek:

Calvin Hartley 27-10-2014 13:10

Re: New Countdown To Kickoff 2015 Website
 
Quote:

Originally Posted by Team118Joseph (Post 1405854)
I was also wondering if anyone had some cool robot pictures I could use for the background. I was thinking of either having the page choose a random robot background or showing a robot of the day.

(I'm no website builder, so I don't know how complicated this would be, but here's an idea)
Could you make it reference CD media? I believe that's how The Blue Alliance gets photos (correct me if I'm wrong). Showing a daily random or predetermined lineup would be cool.

Team118Joseph 27-10-2014 19:10

Re: New Countdown To Kickoff 2015 Website
 
I got the slide show code in! Now I just need pictures!:D
Just send pictures to Joseph.Foster118@gmail.com and I will put them into the slide show.


All times are GMT -5. The time now is 23:18.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi