« first day (2124 days earlier)      last day (3049 days later) » 

00:01
@Abhishrek you still here?
@Abhishrek Considering macs' target audience..
user6096770
maaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacs
@FluffyWuffy Welcome to the JavaScript chat! Please review the room 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.
@ndugger yes
@littlepootis am actually really happy because of alfred
someone go and make alfred for windows!
@Abhishrek I totally forgot to get back to you, but apparently we do sponsor visas sometimes.
00:14
@ndugger yikes :D sweet
@ndugger can you dm me somewhere?
@Abhishrek hit me up tomorrow--I'm drunk and braindead from working over the weekend.
@ndugger :) k
text fine?
00:56
i'm having an array of arrays and i want to have it as an object of arrays where i put each property for that object
for example: [[0,1,2], [0,3,5]], i want it to look like {place: [0,1,2], time: [0,3,5]}
@JoeSaad What have you tried?
i'm sorry.. this question doesn't make much sense..
01:17
Hey guys! Short question:
I'm trying this down below, but it says "Cannot read property 'then' of undefined"

    items.forEach(this.initialize.bind(this))
	.then(
	    items.forEach(this.sortChildren.bind(this))
	);
Any ideas?
map not foreach
and map isn't going to return a thennable
what do you mean?
forEach returns undefined
01:19
really????
It always worked perfectly until now...
no it didn't.
this works:
    items.forEach(this.initialize.bind(this))
and I wanna do this after the top one:
    items.forEach(this.sortChildren.bind(this))
