212
I Use This!
Very Low Activity

News

Analyzed about 21 hours ago. based on code collected about 22 hours ago.
Posted about 13 years ago by Eric Lewis
function similar_text(t1, t2, percent) { var t1, t2, sim, t1_len = t1.length, t2_len = t2.length, php_similar_char = function(txt1, len1, txt2, len2) { var sum, pos1, pos2, max, p, q, ... [More] end1 = txt1 + len1, end2 = txt2 + len2, l; max = 0; for (p = txt1; p < end1; p++) { for (q = txt2; q < end2; q++) { for (l = 0; (p + l < end1) && (q + l < end2) && (p[l] == q[l]); l++); if (l > max) { max = l; pos1 = p - txt1; pos2 = q - txt2; } } } if ((sum = max)) { if (pos1 && pos2) { sum += php_similar_char(txt1, pos1, txt2, pos2); } if ((pos1 + max < len1) && (pos2 + max < len2)) { sum += php_similar_char(txt1 + pos1 + max, len1 - pos1 - max, txt2 + pos2 + max, len2 - pos2 - max); } } return sum; }; sim = php_similar_char(t1, t1_len, t2, t2_len); if (percent != null && percent === true) { return sim * 200.0 / (t1_len + t2_len); } return (sim); } [Less]
Posted about 13 years ago by Max von Buelow
The Code from line 29 to line 31 is already provided by get_html_translation_table: if (useQuoteStyle === 'ENT_QUOTES') { entities['39'] = '&#39;'; }
Posted about 13 years ago by Oscar Broman
@Brett Zamir: I'm not entirely sure whether that was rhetorical. Anyway, here you go: function long2ip(ip) { if (!isFinite(ip)) return false; return [ip >>> 24, ip >>> 16 & 0xFF, ip >>> 8 & 0xFF, ip & ... [More] 0xFF].join('.'); } The boundary checking being done in the original function isn't what the PHP function does - it simply converts the input to a long. Therefore, negative values (which some systems dealing with IPs as signed integers will give you) will be treated correctly. Where is this done in JS, one might ask? Bitwise operators in JS treat their operands as 32 bit integers, so the given number will essentially be implicitly casted to one. [Less]
Posted about 13 years ago by Amazing Alex
Play free online games at Amazing Alex Games - Amazingalex.org.in Meet Amazing Alex! This whiz kid has a boundless imagination and a houseful of fun toys that can turn anything into an adventure! From cleaning up his room to battling cardboard ... [More] robots in his backyard, Alex creates amazing chain reactions to get the job done with the maximum amount of fun! Now he has some challenges for you -- and he wants to see the most creative solutions YOU can create! With 100 challenging levels across four fun-filled locations, there’s a whole world of creations to explore! [Less]
Posted about 13 years ago by Game gazo
thanks for share this code
Posted about 13 years ago by Huz
thanks a lot, this code i was found.
Posted about 13 years ago by Friv
Thanks for share code
Posted about 13 years ago by Brett Zamir
@Demosthenes Koptsis: Fixed in Git, thanks!
Posted about 13 years ago by Demosthenes Koptsis
i think arglm2 = arglm1 - 2 should be arglm2 = arglm1 - 1
Posted about 13 years ago by Demosthenes Koptsis
it should be cb = arguments[arglm1] not cb = arguments[argm1]