« first day (1897 days earlier)      last day (3275 days later) » 
00:00 - 17:0017:00 - 00:00

crl
crl
00:23
function C(tag,html){var el= document.createElement(tag);el.innerHTML=html;return el;}
var r=C('tr', '<td>2')
var td = r.firstChild
r.innerHTML=''
td // guess what it is
I thought live dom objects would be more live
01:00
@crl should still be a td, right?
01:13
holy shit
what happened to the CAD
time to buy shit :O
250 USD xbox
@Mosho no one wants our oil bro.
That's what happened.
don't worry, I'm sure more shit will hit the middle eastern fan soon enough
When was the last time the shot wasn't hitting the fan in the middle East?
there is a constant shit-flux
God I hate mobile. That sentence was butchered
01:26
just saying it'll increase
expect me to arrive shortly after
I'll be waiting with poutine
2.9
think I'll convert some dough to CAD
02:17
You know those 4ft star wars statues at Target? My parents got me the Darth Vader one as a joke; well joke's on them, he's going in my apartment.
02:33
Is jQuery(handler); syntax equivalent to jQuery(document).ready(handler); syntax?
02:46
is me googling the answer equivalent to you googling the answer?
5
@overexchange yes
03:16
@FlorianMargaine Accidentally quadratic
04:05
whats going on when used
'use strict';
in js code
!!tell dinindu mdn strict mode
(function () {
    'use strict';})();
this
yes
ok
hey there, how could I get a property of a json having another property? I mean I have the id and I want the name from [{id:1,name:'xmas'}{id:2,name:'new year'}]
without iterating the array*
is there a one line way?
@feniixx no
04:28
@feniixx filter
!!> [{id:1,name:'xmas'}, {id:2,name:'new year'}].filter(x => x.id === 1)[0].name
@BadgerCat "xmas"
@BadgerCat this doesn't work in angular
I get this error: Error: [$parse:syntax] Syntax Error: Token '>' not a primary expression
@feniixx Sorry, I can't help with Angular
@copy Ok:c
then what would be the simplest way to make a loop
array.forEach(function(object){??});
.filter right haha
04:59
...
hi all
I have a row in that i have set of text field if i enter value in any one of the field i need to add the class for that row i

$(this).siblings(".cloned_field").addClass("errRed");
is this correct
05:18
at array.forEach(function(cb, index){...}) the index starts at 0 or 1 ?
05:41
you cannot be serious
 
1 hour later…
07:10
what is ? following + in email regpat here? var regpat = /^[a-zA-Z_]+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/;
@overexchange mdn
[0-9]? – Represents zero to 1 digits && [0-9]+ – Represents 1 or more numbers
but what does [0-9]+? mean?
MDN says: "123abc" matches to "1" on applying /\d+?/ .
Yep
> var regpat = /\d+?/;
    undefined
> regpat.test('1');
    true
> regpat.test('12');
   true
> regpat.test('123abc');
   true
