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

25-72 of 222 entries in category 'coding'
pages: 1 2 3 4 5

1. posted by Mathieu 'p01' HENRI at 16:41 on November 14, 2005

^__^

2. posted by Milo at 16:42 on November 14, 2005

Did you find all three?

3. posted by Calm_Pear at 11:17 on November 15, 2005

ha... had me looking there, I only spotted two at first but the third would be the missing http, right?

4. posted by Milo at 11:19 on November 15, 2005

Yep, the missing http:// will cause a file not found error and fail to load the script.

5. posted by Mathieu 'p01' HENRI at 13:21 on November 15, 2005

woops, I missed the " http:// " error :p

6. posted by Jan! at 23:04 on November 15, 2005

That was the one I spotted first. Are the other two the missing "=" and the fancy quotes instead of regular ones?

7. posted by Milo at 23:15 on November 15, 2005

Wow Jan!, the fancy non-js-safe quotes would actually be the fourth error! I hadn't even noticed those.

By the other two I meant the missing "=" and the missing quote in the first line.

8. posted by Mathieu 'p01' HENRI at 00:28 on November 17, 2005

I thought the quotes where weird because of the font and a dumb text module in the image program used to make that image. But indeed, a JS parser will crash on them.
add a comment

Flickr view big bookmarklet 

I wrote this little bookmarklet to help me instantly grab the large/original version of any Flickr photo. Funnily enough, because of Flickr's consistent filenaming scheme, it also works for photos where the See different sizes option normally remains hidden:

view big (gets 1024px version; should work for most photos)

view original (gets full version as uploaded; works for photos pre-March 2007)

Drag the link above to your Bookmarks Toolbar (or right click, Add to Favorites), then click it when viewing a single Flickr photo page.

Here's the formatted source code, if you're into that sorta thing:

for (m in M=document.getElementsByTagName('img'))
{
  s = M[m].src;
  if (s && s.match(/static/) && !s.match(/_s|buddy/))
  {
    void(window.open(s.replace('.jpg','_o.jpg'),'_self'));
    break;
  }
}

1. posted by Ivan at 15:46 on October 28, 2005

wow very smrt and handy

2. posted by Nick at 16:19 on October 28, 2005

Thanks for sharing this!

3. posted by Ruben at 17:46 on October 28, 2005

You sneaky hacker! ;-)

4. posted by Konstantinos at 01:06 on November 08, 2005

Very nice! Can it be modified to work for PNGs as well?

5. posted by kwota.net,chris,chris at 02:29 on November 03, 2006

I call it Bigr. Awesome.

6. posted by hccnet.nl,r.j.m.vermeulen,r.j.m.vermeulen at 10:23 on January 18, 2007

hi MILO
I saw your photos
PaRob

7. posted by francis at 00:11 on February 06, 2007

