« first day (1279 days earlier)      last day (3669 days later) » 

7:00 AM
@Illaya don't use new Array() unless you know what you're doing :P var numArray = []; is perfectly fine here.
intValue+=''; doesn't make any sense in this context since you don't need a string
And you should always provide radix to the parseInt function, like: parseInt(intValue[i], 10);
 
@Miszy oh thanks
 
@Miszy or String(intValue).split('').toString()
 
Maybe. But I think join(',') is more verbose
 
morning
 
7:06 AM
I was just boasting
fun could be ''+(''+intValue).split('')
 
@FlorianMargaine
 
@GNi33 I'm not sure of what you mean. Maybe we should talk about that on dystroy.org/miaou/1?Miaou ?
This is hilarious :
1
Q: Is it possible to get and query element by dataset when using javascript?

James Waynewe are all familiar with getElementByID, getElementsByClassName, and document.querySelector() methods. My question would be, as HTML5 allows us to use data-set now, can we query elements by their data-set? Thanks.

The accepted answer starts with
> @dystroy's answer is probably exactly what you need
^^
 
0
Q: Broadcast a Function Call

RUJordanSo, I'm trying to create a real-time grid map, and I've got it to where when you move, you can see who is on your coordinates. However, if I use app.io.broadcast it only broadcasts the list of who is on the coordinate you just landed on. So, I was wondering if there was a way to broadcast a flag...

I hope somebody knows, I can't find anything on broadcasting a "reload trigger". I'm not sure how to phrase it
 
@RUJordan What lib are you using ? socket.io ?
 
@dystroy express.io
Which is basically socket.io just a little different
Although I think I have an idea how
 
Haha I got it!
sourceundead.com now has a fully functional real-time map! You can see users enter and leave your coordinates as it happens :3
Next step is to track the realtime login and logout time and learn how to trigger a function onbeforeunload
 
@SteamFire no, it should not be flagged. It's not very fair, that's all, not a big deal
 
@dystroy Laughing my ass off :D :D :D
 
Note to all : I always accept a game of Tribo on miaou :D
(well, until I have to work, that is...)
 
Note to all: he's the creator of this game, he always wins
 
7:24 AM
If you want to be the first player, don't launch the game, ask me to do it
 
@dystroy what's this game?
it's my break
 
@DawidvanderHoven 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.
 
var arr = [1,2,3,4,5,6,7,8,9];
	var alertLoop = function(i) {
		if (arr[i]) {

			//Here I need to get output like 123456789 using arr[i] += '' or something
			$('.org_val').html(arr[i]);
			setTimeout(function(){
				alertLoop(i+1);
			}, 4000);
		}
	}
	alertLoop(0);
anyone help me
 
all please tell me i can sleep at work?
@Illaya what do you get?
 
7:38 AM
@Illaya (\/)(;..;)(\/)
 
am getting separate values
1
2
3
4
5
6
7
8
9
 
Are you begging for a ban ?
 
but I need the output like 123456789
how to concatenate
 
@Illaya .html replaces what's currently there with what you're putting in its place
You're not going to see anything appended...
 
@Illaya $('.org_val').html($('.org_val').html() + arr[i]);
 
7:42 AM
@DrogoNevets yes. Its working. Thanks
 
youre welcome, i like the easy questions!
 
@DrogoNevets That makes vomit trickle up
At least cache $('.org_val')
 
If anyone wanna try my jQuery terminal: www.hacklover.net
 
@Azylak 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 agree, but then im not sure what use the entire thing is and i didnt get to bed until 01.00 last night so am shattered so dont really care today!
 
7:46 AM
Reason #45 of why I love visual studio: When visual studio is launching the program in debug, windows opened in the meantime show on top and appear to have focus, but password and other sensitive information is written instead to the code in visual studio
 
@DrogoNevets Well it's worth mentioning for his sake
I know you know better and don't care ;)
 
@neil i guess - fair point, but i keep singing this in my head (saw them live last night) google.co.uk/…
 
@DrogoNevets Oh yeah, that's an awesome song
 
even better when done live to an audience of a few hundred
their first ever gig in London
huh, apperently got command doesnt invoke git who knew? :P
 
7:55 AM
I also enjoy the original by coldplay
I'm a sucker for songs which use violins strings and piano
 
yes so do i! but for a duo, mostly, the sound those guys make is just phenominal
you know thats a cello right?
 