07:41
I did not understand the meaning of adding ? after +
07:53
The ? after + turns it into non-greedy matching mode, take a look at stackoverflow.com/a/2824314 and javascript.info/tutorial/greedy-and-lazy
@EricZheng 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.
crl
crl
what's the diff between /\d+?/ and /\d*/?
@towc yep, but he has no more parent
@Michael_B works well jsfiddle.net/vr6usg5m
08:31
Hi all,
i want to read Response Header data using javascript.here is my description stackoverflow.com/questions/34469648/…
crl
crl
you want to submit form by ajax, or no?
no ,i am not using ajax ,no XmlHttpRequest object is created.
crl
crl
so maybe it will be hard to get those headers in js
i want to know normally in client side where the headers are stored
crl
crl
nowhere (without a XmlHttpRequest/fetch) I think, but I may be wrong
08:43
@crl thank you for your help....if you come to know please let me know
crl
crl
cookie is probably the only one that's sometimes stored
when they are not eaten by Awal
I have to investigate this. How do you manage to mention/ping me when I have just arrived here?!
@MurugesanEra you cannot reliably do that for now
crl
crl
you see a little black avatar landing ----> there :p (but the SO avatar animations are not too reliable, sometimes an avatar is shown but the user left)
@Awal Garg then to achieve my requirment is there any other way is there
crl
crl
08:47
ajax
2 mins ago, by Awal Garg
@MurugesanEra you cannot reliably do that for now
i dont want use ajax
crl
crl
why?
@MurugesanEra Is this for your client/boss?
because i want redirect page on login request .In case i am using ajax i am unable get response.because for page page redirection new request get initiate on server side..that is why i am unable to use ajax
crl
crl
08:50
I agree that's it's more complex to make the ajax request tho
location.href= '/ok' ; // redirect
my boss expect me to do the redirection on server side
crl
crl
you could hide it to him
@AwalGarg Coz whenever you're online, the screen dims for everyone.
I see nothing wrong with your logic
crl
crl
I have put a MutationObserver to track Awal's avatar, that gives an alert(), btw I've discovered observers, awesome shit
var observer = new MutationObserver(function(mutations) {
  for (m of mutations)
    for (var i=0; i<m.addedNodes.length; i++)
      if(m.addedNodes[i].id==='present-user-3459110') alert('ew')
});
observer.observe($('#present-users')[0], { childList: true });
09:00
I love my new i3 config so much ^_^
crl
crl
09:36
!!> var a=[1,1]; a[0]===a[-1]
@crl "false"
crl
crl
09:54
the bloody code to add a column in a table.. jsfiddle.net/zmLLch8b/27
would be interested to know if converting the table in a matrix like ^ is the right idea
crl
crl
10:21
jsfiddle.net/zmLLch8b/28 code is scareful :))
 
2 hours later…
crl
crl
12:10
!!is room ded?
@crl Certainly not
12:25
Hi all.
Nodejs is asynchronous technology right?
Then what is the use of modules like Q
Stuck in a small problem. how to get table cell index in jquery ui draggable? TDs have spans which I made as draggable.
crl
crl
tables colspan/rowspan are fun to code... and manipulate
  start: function(event, ui) {
    ind = $(ui.draggable).parent().index();
    console.log(ind); // returning -1
  }
crl
crl
12:29
what is $(ui.draggable) in console?
are you sure it's a td?
@crl hmm. it's strange. returning undefined.
instead of span
crl
crl
event.target maybe
crl
crl
but doing drag-n-drop on tables seems wrong to me
@crl per their documentation, ui - type: Object
I got a such requirement
crl
crl
12:34
ah.. dragging the content of td's ? then it's ok, as long as you don't touch the structure of your table
yes. contents of the td
from top table to bottom table to respective dates
yes. I don't
@crl stackoverflow.com/questions/788225/… this thread has on click of td
tried this approach. but not sure why ui.draggable returning as undifined
crl
crl
sorry can't really help, in my project I'm doing Drag-n-drop in pure JS, not jquery
@crl oh. that's okay. no problem. just discussing..
crl
crl
pure drag-n-drop is really easy, hold on will show you a dnd on table
@crl finally found the solution. :)
we have to use ui.helper
it will return the dragging object
:)
13:13
Guys
is it possible to optimize something like this?
function fooBar() {
  var creation = document.createElement('div');
  creation.appendChild(document.createElement('div'));
}
What bothers me is that im calling createElement(div) twice here
13:41
Guys, does anyone know any good grunt plugin, like github.com/jwvdiermen/grunt-include-source, but that would also order with consideration of dependencies?
@MaciejPaprocki 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.
So that ordering of files would be
e.g.:
File 2
	- angular.module('angmod.one', ['angmod.two']);
File 1
	- angular.module('angmod.two', ['angmod.three']);
File 4
	- angular.module('angmod.three', []);
File 3
	- angular.module('angmod.three')
		.directive('angmodThreeDirective', function() {/*...*/});

Then ordering would be
	- File 1
	- File 2
	- File 4
	- File 3