is initialize or sortChildren async?
01:21
I need to finish initialize before I can do sortChildren. That's my problem : )
How could I know items.forEach(this.initialize.bind(this)) is finished?
JS is single threaded
and forEach is synchronous
so unless initialize is async, then it will wait for it to finish before moving on.
01:41
Hi people
@kermitvomit Welcome to the JavaScript chat! Please review the room 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 it possible that JS tells me "map" is not a function?
Oh, because it wasn't an array.
@phenomnomnominal It doesn't work after all... It seems they start at the same time... Any way to do first the top one and then the second one?
02:04
do we have a room supported resource for promises?
as in JS Room promise 101
02:15
Generally I just use/point others to MDN. developer.mozilla.org/en/docs/Web/JavaScript/Reference/…
Or MSDN, whichever seems the more useful per article.
03:03
(?=.*\d)(?=.*(_|[^\w])) This part of my regex looks for one digit AND one special character. How do I make it look for just one, using the or operator?
@SvetanDimoff I think you answered your own question. "using the or operator"
Protip: \W is shorter than [^\w]
Hey guys.
I'm trying to pass a variable through into a forEach function, but I'm not sure where to include it. :S
This is my forEach: items.forEach(this.initialize.bind(this))
user4268046
Hey there, I'm having an issue where this bit of regex works on regexr, but not in javascript:
console.log(new RegExp("^([\W]*benchsbot[\W]*)").test('@benchsbot hi'));
I want to pass into the function called 'initialize' this variable:
let itemsProcessed = 0;
user4268046
Here's the regexer: regexr.com/3dvi9
04:05
@mesqueeb You probably want to use reduce
@Mered I bound the itemsProcessed = 0; to the window object for now...
Don't do that
New research shows that Lazy is a sign of Brainy. Unfortunately, this also means brainy people need to exercise more.
The study was done by FGCU
Is that good or bad?
04:14
There are better community colleges in the state
Knu
Knu
@Abhishrek did you check Documentation?
if it's lacking then we are not on the right track
04:39
@Meredith Do you know any better method?
I literally told you already
05:22
hi guys. I just wanted to ask about the undefined error in javascript
@rocky Welcome to the JavaScript chat! Please review the room 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.
@CapricaSix okay. thank you for warm welcome. :)
well I created a script that enables and disables fields when a checkbox is clicked
when I tried it on fiddle, it works fine
but when I tried it to merge to the project that I'm doing,
it returns an undefined error
here is the sample of my script
function enable_text(status){
status=!status;
document.bookingForm.other_name.disabled = status;

var element = document.getElementById('disable'),
    all = element.getElementsByTagName('input'),
    i;
for (i = 0; i < all.length; i++) {
    all[i].disabled = !status;
}
document.getElementsByClassName('disable')[0].disabled = !status;
}
is there a way to google search the archive.org by date
the error occurs in this line document.bookingForm.other_name.disabled = status;
I've checked my html file and my formed named bookingForm exists. what may be the caused of this? any help, will be much appreciated. Thank you!
05:37
@rocky Have you checked that bookingForm and other_name exists before the script runs?
@Sheepy yes. well, I changed the line with error with this: document.getElementsByClassName('medium')[0].disabled = status; and just tweek again my html. in works fine now. Thank you! :)
@rocky Or use document.querySeletor( '.medium' ).disabled = status
06:03
@Ryan yeah, hi :)
user3119231
good morning.
06:44
Someone please recommend best book for MEAN stack learning.
@gvgvgvijayan Welcome to the JavaScript chat! Please review the room 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.
user3119231
I need to move a key:value in an object directly after the key "Comments". What is the best way to realize this?
@Maurice You mean you have a map of some description with an ordered list of key/value pairs and you want to do something with the pair directly after the one with the key "Comments"? Or?
Also, why does the order of your pairs in a map like that matter, surely order is unimportant otherwise you'd want to use something like an array.
user3119231
I'm auto generating an edit-form. The fields in this window gets generated from column names in db.
Any code you can show?
You're just using a normal JS object right? Like { a: 'foo', b: 'bar', comments: [] } or something right?
user3119231
06:58
It's just a simple JS object...
user3119231
In fact I just need to move key 17 on position 12 for example
I'm not sure there's a way to do that without rebuilding the object completely. Could be wrong.
user3119231
That's what I thought
Why does the order matter? Are you relying on the declaration order of an object's values for the order of your form's fields?
user3119231
yes
07:00
That's really bad.
You should use an array instead.
user3119231
This is a whole system for companies. It would be insane, if I do it static
user3119231
They all have different databases, so...
What does the object look like?
Can you throw an example in a fiddle or something?
user3119231
Give me a minute.
Yo @cswl.
07:04
Lo @Nimphious
Ok, so you're generating a list of fields to make objects like this user editable, right?
And you want the fields to be orderable, and the order needs to be able to be changed, right?
user3119231
exactly
user3119231
To make them orderable, I need to change the order in the object
So what determines the order in the first place? How are the objects generated?
user3119231
07:06
From database table.
Can't you change the DB query to get the order you want?
user3119231
Damn, this is good.
user3119231
Pretty good idea!
Like, instead of SELECT * FROM blah you'd do SELECT ID, Something, Comments, Attachments, SomeMoreStuff FROM blah instead.
Or something like that.
user3119231
Yes, I know. Thanks!
07:08
If you needed the order to be end-user mutable you could set up some sort of query builder to do it instead of writing it by hand every time they want a change.
user3119231
Worked like hell yeah!
I haven't done html and css in ages :|
07:28
I have been doing a lot of Java desktop app development for the past month. Makes me quite depressed when I switch back to JS/HTML/CSS.
Tom
Tom
Hey guys, question about asyncjs queue, is there a way we can check what is in the queue? I've tried iterating over the object but that returns undefineds :-/
@Maurice Nice.
user3119231
What. The. Hell. is wrong with this guy? pokemonxniccage.com
Nothing.
He's amazing. Perfect.
You can insert a cell with row.insertCell nice...
user3119231
07:30
@Maurice It's beautiful.
user3119231
Kinda disturbing, but yeah, it's cool.
Welcome to the internet.
I think I need jQuery dynamic table
Sounds like you're on some kind of crazy adventure where I can't follow you. Godspeed @cswl.
@AsepSetyawan Welcome to the JavaScript chat! Please review the room 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.
07:56
@cswl Oh god the serifs. :P
I haven't set any font-family.. .-.
my default is Segoe UI :/
Yeah that would be a nice default.
I don't change it for fear of stupid websites failing to render properly because programmers are awful.
making UI is boring :|
08:17
Yeah?
I guess it depends on how you do it.
i googled the exact words and got this.. programmers.stackexchange.com/questions/40590/…
There's only so many times one can put a checkbox on the screen before going slightly mental.
☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑☑
08:43
Why do I keep on reading online discussions..
@Nimphious Well done. Now make them clickable. Assign keyboard shortcut for each of them. Display hint for said shortcut. Add a state machine according to business logic to enable and disable them. Fit them into the site theme system. Skin after real toggle switch. Make them unit test-able. Finally, test on all kind of screen resolutions and browsers.
Don't forget to test for 6 types of color blinds too, in addition to screen readers.
technologically relevant cities in the south of france?
09:03
hey guys
Can anyone please explain me this, why the selection isn't working
jsfiddle.net/BqKNV/486
user3119231
what selection?
the withstanding text is not replaced by selected text
like generally in select box it happens
Okay, I get it, this is not select box
this is just for anchor tag
Cheers
user3119231
o/
09:21
Used the same code and used angular to change the text xD
09:42
Hii guys :)

    var regExp = /\(([^)]+)\)/;
    var matches = regExp.exec("I expect five hundred dollars ($500)");
    alert(matches[0])// returns ($500)

