mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > PrimeNet

Reply
 
Thread Tools
Old 2014-10-13, 19:44   #254
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

D6316 Posts
Default

Quote:
Originally Posted by Madpoo View Post
I even toyed with using some Javascript to have an updated time on the page but that mostly depends on visitors having their own clock and timezone set correctly, so I abandoned that.
An alternate approach is to feed the browser the correct UTC time on pageload, then just increment the time every second. Undoubtedly the time will drift from absolutely correct over time (and, in fact, will be off by page-load time right from the start), but should be generally "correct enough" for the amount of time a page is likely to remain open, and more reliably correct than depending on the user's computer to have an accurate clock/timezone.
James Heinrich is offline   Reply With Quote
Old 2014-10-13, 19:49   #255
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

63618 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
An alternate approach is to feed the browser the correct UTC time on pageload, then just increment the time every second. Undoubtedly the time will drift from absolutely correct over time (and, in fact, will be off by page-load time right from the start), but should be generally "correct enough" for the amount of time a page is likely to remain open, and more reliably correct than depending on the user's computer to have an accurate clock/timezone.
I think people who need it should just have this link always handy:
http://www.timeanddate.com/worldcloc...en.html?n=1440

The websites I work on are spread across 21 different countries and something like 12 timezones... that website is great since you can build a custom URL that shows your current time plus the local time in a bunch of other cities.
Madpoo is offline   Reply With Quote
Old 2014-10-13, 20:21   #256
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

100110001101102 Posts
Default

Quote:
Originally Posted by Madpoo View Post
Thanks darling... or is it "sir"?
Darling is fine....
chalsall is offline   Reply With Quote
Old 2014-10-13, 20:22   #257
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

342710 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
An alternate approach is to feed the browser the correct UTC time on pageload, then just increment the time every second.
Just for fun I tried it out. You need to wrap an ID'd <span> around the actual date string so you can update that string, and then this unnecessarily-complicated chunk of code will increment it. Unless I missed something it seems overly complex (compared to what I would do in PHP) since there is no formatted output you need to construct the date format element-by-element, and then ugly things like getUTCMonth() returns 0-11 rather than 1-12, and all the getUTC____ functions return integers so you need to worry about zero-padding them. But it works.
Code:
<div>Current time: <span id="current_utc_time">2014-10-13 19:57:55 UTC</span><span style="font-size:8pt;"> - Page rendered in 0.0426s</span></div>
<script type="text/javascript">
	function incrementUTCtimestamp() {
		var current_time = new Date(document.getElementById('current_utc_time').innerText);
		var updated_time = new Date(current_time.getTime() + 1000);
		var Y = updated_time.getUTCFullYear();
		var M = updated_time.getUTCMonth() + 1; // getUTCMonth return 0-11
		var D = updated_time.getUTCDate();
		var h = updated_time.getUTCHours();
		var m = updated_time.getUTCMinutes();
		var s = updated_time.getUTCSeconds();
		M = ((M < 10) ? '0' : '') + M; // add zero-padding where needed
		D = ((D < 10) ? '0' : '') + D; // add zero-padding where needed
		h = ((h < 10) ? '0' : '') + h; // add zero-padding where needed
		m = ((m < 10) ? '0' : '') + m; // add zero-padding where needed
		s = ((s < 10) ? '0' : '') + s; // add zero-padding where needed
		document.getElementById('current_utc_time').innerText = Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s + ' UTC';
		setTimeout(incrementUTCtimestamp, 1000);
	}
	setTimeout(incrementUTCtimestamp, 1000);
</script>
With minimal modification you could set the timeout to 60000 and omit the seconds from the datestring if you prefer.
James Heinrich is offline   Reply With Quote
Old 2014-10-13, 20:51   #258
cuBerBruce
 
cuBerBruce's Avatar
 
Aug 2012
Mass., USA

2·3·53 Posts
Default

What I really care about is the UTC when the data was generated. If the hourly reports all display that specially, then having the footer include the UTC of the time the page was downloaded is fine. I would not want to have the value updated in real time to try to indicate the current time.

Another little point: I don't care about how long it took to render the page. I am guessing that is useful to Madpoo while working on these changes, but it seems to me that it's unnecessary information for the typical user.
cuBerBruce is offline   Reply With Quote
Old 2014-10-14, 01:53   #259
flagrantflowers
 
Apr 2014

