cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Warped Text... (off topic)
Date Sat, 03 Sep 2005 07:49:53 GMT
Dirk-Willem van Gulik wrote:

>On Fri, 2 Sep 2005, Pier Fumagalli wrote:
>  
>
>>>http://agylen.com/2005/05/16/captcha-validator-for-cocoon-forms/
>>>
>>>Ciao,
>>>      
>>>
>>Yep, but SVG IMVHO is quite overkill to generate a simple image...
>>    
>>
>
>For something really simple:
>
>sub getBCD {
>        $_ = (123567,36,13457,13467,2346,12467,24567,136,1234567,12346)[ shift @_ ];
>        return (((m/1/) ? ' _ ' : '   '),
>                ((m/2/) ? '|' : ' ').  ((m/4/) ? '_' : ' ').  ((m/3/) ? '|' : ' '),
>                ((m/5/) ? '|' : ' ').  ((m/7/) ? '_' : ' ').  ((m/6/) ? '|' : ' '));
>};
>
>map { my @r = getBCD($_); map { $out[ $_ ] .= $r[$_].' '; } (0 .. 2); } '3231' =~ m/./g;
>
>print join("\n",@out);
>
>Just kidding.
>  
>

Hey, nice to see you here!

As my perl is more than limited, I had to run it to understand what it 
does. Brilliant :-)

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message