« first day (972 days earlier)      last day (3973 days later) » 

7:00 PM
@ircmaxell print_r / var_dump / var_export / debug_zval_dump break with such large arrays
@ircmaxell basically everywhere where the zend_hash_apply* functions are used
 
7:21 PM
@Gordon where remains this 9999999?
...
99999999 and ... 10000000
!?
 
in Lounge<C++>, 1 min ago, by rightfold
10M OWNED BITCHES
 
Hi all! I noticed that a lot of (rookie) php/mysql users are using VARCHAR and INT for almost everything in their Mysql database. I always try to assign the most suitable type. What are the best types for zipcodes, address and city fields?
 
@JasonB I tend to use varchar
 
there is no ADDRESS field type in mysql ;-)
 
@bwoebi true, but my question is which type to use for Adresses
 
7:27 PM
@JasonB I would use TEXT
 
I currently using varchar(255)
 
varchar, text and int are suited for everything
(and eventually TIMESTAMP)
 
@JasonB 255 :O
 
@HamZa No idea why most users use 255...
I see this 2^8-1 so often in varchars… no idea why…
 
I'm also in doubt which one to use for geocoding latitude longitude coordinates
 
7:29 PM
@bwoebi It's the limit of varchar ?
 
@JasonB Nearly every part of a street address is a string of some type and cannot be expressed appropriately as a number. I would likely have a table for street addresses that use VARCHAR with an appropriate limit for each field.
 
125
Q: What is the ideal data type to use when storing latitude / longitudes in a MySQL database?

CodebeefBearing in mind that I'll be performing calculations on lat / long pairs, what datatype is best suited for use with a MySQL database?

 
@bwoebi thanks!
 
@HamZa no?
this should be 2^16-1 I thought?
 
@JasonB lat & lon in separate columns, I tend to use double
 
@HamZa already separated lat & lon. Thanks
 
@JasonB But I'm no expert, So maybe the link that @bwoebi pointed out would shed some light ...
 
@tereško you can bind click events... (instead of doing it inline)...
 
@bwoebi do you think that i am somehow deficient in the head ?
 
from the link: of @bwoebi "FLOAT should give you all of the precision you need, and be better for comparison functions than storing each co-ordinate as a string or the like."
 
7:34 PM
I'm now hesitating if I was using double or float xD
@JasonB I once needed to store exact coordinates, about ~1m error pron.
(1 meter)
 
;)
 
It depends on the precision ..
 
also from the link: "MySQL uses double for all floats ... So use type double. Using float will lead to unpredictable rounded values in most situations"
 
@tereško Why shouldn't I when I see such a blatant failure from you! ... No. But I find it a bit ugly to write javascript in a href element ;-)
 
@JasonB I had some issues with rounding, I can't remember the exact config
I'd be happy to try our extraction engine on your data for you if you like.smartystreets.com/products/liveaddress-api/extract its still beta but we have put a lot of logic and testing into it so far. Send me a sample file and I'll get it right back to you. Jeffrey@SmartyStreets.com — Jeffrey 20 mins ago
I'm not sure if I should flag that ^ ?
 
7:37 PM
why do you think i tagged it with "review please" ?
 
@tereško first thought you had answered ^^ misread
 
@Ham
 
@tereško because you might have been a bit unsure? (if it would have been your answer)
 
@JasonB ?
 
@HamZa thanks, but no data at the moment
 
7:38 PM
I see ...
 
and some retard from this chat room upvoted that answer
 
@tereško yeah, I upvoted it.
 
@bwoebi Why would you upvote an answer that encourages inline JS?
 