@DrogoNevets Yes, I know. ._.
 
you'll love the piano guys then if youve not heard them before, thats all they are, and he plays the cello like no one I have ever heard
 
Cello can hit those levels
 
@aunghn 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.
 
7:57 AM
I used to play the violin in high school, though sometimes I wish I had chosen cello instead
 
apperently it is a strung instrument, a percussion, a rubbing, and man, he has such talent, and the feeling that I got last night was that I was just along for the ride
they were allowing us to watch 2 REALLY good friends, who see themselves as "middle aged dads" just jamming and having fun
 
Really good musicians can move you emotionally when you listen to their music
 
or thats the impression
yea and i am a sucker for music that does!
 
Sounds like they know what they're doing
 
the piano guys, go to their site, have like 50 videos or something crazy
 
8:01 AM
I think I can get away with one youtube video, but not more while I'm at work
Maybe i'll take a look later
 
fair enough
they on grooveshark too :P
 
Hi
Another day with no hopes
2
Q: IE 10, when I click on Compatibility button, everything moves to left

Customized NameProblem is when I click on compatibility button or in developer tools try to view page in IE 7,8 or 9 When I click on compatibility button (next to URL area) in IE 10, all of the controls on my page, float towards to left. Not sure what could be wrong, I also tried browser Mode to IE 9, 8 and ...

 
@DrogoNevets I do use grooveshark at work, when boss traffic is minimal :P
 
@CustomizedName Forget IE 10 compatibility button... that's some shit
 
@CustomizedName whats wrong is its IE
 
8:05 AM
why do you need it?
(I would say forget IE but that's my point of view)
 
@SteamFire +1
 
Realy? who use the shitappens button?
oups
/s/shitappens/compatibility
 
typo
You misspelled "microsoft incompetence button"
 
sorry
 
Xsi
Why onClick= works: "c=this.value.length;this.value+=c" works and "x=this.value;c=x.length;x+=c" doesn't?
 
8:12 AM
this button is like: take a pizza, remove the bread, scramble the rest... that's it
 
Xsi
sorry...
couldn't get it
 
this message was not addressed to you, don't be sorry
 
Xsi
Ok
 
we spoke about IE incompatibility button...
 
Xsi
x+=c
 
8:16 AM
same as x = x + c... but if x or c is a string, you'll have concatenation instead of addition
 
Xsi
this.value+=c ⌀ x+=c
 
when you get value from something, it's in lot of case (or everytime?) a string
 
and do not rely on compatility button for testing the different JS engines
what the heck is "⌀" symbol?!
 
it's ⌀
 
which means?
 
8:18 AM
you don't know ⌀?
 
across diameter in wood work....
 
haha
 
but thats it to me....explain
pretty please with a cherry on top
 
is XML considered a regular grammar?
In the sense that you could read tokens entirely from left to right without jumping ahead in order to properly parse it
I think it is
 
depends how its read in doesnt it?
 
8:20 AM
So you don't need to perform lookahead?
 
@Xsi do you manipulate strings or ints???
 
Xsi
str
 
oh okay
 
Xsi
So... <input onkeyup="s?e=Date.now():s=Date.now()"onblur="c=this.value.length;this.value+=c/(‌​e-s)"><script>s=0</script>
 
First thing, make a function
 
Xsi
8:22 AM
113 bytes
the former
 
"s?e" ???
 
@DrogoNevets I mean I guess you could
But generally whenever faced with a simpler version of a problem, you can always treat it as a more complicated version instead
The inverse is not always true
 
hey, @others, look at xsi's code...
 
true enough
i am!
whats he trying to do though? (sorry got a fry up (normal service resumed today)
 
@DrogoNevets I thought you needed a photographer...! :O
yeah i don't really understand too
 
8:28 AM
@SteamFire we do, but i did all the driving to get us to a gig yesterday so we agreed I was allowed this one
there is at least an example that doesnt error
not too sure what use it has though
 
@DrogoNevets haha
 
@SteamFire in my defence it was over a 100mile round trip!
but worth it, cracking gig
 
which artist?
 
the piano guys
google "peponi" one of my faves
!!google the piano guys peponi video
 
8:33 AM
1st should be right i think
but if you want to see how they think out of the box with their instruments, look at their one direction cover
and tell me youve seen a piano played like that by so many people at once before
 
ho i see! When i was young i tried that with my piano
fun
 
yea, they do the same to the cellos
 
it's like guitar tapping... but more piano tapping! haha
 
keybase.io - does anyone have invites left? :)
 
+34 rep today, KILLING SPREE
 
8:46 AM
A moderator here :O
 
(close enough)
 
days represented 562
rep cap was reached via rep from upvotes *only* on 6 days
earned at least 200 reputation on 7 days
earned 2 reputation from suggested edits
3 of these 6 days were during first winterbash...
 
@Prateek 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.
 
@ThiefMaster I don't really understand all the concept... This thing group all your accounts and certify them...
 
3
Q: Why are so many Object utilities defined on the constructor and not the prototype

wheresrhysIn ES5 lots of Object utilities are defined on the constructor, not the prototype (e.g. defineProperty and keys). What are the reasons behind this design choice? To me, myObject.keys() seems like a much better API than Object.keys(myObject)

 
8:55 AM
@FlorianMargaine Promise a virtual hat that can be weared a few days => people spend hours working trying to answer questions... I think I can solve world hunger problem
 
user2509223
time for the first coffee of the day
 
@dystroy heh, totally
 
@Frost 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.
 
o/
 
Hi guys. I'm currently struggling with promises and I think I got the concept a bit wrong. Basically what I am trying to do is writing a little template handler. it has a load() method which loads a template and stores it into a property and it is going to be chainable. The method I want to chain it with is `attachTo()` with appends the template I loaded before to a DOM element. But since the template is loaded asynchronously I tried to use promises. But it seems that the `done()` method is firing immediately before the request has been finished.
 
8:59 AM
@dystroy hello. yeah, ws.jskept throwing fatal errors. When I would post too fast, it tried to fire the "you need to wait x ms between messages" or something like that, sadly, the error - function seemed to be undefined
not sure why, didn't have too much time to look into it yesterday
but that is not a bug that occurs on your side, right?
 
@derylius im #3 already
 
user2509223
@DrogoNevets timezone?
 
hello, when I wanted to give a string list to background, I got a error from Spring MVC, anyone know the problem?
parameter Object : var m_submit = $.extend({},m_transfer_object,{"mappedSecurityTypeIds":['1']});
Error : java.lang.NumberFormatException: For input string: ""
 
@GNi33 I didn't observe it but I refactored those things and it's really possible (or probable) there's a bug in some parts of the error sending. I don't see those errors because the minimal time between messages is very small both on my test server and on dystroy.org
 
@SteamFire I mainly want to squat my username before someone else takes it ;)
 
