« first day (571 days earlier)      last day (4368 days later) » 

 
1 hour later…
1:24 AM
can someone link me a few good reads on OOP? i have the basic understanding of OOP.
 
user895378
@MichaelEcklund I only say this because I just updated it: this answer isn't specifically about OOP but does discuss how interfaces and traits factor into OO code design:
 
user895378
8
A: PHP: Traits vs. Interfaces

rdlowreyLet's start by saying this: Object-Oriented Programming (OOP) can be a difficult paradigm to grasp. Just because you're using classes doesn't mean your code is Object-Oriented (OO). To write OO code you need to understand that OOP is really about the capabilities of your objects. You've...

 
user895378
I don't have any other links handy, though.
 
Night.
Well, technically morning since it's 4.36am here
but whatever, night.
 
user895378
later
 
2:10 AM
Let's Go Devils!!!
 
user895378
2:31 AM
Helps when Giroux is out :p
 
user895378
Anyway, I'm happy to see the Flyers exit ... dirtiest team in the league
 
3:38 AM
@tereško Thanks. Yes, it was horrible. Now fixed: github.com/Evoke-PHP/Evoke-PHP/blob/master/php/src/Evoke/…
 
3:51 AM
Can curl first Get a page and then do the posting? What I want to do is get the captcha image and add the solution to the data array to post.
I am afraid 2 seperate curl requests would result in different captcha images.
Also, I am not able to submit the datas using CURL. It fills all fields, but doesnt hit the submit button.
 
4:17 AM
hiyo @Paul
 
4:27 AM
hi @Nick how are you?
 
good and you ?
Im going to be working on some namespaces tonight
 
@Nick I'm good, I'll be going shortly. Today is my day off. Namespaces will definitely be a good thing. Getting that and autoloading is a big step towards making your code stand alone as an isolated unit.
 
Yeah I see that now, then working with the url routing to the front_controller
I think my biggest obstacle is going to be the model
@Paul I don't know you in person, but in here... you deserve 30 days off..
 
4:43 AM
My philosophy with my library is not to do anything. That way I can't get in trouble when someone doesn't like the way I did it. My job is only to provide some tools for doing it.
@Nick lol, I don't know about that. I think I'd better just take today off.
 
If I have a loop that runs about 100 000 cycles, is there a performance difference between using 50 "switches" or 50 functions, or it is about the same?
 
hey @CarrieKendall
 
@AdamStrudwick If you dispatch a call with $this->method(); within a loop like that then there is a performance hit. However, the best way to tell will be profiling it using xdebug and a cachegrind tool.
50 switches or functions also doesn't sound like a good design.
I have to go now, bye all
 
@Paul Well, it is a sports game simulator, so I need to go through the plays one by one...
 
5:00 AM
@AdamStrudwick Just before I go, I wrote an answer that brought me to my above conclusion. If you read the Performance section of this codereview.stackexchange.com/questions/10271/… looking especially at the Edit subsection.
 
@Paul True that.
 
Sam
hi @Nick
 
@Sam hey what's up
 
Sam
not much here......there?
 
5:16 AM
noiceee
 
5:59 AM
aaaaah
motherf----s so yesterday I was happy being on the latest version of php and all.... now look at what they've done, all ruined! they released v5.3.13 :s
 
6:13 AM
morning guys , gals and everyone else
 
there are other genders next to male and female? :s
 
@Paul , just doing my but to improve the internet =P
@sg3s , think on that for moment .. you will come up with few variations on the theme
 
fair enough...
 
7:01 AM
what would be the reason that despite having ft_min_word_len = 2 in mysql, it still do not search words smaller then 4
 
why dont window.scrollBy(0,100%); scroll down to end of the page
 
@pbvamsi because the arguments are pixels: google.com/search?q=scrollBy
 
@Gordon thanks. can it can be made to point to the end of page? because my page dynamically grows
 
@pbvamsi put in the height of the page?
 
can anynoe give a little hint please
 
