Warning: file(milov_entryform.tmpl.php) [function.file]: failed to open stream: No such file or directory in /home/milo/domains/milov.nl/public_html/class.template.inc.php(282) : regexp code on line 1

Warning: implode() [function.implode]: Invalid arguments passed in /home/milo/domains/milov.nl/public_html/class.template.inc.php(282) : regexp code on line 1
milov.nl: by category: coding

49-96 of 222 entries in category 'coding'
pages: 1 2 3 4 5

1. posted by huphtur at 16:12 on April 04, 2005

disabling styles on the clock example gives an interesting design

2. posted by Mathieu 'P01' HENRI at 22:57 on April 13, 2005

o__Ô interresting indeed. It looks like a binary clock. I nether thought to disable the CSS before.
add a comment

1. posted by Calm_Pear at 12:53 on March 08, 2005

he! :-) lol... but I'm not using apache and the link is down too... ;-)

2. posted by Calm_Pear at 12:55 on March 08, 2005

3. posted by Milo at 14:05 on March 08, 2005

Strange, the original is working fine for me...
Anyway, the trick amounts to adding the following three lines to your .htaccess file:

SetEnvIfNoCase Referer ".*(word1|word2|etc).*" BadReferrer
order deny,allow
deny from env=BadReferrer

4. posted by Mathieu 'P01' HENRI at 15:26 on March 08, 2005

Why would people make their stats public ? o_Ô

I doubt it really interrest someone else but the admin of the site, and it exposes their site to referrer spam.

5. posted by Milo at 15:29 on March 08, 2005

I dunno, I kinda like seeing referrers at other sites... Also, referrers for specific weblog entries can be an interesting source of more information.

6. posted by Mathieu 'P01' HENRI at 15:48 on March 08, 2005

Indeed. And your site is a great example of that. Have you ever had a case of referrer spam ?

BTW, I've got tricked 1 or 2 times by your referrer box when I checked the referrers in my stats. I clicked on a link and shazaam the URL of my stats appeared in full on your site :p Oops

7. posted by Milo at 15:51 on March 08, 2005

Yeah, that's tricky... ;)
I am getting hundreds of attempts at comment- and referrer-spam every day. I filter a lot of it via php but this new .htaccess-based method saves some cpu-power.

8. posted by huphtur at 16:00 on March 08, 2005

what about using trackback and/or pingback?

9. posted by Milo at 16:02 on March 08, 2005

I have never seen a useful trackback or pingback.

10. posted by Roel at 22:09 on March 08, 2005

The new Nucleus referrer plugin checks the referring webpage to see if there is really a link to your site. That is a very solid way for verifying if you are(n't) dealing with spam (though links accessed through a webmail or online rss aggregator cannot be verified).
http://www.rakaz.nl/nucleus/item/57

11. posted by Mathieu 'P01' HENRI at 22:27 on March 08, 2005

It could be a kind of magic bullet if in case of a fake referrer it send for approval an updated version of the .htaccess to the admin to filter referrer spams from/for similar domains.

However I fear such plugin put the server into a crawl during a spam fiesta with dozens/hundreds of spam attempts per minute.

12. posted by Jan! at 19:23 on March 09, 2005

Actually, Roel, that still doesn't provide fool-proof protection. All it takes is one smart enough spammer to keep a bucket of [ip] => [hostname1..hostnameN] translations and dynamically insert a link to all hostnames for the IP doing the request.
add a comment
How to display <ul> elements as a flat comma-separated list (now in effect in the main menu and links list in the left-hand column):
ul.links { list-style: none; margin: 0; padding: 0; }
ul.links li { display: inline; }
ul.links li:after { content: ","; } 
ul.links li:last-child:after { content: ""; }

The advantage of this is that changing the default separator from a comma to | or - or whatever now means only having to change one character in the stylesheet.

Note: Internet Explorer doesn't support the css content attribute or :after and :last-child pseudo-classes, so the commas won't appear in IE.

1. posted by Low at 23:06 on January 12, 2005

This seems to be working in Firefox (that is to say, I just checked it with edit-css ^_^):

ul.links li:after { content: ","; }
ul.links li:last-child:after { content: ""; }

Now the commas aren't part of the hyperlink, which I prefer. :)

2. posted by Milo at 23:09 on January 12, 2005

Good point! That's what I was going for actually :)
I've updated the code sample (and my stylesheet).

3. posted by Low at 23:16 on January 12, 2005

I'd even consider using...

ul.links li:last-child:after { content: "."; }

...because of all the commas. I think it looks better with a full-stop at the end. But hey, that's just me.

4. posted by Anne at 08:02 on January 13, 2005

In that case you could even make it more fancy, work with ::before and add a & just before the end or 'and'.

5. posted by Milo at 09:02 on January 13, 2005

Hmm, I don't think either a '.' or an 'and' are fitting here, since this is not really a sentence, just a listing. I mean, "experiments and random", whazat??

6. posted by Milo at 11:17 on January 13, 2005

By the way Anne, to make your idea work, won't I need some sort of :second-to-last selector to prevent the comma appearing before the "and"? (note the 'Related categories' list, I just tried it there)

7. posted by Arve at 12:07 on January 13, 2005

ul.links li::before { content: ","; }
ul.links li:first-child:before { content: ""; }
ul.links li:last-child::before { content: " and "; }

Example output:

One, two, three and four

8. posted by Milo at 12:15 on January 13, 2005

I considered that, but it actually results in

One ,two ,three and four

which is not quite the same.

9. posted by Frenzie at 13:13 on January 13, 2005

It wouldn't appear as

One ,two

but as

One,two

which would be easy to solve by

content: ", "

10. posted by Milo at 13:58 on January 13, 2005

It'll always look like "One, two" or "One ,two" unless I remove all whitespace from between the <li>-elements (which I don't intend to do), or "white-space-collapse: discard;" was actually possible. http://fantasai.inkedblade.net/style/specs/css3-text/scratchpad

