« first day (1311 days earlier)      last day (3632 days later) » 

1:00 PM
@jAndy or dont use iFrame....
 
As I see it, you must validate on server for correctness
Though validating on client also is "nice"
 
I usually do both
 
@Neil my personal preference is to validate on every layer possible!
 
validation on client should prevent 99% from doing anything bad, but of course you need to validate on the server again
 
@DrogoNevets I think you can overdo it a bit :P
 
1:01 PM
@Neil Validation on server = security. Validation on client = UX.
 
UX ?
 
@Neil i dont, because if you validate on every layer, and re-write one of the layers the validation still exists even if it was a rush job for whatever reason
 
!!tell KarelG google UX
 
@KarelG user experience
 
1:02 PM
* picks UX magazine *
 
@DrogoNevets I can see that
I tend to validate in methods to avoid "wtf" moments
If I think I'd really not know what was going on if I didn't check at that point
 
0
Q: Missing image handle with promise

kreeI would like to load tons on images in the background from urls, and if one of them isn't available, don't load, just throw an error message. I created a service for this in AngularJS, and my problem is, I can't handle the unavailable images error. app.service('Images', ['$q', '$http', function ...

 
UI on left
ux on right
 
i get it, but the 2nd is less practical IMO
 
Otherwise, I tend to put validation in its own section
 
1:04 PM
@KarelG Not when you get near the end of the bottle.
 
Have you ever used a glass bottle of ketchup
It's not better
 
@Neil i tend to have a isValid method on my model objects/interfaces
 
but the cover gets easily dirty at the 2nd
 
0
A: Change the function context in JavaScript (for access local variables)

jAndyUnfortunately (or fortunately) you can't do that. The problem which arises here is that you cannot "pass around" the such called Activation Object from a function (context). Function.prototype.apply and .call can only provide an option to set the context for a function from any regular Javascript...

is that comprehensible
 
@DrogoNevets I don't like putting vaildation in the same place. It gets messy
It might have isValid, but the logic isn't there, it is somewhere else
Otherwise, I tend to put validation in its own section
 
1:06 PM
@Neil i find that it is seperate enough if it is contained in the one function/method
@Neil depends how complex the validation
if its just a load of "is not empty string"....
 
keh /back2report
 
@DrogoNevets I try to optimize by using helper validation methods
 
@Neil such as....
 
It is still ugly though, since most of it is due to dependencies with other fields
 
@jAndy apparently the guy barely knows lexical scoping and you're throwing implementation details such as AOs at him :P
 
1:07 PM
yes I was in doubt too it might get too much into detail
 
@DrogoNevets Such as validator.isValidEmail(email)
 
but I didn't know how to describe the problem otherwise
 
@jAndy +1 nonetheless, it is very informative.
 
@Neil ah i see, yea i tend to have alot of those too
 
1:09 PM
the validator is a handy thing I made that also collects error messages
At the end, I choose what to do with them
So I just have to call the appropriate validation method for each field (or combinations thereof)
 
@Sivan Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
by the way.. since HTML5 required, pattern and placeholder attributes + css-link to :valid and :invalid clientside validation has become REAL fun
no excuse for not doing it
 
@Neil yea, i have similar too, but yet to make a reuseable object to store them,.....maybe i should do that now as i have some down time.....hmmm ponders
 
@springbo Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@DrogoNevets I don't reuse though
 
1:13 PM
@DrogoNevets already got no scrolling down
 
I guess I could, but I have no reason why
 
guys, is there a way I can track when the readystate of an iframe has changed?
 