But i want "I expect five hundred dollars" its in javascript
@PraveenKumar string.replace(regex, '')
Thanks :)
Can someone explain to me how you would usually scale web worker Docker containers? I'm currently experimenting with AWS ECS and all the solutions I'm currently seeing rely on all web workers to expose the same port. But that's not possible if you want to run them on the same host. So, are you supposed to spin up a new VM for each container? That seems to defeat the purpose
10:27
yesterday, by Kendall Frey
If you ever feel useless just remember that someone is a lifeguard for the Olympic #swimming events https://t.co/fTJ7jSTOTM
And, yes, we have Twitter and Reddit as well
10:56
Using chrome 52 , 64bit on windows 7. is this normal ? - why is the crop ????
It doesn't happen in all our computers. some does and some doesn't
11:07
@RoyiNamir Expand the Chrome window to get rid of the chop. The dialog box is rendered in-browser so it can't be bigger than Chrome.
(windows 10)
and also on some other win 7 stations
It isn't consistant
Wer'e trying to find the reason
Interesting. Inconsistent across same platform and chrome version?
yes
try this on your machine : jsbin.com/xixoqogavi/1/edit?output
Win 10. No crop.
@MadaraUchiha hahah
The guy love himself
11:49
@ssube Here's a setup without the gulp/grunt overhead. Was gonna past it earlier but didn't get around to pushing the files. cc @bitten. It actually feels less complicated when you just use npm (in my opinion).
user3119231
is there a maximum size for an echo from php to javascript? (http request)
user3119231
I'm reading an ini-file on the serverside and try to return the content back to clientside
@Maurice kinda wrong room but iirc memory_limit is what you're looking for
(found in the php.ini config file)
@ivarni oo also nice, thanks again!
all these testing utilities have such obscure names
user3119231
@bitten which would be the right room? php room would say go to javascript room. :D
enzyme, chai, instanbul..
11:56
@bitten, I get the code work now. It works great, but I try to set the red box in the middle of the parent div, because now on mouse enter the the box slide in from the top left corner, but I would like to have it positioned in the middle of the parent div... Can you help me one more time: codepen.io/anon/pen/wWQYVR?editors=1010
@Caspert just after the startingPosition declaration (line 5), use TweenMax like you have before on box and send in the startingPosition.x and startingPosition.y with a speed of 0
or even just use the startingPosition object to update the box's top and left css props
@bitten Thanks!
@Maurice well you haven't said what's not working yet.. so hard to say where your issue is :p
user3119231
ha, my bad. I can just make the http request to get the ini file. Works so far, even converts it to an object but throws syntax error
user3119231
12:03
Hello All
I am facin an issue I will just post the question here..My slick slider is not working as desired
user3119231
@bitten btw, hey my pretty girl :P
@Maurice is it trying to parse it as json client side? or do you want to?
as then i would look into parse_ini_file
@Maurice creepy af, and i'm not even a grill
user3119231
@bitten yes, clientside. So I need to make the http request - the response contains the content. There it throws syntax error
@Maurice well either don't parse it or use parse_ini_file server side
(i don't know what you want to do with it, so i don't know if you want to parse it or not)
user3119231
It's so simple.
user3119231
12:07
						http.get("../pg.ini", function(e){
							console.log(e);
						});
