« first day (142 days earlier)      last day (4821 days later) » 

12:12 AM
What's everyone's favorite web framework? Mine is CakePHP.
 
Mine is none
 
I second that
 
I use libraries, but I don't have a favorite framework, and disagree with the concept of a framework for about 75% of the usecases
 
Tough crowd. So you guys use libraries for forms, sessions, request/response objects, url mapping, html output, etc?
 
Ya, basically a framework that's a lot looser and makes less architectural assumptions
 
12:22 AM
Fair enough. How do you deal with junior programmer going in and coding their own way? With a framework, at least you have some enforced structure.
 
I don't let junior programmers make architectural decisions
 
Sounds like you found the right job :)
 
12:36 AM
werd
 
sup
 
 
2 hours later…
2:16 AM
Hi
 
Sup?
 
can you tell me where i can learn about $this->
 
from what level
OOP in general, or just the $this operator?
 
oop & just $this
 
have you tried google?
 
2:18 AM
ya
just people talking something about errors
nothin about the meaning
need a detailed explanation of this function
 
Just search better: how to use oop php picks up quite a bit for me
 
that's the core docs
 
a link would help
 
that link you posted
Start with The Basics at the top
 
2:25 AM
so $this is a assinable var ?
 
it's not assignable
 
too complicated: The pseudo-variable $this is available when a method is called from within an object context. $this is a reference to the calling object (usually the object to which the method belongs, but possibly another object, if the method is called statically from the context of a secondary object).
any simpler explaination ?
 
Hi
so $this-> is to access a function outside its own function ?
but how does $this-> know if its a function or a variable ?
 
3:19 AM
@NSanjay is that clear !?
$this-> is for calling a method of an object and it can also be used to retrieve a parameter of the object as well.
@NSanjay is that clear ?
 
ya
 
Cool ! :D
you have to put () after the name of the method ( function ) so its clear to say if its a call for a function (method) or a parameter !
 
what ?
 
$object->method();
 
but not nececary right ?
 
3:26 AM
its necessary
 
but without () it still works
//ahhh cooking chilli, my eyes !
//really moms cooking chilli.
using $this-> we can nest function within functions ?
wont this complicate the reader ?
as in the person who want to modify the code later on
//just wondering
 
3:47 AM
anyone that would mind helping a student on a array_multisort question? I just posted up question, and then saw this chat room feature
 
Nsanjay: can i know which php ver. are u using? in opinion, nvr had this ability to call a function without the brackets.
 
PHP v5.3.5
 
@nsan. Why would you want to nest functions in a class? Defeats the purpose
 
really ?
 
 
2 hours later…
5:47 AM
need help
if ($result = $db->fetchArray($queryresult)) {
//var_dump($result);

$answer = "{$result['id']}";

if ($answer == 1){
echo "Welcome {$result['name']} the administrator !";
break;
} elseif ($answer != 1) {
echo "Welcome {$result['name']} the user !";
}
} else {
echo "data not found";
}
does not work
Hello ?
any 1 ?
 
What's wrong with just doing $answer = $result['id'];?
 
fixed that
but still does not work
 
What's not working correctly with it?
 
the if goes to echo "Welcome {$result['name']} the administrator !"; or this only echo "data not found"; it skips echo "Welcome {$result['name']} the user !";
 
Try if(intval($answer) === 1)
And your elseif ($answer != 1), change that to just else.
 
6:01 AM
still smae error
same
error
 
What do you get from the var_dump($result);?
 
array(3) { ["id"]=> string(1) "1" ["name"]=> string(6) "sanjay" ["password"]=> string(8) "usd27498" } Welcome sanjay the administrator !
this echo "Welcome {$result['name']} the user !"; just goes to echo "data not found";
 
Uhm, I'm not seeing what's wrong with it?
 
mee 2
 
Your id is 1, it would go to echo "... administrator"
 
