« first day (1333 days earlier)      last day (3618 days later) » 

9:00 AM
no
anytime you write function() {
 
Dammit
 
setTimeout(function() {
setTimeout(this.something) works fine
setTimeout(function() { console.log(this); }); doesn't work
 
Yeah what I mean is setTimeout is bound to the global object. Therefore "this" is global. Thats what I was trying to say.
 
it has nothing to do with setTimeout
 
@FlorianMargaine of course it doesnt work
 
9:01 AM
Ah jees
 
function C() {
    (function() {
        console.log(this);
    }());
}
@Schoening this won't work if you do new C() there ^
 
that still won't work
 
30 secs ago, by Florian Margaine
@Schoening this won't work if you do new C() there ^
 
Oh.. Alright then.
 
anytime you see function() {
what's hard to understand? :(
 
9:03 AM
function should be renamed into slender
 
@jAndy I don't think you can do that with just JS
 
@jAndy no, function should be renamed to Jason, because it kills stupid people
 
poor @Loktar :(
 
@dystroy Refactor/change the javascript engine to accept slender instead of function?
 
@FlorianMargaine Why ?
 
9:05 AM
@dystroy his name is Jason
 
@Strawberry 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.
 
I still like the slender idea :P makes people afraid all the time
 
@dystroy esprima
 
@Magikaas It would be easier to use a precompiling task, which might be a gulp task
 
9:05 AM
:P
 
but the real useful thing would be to have a library allowing the use of slender in a js file
Maybe it's still time to put it in ES6
 
@jAndy ive never heard of it
 
ES6 is built by consensus, right ? We just have to vote, right ?
 
!!google slender js
 
9:07 AM
Phew, edited in the last second :D
 
im still none the wiser
@dystroy what's slender then?
 
@DrogoNevets A creepy alien-like creature in a suit and tie
 
^ :p
 
that would be slender man.....
 
 
9:10 AM
@DrogoNevets I believe that's what he meant, but if not, please do correct me :P
 
@Magikaas oh ok, not some weird js thing, would explain why ive not heard of it!
 
He's like a dapper, creepy octo-dad :D
 
@FlorianMargaine It just looked inconsistent to me. But I get that part now. I think I need to look into "this" instead.
 
emag eht tsol tsuj uoy
4
 
I lost it.
 
9:13 AM
@jAndy screw you!
I lost the game! (as did @jAndy!)
 
I lost the game
Damnit, I was winning for so long!
 
very hard yes I did :P
 
What a cruel invention. Some OCD person out there has to say that sentence 24/7
 
It's been months since I last lost =/
 
don't worry, losing against a top pro player is no shame
 
9:15 AM
you were the first to lose though
 
You're the best loser
I made sushi last night with my wife. She spreads the sticky rice on the algae and I roll it up and slice it. I'm starting to get really good at it
 
!!s/emag/‮emag/
 
@SecondRikudo That didn't make much sense. Use the !!/help command to learn more.
@SecondRikudo ‮emag eht tsol tsuj uoy (source)
 
:P
Do I get a cookie now?
 
@SecondRikudo you dont get a cookie for losing!
 
9:20 AM
@DrogoNevets Losing implies I'm playing.
 
thats thing about the game, everyone is playing, they just dont realise it
not until they lose
 
@SecondRikudo Everyone is playing the game, which incidentally you lost again.
And so did I.
 
@user2485972 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.
 
@Neil I am a god that can nonchalantly cut mountains in half. My thoughts become reality. If I say I don't play the game. Then I don't play the game.
 
@eagor 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.
 
9:23 AM
!!>void 0;
 
@BenjaminGruenbaum "undefined"
 
@SecondRikudo *snicker* You lost again.
 
Why was Illaya banned again?
 
@BenjaminGruenbaum probably just by being himself
 
@BenjaminGruenbaum @BoltClock did us a favor.
 
9:25 AM
Where was he being abusive again?
 
Can you help me close that ?
This question is too open ended and in my opinion doesn't match today's quality filter — dystroy 11 secs ago
 
We have a quality filter?
 
yeah, me
 
LOL
He was being a pedophile in the "casual chat" room.
What a turd.
Speaking of turds, @BadgerGirl , you miss porizm?
 
There's a "casual chat" room ? Meaning the other ones aren't casual ?
 
9:27 AM
O_o
 
A pedophile? Is that slang for saying he was being uncool?
 
I actually would prefer if SO would allow "questions" / "threads" with things like "best practices" or "tricks blah" something
 
I wonder how you can figuratively be a pedophile ._.
 
those were really cool back then when there were a few
 
@jandy, given the flo of chat, that is slightly worrying :P
 
9:28 AM
@Magikaas o_O
 
in Casual chat, 3 hours ago, by Illaya
@LittleSuzy where are you from?
 
I have 1402392406 second, Now I want to get hours and minutes from this time, can anyone help?
 
@sabbir divide by 60
gives minutes
 
@Neil I only know one meaning for that word, there's no way, as far as I know, to turn it into something unrelated or not as bad
 
divide by 60 again gives....
@Magikaas +1
 
9:29 AM
@DrogoNevets drumrolllll trrrrrr
 
looks like a timestamp to me
 
@BenjaminGruenbaum Is that "pedophile" ?
 
@sabbir
 
That timestamp gives me "2014-06-10 11:26:46" on my GMT+2 (Amsterdam/Paris) timezone. Divide by
 
!!> new Date(1402392406 * 1000).getHours();
 
9:33 AM
@jAndy 5
 
@jAndy its either epoch or 17 Nov 2058 if converted
 
!!> new Date(1402392406 * 1000).getYear();
 
@jAndy The Game
@jAndy 114
 
!!> new Date(1402392406 * 1000)
 
@DrogoNevets "2014-06-10T09:26:46.000Z"
 
9:34 AM
however, i didnt change to milliseconds - ooops! #SchoolBoyError
 
@CapricaSix Aaaagh, troll bot D:
I lost the game.
It was 15 minutes, right?
Or was it longer
 
losing protection lasts for half an hour
 
@jAndy since when?
 
since.. forever :P
 
@jAndy news to me
 
9:36 AM
Good, I still have 7 minutes on my grace period, whew
 
the timer was reset, so you're good
 
> After a player has announced a loss, some variants allow for a grace period between three seconds to thirty minutes to forget about the game, during which the player cannot lose the game again. moar
 
@jAndy thats a stupid rule, the grace period is the phase when other people in the conversation all lose it, once that is over the grace period is over
 
Since this game is global, variants are bound to exist. There is no real way to determine what others will do with the rules, bending them to their every whim, as long as the core remains the same, it's all good
 
I guess we need a ruling from the prime minister
 
9:39 AM
indeed..
 
Is there anyone that has never lost the game? Maybe a tibetan monk that has not heard or seen the internet? He must have some insightful words for us about what rules to use
 
thats no good. Everybody is playing !
 
"It is not the game itself, which you lose... You instead gain in spirituality and humbleness, through the experience of the passivity of the game"
Or something like that
Roughly translated from a tibetan fortune cookie
 
@BenjaminGruenbaum It's pedophile because of her name?
So you could have been asking her for the time of day, and it's pedophile?
 
@Neil hadnt we moved on?
 
9:43 AM
@DrogoNevets Sorry, was afk
argument lag
 
just nice :p old but great
 
@chad.mellor 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.
 
Also, just for got measure, you all just lost the game, again.
 
Son of a b-
I lost the game
 
i lost the game
 
9:54 AM
I lost
 
Hello @all i need your help.
I just jump to canvas game.
What i have made is pick a word game.
I have reviewed code available to Google.
Now what i want is i have draw-ed words like "P" "A" "T" "I" above blocks
so i have no idea how can i make this words picked.....i mean for example if my character moves over word "P" then it should prompt and say "Yes this is right word" Sorry!if i can not explain you well
 
@Justcode If you draw the letters on the canvas, then you also know when the mouse would be hovering over them, correct?
 
@Neil Justcode is afk: some work
 
@Neil its not about mouse i have a character playing with it
which moves left,right,jump etc
 
@Justcode if it moves, then you still have to keep track of its position
 
10:02 AM
so my coordinates x,y sometimes matches sometimes not
 
How do you know where to draw a letter without knowing its position?
If you know the position, you can determine whether or not the user has his mouse over it
 
yah...that's the point i have points like give me a sec pls
 
@jAndy Never seen it before. That's fuckin' awesome!
 
See here i got array where my words are filled.
 
@Justcode So you have a series of coordinates which correspond with the letters, correct?
 
10:04 AM
yes exactly
 
Is the point in the upper-left, upper-right, lower-left, lower-right, or center of the letter?
 
@dqms 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.
 
its the left and top
 
@Justcode Ok, this means that for mouse coordinates x, and y, it is hovering over a letter if and only if for each xc, yc coordinate of your letter, the following is true: x >= xc && x <= xc + width && y >= yc && y <= yc + height
Perform this check for each coordinate, and you'll know if the mouse is hovering above it
 
I can detect where my coordinates matches with char position.but the problem is sometimes without jumping over the letter coordinates matches to my original ones.
 
10:10 AM
@Justcode Sorry, I don't follow, what original ones?
 
@Neil Orginal ones you can see into image i uploaded above now i am giving u running coordinates
 
If your coordinate array contains coordinates for one type of letter and another type of letter, and you must know the difference, you should double the arrays
Or add information to distinguish them
 
@Neil Yes i have tried that but sometimes its matching even if i don't jump over letter
Is there anyways that i can detect position or id so when char jumps over word "P"
then that event should be fired?
 
@Justcode You can check if one letter overlaps another
 
how? i mean any example?
 
10:15 AM
depends on what you want to do
You don't want the mouse to be over two letters at once?
Is that the issue?
Just stop at the first letter you hit
 
nah....you are going wrong way
 
vs7
Hi
 
see i just want to detect where user have picked s letter or not
 
@JeffreyRoosendaal 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.
 
vs7
Anybody with LinkedIn JS SDK knowledge ?
 
10:19 AM
@Justcode You just perform a hit test for character and letter boxes
 
hit test
what is that?
 
@Justcode A hit test is nothing more than what we were talking about earlier, checking if a coordinate is in a certain space, etc.
 
@Justcode, I have second which I get from php time(). Now I want to get hours, minute from this second.
 
@Justcode just ping because I don't want to break the line
 
@jAndy ok
@Neil ok i tried this way although
@sabbir don't ping for question go for php room
 
10:25 AM
@Justcode It's difficult to help you because I don't know how your program works
 
@Neil yes i know let me try my self sorry to bother you @all thanks
 
@Justcode Ok, do let me know if you make any progress
 
@Neil yes sure
 
Hello, can someone help me out with this: stackoverflow.com/questions/24138043/…
 
@Kaare 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.
 
10:31 AM
@Justcode, then tell me how can I convert second to hours, min,
using javascript
 
@sabbir ive already done that for you
 
@DrogoNevets, that's not worked
 
@sabbir then you dont have seconds......
 
@sabbir var hours = seconds/(60*60);
 
Anybody???
 
10:35 AM
@MONZTAAA It's not very clear what you're asking
You generally don't submit an ajax request until everything is ready to send
 
@rafabayona 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.
 
There is partial form completion, but I won't get into that
 
@Neil im wondering if he is wanting something similar to ajax username validation, ie "is the username available" or something similar
 
@DrogoNevets Ah, form validation?
@MONZTAAA Why didn't you just say form validation?
 
i think thats what hes on about
i could be wrong, as you say, its not exactly clear
 
10:38 AM
I think he has vanished in any case
 
I was joking :(
 
@Neil I want the ajax to send after the user inputs the correct value in the text box that appears on clicking the button
 
@BenjaminGruenbaum Ah, I didn't mean to take it badly. It's just that it is a very serious accusation
 
so user clicks button, which shows an input field
 
Is it the submit button or is it another button?
 
10:40 AM
then you want to do a form submission of just the new input?
 
In other words, you want them to click a button "Submit" and the first time it will show the text box, and if it is filled, then it submits?
You need to use the onsubmit event on a form, returning false if you do not want it to submit
So you could check if the text box is visible and has a value. If not, shows the text box and returns false, otherwise true
 
@Guerilla 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.
@Gotzila 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.
 
@Neil which is why I felt like I should clarify and say I was joking :P
 
11:05 AM
why does Math not have a constant for phi ?
O_o
 
Because that's a pretty useless constant
 
I would like to see Math.tau
 
@rlemon could always create a script that added tau and a few functions (like tau to pi) if youw ere bored enough
 
Sure. But that isn't the point
 
The point is that @rlemon wants everybody to know that tau is better than pi :p
 
11:10 AM
^
!!youtube song about the circle constant
 
The point is that it it would be good to pronounce tau: math.tau
 
@RicardoRodriguez 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.
 
how would I rewrite this:
 for(var i in this.getAll()) {
      counter++;
    }
 
Into what?
 
11:17 AM
So that I dont get this jshint issue:
'i' is defined but never used.
 
Aha
counter = i + 1? (if it's a non-associative array)
 
counter += Object.keys(this.getAll()).length;
or just... drop that jshint !
 
Ahh right, didn't really think my answer through, lol
 
thanks
 
._. I looked to the right and see the 'starred' messages
I lost the game
 
11:19 AM
@Mosho because a lot of the stuff I do doesn't work in an iframe
 
Talk about a late response O_o
 
Was I supposed to respond while sleeping?
 
Yes, obviously
 
@ymajoros 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.
 
11:34 AM
I just lost the game
 
@bluevial 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.
 
        button.onclick = onclickHandler || areYouSureHandler;
Will this define it as onclickHandler and if that isn't defined as areYouSureHandler like I expect it to?
 
what do you think ? Why are you asking ?
 
@SecondRikudo Yep, if you expect it to work as I expect it to work
 
@Zerho 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.
 
11:41 AM
@dystroy I dunno, maybe JS would interpret that as a boolean and try to match them (they are both functions)
 
@emha 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.
 
@SecondRikudo You're confusing yourself with |, which is a bit operator
 
@Neil No, I'm not. || is a boolean logic OR operator.
Well, it doesn't really matter, I scrapped it anyway :P
Different question
How can I edit the text of an element, without touching any other elements?
 
@SecondRikudo The elements outside of the one you're modifying never get touched
 
11:47 AM
Is it me or is this answer really random ?
0
Q: Socket.io doesn't start

user3567975i have a problem with socket.io(node.js): I have a starting script called serverNode.js. The script is working in other computers but when i try to run it in my computer it just doesn't do nothing. Working code C:\Users\User>cd c:\nodejs c:\nodejs>node serverNode.js info - socket.io star...

 
The ones inside, well, you're forcing the contents to be re-parsed
assuming you're using innerHTML
 
@Neil I mean without touching the elements inside the one I'm editing
Which is why I don't want to use innerHTML
textContent? But does it work with buttons?
 
@SecondRikudo Why don't you want to touch the elements inside?
You kind of have to
 
@Neil I have something like htis:
 
@Ruben 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.
 
11:49 AM
<button>Text <i class="icon"></i></button>
I want to edit the text, without touching the icon.
 
Why i element in butten?
*button
 
For the icon
I didn't make this markup, I'm just using it.
 
@SecondRikudo The usual solution is to have an even dom tree, with the text in a span. But you can edit text nodes
 
Ok.
 
@SecondRikudo If you set the textContent of the button, you're overriding its contents
 
11:51 AM
\o
 
@Neil Okay, and that won't do anything to the other <i> element inside?
 
Does anyone use bitbucket here ?
 
Is the other <i> element inside considered to be the contents of the button in your opinion?
 
@Neil Well, it doesn't have any text inside, but the question is would it be overriden.
 
@SecondRikudo If you set the textContent of the button, you're overriding its contents
So, since <i> element inside is considered content, yes
 
11:54 AM
@Neil We're going round and round here.
What is considered "content"?
 
@SecondRikudo Everything contained within <button ...> and </button>
 
So how is it different than innerHTML?
 
@wizzardmr42 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.
@exilonX 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.
@Emily 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.
 
mpm
@SecondRikudo

use button.firstChild.textContent
 
@DavidKunz 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.
@RobinvdA 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.
 
12:15 PM
Anyone here uses RequireJS?
require(['clientProperties'], function(clientProperties) {
    return clientProperties.makeButton("Delete", "ban", clientProperties.areYouSure);
});
How can I use that return value outside of the require context?
 
@DavidHoffman 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.
@Naoc 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.
 
!!> Number.NEGATIVE_INFINITY;
 
@jAndy null
 
@SecondRikudo AFAIK you can't unless you use a global var and assign it to that (which IMO is something you shouldn't be doing)
 
@source.rar Yeah, kind of realized it about 30 seconds after I asked... hmmm...
 
12:42 PM
@rlemon I'm learning how hard it is to read with a scotoma. Just got another one...
gaaaah
 
silly that a bounty close-blocks a question
Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.rlemon 59 secs ago
@KendallFrey yea it sucks hard. best bet is to walk around the house, maybe make a sandwich or something
just do anything to distract you from it
 
@Shri 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.
@DanielOfTaebl 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.
 
Hi, any OVH user here?
 
At first glance, I mistakenly read your name as "Anal Garg"
 
@NickDugger hey, do you have any experience with OVH servers? I see some bad reviews on web, but they have eye catching pricing sols...
 
12:57 PM
Never heard of OVH
 
oh, alright...
 
@AwalGarg I am
but in Canada
 
morning!
 
Wow, they do have low prices.
 
can anyone tell me the difference between 'grunt-requirejs' and 'grunt-contrib-requirejs'?
 
12:58 PM
I would recommend OVH
 
i'm not exactly understanding the difference in each
 
I haven't had any issues with them
 
@rlemon is their support for hardware alright?
 
their*
 
haven't had to use any of their support yet
 
12:59 PM
!!s/there/their/
 
@NickDugger Is their anyways that i can detect position or id so when char jumps over word "P" then that event should be fired? (source)
 
Damn.
You edited your post before I could humiliate you with the bot lol
 
I think "not needing to use the support" speaks wonders about the hosting facility ;)
 
@rlemon I haven't ever dealt with the hardware part of servers, and I fear I might break something...
 

« first day (1333 days earlier)      last day (3618 days later) »