« first day (803 days earlier)      last day (4128 days later) » 

12:12 AM
stackoverflow.com/questions/14047661/… I am not sure what else I can possibly do to make it more clear...
 
flash-based WebSocket fallback is awesome
thank you macromedia, err adobe for that
 
 
1 hour later…
1:14 AM
1 hour later…
 
Anonymous
2:05 AM
hello ya'll
 
@TheCOMPLETEPHPNewbie A kind reminder to restrain your emotions on SO ... I saw your rant on another guy's answer (who obviously ripped some code sample from you) ... just word it nicely or alert a moderator next time.
 
Anonymous
ok, jack. The guy had more reps than I, but he stole the code from me and posted it as his. I went teresko at him for a while there
 
I'm sure @tereško is too much of a gentlemen to resort to swear words though.
 
Anonymous
2:22 AM
you couldn't have been more mistaken
 
@TheCOMPLETEPHPNewbie quotes or it didn't happen.
 
Anonymous
everyone knows about teresko. It is the one undesputed fact here
 
2:45 AM
Granted, he does seem to like using a particular word, but even so, it's not that frequently used either.
 
3:19 AM
0
Q: Change display html table in view on Yii Framework

Giovanni Di ToroI have made a module for financial management using Yii php framework and installed the model, controller, CRUD , and views through Gii. Now I want to display the contents created for each financial movement in a table , one movement per row, inside the view movements page - such as in the admin....

 
Sometimes when I read "questions" like this one I feel like somebody's just trying to troll SO
 
3:44 AM
No need to troll, everyone knows they should be using Oracle & SAP instead.
 
 
1 hour later…
4:57 AM
1 hour later…
 
Dun dun dunnnnnn
 
@Charles Edited G'morning/G'evenin' ...:P
 
stackoverflow.com/q/14049859/168868 -- ffs, "HERE I HAVE COME CODE THAT IS BROKEN AND I HAVE NOT TESTED IT PLX FIX IT"
 
Hello to everyone
 
I WILL EAT YOUR FACE
I mean
Hi!
 
@gowri hola
 
What is the right term to brokerage payment methodology
 
5:51 AM
dunno, pay your bills on time?
Very cool... except for some reason it's not displaying — Jordan Fine 33 secs ago
 
lol
 
Love that shit, spoonfeed me pls!!
 
 
I want a super downvote that lets me just shove code dump answers down to -1 from whatever they are. The copy and paste around here is absurd.
 
There is two transactions customer to admin and admin to seller
where can i ask this question
 
5:56 AM
@Charles link?
 
@Jack Nothing specific right now, just a general rant.
 
hehe righto
meh, just flag it to the mods
 
@gowri yet no where
 
It's much worse in for example, but still.
 
any idea what term is used for these process
 
5:57 AM
My personal favourite was the pointy hat trick of some guy for anything that's related to cloning objects in java lol
 
that could help me to google
 
@gowri That's just called revenue sharing
 
@gowri Ooh, now we understand.
@gowri I think you're describing a marketplace, right? Where third parties come to list their goods, and the market takes a cut of the customer's payment?
 
@Charles: Exactly
 
hola
 
6:01 AM
@gowri Marketplace is a good one, but it might not imply the whole thing about taking a cut. Revenue sharing is close, but I'm not sure.
@Lusitanian Hi hi hi
 
@Charles how's it going?
 
Now i got idea. I will figure out soon @Charles and @Jack thanks a lot
 
@Lusitanian Feh. That's how it's going.
 
lolwut
 
Too much stupid with not enough unstupid to counteract it.
I mean, I found all of two unanswered questions from the past 24 hours that were worth answering.
 
6:06 AM
lolwut
 
4
Q: MySQL InnoDB SELECT...LIMIT 1 FOR UPDATE Vs UPDATE ... LIMIT 1

