« first day (971 days earlier)      last day (3993 days later) » 

12:00 AM
Nope, I dont.
Yotam, this room is hyper active at times.
 
0
A: Calculating days of week given a week number

vascowhiteSince this question and the accepted answer were posted the DateTime classes make this much simpler to do:- function daysInWeek($weekNum) { $result = array(); $datetime = new DateTime(); $datetime->setISODate((int)$datetime->format('Y'), $weekNum, 1); $interval = new DateInterval...

 
guess so.. but programmers are basically all over the world so I won't expect dead times like now..
 
Gotta love those DateTime classes :)
 
@Kishor About a year ago I've seen a great MVC tutorial online (a series actually). I recommend you build some kind of "template site" with a basic CMS and stuff and then when you get a freelance just adjust the design.. saves lots of time while price stays the same :)
 
@CarrieKendall uh?
 
12:03 AM
There are also lots of books about it..
Also a good study.. (OOP and stuff)
 
You are over rating me. I am seriously a beginner. ;) For example, trying to move into OOP today from procedural way.
ah..
oop mysqli, is this right?

http://codepad.org/8VKkw1PW
 
yep. PDO isn't it?
only need to fix the colon I think
$stmt->bindParam('first_:name', $first_:name);
$stmt->bindParam(':first_name', $first_name);
to
 
yes pdo
wow you got a hawk eye ;)
 
:) star if helped you
 
So, once I bind the parameters, I dont have to worry about sanitizing the datas right?
 
12:09 AM
yep
actually
it completely blocks the first kind of sql injections
however not the second kind
(which is very rarely seen)
however there's a really easy fix for that
one sec
 
okay
 
use $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
what is does - it forces the server to send your query in two parts to the mysql server
first part is the query
second is the bindings
it doesn't "emulate" the send
and that should be all you need
 
Gotcha
 
going to get some sleep. @Kishor good morning :)
cya
 
Good Night Yotam :)
I get an error running the query. Call to a member function bindParam() on a non-object.
any idea?

http://codepad.org/dozq82sl
var_dump($stmt) before bindparam returns false
but no idea why that returns false
 
12:27 AM
False where you're expecting a value, usually means something failed
thought you said this was PDO?
 
How can I debug what failed
nah mysqli
 
not sure whether you can use named parameters then
 
checking it @Danack
damn, cant find whats wrong. this looks so damn complicated for me. lol
 
yo
 
12:42 AM
yo
 
ho
 
I get an error running the query. Call to a member function bindParam() on a non-object.
codepad.org/dozq82sl
var_dump($stmt) before bindparam returns false
but no idea why that returns false. How can I start debugging? I am new to OOP and mysqli
 
mysqli doesn't support named placeholders
that's PDO
 
Ah
 
you're mixing the syntaxes of the two
 
12:49 AM
So this is how it should be?
$stmt = $dbh->prepare("INSERT INTO REGISTRY (name, value) VALUES (?, ?)");
$stmt->bindParam(1, $name);
$stmt->bindParam(2, $value);
1,2,3 so on denoting the number of the respective ?
 
$stmt->bindValue
bindParam would be for a query like a SELECT
 
Why do I see so much PDO and MYSQLi around in PHP land, do people here not use ORMs?
 
Ok, got it @Happyninja
But my code was straight lift from php website
 
I mean, other than when you're making something small, or something that's performance critical, why not use an ORM?
 
@BenjaminGruenbaum never heard of it
or maybe just don't know the therm
 
12:51 AM
A mapper...
 
@BenjaminGruenbaum - I am using mysqli because what I am doing is small and I am a beginner :P
 
Hmm, let's use an example here
Let's say you want to fetch all users from your Users table, that have made a Post (in your posts table, let's say there is are many posts per user for example).
How would you do this?
 
me? or him?
 
Let's say you.
 
go through all posts, fetch the unique users
 
12:57 AM
@ircmaxell so it's just that most of the questions you're seeing are from users who don't know how to work with databases?
 
Ha ha lol
 
@BenjaminGruenbaum is there a link from php.net you can provide? i like to read
 
They don't really know how to work with code... So orm may help, but not by much unless they learn the concepts...
 
What would be the right way to do that according to you @BenjaminGruenbaum ? Just to know :)
 
@ircmaxell Yeah, I get what you're saying. There is no point in using an ORM before you know SQL and PHP both well
 
1:00 AM
Yup. Once you do I agree there is benefit. But before it is just magic...
 
in cross domain auth, what do you pass to let the other domain know that this is the same user as that was logged in on the other site.
 