for custom validators, i use prototyping. eh
then it's easy to bind it to fields, and get a summary of it
( jQuery has it, but i prefer a js one if it's only for validating a form )
 
user1596138
> We just got an email from such and such and it says we suck at our jobs and can't do the calendars right.
 
!!s/jQuery/Bleeeep/g
 
1:15 PM
@jAndy ( Bleeeep has it, but i prefer a js one if it's only for validating a form ) (source)
 
user1596138
So I go check the email because this sounds funny
 
@KarelG You mean like some sort of control that handles the logic of the field type?
 
user1596138
> Please remove this and this. We must've forgot to tell you we don't do that anymore. Thanks!
 
!!s/./JQUERY NIGHTMAREEEEEEEE/g
 
Server error (status 500) occured (message probably too long)
 
1:16 PM
O_o
 
user1596138
So fuck you drama queen. That makes no sense.
 
Fellas, is there a canonical question on "How do I get variables from PHP to JavaScript?"
Seeing a crapload of those question, and haven't found a concrete canonical.
 
!!afk lunch (..and you LOST THE GAME)
 
What do you mean by canonical? Variables are going to be specialized for whatever you're using it for
 
@Jhawins let's avoid SO chatrooms when we're pregnant or on our period ok?
 
1:18 PM
I doubt if you can generalize too much
 
Maybe this?
17
Q: Get variable from PHP to JavaScript

praveenjayapalI want to use a PHP variable in JavaScript. How is it possible?

 
user1596138
@pythonian29033 I don't think that makes much sense.
 
@Qantas94Heavy The answers there are pretty crappy though...
@Neil I don't think it is.
 
@SecondRikudo: true
hmm
 
There are a few approaches, either print it directly to the JavaScript code, or place it somewhere in the DOM and query it from JavaScript, or (best) AJAX.
 
1:19 PM
@Qantas94Heavy <--- from that i noticed
 
15
Q: How to access PHP variables in JavaScript or jQuery rather than <?php echo $variable ?>

StevenHow do I access PHP variables in JavaScript or jQuery? Do I have to write <?php echo $variable1 ?> <?php echo $variable2 ?> <?php echo $variable3 ?> ... <?php echo $variablen ?> I know I can store some variables in cookies, and access these values via cookies, but values in cookies are relati...

 
Solved my problem after a few hours of searching - thanks! — eventide Jul 26 '13 at 13:31
 
user1596138
Most the time none of the top answers are xhr/ajax for some reason
 
i was like 'areyouserious' ?
 
guys is there a way that I can have a div auto-adjust it's size, depending on the size(s) of child elements?
 
1:21 PM
@SecondRikudo Do whatever is more convenient for you
I generally don't like putting it into a hidden input field unless you were going to forward it in a form
 
@Neil Trust me, I know how to do it if I need it, but I want to write a canonical.
Both to dupe against, and to get the damn gold badge already :D
 
So you're going to create a question you're planning on answering yourself?
 
@Neil That's right
 
user1596138
@Neil Community wiki
 
user1596138
Q/A
 
user1596138
1:23 PM
Whatever. I think he's right to do it. There's no standard and totally complete question to mark others as duplicates of.
 
@Jhawins ... though these days they think getting the rep off those questions is a good idea
 
Don't you have to worry about someone else doing the same, marking yours as a duplicate?
 
user1596138
@pythonian29033 What have you tried? Normally this automagically happens. If you're setting widths and heights manually and you wonder how to do this try using max-height and max-width instead
 
@zarkone Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
What plugin would you recommend me for displaying function graphs in a <canvas> element?
 
user1596138
1:24 PM
@Qantas94Heavy Nah. It should be a community wiki if this is his reasoning and no one will get rep.
 
... I agree, but some don't
"Oh no, someone is getting rep from a post" is not and has never been a reason to convert something to community wiki. (cc @RobertH) If it turns out that the canonical question and the answer are being continuously maintained by multiple people, we can think about flipping the switch. In the meantime, calling people rep whores for posting what is objectively good, well-intentioned, and well-written content is, at best, counterproductive. — Anna Lear ♦ May 6 at 16:50
 
user1596138
Unless he makes it a community wiki it'll just be marked as a duplicate of the others. It'd be funny if he just puts up a normal question and answer back to back hahaha. Downvoting to hell and back.
 
@Jhawins I don't plan on making it CW.
Unless I ask for people for help in editing and improving the post, I don't see a point in making it CW
 
@Jhawins if the content is useful and more complete than any of the dupes, there's no reason to downvote imo. We need good content after all.
 
user1596138
@Qantas94Heavy Well this whole room will likely downvote it if he tries to do it solely for rep (yeah dude he has 55K I don't think this is it) or does a shitty job.
 
user1596138
1:26 PM
!!stat SecondRikudo
 
@Jhawins Second Rikudo (http://stackoverflow.com/users/871050/second-rikudo) has 55811 reputation, earned 57 rep today, asked 57 questions, gave 2125 answers, for a q:a ratio of 57:2125.
avg. rep/post: 25.57. Badges: 17g 74s 123b
 
0
Q: AngularJs, how to use external variable inside promise response of $http.get

user3172446Here is my code for (var i=0; i<5; i++) { var url = generate_url(i) ; $http.get(url).then(function(response){ var param2 = response.data.param2 $scope.outputData.push({'index':i, 'param':param2}) ; }) ; } In this example, I suppose to obtain an array in the $scope....

 
user1596138
No one will ever think "he made this post just for the rep!"
 
@Jhawins I don't aim for the rep.
 
user1596138
Where does his rep have to go? Onward towards infinity.
 
1:27 PM
I aim for two things: Have a duplicate target, and have a gold JavaScript badge.
 
is it that important to get a golden badge ?
 
user1596138
@SecondRikudo The other user questioning your motives for this Q/A with yourself wonders
 
@Jhawins Actually, the top possible rep is 1.0JS
@KarelG Golden badge = dupehammer on JavaScript questions.
 
@SecondRikudo will you add anything about the question being "canonical" or a "reference" in the question title?
 
@FabrícioMatté Nope.
 
user1596138
1:28 PM
A guy told me the other day that I should start asking high-rep SO users for jobs.
 
@SecondRikudo if so, I'd just adjust mine's title as well. Oh well.
 
user1596138
He had like 32 rep. His picture was the brave little toaster. Must look for this conversation
 
@FabrícioMatté I may add a notice on the question that it's intended for being a duplicate source/canonical/reference/whatever
 
user1596138
He insisted that all high-rep users are in positions of authority and hiring.
 
Not all canonicals needs to be CW.
 
user1596138
1:29 PM
And totes awesome
 
@SecondRikudo yeah, that's right
 
@Jhawins I'm a high rep user and not looking for people to hire. Actually, I'm 22 and just started on my first real job.
 
@SecondRikudo I've made my answer CW for asynchronicity canonical I've created and didn't get any edits yet stackoverflow.com/q/23667086/1331430
 
user1596138
Haha I know I was saying it because of how stupid it was :P
 
I couldn't find a way to make the question CW though
 
1:30 PM
@SecondRikudo i know, but i'm pretty amazed that you are prepared to waste time trying to dry out a flooded room (posted dupes) without turning off the taps (upcoming dupes).
it's a losing battle
 
@KarelG The dupehammer makes it easier.
And the more people we have with that ability the better.
 
user1596138
343
A: What are "Community Wiki" posts?

Justin StandardWhy have Community Wiki posts? One of the goals of the website is to be a continually evolving source of good information. Community wiki posts help enhance the wiki aspect of the site. For more information about the proper use of community wiki, see The Future of Community Wiki. How do Com...

 
@Jhawins yes, I was about to read it but too lazy to look up. Thanks
 
user1596138
> A moderator has reason to believe that the post serves better in community wiki mode - if you believe your post should be converted to a community wiki, you may flag it for moderator attention.
 
user1596138
@FabrícioMatté ^ That's all you need :). Otherwise the question can be automatically converted due to a high number of edits
 
1:32 PM
@Jhawins yeah, high number of edits, high number of answers or by flagging for a moderator
it says what I already knew :P
 
user1596138
Actually.... You're wrong and so am I!
 
user1596138
> In the past, questions could be made community wiki by their authors or by certain automatic triggers but now the only means is by a moderator converting it to community wiki.
 
@Jhawins ohhh I must have missed that update
 
user1596138
So now days questions can only be made CW manually
 
thanks! :D
 
user1596138
1:33 PM
Me too hha
 
!!afk being outside
 
user1596138
Also. Last night I got kicked out -which was then reverted to run out- because I accidentally stomped on the floor upstairs and woke someone up :D. I was told I'm not kicked out, and to have my stuff out by next week or it'll start being gotten rid of. Yes, that's right, don't have to leave, but my stuff does. Or something lol
 
user1596138
!!afk so I'm getting a place on my own :D
 
Regardless of whether or not you could live there without your stuff, would you really want to?
 
user1596138
@Neil Hence the "run out" instead of "kicked out"
 
user1596138
1:40 PM
Also... He went into my room with a box while I was blowing off steam in town. I come back and he's "taking everything you can't prove you own" and tried to sell my motorcycle out from under me. So when I loaded it up and left he called the police. And they asked him who's name is on the bikes title and then told him to stop wasting their time.
 
user1596138
lmfao and I had been awake for less than an hour.
 
That's messed up
Why does he want you out so badly?
 
user1596138
Idk. I woke him up and he started cussing me out. I didn't even know he was home. And then I laughed while he was cussing me out because it was so shitty that I thought it was a joke. And then he was puling my bike out of the garage?
 
@Jhawins flipping heck mate!
is this your land lord? or just a house mate?
 
user1596138
lol yeah @DrogoNevets you can imagine why I left right away. How long could you keep from tearing somebody apart if they're trying to ruin your motorcycle?
 
user1596138
1:45 PM
This. Well this is my Dad. I moved home 2 months ago because next time I move was going to be out of state and I wanted to see 6 younger siblings more first.
 
@Jhawins youve done better than I woulda - i got in to a shouting match at the pub yesterday because someone started moving it out of the way of his mates car (who for some reason parked in a pedestrian area?!)
@Jhawins you dad?! that complicates things a little. still i have been known to punch my dad before (once!)
 
@MastAvalons Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
user1596138
lol yeah. Come inside and say you need the bike moved. Don't touch my fucking bike, especially at a pub where I'll assume you're some drunk bastard haha
 
For those that want a laugh
-1
Q: How to avoid "Request header field Authorization is not allowed by Access-Control-Allow-Headers" running JavaScript from local drive?

user3652613How to avoid "Request header field Authorization is not allowed by Access-Control-Allow-Headers" error running JavaScript from local drive? So I cannot modify server headers as there is no server. Thank you. That is not duplicate as solution offered at 'Origin null is not allowed by Access-Cont...

 
well i was outside (lovely weather here atm) so was sat within 2metres of the girl
 
1:47 PM
"It is not a dupe because the answer doesn't work, but of course I'm not gonna put any effort into making my question better"
> mfw
 
user1596138
Yeah I just left. I didn't know what was going on at all. He tried to hold me in a room and force me to listen to him repeating the same sentence at volume.max and I had to shove him off me but aside from that I was just trying to get the fuck out of there before I caused a real problem or hit him lol.
 
user1596138
> Fuck you my buddy has a 92" TV I'll go live with him
 
at least you can choose your mates right?!
 
user1596138
lol right
 
im introducingmy parents to the parents in law to be for the first time in a few weeks, im bricking it!
 
1:50 PM
@pratiknagariya Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
user1596138
 
shower, bbl
mehz, 1 vote away from jQuery gold badge but there are no decent questions to answer
 
@FabrícioMatté are there any bad ones that might survive for a while?
 
ims till lost why people care about rep....
 
@DrogoNevets Hah, have fun with that
 
1:52 PM
@JanDvorak not sure, the flood of terribru questions is too strong!
 
First time you'll feel heavily judged from both sides of the table, and feel helpless to change it
 
@Neil hmmmm or there could be an incident of laxative in myparents food the night before and them not feel up to it.....?
 
@DrogoNevets You'd need strychnine, or otherwise they'll be able to arrange for another day
 
@Neil its gunna happen sooner or later, might as well get it over with and let them realise they will hate each other and ignore each other on the big day
 
hello good people im back after a very long holiday
 
1:57 PM
Hello Everyone.
 
Hi, http://stackoverflow.com/questions/23739632/facebook-application-only-accessible-by-admin-user-account
thanks
 

« first day (1311 days earlier)      last day (3632 days later) »