6:04 AM
yes that works
for id 2
it goes to echo "data not found";
 
Ah, I get it now.
 
so where is my wrong ?
 
You don't have an id=2 in the database?
I'm assuming your fetchArray code works correctly here.
 
i have it
also fetchArray code works correctly here.
 
Right before echo "data not found";, can you put a var_dump($result);?
 
6:08 AM
bool(false) data not found
 
Uhh
Well then clearly your fetchArray isn't working correctly...
Because it returned false instead of getting the id=2 data record.
 
Yeah, that's id=1
 
oh okay i found the bug !!!1
fixed the sql query syntax
man i feel like slapping myself evertime i miss the error
OMG I HAVE AN AWESOME PHP LOGIN !
THANK YOU experimentX !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
hello sanjay
 
6:21 AM
@experimentX hiii
 
hello @ntechi
 
6:43 AM
@experimentX Hi
does a php cookie remember the user until the browser is closed or until it time outs ?
 
both
if the browser is closed, the cookie is lost
and if the time expires, cookie is no more set
:)
is it possible to find the vertices of a polygon given the radius?
 
7:07 AM
Hello Sanjay
@dskanth i think i quite disagree
 
oh..
how
 
can anybody help me compare two hosters?
 
when browser is closed cookie is lost
but not so sure
 
oh... ok
i think, if we store something in session, it will not be lost on closing the browser
not sure with the cookie though
 
@dskanth mean?? you agree with me ... but i am not sure myself
 
7:14 AM
i agree with u
 
if you not set cookie expire date, it will be lost after closing browser, like session
 
actually i am also not sure.
session also stores cookie i guess thats why when i type facebook, it automatically logs me into my home
so its only logic not knowledge
 
session will not be stored after closing browser. facebook store data in cookies
 
yes session are initialized using cookies
 
it stores something like "dfdsfsd4654rwe56r4" in cookies to provide access to acount
 
7:24 AM
yes .. something like that
but you never know what that represents because that is encryped
only they can decrypt
 
@Tuco I dont agree with this... session works even after closing the browser
 
yes
 
until session is removed (like logout), it lasts
 
it's stored in server ... i guess in some file and some path .. i was getting some server error cannot store in some path
it was with zend framework
 
oh... do u have write permissions to that folder
 
7:37 AM
i don't know ... it was server error so i escaped from my work, though i managed to learn that session are stored in some file in some path ...
and how's you project goin on
 
its fine
but iam struck at a polygon problem
i have a polygon radius
 
and what is that?
 
and i need to get the vertices of it, to find whether a point lies inside it
 
polygon radius .. it seems challengin it
 
1
Q: Find point in polygon with a certain radius

dskanthHi, i have a polygon with some radius. Something like this. Now i need to insert it into mysql database. find whether a point lies inside or outside of the polygon. (Does it include getting the vertices of it?) How can this be achieved?

 
7:38 AM
okay i tihnk i like yoiur question but i have to do a bit of research
 
o..
 
i will sure answer by tomorrow
 
session removes after closing browser. you could try it
 
Thanks... :)
I will be happier
Bye
all
 
okay sure
 
8:31 AM
Morning
 
morning
 
had a nice weekend?
 
very nice. we've been to westerland.
yours?
 
All well, met an old friend from colleague and consumed lots of media
 
nice
 
8:38 AM
Currently stalking @tobyS a little more
 
improving his answers?
 
mostly looking
 
0
Q: Flag weight deputy badge bug?

middaparkaI've been on "flag weight 500 (max)" on main for a while (probably the best part of a day), but I've not been awarded the Deputy badge. I'm I missing something or is this a bug?

same here
 
that one is new isn't it
or didn't i see that because my rep was to low
 
yes
but it was very easy to earn because I stumbled upon a user that either supplied one link answers or copied material without quoting
 
8:43 AM
i remember
 