9:02 AM
yeah, I figured
there's probably a bug there then, and not a problem with my setup
 
But from what I understood it's basically a keyserver with a nice environment around it
 
I figured this problem when I understood the thing...
 
just built a quick youtube-onebox plugin yesterday to get the hang of things
 
@ThiefMaster good idea. Decided to register with one of my usual names on Twitter a few days ago and was disappointed ^^. Please send invites if you manage to get some :)
 
@derylius BST, it is 10.03
 
9:03 AM
how do you guys deal with changes? should I just file an issue or something?
 
user2509223
@DrogoNevets thats way too much coffee then, btw BST == British Summer Time ?
 
@GNi33 in miaou ?
 
@derylius yes
and yes
 
yeah
 
late night yesterday, am struggling today
 
9:06 AM
@GNi33 It's usually good to come and speak of it in dystroy.org/miaou/1?Miaou and after that you may register an issue. If you have code that looks pretty and satisfying, you can also make a pull request
Is your youtube boxing based on flash ? I ask because none of my computers has flash installed...
note : I might be hard to reach, as my son should leave hospital today and I have a mountain of work to do...
 
I've seen that every img-element gets linked, which pretty much destroys parts of oneboxing, I think the img-elements should either get wrapped in an anchor - tag, or there should be some kind of exclusion on the selector of the click handler
@dystroy oh, okay. Yeah, was there yesterday, but it was pretty empty
 
I think they should get wrapped too
 
@dystroy no, it's pretty much like the oneboxing here
just a thumbnail-image of the video and a link
 
@GNi33 ping me when you find an empty room. Or ping @FlorianMargaine. Pings cross the room boundaries.
 
no need to play videos in the chat imho
alright, will do. thanks!
 