@tereško because it is correct and less ugly than writing 5 lines for just binding an event of 30 chars
(even if I'd use onclick instead of href)
 
7:40 PM
Thanks for the answers! This was my first time in the chat room of stackoverflow. No worries, I'll be back!
 
i think i need to add this user to the ignore list , to prevent further damage to my peace and calm
 
@bwoebi Inline JS is one of the ugliest things you can do to HTML.
 
@tereško you don't need to.
@cspray It's better than omitting the html, head and body tags
 
@bwoebi So? Doing something worse does not make a lesser evil "good".
 
in JavaScript, 47 secs ago, by bwoebi
@tereško I don't say this is good to write (in any larger application), but acceptable as a quick ...... wait what? there was a form to submit?! okay… I'm clearing my upvote.
 
7:46 PM
Hay guys o7.
 
hmm ... looks like i will be banned for next hour ... oh well, i stand by my original statement
 
@tereško why should you?
 
What for?
 
7 flags
 
Was that you that just got a slew of flags?
 
7:47 PM
@tereško where?
 
didn't notice the poster, sorry
 
9 mins ago, by tereško
and some retard from this chat room upvoted that answer
 
in JavaScript, 28 secs ago, by copy
The PHP room must be an aggregation of pure brainpower if teresko joins this room only to inform us
LOL
 
I invalidated them. Though I have to insist @tereško to wash his mouth with <SOAP/> now
 
@bwoebi hahaha
 
7:49 PM
@Gordon correct action.
 
@Gordon did you look at the post which i was referring to ?
 
@tereško no. I am busy.
 
Whoa, whoa, whoa, hold on a second. There are other chat rooms, not just this one?
 
@salathe this room is a lie
 
well .. there are 8 major rooms, about same amount of minor rooms and the rest are dead or feeds
 
7:55 PM
@salathe the other rooms are only in your imagination. This room is the only true one.
 
@JanDvorak @bwoebi … not sure who to believe …
 
@salathe you need to wake up and see with your eyes
right now you're only seeing what you want to believe
 
But, I believe in ponies and rainbows!
 
well .. emm ... ponies are real and so are the rainbows
 
@salathe And in reality?
 
8:00 PM
@salathe do you believe in waffles?
 
@JanDvorak No
 
> "I don't believe in traffic laws" -- G. Carlin
 
8:19 PM
any one can give me a wiki or link for this jquery plugin file code.google.com/p/mygiainfo/source/browse/trunk/mygia_files/…
 
wow! that looks awful
 
Also this isn't really the jquery room heh
 
i know :) must marge php+css+jquery
 
blah
 
@ircmaxell blah?!
 
8:29 PM
@BassamEssa technically this IS the wiki code.google.com/p/mygiainfo/w/list =oP
 
:( no wiki in this page , i google it before without any result!
 
Saw
 
@ircmaxell Is it possible to optimize this?
 
I don't know yet...
 
8:33 PM
because here usually one function calls itself in the zend_hash_apply
 
Hey @crypticツ can copy and I crash your couch in July?
 
@BadgerGirl wait what? couch surf on my couch?
 
Yeah.
 
But I don't know you O_0
you could try to kill me in my sleep
 
Good point.
 
8:45 PM
@BadgerGirl Try couchsurfing.org I was going to use them when I had planned on backpacking through Europe.
 
We're trying that but nobody is answering.
 
Preferably try to find an old couple like 60+ to stay with. Less likely the will be axe murderers.
Where you heading?
 
All over Florida, that's why I thought of you. :P
 
What's the occasion?
 
Killing spree?
 
8:48 PM
@DaveRandom I knew it! =oO
 
If there's one thing life in the UK has taught me, it's to never trust a badger.
Oh, and always take a raincoat.
 
Either way I'm a bad person to stay with. I have trust issues, documented medical paranoia, and would probably more likely be the one going crazy, just saying =oP
I can send you a tin-foil hat to keep you safe on your travels though =o)
 
@crypticツ We didn't design you like that. File a bug report.
 
@DaveRandom I just think everyone is out to get me O_o mainly the gubberment, but one day I'll prove to you all I was right all along!
 
@bwoebi different technique: lxr.php.net/xref/PHP_5_5/Zend/…
it's not self-recursion, therefore my algorithm won't change anything
 
8:54 PM
@crypticツ The way I understand it, your government aren't great at preventing themselves from proving it
Still, at least it's not specifically just you they're after
Mind you, you'd be pretty safe. Certain well known people have successfully avoided your government for years, at a tax-payer cost arguably running into the hundreds of millions.
 
@crypticツ Okay, no problem.
 
@ircmaxell but then you also need to enable it there…
@ircmaxell eventually change the zend_hash_apply* to a macro? then it's self-recursion - mostly at least (when the given function is identical to the calling function).
 
Not strictly, which is the problem... it needs to be strict self recursion... and changing to a macro would be an API change... bad...
So I would just leave it as it is for now... but rethink it later...
 
@ircmaxell why? if the macro accepts the same parameters as the function?
 
It may be used as a function pointer somewhere...
 