JScoobyCedI have a table v_ext in a MySQL with InnoDB engine: - id: primary key - code: pre-generated list of codes (say 1000 codes are generated randomly) - user_id: initially NULL When a user purchase an item, they receive a code. I need to update the table to populate the user_id column. I have two ...

See, we need more questions like this. Self answered :)
 
It was called Chained Payments in paypal
 
@Jack it isnt bad .. after so allowed
 
@NullPointer "after so allowed" ... ehh, wud?
 
I mean seriously take a look at this guy.
 
6:07 AM
You mean after they allowed to answer your own question?
 
2
Q: Voting System On MySql update will not work

TheWhiteHatterOk so what I have done is made a script to show database and included a voting system that SHOULD update the works, dworks in mysql database if someone clicks works it changes the value of works from say 3 to 4 and 4 to 5 if clicked once more same thing for the dworks part but it doesn't update ...

 
looks lik ewe need to delete this ^^^
 
I saw that question too .. it's just ... barf
 
The code isn't too horribly busted, except that it's referencing variables that don't exist.
@gowri We'll have to keep that term in mind, thank you.
Okay, so I don't watch the site during the day (US time) very much... do we get as many "I want a pony" questions then, or is that exclusively the realm of those that live in other timezones?
Because I'm having some very serious trouble grappling with stereotypes here and I do not like it.
 
@Charles I think they must somehow know that you're online ... haha, nah, I ran out of close & down votes last night lol
 
Dare I suggest to create a separate queue for rep < 1k? =D
Unfortunately, someone has already asked for that kind of filter ... but it wouldn't take a rocket scientist to figure out what would happen then ;-)
 
1ks and a few people in the 40k range.
 
But perhaps first posters could be a review queue ... only for their first post, it will get looked at and reviewed by higher reps, coaching them to ask better questions :)
hmm actually .. i think that's already there isn't it.
yeah .. scrap that ;-)
 
stackoverflow.com/q/14050251/168868 -- but do not dv, it's a typo question but it isn't a stupid one.
 
@should we propose php.stackexchange.com
i saw a proposal for matlab
 
6:18 AM
Didn't matlab go beta? Or was that one of the other mathy programs?
 
what is connoisseurs ?
 
what is google?
 
What is?
 
does anybody know a tool which can extract methods from a wsdl file?
 
@DineshVenkata Yes, SoapClient
 
6:25 AM
@Jack any generic client which can be used without PHP?
 
@DineshVenkata This is PHP chat. We give PHP answers. Because PHP.
 
I understand that
 
@DineshVenkata Yes, it's called google SoapClient -php
 
@Charles I see what you mean, now.
 
-1
A: Calendar Using Jquery and Php

Audumbar BidaveYou may use following links to get your answer, That will show you the demo and code in jquery .You just have to read it carefully and insert that given code in your code. http://kyokasuigetsu25.wordpress.com/2011/05/26/how-to-use-jquery-ui-datepicker/ http://www.phpeveryday.com/articles/jQue...

It's crap like this, people. It's crap like this.
"You just have to read it carefully and insert that given code in your code." -- NOOOOOOOO!
 
The question is at negative four! It's a code begging question! It does not deserve answers! And yet, here they are, the copy-pasters!
They're coming to take me away, ha-ha, they're coming to take me away, ho-ho, hee-hee, ha-ha, to the funny farm!
 
Update: negative 5
 
Because if they don't, I'm gonna lose it and bust a digital cap into these people.
^^ This is a joke and I am not going to commit digital violence.
Just some bolded all-caps because that is the only tool markdown gives me in comments.
 
0
Q: Change display html table in view on Yii Framework

Giovanni Di ToroI have made a module for financial management using Yii php framework and installed the model, controller, CRUD , and views through Gii. Now I want to display the contents created for each financial movement in a table , one movement per row, inside the view movements page - such as in the admin....

 
@Charles bolded all caps are dangerous
 
6:30 AM
Ya, what if Jeff sees them?
 
run for the hills before he brings back his enlarged font bolded all caps
then shit gets real
 
