it's nice to see real world WTFs as they actually happen most of the time.
Samus_
@Samus_
Best posts made by Samus_
Latest posts made by Samus_
-
RE: DreamHost $7.5 Million Billing System Error
-
RE: FAQ or Rules for the Site/Forums
Thanks, I think a faq is worth just to say that you've said, and by example to let you know that tags are comma separated (just an opinion).
Now I would like to know whose are the forum moderators because I wanted to fix that comma-tag mistake I've made but couldn't find anybody to ask for and with respect to the private messages, where do they go? I haven't seen an 'inbox' is it that they go directly to the mail? and in that case what happens with users who have opted to not get mails from here?
Thanks again.
-
RE: FAQ or Rules for the Site/Forums
idem about the faq
btw: tags are comma-separated (I made the same mistake)
-
RE: Search is broken!
it's not working for me either.
Also I want to ask you where or who the forum moderators are, because I couldn't find any trace of them and no faq or something similar.
Thanks_
-
The richness of language
At least in human languages, a rich one allows you to say the same thing in many different ways... at least in human languages...
today I was wandering in some community and stopped by a post of someone asking to explain this javascript code:
function emailCheck(email)
{
var tmp = "" + email + "", s = tmp.replace(/^\s*|\s*$/g, "");
var re = /^(\w|[^_]\.|[\-])+((\@){1}([^_]))(([a-z
]|[\d]|[\-]|\.)+|([^_]\.[^_])*)+\.[a-z]{
2,3}$/i
if (!re.test(s))
{
return false;
}
re = /\.(a[c-gil-oq-uwz]|b[a-bd-jm-or-tvwyz]|
c[acdf-ik-orsuvx-z]|d[ejkmoz]|e[ceghr-u]
|f[i-kmorx]|g[abd-ilmnp-uwy]|h[kmnrtu]|i
[delm-oq-t]|j[emop]|k[eg-imnprwyz]|l[a-c
ikr-vy]|m[acdghk-z]|n[ace-giloprtuz]|om|
p[ae-hk-nrtwy]|qa|r[eouw]|s[a-eg-ort-vyz
]|t[cdf-hjkm-prtvwz]|u[agkmsyz]|v[acegin
u]|w[fs]|y[etu]|z[admrw]|com|edu|net|org
|mil|gov|biz)$/i
if (!re.test(s))
{
return false;
}
re = /\@\@/
return(!re.test(s));
}(please don't complain about the indentation or wrapping, this is the way that community's software shows it, in fact I'm copying it directly from the page's source)
well I explained and made my own version:
function emailCheck(email) {
// declare valid TLDs
var TLD = 'aero|biz|cat|com|coop|info|jobs|mobi|mu
seum|name|net|org|pro|travel|gov|edu|mil
|int';
var ccTLD = 'ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|
at|au|aw|ax|az|' +
'ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|
bs|bt|bv|bw|by|bz|' +
'ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|
cu|cv|cx|cy|cz|' +
'de|dj|dk|dm|do|dz|' +
'ec|ee|eg|eh|er|es|et|eu|' +
'fi|fj|fk|fm|fo|fr|' +
'ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|
gr|gs|gt|gu|gw|gy|' +
'hk|hm|hn|hr|ht|hu|' +
'id|ie|il|im|in|io|iq|ir|is|it|' +
'je|jm|jo|jp|' +
'ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|' +
'la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|' +
'ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|
mr|ms|mt|mu|mv|mw|mx|my|mz|' +
'na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|' +
'om|' +
'pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|
py|' +
'qa|' +
're|ro|rs|ru|rw|' +
'sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|
so|sr|st|su|sv|sy|sz|' +
'tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|
tt|tv|tw|tz|' +
'ua|ug|uk|um|us|uy|uz|' +
'va|vc|ve|vg|vi|vn|vu|' +
'wf|ws|' +
'ye|yt|yu|' +
'za|zm|zw';
// define 'email-like' regexp
var re = new RegExp('^[A-Z0-9._%-]+@[A-Z0-9-]+(\.[A-Z
0-9-]+)*(\.(' + TLD + '|' + ccTLD + '))$', 'i');
// trim parameter
email = email.toString().replace(/^\s*|\s*$/g, '');
return re.test(email);
}I must admit that felt a bit like this, but it left me thinking -how good- it is to have lots of ways to do the same thing in programming languages...