« first day (801 days earlier)      last day (4150 days later) » 

5:00 PM
point is that if you want to get more rep just Wait for good question and than answer ..it will give you more rep ..
 
Status update: getting pretty drunk by now, family still here :(
3
 
@PeeHaa sounds like you got switchwation to handle
 
Anonymous
^ word
 
1
Q: Action on old question which are not constructive

NullPointerScenario A user is coding(also a newbie) and got stuck in a error which is because of syntax error for example $sql = 'SELECT * FROM dealer WHERE id="'$id.'"'; and than user just ask question Parse error: syntax error, unexpected T_VARIABLE sql query. now what the problem with type of ques...

 
Hullo
Anyone still here?
 
5:10 PM
Sure. I'm trying to evade the family. What´s up?
 
Anonymous
@lawm sup
 
@TheCOMPLETEPHPNewbie Sup
@PeeHaa Sup
How many points is it to create your own chat room?
 
@lawm Nothing much. Evading the family as stated and finishing my file locker code.
@lawm Dunno. But you need 20 to talk in here
 
Yeah IK and I have exactly 20
 
@lawm 1000
 
5:12 PM
Darn
 
Anonymous
@lawm I think it is free,
 
I really want an arduino chat room
 
Anonymous
1000? I didn't know
 
@lawm You have done a lot with it?
 
Err
I got it 2 days ago
 
here is something nice that people forget: just creating a room is not enough... it also need people in it, otherwise you can just write in a notepad
2
 
@lawm kewl. What board do you have?
 
@PeeHaa Standard uno
 
@PeeHaa thank you for edit in meta ..
 
kk
 
5:13 PM
It's sitting right next to me
 
@NullPointer np
 
Anonymous
@tereško lol, true.
 
Wow questions with bounties really have effort in their answers
 
@NullPointer typo :D
 
5:15 PM
i knew that .. :)
 
Hey I told you I was getting drunk ;)
 
user986408
is there a way to preserve the leading zero in this calculation: '03' - 1 ?
 
@skripted str_pad()
 
Do any of you have any PHP-related projects online?
 
5:19 PM
@PeeHaa Nice
 
@skripted isnt 03 base-8 ?
 
github.com/moaex Nothing yet :)
Acutally I think I might put some stuff on there later today
 
@lawm What language?
And what kind of project?
 
@PeeHaa Maybe some random thingies
jQuery, CSS, Webby stuff
 
oh ... jquery .. i see ..
2
 
5:22 PM
@tereško yeah just look at my profile :)
I came from ScratchLand
 
well .. you still have not figured out how to use JsFiddle ... but that's all i can tell
 
@tereško ?
 
case & point : jsfiddle.net/pXaSC
 
@tereško Oh I had copied and pasted from coda and was too lazy to put the things in the separate boxes if thats what you mean
 
view-source to see what you actually produced
 
5:25 PM
Too bad flagging them often results in "helpful" and the question still being there :P @animuson — PeeHaa 7 mins ago
Am I the only one who stopped flagging because it is useless?
 
dunno .. flags usually work for me
 
Must be the fact they just hate me in that case
 
@PeeHaa i tried 3-4 time .. and just got result helpful without any action
 
Aaaah. Great. The mods hate you too :D
 
from last 50 flags , only 4 did not result in a deleted post/answer
 
5:29 PM
And that's only the last 10. Amongst which was also:
> Please delete my question. It was a stupid question and the top answer is pretty terrible. Thanks – Dec 12 at 19:36 declined - a moderator reviewed your flag, but found no evidence to support it
 
with very low quality
 
@PeeHaa Which one is that?
BTW, your alt PHP manual looks really helpful, I might read it later
 
@lawm Thanks! It's not finished though (it's on my list for this year :) ), but if you have any suggestions I would love to hear them.
 
@PeeHaa MySQL and security maybe
 
@lawm It's in the todo :)
 
5:38 PM
@tereško There is already an arduino tag on SO, so I think a chat room would be great
 
@lawm may i ask what is arduino ?
 
@NullPointer Sigh
It's a microcontroller you can program to interact w/ the physical world
 
@lawm there is a Java room in SO .. it currently has one user ... this might server you are a reality check
 
@lawm do you want chat room for this ?
 
