« first day (605 days earlier)      last day (4569 days later) » 

@tereško Do you work as a programmer?
What's your position?
developer (neither senior nor junior)
Is PHP your primary coding language?
01:17
sometimes i do silly mistakes , that I spend hours figuring it out
just bez of lack of experience
i wanted to check whether certain location of an array is empty or not
was doing all the time : if(($pre[0]=="")) instead of if(($pre[0]==" "))
01:30
@meWantToLearn You should have just done: if (empty($pre[0])) . . .
@LeviMorrison wont work
bez im fetching data from mysql
 
1 hour later…
02:51
anyone in here good at git?
user895378
03:11
@LeviMorrison No problemo ... that'll give me time to work out any kinks and also to finally sit down and absorb application architecture tutorials (which I remembered while I was on the treadmill at the gym tonight)
@rdlowrey I can't get phpdocumentor2 to recognize my docblock comments for class properties. I know you use it, have you had any troubles?
user895378
@Paul I only used it briefly until I got annoyed with the template system, but I haven't had issues that I recall. Care to post a sample docblock from a comment?
I tried: /** @var Description */ and multiline, even copy from Artax.
Oh, and copy from phpdocumentor2 code too.
/** @var string the title to use in the header */
protected $title = '';
user895378
I think it needs to look like this:
That was taken from phpdocumentor2 code.
user895378
03:20
I usually do something like this:
user895378
/**
* the title to use in the header
* @var string
*/
protected $title = '';
I think it must be a bug, the BaseReflector.php is returning null for the docblocks.
user895378
are you sure you are displaying non-public properties?
user895378
Because I think they're hidden by default in the displayed html
user895378
oh well, chat doesn't want to format my docblock correctly
03:22
yes, I'm clicking that, the error messages when executing phpdocumentor are of the form: No DocBlock was found for property $title
nope, still No DocBlock with that format. Maybe its the version of phpdocumentor I'm on (the latest from pear)
user895378
Well that does seem strange. I've never encountered that sort of issue. Anything I've used it on "just worked" ... I used Docblox for a while (phpDocumentor2 before it was called that)
oh well, I'll keep tracking it down and raise an issue. At least this is PHP code. Using tools written in a language you love has real benefits.
unless its php :P kidddddingggg
user895378
php doesn't have bugs, so that's not it :)
user895378
@Paul this is true. It's very empowering to be able to know how to get your hands dirty and make something work!
03:28
grace hopper laughs at your reference of a bug ^^
user895378
the hoppppah!
user895378
(regional television commercial joke)
hehe, she would find the real culrpit, perhaps an elephant if it is php.
03:42
Good evening
@NikiC scotmac? never heard of it
Good Afternoon
04:21
hey all
@Paul Good afternoon
04:44
can an external css style sheet be included in the body of a page?
@PeeHaa you guys mind if I pick your brain on your prepared statements advice?
@tereško
@ShyamK pretty sure that have to be within the <head> tags
damn.. I was hoping that it could be added in the body..
why do u need it in the body?
the header is common.. so then I would have to include the the stylesheet there... This would mean editing a file placed at another location.. Laziness.. I guess that would be the answer to your question..
05:03
finally got my mysql prepare statements to work today after a lot of learning but failed on hosts server. Turns out they don't have the mysqlnd driver and it's not an option so I have to use bind_result and fetch(). Which doesn't work on arrays. Anyone know of a workaround?
I've read the manual and few people had some functions they wrote but to be honest I had hard time following.
05:14
@rdlowrey I think I've tracked down the problem. When installing from pear it wouldn't let me install the stable version, so I installed the alpha version, but it was missing this: github.com/phpDocumentor/phpDocumentor2/commit/… Looks like I'll have to give it a try from the git latest (and hope everything just works).
05:31
http://stackoverflow.com/questions/10928368/paginate-records-on-client-side-issue/10929242#comment14290891_10929242
I have a question regarding adding ajax/jquery suppport to PHP pagination here.Please have a look and suggest answers if possible!!Thanks
05:45
posted on June 12, 2012 by Cal Evans

