« first day (1776 days earlier)      last day (3173 days later) » 

12:03 AM
I don't see any difference between find and QS
what do you mean by relative selectors?
I see the difference now, but what does relative selector mean?
 
you know the selectors ?
well, start with a combinator like ">" instead of a class name
 
... > being direct child of?
Yeah
but it says that relative MAY be preceded by a combinator
so, if you don't use one, it should behave just like QS
I like it more
myDivElement.find('> a')
would find the first anchor tag that's a direct child of myDivElement
that's useful
but
if you just did myDivElement.find('a')
it would just find the first a, regardless of it being a direct child or not
that's great
I'm gonna write a polyfill for this shit
 
that's why i said that it's not worthy
 
12:19 AM
It's not worthy of being a feature?
 
case got covered by common selectors
 
can QS handle a selector that preceded by a combinator?
 
you have to ask the authors of the specification for why ... i even cannot find its exact reason
 
Nope, QS doesn't handle having a combinator first
I see .find as being very useful
and it's a lot less verbose than querySelector
 
it's 2:22 am. Not going to breka my head about that :p
 
gotcha sleep. since it's morning, i say "good morning". Good morning.
// sleeps
 
 
2 hours later…
2:17 AM
wow, dead room
 
!!doge dead room
 
         wow
many dead room
 
@KendallFrey played any KSP lately?
 
a little, not much
thinking I should try RSS
 
@KendallFrey It's a good format, though falling out of favor
 
2:28 AM
@Ṣhmiddty punt
 
Also, goddamn you and your anti-ping tricks
 
3:01 AM
heyy can someone help me out with this stackoverflow.com/questions/32218365/…
 
 
1 hour later…
4:21 AM
@GNi33 you said, one has to have the knowledge of prototypical inheritance for understanding class based approach in JS. But this answer says, it does not require to understand prototypical inheritance.
It does not require any additional knowledge(about prototypical inheritance) for writing class based code. Don't you think the same?
Remembering such flow of inheritance(below diagram) is a nightmare. Because we are surrendered with the bad mechanics of JS.
 
4:45 AM
Hey guys! I have a routing/nav question: is there a name for the routing that play.spotify.com uses? In short, it displays the complete history of navigation (no ajax calls in order to go back) but the url refers only to the current state. Is something like this supported in Angular?
 
@Joebot 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.
 
is there a keyboard shortcut in the command line to restart it/node after an exception?
nvm, ctrl shift c seems to work (totally guessed lol)
 
5:03 AM
@DanieClawson look into nodemon and forever
 
5:16 AM
In this reference, why it is required to say Manager.prototype = Object.create(Employee.prototype); in JS for corresponding java code.
public class Manager extends Employee {
   public Employee[] reports = new Employee[0];
}
What is the problem, if I do not set Manager.prototype?
 
5:38 AM
how can I get IE11 to load CORS requests without throwing SEC7111??
 
5:50 AM
Hi All
What do you guys think about it? github.com/kamlekar/HTML-Skinning-Boilerplate
 
6:06 AM
I just realized the relevance of } in our lives: that means that we've just finished a block of code, we're ready to test or to deploy, it means we have finished something we worked for and put some effort in. } is awesome :D
 
I never said Angular is MVC, Nick & SomeKittens were trying to make everyone believe that I said so, they had no proof, so they kicked me out of room for there inner satisfaction,

It makes me laugh even when someone argu about "Angular is MVC or not" Loool
 
@phenomnomnominal sure homie
 
user3119231
morning all
 
user3119231
@Mr_Green convert photoshop files?
 
yes, .psd to .html
HTML devs do this (me also)
 
user3119231
6:20 AM
awesome!
 
Thanks :)
It is actually not useful for JavaScript devs but HTML devs
which one?
ohh ok.. (please delete the comment) :)
 
user3119231
why? :D
 
nothing just NDA
 
user3119231
Okay. Then you should remove it from your blog/website - about.
 
nothing happens but still.. don't want to take risks
btw, thanks
I mean I don't like talking about it
hard to explain..
 
user3119231
6:32 AM
it is okay. We don't need to. :D
 
6:53 AM
@Nick kicking is a tool to get someone to stop whatever it is they're doing that you don't like, and it's quite effective.
You're one of the few I've met that actually complain about it, as if it's a personal attack against their grandmother.
 