@lawm As @tereško stated it might be hard to get people in there. There are only 1319 questions (but it seems getting moar momentum on SO lately). But when there aren't always some people in the room people won't spend time in it.
 
5:40 PM
@PeeHaa It would be nice though
You never know
 
"nice" how ?
 
@tereško The current arduino community sites are plagued with spammers
Yeah I know it's not a significant reason
 
@lawm .. that is actually a sign that nobody is bothering to maintain it
 
@tereško Doesn't mean there aren't any people out there that use Arduino
 
@PeeHaa The first two were closed before you flagged it (looking at the history). Don't understand why the third one wasn't closed, but that's fixed now. Feel free to @ me in other situations where this might happen. I can't handle all the flags, you know. — Jolly Old Saint Nicholas 38 secs ago
 
5:43 PM
a tech site with spammers is a dead tech site .. such sites in general are not even what you would call "target market" for spammers
 
@tereško The site's using crappy forum software
 
even the "shitty forum software" gets somewhat regular updates to prevent spam
 
But SO doesn't have spammers and it has a lot of arduino-ers
Nevermind forget it
 
@lawm so does have stackoverflow.com/… but community and mod however controlling it
 
@NullPointer uuups. You wanted to create a reference answer? stackoverflow.com/a/14032144/367456
If so, let me know we can undelete it.
 
5:51 PM
@hakre yup .. exactly ..
 
@NullPointer You want to place it at an existing QA that has some linkage already?
 
one more vote needed
 
Please vote and then we can upvote the answer to the sky so it is on top.
 
... i would do what you guys think is better ..
 
We can also reference this in the error reference so the link is documented somewhere
@NullPointer vote to undelte it.
 
5:53 PM
@hakre done ...
that would be nice
thankyou guys
 
If you like you can cast your delvote here: stackoverflow.com/a/14032107/367456 - I voted 1x down to be able to delvote but also gave some rep back to him.
 
