212
I Use This!
Very Low Activity

News

Analyzed about 9 hours ago. based on code collected about 9 hours ago.
Posted about 13 years ago by Friv
Thanks for sharing. I was found this coding.
Posted about 13 years ago by Brett Zamir
@CoursesWeb: I've applied your optimization to Git (faster on FF). Thanks!
Posted about 13 years ago by Brett Zamir
@CoursesWeb: Is there some case where your code catches something ours does not?
Posted about 13 years ago by Matteo
@Brett: I do not think that the timezone can justify a difference of many days! using php.js: date('Y-m-d', strtotime('2012-07-01 +7 DAY')) = 2012-07-11 --> wrong using php: date('Y-m-d', strtotime('2012-07-01 +7 DAY')) = '2012-07-08' --> correct
Posted about 13 years ago by Brett Zamir
@Anonymous: Our function is returning what PHP also returns in your example. The PHP function is based on the byte value of the string--i.e., concatening the hex value of each character byte one byte at a time instead of treating the input string ... [More] characters as individual bits. Ours is also, though based on the value of each UTF-16 character as used by JavaScript (internally--as opposed to the character encoding of the page which can (and should) be UTF-8) rather than trying to treat JavaScript strings as UTF-8 multiple byte values as PHP treats them. If you need the latter behavior, that can be achieved by: function bin2hex (s) { return encodeURIComponent(s+'').replace(/%/g, '').toLowerCase(); } If you want your functionality in the PHP way (and thus php.js way), you can use: dechex(bindec('10100101')) which will give "a5" lower case (as in PHP). [Less]
Posted about 13 years ago by Brett Zamir
@Dick Olsson: I see your change has already been made in Git. Thanks!
Posted about 13 years ago by Brett Zamir
@David Pilia: Thanks for the PHP-like behavior. Applied in Git (though slightly simplified). Also applied in optional array() methods.
Posted about 13 years ago by Brett Zamir
@Kongo: I can see how parseInt is necessary for the min part, but Math.floor should already be creating an integer for the score portion. Still, I do see that PHP seems to cut off the decimal portion for min and max, so I think we should parseInt on ... [More] both arguments BEFORE calculation to avoid any chance of too high of a max. I have made this change in Git. [Less]
Posted about 13 years ago by Brett Zamir
@Tom: Are you using the latest versions of the code? Please visit "raw js source". I am getting the result you said you were expecting.
Posted about 13 years ago by Brett Zamir
@wookie: I made a change; are u using Adobe Air, I think it was which passes around String objects for some reason? @Daniele: You can make a "pull request" at Github for us to accept your changes. Everyone else commenting here: Sorry, moving slowly here.