12810 Posts
Default

http://www.mersenne.org/assignments/...et+Assignments

Doesn't sort by percentage. It separates the data into two sets: tests which have been started and tests which have not been started.

Last fiddled with by flagrantflowers on 2014-10-14 at 01:53 Reason: EDIT: sorted->started
flagrantflowers is offline   Reply With Quote
Old 2014-10-14, 02:25   #260
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

3,313 Posts
Default

Quote:
Originally Posted by cuBerBruce View Post
Another little point: I don't care about how long it took to render the page. I am guessing that is useful to Madpoo while working on these changes, but it seems to me that it's unnecessary information for the typical user.
I actually don't care either. It was there from the old pages and I just kept it around.

It may have provided more insight on the old server if a SQL query was taking a long time to return data. There are currently a few custom reports that pull some SQL backend stuff that take a while, but all in all having that on the page isn't terribly useful most of the time.

But all in all, it's in the footer and I shrunk the size of it so I guess it's harmless enough.
Madpoo is offline   Reply With Quote
Old 2014-10-14, 02:37   #261
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

3,313 Posts
Default

Quote:
Originally Posted by flagrantflowers View Post
http://www.mersenne.org/assignments/...et+Assignments

Doesn't sort by percentage. It separates the data into two sets: tests which have been started and tests which have not been started.
Technically that column is treated as text, and even then it tends to sort poorly. The tablesorter plugin will also, by default, sort empty data last. There are some options to have empty stuff sort differently but in this case it wouldn't really matter.

To have it sort by the actual % progress, I'd have to look at how that data is generated and remove the text in front of it. I'm not sure why but it only seems to add "LL," for the LL tests, not double-checks. I'm going to assume there was a reason though.

I think the sorting gets confused if there's a mix of #'s and text... I might just be able to force that column to sort only by text and see if that's any better.

EDIT: Oh, I get why it shows "LL" for example. It's showing the stage + the % done of that stage. LL assignments might have to do factoring first so it might show that % progress. That's not likely to happen now that the GPU's are racing ahead with factoring, far ahead of any LL ranges, but I guess it could still happen.

And speaking of GPU72... once all exponents below 1E9 are TF'd will the project get a name change to GPU73 and go back to make sure everything is factored at least that high (increasing the TF depth one bit all along the way)? Kidding... I think...

Last fiddled with by Madpoo on 2014-10-14 at 03:02 Reason: Oh...
Madpoo is offline   Reply With Quote
Old 2014-10-14, 03:30   #262
potonono
 
potonono's Avatar
 
Jun 2005
USA, IL

193 Posts
Default

Notice: Undefined variable: etacolor in C:\inetpub\www\assignments\default.php on line 126
Notice: Undefined variable: etacolor in C:\inetpub\www\assignments\default.php on line 130
potonono is offline   Reply With Quote
Old 2014-10-14, 07:13   #263
legendarymudkip
 
legendarymudkip's Avatar
 
Jun 2014

23×3×5 Posts
Default

Quote:
Originally Posted by Madpoo View Post
And speaking of GPU72... once all exponents below 1E9 are TF'd will the project get a name change to GPU73 and go back to make sure everything is factored at least that high (increasing the TF depth one bit all along the way)?
I think we'll be waiting a while to factor all exponents to 272.
Especially those < 1M
legendarymudkip is offline   Reply With Quote
Old 2014-10-14, 11:26   #264
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

23×149 Posts
Default

Quote:
Originally Posted by Madpoo View Post
..will the project get a name change to GPU73 and go back to make sure everything is factored at least that high (increasing the TF depth one bit all along the way)?
By the time you get up to ~4000M the target TF (according to the current rules, which will undoubtedly be obsolete by then) is 292 (and TF'ing one exponent to that level is ~125THz-days )
James Heinrich is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database design xilman Astronomy 1 2017-04-30 22:25
Theoretical Experiment Design c10ck3r Homework Help 7 2015-02-03 08:54
Digital Logic Design henryzz Puzzles 9 2014-12-04 20:56
new intel design tha Hardware 5 2007-04-19 11:38
design factoring algorithms koders333 Factoring 14 2006-01-25 14:08

All times are UTC. The time now is 04:42.


Fri Aug 6 04:42:19 UTC 2021 up 13 days, 23:11, 1 user, load averages: 1.86, 2.42, 3.43

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.