7:15 AM
@Gordon height of the page dynamically alters, so by body onLoad i want to point that to bottom of the page
 
@pbvamsi and? put in the document height then?
@pbvamsi also, have you tried googling for that already because google.com/search?q=scroll+to+bottom+of+page+javascript gives me 4.7 million results
 
@Gordon this helped me. thanks :)
 
Am I allowed to ask for close votes?
If so, I think this deserves a close. http://stackoverflow.com/questions/10494831/uncaught-exception-installing-google-data-php-client-library
How do I do that cv-pls tag? [tag:cv-pls] maybe that's it?
Apparently not :(
 
@vascowhite that was correct actually stackoverflow.com/questions/10494831/…
 
7:34 AM
@Sam hi Sam :)
 
Sam
hey @gosto
I sent you an email yesterday (I think)
 
Can I ask something here about wordpress in which the problem is about session_start()?
 
@winona Don't ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will.
 
I have this error after installing a wordpress installer plugin called duplicator . Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/public_html/temp/wp-content/plugins/wp-e-commerce-product-showroom/wp_e_showrp.php:469) in /home/public_html/temp/wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-constants.php on line 17
 
posted on May 09, 2012 by Lorna Mitchell

I've been hearing great things about puppet, chef, vagrant, and friends for a while now, but since I work on my own I tend to either develop straight onto my ubuntu machine or grab an appropriate existing VM and use that. So I read about this brave new world of virtualisation but (as with most tools) they can be hard to introduce on your own, and I didn't. Then I went to WhiskyWeb, which had

 
7:43 AM
I have read a solutions but I can't get it right by myself: Create a php5.ini and save it in your root folder. If you have various websites under one server, then it will be saved where you can view all the websites' folders.

Create a folder in the root named "tmp" (without "s)

Type this inside the php5.ini :

session.save_path = "/home/content/##/#######/html/tmp" upload_tmp_dir=/tmp
 
@Sam ah i will see now , i didnt check :)
 
@winona this is a common error. there must be hundreds of questions on SO asking the same. The problem is that your script is outputting something before session_start is called, so make sure there is no echo, printf, whitespaces and the likes before the call to session_start
 
Sam
http://stackoverflow.com/questions/10511150/html5-flip-book-page-transition
 
@Sam but what i told you , its not that in joomla at all
 
Sam
7:56 AM
I know........but looking at all the code on that page, I can't touch something I don't really understand
you are using joomla, correct?
 
yes correct , wait
 
@Gordon this problem occurred while I'm transferring a wordpress website in a temporary webpage
 
@Sam you remeber what u have done $table1 = '.....' and $table2= '.....' ?
between single quotes
 
Sam
yes
 
ok
 
8:00 AM
@Gordon Does it has something to do with php misconfiguration with the server?
 
@Sam this table1 , i couldnt make it between single quotes pastie.org/3883140
@Sam your table was easy because it was only html code , but with this , there is php also ,
@Sam ohh the second Sam :) hi
 
Sam
your code has 'foreach' and 'endforeach', 'while' and 'endwhile'; I've never even seen such a code before
 
@Sam hmm ok wait
 
Sam
it's, for lack of a better word, above my paygrade
 
@Gordon i did restart the server but have a little doubt if i could successfully rebuild the indexes
 
8:05 AM
Just testing, sorry.
ahh, got it. :)
 
Sam
 
@Gordon i did restart the server but have a little doubt if i could successfully rebuild the indexes
 
[tag:I always thought it had to be for an existing tag]
??
spaces!
 
@Sam now , its the same with foreach or while loop ok its here the table with while loop , pastie.org/3883140
 
[tag:I_always_thought_it_had_to_be_for_an_existing_tag]
ok i'll stop now :)
 
Sam
8:09 AM
did you write that code, or copied it from somewhere? @gosto
 
i writed it
 
Sam
in sql statements such as these, why are you using variables for the columns?
SELECT $ww as yourplace FROM data WHERE $ww = ".$wnumber." and id_user = ".$userid." and $ww != \"w_nothing\" "
 