user3119231
console.log the content of the ini file without getting syntax error
hey guys can you help me out please
3
Q: Angularjs:-Slick not working for dynamic data in responsive design

blankHeadI am trying to implement a slick carousel in which we can display images of various friends. The issue I am facing is that when I am working on slick on desktop it is working fine,but as soon as i move into mobile mode/mobile screen the slick carousel breaks..I am not sure whether it is the prob...

!!welcome blankHead
@blankhead Welcome to the JavaScript chat! Please review the room 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.
@blankHead Welcome to the JavaScript chat! Please review the room 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.
user3119231
!!welcome blankHead
12:10
ty
glad to meet you all
glad to meet you blank head
am stuck on an issue for sometime..If anyone could help
@blankHead it's our honour
@blankHead have you tried playing with lazyloading? it feels like it could be that your images aren't loaded before slick is doing it's thing
.slick({ /* ..your options */ lazyLoad: 'ondemand' })
halp
user3119231
halp
12:15
so .. I have a widget, which should vanish, when both "more than 3 seconds have passed" AND "after XHR response was received" (in ES6)
I suspect, I should be able to do it with promises, but what should I google for?
user3119231
is easy. just make a function (timer) which iterates. check if response is recieved and if iterates > 3
@tereško Promise.all([ promise1(), promise2() ]).then(function() { /* .. */ })
@bitten thanks
kinda thing
@bitten..I am actually trying to avoid lazy loading
12:17
Promise.all basically
I have tried to use timeout but that doesnt help
@blankHead just try that option in your slick config, see what happens
ok I will check it out
@DeveloppeurDuTurfu Welcome to the JavaScript chat! Please review the room 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.
@tereško np, you may also want to add a callback on the end there incase the xhr fails
12:19
yes, yes I will
sorry not catch, just a 2nd argument in then, derp
@tereško ^^
12:39
@bitten not working
I tried your code
@blankHead it was just a guess, i remember using slick and masonry and loaded images was often the problem for odd layouts
@bitten will new Promise.all(undefined, somePromise) work as one would expect?
@tereško No.
Promise.all() is a static method
It takes an array of promises, and returns a single promise that resolves when all of the promises in the array resolve, or rejects when the first promise in the array rejects.
ok, my mistake
new Promise.all([undefined, somePromise])
Promise.all() isn't a constructor
So no new
Also, yes
If you put values (not Promises), it's considered as a resolved Promise with that value
12:52
I have updated the question Please check If anyone can help
even if the value is undefined/false ?
@tereško Even if the value is an instance of Error.
awesome
so the answer to my original question is: yes
12:54
4
Q: Angularjs:-Slick not working for dynamic data in responsive design(Bootstrap)

blankHeadI am trying to implement a slick carousel in which we can display images of various friends. The issue I am facing is that when I am working on slick on desktop it is working fine, but as soon as I move into mobile mode/mobile screen the slick carousel breaks. I am not sure whether it is the pro...