9:04 PM
very unlikely.
 
Not to mention we would need to make assumptions about the caller we can't know ahead of time...
 
doesn't make sense to use such a function as a function pointer
 
Not to mention my algo throws order to the wind...
 
@ircmaxell if (caller == given_function) tail_recurse(); else given_function(); in this style?
 
But anyway... Bblater...
 
9:06 PM
okay, bye
 
Neato, I may have inadvertently found a C# compiler bug.
 
@Bracketworks error: wrong chatroom: substring C# detected in chat post.
 
I always knew you were a bot.
 
@Bracketworks no, bots don't have to edit their messages
xD
 
That sounds like something a bot would say...
 
9:11 PM
ah? lol :-D
 
Does anyone here use xdebug? Is it worth it to compile and use it? Or can I just debug the old fashioned way?
 
the latter is perfect :-)
 
@crypticツ I use it; precompiled binaries on Windows. Worked fine for me.
I used it attached to NetBeans so I could step through, watch locals/stack, and so on..
 
@crypticツ worth it when used with an IDE for step through debugging and for profiling with KCacheGrind
 
@Bracketworks I need this in C when calculating complex things… but in PHP I never feel to use a debugger when I can write debug_print_backtrace, var_dump(get_defined_vars()) etc. there is a debugger too much overhead when you have such shorthand debugger-replacing functions.
Also in PHP we calculate more rarely things. We mostly parse data and then decide what to do with etc.
 
9:22 PM
@crypticツ I mainly do var_dump debugging though the majority. I use Xdebug for the trickier problems only.
 
@bwoebi Depends on what you're doing. A small POC? Sure, var_dump to the rescue. Something considerably more complex, involving recursion and so on; definitely XDebug.
 
@crypticツ I like xdebug.
But I do recommend using an IDE with it
 
I like locals/watches, stepping through something complex is far easier with XDebug (not to mention you can actually step through it) than watching walls of text flying by in a console.
 
All command-line debuggers are . . . meh
Better than nothing, that's for sure; In some cases better than print / echo by leaps and bounds.
 
@LeviMorrison 100% agree.
As with anything, it comes down to knowing your tools. Don't use a chainsaw to slice bread, and don't expect a kitchen knife to take down a tree.
 