11. posted by Low at 14:04 on January 13, 2005

> unless I remove all whitespace

I was gonna say that; you beat me to it. Anyway, if you _would_ remove the whitespace or if the css3 rule would work, my vote would go out to:

ul.links li:before { content: ", "; }
ul.links li:first-child { text-transform: capitalize; }
ul.links li:first-child:before { content: ""; }
ul.links li:last-child:before { content: " and last but not least: "; }
ul.links li:last-child:after { content: "."; }

I was going for something like "ul.links li:first-child:first-letter { text-transform: uppercase; }", but that didn't work.

:)

12. posted by Milo at 14:12 on January 13, 2005

Strange, trying to make your last example work, I thought

ul.links li:first-child a:first-letter { text-transform: uppercase; }

*would* work, but it also doesn't.

13. posted by Low at 14:40 on January 13, 2005

Yeah, tried that too...

14. posted by Mathieu 'P01' HENRI at 14:53 on January 13, 2005

ul.links:first-letter { text-transform: uppercase; }

works ;)

15. posted by Anne at 15:22 on January 15, 2005

Quite bad that you can't locate my favicon Milo ;-)

Re #6, I'll post an example later if I can get it to work.

16. posted by Milo at 15:40 on January 15, 2005

Re: http://annevankesteren.nl/img/favicon.png
Your favicon is black-on-transparent, and too large (32x32) to be visible as a background-image in your name-link, meaning it won't even show now that I've fixed the detection! :)
add a comment

1. posted by Mathieu '¨P01' HENRI at 13:35 on December 16, 2004

^__^ the world is small. Glad to be in your quicklinks.

2. posted by Jan! at 16:10 on December 16, 2004

Nice one, Mathieu!

3. posted by Milo at 17:32 on December 16, 2004

Glad to quicklink you, anytime :)
I just tried the Zoom bookmarklets at http://milov.nl/703 on it, it even works when zoomed in!

4. posted by Mathieu 'P01' HENRI at 18:03 on December 16, 2004

Thanks.

Afair there's a little ( and certainly ridiculouslty easy to fix ) bug then you die in IE.

Milo: no need to use your bookmarklet there's an alternate stylesheet to zoom it by 2 ;)

5. posted by Milo at 18:14 on December 16, 2004

Cool. Why not set that one as the default?

6. posted by nowak at 21:49 on December 16, 2004

full circle.

As an aside, there needs to be a 2005 256b compo. I miss those.

7. posted by Mathieu 'P01' HENRI at 22:18 on December 16, 2004

nowak: yep! at the time Mados asked me if I were ok to organize a 256b.htm contest but I declined as I would forbid myself to submit a prod :p

Milo: indeed the zoom x2 stylesheet is more playable :p
add a comment
read more »

1. posted by Calm_Pear at 23:22 on December 08, 2004

SET? thats odd... thats a syntax for an UPDATE... It looks like the guys that are working on MYSQL are becoming more like the microsoft people... any idiot should be able to get some data in the database... not good if you'd ask me

2. posted by Milo at 00:26 on December 09, 2004

I do like the syntax though... Less work to add or remove fields to or from a query.

But using it might be tricky, since it's only "supported in MySQL 3.22.10 or later".

3. posted by Low at 10:07 on December 09, 2004

I repeat: wha-hey!

4. posted by Ruben at 21:24 on December 09, 2004

"Any idiot" indeed. I tried that once in SQL, years ago.

5. posted by Kethinov at 22:40 on December 09, 2004

You're welcome, Milo. ;)

6. posted by Milo at 22:48 on December 09, 2004

Aint it great how when one person looks at someone else's code, both can learn something new :)

7. posted by digi at 15:35 on August 11, 2006

why would you think there is anything wrong with that syntax? This makes it much easier than INSERT INTO VALUES, you don't have to count through each of the values fields to find the value that corresponds to the column, this is a great syntax addon.

8. posted by the hatter at 12:36 on October 28, 2006

We think there's something wrong with this syntax because it is not part of the SQL specifications, as far as I can see. Not that language extensions by themself are a bad thing, but one that replicates an extraordinarily well known method seems silly. Most people use DBs through a language API, if you want to write nicer queries, there's nothing to stop someone adding this sort of extension to their API.

9. posted by Plague at 05:52 on April 30, 2007

this is in the 'INSERT' doc on mysql offical pages...

this makes it easyer to do loops on the values and their names... ie. php's foreach(), instead of having 2, the names and values seperate, you can now just do 1 loop seeing that the names and values are right next to each other.

this also makes reading and matching the things a hell lot easyer...