@PeeHaa area51.stackexchange.com/proposals/48905/beer could you provide any suggestion question please
@guys How many calories are in a beer? is that a good question for a proposal
 
5
A: Using PHP variable and use it in Jquery/Ajax page load request

Bhuvan Rikka$('.content').load('<?php echo $phpurl; ?>'); will do

Bah, who needs to escape $_GET stuff ... o.0
 
How does that get to +5. How.
Goddamnit, this really is the eternal september, isn't it.
 
1
A: Using PHP variable and use it in Jquery/Ajax page load request

mačekYou'll want to take precaution to escape the value properly <script type="text/javascript> var url = decodeURIComponent('<?php echo rawurlencode($phpurl) ?>'); </script>

And the Rube Goldberg Machine entry :)
Well, at least he understands the concept of escaping.
 
6:41 AM
Might want to explain what json_encode is doing there. It makes sense only if you understand reality. Also, doesn't json_encode do quotes?
oh, wait, nm, you removed'em
 
They were never there.
 
-- a film by M Night Shyamalan.
or however you speel it.
 
Hello All, i am facing one problem in wordpress plugin wordpress.org/extend/plugins/wp-cumulus
any help will be appreciated..
 
hello everyone, I'm trying to write my first ever db.class.php with Singleton Patterns and other useful public functions so I can connect to MySQL db using PDO instead of the deprecated mysql_connect which I already know how to do but is unfortunately not "the best". Looking for the "best practices" template. Any suggestions? Thanks
 
6:55 AM
i am using tag cloud in my blog and its working fine. i just want to open my post in new tab when some1 click on cloud tag.
 
@BenJones Best practice says don't do singletons and don't roll your own class.
 
For that i downloaded developer version and did changes as per instructions , but still no success
 
Singletons are an anti-pattern designed for languages that lack globals.
 
#PDO #MySQL #PHP #OOP #Singleton #bestpractices #template #db.class.php
 
Don't roll your own class because PDO does all the things you need.
Also, this is a chat, not twitter, get those idiotic hashtags out of here.
 
6:56 AM
 
i have followed instructions given in point 2 in roytanck.com/2009/03/17/the-top-5-wp-cumulus-hacks
 
@Charles haha this is my first time ever on here. very cool experience! what do you mean " Don't roll your own class". thanks
 
Dependency injection is a software design pattern that allows removing hard-coded dependencies and making it possible to change them, whether at run-time or compile-time. This can be used, for example, as a simple way to load plugins dynamically or to choose mock objects in test environments vs. real objects in production environments. This software design pattern injects the depended-on element (object or value etc) to the destination automatically by knowing the requirement of the destination. Another pattern, called dependency lookup, is a regular process and reverse process to depe...
 
it has good enough to know what should to do
 
@BenJones ^^ read that wikipedia article
 
6:57 AM
@Charles yes
 
@BenJones What I mean is that you do not need to wrap or extend PDO under most normal circumstances, and you should not be using singletons in new code. Use dependency injection instead.
 
@NullPointer: how does beer really help to improve muscles. Does it make sense. I like your proposal.
 
@Charles thanks. I found this while looking on Wikipedia lol en.wikipedia.org/wiki/Roll-Your-Own
 
@gowri i am not sure abut this @PeeHaa can help us
 
@Charles I am trying to connect to MySQL db and singleton is to ensure only 1 connection to the db
 
6:59 AM
@NullPointer thanks for this
 
anyway it is funny
 
@gowri lol...:)
 
@BenJones Unless you have the most horrible labyrinthine codebase in the world you do not ever practically need to worry about preventing duplicate connections. Put the connection in the bootstrap / init / file that you always include in every request and don't worry about it.
 
but i am facing issue with Wordpress
 
@Charles Looking for the meyerweb version of reset.css but instead for database object in php... like the "holy grail" of db.class.php - something that I can confidently use for my first every deployment.
 