mods deleted about 15 of his answers and his rep dropped by almost 200 points
[CHECKSTYLE] Successfuly parsed file of module logs with 209286 warnings.
 
I think i'm going to wait with that until i've read up on meta
did you run ZEND against ZF again?
 
not sure. I still have to figure out when I can use / and when I have to use \ and which of these exclude/ignore filters allows wildcards
for instance pdepend is OS sensitive
I've written a patch on the train that makes it insensitive
asked mapi if he wants it but he didnt reply back yet
will have to investigate further for that blog post I will write
 
Tek
Weeeeee most popular room yay
 
Well not beeing case senseitive is kinda "right" for WIN
 
8:50 AM
but not for PHP
 
php is case-sense on WIN so programms should be too
at least the base stuff
@Tek :)
 
not on filepaths
c:\foo\bar/baz is valid on php on win
 
that i get
i misunderstood you it seems
 
but when I put /foo/* in pdepend, it wont work
 
does it "glob" the paths?
 
8:53 AM
because then the ExcludePathFilter will not longer preg_match correctly
afaik it's using a DirectoryIterator
and uses preg_match against the filepathes then one by one
it's not a filteriterator though
ok, ZF is in my checkstyle sigh
 
"i comment that out, for now, and delete it next week", Things that are not going to happen next week: the deletion
Commenting out is deleting for sissies
It's in your checkstyle because the exclude didn't work (again)?
 
yepp, trying *\\lib\\Zend\* now for a pattern
instead of /lib/Zend/
lol, the build terminated with a Java Heap Space OutOfMemory error with ZF in there
with no complete ZF coding standard available for phpcs it's rather pointless to run code sniffer against my entire codebase anyways
 
Like i said: Build your own with the stuff you care about
 
9:08 AM
what makes you think I care? :)
 
that one is easy to create
<?xml version="1.0"?>
<ruleset name="Custom Standard">
<description>A custom coding standard</description>
</ruleset>
 
awesome :)
 
and you should get very good compliance
 
fixed 210000 violations
 
more than enough work for one day
Apparently not, they wouldn't want do let me go
 
9:19 AM
interesting. phpcs tries to analyze a cruisecontrol.css and a jquery.min.js although none of these exist in my project Oo
oh ok
i see
i have to exclude build/ from everything
 
oO
no you shoudn't include that in the first place
 <target name="pdepend"
         description="Generate jdepend.xml and software metrics charts using PHP_Depend">
  <exec executable="pdepend">
   <arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
              --jdepend-chart=${basedir}/build/pdepend/dependencies.svg
              --overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg
              ${source}" />
  </exec>
 </target>
 
thats's what I got
 
not the ${source}, that should only point to a dir where your sources are in not the whole project folder
 
that's the issue
i assigned basedir to source
stupid me
 
9:34 AM
-not the +note that
but yeah
Do you have a working version of PHPUnit-Head?
 
no, only latest 3.5.x
 
and you run phpunit on that?
or a whole ant
 
whole ant
 
can you pastebin me the junit.xml
 
i just deleted the entire job but yeah can do when it's setup again
 
9:41 AM
just run ant from the cli?
 
building
 
heh.. i just found a blogpost of mine on google that answered a question i had
 
lol
 
0
A: PHPUnit print tests execution time

edorianTo add some more ways: You can write an custom Test lister and access the $testResult->time() from there. Some lines in your phpunit.xml and a 20 line php class. Not to much hassle. If you generate a junit.xml anyways (for ci or while creating code coverage) all the numbers are there always ...

that oneliner from toby can't be the final solution
 
that's what I meant about improving his answers. They are fine and correct but they also assume knowledge on the topic and often he just links offsite. not what SO answers should be like imho
ok, apparently I'm too stupid for setting up jenkins sigh
 
9:56 AM
"jenkins" or "phpqatools on windows"
 
jenkins
 
because there there seems to be a BIIIG gap
why
 
im using basedir='.'
which means it will point to the dir where the build.xml is in
 
yes
 
which of course is inside my svn
so when jenkins checks out all the code, it points to the job folder
and that's also where my sources are in because build.xml is in the project root folder
so what do i put for "source"?
if not basedir
 
9:59 AM
ls $project_root_folder
 
standard ZF project layout
 
which one
 
old one.. with /application /libs /tests and some custom folders I needed
as well as build.xml
 
so your source folders are /application and /libs
 
technically, yes
 
10:02 AM
not only technically but quite literally too
 
so i need multiple source folders
 
look at
<property name="source" value="{source_property}"/>
<property name="source_comma_sep" value="{source_property_comma}"/>
put in "application libs" in the top one and "application,libs" in the bottom one
 
sigh
 
1. use $source_comma_sep for phpmd and $source for everything else
2. question mapis decission to use $source as first arg of phpmd
3. see that it made sense at the time and you can't change it
4. profit
 
those different arguments to the QA tools is a major PITA. This has to go away.
 
10:05 AM
i made the patch for allowing multiple folders in PPW, tell me about it :)
 
so I can put in application lib, e.g. relative path?
 
relative to $basedir
 
yes, so it should be working when basedir is set to .
 
writing a PPW.xml that works with windows will be a major PITA
But asking sebastian about is could be fun
 
i refuse any arguments that say "use a proper OS"
windows has to be treated as 1st class citizen
until they really make login to windows require Windows Live in Win 8 that is
do I use the csv one only for pmd or also for pdepend?
 
10:26 AM
also for pdepend.. pita
gah
no, apparently it doesnt know what to do when there is a , and neither what to do if there isnt one
 
Usage: pdepend [options] [logger] <dir[,dir[,...]]>
so i'd guess it takes "," too
 
no it doesnt
 
it doesn't on WIN or "it just doesn't"
 
it terminates with invalid directory ' lib' added
and the same when specifying without ,
 
~/portals/ssp$ pdepend fonts/,extension/
PHP_Depend 0.9.19 by Manuel Pichler

No output specified.
 
10:41 AM
geez, there may be no space between the comma
 
I should have given you credit
fixed
(in the pull request)
 
thanks
i think I broke 50 builds by now. of that about 5 were due to stupidity and the remaining for either being on windows or the qa tools not following conventions
building
 
Hii everyone
 
11:08 AM
He
 
which files should build/log contain?
 
clover, junit
 
i got jdepend and pmd only
 
ether no coverage in phpunit.dist.xml or that broke
console output to the rescue i assume
 
hi can you guys help me out with this stackoverflow.com/questions/5166566/…
 
11:15 AM
Woot \o/ passed 100 generated templates shikiryu.com/html5/statistiques.xml :)
 
@MohsinSheikhKhalid do you have access to server B
 
11:45 AM
Can any one help me in this?
http://stackoverflow.com/questions/5218775/display-categories
 
nope ntechi layman on smarty
 
layman?
 
ax
@ntechi see at the right: "18 people here love to help other developers out, but don't like spoon-feeding"
 
@ax Hi, I also don't require spoon feeding, just tell me the basics steps, I ll do it, I just want to do it on my own
 
dont know anything about smarty
 
11:50 AM
@experimentX ok
 
and i think you also should try to make your code more readable
 
@experimentX OK
 
@ntechi try do debug make sure you have $article_category by die($$article_category);
 
This account is temporarily suspended. The suspension period ends in 4 days.
 
why would that happen
 
11:56 AM
To put it politely: he has a habit of being impolite
and mistakes it for being straighforward and honest
 
lol ..
 
@Gordon wow, wonder what he did :-P
 
@ircmaxell i'd say just him being him
 
I know :-P
 
wonder if they will restore rep to him or if he has to start anew
 
11:59 AM
that would suck
 

« first day (142 days earlier)      last day (4821 days later) »