you can now tell if you have 6 names but only 5 values, without counting them all :P

10. posted by Takashi.pl at 14:21 on July 25, 2007

well, this syntax sure makes thigs easier to code in php etc., and that's a big plus...
but I think you can only use this syntax if you are sure that your code won't be used under diffrent db engine

11. posted by JVirus at 16:54 on March 31, 2008

This is a nice way and works well. 1 word of caution though, if you want your code to be more universal I would stick to the INSERT INTO and VALUES since this will work both in access and SQL. Obviously most of you will be like, WHAT! ACCESS?!?!?!? But for my company our development is in access then we port that to SQL, I know... I dont have the power to make them change, but for any visitors that might be in the same boat, just a good thing to remember.

12. posted by Liam at 07:57 on May 05, 2008

I have to second JVirus on that. I've just been working on porting some MySQL code to use PostgreSQL, which uses the standard syntax. Using syntax specific to one vendor, when there's a standard that achieves the same thing, is not the smartest move.

13. posted by Liam at 07:59 on May 05, 2008

Also worth noting while I'm dealing with the pain of porting from one DB to another - don't use MySQL's double quotes for strings - not standard, not portable, not good :(

14. posted by gmail.com,tushar.iuselinux,Tushar Mahajan at 08:14 on September 17, 2009

Using first option we can insert multiple values LIKE

INSERT INTO sometable
( field1, field2, field3 )
VALUES
( 'value1', 'value2', 'value3' ),
( 'value1', 'value2', 'value3' ),
( 'value1', 'value2', 'value3' );

15. posted by ME at 17:20 on October 26, 2009

I just started a new job and ran across this in some code today. I've worked with various dbs over the year but never knew of this syntax. It disgusts me since it's not the standard. However, I will say it seems more logical and nicer looking. I'm still not going to adopt it though.

16. posted by Nilesh Gupta at 05:33 on November 22, 2009

this patern is very good for using OOps
i like this patertn to using this commands insert into table_name set fieldname=value it is a very good type of this

17. posted by superdude at 10:05 on May 25, 2010

While I agree about standards, I think that if the query will only be used on MySQL, it is perfectly valid. If you are working on a larger project that might be used with various DBs, you should probably be using some kind of DB abstraction layer that takes care of the details for you.

18. posted by sousgarden at 14:06 on October 12, 2010

This function is crap.
I have code now (not my) which have to work on mysql 5.1, previous DB was 5.0.
If I try now to insert with an auto-increment primary I get an error. Cause the coder was sooo an idiot and make following insert:
INSERT INTO table SET COL_PRIMARY="", COL_TEXT1="blabla";
And the primary column now try to insert NULL what not work and have NOT to WORK!!!!!
That this shit work before was not good.

19. posted by justDroppingBy at 05:38 on November 22, 2010

@sousgarden: this code is a good way of inserting values in a table; faster and easier.

My question is, why would you insert a value to an AI column? AND whether you use the old code or this to insert a NULL value in an AI column it'll still give you errors.

20. posted by erdincgc at 14:14 on March 15, 2011

sousgarden:
The first thing you need to learn ; be polite!
The second ; In both syntax you'd better stop setting any Autoincrement field. Your table's index field's auto increment parameters might be wrong i guess. And about the insert into thing; useful for small queries if it's not slower (is it?).

21. posted by ferdly at 17:28 on April 01, 2011

Calm_Pear says, "any idiot should be able to get some data in the database... not good if you'd ask me"

Well, this is the quintessence of the 'feature enhancements are a threat to my job' mentality.

How about you imagine how much easier it will be to dynamically construct and validate INSERT statements within a Database Abstraction Layer that makes your skills even *more* valuable?

22. posted by ferdly at 17:54 on April 01, 2011

Furthermore... I think this syntax *should* be added to standard SQL, along with "INSERT... ON DUPLICATE KEY UPDATE" these are natural and intrinsic *database* tasks, not API tasks... why the 1992 folks didn't see that clarity and elegance of making the UPDATE syntax and INSERT syntax as parallel as possible, *then* adding the standard syntax as a 'power load' alternative is beyond me.

I respect those that refuse to use any proprietary SQL constructs for portability -- and those that choose to use proprietary constructs have an added documentation obligation to identify where those constructs were used for eventual portablity. But for me I would rather endure one-time, upfront documentation task and leverage the power of the proprietary construct continually.

I also believe that *using* the best alternative sql constructs make it *more* likely that there will be a 'critical mass' behind eventally including them in the standard.

Further, 'disgust' with MySQL? MySQL is not the only vendor deploying alternative SQL constructs -- I think Oracle has an equivalent to "INSERT... ON DUPLICATE KEY UPDATE" that is proprietary, and MS SQL has a great number of these -- this is further muddied by the fact that by co-opting in the popular consciousness that "SQL" is not a Language, but a product of Microsoft Corporation. (Admittely, it would seem Microsoft has done the best job with Cross-Tabs, but I dunno much there?...)

Not a Flame against MS SQL or any other, so don't scorch me back :-) -- just pointing out that whatever tool you use, you need to be aware of what code will be universally portable and what will not.

Happy coding...

23. posted by mctsoft.net,matt,Matt at 10:06 on July 20, 2011