i can delv to answer .. :(
 
user1125394
why there's no active python room
 
@cyril no one love to chat on python
 
user1125394
6:09 PM
how many lines does it take to write this in php?
 
user1125394
def parents(cell):
  return [cell[:i] for i in range(1, len(cell))]
 
user1125394
(stupid thing that returns ['f', 'fo', 'foo'] from 'foo'
 
@cyril do you want python chat room
 
user1125394
yes alone, that's cool
 
@cyril if you want than i can create ..for you and make you owner ..
 
user1125394
6:12 PM
and fill it with 10 bots so it looks active :p
 
@cyril lol... than we need help form js chat room ..lol
 
wh0
hi,we had a little debate btw java and php for web. the biggest point they had was java code is not readable once it is deployed. Files will be in class(byte code) files so ppl cannot change it after deploying. Does PHP provide a way in which your code will be converted to machine readable code before deploying it so ppl cannot change it.
 
Hi guys, I created a website in PHP and I would be glad for a feedback. Can I post the URL here or is it against the rules of the chat?
 
@MartyIX i can try
 
wh0
@MatryIx even me
 
6:16 PM
So the link is: online-domain-tools.com
thanks!
 
user1125394
> Does PHP provide a way in which your code will be converted to machine readable code
 
user1125394
yes by programming cleanly
 
Okay, this is getting crazy:
Thank you hakre. Dou you want to show banner, which link is not working ? — Arthur Smith 2 mins ago
 
user1125394
Doudou
 
@NikiC: Did you mean that by indirect not funny?
 
6:16 PM
@hakre lol
 
wh0
wat do u mean programming cleanly
@hakre : i want it to be converted to byte code is it possible
 
@NullPointer I'm interested in anything that is possibly wrong with the site. Whatever that pops up in your head :)
 
user1125394
php is not compiled
 
@wh0 Oh your question was actually not fun - sorry.
@wh0 Not PHP on it's own. But a company called Zend tries to make some bucks out of that, yes. However other companies are offering the same for a lower price.
 
@MartyIX its nice ... let me see further
 
6:20 PM
:)
 
wh0
@hakre:thank u . so using zend i can convert php into not human readable format is it ?
 
@MartyIX every thing looks fine to me ... just little problem in html validation
 
wh0
@hakre so using zend i can convert php into not human readable format is it ?
 
@NullPointer Thanks. I'll check the validation. I must admit it's a thing that does not have a big priority for me when I do projects. I should make an automated solution to test it for me.
 
6:29 PM
@wh0 Well, there are other ways, too, for the "not human readable format". But basically, yes. But I dunno if they still offer their product.
It makes no sense to hide away the source-code, it only degrades the software and developers know they can trick their employee big time.
But probably that is the reason why you're asking, no idea :=)
 
wh0
@hakre i wanted to know the way java does develop in .java and deploy in machine readable format(.class) it is like hiding the source code only right
?
 
@wh0 No it is more than that. It is the source compiled into bytecode that can be executed by the java virtual machine. I bet if you look for a description of how java actually works, you will find all your questions answered.
And now the avatar is tiny.
4
 
hi
what could the error be in this line
$query = "insert into books values ('".$isbn."', '".$author."', '".$title."', '".$price."')";
 
wh0
@hakre i know all those stuff. But wen we were debating abt java or php they were arguing abt the point that anyone can change the code after deploying it they dont want our clients to be changing our code after deploying it.
 
user1125394
@PeeHaa ping status.peehaa.com
 
user1125394
6:40 PM
> timeout ......
 
user1125394
@Shubhank read about prepared statements
 
where?
 
user1125394
php PDO
 
i know about PDO
this is my sql statement..
and it is showing error in dreamweaver although there isn't any
 
6:56 PM
Can prepared statements be achieved even with Mysqli?
 
i kind of fixed that...looked like dreamweaver bug..
pasted the book source code provided ..which was the same and it does not show the error
 
night ....
 
merry whateverthef**k everyone
 
7:16 PM
@Shubhank if that is the code you are writing , that you do not know about PDO
also , why on earth would anyone voluntarily use dreamweaver ?!
@Wired yes, only limitation is that you cannot use named parameters
 
user1125394
7:32 PM
the ->bindParam is just PDO you mean?
 
user1125394
anyway idc, will never use mysqli
 
well , you can bind parameters in both , but in mysqli you will have to bind them to positions that a are noted with question marks
 
user1125394
k
 
7:55 PM
@NikiC I'm interested in using github.com/nikic/PHP-Parser and in the documentation it says it can be used to find security issues. Is there an example you can provide me of such a use? Thanks =o)
 
Hey everyone
I've ran out of enriched plutonium, so I had to put Uni on hold for the holidays.
 
user1125394
in SQL how would you store a multicategory property
 
user1125394
like public variable that belongs to ['beginner', 'intermediate', 'expert']
 
8:05 PM
@cyril many-to-many relationship
 
user1125394
public could have intermediate and expert state
 
And that sounds more like tags, and less like categories.
 
user1125394
yes tags
 
user1125394
but I'd like to be able to query for tags intermediate AND expert
 
8:06 PM
You have a table items and a table tags, each detailing the information of each
Then you have a third table, items-tags, which is basically:
tag-id | item-id
Where none of them are unique (but a combination of both is)
This way, you can have many posts with the same tag, and many tags on the same post.
 
user1125394
hm k and tags table has 'beginner', 'intermediate'.. as columns, I can't add one later?
 
@cyril look up: "junction table"
 
Yo yo yo
@cyril Status was: eating meat
 
user1125394
o k I'm tired tags would be rows in tags table
 
user1125394
thx
 
user1125394
8:16 PM
@PeeHaa good digestion
 
@cyril that table-thing is actually covered in first chapter of SQL Antipatterns \
 
I've eaten waaaay too much. So I'm trying to drown my food in whiskey to make it behave
 
user1125394
yes I know it's basic
 
user1125394
trying to convert a nosql app in sql
 
8:18 PM
@PeeHaa Not the brightest idea you've had
 
@MadaraUchiha Only thing I'm good at :)
 
Hi @MadaraUchiha & yeah the execution ;)
 
@cryptic nope, I don't have any examples for that
 
8:30 PM
@OlegOrlov Ternary is almost never the good thing ™ to do
 
@OlegOrlov I only ever use ternary operator for very small, very obvious, readable cases.
Where an if/else block would seem excessively large.
 
Sometimes I love to give these answers:
0
A: Imagick Command Line to PHP Class

