« first day (985 days earlier)      last day (3957 days later) » 

12:00 AM
@Loktar HUZZAH!
damn, I'm proud of that.
 
@Esailija idiocy
 
the occasional spike up is a tree. ;) roll with it
 
@AshKetchum Have a post object in your DB, have a tags field, add tags to post, index post by tags.
@AshKetchum That's how you'd do it in a NoSQL like Mongo or Raven. In SQL - probably have a relation between tags-ids and post-ids, and another relation for tags-tag ids.
 
@Esailija Now it doensn't work again jsfiddle.net/v4Fu4/5/ :(
 
/5 is my edit..
 
12:05 AM
Something wrong, please wait
 
codepen.io/rlemon/pen/IKiAt and now on codepen
 
@itwasntpete 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.
 
@Arthur $(this).next() returns an empty jquery collection
 
I just created a female laying mummy
 
12:12 AM
Nice
What do you think of the technique?
 
I might steal it
looks nice to me
 
@nderscore Strange
 
:) best compliment one can hear
I'll do one with runs.. It was cool too, less bumpy
 
@jAndy And now a sexy girl ;)
 
@Arthur $(this).parent().parent().next().find('.like_list2').html('ok'); would work though :P
next() stays within the selected element's parent node
you could also do $(this).closest('ul').next().find('.like_list2').html('ok');
 
12:18 AM
@nderscore Thanks but when you change a classname something like this works $(this).parents('ul').find('.icon'); but by changing the html not...
 
parents()? I learn a new jQuery function every week XD
 
better go with .closest() instead
 
parents could match other parent nodes further up the tree, if I'm reading the api right?
 
parents() will just greedily crawl to any parent node up to document.documentElement
closest() will stop at the required node
 
Ah ok parents is to get up instead of getting down?
 
12:21 AM
well, you could say so I guess
getting up the DOM tree
 
parents and closest both go up the dom tree, but closest will stop going up once it hits a matching node, parents will grab all of them that match all the way up to the body tag
 
Another problem with clar both between the ul's jsfiddle.net/v4Fu4/7
 
$(this).closest('ul').next() will give you the div, since it's the next sibling to the ul tag
maybe $(this).closest('ul').nextAll('ul').eq(0) instead?
 
