mersenneforum.org  

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

Reply
 
Thread Tools
Old 2014-10-25, 14:06   #309
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

2×3×1,693 Posts
Default

Quote:
Originally Posted by Madpoo View Post
I would posit that disabling Javascript in your browser is doing-it-wrong™
What you're telling me is that showing a spinner while content loads is hacky. Oh... you!
[SNIP]
One of these days we're going to finally convince you that Javascript is not a bad thing. One feature at a time, we'll wear you down.
I find this unlikely, as it would require giving up a perpetual target for carping, without which some might be shown up as ir-rass-ible pikers who are just floundering about.
kladner is offline   Reply With Quote
Old 2014-10-25, 14:29   #310
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

622710 Posts
Default

Quote:
Originally Posted by Madpoo View Post
I would posit that disabling Javascript in your browser is doing-it-wrong™
What you're telling me is that showing a spinner while content loads is hacky. Oh... you!

I only have that *feature* on one page, and now I've forgotten which one. It was more to see how well that approach would work... it was something else where it's just dumping a lot of data.

Oh, it's in the "Found factors" report. Sometimes a really large range is requested and it just takes a long time to load. It's not the server's fault, honest.

I challenge you to (with Javascript *enabled*) fail to appreciate the beauty of showing a brief spinner while the table loads on a page like this:
http://www.mersenne.org/report_facto...B1=Get+Factors

There's no way in pure CSS to do that. Javascript can detect when the document is loaded and remove a class... try doing that in just CSS. :)

One of these days we're going to finally convince you that Javascript is not a bad thing. One feature at a time, we'll wear you down.
Hehe, nice try. But guess what? Can't guess? Okay I'll tell you. Sure you can't guess? Okay. My browser has it's own indicator about the load status of a page. Perhaps all those newfangled modern browsers aren't clever enough to show users a download progress indicator? If so, then I am pleased I didn't downgrade to one of those crippled new browsers. Maybe one day I'll convince everyone else how terrible JS is. Once piece of animated annoyance at a time.

So the content is still good and no complaints there. Although my minions do go for those flashy empty content sites and I don't think anyone wants them running amok around here.

PS: I didn't actually see that page you linked in all its JS glory so I don't know what I am missing. But I did see a perpetually frozen spinner GIF because I have turned off animations. And now I wonder if someone has made a JS spinner version to overcome the "problem" of users turning off animations because clearly it was a mistake and we need to use JS to give such wonderful things back to the users. Kind of reminds me of recently when FF was updated and forced everyone to have JS turned on, the bastards. They lost my trust then and there. Anyhow I digressed more than I intended to in this little aside. Sorry. Won't happen again. Really.... And why is colour in these BB tags spelled without a U? And another thing ...
retina is online now   Reply With Quote
Old 2014-10-25, 23:54   #311
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

63618 Posts
Default

Quote:
Originally Posted by retina View Post
PS: I didn't actually see that page you linked in all its JS glory so I don't know what I am missing. But I did see a perpetually frozen spinner GIF because I have turned off animations...
Yeah, it's just an animated GIF for a spinner:
http://www.mersenne.org/images/spinner.gif

If anyone else is really curious how to hide an element until it's loaded, here's how that works:
  • I set that page up so that the <table> has a class of "preload"
  • There's a <style> section on the page that defines ".preload" as {display: none;}
  • So normally that means when the page loads, that entire table is hidden. To satisfy the likes of Retina who have JS disabled, that <style> is actually in a javascript block itself, so if they don't have Javascript, that style is missing to and it'll show up anyway.
  • There's a <div> with an id of "processing" that has some text like "please wait while processing" and has the spinner image
  • There's a Javascript block that attaches a function to document.ready (same as the tablesorter plugin) that simply does: table.removeClass("preload"). That makes the table show up.
  • There's another part of that document.ready that adds another class to that "processing" div that applies a style to hide that block. So yeah, it unhides the table and hides the "processing" text in one swell foop.

I can't stress enough how nice it is too use Javascript to manipulate elements on the page in reaction to load events, user actions, etc. AJAX enabled pages, for instance, offer all kinds of nifty things, and without Javascript you wouldn't have things we may take for granted now, like dragging and dropping emails in Gmail to pop them in a folder, for example.

I'll grant you that some pages will take javascript and do some truly useless things with it that don't add anything to the user experience and can slow down a browser (well, in some older browsers at least). I have in mind some sites I've seen that will draw a little trail of whatever as you move your pointer around in the window. I mean, if I ever wanted to punish the planet, I would inflict mouse trails on every website. Forget viruses or trojans or worms... just add mouse trails to everything and watch the intertubes implode.

And yet, the same features allow a site to create drag and drop functionality, so... Is that the website equivalent of tolerating nuclear weapons because the same basic concept gives us radiation therapy to cure cancer? LOL

And yes, I compared mouse trails to nuclear weapons. Behold:
http://javascript-fx.com/mouse_trail/pinwheel/demo.html
Madpoo is offline   Reply With Quote
Old 2014-10-26, 04:11   #312
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

3,313 Posts
Default Account results page changes

I just finished up some changes to the account "results" page.

The "result type" column now indicates whether a result is "verified" (double-checked) or "unverified" (only single checked).

Additionally, if a result was flagged as suspect or bad due to errors noted during the LL test, or if your residue didn't match and it was the odd man out in a triple check, that column will be color coded as well so it stands out even more, as a way to let you know something was up on your machine during that run.