@ircmaxell A lot of times I use magic. When I used PHP I knew pretty much my way around the language, and around SQL, but I had no idea how the stack actually runs. Like, when the user sends an HTTP request to my server until the server completes a response what happens.
 
This is a stupid question, but would it be $_SESSION['email']=echo $email; or $_SESSION['email']=$email;?
 
1:18 AM
it shuld be $_SESSION['email']=$email;
*should
 
@Ocramius ?
 
@ircmaxell is there a good documentation link you could recommend me for ORM? i do like to learn new stuff but i google it and i found it more confusing then anything else.
or @BenjaminGruenbaum or anyone else, i would really appreciate it
 
not that I know of
 
there is so much term i don't know like i don't know if that is just a different way to say something i saw somewhere else or if this is actually something like pdo. what is ORM?
 
morning
 
1:32 AM
Google it
 
@ircmaxell that is what i do since @BenjaminGruenbaum mention it
i don't take anyone as my googler, i don't know much but i do respect you all
 
@Happyninja If you don't know SQL or PHP well, don't bother with an ORM just yet. It does 'magic' as ircmaxell said it, you shouldn't use it if you don't know what the underlying logic is.
 
@igorw do you have the image file for the YOLO stickers?
 
he prefers ircmaxwell ;]
 
@BenjaminGruenbaum okay
 
1:36 AM
@CarrieKendall was wondering about your annotation stuff
did you solve it?
 
@Ocramius no and i haven't the slightest clue where else to look
 
@CarrieKendall did you validate your mappings? can you gist some of the stuff? :)
 
its being caused by some resource left by sonata (i removed the admin bundle recently) but i have gone through all of annotations
 
@BenjaminGruenbaum but say i like to learn more than i can handle is there a book you would recommend, preferably in an electronic format?
 
@CarrieKendall mail me a gist eventually, I can check on friday
 
1:40 AM
@Ocramius what's the best way to do that? i have fished through the DatabasePlatform as the exception message suggested
 
@CarrieKendall aaah, you most likely have an ENUM field on the DB
 
something is requesting JSON column type
 
JSON column type? O_o
 
which is a requirement of Sonata Admin Bundle.. and a common error with their bundle (apparently)
 
weird
guess they serialize json data
 
