Saturday, May 24, 2014

Doctypes border-spacing and class-names

I wanted to be able to use a CSS class-name beginning with a number for my Table cross-correlation page. I discovered that class-names beginning with numbers are able to do everything normal class-names can do with table CSS, except for border-spacing, and that this holds true regardless of the Doctype. In the process produced a table that could be useful regardless of whether you want to use numerical class-names or not:

Doctype, Border-spacing, tables colors, class-names in IE8

Seems (re IE8) that the best Doctype to use if you want to be able to present both table-colors and also border-spacing, would be "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN">". I dreamed this Doctype up myself, cobbling together various elements from different Doctypes. This Doctype: references HTML 5, allows for full table-color presentation and control, allows for border-spacing. By way of contrast,  <!DOCTYPE html 5>  does not allow for border-spacing.

I'll have to check to see if this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN">" actually does support HTML 5. When no Doctype is listed and when the only doctype declaration is '<!Doctype>', table-colors are supported but border-spacing is not. Best I can tell, if the Doctype listed is unrecognized by the browser, the browser behaves as it would if no Doctype was included in the html file.    

Labels: , , , , , , , ,

Wednesday, May 21, 2014

Sports Calendar Broken Link Fixed

On May 13 a week ago, in this blog I published 'My All-Sports Calendar With Links to Personal Sports Logs'  , which contained a link to the 'Sports Calendar'. The link contained an incorrect href. The problem has been fixed. Correct link:

May 2014 Sports Calendar for David Virgil Hobbs

Sunday, May 18, 2014

Colors Cross-Correlation foreground-background Program

I built a table showing which foreground colors are compatible with which background colors. Then I realized I needed to be able to know, if a foreground-color is legible against a certain background-color, which other foreground-colors are also compatible with that background-color. I understood that determining the answer to such questions, is an appropriate programming task, because it would be very laborious (and a contemptible evasion of a programming challenge), to attempt to determine the answers without resorting to programming. So, I've come up with the following table, which is programmed to produce the cross-correlation information automatically, thereby saving huge amounts of time/energy, or accomplishing things I would never have the time/energy to accomplish in the first place, absent the power of code.

Failing to see the importance of such automated cross-correlation (applicable to issues other than foreground/background colors), IMHO, evinces a lack of wisdom.

Links to further improved versions of the table/program will be posted here.

May 18:
V1 Background-Foreground Color Palette with Automated Cross-Correlations (works with IE8, & Google-Chrome version Version 34.0.1847.137 m).

May 19:
V2 Background-Foreground Color Palette with Automated Cross-Correlations    
(works with IE8, does not work with  Google-Chrome version Version 34.0.1847.137 m).

V2 Improvements: seems to execute faster; works with upper-left table cell containing proper value; contains link to trigger program that quickly hides and un-hides cross-correlation info made into the table-cells.
May 21:
(works with IE8).

V3 Improvements: Program now cross-correlates two columns not just one, and integrates the second correlations with the first in the table. The programming was going swimmingly this time, but then suddenly, when I was about five minutes from being all done for the day, disaster struck, it completely stopped working. I could not figure out what was going on, I felt devastated. Then I found out that a defective line of code, in a program at the bottom of a js sheet, had rendered every program on the js sheet dysfunctional. The culprit code: if(twinumber==961){alert('copyworktable is finished')}; return} (error in red).

May 22:

V4 Improvements: processing errors corrected; clutter of 'x' marks in cells eliminated; the four cells in the upper-left corner now show correct foreground/background combinations instead of imaginary ones used for program testing purposes. V3 superficially appeared competent, but there were processing-errors that went undetected due to the particular 'x's in table-cells pattern I was working with. I suffered much getting the errors out of V3. You can read about all I went through  by looking at the text under the table in the V4 page. I often go through hell getting mistakes out of these programs. 
May 23:

RE alleged stupidity of the V4, Compared to a Hypothetical Alternative

The V4 Background-Foreground Color Palette with Automated Cross-Correlations Program (works in IE8): descends down the column belonging to the foreground color being processed; when it finds an x in a table cell, it implants a table with the foreground-color's hexadecimal number in every cell in the row of the column that has an x in it; it goes on until the column is processed; it finishes with the cross-correlations for that foreground color only completed.