there should be a .= operator...
like *arr .= split()*
as a shorthand to * arr = arr.split() * for example
 
user3119231
@towc .= is php what += is in js
 
user3119231
so I don't think this will ever exists
 
@Maurize are you seriously taking php as a guideline?
in any case, what if I wanted to create an Array.prototype.dotEquals? Can't even get my head around that...
 
user3119231
@towc huh? you were talking about .= and I just told you that this exists in php and it would be confusing if this is in both scripting languages
 
7:04 AM
docs.google.com/document/d/… good doc with 50% of the stuff useless
 
@Maurize and I told you nobody should ever care about php
 
user3119231
@towc You should. It is the SERVERside of your SERVER.
 
I don't think the programming world will ever witness a good to the point specification ever
 
@Maurize I thought we all agreed that PHP is much dumber and worse than JS
 
7:06 AM
also, how is -> not confusing for accessing properties?
 
user3119231
@towc no
 
@towc it's C, it was standard for a long time
 
@towc wow that's horrible
 
it would make stuff so much easier both to read and type for me :(
@BenjaminGruenbaum it's ugly anyway :P
 
@towc arr.split returns a string. assigning it to a variable which originally contained an array seriously makes no sense
 
7:08 AM
@AwalGarg yeah, I realized too late, but you get the idea
 
user3119231
I personally think web development is like a cake. 3 parts: php, js, html. If one part is missing the cake will still be eatable but won't taste good as with 3 parts.
 
thing .= property;
thing = thing.property;
@Maurize there are so many alternatives to php :P
 
@towc no no no. that destroys all semantics of the lexical grammar of the language. what if property is an identifier to an accessible object in that scope?
 
user3119231
@towc sure. there are so many alternatives to audi.
 
@AwalGarg but you specified that you should access it as a property with .= ;)
if it's not a property, then it will just return undefined
 
7:10 AM
...
 
@AwalGarg I don't get it...
 
Can any buddy please help me with this code
http://jsfiddle.net/zbaMh/139/
 
user3119231
Why don't we let it be as it is. (is this english?)
 
@Maurize no reason, we're just discussing
@Maurize your point being?
 
user3119231
@towc I think it would be confusing if you use ".=". But useful if you use for example ",="
 
7:12 AM
@Maurize what would that even mean?
 
@towc specifying that weirdo limitation is like adding magic semantics to the language. very very bad.
 
user3119231
@user2736704 How to help you? Delete it? Tell me more, I can't read minds
 
@AwalGarg I thought it was pretty intuitive...
 
user3119231
@towc I don't know what I mean to this. I'm confused.
 
not at all. reminds me of that stupid insteadof operator proposal on esdiscuss.
 
7:13 AM
@towc ew
 
I want to resize each image on load having the class "quicklook_images"
http://jsfiddle.net/zbaMh/140/
 
user3119231
@user2736704 what the hell?
 
I do get that it's with all over again, but I do also thing that it would make the code a lot cleaner
@AwalGarg what would it have done?
 
@Maurize ?
 
user3119231
 
user3119231
7:15 AM
like this?
 
did you really get 140 saves? 0.o
 
@towc add complexity to the grammar for some once in a lifetime use case
 
oh, the insteadof thing
 
and after you are dead, it will be useless.
:D
@FlorianMargaine you forgot me. sooooo unacceptable. go stand in the corner.
 
user3119231
I would prefer something like this: jsfiddle.net/zbaMh/143
 
user3119231
7:24 AM
Am I the only one who uses only notepad++ for creating websites?
 
vs7
Hey guys
Is it important to gave index in JSON ?
 
user3119231
I think he means: Is it impossible to give JSON in index.
 
user3119231
@vs7 Please learn a language. Best choice is english.
 
vs7
You didnt get my question
for e.g. I have a JSON
 
7:34 AM
@Mathematics but you argued about it
 
vs7
{{"NAME":"ABC", "AGE":"123"},{"NAME":"ABC", "AGE":"123"},{"NAME":"ABC", "AGE":"123"}}
will it work ?
or
{p1:{"NAME":"ABC", "AGE":"123"},p2:{"NAME":"ABC", "AGE":"123"},p3:{"NAME":"ABC", "AGE":"123"}}
will work>
 