1:42 AM
`[Doctrine\DBAL\DBALException]
Unknown column type "json" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::
getTypeMap(). If this error occurs during database introspection then you might have forgot to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your
custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping informa
how can i track the request?
 
well, you can run the command with --verbose and you see the stack trace
 
http://stackoverflow.com/questions/17077942/how-to-use-textarea-in-forms
 
how did i not know this O.O
 
@CarrieKendall may I stab you because of this?
 
@Ocramius yes, yes you may
 
1:48 AM
/me picks the Spear of Longinus and throws it at @CarrieKendall
ok, off to bed =_=
cya
 
i am all liek how can stack traze doctrine:genarade cmdns pls :P
^ question format
all right, thanks for your help and knowledge :] night @Ocramius
 
Oh btw
Will be doing a live demo of #zf2 + #doctrine2 at @web5_conf this friday. On an old netbook. On windows. Wish me good luck! :D
this will be fun :D
ok, really now
 
@Ocramius all the best <3
 
@BenjaminGruenbaum thanks for mentioning it
 
@Happyninja not read the content but formatting is awesome
 
1:55 AM
@NullPoiиteя i must be tired but i'm not sure what you meant to say
 
@Happyninja i mean , design and presentation is very good .
 
@NullPoiиteя yea ;)
 
user652649
morning
 
now i think i should work on English more then anything else for ...
 
user652649
@Jack makes me think he has thousands of class exceptions
 
user652649
it must be a developer of magento
 
Lol, probably never heard of namespaces :)
 
2:45 AM
Judging from exception name
probably ZF1
 
user652649
i might be wrong, and probably i am... but i tend to not create many exception classes... in fact i use nearly only the spl classes... with few "exceptions" xD that except when i need to use error numbers, or when i absolutely need to handle differently two or more kind of exceptions of the same "super type"...
 
I would say you can introduce a custom exception if you're actually going to catch one ;-)
Admittedly I don't always play by that rule though.
 
user652649
@Jack not always, because a nested try catch may be sufficient
 
@Wes It's not a hard rule you know ;)
And how does a nested try catch help?
 
user652649
3:01 AM
an error is an error, unless you don't need two or more different handling, there's no need to introduce imho a new custom exception... i repeat again. i'm probably wrong... so it's only me xD
 
user652649
what do you think?
 
user652649
that design may be not really forward-looking... but at least i don't have dozens of files containing only exceptions
 
So you think just throwing the base Exception is fine then? :)
Of course, as much as possible reusing SPL exceptions is a good practice.
 
user652649
possibly, yes... don't joke me... i'm still learning :P i would use two exceptions also if a method needs two different exception handling ie void test() throws excA, excB
 
I'm not "joking" you, just trying to find out your thought process ;-)
 
user652649
3:07 AM
who starred the crap i just said?
 
user652649
WHO?
 
user652649
show yourself!
 
I think it's Madara ;-)
 
user652649
Jun 9 at 16:35, by Madara Uchiha
@Wes Write this in your profile description: "I don't know how to star messages properly. I should be banned from the PHP room and Stack Overflow chat in general. I am a disgrace to myself, and my fellow PHP programmers."
 
user652649
that's gone wrong
 
3:17 AM
 
user652649
the starred list has turned into my personal wall of shame
 
@Wes Flag them :) just to add decoration
 
user652649
xD
 
user652649
LOL
 
@Wes lol
 
@Jack too much theory :P
 
@NullPoiиteя In your opinion :)
I agree with the wall-of-text quality though.
 
user652649
> Lastly, keep in mind that it’s not a breaking change to change an exception your code throws to a subtype of the exception. For example, if the first version of your library throws FooException, in any future version of your library, you can start throwing a subtype for FooException without breaking code that was compiled against the previous version of your library. This means, when in doubt, I would consider not creating new exception types till you are sure you need them.
 
user652649
i really agree with this guy
 
user652649
xD
 
3:27 AM
@Jack reading find interesting
 
user652649
so @Jack i wasn't that wrong? O_O
 
I never said you were that wrong :)
 
user652649
yahoo. i'm good at something.
 
@Wes That's what he said.
 
user652649
who is the star-troll?
 
user652649
3:31 AM
is @MadaraUchiha ? xD
 
anyone tried careers ?
 
Yeah
I'd so get up on 5:30 in the morning to star all your shitty messages
9
 
user652649
@MadaraUchiha aha
 
And now finding them one by one in the transcript to clear the stars too
 
hahaha
 
3:33 AM
@NullPoiиteя yep :)
 
@Jack have you got response from companies ?
 
Well, Singapore doesn't have many job offers on careers, so I don't think I'm statistically significant ;-)
 
so does i . but there are many company which allows remote location ....and that is what i am thinking to do ... ( trying to earn with education )
 
Nevertheless, it's good to have a version of your cv on more than one platform :)
 
you may also show your cv link in about me section is quite good ... i got many mail
 
3:40 AM
The link to your cv is "mailto:nullpointer"? :)
 
@Jack noop where ?
 
oops ... :P
 
Alright so from now on gimme the codez questions are closed as OT
Let the slaughter begin!
 
@MadaraUchiha i still see the old cv dialog box ?
 
3:49 AM
It's not live network-wide yet
They started with meta
It'll be network-live next week
 
look good thing...
 
OT really is a stretch. Vote for RTFM close reason =D
I've made a mention on meta once that the difference between TL and Dupe is how lazy the reviewer is ... I was downvoted lol.
 
haha
may be like me .. i hardly find a dup ...
 
Then a mod commented to please let them know who is (ab)using TL for that ... I mean, what do I look like? The Gestapo?
 
got a few answers on careers... one time within an hours, one time two months later :)
 
3:57 AM
@YounElan how you asked question on careers :P
 
rofl: yep, best way to make sure the employer knows how to code, ask a question to the employer :p
 
@Jack :P
@YounElan i hope you didnt get RTFM in replay :P :D
 
lol, manuals, I read one once, I swear
 
Why would an employer know how to code ... isn't that why they're hiring in the first place? ;-)
 
user652649
sketchtoy.com/38386041 i really like to waste my time
 
4:09 AM
0
Q: Open question links from duplicate dialog inside duplicate dialog

Madara Uchiha Note: I'm using this question as an example, it's possible that the problem doesn't exist in that specific question. Say someone asks a question. How do I find the value of this <input> with regex in PHP?. Normally, I would like to close it as a duplicate of Parsing and processing HTML/XML?...

Votes, suggestions and comments please!
 
@Jack not entirely correct... once a freelancer wants to hire me because he is getting more work ...
 
There are always exceptions.
 
@Jack I used to hire a friend to do the design of website projects for me
 
in HTML / CSS / DOM & web design, 4 mins ago, by Wes
@mikedidthis http://sketchtoy.com/38386041 i'm supposed to be working
 
0
A: Open question links from duplicate dialog inside duplicate dialog

JackI would propose an improvement in how duplicates are scored within the dialog by using "canonical scoring". Here's how it works. When the list is populated with similar questions and many of them are closed as a duplicate of a common resource (the canonical question), automatically add that in t...

:)
 
4:23 AM
@Wes get back to work.
 
user652649
i should indeed
 
http://stackoverflow.com/questions/17079209/ajax-load-more-button-not-working-properly-disappears-once-clicked
self dup
 
4:44 AM
morning folks :)
 
@YogeshSuthar morning ...nothing will solve the problem stackoverflow.com/questions/17079073/php-clarification-needed ,code in question makes no sense and op needs to read more and rewrite code ...
 
@NullPoiиteя Yeah, OP is decrementing the result when it is 1.
 
@minitech your edit stackoverflow.com/posts/12860140/revisions increase size of comment > 600 words and now it can not fit into comment box ... so it would be cool if you rollback
 
5:02 AM
Odd that I hadn't noticed, shouldn't I have been notified about that?
 
user50049
My God, it's full of stars
 
hey monkey :p
 
user50049
Technically, I'm an ape.
 
still hairy :)
 
Morning Foks!
 
5:06 AM
it aint spam its just in Chinese goo.gl/C9J7L ...
@TimPost there are k's of stars here :D
 
@NullPoiиteя It was edited, please kill your delv request
@TimPost You sure took your time :o
I flagged like, 1:30 hours ago
 
i cant its locked :(
 
@TimPost mind killing ^ as well if you're here? :P
 
@MadaraUchiha why not move it to bin ?
 
1 message moved to Trash can
Possible!
 
5:12 AM
hey
 
hell with yahoo chat etc. from now php chat
:)
 
@MadaraUchiha Yes
 
@YogeshSuthar No
 
5:13 AM
@LuckyAli Wooho! Yahoo! chat sucks!
 
yes it does . thats y a here
 
codepad.viper-7.com looks not working on clicking past it just give blank editor
 
@NullPoiиteя Yeah from yesterday its not working.
 
morning
 
@Mr.Alien monring
 
5:26 AM
@YogeshSuthar it was my favorite editor
 
@NullPoiиteя my also. @Mr.Alien morning
 
@YogeshSuthar Where's your stud pic :p
 
@Mr.Alien I removed :P. I want to learn css3, do you have any good tutorial link.
 
@YogeshSuthar you can learn with image too :P
 
5:33 AM
@YogeshSuthar I refer books, and I want to learn JS :p
@NullPoiиteя ??
 
@YogeshSuthar mdn ?
@Mr.Alien morning '
 
@NullPoiиteя Image? You mean cheat sheets?
I need just 16 more to enter top 10 for CSS3
 
@NullPoiиteя Actually I prefer real world things, we get to learn more instead of learning from docs or articles or books
 
@Mr.Alien but i prefer documents , reference and articles .. it provide complete knowledge
 
5:39 AM
@NullPoiиteя I read them once am familiar with the language concept, many users point newbie to docs, trust me it's a complete bouncer, you know what margin: auto; does still there are lakhs of users who find that how to center my page
 
@Mr.Alien Which books?
 
@YogeshSuthar If you want any than lemme know, do you have android?
 
@Mr.Alien android mobile?
@NullPoiиteя I will look into the link thanks.
 
@YogeshSuthar Yap
 
Hello All, I am calling an action via $.post from a phtml(zend framework). How can I catch the variable sent by my jquery post request in the action?
Here is my phtml code-
$("#username").blur(function(){
$.post("mymod/students/checkusername",
{
username : $(this).val()
},
function(){
if(data == 1)
{
$(".zend_form").append('<p><font color=\"green\">Username Available!</font></p>');
}
else
{
$(".zend_form").append('<p><font color=\"green\">Sorry, Username already taken!</font></p>');
}
I am invoking checkusername action
 
5:45 AM
@Mr.Alien No I don't have it.
 
how to receive username variable?
 
@udaysagar I guess you should learn some concepts, how did you bounced to zend when your basics are not clear
@YogeshSuthar Oh ok, thought that I can add you on whatsapp anyways I guess I've your ID, will send you the digital copies there
 
@Mr.Alien Thanks.
 
@YogeshSuthar Formality matt kar
 
hahahah
 
5:48 AM
:p
 
teek hai, hum $_POST se le saktha shayadh @Mr.Alien
 
tum hindi mat use karo ... :P
 
@udaysagar Not sure about zend, nor am that good with jQuery
@NullPoiиteя hahaha
 
@NullPoiиteя mera hindi mei kya galath hai bhai..
:-)
 
5:55 AM
@udaysagar Its not mera, its meri
 
chaltha....:-)
 

« first day (971 days earlier)      last day (3993 days later) »