So that "File 3" wouldn't be loaded before file 4 due to naming of the file, but would take dependency and usage into consideration.
@Asperger I don't think it's possible as you de facto want to add two different divs so you should use this function twice. Sorry for previous answers, first time using chat and it triggers to quick.
hello, If I'm submiting a form via ajax by setting its data-remote to true(not by $.post or $.ajax), how do I capture the response ?
There is a way to define success and error functions. They are handling the response
13:50
@Eugene I wouldn't use that. You probably should serve one file only and use browserify or requirejs (or something similar). Dependecies are easier to solve that way and you will not have problems with global scope.
@MaciejPaprocki after build there is one file only. I'm talking about development process.
The grunt plugin referenced here by me is okay, but it is too simple. It doesn't take what I described into consideration, therefore either I must adopt my app structure for this plugin too be of any use or find another plugin or if there is no such plugin, then do it by hand(least favorable choice)
@Eugene. ah that's good. Still would use source maps instead. In all my projects where i tried to use includes based on patterns like (./*/*.js) it was ending up in quite a big mess(renaming files like aDropdown so they would be included before), where single require call (browserify) solves you problem better (even that it seems more work believe me is not). ]
Correct. So therefore I'm wondering if there is a plugin similar to referenced by me, but one that would take components into account when forming references in index.html
crl
crl
14:06
@Ravimallya if one day you want to do it without any lib: jsfiddle.net/zmLLch8b/30
you love tables don't you? :P
crl
crl
well that's my work for the moment, not really a love, but it's funny
have to understand them well, because they are used in the wysiwyg
dat list of native extensions
crl
crl
yea that's very bad to do it, before you say it
Only the Array extensions are bad, and your hide and show implementation is stupid. rest is good.
crl
crl
14:10
ok :)
jsfiddle.net/zmLLch8b/31 this is how you implement hide and show
crl
crl
ah yes, better (to deal with different display (block, table-cell..), thanks
jsfiddle.net/zmLLch8b/32 this is how you extend array to add namespaced extensions
crl
crl
oh thanks, what is the 'dom' /ns for?
!!mdn Object.defineProperty
crl
crl
14:20
yea, get/setters, that's something I wanted to learn anyway, cool
@crl that function allows you to maintain this binding in nested properties. So in that fiddle, try doing document.body.all('td').dom.hide()
crl
crl
you can't clone with Object.assign?
read the comment :P
crl
crl
ok, also why do you need the additional .dom :s?
> namespaced extensions
crl
crl
14:23
Ah ok sorry, .all is on Node, and .dom.hide on the extension, mixed them up
@FlorianMargaine Neat. Shame that you have to rebind stuff, but now that you mention it, the b key is hit with the right hand, even though it somewhat shouldn't be.
crl
crl
last question, plug/unplug/uninstall are special keys for the extension? I don't see them used, and they are not even called at loading or when using the extension
@crl Thank you for your reply. I'm sorry. I'm not much more expert in javascript. And my requirement is bit different. so posted a question here. stackoverflow.com/q/34471786/1201322
it is a utility function I have handy which I just copy pasted, so yeah, you can remove them safely
crl
crl
14:31
ok
I've looked more and more into keyboards since just before I bought my mechanical one, and things disappoint me. There's no ergonomics "standard", so all you have to go on when choosing a keyboard is anecdotal "evidence", and wager your comfort on something which may not have a lot behind it.
crl
crl
very cool :) Aw
So while having an ergonomic keyboard is probably better than a mechanical one (for hand health), you can't be sure it's really ergonomic. And those who you're sure about usually cost an arm and a leg.
Like the Kinesis Advantage: it's something which evolved over time and use, and there're enough anecdotes about it to make you feel certain. Same goes with [TEK](https://www.trulyergonomic.com/store/index.php).
But we're programmers, and emacs users at that, so who knows if for a programmer-y and emacs-y worflow you'll find your comfort zone?
what do you mean by comfort zone
(for reference, TEK costs $250, and Kinesis Advantage $300. That's without shipping.)
crl
crl
14:36
the non-pain-zone
And on top of those, you still get QWERTY, which I've grown to despise more and more.
you can get dvorak kinesis
yay
I'm on call today
and something small came up around 3pm... easy money
they sell this too
hardcore
You know how in regular keyboards, you have to contort your hand to type all types of parentheses? Or how Caps Lock is completely useless, while you hit Ctrl and Alt with your pinky? Or how Backspace is entirely out of reach, and you also hit it with your pinky?
Those are not in the comfort zone. They're not comfortable. If you inspect your typing on a regular keyboard you'll be disappointed because it's disappointing.
The Kinesis solves some of those problems, but I don't know if you trade these problems for others.
I've mentioned to you how the modifier keys were better, but perhaps not as accessible as I'd like them to be.
14:41
@Zirak from my small anecdotal experience, when I put my hands on the new keyboard, or generally type on it, it feels like my hands are in a natural position. I really like that. The split also forces me to use the correct hand, which prevents me from overreaching one hand to type on a too-far key
You probably didn't notice that, but as an Emacs user that's very important to me.
only real complaint I have is the tilde
you can bind anything to anything with the kinesis
@Mosho For an extra measly $40 or so
I'm sure they'll ship one with those keys in place instead of the originals
You may get what you paid for, sure. But that's a huge wager to take.
14:43
until you get a job
@Zirak BTW, in the end I rebinded switch-buffer to C-x x
then it's a meh wager
since C-x n is for windmove-down
@FlorianMargaine If it's comfortable for you then that's great (notice how in qwerty, "great" is spelled only with the left hand, and "only" only with the right?)
But sometimes try and watch what your fingers do, see if you have to do a few dances.
yeah, I definitely feel the difference now that I'm forced to use a hand for a part of the keyboard
14:44
@Mosho $340 is still a lot of money. Do you know how many gummy bears you can buy with $340?
A fuckton
Then you get to do cool things like get your stomach pumped
@Zirak hey
Mozart? :)
Because after eating a fuckton of gummy bears, you'll feel sick
@Zirak concaine too
Sick with happiness
@Eugene Tchaikovsky?
Also possible
gummy bears made of concaine
14:46
$340 isn't that much
@Mosho I don't know in which world you live, but $340 is a lot.
crl
crl
and "left" is spelled with both hands :(
@Mosho Translate that to amount of dinners
Let's say I can buy a great pizza in $20. That's 17 pizzas.
That's a lot of pizzas to put on something which you're not really sure of
crl
crl
that's also 110kg of tomatoes, or 170kg of clementines, approximately what I eat in 1 month
tl;dr that's why I bought a mechanical and not an ergonomic, I was sure it has benefits (and it really does!), even though they potentially less than the benefits of an ergonomic.
14:49
@FlorianMargaine not for a top keyboard for a programmer, imo
Keyboards discussion?
My most favorite is Logitech UltraX Premium Keyboard. Sadly they aren't produced anymore as far as I know. NB! It has keys like on laptop.
so did you know Amazon does a price adjustment on items delivered within 7 days?? so a late delivered christmas present I got for the GF goes on boxing day sale and I get on the support chat.. 5 minutes later 30% refunded to my card. just like that.
I was very impressed.
if you had anything delivered by amazon (and sold by amazon) in the last 7 days check to see if it is on sale today
@Eugene Looks like a generic rubber-dome, what'd you like about it?
14:54
It has all functionality, that is required for a day to day work and pressing keys is very comfortable in comparison to other keyboards I used. It also has media panel, for lazy people. :)
crl
crl
worst type of keyboards probably, it must feel weird to type on it
Never used. Can't confirm or deny. But it would seems, that lifespan of such keyboard is very short. Assumption is made in regard to flexible wireing. Headphones for example. First thing, that stops working is cable.
@crl Those are indeed quite terrible. Pressing them is nigh impossible (try typing "impossible" very slowly, notice what your hands have to do) if you don't hit the keys exactly the right way and they the presses feel wrong.
crl
crl
:) those are 'temporary' kbs
Uhg what am I doing wrong here? jsfiddle.net/UCFtB/31
14:58
@Zirak, in regard to question asked, by me, here, before. Do you use grunt by any chance and maybe angular?
I use neither
I want to get the percentage of the area clicked
Okay :(
I used the basic formula: event.clientX / this.offsetWidth * 100
crl
crl
@Asperger getboundingclientrect
useful
15:00
@crl will google
crl
crl
(note: you might need to add window.scrollX/Y ) to the .left, .top...
anf if you're lazy Element.prototype.rect=Element.prototype.getBoundingClientRect;
Ya I read about it, either im not fully understanding how it works or in my view I dont see how that solves the problem. I already bound the event to the div. The problem is purely mathematical
Again I believe I maybe didnt understand what this really is for. Checked the mozilla documentation.
crl
crl
do document.body.rect()
@rlemon That's true
15:07
also, perl6 was released
console.log(document.body.rect())
not a function
crl
crl
with the other thing I posted ofc
15:32
Any good WebStorm themes?
@copy breakfast?
@Eugene screenshot of the list?
@rlemon nice
@Zirak is there a way to tell sakura to auto update window title if the command inside changes?
say it started with sakura -x ranger, and then vim spawns, I want the title to reflect vim now. possible?
@BadgerCat Too early
15:41
@AwalGarg ¯\_(ツ)_/¯
@AwalGarg It doesn't?
@pootis not if you start it with the -t flag
15:56
What is that thing which loads more content while you scrool down called?
Guys, lets assume we have a large array and we need to access the same thing over and over again, say like this: arr[1]. Does it make a difference in performance if I cache it?
I am loading json data from php and loading using javascript. If data is too big it makes the browser hang. I want to implement it.
var x = arr[1]
I mean is reading the index a process that should be cached?
crl
crl
@AwalGarg how do you use it? I tried:
function shit(){console.log('shit', Date.now())}
var tshit = throttle(shit, 1000)
tshit();tshit();
..and?
crl
crl
16:01
oh it works, I did it on separate line, and it didn't, and pressed enter fast
@towc ?
crl
crl
no nvm, good job
@Eugene list of available themes
@crl I use an improved version now, btw: github.com/awalGarg/especser/blob/master/src/mod/… I should update that gist as well, good reminder
crl
crl
but is the throttled function thenable? hm yes
16:04
It basically returns a promise which resolves when the callback eventually fires
crl
crl
nice idea
@crl updated
I need some suggestion related to cloud hosting
anyone?
just basic questions
crl
crl
good :)
what's thisArg for actually?
set the this value inside the callback
crl
crl
16:13
ok
@AwalGarg Hangouts
there
> don't ask to ask, just ask
crl
crl
!!s/\W*ask\W*/ /g
@crl don't to just (source)
crl
crl
16:28
but the object extension can still conflict with the original object's properties, if its name i badly chosen, example InstallNSExt(Array.prototype, 'map', { .. but that would be silly, anyway I like the fact to group them together
!!youtube striker start again
epic
crl
crl
also Awal, I think you don't need return in 'return reject(..)' or 'return resolve(..)' (not sure though)
16:35
faburabufu
is that random? sounds cool :D
crl
crl
yea Til :) tested it too var test = x=>new Promise((y,n)=> {n(0); y(1); } );test().catch(x=>console.log('fail', x)).then(x=>console.log('good', x))
That sounds like a Gujarati dish
crl
crl
so we could resolve multiples times in the same promise? hmm
only the first one will be effective
16:47
@towc yes. I asked about available themes for WebStorm.
@Eugene no, you asked suggestions for one of them to use. If you meant that instead I'd reccomend googling ;)
crl
crl
sublime text don't auto-close [ sometimes :<
@AwalGarg I am totally fucked man
00:00 - 17:0017:00 - 00:00

« first day (1897 days earlier)      last day (3275 days later) »