The ul symbol disappears then :(
 
made some adjustments codepen.io/rlemon/pen/IKiAt
 
12:34 AM
 
I see strange but thanks!
 
@nderscore And do you know this? $(this).closest('ul').nextAll('ul').eq(0).find('.like_list2').load('/like_last_l‌​ist');
 
doesn't work?
 
12:42 AM
it works, but you're filling that li with the entire html contents of the result frame lol
 
And now with <ul class=""> it doensn't work jsfiddle.net/v4Fu4/10 :(
 
find only searches for decendants, since the ul itself has the class you're searching for, it won't find it
 
Ok so this problem can not by fixed?
 
what are you trying to accomplish?
 
To change the short like list when people like or unlike a text
 
12:53 AM
do you want to find the next ul that is .like_list2 or the next .like_list2 within the next ul?
either case? or will it always be the next ul with class like_list2 ?
 
the next ul that is .like_list2
 
$(this).closest('ul').nextAll('ul.like_list2').eq(0)
use that
 
@dqw 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.
 
@nderscore Thanks man! Is it also possible to check if this ul is exist, and if so, you add it?
 
you shouldn't need to. if it doesn't find it, the call to .load() won't do anything
if you want to do something else if it doesn't exist, you can check if the length property of that jquery collection equals 0
 
1:00 AM
I'm sorry i mean it is sometimes that the ul doens't exist, van you check that, and then add it?
 
yeah, but how do you want to determine where to add it? should it be added to the parent of the first ul tag?
 
Oh no, that's a problem to :( Maybe I can try something with hide() and show()
 
this is how I would do it: jsfiddle.net/_nderscore/v4Fu4/14
 
Thank you!
 
1:10 AM
lookit all dat c++
alright, time to port it to javascript
 
@Pierre-LucPineault 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.
 
user1125394
!!/urban tabernacle
 
@cx "SyntaxError: missing ; before statement"
@cx [Tabernacle](http://tabernacle.urbanup.com/980234) often used in Quebec in the form of: Tabarnak.

Tabernacle is a swear.
 
@nderscore Thanks it works perfect now! 1000 times thanks!
 
Glad it works now :) You should probably check out all the jQuery DOM traversal functions api. it could help if you run into further issues: api.jquery.com/category/traversing/tree-traversal
 
1:20 AM
@nderscore Tomorrow i will start with it, i must go to bed now, it is 3:20 am :(
 
1. open this URL in Chrome view-source:chrome-devtools://devtools/devtools.html
2. see who is holding the copyright on Chrome's devtools
 
well, it's based on webkit's devtools right? so it's originally apple code. probably some licensing issue.
 
@Å imeVidas I'd be surprised but I linked to it yesterday here :P (More specifically to this page)
@nderscore Yeah, note the year of the copyright :) It's when they forked it
 
I wonder if this copyright is permanent now
 
@Å imeVidas Unless they write the file from scratch then yes.
 * 1.  Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 
1:33 AM
I think until they rewrite it from scratch, that's gonna stay there
 
Files they write have the google copyright though
(gotta love how they named a package wtf)
 
@Timber232 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.
 
1:53 AM
Best practices question: We're adding an event to all elements with the class uploadVideo. How can I add that event to HTML added dynamically?
 
@SomeKittens jQuery or no jQuery?
 
jQuery
 
$(document).on("event",".uploadVideo",function(e){
    ///whatever
});
Delegation
I wouldn't attach an event by a selector in the first place though. I'd probably just attach it when the elements are added - you are adding them, right?
 
Knockout is. It gives a different error message depending on what subsection the user's in.
 
If Knockout is then why are you even in this problem to begin with?
Just add a data-bind with the appropriate event to them
Definitely no need for jQuery for it.
 
1:58 AM
that brings up architecture issues... (Given this is a startup, we'll acknowledge they exist and never fix them until 2.0, which is written entirely by interns)
But event delegation works, hadn't thought to use it in this instance.
 
I wouldn't solve this with jQuery
I'd consider that a mistake
I'd use a data-bind with $parent or whatever if you want to be scope sensative
 
As in, there are pages devoid of KO that we want this to load on (two places we use it are in the header)
 
I'm off to sleep. Delegation or adding it when it load, those are the two options :) Good luck!
 
We could create a KO model that's universal, but that's another can of worms
night, thanks for the help.
 
2:14 AM
 
@Scott 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 did they illuminate under the bedsheet so well?
 
Any suggestions on blogs/podcasts I should be following for JS goodness?
 
2:29 AM
@ThomasShields stackoverflow.com/questionsØŸ
 
hello everyone how can i convert my datepicker to live using on. I am new to Jquery
 
@copy wrong link? or are you suggesting I should follow SO questions?
 
$(document).ready(function() {
is it possible??
 
@user2046410 format code by pressing ctrl+k after entering it, or using the button to the right.
 
oh sorry Im new here
$(document).ready(function() {
 
2:33 AM
@user2046410 no problem. Everyone had to be told that at one point. :)
 
I think you're missing some code and I'm not sure if I understand your question @user2046410
 
Do you have an idea to my problem. This is my situation I am using Window.print and then when I click the close button of the window print my date picker is not working anymore
Hi nderscore the datepicker is working fine, because my code in window print is replacing entire DOM inside body by overwriting .innerHTML - that will replace every element with a new element, that is why i want to use the live or on to my datepicker code
 
Replacing the entire body tag sounds messy...
But anyway, what are you replacing the entire page content with? Does the new page's innerHTML contain the datepicker's html elements? This would be a lot easier with the sourcecode.
 
yes the innerHTML contains the datepickers elements.
 
what's different about your print content? you might want to look into using a different css style instead of replacing the entire body tag
or even just hiding all the existing content, then showing it after the print is done
 
actually nderscore its one of the options that I am thinking to hide the other style
 
still messy
but you shouldn't lose your events
@JanDvorak Never touched Torch. I can't find any compelling reason to stop using Chrome yet.
 
Anybody worked with geolocation api ?
yet
 
@Darkyen no. but i'm interested
 
PS anybody knows about the devices wikipedia supports ?
 
2:59 AM
still a small gap when it transitions frames, and a lag spike..
but it's getting there
 
@rlemon want to work for on a goodwill project ?
ping me on gtalk please ... it should be a 2 hours task
 
Mother of God:
var x = 1;
<!-- x = 2;
alert(x); // alerts "1"
 
The future of JavaScript seems really dark when answers like this get downvoted:
-1
A: Changing the behaviour of the typeof operator in Javascript

Aadit M ShahNo, you can't modify the behavior of typeof or any other operator for that matter. However the next best solution is to use Object.prototype.toString as follows: function typeOf(value) { return Object.prototype.toString.call(value).slice(8, -1); } Now you can use it as follows (see the dem...

 
@Darkyen it's 11pm here and I am up at 6am.. so ping me tomorrow maybe
 
@rlemon i messaged you on google
read it at your own convienience :-)
 
3:08 AM
@Darkyen Perhaps I can help?
 
Sure can :-)
 
I saw. I am pinging you back here because that goes to my phone and is slightly annoying ;)
 
got gtalk ? // make it quick lad
@rlemon oh didn't knew
 
@AaditMShah Well, upvote then!
 
@AaditMShah add djdark88.7@gmail.com //laugh on the email later i made it when i was like 13 / 14 so psh
@AaditMShah quick bro... i gotta run for a java training the teacher will throw a null point exception on me if i am late \o/ ha!
 
3:11 AM
@Å imeVidas I can't. It's my answer. -_-
@Darkyen I'm not on Gmail. Wait.
 
@AaditMShah +1
 
i've been staring at this for the past hour and a bit and can't seem to bridge the gap.. see when it generates a new image sometimes it doesn't get the height from the last image right :/ codepen.io/rlemon/pen/FkljK
now I am going to bed.
feel free to try to figure it out everyone :P
 
@rlemon i commented on it for fix :P
 
@Darkyen Okay, I'm on GTalk Abhishek.
 
your solution is change the way the entire thing works.
great, thanks.
very helpful :P
 
3:14 AM
:D thats how infinite terrains are done :P
 
not mine :P
 
incremental approach bro... its there for a reason
 
trying a new approach.. because I can
:P
 
:-) you are always welcome to
 
the problem has a solution, I'm just not seeing it (my gapping issue)
 
3:15 AM
@Darkyen Why are you going for Java training? o.O
 
@AaditMShah college
 
Oh. I pity you.
 
@rlemon dont u think that the function you are using to generate the terrain
 
Perhaps you would like to brief me about what I need to do on GTalk?
 
if i am right is this `this.points[i].y += Math.random() * this.shift * 2 - this.shift | 0; // can cause abrupt changes at places`
?
@AaditMShah send me an invite to chat ?
 
3:18 AM
@Darkyen the issue is not there
 
mk
 
if you look I draw lines between points.
yes I can have spikes. but I fade and metaball it all
so those normalize
 
@Darkyen Okay, I'm thoroughly confused. I sent you a "hey", but how do I invite you to chat?
 
when I jump from one 'image' to another I should be seeding the new image with the last position from the last.
I never augment the first position in the points... so I don't understand the jump
 
@AaditMShah tell me your email address for gtalk
i will do it
 
3:21 AM
and it's funny because I do jump around +- 2-3 points.. but i was doing that because of how the quadratic line function works. :/ I think that is where I did myself in
 
@Darkyen aaditmshah@myopera.com
 
I usually go up and down using a sine/cos function just changing its amplitude on random after it n interval but smoothing it everytime i do so, i will make one aswell ha :D
@AaditMShah hell chuck it lets talk here
i thought to make it global we could do something like freeandopenweb.com, but a little bit more sober and browser supporting ... u know atleast IE 8 [raphael vml should be just fine].
and also i am going to ask my college people to help as in just help via joining campaign.
 
Alright, so what do I need to do?
 
i will be desgining it after college :P
 
3:28 AM
well maybe in college :-)
then we can make it with node.js
would u like to explore on how to visualize that much data using node ?
it should be easy and trivial ... but the problem is visualizing it :D
 