hakre The question is, how to convert these commands to PHP Imagick class ? That is merely straight forward. You need: The code of the class The PHP Imagick Manual The description of all ImageMagick: Command-line Tools You then to through the code, pick out the sequence of the commandline call...

 
8:46 PM
hey guys i need some help with cgi script with php/html, i got it work on local but dont know how to deploy to web host online?
 
@Arsalan webhost has PHP enabled?
 
@RobertHarvey I can only speak for the PHP part of the community (but I'm pretty sure most people will think the same) and the fact that SO becomes more and more a personal troubleshooting site / Google results fetcher only helps degrade the overall quality of the site. And imho there is nothing to decide regarding this, because as far as we care those type of questions simply do not belong on Stack Overflow and we will do whatever we can to keep the site as clean as possible (and we are more than grateful for the help we got from the mods). — PeeHaa 9 secs ago
 
user1125394
doing 2/3rd of junction tables, with a entries tables, a entriestags table, but no tags table since it would have one column
 
@PeeHaa dont you think i have tired to google the question in fact i spent most of today and yesterday researching and nothing is working and stackoverflow was last resort. Im sorry you feel that way.
 
@Arsalan Huh?
Anybody knows how to merge two tickets on github?
@MadaraUchiha @DaveRandom @hakre @others interested: github.com/cv-pls/cv-pls/issues/55
 
8:58 PM
@PeeHaa Close both but create a new one. Tell everybody who took part in the first two should report what they still seem appropriate to the new ticket :)
muhahaha ;)
 
Eeeeeek :)
So that basically means: not possible? :P
lol
> how please thanks.
 
trying to find a decent designer appears impossible, sigh
> gives up and eats cookies
 
@NikiC I started playing with promise-based scheduling. do you plan on implementing delegation?
 
9:18 PM
5
Q: Merge differents issues on github

AntoJsSometimes the developers open new issues regarding the same subject. It will be great to have the possibility to merge the issues. If it is possible in github, how can I do it? If not, what is the best way to link the different issues?

 
@MadaraUchiha Thanks
 
@PeeHaa ;)
 
> You've reached the maximum of 16 Deletion votes per day; come back in 2 hours
:(
 
9:43 PM
That's actually a very good idea
 
No idea how that would work with pr0n
 
Gimme the treadmill, the laptop, $500, and about a week, and I think I could build that.
okay, a week plus shipping for the parts from sparkfun or something.
 
Someone seriously tried to break a hash by replacing arguments with it. I’m not sure what to make of this.
0
A: def mysql_password SyntaxError: invalid syntax in Python

minitechArgument names can’t start with 6. Did you mean to call the function? def mysql_password(pass): """ Hash string twice with SHA1 and return uppercase hex digest, prepended with an asterix. This function is identical to the MySQL PASSWORD() function. """ pass1 = hashlib.sh...

 
@minitech Maybe he thought the * made it a variable or something and didn't think "oh I need a string here"?
There's no accounting for newbies and idiots.
 
@Charles See the comment :'(
 
9:51 PM
At least newbies are curable.
@minitech Right then, putting him straight into the "idiot" bin.
 
@hakre We need instagib :)
 
@PeeHaa yes, I flagged, too. ;)
 
Soft disagree on the dupe. The dupe actually uses mres.
 
@minitech Hi! How to get the pirate hat? I'm missing it and I don't understand the riddle.
oh shit, answers come already in. Just close it away ;)
 
9:56 PM
@Charles Oh, nevermind. It was just badly phrased. He's trying to reset the password by making a new hash. My faith in people has been restored.
 
@minitech You have an oddly high level of faith in people for being in this room.
 
@hakre Hey, it’s a secret! :) Hint: it’s like the Populist badge, but a little easier to get.
 
@minitech oh please tell. really, I have a hard time :)
 
@hakre Hey, just aim for the Populist badge. You’ll get the pirate hat too.
 
@minitech Okay, I can live with that. :)
 
9:58 PM
@Charles Eh, I haven’t been exposed to its effects for too long. :D
 
@minitech Oh don't worry, your soul will be crushed soon enough.
 
Anonymous
am on fire today.
 
I have a JS question, but no one is there so I'll ask here: I have a textbox. As soon as the user enters a url in it, an image box's image is automatically updated to the image that the url points to. For some reason now, as soon as I click the textbox to enter a URL into it, the focus is lost. It takes a millisecond after the click for the focus to get out.
I am not sure why.
Anyone?
 
