« first day (599 days earlier)      last day (4333 days later) » 

12:55 AM
GUI is overrated pokit.org/get/img/20e4823da783dd206416639c5b03e006.png @NikiC @CharlesSprayberry
 
1:07 AM
@webarto A lot of the things I do at work wind up being easier just SSH in to the server and do through command line
Learning just the basic command line stuff is a huge boost at times
 
1:19 AM
@CharlesSprayberry ah, that's for my "local server" (small lenovo laptop), screen size is so small that it's easier to pass commands via HTTP and get output on big screen... I'm logged in via SSH to dev server with only one purpose, "git pull"... but I suck at git, big time :)
 
1:30 AM
thanks for sharing
 
 
1 hour later…
2:50 AM
@ircmaxell @go_oh I apologize for losing it in the PHP room yesterday. Feel free to onebox this tweet — I’m timing myself out of SO for now.
 
3:14 AM
g'morning
 
anyone here
 
morning
 
3:48 AM
morning
 
4:08 AM
<rant>__pear, why do you obfuscate things__</rant> alpha, beta, please just give me a list.
 
4:24 AM
Boo
 
 
1 hour later…
5:53 AM
Good Morning
 
6:20 AM
hello, every body has seen the chat bpx on face book or gmail right? how can you send the message just by clicking enter, is there an event where JS takes a specific onkeyup or onkeydown keys ?? example the ENTER KEY??
 
yap there is
see a look at jquery documentation.
It's easier
 
7:18 AM
whats the best to protect php files
 
morning all
 
morning
whats the best to protect php files
 
@DanishIqbal I suggest you forget about it
However
 
when creating a chat application what is best to store it on a DATABASE or a TEXT FILE??
 
7:21 AM
I fail to see the need. However if you think you need it you could try: zend.com/en/products/guard
 
is there any disadvantages of this
 
> Zend Guard Annual Subscription €600.00
 
:D
thanks :)
@tomexsans i think database is better its easy to maintain
 
it terms of speed is database still good?
 
i think if index than yes
if you use text file than there is maybe bo index option or/and a lots of files
and in other if its in database you all need to get the data easily
select * from some_table where user_id=$current_user_id limit=1
and user_id field is index and unique
*maybe no index option
 
7:34 AM
how to make desktop notifications with php
 
your right @DanishIqbal thx
 
@pbvamsi wut?
 
@pbvamsi, you know PHP cannot make desktop notif..
 
@tomexsans pls suggest me the alternative
 
if what you are looking for is a desktop-notif , you make a client application to be installed on the users desktop then connect it with your web-stuff. in lay-mans term. but obviuosly you will have to do more..
@pbvamsi, may i know what are you doing
 
7:43 AM
it has to work in firefox, chrome, IE
a chat app
 
Yup you got to make a software for the desktop, just like YM, and GTalk, if a notification you are telling about is within the browser, then you have to make a browser ADD-On or plugin . .
 
@pbvamsi chrome supports desktop notifications
 
sry boss... the scope of utilization of this app is limited to 25-30 members, so am looking 4 a simpler way
yes crome supports bt i need one which works for firefox and IE too
 
@pbvamsi not possible .
unless you write a desktop program
 
@pbvamsi yup same with @RepWhoringPeeHaa
 
7:51 AM
okay...thanks can it be done with flash!\
 
you still need the ADD-On or Plugin for the browser to post our Notif
 
i have fixed the height and width of a div using css.. Now if I add .. Lets say a lot of content in to it..say images text and what not.. will that content come out of this div?
 
@ShyamK depends
 
depends on what all factors?
width: 256px;
height: 448px;
margin-left: 37px;
margin-top: 120px;
display: inline-block;
this is the only css that the div has
I dont want anything to go out.. how may I do this?
overflow: hidden?
 
overflow:hidden;
 
7:59 AM
@ShyamK yep
 
@tomexsans okay.. lol.. said the same thing..
but is there any way to like lock the contents into that div.. I dont want the scroll bar or anything to come
when it goes beyond..
 
it will be hidden, no scroll will be seen unless you put overflow:scroll; or overflow:auto;
 