Say a thanks to Xyzzy for the suggestion... but truth be told it looks like maybe that type of info was included at one point but commented out. Perhaps it didn't perform well on the old server but it seemed okay for me so I added it back in along with the display enhancements.

I don't personally have any suspect or bad results in my account, but it should be working. I just couldn't test that exact scenario, so holler if it looks bad. It should be "black text on yellow" for suspect and "black text on red" for bad results.
Madpoo is offline   Reply With Quote
Old 2014-10-26, 04:30   #313
richs
 
richs's Avatar
 
"Rich"
Aug 2002
Benicia, California

23·3·5·11 Posts
Default

This is what I currently get:

Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression., SQL state 21000 in SQLExecDirect in C:\inetpub\www\results\default.php on line 111

Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in C:\inetpub\www\results\default.php on line 129

richs has 194 results in the last 365 days (only 0 are shown).
richs is offline   Reply With Quote
Old 2014-10-26, 08:24   #314
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

3,313 Posts
Default

Quote:
Originally Posted by richs View Post
This is what I currently get:

Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression., SQL state 21000 in SQLExecDirect in C:\inetpub\www\results\default.php on line 111

Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in C:\inetpub\www\results\default.php on line 129

richs has 194 results in the last 365 days (only 0 are shown).
Hmm... I wondered if that could happen. I can fix that, but it's weird that more than one would match, but I think some people report their same results twice sometimes. No idea how that happens.
Madpoo is offline   Reply With Quote
Old 2014-10-26, 12:57   #315
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

5×17×97 Posts
Default

Quote:
Originally Posted by Madpoo View Post
The "result type" column now indicates whether a result is "verified" (double-checked) or "unverified" (only single checked).

Additionally, if a result was flagged as suspect or bad due to errors noted during the LL test, or if your residue didn't match and it was the odd man out in a triple check, that column will be color coded as well so it stands out even more, as a way to let you know something was up on your machine during that run.
Xyzzy is offline   Reply With Quote
Old 2014-10-26, 14:55   #316
richs
 
richs's Avatar
 
"Rich"
Aug 2002
Benicia, California

23·3·5·11 Posts
Default

Thanks, Madpoo. The results page works now.

I have a box at work that is behind a firewall so I have to manually take assignments from other boxes and run them at work. On occasion I have mistakenly run the same assignment on two different boxes which is the reason for the same result being reported twice.

How may one check earlier assignments?
richs is offline   Reply With Quote
Old 2014-10-27, 00:23   #317
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

3,313 Posts
Default

Quote:
Originally Posted by richs View Post
Thanks, Madpoo. The results page works now.

I have a box at work that is behind a firewall so I have to manually take assignments from other boxes and run them at work. On occasion I have mistakenly run the same assignment on two different boxes which is the reason for the same result being reported twice.

How may one check earlier assignments?
Earlier assignments, like more than a year old? The report right now limits it to 365 days, maybe that was for performance reasons. The table of client messages is pretty big but I think the indexing on it, plus the new server, has helped it out a lot. I'd probably have to ensure performance is okay before letting it go back further.

I just did a few tests... going back 2 years isn't too bad for me, but I don't have a ton of entries (something like 2000 records over 2 years). Letting it pull up *all* of my 12,000+ records took a really long time.

I'll table changing anything until the impact of any changes is checked a bit more. It could be worth changing it to show a max of XXX records (I think 5000 is the current limit) regardless of age, but I don't want to make that call. :)
Madpoo is offline   Reply With Quote
Old 2014-10-27, 16:26   #318
chris2be8
 
chris2be8's Avatar
 
Sep 2009

83116 Posts
Default

Quote:
Originally Posted by Madpoo View Post
Yeah, it's just an animated GIF for a spinner:
http://www.mersenne.org/images/spinner.gif

If anyone else is really curious how to hide an element until it's loaded, here's how that works:
  • I set that page up so that the <table> has a class of &quot;preload&quot;
  • There's a <style> section on the page that defines &quot;.preload&quot; as {display: none;}
  • So normally that means when the page loads, that entire table is hidden. To satisfy the likes of Retina who have JS disabled, that <style> is actually in a javascript block itself, so if they don't have Javascript, that style is missing to and it'll show up anyway.
  • There's a <div> with an id of &quot;processing&quot; that has some text like &quot;please wait while processing&quot; and has the spinner image
  • There's a Javascript block that attaches a function to document.ready (same as the tablesorter plugin) that simply does: table.removeClass(&quot;preload&quot;). That makes the table show up.
  • There's another part of that document.ready that adds another class to that &quot;processing&quot; div that applies a style to hide that block. So yeah, it unhides the table and hides the &quot;processing&quot; text in one swell foop.
Can you make the spinner etc only appear if javascript is enabled? It's misleading to have it still there after the page has finished loading?

Chris
chris2be8 is offline   Reply With Quote
Old 2014-10-27, 18:17   #319
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

63618 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
Can you make the spinner etc only appear if javascript is enabled? It's misleading to have it still there after the page has finished loading?

Chris
I could, but maybe it's punishment for the people with Javascript disabled.

Truth be told, I thought about it at the time (only adding that part dynamically using Javascript in the first place) but I was happy enough to get what I had working and called it good enough.

Next time I revisit that page, I may take care of that but it's not super high on the priority list.
Madpoo 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 20:19.


Fri Aug 6 20:19:18 UTC 2021 up 14 days, 14:48, 1 user, load averages: 2.65, 2.94, 3.00

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.