@DemCodeLines Do you have a jsfiddle to go with that question?
 
10:14 PM
Let me create it
 
kk
 
posted on December 25, 2012 by Paul Reinheimer

This has been a long time coming. Sean Coates, Joel Perras, and I made an attempt a few years ago, pounding out a good start over a weekend holed up in Sean’s house. Unfortunately, once we left the momentum was gone, and it’s just gathered dust since. More recently, at True North PHP, my love for the tool was rekindled, and an off-hand remark to Mark Story led to some vague agreements abou

 
@TheCOMPLETEPHPNewbie you can do switch (true) but that's a bit messy imo.
 
10:27 PM
@igorw I just love those, but you are not the first stating that :)
 
@igorw Hm?
 
@NikiC what's the hm referring to? delegation or switch-true?
 
@hakre, copy/pasting bad "help/thanks" comments to ESL users is cruel and unusual punishment. :p
 
delegation. not sure which delegation you're referring to
 
@Charles link please :) And yes I'm guilty. ;|
 
10:29 PM
That's just mean.
 
@Charles oh yes, that was very interesting.
 
@NikiC maybe I've got the wrong word. the thing that allows you to forward to another generator?
 
... and he didn't even realize you were making fun of him.
 
@igorw ah, no, that was right
 
I like the last one: "You look new to computers." :D
 
10:30 PM
@igorw I plan to implement that, but not for 5.5
For 5.5 you'll have to use the stack based approach
 
So now that 5.5 has generators, what modern language features are left to try and wedge into 5.6? :p
 
@Charles The real mean thing now is to remove the comments - but keep the first one. Then it looks really mad.
 
@hakre That's evil. What are you, the grinch? ;)
 
@Charles I just wanted to be helpful. As I could not imagine something useful, I thought, why not try with random stuff, maybe this turns something out for the OP. Just the common summer of love thing. - being as helpful as possible and all with good intentions.
 
Anonymous
What is the difference between in switch statement..

case >5
or
case ">5"
 
10:32 PM
@TheCOMPLETEPHPNewbie first one is syntax error. Second one tests the string
 
@hakre You're weird.
 
@Charles muhahah :)
@Charles What actually is interesting is, that because they get something back as feedback, the help vampires continue to argue with your comments.
I mean that it completely makes no sense - and therefore couldn't even for themselves - shows that it's only some reflective action by the OP.
 
@NikiC ok, I guess it's not too hard to work around that. leaving off parentheses for assignments would be nice though.
 