this is really great i can use this on pc with windows
but with osx on my mackbook it dont work ;(.

8. posted by juice at 01:56 on March 07, 2007

Doesn't seem to work under FF2 in Windows :-(

9. posted by James at 14:13 on March 07, 2007

If you replace (s.replace('.jpg','_o.jpg') with (s.replace('.jpg','_b.jpg') rather than getting the original you can view the large version (1024x800).

Flickr have added a security feature to help protect the original.

10. posted by Milo at 14:28 on March 07, 2007

Good point James. For the time being I've just split the bookmarklet into two version: one for _o and one for _b.
add a comment
New bookmarklet: counters
(drag to Links-bar or right-click to Add to Favorites)

Tested in IE6 and Firefox. For every mouseclick, a small [1], [2], [3] incrementing counter will appear. Handy if you want to easily count the number of times something occurs on a page, such as the number of films you've seen of a specific IMDb actor/director (which prompted this idea in my case).
read more »

1. posted by Mathieu 'P01' HENRI at 10:01 on June 30, 2005

Aside drawing yellow moustaches on a page, what kind of use can you make of it ?

2. posted by Milo at 11:05 on June 30, 2005

Well, count stuff, obviously :)
Now I know I've seen 23 Susumu Terajima films... http://imdb.com/name/nm0855398/

3. posted by Milo at 11:07 on June 30, 2005

Also handy for finding out how many of the top 250 movies you have seen: http://imdb.com/chart/top

4. posted by Mathieu 'P01' HENRI at 15:37 on June 30, 2005

Lousy me, I thought of something slightly beyond simply counting stuffs :p

Like adding a note.

5. posted by Milo at 15:40 on June 30, 2005

Something like this? (Try the 'notes' link above)
I'd expand it with the option to edit and move current notes, but I'm sure somebody else has already built this...
:)

6. posted by Mathieu 'P01' HENRI at 18:15 on June 30, 2005

It'd be cool to have the numbers, and that the note appear on hover of them. Gosh, why am I at work while I could fiddle on the bookmarklet :p

But yeah, you are certainly re-inventing the wheel.

7. posted by Mathieu 'P01' HENRI at 15:04 on July 01, 2005

add a comment

photographic favicons 

Tee hee, each photo entry on this site now gets as a unique favicon a 16x16 version of the photo itself. Looks kinda neat when you open a bunch of them in tabs (try it out by middle-clicking some of the id numbers of the entries below).

I love it when ideas go from thought to successful implementation in less than 10 minutes.

Update: adding a photo to this entry so you can see it in action right here...


1. posted by Joaquin at 17:32 on June 23, 2005

I love this trick! Never seen it before either, now I think about it.

2. posted by ACJ at 20:16 on June 23, 2005

…and yet another idea I have played with in my head, but that was actually realized by Milo! ☺ By the way, did you just impliment them for your color domains (http://fff.milov.nl/, etc.), or did they already have those?

3. posted by Milo at 20:24 on June 23, 2005

Funny, I was just about to mention those... I added them a while ago actually: http://milov.nl/2544#comment6341
...based on a completely separate idea and script, as it happens ☺

4. posted by nowak at 21:28 on June 23, 2005

Clever. Couldn't you extend it so that the top level domain favicon is the most recent photo, too?

5. posted by Milo at 21:38 on June 23, 2005

Indeed... thanks for reminding me what triggered this whole idea in the first place. Per-entry favicons were easier so I've done those first.

6. posted by Mathieu 'P01' HENRI at 11:41 on June 24, 2005

Interresting idea

7. posted by Mathieu 'P01' HENRI at 21:21 on June 29, 2005

It'd be cool to have the photographic favicon on the pages of full size photos, e.g. http://milov.nl/2005/06/rotterdam-crossing

8. posted by Milo at 22:17 on June 29, 2005

You're right, that is cool. And now it's working.

9. posted by Mathieu 'P01' HENRI at 23:24 on June 29, 2005

;)
add a comment

new feeds view 

milov.nl/feeds/

I'm having a lot of fun styling my new simple and lean blo.gs-powered feeds view. Check it out in a browser that supports modern CSS (i.e. not IE) and observe li:hover, ::after and content: attr(href) in action...

Update:
Well, it seems blo.gs is offline for a bit after being sold to some unknown party, so the feeds view might not get updated for quite some time. Anybody know any other good centralized weblog update trackers? I tried BlogRolling for a while but it only seemed to indicate one new updated weblog per day.

Update 2:
blo.gs is back, yay! Turns out it's been acquired by Yahoo!.

1. posted by Ruben at 22:54 on June 13, 2005

Looking cool, Milo.

2. posted by Nick at 09:28 on June 14, 2005

Nicely done!

Cool pun by the way: 'i.e. not IE'.

3. posted by wchulseiee at 18:23 on June 14, 2005

what about http://www.bloglines.com? although it's owned by askjeeves, it seems to work pretty nicely.

4. posted by Milo at 18:37 on June 14, 2005

Ah, good point, I even have an account there already. But I'm having a hard time finding anything beyond the three-pane standard view... Do they offer a simple flat view of blog names and their last update time anywhere?

Basically I just want to be able to Ctrl-click the blog names to open them in new Firefox tabs, rather than being forced to read them via the bloglines interface.

5. posted by wchulseiee at 18:47 on June 14, 2005

there is something called 'blogroll wizard': http://www.bloglines.com/help/share. It generates a javascript or php code snippe t you can use

6. posted by wchulseiee at 18:54 on June 14, 2005

ok, not really php code, more like just an url :) and no update times either.

7. posted by Milo at 19:58 on June 14, 2005

That's something I could use, thanks.
add a comment

1. posted by Milo at 14:34 on June 17, 2005

Whoa... I just realized I linked this same message 3 years ago:
http://milov.nl/1416
add a comment

1. posted by Erik at 09:26 on July 05, 2005

There is also a pretty decent htaccess cheatsheet at http://www.thejackol.com/htaccess-cheatsheet/
add a comment

1. posted by Mathieu 'P01' HENRI at 16:16 on May 12, 2005

o_O I didn't knew the in statement could be used outside of a "for( iterator in object )"

2. posted by Milo at 16:22 on May 12, 2005

Now that I think about it, unless I'm missing something, one could also simply use:

var TypeInSet = nodeType in [2, 3, 4, 7, 8];

...thus bypassing the need for the custom set() function.

3. posted by Milo at 16:27 on May 12, 2005

Oh wait, I am indeed missing something :)
in checks the *index*, not the values, so my idea makes no sense at all.

4. posted by Mathieu 'P01' HENRI at 16:39 on May 12, 2005

:)
It's not exactly the indexes. It's the name of the properties ( member variables ) of the object.

5. posted by Milo at 16:43 on May 12, 2005

True... but with regard to arrays I always think of those as 'string-based indexes' ;)

Anyway, to make something that *does* work for array literals, I came up with this:

Array.prototype.contains = function(n)
{
for (var i in this)
{
if (this[i] == n) { return true; }
}
return false;
}

var typeInSet = [2, 3, 4, 7, 8].contains( nodeType );
add a comment

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

pages: 1 2 3 4 5