Go to Post It does it automagically. - David Kelly [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 26-10-2014, 21:01
Team118Joseph's Avatar
Team118Joseph Team118Joseph is offline
The guy that did the lighting
AKA: Joseph Foster
FRC #0118 (Robonauts)
Team Role: Alumni
 
Join Date: Jan 2014
Rookie Year: 2013
Location: League City
Posts: 61
Team118Joseph will become famous soon enoughTeam118Joseph will become famous soon enough
Talking 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.
Reply With Quote
  #2   Spotlight this post!  
Unread 26-10-2014, 21:14
cjl2625's Avatar
cjl2625 cjl2625 is offline
apel py
AKA: Cory Lynch
FRC #2067 (Apple Pi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Guilford, CT
Posts: 412
cjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to behold
Re: New Countdown To Kickoff 2015 Website

Nice, I'll be checking this frequently.
I like watching the milliseconds fly by
__________________
Head Programmer / Driver
Reply With Quote
  #3   Spotlight this post!  
Unread 26-10-2014, 21:16
devg29's Avatar
devg29 devg29 is offline
eat. build. sleep. repeat.
AKA: Devon
FRC #3654 (TechTigers)
Team Role: Leadership
 
Join Date: Oct 2014
Rookie Year: 2013
Location: Middletown CT
Posts: 50
devg29 is an unknown quantity at this point
Re: New Countdown To Kickoff 2015 Website

i am putting this on my favorites bar
Reply With Quote
  #4   Spotlight this post!  
Unread 26-10-2014, 21:28
Bryce Paputa's Avatar
Bryce Paputa Bryce Paputa is offline
FF TSL: Frog Farce
FRC #0503 (Frog Force)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Novi Michigan
Posts: 454
Bryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond repute
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-10-2014, 21:41
Bryce Paputa's Avatar
Bryce Paputa Bryce Paputa is offline
FF TSL: Frog Farce
FRC #0503 (Frog Force)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Novi Michigan
Posts: 454
Bryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond repute
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 26-10-2014, 21:47
Team118Joseph's Avatar
Team118Joseph Team118Joseph is offline
The guy that did the lighting
AKA: Joseph Foster
FRC #0118 (Robonauts)
Team Role: Alumni
 
Join Date: Jan 2014
Rookie Year: 2013
Location: League City
Posts: 61
Team118Joseph will become famous soon enoughTeam118Joseph will become famous soon enough
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
Reply With Quote
  #7   Spotlight this post!  
Unread 26-10-2014, 21:52
Bryce Paputa's Avatar
Bryce Paputa Bryce Paputa is offline
FF TSL: Frog Farce
FRC #0503 (Frog Force)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Novi Michigan
Posts: 454
Bryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond repute
Re: New Countdown To Kickoff 2015 Website

Quote:
Originally Posted by Team118Joseph View Post
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 26-10-2014, 21:59
Team118Joseph's Avatar
Team118Joseph Team118Joseph is offline
The guy that did the lighting
AKA: Joseph Foster
FRC #0118 (Robonauts)
Team Role: Alumni
 
Join Date: Jan 2014
Rookie Year: 2013
Location: League City
Posts: 61
Team118Joseph will become famous soon enoughTeam118Joseph will become famous soon enough
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);
Reply With Quote
  #9   Spotlight this post!  
Unread 26-10-2014, 23:03
Bryce Paputa's Avatar
Bryce Paputa Bryce Paputa is offline
FF TSL: Frog Farce
FRC #0503 (Frog Force)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Novi Michigan
Posts: 454
Bryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond repute
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.
Reply With Quote
  #10   Spotlight this post!  
Unread 26-10-2014, 23:13
Team118Joseph's Avatar
Team118Joseph Team118Joseph is offline
The guy that did the lighting
AKA: Joseph Foster
FRC #0118 (Robonauts)
Team Role: Alumni
 
Join Date: Jan 2014
Rookie Year: 2013
Location: League City
Posts: 61
Team118Joseph will become famous soon enoughTeam118Joseph will become famous soon enough
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 .

Last edited by Team118Joseph : 26-10-2014 at 23:17.
Reply With Quote
  #11   Spotlight this post!  
Unread 26-10-2014, 23:16
Bryce Paputa's Avatar
Bryce Paputa Bryce Paputa is offline
FF TSL: Frog Farce
FRC #0503 (Frog Force)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Novi Michigan
Posts: 454
Bryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond repute
Re: New Countdown To Kickoff 2015 Website

Quote:
Originally Posted by Team118Joseph View Post
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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