@Sam because its a variable defined outside table1 , now i want only make this table inside single quotes $table1= ' this_code_igave_u' ;
 
Sam
I know it's a variable, the question is 'why are you using variables as your columns'?
 
because they are fields names in daatabase, and they change on which selected option is selected,so if one option is selected , the sql will select the field name in db
 
Sam
8:18 AM
@Gordon sorry for disturbing you, but I believe you understand more than I do; is it appropriate to use variables as column names in a sql statement?
 
@vascowhite please , do not abuse cv-pls tag
 
Sam
@tereško I believe you understand more than I do; is it appropriate to use variables as column names in a sql statement?
 
@tereško Sorry, was trying it out.
 
@Sam , only if you are working with an existing database scheme , which you cannot change
in a well design DB structure , you would not require such thing
additionally , this might introduce SQL injections, because you are concat'ing the query , which would bypass the normal checks gained by prepared statements
 
Sam
alright thanks.....
 
8:24 AM
@Sam it is appropriate when it's appropriate. in general, I'd say there is little need for it, but little doesnt mean never.
 
Sam
ok..thanks........well, he's using mysql; so.....I think the problem is bigger than what a prepared statement can solve
@gosto is that all the code on that page, or have you removed some segments?
 
@Sam all
 
Sam
and it doesn't give you any error the first time it loads?
 
no
 
Sam
it should; when the page loads for the first time, the POST variable should be absent, and that should trigger an error
 
8:30 AM
no i have no error sam , works good , just want this code between single quotes
 
Sam
I can't find table2 on that page; is it there?
 
table2 i will do it my self :)
i will just see how u do table1
 
Sam
what do you want done to table1?
 
Sam
@gosto Only just saw your message, hi!
 
like that , $table1=' the_code_of_i_sent_u';
@Sam ok i thought u not here :)
 
Sam
8:32 AM
ok......that's not possible with what you have there
 
why?, u have make it before
 
Sam
you have to build the whole string into a variable first before you display it
in your code, you are displaying the html as the script is processing; so that won't work
I'll give you an example of what you need;
 
ok
@Sam look how i have done it , but it displays errors , so its something with quotes ,singles and doubles, and how php will looks and variables , pastie.org/3883140
 
@gosto It looks to me as if heredoc may be useful to you.
 
Sam
if you look at that, the whole html content has been built into one giant string; and displayed it at the bottom of the page
you can display it wherever you want
I didn't touch your code's logic; I just took all the output, and assigned them to a single variable ($table1), to be displayed later
 
Sam
@Gordon what is the close vote for, exact duplicate? low quality?
 
@Sam for asking something that has been asked a thousand times before and lazily claiming it hasnt
 
@Sam yes it doesnt display any error sam , i will see table2 and try them and i tell u ,thx for now :) , need 5 minutes
 
Sam
@Gordon ok :)
 
9:14 AM
morning
 
hi to all
 
Sam
@mUnk3y morning
 
anybody know abt joomla..........
 
Sam
Hi @karthys
 
hi @Sam
 
Sam
9:15 AM
Not me im afraid
 
hi @karthys
hi @Sam
 
Sam
How are you two?
 
goed dankie en jy?
 
@mUnk3y hi u know abt joomla
?
 
afraid not
 
9:19 AM
hi to all anyone know abt joomla
 
Sam
hi @karthys, @mUnk3y
 
hi @
 
happy new day everybody!
 
Sam
New day? haha
 
Good morning
 
Sam
9:28 AM
Morning @Donut
 
@Sam Hello
 
morning @donyut
 
morning @Donut
 
@hakre Hello
 
How is that linux command called to run phpunit in shell and refresh the output every X seconds?
 
9:32 AM
cron
 
Sam
Gotta love cron
 
@Sam can u join this room pls chat.stackoverflow.com/rooms/10896/gosto
 
@gordon: Do you know how to use PHPUnit color-codes together with watch ?
 