So you want to create a world map and plot people on it by collecting the data via Geolocation?
 
gallery?
 
:nod:
not just that but since its wiki
maybe allow another view with plots of users who said per country maybe , which is where thing goes hard
 
@Darkyen why is the room in gallery mode?
 
@Nile no clue
 
i have just been resurrected .. so i have no idea
 
or similar reasons
 
@ThomasShields haha
well night
 
Next time he messes up link him this
 
4:36 AM
wanna see another cute rant on meta? meta.stackoverflow.com/questions/186218/…
 
Anyone familiar with the Fisher Yates randomize function?
fisherYates: {          // Array randomizing function
    init: function( myArray ) {
      var i = myArray.length, j, tempi, tempj;
      if ( i == 0 ) return false;
        while ( --i ) {
           j = Math.floor( Math.random() * ( i + 1 ) );
            tempi = myArray[i];
           tempj = myArray[j];
            myArray[i] = tempj;
            myArray[j] = tempi;
        }
        return myArray;
    }
}
Are there any obvious flaws in this approach to randomization?
 
why return false instead of myArray when it's empty?
inconsistent API WTF
 
@JanDvorak I guess to stop the function from trying to iterate over an empty array?
Wait, no that'd happen anyway...
Don't know.
 
Why try to stop it? Also, if you do want to stop it for some reason, why not return myArray?
 
