212
I Use This!
Very Low Activity

News

Analyzed 1 day ago. based on code collected 1 day ago.
Posted over 13 years ago by Glen
This routine is strange in that it reads as if it should accept an array yet it returns an object. JS does not guarantee maintaining the order of elements of an object, and while it may work on some browsers, it should not be relied on. So it is ... [More] pointless to sort an object. This routine should take an array and return an array ... and contain comments to indicate to the user that they shouldn't attempt to create a sorted object in JS. It works well in the PHP world, but unfortunately it doesn't translate directly to JS. In JS, you sometimes need to create an object store and an array store (to indicate order) to get direct access and order. [Less]
Posted over 13 years ago by austin
base64_encode mangles utf8 binary data this line: data = this.utf8_encode(data + ''); if the string is already utf8 it encodes it MORE and the resulting binary is unintelligible. a fix i used for this is: if(!isutf8) { data = ... [More] this.utf8_encode(data + ''); } and i pass isutf8 as a second argument, this changes it a bit from the original but gives the option to utf8 encode it first or not. [Less]
Posted over 13 years ago by Hans Henrik
this code isn't even close to complete. like æ=æ ø=ø å=å Æ=Æ Ø=Ø Å=Å and there's lots of others missing 2 :p
Posted over 13 years ago by Nitin Balsaraf
How can i include Validation.php file in javascript and also have to call validate( with some parameters) function from javascript. I have to pass parameters from javascript to validate function. How to do this please suggest me?????
Posted over 13 years ago by JosmogyfugHof
Posted over 13 years ago by Martins
this function breaks ¹ ² ³ symbols
Posted over 13 years ago by Tim Younger
blast, i tried to solve it concisely without needing to loop twice. this one actually works though: if (arr instanceof Array) { var retArr = []; for(k in retObj) {retArr.push(retObj[k])}; return retArr; }
Posted over 13 years ago by Tim Younger
might want to return an array if param was an array. i'm sure there is a more secure way to evaluate if the param was an array, but is_array is overkill for native support. if ('number'==typeof arr.length && isFinite(arr.length)) {return Array.prototype.slice.call(retObj);}
Posted over 13 years ago by friv 4 school
Nice share. Thanks a lots.
Posted over 13 years ago by Conix Inc
i want to use it