I must be an idiot, I like it, I like anything that makes life easier, I guess if I was smart I would write all my code in assembly instead of PHP and MySQL

24. posted by Ivan Ivkovich at 14:09 on September 15, 2011

The reason this was implemented :

After altering the table, you have to edit every single webpage containing query with 'INSERT INTO table VALUES' because you have to add '' if there is a new collumn in every query.
If you have SET to a specific column, you don't have to worry about the columns you won't fill with data.
add a comment

1. posted by Milo at 21:21 on December 07, 2004

Looks a lot better than my own hacked together code.

2. posted by Milo at 22:08 on December 07, 2004

...but I'll stick with it anyway since I can't get this one to work for some reason.

3. posted by jpk at 22:10 on December 07, 2004

Hehe, funny. I made my own version last friday and just put it up on my site, and now he posts his code and i can't get it to work!

4. posted by Milo at 22:24 on December 07, 2004

One difference: I'm using http://php.net/fsockopen instead of fopen. Also, I don't do a second request to see if the favicon url returns a valid response.

5. posted by Low at 22:43 on December 07, 2004

Wha-hey! :)

6. posted by Arthur at 12:10 on December 08, 2004

Made a quick 'n' dirty testing page with this code, and it seems to work:
http://arthur.kamst.com/test.php?url=http://milov.nl/

7. posted by Milo at 12:18 on December 08, 2004

The problem is it seems to randomly work/not work on each refresh... I noticed the same thing when I tested the function locally.

8. posted by Arthur at 13:43 on December 08, 2004

Yep... weird. Unfortunately, my knowledge of PHP is just beginning, so I don't expect to solve this soon...

9. posted by jpk at 15:12 on December 08, 2004

hmm, I tried it again and now it works. Woohoo, I'm hip!
add a comment

(unfinished) code dump 

sparks
Drag a pattern with left mouse button to make "sparks" appear. Animation is created by cropping, moving and fading one single .gif circle.
sen9 aka three-letter-poet
Mouse movements generate random three-letter-strings. When it hits an actual existing english three-letter-word, the word is added to the main sentence (click to start a new sentence).
sticky drag blocks
Drag-and-drop collision-detection experiment.
bgrotate
Multiple layers of a simple pattern rotating at different speeds (runs a lot faster in IE than in Firefox).
slanty
slanty2
Trying to do something interesting with css border slants. Update: broken in IE at the moment.
zllm
zllm2
Attempts at a shrinking zoom-effect by applying smaller and smaller relative (%) sizes...

1. posted by Mathieu 'P01' HENRI at 13:53 on November 20, 2004

I really like how you made the animation in sparks.

The sticky drag blocks and zllm2 are also really cool.

All these scripts would be a great addition to your IAMBALD serie.

2. posted by iname.com,mrmessiah,MrMessiah at 17:06 on November 20, 2004

Oh yes... zllm2 is great, especially if you trace your mouse round the edge of the screen in a circle.

3. posted by ACJ at 05:07 on November 21, 2004

Awesome stuff, Milo! I just love design/art experiments with code. I've started playing around with PHP, Python, SVG, XML, CSS, and PNG (and all sorts of combinations of it) for that kind of thing again recently.

4. posted by steven streight aka vaspers the grate at 09:44 on November 21, 2004

What words are BIS, KAF, and ROC? Not English as far as I know.

Do you like John Maeda's games? Try going to his web site www.maedastudio.com I think is the URL. Some nice games there.

5. posted by Kapp at 11:15 on November 21, 2004

Ecce Milo Vermeulen.

6. posted by adjam at 22:47 on November 21, 2004

hey milo!
this stuff is really cool!
i love it when u make this cool experiment and the circle stuff is definatly really cool ill look at its code sometime!

7. posted by toph at 05:35 on November 22, 2004

god sea ewe

8. posted by Kethinov at 18:02 on November 22, 2004

What is this stuff not doing at i.am/bald? Is it exclusively a java applet club now? :-\

9. posted by Milo at 18:30 on November 22, 2004

Basically, none of these are good/elegant/solid enough to become nr. 115 (although I'm now thinking sen9 could be if I clean up the dictionary some more).

By allowing myself to classify things as unfinished/dump, the threshold for release is a lot lower, and it's nice to get things out there in this form; I hope to do more posts like this.
add a comment
The PHP WTF

1. posted by Low at 09:23 on October 28, 2004

Interesting... What's your opinion on the matter?
add a comment

1. posted by Rob Mientjes at 11:51 on October 19, 2004

Wow, you really found that article _via_ me? Let's make this clear, it's all mine. So the via is somewhat strange. But the thing you link to is the article, so do whatever you like.

2. posted by Milo at 12:04 on October 19, 2004

There's two links here, they both point to your site; I don't see how it could be any clearer that it's all yours :)

I wanted the main link to point to the example, since your article only links to it with a tiny 'this' link that's easily missed. My [via] simply indicates the js document.referrer of the main link (it's filled automatically even).

3. posted by Rob Mientjes at 15:34 on October 19, 2004

It's okay. I just thought you assumed that I linked to some testcase page or something. To me, it's now clear enough too.
add a comment
Negative(!) text-indent is in effect in the quicklinks list (over there on the left of the front page). Handy... applying a style like padding-left: 10px; text-indent: -10px; to an element makes all lines of that element appear indented except the first one.