user1125394
are sql queries with many AND performant (like lat > 42 AND lat <43 AND lng > ... ?
 
@igorw Delegation is pretty tricky to implement, that's why I decided to leave it for later. What I could have done is go for an implementation like the one in Python, which basically traverses the full generator call stack every time you do a call. That's rather straightforward, but does not quite meet my quality criteria for PHP.
 
10:36 PM
@hakre I blame the whole not-grokking-english thing.
 
Anonymous
@PeeHaa

I meant

case "<5";

case < 10:
 
1
A: multi-condition php

Shaquin TrifonoffGive this a go (demo): <?php function icon($item) { $icons = array( 'buyer', 'buyer', 'good buyer', 'top buyer' ); if($item / 5 > count($icons)) { $item = (count($icons) * 5) - 1; } elseif($item < 0) { $item = 0; } ...

 
@cyril Depends on the database and the type of indexing. MySQL, for example, will hate you forever if you try and do that.
 
user1125394
SQLite
 
@TheCOMPLETEPHPNewbie In that case the first matches the string and the second is a syntax error
 
user1125394
10:37 PM
I guess worse then
 
@cyril Yeah, it'll suck, but only as much as MySQL. At least, being SQLite, your data set is probably going to be small so a full table scan won't kill you... right?
 
BTW I don't know what the first one with the semi colon does
Although IIRC brainfuck PHP allows them
 
@igorw Yeah, I didn't know how annoying those parentheses are before writing my blog post. Would be really good to get rid of them
 
user1125394
@Charles no, but the idea is to be performant even with large entries, I'm going to query things inside bounding boxes, and can use this instead code.google.com/p/geomodel/source/browse/trunk/geo/…
 
Yep. PHP is brainfucking people again: php.net/manual/en/control-structures.switch.php (last example)
 
user1125394
10:39 PM
the 4 AND's are replaced by a join
 
@Charles Okay, next time I'll pass the "comment" through google translate to traditional chinese. :)
 
user1125394
geocells are a powerful way to assign ids to geographic points
 
user1125394
when you want to search in a box, you will just search for a set of ids
 
@cyril Hmm, maybe you should be using a different technique for this. Some databases, MySQL and Postgres included, have column types and indexing designed to contain geographic or shape data...
 
user1125394
@Charles I'd prefer to make it myself, than relying on specific technos
 
10:42 PM
You regarded three solutions, but you forgot an important and useful solution for your case. It is xml documents. parsing xml is quicker than parsing text files, and more solid than file system. — sємsєм 1 hour ago
 
Anybody in here has IE10 running on something?
 
Moar IT Wisdom
 
@cyril Fair enough; last time I looked at those functions my brain melted anyway.
 
@PeeHaa Heh, I just got rid of it about 15 minutes ago :P
 
@minitech :(
 
10:42 PM
@PeeHaa I have IE10/2*1.2 running on my desktop, why?
 
@hakre google.com/… -- pardon my french.
 
@hakre In a few days I'm going to do some browser tests for my uploader. I need a crash test dummy for IE10 :D
 
@PeeHaa Yes, I happen to have IE10...
(Windows 8 RTM)
 
I might ping you guys @ShaquinTrifonoff and @hakre later to do some tests for me if that's ok with you?
 
@PeeHaa Yep, that's fine
 
10:45 PM
Great!
 
@PeeHaa I do not have IE10 installed and it looks like I never will!
Just to make this clear now. once and for all. :)
 
lol
 
@PeeHaa but I can test with IE6.
 
I only now see what you wrote earlier :P
@hakre Not really planning on having to support IE6 if you don't mind ;)
 
Please upvote me, I would like to see if I can get the pirate hat:
5
A: multi-condition php

hakreBetter than a bunch of conditionals is to look for a pattern that allows to just calculate it. In your case it looks like that are steps by 5 - so appropriate for division.

(I need to have more votes than the accepted answer by some degree)
 
10:48 PM
Guys anyone of you uses submodules in git?
 
@hakre lol
 
@Eugene Define "use"
 
@Eugene No, and run. Unless they fixed the pinning behavior you are in for a world of pain.
Why couldn't they just have made them like svn:externals? Noooo, had to go and do stupid things with'em instead...
 
@PeeHaa use as use :)
 
10:50 PM
@hakre using an array for that stuff would have been my approach, so I'm upvoting the other one. sorry ;-p
 
@PeeHaa yep Artax is submodule in this repo
 
(although I would have probably gone for an assoc array and loop, for more flexibility)
 
@Eugene So yes I am using a submodule :D
 
@Eugene I am biased, but imo composer is way superior to submodules and pear.
 
@igorw well, that was based on my idea. but you ruined it now. thanks!
 
10:52 PM
@PeeHaa I also see, that this repo is forked by you
@igorw it depends on context of usage
 
Yup it's a project of @Lusitanian and me
 
@igorw Can you imagine why I suggest to devide? Maybe to map it onto an array ? ;)
 
@PeeHaa anyways I more interested in bitbucket, rather then github
 
@hakre I did not upvote for the division part, that one removes flexibility imo. I upvoted for the array mapping part.
 
Aaah. In that case: sorry :)
 
10:53 PM
It seems to me, that they have a bug there with them, but I'm not sure. Need confirmation from someone else.
 
@igorw The division part is precondition for the array mapping. So you need to actually tell how that matches with your mental model than. array without division.
 
But regardless, I did post the link to my answer because of the hat and not because of the content.
 
@hakre only if you want to map directly. imo a loop with < condition is better, as it allows for more flexible steps.
:D
 
10:57 PM
> Congrats, you've gained the privilege – cast close and reopen votes
yay!
 
@ShaquinTrifonoff Gratz :)
And welcome to the :0
 
@igorw Okay, well then: stackoverflow.com/a/14034430/367456 - Yes, you are right!
 

« first day (801 days earlier)      last day (4150 days later) »