Ryan Weaver’s Blog: http://www.linkedin.com/in/weaverryan Jason Austin’s Blog: http://www.jasonawesome.com/ Jake Smith’s Blog: http://www.jakefolio.com/ Michelangelo Van Dam’s blog: http://www.dragonbe.com/ Adam Culp’s Blog: http://www.adamculp.com/ Ryan Weaver’s Twitter: @weaverryan Jason Austin’s Twitter: @jason_austin Jake Smith’s Twitter: @jakefolio Michelangelo Van Dam’s Twitter: @

06:18
is anybody there?
@rdlowrey mission accomplished, the git develop branch works as expected.
Word of warning to all, don't expect phpDocumentor 2.0.0a5 to document class properties (due to github.com/phpDocumentor/phpDocumentor2/commit/…).
@paul , i am working in cakephp
but its causing whitespace issue in body
and also all head tags are coming in body tag
do u ave any clue?
@Sparkx You know, if you just asked the question without pinging me I would reply?
sorry
but please reply on this
i don't work with cakephp. So I can't help, sorry.
06:28
ok not a problem
06:40
anybody know answer
i heard they have a q&a website for that ;-)
@Jack please see my question above
gah! the claws, it hurts!
Sem
Sem
Good morning
Hello Everyone
Sem
Sem
06:43
@OnlyPritesh Hi :)
Please let me know any user used Knet Payment Gateway before
@sem
hi :)
Sem
Sem
@OnlyPritesh I haven't
ok
Any friend in this group
Sem
Sem
A simple question: Why do people use getters and setters instead of just $this->className->var = "anything"; ?
@Sem imagine you need to change the logic later on? Say, another variable should be updated when you change the value of one
Or you wish to maintain a length property when items are added
when you encapsulate that into a setter, you won't have to change dependent code ... at least, that's the theory :)
Sem
Sem
06:47
@Jack So you mean when talking about attributes that arent just 1 variable?
no, it could also be something like, my volume property should not go higher than 100
so if you encapsulate in setVolume() you can do ->volume = min(100, $newvolume)
same for getters ... like lazy loading ... you don't want to construct a new object if it won't be used
Sem
Sem
@Jack why would you use a getter without initializing an object?
@Sem let's assume you have a property that takes some time to construct (i.e. a big object that has to load data, etc.) ... but it's only used in 20% of the cases
this makes it a good candidate for lazy-loading optimization ... you won't create it immediately, but only once the get() is called
also, you may change the structure of a property with wanting to affect dependent code
Sem
Sem
@Jack Almost get it now.. So you mean your not only getting the property from an attribute, but there are also properties that you only set when you get them?
@Sem Another thing, public properties mean that you can't trust the object state, because it can be altered outside of the class interface (which is testable and hence trustworthy).
06:56
@Sem not exactly sure what you're asking me there
Sem
Sem
@Paul If I can reach the variable I can reach the function as well.
o.0
Sem
Sem
@Jack You're saying getters are usefull when you have properties that don't always need to be loaded?
@Sem but you can test the method in a unit test, whereas you can't test the public property because its access is almost global (it depends on the scope of the created object).
@Sem right, that's one scenario
Sem
Sem
06:59
@Paul When I can type $obj.getName() I can type $obj.name as well right? But what @Jack said explained a lot. Guess it also has seciurity issues if I only use public properties hehe.
Thanks for helping guys :)
0
Q: whitespace and Head tags displays inside body?

rajesh.bakadei was working on french site fully in cakephp,but it was causing file type encoding to embedd the characters to html .So i changed file type to encode in utf-8 in notepad++.but its causing problem and giving whitespace and head tags coming in body of html like this- &#65279; <meta content...