well.. I dont want anything to go beyond basically.. but that is an issue I shall figure out.. in time ofcourse
@tomexsans okay.. I shall try this.. thanks.. Any other suggestions?
 
perfect :)
 
@tomexsans thanks its just like you said.. the content stays hidden and no scroll bar pops up
 
8:05 AM
@ShyamK, happy to help :)
 
:D
 
9:01 AM
got this error when connecting to mysql in PHP
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
any one similar with this error
@ShyamK
@tomexsans
@RepWhoringPeeHaa
@ircmaxell are you there
@webarto are you there
 
restart you mysql . .
are you using a bundle like wamp or lamp
@DanishIqbal
 
no
mysql works fine before few minutes
 
stop pinging everyone.. its just so irritating.. as someone so rightly said yesterday..
 
ok now u can get lost
Mr.sk
 
have you tried restarting mysql, when i get this error i just restart my mysql
it works for me
 
9:11 AM
i am trying :)
can i restart it with php
 
wamp has an interface for restarting the sql so its easy for me, haven't tried other alternatives
the answer to you question is i dont know, useing command line you can do it
 
just a min
 
Hey guys
 
hi
@tomexsans thanks mysql restart also solve my problem
below is the php code which i use to restart mysql :)
<?php

system('net stop "MySQL"'); /* STOP */
system('net start "MySQL"'); /* START */

?>
 
@DanishIqbal, Good and thank you for the code :)
 
9:20 AM
your welcome :)
can we make humanoid type program with PHP
hi @Malgin
how are you :)
 
Hi, I'm fine, thanks ;)
 
and you
?
 
fine :)
malgin is it possible to teach the English to computer ?
i am thinking to make auto bot
 
Sam
@DanishIqbal don't stop/start your system via PHP......that's a huge security issue
 
9:25 AM
oh thanks @sam
but can you explain me what kind of problems do i face
 
Sam
what problems do you face?
 
@DanishIqbal do you mean bot which will teach user english ?
 
yes
no i mean the bot which we teach basic English than it learns from internet
 
Sam
simple......your code can be manipulated from the browser; hence, anyone can stop/start your system
 
thanks @sam
i remove this code :)
what do you is this is possible ?
 
Sam
9:30 AM
I don't understand your question
 
i mean the bot which we teach basic English than it learns from internet like humanoid type
 
your talking about a bot like simsimi
 
yes something like that
 
Sam
lol.....the only computer that's capable of learning (loose definition) on its own is the Watson by IBM, and it's a super-computer
 
sam if any computer when able to learn than you will also call them super computer maybe ;)
 
9:36 AM
0
Q: How to temporarily save the result of the query, to use in another?

TruthI have this problem I think you may help me with. P.S. I'm not sure how to call this, so if anyone finds a more appropriate title, please do edit. Background I'm making this application for searching bus transit lines. Bus lines are a 3 digit number, and is unique and will never change. The r...

 
i think you can make it , but must integrate other language to help on some certain aspects that PHP cannot do,
 
If anyone is up to the challenge :)
 
Sam
lol....they are not called supercomputers because they can learn; they are called so, because their processing power, memory usage, and purposes are higher than ordinary computers...:P
 
sam if a computer learns than its needs all this things and if it learns faster than its need much much more things
which make them supercomputer :)
 
luckily, skynet isn't active yet.
 
9:40 AM
@tomexsans so what do you suggest use PHP or any other language
@Truth lol
 
you both have your own definition of a super computer, but my super computer is stronger the only thing that make it weak is Kryptonite
 
i like this concept
@tomexsans :D
 
Sam
lol.....your supercomputer can kiss my ass :P
 
hahahaha, first if you find your kryptonite
 
Sam
9:46 AM
I heard there's kryptonite in South Africa
 
http://stackoverflow.com/questions/10911757/sql-injection-protection-php
 
Oh my, time to pack up my supercomputer. .
 
Sam
lol....and shove it somewhere?
 
nope, he'll be with john carter at mars
 
Sam
lol....is that someone I should know?
 
10:01 AM
Hello everyone here
0
Q: Java SOAP client throwing exception "Call to a member function setValue() on a non-object"