1. posted by Arthur! at 16:26 on October 12, 2004

That's exactly the style of referencing according to the APA (psychiatry crap) and I've been wondering how to implement that in HTML. Thanks for teh tip.

2. posted by Brent Dady at 09:17 on October 15, 2004

that's the sexiest non-flash interface thingy i've ever seen.
add a comment

1. posted by milov at 12:15 on September 15, 2004

Results for my own rss feed:

URL: http://milov.nl/rss.xml
[pass] The URL shouldn't redirect
[pass] If clients ask for compression, then provide it
[pass] Don't disable caching with Cache-Control
[pass] Supply a Date header, to indicate the server time
[pass] The server clock should be accurate ( < 10 minutes difference)
[FAIL] Use an Expires header to tell clients how often to poll
[ ] Expiry must be in the future
[pass] Last-Modified headers tell clients how often content is updated
[pass] The Last-Modified date must be in the past
[good] Provide an ETag
[pass] Provide Last-Modified or ETag, so clients can make conditional requests
[good] Feed size should be less than 64 KiB
[pass] Conditional requests, using Last-Modified and ETag, save bandwidth and reduce server load
[good] If-Modified-Since alone should be honoured
[good] If-None-Match alone should be honoured
add a comment

fixed width font in Gmail 

Does Gmail have a setting somewhere to make message text appear in a fixed width font? 'Cause if it does, I sure can't find it...

To force it to use a fixed width font anyway, I added the following to userContent.css in my Firefox profile:

div.msg div.mb {
  font-family: monospace !important;
  font-size: 12px !important;
}
(Firefox's 'View Selection Source' came in real handy trying to figure out these classnames; regular View Source is a pain on Gmail because the whole thing's Javascript-generated.)

1. posted by P01 at 23:19 on July 21, 2004

Per user style sheets have been popular these days.

Though the chances that that CSS rule may interfere with another site are small, I suggest you to try one of these extensions :

* URIid ( http://extensionroom.mozdev.org/more-info/uriid ) which adds an id of the form www.milov-nl to the body tag of every page you visit.


* MyOwnCSS ( http://www.raphinou.com/cgi-bin/myowncss/main.cgi ) does the same as URIid, except that the CSS are stored on an external server and shared between the users. In a way, it the del.icio.us of the CSS customization.


Notice, that I haven't tried them yet, but I gonna install URIid and give it a try.

2. posted by milov at 00:04 on July 22, 2004

Neato... And add these two extensions to really make the most of it:
http://extensionroom.mozdev.org/more-info/chromedit
http://extensionroom.mozdev.org/more-info/editcss

3. posted by P01 at 00:11 on July 22, 2004

Yep, EditCSS is a must.
damn, I love FireFox.

4. posted by milov at 00:18 on July 22, 2004

*sniff* I've known Firefox since it was just a little Phoenix, standing no taller than 0.1... It's certainly grown up to be one fine browser. http://milov.nl/1594

5. posted by huphtur at 09:48 on July 22, 2004

Web Developer Extension comes with it's own "Edit CSS".
http://www.chrispederick.com/work/firefox/webdeveloper/

6. posted by yahoo.com,rwoudsma,Woudloper at 09:16 on July 23, 2004

As I do not have a qmail account and I am a regular reader of your blog I would like to know what the use is of a 'fixed font size' for the mail?

And indead 'EditCSS' is a must for everyone who is editing (and doing other stuff) with websites!

7. posted by milov at 09:25 on July 23, 2004

Woudloper: It's not about the size, it's about the width. I like the characters in my mail to be evenly spaced; I'm used to that from way back, when every mail reader used a fixed width font, that way ascii art etc. doesn't get all squished together.

I even forced Outlook Express to use fixed width by setting its 'Proportional font' to 'Courier New'.

8. posted by yahoo.com,rwoudsma,Woudloper at 11:50 on July 23, 2004

milov: you are absolutely right. I was reading 'size' in-stead-of 'width'. My mistake...

Does this fix (or tweak) also works for HTML email messages or did you set your presence (if that is possible within QMail) to ignore HTML messages?

9. posted by Mathieu 'P01' HENRI at 12:22 on July 23, 2004

fixed font size is a must to make CODE pasted as is in the body of emails readable. Not to mention, in text editors. Damn, it always scares the s**t out of me when I see some body using a proportionnal font in a text/code editor.

10. posted by gmail.com,gillamhall,g. at 03:52 on August 26, 2004

used your code above in Firefox's serContent.css with no luck (Mac OS X, Firefox 091). Idea as to what I could have done wrong? Seemed so straightforward ...

11. posted by gmail.com,crazymagsters,Maggie at 18:17 on May 20, 2005

i waz just wondering how can u change the color or size or font of the typing if u no plz email to me how crazymagsters@gmail.com

12. posted by gmail.com,sysprv,ohshady at 08:18 on October 07, 2005

Just thought I'd give something back :-)

http://lists.w3.org/Archives/Public/www-style/2004Aug/0135.html

@-moz-document url-prefix(mail.google.com/mail/), domain(mail.google.com)
{
div#rc {
display: none !important;
}
font, div#mb_0 {
font-family: monospace !important;
font-size: 12px !important;
}
}