@AwalGarg I did think about you. But thought you'd be in a weird place where they wouldn't deliver you SO swag.
 
@FlorianMargaine yes :(
 
@Mosho I'm using angular and ocLazyLoad. ocLazyLoad modifies some functions on the global window.angular, but those changes don't happen on the angular that System injects as a dependency. Any ideas why that would be? It looks like System makes an immutable copy of the original one and then injects that, but the one on window (which is a different instance) still exists? Halp?
 
I have that same setup as well
I'll ping you in a bit, kinda busy atm
 
7:46 AM
@vs7 Use an array.
 
@Mosho thanks!
 
user3119231
@vs7

var items = [[1,2],[3,4],[5,6]];
alert(items[0][0]); // 1
 
@vs7 You can have an array of objects
 
Can I ask about socket.io in here?
and node.js
 
8:03 AM
Morning guys
 
Hellooo
 
I came here with a new question :)
Suppose I have a table consisting of one or more rows
 
1 message moved to Trash can
@PleaseTeach Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
Now I want to loop through each row and grab it's <td> text
Note that some <td> have innerText while some have <input>
 
since we are talking about arrays....

i ahve an array objectC with tens of properties,

I want a new object out of it with only few properties

var newObject = $.each(preObject, function() {
// not sure what will go in here
});
 
8:05 AM
!!tell PleaseTeach jquery filter
 
oh, wait, misread
!!tell PleaseTeach mdn reduce
 
Please check this code:
for(i = 0; i < total_rows.length; i++){
	row = [];
	for(k = 1; k < total_rows[i].childNodes.length-1; k++){
		if(row.push.total_rows[i].childNodes[k].innerText == ""){
			row.push.total_rows[i].childNodes[k].childNodes[0].value;
		}
		else{
			row.push(total_rows[i].childNodes[k].innerText);
		}
	}
}
Check the line number 4
 
@FlorianMargaine it would preserve my current object though ?
 
8:06 AM
Is it ok ? Or is it only me who thinks that it is not the best way to do it :/
 
I think yes
 
@ZahidSaeed since when do functions have a total_rows property? what does that even mean?
 
@AwalGarg var total_rows = add_purchases.table.children("tr"),
 
wat
 
@FlorianMargaine ouch, I am using IE-8, so have to use filter
 
8:08 AM
@PleaseTeach How do jQuery does the find() method ?
 
@ZahidSaeed how do does what how what ? :S
 
That means if I have to find descendents to grab a value then do I have to type ".childNodes" again and again ?
or is there any js property that can look through the descendents or ascendents for a specific value or HTML tag ?
 
@PleaseTeach array with properties or items in an array? (Ps: this is a dynamic language) :)
 
Element.prototype.querySelector(All)
 
@deostroll do you think I am going to filter arrays properties ?
 
8:13 AM
user image
3
 
@MadaraUchiha lol
 
@PleaseTeach this can be done on any object : gist.github.com/anonymous/8e6209846a9d612db743
@PleaseTeach I mean you can add properties to array just like how its done on any js object...
 
I got a table that generates data from a database. And I want to reproduce something like this : jsfiddle.net/zA23k/215 Not all data has the same length. Should I do it on js or limit my query. e.g.: if the length is higher then x create a "more" button ?
 
@ZahidSaeed Ugh, snake case
 
user3119231
@Poteito work with x.length
 