@Sparkx saw it, close voted it :D
@Sem properties can have private visibility, which means you can't access them from outside
@Jack how can it be close i didnt get the right answer
@Sparkx it's a duplicate
i.e. someone has asked it before
07:03
/nods
Sem
Sem
@Jack I know public, protected and private in Classes. Just didn't know know how that can solve seciurity issues. But If you say you use getters and setters for extra possible manipulation and limitation it's actually pretty logical.
right ... encapsulation is good stuff
Sem
Sem
@Jack I'm relativelty new to OOP. And I'm studying next to part time work. This is one of the things teachers never explain.
A good rule is never use public for properties, it is a sign that your class isn't providing the methods that control the interface to your object.
Sem
Sem
@Paul yes, I'll apply it from now on. :)
Anyone here using NetBeans?
07:10
@Sem I have used it.. but currently on Eclipse.. Geany.. Gedit..
Depending on which I feel suits the situation.
:)
I tried it briefly, but went back to emacs.
Sem
Sem
@ShyamK Apparenty I can't generate getters and setters in PHP, which I can in Java.
I know it's a lazy function but still hehe.
some editors can ... eclipse should be able to do it
@Sem what @Jack said.
Sem
Sem
@Jack @ShyamK Ok :)
07:14
most editors seem to have a preference for java... than php..
maybe they were built with java in mind.. I don't know
except perhaps for zend studio =D
which is still based on eclipse and therefore built on java .. oh well
zend is based on eclipse? Didn't know that.
good morning. and yeah, happy new day!
Sem
Sem
@hakre Morning!
@ShyamK yeah, they moved away from proprietary since 5.0 I believe
wow, they're on 9.0 already
ooooh
If you run MySQL or MariaDB servers on your own, you might be interested in this: seclists.org/oss-sec/2012/q2/493
Sem
Sem
@hakre Forbidden Category "Hacking/Proxy Avoidance Systems"
Love my work
morning
@PeeHaa morning..
hey @PeeHaa wasn't there more to your name earlier? or are you a totally different person?
07:25
@ShyamK :) Same person different name
this is his idle name, like, when he's not rep whoring
@PeeHaa why the name change?
@Jack seriously?
i got my answer I changed all file types which i lastly updated to encode in utf-8 without BOM in notepad++ and everything is on track
@ShyamK I have never really repwhored so I figured I didn't deserve the name :)
Unless closevoting is repwhoring ;)
@PeeHaa Then why put it in the first place?
LOL
07:30
@ShyamK I was playing with changing names one day only to come to the realization I couldn't change it back anymore. So I decided I would just live with it :)
@PeeHaa how did you get it back then?
and the guilt creeping in all of a sudden?
:D
@Jack After a month or something like that you can change it again
is it considered bad to negative vote on moderator election? ;-)
@Jack I've done it :)
07:36
hmm lets see if you voted on the same person then ;-)
hmm, nope ... :)
@PeeHaa morning you summon king. didn't work I'd say ;)
@hakre Ow it did. It only took a little bit longer :)
And morning
@CharlesSprayberry FDD is also known as Fear Driven Deleopment, the programmer is always in fear that things get broken. That even leads to more software rot time has shown.
So what's up? I have a tight schedule these days which is just not that what I like much ;)
07:42
faith and fear are not that far apart
08:03
@Jack DDD: xkcd.com/323
Sem
Sem
Accidentally found out constructors don't need __construct as name anymore in PHP :P classname is good enough now?
@hakre Can you upload the cv plugin to heroku somewhere tonight and pass me the URL so I can test the autoupdate feature?
@Sem That's php 4
@PeeHaa Can you tell me which headers that need?
Sem
Sem
@PeeHaa Ah, __construct still works though hehe.
@Sem __construct is the 'new' version
08:09
We need something that pushes it onto the server I'd say. Or something that pings the server which then fetches from github.
Sem
Sem
@PeeHaa hah! Why would someone want __construct instead of the class name?
But we can first test with the plugin
@hakre haha, i can usually only tell when i'm over the ballmer peak :(
@PeeHaa Can you create a CV-Pls organization on github we can put repositories under?
@hakre Sure. How do I do that? :)
08:17
@PeeHaa You should be able to just create that, take a look on your github main page.
> Username may only contain alphanumeric characters or dashes and cannot begin with a dash
name it close-to-vote ;)
or just cv-pls
I think I just did that accidentally
I thought it would ask for confirmation before creating it!
@salathe hahaha I was like WTF?!?!?!
@PeeHaa I set you as owner :)
08:21
Yay! We are CEO :)
Sem
Sem
0 != null results in false, why in the hell. is null the same as false or int 0. Guess I'll use !== then.
@Sem yes, please. Unless you have a reason, use === or !== because equality != same.
@Sem loose comparison
@PeeHaa Wow, cool, should I put this on my CV?
How things turn out wrong then again, but a nice discussion followed IMHO: reddit.com/r/PHP/comments/uwsps/…
I think that's what @ircmaxell always warns about. - for a good reason.
@Sem 0 == '' && 0 == 'null' too :)
0
A: PHP get / post protection (wordpress)