13. posted by ohshady2 at 06:50 on November 12, 2005

We can do much better;

@-moz-document url-prefix(mail.google.com/mail/), domain(mail.google.com) {
/* the cell that contains the message, utils, ads */
td#fi {
padding: 0px 0px 0px 0px !important;
}
font[size="-1"] /* print view */, div#msgs /* conversation view */ {
font-family: monospace !important;
font-size: 1.2em !important;
}
}

14. posted by orcon.net.nz,hl,Hugh at 02:45 on December 02, 2005

Re: oshady2,

Thanks for the great code! How would one go about getting the composition textarea to also display in monospace?

Thanks again,
Hugh. ;)

15. posted by mash at 16:51 on December 06, 2005

Very useful modification. I have had trouble making this work. I have copied the relevant text and used the mozilla chrome editor extension to insert it (I've tried both userContent.css and userChrome.css) but to no avail.

Do I need to tell Firefox to check these files?

Is the code still working for you all?

16. posted by orcon.net.nz,hl,Hugh at 07:10 on December 09, 2005

Hi,

Yes it still works for me. Try editing the files manually:

Go to Start > Run and type "%AppData%" without the quote marks.

Navigate to \Mozilla\Firefox\Profile\Chrome and edit/create userContent.css, filling it with the code in post #13 above.

Hope this helps,

Hugh. :-)
mailto:hughlilly##NOSPAM@GMail##NOSPAM.com

17. posted by gmail.com,prehor,Petr Rehor at 17:11 on December 24, 2005

Thanks for your idea. There is my userContent.css:

@-moz-document domain(mail.google.com)
{
body,td,input,textarea,select,button {
font-family:verdana,arial,sans-serif !important;
}

.ab,.cd button {
font-size: 100% !important;
}

.mb {
font-family: monospace !important;
font-size: 100% !important;
}
}

18. posted by Stephan Walter at 21:40 on January 13, 2006

I played with the CSS a bit and came up with some code that also makes the compose window have a fixed-width font.

For easier cut&paste, get the code from

http://stephan.walter.name/Gmail_CSS_tweaks

19. posted by martynov.info,sergey,Sergey Martynov at 17:24 on November 24, 2008

There's a greasemonkey script, which adds a button in gmail interface and allows you to turn fixed font on and off easily: http://userscripts.org/scripts/show/37471

20. posted by essay writing at 16:01 on October 18, 2010

"Does Gmail have a setting somewhere to make message text appear in a fixed width font?" - It does!

21. posted by ,a,Eduardo at 08:10 on May 05, 2011

How would one go about getting the composition textarea to also display in monospace?
add a comment

1. posted by drunkmen at 00:03 on July 22, 2004

textarea {overflow:visible} is nice too in IE, used it in breedster.

2. posted by milov at 00:13 on July 22, 2004

Whoa.... That's cool.

3. posted by Calm_Pear at 10:27 on July 25, 2004

Whoa! that is very cool indeed...

4. posted by oLvMtFUHoaefbsrsg at 15:18 on June 05, 2008

tickets_5.txt;2;2
add a comment

1. posted by Ruben at 15:48 on June 25, 2004

Are you competing this time, Milo? If you are, good luck!
add a comment

1. posted by yahoo.com,ravi20nath,mada at 07:01 on September 28, 2005

need automatical sql output options
add a comment

using :visited and expression() to detect any visited link 

There's been some talk (see Anne, CollyLogic) about it being possible to use the :visited pseudo-class and background-image urls to detect if a user has visited a particular link.

Luckily for Internet Explorer users, they are unaffected because IE doesn't support the [href=] selector. Unfortunately, there's another method that does work in IE and is even more dangerous...
read more »

1. posted by Thiemo at 16:02 on May 26, 2004

What's so dangerous about this? You can do the same since HTML 1.0:

<a href="tracker.php?url=slashdot.org">

2. posted by P01 at 16:02 on May 26, 2004

It's possible too extract all the URLs of the HTML markup to create the corresponding CSS rules for the standard compliant browsers, and finally throw the HTML + the extra CSS rules to the client.

Indeed, if the tracker.php script goes recursively through the pages visited by the user it can reveal some really valuable infos ( imagine the extra incomes an ad system could ask if it implements that sort of sniffer ) and eventually set a breach for the sites using an authentication via the parameters sent in GET ( which is whatever, a security no-no ).

