PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Dan
Apr 2, 2014 19:00
@DanLugg - what did ? ... hehehe
Dan
Apr 2, 2014 18:59
@HamZa - also, I only sort where it's necessary. Faster to inject and sort, than to run through the whole loop with a math compare -- I don't know why.... but the second part to that, is using the C based loops (aka, array_search), doesn't eat up 100% of a cpu core during the cycles.
Dan
Apr 2, 2014 18:57
@HamZa - If you notice, I have a couple more methods that are loops posted underneath. Am able to rescue some time by exiting on found, however sorting is what really hurts --- I really don't like having to copy the keys, but it actually does seem to be much faster than the loop methods below
Dan
Apr 2, 2014 18:55
@PeeHaa - ya... not even on a dev account. Where do you hail from ? maybe it's something country specific.
Dan
Apr 2, 2014 18:54
@PeeHaa - wow.... I have never gotten a captcha on PayPal ... o.0
Dan
Apr 2, 2014 18:54
@reikyoushin - if you look at the comments and history (specifically lolcats), you will see what i mean by bashing.
Dan
Apr 2, 2014 18:52
@reikyoushin yes, to post that generally, and not have it buzz in Dan Lugg's ears :)
Dan
Apr 2, 2014 18:51
@Dan for all those who can't see it >> pastebin.com/rEpZsXum
Dan
Apr 2, 2014 18:50
@ircmaxell - which I am ok with, PHP itself is one giant loop anyway :)
Dan
Apr 2, 2014 18:49
@HamZa - it's the first part of my answer. No scripted loops.
Dan
Apr 2, 2014 18:48
@webarto - you can see the solution I wrote ?? It's flagged as deleted, but I can't undelete it... will pastebin
Dan
Apr 2, 2014 18:47
@webarto - i will undelete my solution. one sec
Dan
Apr 2, 2014 18:46
Nice... moderator attention ... lol....
Dan
Apr 2, 2014 18:45
with comments inline saying exactly where i need the non-loop... sec... will get link, unless moderater deleted it (i requested)
Dan
Apr 2, 2014 18:45
I did give code
Dan
Apr 2, 2014 18:45
got down-voted
Dan
Apr 2, 2014 18:45
it's actually very fast at around 2m elements / sec
Dan
Apr 2, 2014 18:44
I eventually figured out a way to do this myself, and contributed
Dan
Apr 2, 2014 18:44
and scattered through the comments.... i was even told that I was "lying" in my question
Dan
Apr 2, 2014 18:44
in fact ... the answers I got back, were all loops,
Dan
Apr 2, 2014 18:44
it did not exist
Dan
Apr 2, 2014 18:43
where the keys are not sorted, and when sorted are very far apart --- without looping in PHP
Dan
Apr 2, 2014 18:43
several -- like for example, i asked a Q about how to search for closest element in an array by key
Dan
Apr 2, 2014 18:42
lol..... try error_reporting (E_ALL ^E_TOO_MANY_DANS);
Dan
Apr 2, 2014 18:41
im speaking more about the Q&A section which is just full of Lurkers/bad flaggers/ etc
Dan
Apr 2, 2014 18:41
you guys in here seem ok tho... just fyi
Dan
Apr 2, 2014 18:40
php.net ... never have I been disrespected so much. and this site allows Lurkers to bash with down-votes... makes it difficult for those (like myself) whose old account was so old, it was gone.
Dan
Apr 2, 2014 18:39
in past years, it has been going downhill. the account deletion is more of a privacy thing. I don't get anywhere near out of this what I put in --- unlike other sites like PlanetSourceCode / etc
Dan
Apr 2, 2014 18:37
@ircmaxell - it's ok... thats the general mentality I see which is why I am leaving. I miss StackExchange before that attitude became dominant.
Dan
Apr 2, 2014 18:34
wow.... what the hell do i have to do to get my account deleted
Dan
Apr 2, 2014 17:08
Why does SO have so many of them
Dan
Apr 2, 2014 17:08
I friggen hate Lurkers -.-
Dan
Apr 2, 2014 08:09
@Achrome - love the quote on bash.org ... that does seem to be the common mentality. Problem with regex, is php will execute code in preg_match statements.
Dan
Apr 2, 2014 07:28
filter_input + conditioned variables + validation + prepared statements == sanitization !! .... the one example up-voted almost 2500 times, only uses PDO .... it does not account for the fact that the variable may contain executable code.
Dan
Apr 2, 2014 07:25
not ONE answer combines all the techniques required for true sanitization of variables to prevent SQL Injection ---- no wonder so many sites get hacked
Dan
Apr 2, 2014 07:24
ok --- this .... wow.... just wow. >> stackoverflow.com/questions/60174/…
Dan
Apr 2, 2014 07:16
@Gordon @Jack - yup, and the Unicoin room is dead now :) ... I think I killed it.
Dan
Apr 2, 2014 07:15
for the record --- i don't generally downvote as I feel that system is not balanced. (aka, person downvoting loses only 1 rep, while the person who posted loses 2 rep )
Dan
Apr 2, 2014 07:14
also, people can not comment, unless they have at least 50 rep
Dan
Apr 2, 2014 07:13
ummm.... wow... you REALLY need to elaborate on the question. No Query = not using MySQL = no row counts = no bad result .... because..... NO RESULT
Dan
Apr 2, 2014 07:10
@SagarPanchal - more than likely you are doing a SUM on a Long field that is Float, If you just want a count of the records, use SELECT COUNT()
Dan
Apr 2, 2014 07:09
@SagarPanchal - You just posted that question 5 minutes ago, and it doesn't give any of the code you are using >> SQL, or PHP
Dan
Apr 2, 2014 07:06
I did find this example tho, which seems to more accurately reflect base128 ... if you havn't seen it already >> code.google.com/p/base128/source/browse/trunk/…
Dan
Apr 2, 2014 07:05
I don't think simply multiplying every char by 2 would truly be base128
Dan
Apr 2, 2014 07:04
@Jack i just realized that.
Dan
Apr 2, 2014 06:55
wouldn;t something like $var = base_convert( $mybase64string, 64, 128 ); work ?
 

 bin

It's a bin, for binning things.
Dan
Apr 2, 2014 18:36
yup --- nobody .....
Dan
Apr 2, 2014 18:36
one would think moderators have the power to do this... hahaha
 
Dan
Apr 2, 2014 18:35
seriously --- posted a "fucking delete my account already" thread in Meta .....