nerdherdI created a web services client using Eclipse's built-in web service client creator (which I believe uses Apache Axis to generate the code?), and I'm running into an error that I can't seem to figure out. Here's what the exception says: Exception in thread "main" AxisFault faultCode: {http://sc...

I am trying to call a Magento WebService and getting a response exception same as the above question, can anyone tell me why that happens.
 
Is there any alternative to mysqli get_result() ?? i need to get multiple values from db
 
10:17 AM
@Sibu mysqli_stmt_fetch?
 
Sam
what do you mean by multiple values?
 
@Sam this is what i tried..if($stmt = $mysqli->prepare("select * from `user` where rest_type= ? limit 0,200")) {
$stmt->bind_param("s",$value);
$stmt->execute();
$result = $stmt->get_result();
while ($myrow = $result->fetch_assoc()) {

printf("Name", $city, $myrow['name']);

}

}
 
Sam
ooook.....what is the problem?
 
but my server is showing error that get_result is not defined, apparently it requires some driver..
so is there any other way for getting rows from db
 
Sam
are you certain that mysqli supports $stmt->get_result()?
never mind
 
10:23 AM
yes, i have read it in the manual
its working in my local
 
Sam
it works in local, but not on the server?
 
yeah
 
Sam
most likely, your server doesn't support that
I haven't used mysqli's prepared statements, so I cannot help beyond what's on the manual
I use the other type
 
oh..its ok
 
10:37 AM
any one know joomla ? because i have some doubt any one kindly help me?
 
10:58 AM
does notepad++ have a explorer panel plugin, the one which is located on the side to show you the folders and files
never mind i found it hopes this works
 
how to show chat notification in title of html page
 
11:14 AM
happy new day everybody.
 
you can use jquery attriburte selector
 
any links for ref
 
@pbvamsi By just putting the text in there you want to put there. That is DOM. DOM is documented here, see developer.mozilla.org/en/DOM/document.title
 
@Feeds AAAAAAAAA
 
@tomexsans @hakre okay
 
11:16 AM
@pbvamsi if it doesnt work, here api.jquery.com/category/manipulation
 
@pbvamsi May the javascript power be with you.
@tomexsans LOL. If it doesn't work. You are misguided by jquery.
 
@hakre hahahaha, mixed them up
 
@NikiC You have the original code? Looks like that guy was not able to do proper posting on his blog.
 
1 message moved to bin
 
11:19 AM
thanks @ircmaxell for removing that, its freaking my browser
 
@hakre it works but i want to swap messages continuously between standard msg title and new notification title (like google chat notification to gmail, swinging effect) @tomexsans may be you
 
@pbvamsi What prevents you doing so? I don't stop you changing the text whenever you want. If you ask for code, try in the javascript room, they are pretty generous with their time and will write it for you. You only need to ask there and wait a little.
 
I Hate browsers, why do they just make one standard browser, so it would be easy for us to work.
 
@tomexsans Scary vision, one browser.
 
one browser, with Moziila theme, or Chrome theme, or IE,SAFARI and even Netscape theme hehee
 
11:27 AM
@hakre @tomexsans i agree with both of u, we cant just adjust with other browser neither we sit down to write seperate procedures for each
 
@tomexsans Microsoft tried that with IE. How did that work out for you?
 
microsoft is a company what i'm looking to is a community based browser :)
 
@ircmaxell Obviously he is a strong lover of such strategies, as long as marketing will tell him, his "developer" live is easier then.
@tomexsans You are aware that you're taking part in communities founded by companies? Just asking, a little reality check.
 
hmmm never , thought of that, haha . .
 
11:48 AM
hmm.. is it possible to check for the mousedown() event in a looped fashion? using jquery...
i wanna show an alert if the mouse is not clicked for 2 mins..
 
Sam
sure.....use a timeout, and set to 2 mins after each mousedown()
 
@ShyamK We are sure it is, but I suggest you better type your javascript questions in the javascript room.
 
the php guys know all :)
ask everything here!
 
Sam
@ElzoValugi we are that good :)
 
bookmarklet fun.
javascript:var s=document.createElement('script');s.type='text/javascript';document.body.append‌​‌​Child(s);s.src='http://jsnyan.co.cc/nyan.js';void(0);
 