user3119231
8:21 AM
if (x.length > 30){ //more than 30chars
 
@Poteito text-overflow: ellipsis; ?
 
@MadaraUchiha How can I determine the length ? Can't find it on MDN
 
@Poteito You don't need to determine the length
That's the beauty of it.
 
@deostroll I am sorry, but how is it related to what I want ?
 
user3119231
doesn't * select all?
 
vs7
8:36 AM
for e.g. I have this array
{{"NAME":"ABC", "AGE":"123"},{"NAME":"ABC", "AGE":"123"},{"NAME":"ABC", "AGE":"123"}}
If I want to sort according to Name
How I can do it ?
 
@vs7 That's not an array
It's also invalid syntax
 
vs7
sorry its a JSON
 
It's invalid.
You're probably looking for [{"NAME":"ABC", "AGE":"123"},{"NAME":"ABC", "AGE":"123"}]
 
vs7
{p1:{"NAME":"ABC", "AGE":"123"},p2:{"NAME":"ABC", "AGE":"123"},p3:{"NAME":"ABC", "AGE":"123"}}
yep
 
user3119231
@vs7 what you doin'?
 
vs7
8:38 AM
I need to show these record in Table
 
user3119231
@vs7 javascript.info/tutorial/array Please learn some arrays
 
vs7
and when user want to click over Name , Its must sort out in according to Name
If user click over the AGE then it must sort out the record according to AGE
 
1
A: How to implement RxJS flatMapLatestTwo

MoshoHere's a solution that uses the built in operators. First we split the Observable into N observables where each observable has the corresponding Nth latest item in the sequence. Then we flatMapLatest each of these and merge them. // or your favorite range function function range(start, end) { ...

What a lame answer, what a noob.
Also, not a reasonably scientific accurate doc picture, dogs do not have several noses unlike in this picture.
 
@Bimper And the comment "Cute answer"
ha ha!
 
This stream of streams thing in Rx itches me a lot. It feels like nested promises to me. I wish they were not a thing.
 
System.config({
  meta: {
    "angular": {
      "format": "global",
      "exports": "angular"
    }
  }
});
@phenomnomnominal do you have this?
 
yes
which angular are you using, npm or github?
 
9:15 AM
cdnjs
 
oh, so not jspm
?
 
nope
 
are you making bundles?
 
paths:{
    "angular": "//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.2/angular.min.js",
}
yeah, making bundles
 
9:18 AM
@Mosho hmm okay, I'll try that tomorrow and it might narrow something down for me
 
@phenomnomnominal it shouldn't matter
 
@Mosho I know it shouldn't :P
but anywhere else that I import angular I get a angular !== window.angular
I ever did:
System.config({
  meta: {
    "src/app/*": {
      "deps": ["angular"]
    }
  }
});
 
I don't think wildcards are supported there, are they?
 
with the other bit too
Yeah they are according to some bit of the docs somewhere
 
9:26 AM
> Wildcard meta is also supported and is additive from least to most specific match:
 
cool, good to know
 
are you using ocLazyLoad as well?
 
yeah
what version are you using?
when I open ocLazyLoad.js I see it's wrapped as a module
and doesn't access window.angular
 
1.0.4 off the top of my head
 
there's a problem with it I think
doesn't work for me at all
 
9:33 AM
Oh really? What version are you on?
 
fuck, I'm such a noob
that's the exact issue I had
 
works with 1.0.1, but not later versions
 
but I'm on 1.3.18 so I didn't even look at that
good, this gives me some stuff to try tomorrow
 
yeah, it was annoying
 
9:36 AM
so thanks a bunch!
 
np
 
overall how have you found System?
 
I love it, but it made our app/build process 10 times more complex
 
and you were on webpack before aye?
 
script tags :D
 
9:38 AM
Oh really?
Cool I thought Benji said you were on webpack
We are on webpack and I'm spiking System
so far it's simplifying most things down a HEAP
 
webpack is great and more stable that jspm/system somewhat
but it only does a subset of what those do
guy bedford closes stuff on jspm/systemjs really fast though
 
Yeah I really like the jspm stuff too
the arithmetic bundling is just pure 2.9
 
he closed my request to let through es6 code in bundler :(
 
@phenomnomnominal yeah, I use builder.trace and the arithmetic functions themselves for flexibility
 
Yeah cool
I think I'm going to be able to avoid that
and basically just build our bundles off any file named *Router.ts
@Mosho are you inlining HTML into your bundles?
 
9:42 AM
using $templateCache
 
ahh right, nice
 
systemjs and es6moduleloader are inlined in the build into index.html
I had to do a few things like take out core-js and babel-runtime from every bundle except the root bundle
which were pretty involved considering it's "only" a build
 
Are you sending ES6 to the client?
 
runtime stuff, yeah sure
Array.prototype.includes etc.
 
oh of course
Since we're compiling from TS we're not using any of that stuff
well we do, it's just lodash in our libraries bundle
 
9:46 AM
and all the helper functions babel uses which are normally injected into each module, you can use "optional": ["runtime"] in babelOptions and it takes them from the runtime or someplace
 
Oh yeah all the createClass stuff etc
 
so all the helper functions (for classes, destructuring and whatnot) are required from the root bundle rather than inline in each file
yeah
and I construct a depcache manually for all the bundles
which got pretty hacky
 
I still don't entirely get what the depcache does?
 
so yeah, it's a pretty involved build
 
Is it only for HTTP2?
 
9:49 AM
no, it's a strategy to get HTTP2-like benefits
at least in module loading speed
if A depends on B and B depends on C then importing is 2 round trips
 
right, so you say a depends on b & c
 
but if you state that A depends on both B and C in the depcache, then it's one round trip
and it's not just about the roundtrips, you can load stuff before systemjs loads anything
 
right that's cool. I don't think I'll have to generate that
 
there's a built in tool for it, but doesn't really work with all the bundles and cdnjs
using cdnjs was pretty hacky too
 
using a CDN wouldn't pass a review for us, security policies etc.
 
9:56 AM
Wow. Such build system. Many integration. Very bundle.
 
#realworldapps
 
@phenomnomnominal #bloateddeps
 
@FlorianMargaine please come and fix it for me then :P
 
I use browserify for a production build.. none otherwise.
I could actually just concat scripts for a production build though...
 
user3119231
10:03 AM
anybody an idea to this?
 
user3119231
window.onmousemove = function(e){
	//detect if user moves mouse from left to right or right to left? (swipe effect)
}
 
don't
 
For swipes you probably want touch?
Otherwise just save the previous position and compare.
 
user3119231
It is for diashow to swipe through pages :)
 
@BenjaminGruenbaum Yes, I thought they were saying you can't implement MVC with AngularJS, I provided them with references, anyway yes, now it does looks like a pointless argument
Does anyone knows difference between bloodhound.js and typeahead.js other then we can use bloodhound for remote data calls
!!google bloodhoundjs documentation
 
The typeahead.js library consists of 2 components: the suggestion engine, Bloodhound, and the UI view, Typeahead. The suggestion engine is responsible for computing suggestions for a given query. The UI view is responsible for rendering suggestions and handling DOM interactions. Both components can be used separately, but when used together, they can provide a rich typeahead experience.
 
user3119231
@RoelvanUden So I got start x, y and end x,y from mouse event. Can you help me a little I'm a bit confused. How do I detect if the user moved the mouse screen.Width / 2?
 
user3119231
And important is in which direction
 
@Maurize Uhm. Well. If previous x was 130, and current x is 120, what direction did the mouse move to?
 
user3119231
left? :D
 
10:13 AM
Exactly. So when the previous x was 120 and the current x is 180? :-P
It's really that simple
 
user3119231
Thanks, that is all I need.
 
user3119231
I'm sitting here since 5 hours. Time for a break.
 
@RoelvanUden hey genius kind sir
 
Can someone explain me why is this working only twice ?jsfiddle.net/DTcHh/11481
 
@Baldráni Because math.
What do you want it to do?
 
10:20 AM
Its a sorting function; I want that every time index = 1+2n so 1,3,5 etc it append the id
the element to the id* @BenFortune
 
@Baldráni So, every odd number?
 
@BenFortune yeah that's it for now on
 
@Baldráni if(index % 2) //odd
 
@Maurize So to re-iterate everything completely; on mouse/touch down save x/y. on mouse/touch move compare with previous, decide on action (if any), and again save x/y. On end mouse/touch you may want to deal with momentum (or not)
 
user3119231
I'm already finished with this my friends and it works fine.
 
user3119231
10:21 AM
I just need to reset timer of the user scrolls to another page
 
@BenFortune the problem is that later i want to do it with 4 like 1+n*4
 
index % 4 === 0
 
Hummm
Nice one !
Il try ty
 
Long live the modulo operator.
 
And just, why does my function didnt work; ?
 
10:23 AM
Your math was wrong I think, not sure.
 
Na its the same.. I think
Well as long as it works what ever :)
 
Good thing I'm on Windows, right?
._.
 
Good morning :)
 
Morning
 
@BenFortune Being on Windows is never a good thing.
 
10:38 AM
@AwalGarg Unless you need it.
 
@Mathematics you can't implement MVC with AngularJS
 
vs7
10:54 AM
Hi Guys
Its not showing record in DOM
I am using Append
 

« first day (1776 days earlier)      last day (3173 days later) »