per page, with , order by , clip by
Results of 0 - 1 of about 0 (0.000 sec.)
Sometimes eccentric, often inconspicuous
@digest: 0dacd268269e4106c4592b0a0c313730
@id: 1451
@lang: en
@size: 8116
@type: text/html
content-type: text/html; charset=UTF-8
viewport: width=device-width, initial-scale=1
#keywords: weirdonnstat (28223), weirdonnfilename (21167), weirdoffstat (21167), weirdofffilename (21167), timenow (21167), eccentric (19520), switched (16883), define (16406), colours (15455), inconspicuous (14647), weirdoff (14536), randomfactor (14536), switchperiod (14536), fractionweird (14536), mtime (14536), weirdonn (14536), default (13938), colschem (13013), colour (12197), stat (11853), cookie (11513), crazy (11255), designed (11091), modification (10881), explicitly (10539), surprise (10356), scheme (9894), function (9484), setting (8898), aesthetic (7815), weird (7760), complaints (7498)
Sometimes eccentric, often inconspicuous 14 July 2013 Whatever you prefer Already since 20 November 2002 , the eccentric, crazy, weird, unethical and irritating colours on my website are switchable. Website visitors can click a link that is present in many but not all pages, to indicate that they'd rather have quiet, dull, normal , acceptable, aesthetic colours. Then a cookie is set to remember their preference. Especially for me, the only person in the world who likes the crazy colours, because I personally and specially designed them, there is also a link to establish a preference for eccentricity . (Press F5, or a similar button that works in your browser, to make the choice effective, by having the page reloaded.) Today on 14 July 2013, I added a third possibility, only here in this article for now, to reset (i.e. remove) the cookie. Technically, that works by setting the cookie with an expiration date in the past. Default The question that remains is, what do people get when they don't explicitly say want they want, or if they'd rather not have any cookies set? Until 26 August 2011 the default value was: crazy colours. I got complaints, and I decided to make boring and flat the default. But due to some rather stupid choices in 2002, strangely, it wasn't easy to change that. Eventually, I succeeded. I wrote about that episode in this article . Only in Dutch and no English translation is to be expected, because the story was intimately tied to some Twitter encounters in Dutch. So the default was then the quiet colours, but I changed my mind back and forth several times after that. Time switched Then on 21 April 2013 I got this idea, that I implemented two days ago (12 July 2013): part of the day, say 33%, those without a preference would get my website as it was designed, with the wild colours. The rest of the day, boredom would strike again. The period over which this is switched is 7 hours, for example, deliberately chosen such that 24 is not a multiple of that period, so that the hours with the weird colours gradually shift over day and night in the course of weeks. To strengthen that effect, some randomising is involved in the calculations. That's about all I have to say about it. The rest of it, in case anybody is interested, which would surprise me, can be found in the source text of the function I added to the existing little C program. I publish that function hereinbelow. Source code /*********************************************************************** This function was added 12 July 2013. The idea is that those who did not click a link to explicitly ask for either weird or dull colours, will get weird colours some 33% of the time, and dull colours the remaining 67%. This is switched in an approx. 7 hour scheme, so it traverses slowly through night and day. Exact switchover times are severely randomised to get a surprise element into it. To make it efficient, the program does not read data from the status files WeirdOnn and WeirdOff, but instead only enquires (using the 'stat' function) about their latest modification date. That's why there are two different status files, instead of only one with a yes/no content. The file that was most recently updated/recreated ("touched") determines which colour scheme the website visitor will get to see. Users who clicked a colour link and had a cookie set, will not be affected by all this. They always just get the colour scheme they prefer and asked for. ***********************************************************************/ static char *WeirdOnnFilename = "colschem/WeirdOnn"; static char *WeirdOffFilename = "colschem/WeirdOff"; #define DRAND() ((double)random() / (double)0x7fffffffL) #define SRAND() (srandom((unsigned long)(getpid() + getppid() + time(NULL)))) /* Parameters, all times in seconds */ #define FractionWeird 0.33 #define RandomFactor 0.45 #define SwitchPeriod (7L*60*60) #define CoolingOff (SwitchPeriod * FractionWeird * (1.0 - RandomFactor)) int VariableInTime (void) { struct stat WeirdOnnStat, WeirdOffStat; time_t TimeNow; FILE *fp; int Weird; if (stat(WeirdOnnFilename, &WeirdOnnStat) != 0 || stat(WeirdOffFilename, &WeirdOffStat) != 0) { /* Initial create of two empty colour setting control files. They're empty because only the stat data (modification date) matters. */ fp = fopen(WeirdOnnFilename, "w"); if (fp) fclose(fp); fp = fopen(WeirdOffFilename, "w"); if (fp) fclose(fp); } if (WeirdOnnStat.st_mtime > WeirdOffStat.st_mtime) { Weird = 1; /* Don't filter, so display weird colours */ } else { Weird = 0; } /* Is it time to switch over? */ time(&TimeNow); if ((Weird && (TimeNow - WeirdOnnStat.st_mtime Copyright © 2013 by R. Harmsen , all rights reserved. Nederlandse vertaling Software reviews and tips This site's front door Colours: Neutral Weird No preference Reload screen ... - [detail] - [similar]
Powered by Hyper Estraier 1.4.13, with 1768 documents and 82864 words.