7:02 AM
@BenJones It's called PDO. You're already using it.
No, really, seriously.
Just go use plain vanilla PDO.
Over time, you will learn what it lacks, and learn how to extend it. Don't do that now. Do that only after you know what it might lack.
Then you can revisit the question.
This general rule is true for a great deal of PHP development, and development in general.
 
@BenJones ahh its was for you too ustream.tv/recorded/22783515
@Milap yours welcome
 
@Charles soudns great thanks for the encouragement. I've connected to mysql using mysql_connect but now want to create a template... found so many different ways to create a db class in php and all i really need is a db object adn I can go fwd (which I can do) but I was just looking for the BEST and very simple/clean db class template in php ... thanks a lot Charles! et all
 
@BenJones I think that's really the root of your problem. In the bad old land of mysql_, it was a good thing to have a class to wrap the insanity. PDO is mostly sane by itself.
Just be sure to:
1. Set the connection character set.
2. Turn exception mode on.
3. Catch exceptions and deal with them gracefully
 
@NullPointer thanks! watching now...
 
@BenJones yours welcome ....
 
7:26 AM
stackoverflow.com/q/14050940/168868 -- who the hell would upvote that crap!?
-1
Q: logout google account using json implement in php

user1859181i have tried the below code but i am not getting a solution. <?php header('Content-type: application/json'); $logout_url = 'http://www.google.com/accounts/Logout'; $d = array('location' => $logout_url); $res=json_encode($d); ?> can i anyone give a idea. Thanks.

Right, that's my limit for the evening.
I can't take it any longer.
 
@BenJones you said that you are using PDO ... then why in hell are you using mysql_connect() ?
 
@tereško why? or "why the hell"?
 
@tereško I think he meant was.
 
@tereško I was using mysql_connect() but have been advised to use PDO, hence my questions..
 
7:37 AM
anybody have used that plugin ?
 
@tereško no I haven't. looks like a good reference, thanks. I am making a seperate db class and want to include the singleton pattern etc. but just can't find a great template...
 
All my day passed by analyzing payment flow. Not yet written single line of code
Another question stucked
0
Q: How to design sales model for escrow type payment process

gowriI need advice for best sales model for payment process. Basically my system is kind of market place. There is two kind of transaction. Customer will pay full money to administrator. Administrator will take some fee and release payment to seller. So for the single order, we need to do two t...

 
@BenJones don't
 
Today boss will react
 
7:41 AM
you should not need "db class", and singleton is an antipattern
 
@BenJones, listen to @tereško, he's even crankier than I am, and also knows his stuff. :p
See? That's pretty much word for word what I said. :p
 
i have slept for 3 hours and am at work now ...
 
@tereško Are you sure you really want to subject yourself to this with that little sleep?
 
 
i was reading a book .. had to finish it
 
7:42 AM
@tereško Oh, I hear you there.
 
hey Charles, ahha you guys are good. So I was just listening to all this in that video. so you guys really suggest not to go with a singleton pattern for db eh? wow so many evidence to suggest going for it, but you guys know your stuff!
no db class at all then eh?
 
not usually
the are always exception , but PDO itself is already abstracting the DB connection/interaction part
also , i hope that you did not mean for your DB class to work as some ORM, because that's whole another can-of-worms
 
not sure about ORM...
 
Avoid ORM for now.
 
7:46 AM
What are your thoughts on a persistent connection?
<?php
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(
PDO::ATTR_PERSISTENT => true
));
?>
 
52
A: What are the disadvantages of using persistent connection in PDO

CharlesThe same drawbacks exist using PDO as with any other PHP database interface that does persistent connections: if your script terminates unexpectedly in the middle of database operations, the next request that gets the left over connection will pick up where the dead script left off. The connecti...

3
 
rule of thumb: you do not need it
 
@Charles Thanks Charles! Very complicated stuff!
 
also, @BenJones , you ming find this useful: stackoverflow.com/a/11369679/727208
 