The violation of privacy could reach an higher scale if the spamming companies used that exploit ( if don't already do ) in their mails.

3. posted by milov at 16:07 on May 26, 2004

Thiemo, the big difference is is that with this technique, the visitor doesn't *click* on a link at all. Simply loading a page of links is enough to alert the site owner of which of those links the current visitor has visited before.

4. posted by Jan! at 16:12 on May 26, 2004

Also, if you're serving dynamic pages anyway, you can just as well add an id attribute to every link, and style it in CSS with: #link857456 { background: url(tracker.php?id=link857456) }

Apart from that, I don't get why everyone's upset all of a sudden when this has been known (and applied) for years.

5. posted by Thiemo at 16:20 on May 26, 2004

If a particular URL is in my browsers history or not does not mean anything. (What's important here: You can't read the history. Instead, you have to know the URL first!) Turn off your internet connection if you are afraid of being tracked.

6. posted by milov at 16:36 on May 26, 2004

Jan!: You're right, with a dynamic site this whole expression() trick isn't really needed. And I wouldn't say I'm 'upset' or worried, just disappointed I didn't discover this cool (and indeed rather obvious) trick earlier ;)

7. posted by Andrew Clover at 12:32 on May 27, 2004

Indeed known about for some time. I mentioned this issue in a post to Bugtraq a few years ago:

http://www.doxdesk.com/personal/posts/bugtraq/20020214-css.html

There is no obvious good solution.
add a comment
POVRay Short Code Contest - scene files of 256 bytes or less for the POVRay raytracer. [via Metafilter]

1. posted by P01 at 06:36 on March 29, 2004

Truly amazing.

2. posted by Jeroen at 00:33 on March 31, 2004

wow

3. posted by absolut at 14:42 on April 09, 2004

Superb!
add a comment
A checklist of i.am/bald numbers I really should update since they don't work or no longer work in Mozilla Firebird (my default browser for over a year now):

10, 14, 20, 23, 25, 26, 28, 30, 31, 33, 34, 35, 36, 37, 39, 40, 42, 44, 45, 46, 49, 50, 51, 55, 56, 57, 62, 65, 66, 67, 69, 71, 72, 73, 74, 77, 79, 90, 92, 94, 95, 96, 97, 98, 99, 102, 108, 109, 112, 113.

1. posted by adam at 09:25 on January 14, 2004

You got heaps of work to do, mate.
add a comment

integrating javascript into stylesheets 

Ben Nolan's non-link element hovering trick for Internet Explorer (that normally only allows :hover styles on links) is pretty handy, but what really impressed me about it is his way of integrating arbitrary Javascript functions into the stylesheet itself:
body {
  background: url("
    javascript:
      document.body.onload = function(){
        ...custom js here...
      }
  ");
}
By specifying a rule like this in the browser's user stylesheet, it might even be possible to run a custom set of Javascript commands on opening of any visited website. (Although my brief attempt at making this work proved unsuccessful.) [via webgraphics]

1. posted by Ruben at 13:26 on January 07, 2004

It is really interesting indead. I already read the discussion thread in the forum of Tweakers.net, see:

http://gathering.tweakers.net/forum/list_messages/831654/last

The interesting part is that it is somehow specified in the W3 specs of CSS2, see:
http://www.w3.org/TR/REC-CSS2/generate.html#content
http://www.w3.org/TR/REC-CSS2/media.html

2. posted by Richard Soderberg at 01:01 on January 13, 2004

The spec also specifies that "Generated content does not alter the document tree. In particular, it is not fed back to the document language processor (e.g., for reparsing)".

It seems IE is ignoring this directive, which I think is right.

3. posted by Richard Soderberg at 01:13 on January 13, 2004

IE is right, that is. Not the directive. I think the directive is shor-sighted and limiting -- but in the face of embedding active content in CSS, well, maybe I can see their point of view.

4. posted by bob at 17:51 on May 27, 2006

cool

5. posted by A to Z of World at 10:32 on January 15, 2007

I did try it and indeed is handy. But as expected I'm not finding a situation to put it in real time usage as I rarely need something which works only with IE :)

6. posted by hotmail.com,ddrmax4ever,Derek at 17:48 on January 18, 2008

i cant seem to make it work for the way i thought of. I was trying to embed onmouseover and onmouseout functions to work. Anyone is willing to give me insight?Just send me an email, thank you
add a comment
114.milov.nl - a starry mouse-driven snowflake generator of sorts, made with Processing. Simply drag your mouse over the applet and watch the patterns form. (But don't stare at it for too long or you'll see it every second you close your eyes; believe me, I know.)

I'm so used to thinking in layers (dhtml mindset) that it's always a nice surprise to be able to move thousands of pixels around in a Java environment.

1. posted by low at 20:52 on November 29, 2003

Wow!

2. posted by Martijn at 21:10 on November 29, 2003

Space! Very cool!

3. posted by 990000 at 08:50 on November 30, 2003

very cool

4. posted by Maarten at 14:37 on November 30, 2003

Cool! I like it!

Btw, I think I found a small bug. When you click outside the window and move you mouse in the window again, there is a fat line in the lower part of the screen.

5. posted by ACJ at 18:21 on November 30, 2003

Nice.

6. posted by elout at 18:24 on November 30, 2003

nice milov.. wondering how this would look in 3D.
And its good to see you on the p5 board as well.

7. posted by Man at 22:44 on November 30, 2003

Heel mooi!

8. posted by palla at 05:25 on December 01, 2003

!!!

9. posted by emarquetti at 11:12 on December 01, 2003

Ja nice... nice....

10. posted by P01 at 17:43 on December 01, 2003

Nice SnowFlake homage.
I'm absolutely not in Java nor Processing, but 71Kb seems HUUUUUGE for that. Is there some way so optimize the size ? AFAIK Java applets can be compresser in RAR or JAR, but the this new iambald entry is already in .JAR

I had already seen some Processing applets, and it seems powerfull and extremely easy to use.

Does anybody have some infos about size optimization/compression in Java or Processing ? The official site provides little informations about that >__<

11. posted by milov at 17:51 on December 01, 2003

It's true that 71KB is way too big. If I rewrote it in pure Java the jar-file would probably be no bigger than a few KB.

The Processing Export-to-web works by including a bunch of standard classes in the jar-file. I was surprised by the size as well; it was actually more than 100KB before I removed some obviously unnecessary classes.

12. posted by aol.com,lovekillslegacy, nancy loveless at 19:01 on December 24, 2003

youre website would be cool, lots of info and all, but tragically boring. zing it up, man!

13. posted by aol.com,lovekillslegacy, nancy loveless at 19:03 on December 24, 2003

youre website would be cool, lots of info and all, but tragically boring. zing it up, man! -nancy

14. posted by dotti at 06:02 on January 18, 2004

WOW...I LOVE DOTS MOVING AROUND...i was named after dots...

15. posted by dotti at 06:03 on January 18, 2004

they remind me of my freckles

16. posted by hahaha at 06:04 on January 18, 2004

skrew me dots

17. posted by dotti at 06:05 on January 18, 2004

and some of my pimples

18. posted by dotti at 06:05 on January 18, 2004

well actually all my pimples

19. posted by scott at 22:53 on July 26, 2004

sweat!

20. posted by pajil at 19:31 on December 29, 2004

Thank You! What a beautiful diversion, especially at this holiday season, when I really don't want to be at work in the first place.

21. posted by zero at 11:11 on May 15, 2005

Geogaddi

22. posted by choi at 02:05 on May 20, 2009

mooi hoor
add a comment
Pixel Snow at db-db.com - a real-time video tracking program coded on the Processing environment to create a simulation of snowing. [via Low]

bookmarklets voor webdesigners 

Naar Voren - bookmarklets voor webdesigners - my second Naar Voren article has been published! (the first one being de kunst van minimaal coderen, which coincided with the 5K contest last year.) Those of you that can't read Dutch might want to scroll down a couple of pages, where you'll find a big list of handy bookmarklets.

I quickly thought up a new bookmarklet to use as an example in the article; as it turns out, it's pretty handy:
count used tags (drag to Links-bar)

The other article in the current edition is Breng detail aan in je markup by Anne van Kesteren. Coincidentally we both refer to Simon Willison in our articles... :)

1. posted by Morg at 16:39 on November 03, 2003

Very Nice!

2. posted by low at 18:42 on November 03, 2003

Well done!

3. posted by P01 at 06:42 on November 04, 2003

I like your 'count used tags' favelet. I can't figure how it can be usefull unless it showed the number of opening & closing tags, but it's funny.

4. posted by Ruben at 08:05 on November 04, 2003

Mijn complimenten, Milo. Ik heb er ook een aantal collega's blij mee kunnen maken :-)

5. posted by milov at 10:45 on November 04, 2003

P01: I like using it for testing tag-soupiness of a page. And some numbers can be pretty surprising ('277 a-tags? wow!')

6. posted by JW at 10:52 on November 05, 2003

Added a few new bookmarklets to my bookmarklet bar, the others, I already had.

Good article though.

7. posted by Jim at 20:40 on December 27, 2003

nice article

8. posted by Jim at 20:41 on December 27, 2003

nice article
add a comment

the house that css built 

3D Border Demo 2 - LEGOish drawing of a house, built entirely using css borders. Impressive! Made by Design Detector. [via DeWalick.com]

1. posted by Kethinov at 05:52 on October 18, 2003

Wow! Looks like something that should be on i.am/bald

2. posted by huphtur at 17:55 on October 18, 2003

yeah, whatsup milov, we slackin?
just kidding. dont hit me!

3. posted by bas at 00:22 on October 26, 2003

OMG that's fast...
If this is possible...
why is the internet so slow...

4. posted by yahoo.com,saintjulian,Saint Jude at 04:47 on December 12, 2003

That really is most inspirational.
add a comment
Speaking of stylish <ul> listings, check out IF THEN ELSE (who also caught the redesign bug this week)'s take on it; scroll down a bit and hover over the leftside menus. By already showing a tiny border in the default link state, and increasing the border size on hover, it looks like LEDs lighting up. Pretty colours!

Update: check out his newly added HOW-TO.

1. posted by Ruben at 17:09 on October 14, 2003

Caught, milo, caught.

2. posted by milov at 17:26 on October 14, 2003

Hey I don't mind if he copied my idea, he made it look much better anyway :)

3. posted by Ruben at 17:39 on October 14, 2003

Not exactly what I meant. I was talking about your typo :-)

4. posted by milov at 17:48 on October 14, 2003

Argh. That's what I get for quickly trying to write a post (and post a comment) while at work.

5. posted by Ruben at 11:34 on October 15, 2003

Some people get fired for blogging at work.

6. posted by milov at 11:43 on October 15, 2003

You're not speaking from experience, I hope? Maybe webdesign companies are less strict about it than insurance companies.

7. posted by Ruben at 17:19 on October 15, 2003

Oh, I don't blog at work. I only comment at work :-)
add a comment
svendtofte.com - max-width in Internet Explorer - using the IE expression() syntax to simulate the css max-width property, which works in Mozilla/Opera but not in IE.

1. posted by Tom Lee at 21:56 on March 16, 2006

add a comment

pages: 1 2 3 4 5  next »