morning
 
Sam
Morning @NikiC
 
9:39 AM
hey @Sam :)
Or rather, hey @Sams :)
 
Sam
Sam is such a popular name haha :p
Random question, does anyone else here every build html emails?
 
i did :)
 
@Sam , yes
 
Sam
@RaquibulIslam Do you hate Outlook 07 + 10 with a passion? or is it just me!
 
@Sam you just need to send HTML header , thats it
 
9:41 AM
i tend to use SwiftMailer for that
 
Sam
I have to hand write mine
 
it's too much of a pain to manually make it work
 
Sam
When its for big clients they request its hand written
 
@tereško i dont think so
 
lol
 
Sam
9:42 AM
For example, im building one for Google Adwords France and im building drop shadow 1 pixel at a time haha
 
morning @NikiC
 
Sam
Damn you drop shadow
 
@RaquibulIslam , html emails usually come with images and fallback plain-text version
 
Sam
@tereško (y)
 
@Sam i think most of the guys here hate IE & Outlook with a passion here :D
@tereško ya i know that :)
 
9:43 AM
hence is said "too much of a pain"
 
i'm not sure if i can share code here for that html mail with fall back
 
Sam
@tereško They aren't too bad when you stick to very simple html and spacer images
Im currently working on nested tables, its like inception...
A table within a table within a table within a table... We must go deeper
 
brb guys , have fun :)
 
Sam
See you
 
i mean full graphics .. and also , avoiding the "Trash" category in gmail/live/outlook
 
Sam
9:46 AM
@tereško That normally depends on the mail server you send it from. If your on a blacklisted server your chances of getting into an inbox are very low really
Sorry but i found this young eminem picture i thought worth sharing -> i.crackedcdn.com/phpimages/article/6/0/4/128604.jpg?v=1
 
@hakre a good morning to you too :)
 
@hakre nope. sorry.
 
@gordon: found it, watch --color however I need to upgrade procps for that , let's see how that turns out.
 
10:14 AM
How to get the output of this to an array?
foreach($html->find('img') as $element)
echo $element->src . '<br>';
 
in MYSQL does anybody know what ON does in the first answer? stackoverflow.com/questions/3634005/mysql-join-two-tables
 
@Kishor $arr[] = $element->src;
 
Thanks chris. I know it was a stupid question. I am new to class and stuff :) Thanks
 
10:41 AM
What did you say!
WHAT!
Dare you say that again
 
naah .. it looks like i misunderstood the context
 
@tereško That's a first one
 
@Sam , is one of the methods "open your wallet" ?
how exactly is that something which should calm yourself ?
 
Sam
I didnt see that one haha :P I did like this one though "Dance like no one is watching!"
 
10:49 AM
@Sam , that page is just a content farm ... you really should ignore it
just like about.com
 
Sam
Im not the one that needs calming down ;)
 
.. yess .. another silver achiev.. badge : stackoverflow.com/badges/24/good-answer?userid=727208
 
I'd wish @edorian would be here ...
 
phpunit?
 
yes, somehow
 
Guys.. I'm trying to validate a html page, but I'm getting word errors:

non SGML character number 3 -> You have used an illegal character in your text. HTML uses the standard UNICODE Consortium character repertoire,

On the following character: groningeN (letter N)
Why is that wrong lol
 
11:28 AM
Well this chat is in HTML. You're not able to put that invalid character in here that easily.
Instead show the hexdump of it: stackoverflow.com/questions/1057572/…
 
lol
I noticed after every word that it gives an error so
Test
Test
^
hmm doesn't work.. anyway, on the last letter it skips one whitepsace and gives an error on that
 
while true; do clear; phpunit tests; sleep 1; done;
 