@tereško awesome teresko really appreciate your expert advice!!
 
7:50 AM
@BenJones That ain't the half of it.
 
@tereško Interesting, doesn't $this->provider() work? Is that why you're using call_user_func()?
 
I'm sure :)
yikes... brand new here (obviously)
using cloud9 and loving it
 
@Jack because that code was made by spit-n-wiggle. I was not sure that calling it directly would work.
 
Wud? This is not a copy/paste from your stash o' code goodies? :)
 
@BenJones I recommend lurking here for a while. I mean hours and days. There are some amazingly smart people here, including folks that work on PHP itself. As in, people that basically have commit rights to the language itself.
 
7:53 AM
@Jack nope .. assembled on fly
 
You'll pick up more good and bad things about PHP by just being in here than any other method. IMO.
 
as most of code "examples" in my answers
 
For example, a bad thing about PHP: 90% of questions are crap.
 
Fact.
 
@Charles thats bullshit .. it's closer to 99.5%
 
7:54 AM
haha
 
lol
wow.. good group to be around! truly humbled.
 
I wonder if anyone did a data query on that ... the tag that receives the most close votes.
 
It'd be interesting to compare the top ten in that regard.
Downvotes as well.
and are going to give us a run for our money though. There are some amazingly bad questions there.
 
@Jack there are several
 
I think I want to create a db class no?? I want to reduce the "overhead" and I will be making many calls to the db via ajax
but I want to load the db once
so I should create a singleton db class???
 
7:58 AM
@tereško Yep, browing through them now =D
 
@BenJones Singleton == additional class wrapper BS == overhead. Don't do it!
Okay, I need to take out the trash, do the dishes, and head to bed.
G'night all.
 
@BenJones you should create a single connection per execution ... the post that i liked above shows "how"
 
haha ok
ty :)
 
all th structures in php live only as long as the request is executed
so , you should only bother with sharing same connection for a single request
 
ok... I plan to make ajax calls from broswer...
it is only one ultimate request.... that's the thing.
It's a series of ajax calls for lookup values in a drop down menu with a final UPDATE to db
 
8:01 AM
Morning
 
morning
 
@BenJones doing multiple AJAX calls just to look up something in a dropdown does not seem very sensible. you should aim to reduce ajax calls, they are very expensive.
if you can fetch that data on the original request, do it.
not only does an AJAX call have to go through the whole HTTP stack and PHP again and possibly introduce unnecessary complexity and additional points of failure, if you're unlucky it will create a new TCP connection each time which is extremely slow.
but maybe I'm just misunderstanding what you are saying ;-)
 
i think the usecase he talks about is : you select a category in form, and that action fetches the list of subcategories
if you care about optimization and there are no complex logic for that list, then you can dump in all in the HTML file by default
but quite often you need to ask server for the list of available subcategories
 
8:20 AM
yeah, for that use case it's probably acceptable to just do the ajax call
 
Hai, Is anybody here familiar with postano api
 
sounds like some "social spamming platform"
 
@tereško do you have any idea ?
 
@Ramarajudantuluri If someone knows, they will tell you.
 
8:34 AM
@Jack ya Ok sorry
 
 
1 hour later…
9:34 AM
1 hour later…
 
hiya
on areaa 51 is it require 40example question with 10upvote or question like stacloverlow
stackoverflow
 
good mornings :)
 
@hakre morning ..
@PeeHaa morning ,,,
 
Morning @NullPointer, @hakre
 
for beer lovers .... @PeeHaa
 
9:51 AM
@NullPointer I already opted in :)
 
:)
which option?
 
@NullPointer To opt in is like to register for updates (via email or other notification medium)
 
thanyou
 
10:10 AM
According to the clouds in the sky it seems not possible to get 10 brand new sport cars delivered in front of my door today. - Is there any other way to get these cars delivered for free? — hakre 40 secs ago
 