@JanDvorak Right. I agree. It's not my function.
 
4:45 AM
A swap only needs one temporary variable. You could shorten that a line.
otherwise, the implementation seems correct
if it's meant to in-place shuffle the array and return it as well
 
So how would you handle the swap?
 
@go-oleg 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.
 
tmp = ma[i]
ma[i] = ma[j]
ma[j] = tmp
classic temp-swap
 
it only picks elements to swap from 0 to the current index being swapped
 
@JanDvorak I see. Cheers
 
4:50 AM
yeah, right. Should be j+2
 
 
@JanDvorak I don't understand what you mean
 
ah, right,sorry, it should be j+1
 
why not this instead?
function(myArray){
  var i = l = myArray.length, j, temp;
  if(l==0) return myArray;
  while(i--){
    j = Math.floor(Math.random() * l);
    temp = myArray[i];
    myArray[i] = myArray[j];
    myArray[j] = temp;
  }
  return myArray;
}
 
Okay going to talk about wiki :-)
to my college teens \o/ oh i have a feeling ... senseations u know man :D :D
 
4:55 AM
@nderscore that won't produce a uniform shuffle
There are 6 possible permutations of [1,2,3]. Your shuffle can execute in 27 possible ways. Thus, some permutations are more likely than others.
 
time to brush up on shuffling theory then :P
 
or just run some numbers and examples
 
read the fisher-yates shuffle wiki instead
 
@FLo
@FlorianMargaine update RemotePrez to support slid.es
 
5:16 AM
Am i scary ?
 
5:43 AM
@Darkyen No...? please don't hurt me
 
@Darkyen No.
 
@Darkyen no
 
6:01 AM
Hi i need support for my drop down menu
 
:-)
 
I have a select tag drop down in which 4 option tags with different url values.when I select a option menu, the page redirects but the select box does not update
 
Yea, that didn't make too much sense.
A quick jsfiddle example please.
 
okay
open this url and see at the top left to twitter symbol weconvex.com
 
That's because you are reloading the entire page.
 
6:08 AM
I know but is there any solution?
 
hmm... set the selection from server?
 
Can u provide a demo?
@JanDvorak can u provide a demo
 
@vinaysingh echo "<option value='"+option.value+(option.value===$_GET["var"]?" ' selected>":"'>")
not the cleanest solution by far, but it gets the point across
 
@JanDvorak URL is in weconvex.com/India how to get the value of only country?
 
@vinaysingh Learn to use the languages/frameworks used in a project before you agree on that project. A tip for the future.
 
6:17 AM
@OctavianDamiean I know php but due the period gap of 1 month really i need a refreshment course. However, I need this for today.
 
Yea, I know the stories, they're always the same.
 
@AaditMShah github.com/darkyen/wiki-voice if u want i want to revamp it :D
 