To be safe, wrap things with Promise.resolve() or Promise.reject() which are static methods that return a resolved and a rejected Promise respectively.
resolve() takes a value, and reject() takes a reason (should be an instance of Error)
in my specific usecase, I want to pass one of promises as an optional parameter for resolving "closing of notification message"
@tereško Use default values
Mornin'
const myFn = (params, maybeClose = Promise.resolve()) => {
  // ...
};
It's not strictly necessary, but it's more descriptive.
Also generally saves you the null checks.
12:59
will do
How's it hanging Madara?
Good, you?
It's going pretty good, excited though. I have a second interview today with the same company Sterling works for.
Only regret was that I didn't get more time to work on touching base with Angular, but meh, I'll deal with it, haha.
didn't know you were near DC
13:07
I'm not.
Moving was totally in the cards, so I'm good, haha.
I just have to shell out $200 to have my property manager find a new sublet.
Sterling should be back to work shortly. Wonder how hung over he is.
@Trasiva Nice!
13:22
I did a little of the angular tutorial, so I get the gist of it. Using controllers and ng-repeat and whatnot.
@Trasiva I bet military experience looks good on a resume for SNC--good luck!
Actually Nick, my resume barely mentioned it, the guy from HR didn't even know until I mentioned I'd been stationed out that way before, lol.
It will probably be easier to get the proper security clearances, if you don't have it already
@Trasiva what're you doing with angular? I am currently working on it as well
Thanks though, I'm gonna need it, not sure what they're going to talk about in this video conference today.
@ndugger I had a TS/SCI, so the hard part's done. Usually renewals are pretty smooth sailing since they already know you're a trustworthy source.
@corvid Nothing yet, if I get this new job I will be.
13:33
<span my-directive>
   <div>
   <form name="myForm">
      <div>
      </div>
   </form>
   <div>
</span>
how can I get myForm in my link function ?
I tried this but it doesn't works
function link(scope, element, attrs) {
            scope.$watch('myForm.$valid', function (validity) {
                console.log(validity);
            })
}
document.myForm?
ho. dunno sorry
it's ok, thanks, but that won't work better in angular
never use angular ^^
wtf
how does it render outside of the browser window?
they let cursors render over the browser? I didn't know that
13:42
it is possible create an object JS who is can only called by an another script?
like a plugin of..? Maybe a little like a jQuery plugin?
I create a JS application and I would to add another JS object in another file. It is possible to Call this new object but only from my application and not outside?
@GNi33 it sounds logical
@Abhishrek not to me
@Abhishrek thinking about it, it kinda does, as the cursor would need to be handled by the OS in some way anyways
@Jean-philippeEmond yea, you can organize your code into multiple files but nothing stop someone from copying out the code and running it
13:44
@RoyiNamir Why not?
The cursor will be handled by OS, the browser probably just sets the cursor using some API
now I'm curious about what the size limitations of the cursor are
inspect the page, you'll see. it sets the cursor right on the body element
cursor: url("...")
Tom
Tom
Hey guys, I have multiple sub_processes that can dynamicly increase. Now I have a listener on the stdout but I can't figure out how I can assign which output came from which childprocess to callback it to the user. This is probably because the child.stderr/child.stdin/child.stdout are a different object. I've tried adding functions to these objects but when the event emitter happens and I call them with this.callback he says undefined
anyone an idea how I can assign a stream back to his original childprocess?
(nodejs)
well.. its because I would create a Google map apps.. but I won't to get 1000lines into my JS ^^ have you an idea how I can proceed? I create an object like I do and I initialize into my first one? We can't dedicate the initialisation into my object? like maybe if "caller" is not "fte" return "" ?
who are you trying to prevent calling this?
if someone is going to steal code, they can take out a "if caller !=="
13:48
your'righ.. ok
Its the samething as when we do an anonymous function... no?
stackoverflow.com/a/38852688/3499931 Thoughts? Is this an answer even though they didn't explain the code, and most of it's just a link to a JSfiddle?
@FatihTAN Welcome to the JavaScript chat! Please review the room 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.
Ehhh am i missing something here? stackoverflow.com/q/38852698/561731

« first day (2124 days earlier)      last day (3049 days later) »