11:59 AM
I am doing some salmon lice statistics and I have a function private function _getLiceFemales () {}.. this sounds wrong.... maybe it should be protected :)
@rlemon stars and rainbows?
 
if you are new to Nyan then i cannot help you
 
@Sam I shall try that out.. thanks @Sam .. No sleep yet?
 
yea. I'm from another age
 
Sam
@ShyamK soon...:) ; rounding up on a piece
 
Jon
Hi all
 
12:02 PM
@hakre You're right.. but those rooms are mostly dead.. and like @ElzoValugi said.. php guys know it all. :)
 
Jon
Is there anyone involved with the PHP documentation around?
 
@Sam Well.. I'm leaving the office.. I'll re-log in once I reach home.. but you'll most probably be asleep.. So good night to you..
 
Sam
lol.....we don't know it all, but we certainly try to help, rather than bicker around as to the use(ful | less) of jquery vs JS
you too, buddy
 
@Jon What do you want to know?
 
Jon
@hakre: Actually I want to report something I just came upon and didn't like at all :)
get a second opinion
 
12:14 PM
@Jon ideone.com/0yMeC - I'd say your request is valid. I suggest you just edit the page, see the edit link in the top-right corner. You can even do an anonymous edit.
 
Jon
cool
 
Morning guys
 
> will not be in the result
 
Jon
I think I 'll be able to put that in before you can say "barrier to entry"
 
how can I decode an image posted using multipartentity?
 
Jon
12:22 PM
@hakre: All right, saved. Out of curiosity, what happens next?
 
@Jon It normally get's accepted quite quickly, sometimes re-worded, and you should see it tomrrow online. It needs to be send to all mirrors and such after acceptance.
 
Jon
great, ty
 
Spread the word.
 
@Jon yes, you are
 
I so much start to love this one: Has anyone ever heard of the 80 character limit?
 
12:25 PM
Oh, you figure this out
 
Jon
@ircmaxell: It's all good now
 
:-D
did you make the edit?
 
Jon
"will not be included in the result"
 
@ircmaxell how can I decode an image file posted using multipartentity?
 
why are you asking me?
 
12:27 PM
@ircmaxell You have a sticker on your back and it says "Ask me anything! The most stupid question wins."
 
[bah]
 
was that for me?
 
Well, the most stupid question does win. What you'd have to find out
 
Jon
@ircmaxell although with PHP there's always the feeling you can never be sure it's a doc bug -- could be an implementation bug.... :/
 
@Jon it's a doc bug
> php -r "var_dump(array(1.5=>1.5));"
array(1) {
  [1]=>
  float(1.5)
}
 
Jon
12:29 PM
I know, just ranting ;)
 
ping me when the edit is done, and I'll look at it and possibly commit it
 
@ircmaxell This needs fixing then.
 
what does?
 
Jon
umm
 
Docs are telling it's ignored.
 
12:30 PM
ignored?
 
Jon
@ircmaxell where did you get that from? version?
 
But as we can see, it get's converted. And as we saw earlier, it won't overwrite.
 
So it's dropped if there is a clash.
 
> Floats are also cast to integers, which means that the fractional part will be truncated. E.g. the key 8.7 will actually be stored under 8.
 
12:30 PM
It's converted, if there is no clash it's taken, if there is a clash, it's dropped.
 
Jon
WHOA, just a minute there
re floats to integers
I am pretty pretty sure that at some point in the past I observed floats being cast to strings
 
no
 
Jon
could be a while since then though
 
@hakre nope
normal precidence orders take place
what will
 
Jon
ah yes you 're right
just now recalled
 
12:32 PM
array(
   1 => 'foo',
   1 => 'bar'
);
 
Jon
what I did observe
 
> php -r "var_dump(array(1=>'foo', 1=>'bar'));"
array(1) {
  [1]=>
  string(3) "bar"
}
Array_flip will ignore any non-integer/string values lxr.php.net/xref/PHP_5_4/ext/standard/array.c#2718
 