9:10 AM
@GNi33 fine to me :)
 
@GNi33 w.r.t the timeout, the default timeout is awfully long iirc
 
that would prevent the server from crashing, yeah. there's still a problem though ;)
 
@GNi33 only images that are on their own line
 
@FlorianMargaine yes, it's 300ms on dystroy.org
I'll change the default setting to 1000 ms
 
9:12 AM
the default setting is good, otherwise I'd probably wouldn't have seen that bug ;)
 
good point
 
it was 50 seconds at some point, so it's ok :D
 
1
Q: Q unhandled rejection reasons with Q.all

YoorekI get this warning for code below and I don't understand why. It's similar to this question: Unhandled rejection reasons (should be empty) but ... I'm pretty sure I am handling all errors, so why the warning? Here is JSFiddle: http://jsfiddle.net/yoorek/jLLbR/ function run(number) { va...

 
I was working last night on a refactor impacting error messages, I'll try to commit that as soon as I can find the time
@FlorianMargaine but that was a bug (in fact a wrong manipulation in vi, I think)
 
9:16 AM
Hi all, I have this issue with removing the last part of my URL dynamically..
Must say it's easier to add than to remove
 
hey guys! holidays finally!
 
@DavidH If you detail your question, you may receive some regex witchcraft help
 
Of course but I wanted to see if anyone cared first because, no asking to ask questions right? :P
 
@Ryan 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.
 
@Loktar I hope that doesn't mean you'll be dropping loktar69, though :P
 
9:19 AM
So I have this toggleClass and an if statement for when this button is clicked. Now on the first part of the statement it correctly adds a parameter to the URL, though upon second click of the button it turns into inactive, meaning it should remove the duplicate part of the URL.
 
Can anyone pls let me know with example that how can we implement encapsulation in javascript?
 
Though when removing a part of the URL I don't really understand the RegExp's even after reading the page on MDN
 
@Ryan Through closures.
(function () {
    var x = 'myPrivate';
}());
 
@Miszy thanks for your reply
:)
 
This is what I've tried:
http://pastebin.com/E3qURuLd
Mistake in the code i've pasted is that the dezeLi.toggleClass in above the Li definition but in my own code it's under, so don't worry about that.
 
9:23 AM
var myObj = (function () {
    var x = 'myPrivate';
    return {
        fn: function () { return x; }
    };
}());
myObj.fn(); // returns value of private variable "x", no way to modify it
 
@dystroy, it is possible to use some functions in Miaou? Like, how do you start a game?
 
@Miszy is this a module design?
 
Type
!!game @somename
 
@dystroy That didn't make much sense. Use the !!/help command to learn more.
 
9:25 AM
^^
 
@dystroy That didn't make much sense. Use the !!/help command to learn more.
 
Perhaps is there a good explanation on how to remove parts of an URL, mainly the last part if it's duplicate anywhere?
 
!!afk really must work
 
@Feeds @BenjaminGruenbaum what's "dynamic reason" in bluebird API doc?
 
0
Q: Waiting for promises in different methods

Thomas David PlatI'm currently struggling with promises and I think I got the concept a bit wrong. Basically what I am trying to do is writing a little template handler. It has a load() method which loads a template and stores it into a property and it is going to be chainable. The method I want to chain it wit...

 
9:34 AM
I just finished up a significant chunk of code, and it's an hour before lunch..
Do I really want to start in on a new chunk of code? Nope.
 
So none has knowledge of regex's?
 
@FacePalm 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:53 AM
@DavidH We do, we just have enough experience with regular expressions to not try
 
3
Q: How to refresh a view/template in Backbone.js

SportI am running into an issue. My CommentinfoModel is fetching data from the server and I am able to show all the data in a view. I used another PostwallModel to post the data in same view. When I am posting the data, I get a response from the server, but that data does not appear in template. When...

any one have idea
 
@Neil Sorry I didn't quite get that ;p
You'd prefer a different method to change URL's you mean?
 
@DavidH Kidding aside, you should see if there are URL argument regular expressions available
You make a map with each key/value pair and check if you find duplicate keys
Then you recreate url
Better still, you don't have duplicate url parameters :P
 
Wait so is this for after I add the parameters into the URL or do you mean that way I can prevent the duplicate parameters in the URL?
 
time to eat in 30 sec :D
 

« first day (1279 days earlier)      last day (3669 days later) »