PeeHaaNot really an answer, but it's a bit too much info for a comment. I will write my answer here based on your last comment: @PeeHaa I know they are old. and I know some of the vulnerabilities had been fixed. I am running more than 200 sites, some of which are dated back to 2008 and use plugins...

@BhoopeshPathak jo
i have a problem in developing php based website
@BhoopeshPathak Oh noes
i want to integrate facebook chat feature in my website
using XMPP and jabber protocol
i have done basic study about the xmpp stanzas
like prense, iq and message
and use of these
but i do not have any idea about how to implement this using php
can you help me
09:02
@BhoopeshPathak I think it would be you that could be helpful here: Stop using facebook. Stop propagating using it. Thank you for your cooperation.
And the protocols you talk about work pretty well w/o facebook.
can you please suggest me names of some php or js based libraries which provides implementation of XMPP protocol, and we can implement facebook chat using this library
(Mine is a duplicate, too, but I hadn't had the earliest question at hand)
damn .. i should stop form writing comments late in the night
morning people
@tereško morning
09:30
hi
posted on June 12, 2012 by Stuart Herbert

At work, we’ve recently published HubFlow: instructions + tools for using Vincent Dreissen’s GitFlow model with GitHub. The full article is over on the DataSift dev blog.

what is the use of``<br clear="all">`?
@ShyamK it breaks across all floating elements (horizontally)
I had a little issue with this and css
this was commented in the code
well, in css it's called clear: both
10:08
@ShyamK ugly float fix?
and the height of a div was set as height: auto
the data in the div was in the frigging air
height is auto by default iirc
ya.. well the div had it set explicitly
any idea why it occured?
that means it probably overrides its ancestor rule
eh? clarify
10:11
if you don't get it, it's not important
unfortunately i haven't passed my mind reading exam yet, so i have no idea what is causing what
@ircmaxell me neither, until yesterday ^^
Works for Facebook ;)
Just wanted to point out that it was added
Because you wanted that too
@Jack you mean that it is overriding the css that the body tag or something up the DOM has set.. right?
@ShyamK right
@Jack @NikiC mind reading.. LOL..
@Jack duh..
it was something like this..

` <div class="someclass">
some data
</div>
<!-- <br clear="all"> -->`
something like that
it was inside another div.. so ya. it might be overriding the higher element in the DOM.. but who cares..
If it's commented out it won't be doing anything
10:15
but you care about a tag that's commented out though? not sure i follow
the css had the height:auto; set.. still the thing was floating in mid air..
when I uncomment the <br clear="all"> it works properly..
I wonder why
the data of the div is properly inside the div.. like it should be
@MrCode yes I know.. but its just a <br>.. a friggin line break.. right.. why cause so much of an issue.. irritating when I don't know why
it's not just a line break though if it has clear="all"
you could also do it with <div class="clearer"> </div> and set clearer { clear:both; }
@MrCode not just a line break?
whats the diff?
` .clearer { clear:both; }` I should say (needs the .)
A line break with clear="all" is going to clear all of the floats in the same container
a line break without that is just a line break
@ShyamK The clear attribute to br is deprecated. So, you shouldn't just un-comment it. A solution like MrCode is suggesting is better.
10:22
@MrCode "clear all the floats" ?? what are floats?
float: right and left.. that float?
yes
Sem
Sem
@ShyamK I never use clear:both, always use float:left.
floats are what the other elements on the page use to keep them from drowning
Why not use the overflow hack?
Sem
Sem
@PeeHaa because it's a hack?
10:24
nonsense
@Sem It's the cleanest option
@Paul hmm.. okay.. but.. why does the height of the div not register?
Onyl thing you have to watch out for is new css3 stuff like dropshadow
Sem
Sem
@PeeHaa explain your mind! :D
the height auto not come into play?
10:25
@Sem No extra markup period
Sem
Sem
@PeeHaa AAa we're talking about height auto.
the overflow: auto is pure magic
Sem
Sem
@PeeHaa Sorry, just jumped in the conversation screaming :) overflow:hidden on an height auto element is the best option yes.
until it starts scrolling i suppose
@Jack overlfow: hidden :)
@Sem hehe
10:27
@PeeHaa set on the parent div with floating child div
@ShyamK Sorry, my css fu is weak.
@Jack yup
@PeeHaa right, overflow: auto wraps around ... overflow: hidden clips it
afaik
@ShyamK if you don't use overflow or a child clearer, the container will appear to collapse which might explain your "mid air" comment
Sem
Sem
Actually, i never used clear:both at all.. feels like an !important to me :p
@MrCode depends, height auto works normally if you don't float elements.
10:31
@Sam yes of course height auto or any other height setting works with no child floats
@PeeHaa hmm, both auto and hidden seem to work for me actually ;-)
Bah!! Hambug.. This is getting me no where in understanding the answer
of course, it's kinda hard to imagine what exactly you're seeing
ya.. I know.. jsfiddle aint doing squat..
@Jack They both do the job, however to prevent scrollbars you can use hidden
10:35
@PeeHaa interesting .. learned something heh
@ShyamK you could try dabblet
@ShyamK did you read my comment about the height collapsing if you don't clear or overflow?
That is probably what you're seeing
fine.. I shall show you the site if you promise not to laugh.. :D
on the main page there is a news section right?
see that?
thats the fault
commented br clear=all
resulted in that
did any one check it out?
did anyone?
gr8 the jokes on me.. lol
height collapsing demo: jsfiddle.net/gjM2p
uncomment the overflow to see how it fixes the container height
or add a clearer element (like you're using)
I shall try as per what you said
hmm.. its just like you said
thanks.. so the br clear all is just like an overflow hidden
k.
so the float causes this problem.. hmm.. k.. thanks a bunch @MrCode
that helped
:D
yeah the clear="all" is the same as an element with css clear:both;
10:48
wow jquery tag is even more fukced up as php tag.
as someone said earlier though, the clear attribute is deprecated so use CSS clear instead (if you're not using the overflow technique)
Are you kidding? You haven't even asked a question here. Read the error messsage, it says: Not enough memory. Then you raise the memory and it works. What a wonder, let's praise you as our new god. — hakre 12 secs ago
@MrCode @Paul said so.. All knowing Paul..
@MrCode ya k.. thanks
@Paul Thanks :D
@ShyamK no worries, i didn't help nearly as much as MrCode and the rest.
@hakre is he saying that the whole file is read into memory? lol
10:58
@Jack Actually that guy hasn't even posted any code (nor fomrulated a question!), so well, what to say?
@hakre in his defense the error message may appear strange. Tried to allocate 10 bytes when allowed memory size is 20bytes. I mean 10 < 20 right
Maybe that should just be changed

« first day (605 days earlier)      last day (4569 days later) »