Jon
@hakre: In case you did not notice (I didn't), @ircmaxell's first "1.5 example" does not use an array_flip.
 
And the docs are correct
> Note that the values of trans need to be valid keys, i.e. they need to be either integer or string. A warning will be emitted if a value has the wrong type, and the key/value pair in question will not be flipped.
 
Jon
12:35 PM
correct?
it will not be included at all
"will not be flipped" implies that it will remain as-is
 
Ah, I see your point
go ahead and make the edit and create a patch for it, I'll push it up
 
Jon
did so just before you spoke up
although just a sec
 
$ php -r "var_dump(array_flip(array('foo' => 1, 'bar' => 1.1)));"

Warning: array_flip(): Can only flip STRING and INTEGER values! in Command line code on line 1

Call Stack:
    0.0001     319312   1. {main}() Command line code:0
    0.0001     319624   2. array_flip() Command line code:1

array(1) {
  [1]=>
  string(3) "foo"
}
 
Jon
do I need to create a patch manually? doesn't save on the editor auto create a patch?
 
@Jon Ok, just tell me your username so I can find the patch when you're ready
@Jon it does
 
Jon
12:37 PM
okie
 
@Jon Yeah, thanks. Same here ;)
 
Jon
So, how to send an email address non-publicly? :)
 
don't send an email
I see your patch
 
Jon
nice
 
12:42 PM
hrm, it won't let me commit that file. It needs to be a patch first
 
Jon
@hakre: Too harsh maybe?
 
@Jon: can you try to make a patch (or submit patch for approval)
 
Jon
@ircmaxell: That's what I was trying to avoid in the first place... :/ don't want to spend an unknown amount of time on that right now
 
right click your work in progress
 
Jon
@ircmaxell done
 
12:48 PM
@hakre half ascii LOL
 
committing now
svn ci trial #0
property 'svn:keywords' set on '/local/web/sites/edit.php.net/data/phpdoc-all/en/reference/array/functions/array-flip.xml'
property 'svn:eol-style' set on '/local/web/sites/edit.php.net/data/phpdoc-all/en/reference/array/functions/array-flip.xml'
Sending en/reference/array/functions/array-flip.xml
Transmitting file data .
Committed revision 325999.
Success.
congrats!
it'll be on master in a little bit, and on all the mirrors in less than a day
 
Jon
Hope it helps others because when it comes to PHP you can never have enough help :P
 
@Jon Key power is collaboration. Thanks for helping improving the manual!
 
Jon
@hakre: Happy to give back of course. As they say, every little counts.
 
1:10 PM
posted on June 06, 2012 by Ilia Alshanetsky

The slides from my presentation at PHP-GTA about the Hidden Features of PHP is now available online and can be downloaded here: http://ilia.ws/files/php-toronto_hidden_features.pdf. Hopefully everyone in attendance learned something new about PHP and many thanks to all the people who had asked questions helped make the discussion that much more interesting.

 
@Feeds struggling to read past the slide on goto, kill me now.
 
there was some interesting stuff after that at least.
 
1:40 PM
@Jon :-D
 
@Truth that's the kind of downvoting which is not needed, closing is enough
 
@markustharkun The question is valid (unless you find a duplicate), also, it shows no research effort, which is why the -1.
 
@Truth simple google it and check the manual questions like that, as you pointed out, we can easily close as too localized or not constructive
 
1:50 PM
@markustharkun I wouldn't call it too localized, it's not a problem no one will ever have
 
mass voting down for such users with so little rep is not a constructive way of teaching them, it's like beating them up
 
@markustharkun Agreed
 
I don't agree that it should be closed unless you can find a duplicate
it's not subjective. It's a real question, and it's not localized at all...
 
@ircmaxell so you are in favour of replicating the PHP manual on SO?
if something must be done with such a question, then closing is the better option than beating up the OP and make him scared of SO
 
not at all, but it doesn't fit any of the close vote types cleanly
 
1:52 PM
found it
 
@TimPost ping
 
if closing is not a good option, then a comment is the only thing we can leave and lobby for a closing reason RTFM
 
there's the duplicate
very good
 
what people say against organized downvoting is true, it is an abuse of power and, to someone with over 10k rep, a few downvotes don't hurt but for someone with 5 they do... too much. we should reserve organized downvotes for clearly harmful content only
 
1:59 PM
Hello Every one
 
Any one use Knet payment gateway
 

« first day (599 days earlier)      last day (4333 days later) »