Some might argue, "the V4 is a dumb idea! You could get alot more done per minute of processing time, with a different program, the X7. The X7 would act as follows: Travel through the first background-color row, adding a foreground-color's hex number to a variable, every time it found a cell with an x in it belonging to that color's column; travel through that same row again, this time implanting the variable containing the different color-names collected, every time it found a cell with an x in it; repeat the process with each row until the table is processed; you end with every cross-correlation completed for every foreground color".

My response to the hypothetical argument:

(note: the following for the sake of simplification does not account for fact that the X7 would process each cell twice; therefore the
number of cells processed figures for X7 should exactly speaking be double of what they are listed as in the following formulas and figures).

Where: C = number of cells in table; N = number of notable cells (cells with x's in them) in table:

The number of cells processed by the V4, extrapolates to a formula: Cells-Processed (CP) = (square root of C) + N.

The number of notable cells (cells with x's in them) processed by the V4, extrapolates to a formula: Notable-Cells-Processed (NCP) = (N/square-root-of-C)+ ((N-squared)/C).

The number of cells processed by the hypothetical X7, extrapolates to a formula (CP): Cells-Processed= C.

The number of notable cells (cells with x's in them) processed by the X7, extrapolates to a formula: Notable-Cells-Processed (NCP) = N.

The lower the percentage of cells that have x's in them, the more of a processing time advantage there is for the V4 compared to the X7. The higher the total number of cells in the table, the more of a processing time advantage exists for the V4 compared to the X7.

The table processed in the V4 Background-Foreground Color Palette with Automated Cross-Correlations () page, contains 900 cells, of which 391 have x's in them. Therefore according to the formulas, the V4 would be expected to process this table in 47% of the time the hypothetical X7 would.

The V4 which processes only one foreground color, can be programmed to process details, which if processed by the all-foreground-color processing X7 would result in long processing times.

Foreground vs Background Colors are not the only things that can be cross-correlated. The things being cross-correlated, might be subject to change: which cell has an x could change, what columns are included could change; what rows are included could change. In the event of such changes: the V4 could update the table when a column is added to it, faster than the X7; the V4 could update the cross-correlations for a certain column faster than the X7, if there were changes in terms of which cells had x's in them.

 I continued my work on the V4 until it was able to correctly cross-correlate a foreground-color column, and also cross-correlate another foreground-color column adding the second cross-correlations ot the first. You could say my work producing the V4 Cross-Correlator, was like the 'Bridge Over the River Kwai'; but I think generally it's a good habit, to stick with something that is started until it is finished and functional. I learned things working on the V4, which can be applied to the production of an X7.


Chart showing differences in number of cells processed by V4 and X7 given various number of cells and notable-cells in tables processed.

May 28:
X7, V1 Background-Foreground Color Palette with Automated Cross-Correlations
(works with IE8, works partially in Chrome Version 35.0.1916.114 m).

This is the first version of the hypothetical X7 which is discussed in the previous May 23 entry of this blog-post.

While writing the program I encountered another deadly error that shuts down every program on the same JS sheet as the errononeous program. The offensive line of code:  headercolpackage=coltext+"<br>+"colpackage (error in red).

By way of contrast another mistake I made did not shut down every program on the JS sheet. The venial error was that the program got to a point where it had to assign a value to an element based on that element's assigned id, and that element had not been assigned an id. This error resulted in the program proceeding smoothly until it had to assign to an id that did not exist, and then it just stopped.


Saturday, May 17, 2014

Pageviews of My Blog All-time Global May 2014

Here is a page showing global all-time page-views for the top-ten nations in terms of origin of page-views of my blog, as of May 16, 2014:

May 2014 All-Time Pageviews at David Virgil's Blog

Tuesday, May 13, 2014

My All-Sports Calendar With Links to Personal Sports Logs

I became confused regarding which sport I practiced on which day. Reading through scribblings in spiral notebooks, & looking at seven different personal sports logs (running, swimming, weightlifting, basketball, soccer, baseball, tennis) and then integrating them mentally, have been inadequate methods. I needed a better record of which sport I practiced on which day in order to better plan my practices. 

So I produced:

In the future I will post links to such monthly calendars here. 

This calendar should be useful for anyone following along.

The CSS & the HTML in this calendar are notable for the result produced, which allows for highly-controlled sophisticated record-keeping involving a minimal amount of work & technological sophistication.

Labels: , , , , , , , , , ,