Your votes to close and delete this highlighting issue will be greatly appreciated. Thanks — hakre 11 secs ago
 
10:29 AM
morning
 
11:19 AM
0
Q: Unexpected output when printing element of array in c

NullPointerI am creating a simple c program and output of below program should be 2 but i am getting 50 dont know why (i am newbie to c) please let me know where i am missing #include<stdio.h> int main(int argc, char** argv) { int a[4]={'1','2','2','\0'}; printf("The value of a is %d",a[1]); ...

lol...
 
user50049
12:00 PM
1
A: Please synonymize the now-empty [php5] tag with [php]

Tiny Tim PostI did one last merge as a few more crept in since you posted, but this is now completed. php5 is now synonymous with php. This is another example of how the PHP community does a fantastic job of curating the tag, thank you all for your efforts.

 
@TimPost Yay!
 
@TimPost Just wanted to post that!! Yay!
 
Are you fucking kidding me
@PeeHaa, I must know how much the max speedup I can get before tackle the 'programming related part' — Yao Zhao 3 mins ago
Please delete that question before I loose it :)
 
@PeeHaa Yes. :D
 
muahahahaha
 
user1125394
I'm still not sure to understand what's ORM, is it a 1-to-1 relation between objects and db tables/rows
 
12:26 PM
@cyril That probably depends about the kind of objects you speak. You normally use an ORM to store Domain Model Objects into an RDBMS.
 
@TimPost Thanks @TimPost
 
I posted an answer here stackoverflow.com/questions/14051722/… which only worked on my server setup, but not others. The issue was utf-8 encoding for json_decode() which needed to be specified. I however did not do so, but it worked for me.
I am trying to figure out why I did not have to on my setup. Anyone one have any ideas? I checked my php.ini and I have no iconv settings enabled, and only other non-mbstring setting is default.charset which is not for function encoding.
 
user1125394
@hakre is ORM class Car -> table Cars, or is junction tables, (2 or 3 tables for the objects) still ORM?
 
@cyril The database structure has normally nothing to do with the ORM itself. The ORM is only the mapper, regardless how your database looks like.
At least I would keep it that strictly, otherwise what an ORM is and what not would become too less distinctive.
And one might say, hey I'm using ORM while actually he is just generating SQL queries in let's say a PDO wrapper.
 
user1125394
ok it's predefined queries for your objects
 
user1125394
12:43 PM
thx
 
@hakre well, as commonly used , ORM is a system that generated queries and mapper for give entity
what you described is more like the "original intention"
 
user1125394
12:59 PM
@tereško "[...] queries and mapper for give entity" can you clarify please?
 
@tereško Yes, but that does not say much, other system would do so as well, that's why I suggest to be more distinctive when talking about it. And sure ORM has neither been proven right nor wrong, it's just some concept. I wonder where it was originally coined.
 
@hakre Probably originated from the Java world, e.g. Hibernate.
 
user1125394
1:17 PM
the problem with ORM I think is you always end up adding mappers when your system grow, and then becomes spaguettified
 
And that was my last cv for the day =/
 
Already :(
 
I start at 8am SGT
:)
cv 15 times while i'm having breakfast =p
 
:)
 
Hi! How can I make bootstrap navbar to be fixed position in small screens, iPhone for example?
 
1:33 PM
@Olli How is that php related?
 
no way, but i'm just asking it
maybe someone could answer
since there is no ppl in other channels
 
@Jack Yes, Hibernate is an ORM, isn't it? :)
 
@hakre I do believe so, yeah =D
 
@PeeHaa gone.
 
1:46 PM
Hehe someone spam downvoted me
I wonder who it was...
 
1:57 PM
@hakre just a guess , but i would bet on: created for smalltalk, branded in java
@Jack why are you talking to the avatar-size-challenged people ?
@Neal if it was more then 3 votes , it should be reversed ~ midnight (GMT)
.. they have a bot for that , making rounds
 

« first day (803 days earlier)      last day (4128 days later) »