Hi, can somebody tell me if this code is correct? My friend tells me that the $count should be at the end of the loop.
        $i = 0;
        foreach ( $attachments as $id => $attachment ) {

            $count++;
            $aahan_active = (1 == $count) ? ' active' : '';

            $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);

            $output .= "<{$itemtag} class='item$aahan_active'>";
            $output .= "$link";
            if ( $captiontag && trim($attachment->post_excerpt) ) {
                $output .= "
But it works
 
11:44 AM
@geekpanth3r You can place it at the top or at the bottom, that's not much of a difference. But take care you initialize it to 0 before the loop: $count = 0; .
 
@hakre If I initialize $count before the loop, should I also place this $aahan_active = (1 == $count) ? ' active' : ''; before the loop? or leave it where it is?
nvm
 
No just initializing, the check needs to be done per iteration as you want to make the first item the active one.
 
@hakre got it, thanks
 
12:20 PM
jeeez
 
hehe, close everything... i like it
 
12:36 PM
Have anyone tried sending one-to-one messages between clients in a node.js and socket.io environment ?
I have tried a basic example and it was working well... just want to know your feedback...
This is the server file... gist.github.com/2634239
and this is the client file.... gist.github.com/2634250
Feel free to run the server file using: <node app.js>
and then visit the url: http://localhost:8008 in 2 or more different browsers..
Click on a user (who is logged in from another browser) in your browser and try to send a private message... the message will be sent to only that user...
Want to know your feedback or any suggestions on it..
 
@dskanth This would be a good question for CodeReview. I'm not very good at javascript, so I have no comments (and besides, this is the PHP room).
 
1:04 PM
Good day everyone
Just found short video in my collection, that suits SO quite well I think. Really want to ask same thing
 
@Eugene Hello
 
@Donut hey
:)
 
Fine, you?
 
Fine as well
 
1:18 PM
posted on May 09, 2012 by Lukas Smith

So Benjamin just went and wrote a license migration tool, which he will hopefully soonish have time to release as OSS itself. So far things are going well. The tool basically reads out the list of authors and then can list up their commits. Here is for example my list of commits. As some users didn't use the same config for all their commits, we might have authors in our system that in the real

 
hey peee haaa
 
1:37 PM
$duh = (array)$objectThatSupportsIteratorAggregate; <- I understand PHP does not typecast correctly, what's the best way to do this?
 
ArrayAccess?
 
@Christian iterator_to_array
 
@hakre sad PHP does not have a CallbackIterator
 
@Paul See, I knew there was something to do it easy.
 
No problems.
 
2:01 PM
@NikiC FilterIterator ???
 
How do I convert mysql_fetch_array to msqli? pastie.org/3884399
 
@ircmaxell That's filtering, not mapping :P
 
Oh, in that sense
is what you're looking for iterator_walk() and iterator_map()??? (they don't exist, but still)
 
@ircmaxell no
I'm looking for a mapping with lazy evaluation ;)
but what I'm really looking for are generators ^^
 
2:04 PM
Yeah, pythonic generators would be nice
 
$row2 = mysql_fetch_array($mysqli->query("SELECT * FROM tblFacilityHrsDateTimes WHERE id = '$id'")); how do I convert to mysqli?
 
@RepWhoringPeeHaa I'm not sure I understand what "$result" is in my case. pastie.org/3884399
 
Have you looked at the docs?
 
@RepWhoringPeeHaa I have been but I don't understand it
 
2:13 PM
@에이바 , please go and read about prepared statements
you have not read a single line in the documentations .. all you do is copy-past code and think that it will magically "just work"
 
@에이바 I really doubt you have read the docs in under 1 minute.
 
2:36 PM
what does this mean: $var = $var | model_action::IGNORE;
what does the pipe do?
 
bitwise or
 
@NikiC I've written one, it's really trivial to create it. And I think a better one is here: DecoratingIterator (Marcus Börger)
@NikiC generators?
 
@hakre yeah, it's trivial to create, but still misses in php :)
@hakre yield
 
Tek
Question, what company do you guys recommend for VPS service?
 
@rdlowrey Really like your comment. Can't stand when people start to do something stupid at design time for some performance issue they don't even know exists yet.
 

« first day (571 days earlier)      last day (4368 days later) »