9:26 PM
kk, I just could never get it to compile properly it kept using the wrong version of the zend api or something. The date for the one it used was not the one in phpinfo() so it never worked. Yeah, I wanted to set it up with phpstorm, but this issue always prevented me. =o(
 
@Bracketworks Really needed? Even a websocket decoding function you can perfectly write with var_dumps ...
 
Right people, I'm out for 10 days. Have fun, try not to wreck up the place while I'm gone.
 
Even If you have to analyse binary data
 
There are a few things that the command line excels at in debugging. Maybe I just haven't found out how to do this in any IDE, but ignore <breakpoint> <number of times> is so useful in some circumstances.
 
9:28 PM
@Bracketworks RIP
 
@DaveRandom Adios amigo, enjoy 10 days of... whatever?
@LeviMorrison I know :-(
 
@Bracketworks it was an example of something what involves complex data processing
 
@LeviMorrison I'm sad too, was my favorite close type
 
@bwoebi I know; surely we could argue all day of where or where not to use it.
 
I personally didn't mean it in a sad way; I'm glad is gone. It was the for reasons.
 
9:29 PM
@LeviMorrison may someone strike through the bye-bye too localized in the meta question's title.
 
Crutch or not, some questions are just too damn localized.
 
And just because something has a very specific scope doesn't mean we should ignore the problem.
 
@Bracketworks this is why: simply don't use a debugger and be happy :-)
 
@bwoebi Agree to disagree.
 
you disagree to the debugger? okay.
 
9:30 PM
> When Neptune aligns with Jupiter, my PRNG creates predictable sequences in my ornithology data-mining application, does anyone know why?
 
@LeviMorrison I mainly used it for typoes, parse errors, etc and the occasional gimme the regex that does xyz that only is applicable in my use case
 
I think the new options are overall better than having 'too localized' around.
 
@Bracketworks no. and I don't want to know it.
 
> Too Localized was, by far, the most misused close reason in our surveys, with both Community Managers and Moderators deeming over 50% of randomly sampled TL closures to not have merited closure (including on SO).
 
@Bracketworks Err... Sun? <crosses fingers>
 
9:33 PM
@DaveRandom Sweet dude, enjoy :-)
 
@LeviMorrison Agreed. TL was just way too open to abuse, and that's exactly happened
Right, really going now, catch y'all in a week and a half
 
I'm going to campaign for a for CV.
 
@Bracketworks but that's online bullying =o(
 
@crypticツ Not if I don't like OP or his question; that's an opinion!
 
blah
 
9:35 PM
@ircmaxell 's famous blah!
 
@crypticツ You're compiling XDebug for Linux, correct?
 
It just occurred again.
 
@bwoebi i hate it. he always does it out of context
 
@Bracketworks yes
 
9:36 PM
@Gordon It's perfectly in the context. It's the context context-less.
 
@Gordon it's always out of context...
it's my current state-of-mind. Or lack of it to be more precise
 
I've always wondered from seeing @ircmaxell say it, what's "eih"?
 
I miss an expand_to_meaningful function here.
 
@Bracketworks sort-of a sigh like reply. A "yeah, I guess, but not really enthused about it"
 
@ircmaxell Oh. So it's not an initialism?
 
9:38 PM
initialism?
 
er acronym? abbreviation?
 
nope
 
Oh. Well then, all that wasted time Googling and wondering...
 
just that general lackluster version of "i guess..."
 
Alrighty, duly noted.
 
9:41 PM
@Bracketworks this was the code I lasted used to compile it pastebin.com/TBDRkAd1 (mind the shitty script =oP) the compile works and the .so file is created, but it breaks when loaded since the Zend Extension version it chooses to compile with does not match the one in phpinfo() I don't know how to make it use the correct one. It's apparently choosing one that is years old. The phpize and php-config files are brand new at the time from the latest PHP 5.5 branch.
 
@crypticツ Hmm, have you tried compiling it to 5.4?
 
@ircmaxell lol, who just did star this?
 
Like, I'm trying to imagine its a version mismatch and XDebug is defaulting to something, but maybe that doesn't make any sense.
 
@Bracketworks no, mainly because I compile on my shared host as of right now, and it takes a good 6+ hours to compile PHP =o(
 
I have no idea
 
@bwoebi I know I've been laughed at before =o( My phone could compile faster =oP
 
you should cross-compile it and then upload
 
Well, nobody is here in the office, and I'm accomplishing nothing.
I'm going home.
Night.
 
@Bracketworks no! sleep in your office!
 
well ... i once compiled the java-based environment on nanoPC-thing
that took couple days
 
9:47 PM
@bwoebi Mmmmmmmmmmmmmno.
 
then again i was compiling everything , starting from kernel to userland , libs and tomcat
 
@tereško sounds like a lot fun
 
: implies and results in
 
10:42 PM
@crypticツ . . . my really crappy netbook did it in 2 hours. I feel really, really sad for you.
 
@LeviMorrison Reason why I am looking for a VPS or dedicated server
 
What kind of app do you have?
Or is it just a bit of this and that?
 
whatcha mean?
 
@crypticツ Which by the way, I haven't picked one yet but Digital Ocean looks like a promising lead with a cheap starter package.
@crypticツ Basically, what do you use your hosting for?
Is it a test server?
 
@LeviMorrison Pair.com =o( Webmaster package
 
10:44 PM
Host an app?
 
dev and production sites running on CodeIgniter, Symfony and a little of this and that
 
How many sites?
 
um right now each site has its own dev site so in total 14
 
Is this for a company or just personal stuff?
 
@LeviMorrison both, however if any site get too large it will be moved to it's own server
 
KAS
0
Q: Run query with prepare and execute in PDO ,mysql select dynamic row values as column names, another column as value

KASHow can this query be execute in PDO with prepare and execute statements $pdo= new PDO('mysql:host='.$db['host'].';dbname='.$db['database'], $db['username'],$db['password']); $pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); //$sql_query = "SELECT * from photo_stats "; ...

 
this NOT a place for advertising your own questions
 
@tereško Don't ask whether someone is here to help you. If someone is around and wants to help they will.
 
@Happyninja , did you forget to take your meds?
 
@tereško that nasty attitude is part of reason why i avoid javascript room
 
11:42 PM
aww can't do anything now
 
11:55 PM
for another five minutes that is.
 

« first day (972 days earlier)      last day (3973 days later) »