My dog ate my knowledge, but I need this ASAP.
 
@Darkyen Don't advertise yourself!
 
@vinaysingh How about you GTFO and never come back?
It's the first time I saw you in here, you have no idea of anything but tell people what to do?
Really?
 
6:21 AM
@OctavianDamiean yes this my only second time in here. Because mostly i use php room
 
Yea, stick to that.
 
I have used only a onchage event handler
 
1 message moved to bin
Format your code if you already want to post code.
Better yet, read our room rules. rules.javascriptroom.com
 
Dear. Please provide some code help. Don't talk like lawyers
 
However, if that's too much to read for you, I would advise you to click this link and then this one here.
 
6:24 AM
@OctavianDamiean Thanks for this
 
The second one is pretty useful :-)
 
@vinaysingh i wasnt advertising
i actually need help
 
@Darkyen which type
 
collaborators , who understand natural language processing and can write algorithms in javascript to interconvert 2 languages
 
@Darkyen Don't even try to justify that ...
He's a tit help vampire.
 
6:25 AM
oh
then i have a picture for him :D
 
Whatever that is supposed to say ...
 
@Darkyen good
 
@Darkyen It's not that uncommon to have a tongue.
 
@OctavianDamiean :D ... i am sticking out on him lol
and stop being canny -_- @OctavianDamiean
you bitch me quite a lot these days you know
 
@Darkyen You know my answer to that.
in a British accent No.
 
6:29 AM
Hahahaha love you @OctavianDamiean //as a friend
@OctavianDamiean try russian
and again u will say NO
 
STOY
 
ZABIVAT' VREMYA!
 
STOY ?
STHAP
 
STAHP
 
HAMMAHTIME!
 
6:37 AM
which IDE is most preferred while coding?
 
@Mr_Green Sublime Text, Vim , Emacs , Notepad, Butter flies
 
How about Visual Studio Express 2012?
 
@Mr_Green The one that works best for you.
 
@Darkyen you mentioned notepad too :D
I am using Komodo here
 
I'm sure he wanted to say Notepad++.
 
6:38 AM
ya I think the same
 
yeah the same
 
real programmers code by taping tiny pieces of duct tape onto an 8cm circular mirror
 
Nay real programmers code by thinking
the brain's electronic activity
then causes changes in atmosphere causing
magnetic patterns which cause it to write on hdd
 
thinking is hard :-(
 
6:50 AM
programming is not the proper business for you.. change your hobby
 
gets nervous convulsions
 
lol @Darkyen mine was really not a funny question dude
it was serious :)
 
there is todo list in mac
 
Everything you say is really funny, that's why we move it to the really funny jokes room. You are a very funny young fella, totally never disturbing.
 
and which is much beter then anyone
whic his straight on ur desktop
so its obvious u are trolling
 
6:53 AM
wooot? :O
 
unbelievable anyway no problem but .. :O
 
what's wrong with Ruby?
 
nothing
 
they show a quite a few requires, but that indicates a huge project. A comparable problem with Java would include wall of imports. In each file.
 
6:55 AM
Java is good
just not useful
 
Java is great... if you're paid by LoC
 
@Darkyen I should get on a plane to slap you.
And then, after I slapped you, I'd say No.
 
@OctavianDamiean its actually good
for teaching beginners its awesome
it makes sure less people ever want to learn code
it makes sure people are scared of programming for lives
 
Maybe I'd slap you and say No simultaneously.
 
a decent slap, a bitch-slap or a robin-slap?
 
6:57 AM
A superman-slap.
 
it makes sure even then scared and destroyed people will still be able to write things that work they dont have idea about
 
is that stronger or weaker than a robot-slap?
 
@JanDvorak It's like a superman punch but as a slap.
 
So, slightly weaker than a CNR-slap?
 
@OctavianDamiean please accept with pinch of saracasm
 
6:59 AM
@JanDvorak CNR as in Could Not Reproduce? :D
 
CNR as in Chuck NoRRis
!!urban cnr
 
@JanDvorak [CNR](http://cnr.urbanup.com/3961056) Could Not Reproduce.
Used by webcomic XKCD.com
 

« first day (985 days earlier)      last day (3957 days later) »