« first day (3078 days earlier)      last day (2094 days later) » 

04:24
hey yoo
 
2 hours later…
05:58
can I call a middleware funciton within another function?
or should I always use
next('route')
06:43
Hi, anyone here heard about Angular-UI ui-mask https://github.com/angular-ui/ui-mask ?
I have such problem with ui-mask directive, that when I assign null or undefined value to variable used for creating the mask ui-mask="{{someMask}}" it makes automatically also my ng-model="someModel" undefined and I don't know how and why... Anyone seen such behaviour?
I'm using this plugin with AngularJS 1.5.8.
Hey guys.
Why would someone prefiere
[...document.getElementsByClassName('product_container')].forEach()
over
document.querySelectorAll(".product__container").forEach() ?

Is there a true diffference with the returned elements ?
Okay, since one is a nodeList and one is an html collection it dependends on what you want to do with
In my case since I want to use map on it
07:01
@JohnDonym next.plnkr.co/edit/0WMfqBdnxYp8y00g here's plunk to show what I'm talking about
I guess getElementsByClassName is the way of doing it
@JohnDoenym there is something in angular wichi say if the variable exist
I dont remember exactly the syntax
Its something like mask="{{someMask?}}"
Only a hint I'm not familiar at all with angular
@Baldráni querySelector is generally for complex selectors. For querySelector we also need to use escape special characters in case we use.
also querySelector calls run in O(n) times and getElement calls run in O(1)
Yeah I found out this
Well in my case it doesnt matter
And I just saw that I have to transform htmlCollection in an array too so I'll go with querySelectoAll
Do you see something fishy there ?
        const sortedElement = [...document.querySelectorAll('.product')].sort((a,b) => a.dataset.blockSize - b.datasetblockSize);
It returns me [2, 4, 1, 1] wtf
07:20
@Baldráni you mean the regex '?' which means in ui-mask optional? And setting regex inside expression will work?
It won't, it breaks the binding.
is it b.dataset.blockSize? or b.datasetblockSize
07:48
Well since its a data-attribute its a b.dataset.blockSize
If I console.log those it return me 2, 4 , 1, 1 so the osrting is not working :/
08:05
ò.o
@Baldráni that is expected?
yours problem is a.dataset.blockSize
data-attribute names are always lower cased. Even if you can use capital characters in html.
so
<p id="f" data-blockSize="1">...</p>
// access in js
q('#f').dataset.blockSize --> undefined
q('#f').dataset.blocksize --> '1'
and you have conflicting names: a.dataset.blockSize versus b.datasetblockSize
08:29
I'm working on a node project. It involved two libraries both of which expose an 'onmessage' event for the dev to attach callbacks to. This is causing an event name collision, as in, if I attach callback for library B's onmessage event, the one for library A stops firing. Any way to resolve this?
@KarelG No But I access the dataset, it actually data-block-size which gives me dataset.blockSize
Its the osrting which is not good
Looks like ui-mask somehow is connected with ng-model and if mask pattern is deleted/set to null or udnefined, it deletes value from ng-model.
But how and why?
Ho but yeah lol
I ha a typo x)
Forgot a point
30m on this ...
08:44
data-block-size is annoying :P
 
2 hours later…
10:24
Hiello everyone! Does anyone have any good real time project written in typescript+react. Want to look into project structure.
@Marius Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
Wax
Wax
10:36
{'background-image': '-moz-linear-gradient(151.91deg, '+ currentCabin.overlayGradientColors[0] + ' 17.62%, ' + currentCabin.overlayGradientColors[1] + '132.48%)'}
What's wrong here
Color won't display
or am i concatenating it wrong
"overlayGradientColors": ["#3C0F6A", "#AC17BF"]
oh btw am using ngstyle of angular
@Marius Real time mean Node JS right?
@Wax can you console.log that string concatenation before that object is set ?
I am curious at the result of
'-moz-linear-gradient(151.91deg, '+ currentCabin.overlayGradientColors[0] + ' 17.62%, ' + currentCabin.overlayGradientColors[1] + '132.48%)'
Wax
Wax
i'll try
hmm it's in the template
if i were to console.log it, i'll put it in component and add the this reference?
{'background-image': '-moz-linear-gradient(151.91deg, '+ (this.currentCabin.overlayGradientColors[0]) + ' 17.62%, ' + (this.currentCabin.overlayGradientColors[1]) + '132.48%)'}
hmm, that's how it showed .
literally? lol
I think that you can see in the css (open inspector) to the value. If it is invalid, you get an !
Wax
Wax
Object { "background-image": "-moz-linear-gradient(151.91deg, #3C0F6A 17.62%, #AC17BF132.48%)" }
ohh, I think i need some space
oh crap it's working now
#AC17BF132.48%)
it's because of this
10:51
Hey guys
Wax
Wax
thanks for the conole log idea lol, always forgetting to do that,
I was referred to a hot blonde called caprica
@CapricaSix dat you?
@d0n.key bot?
She's ignoring me already :<
Wax
Wax
lol
10:53
@d0n.key why ?
:)
Some people over in Java chat told me that certain people used to believe that capricaSix was human
I mean
She doesn't even respond, what's the deal
Can you fail the Turing Test if you just don't answer? :D
@d0n.key I think she is watching you .. (0) | (0) :D :D lol
@d0n.key We had cases of people flirting with her, yes.
Weirdos are weird...
@Wax was not so obvious :P
11:00
@MadaraUchiha :D
11:16
Hey, anyone has experience with SVG?
lil bit
@d0n.key I have SVG that need some animation. thing is i have to add <animation> tag to every <image> tag. any thoughts about tools I can use?
11:32
wdym "add <animation> tag to every <image> tag"?
like <image> -> <image><animation> ?
(All I've done with SVG was design some stuff in InkScape and modifying colors using JS)
is it bad to call middleware explicitly in express?
should I just use next()
?
12:04
@d0n.key kk i will try it.
 
2 hours later…
14:04
Yo boys
IIs their a simple way to clone a NodeList and keep his order
Other than doing some kind of process in a forEach ?
Meeh
Other problem
I tough cloning would solve it
But it seems like nop
I want to redisplay elements after removing their parent
hey guys
i have a question
So I tried to clone it before distributing again
with mostly using jquery
14:18
But they get deleted aswell
what would be the best method to download a json file... is it getJSON
what i am not understanding is this obtains the file in an object but what if i need a physical file
14:34
@Baldráni redisplay to where?
@ChristianMatthew you need to check for "download file". getJSON requests for a json entry and translates the response into an object to interact with via javascript
How can i make 10,000 async https calls using node js
how can this be achieved
sorry I omitted the "how" xD
have you checked this
try to figure out how to create many threads then use that
sorry I can not help you more than that :c
I have a csv with 10,000 lines. so i can loop and open 10,000 https connections or what theoritically needs to be done
14:43
> open 10,000 https connections
why?
I have a url say htps://example.com/action/data
data is a variable
so when the url is executed, some work i done
so, if i open 10,000 conections, i shall have done 10,000 things in no time
instead of waiting to do 1 by 1
I am still baffled that you are not even thinking at that "open 10,000 connections" part alone.
@KarelG can't have connection issues if server can't open new connections ;)
@KarelG I heard you can open as many requests as possible in nodejs, is there a limit or a glass ceiling
@neil hi neil
@objectiveME hey, what's up?
14:49
@Neil I am wondering if node js has some sort of mechanism where i can open async https requests
@objectiveME Wish I could help ya. Today I'm a little busy, sorry
@Neil cool
If you want to continue on that approach ... well the node.js' http is sufficient enough.
Look for http.Agent documentation and check the bit about maxSocket option you can utilize
Yet be wary that this module is capable to handle 10 000 requests, it does not mean that 10 000 requests got made. That depends of the OS, configs and hardware you are using.
Thanks
I shall test it out
Really, read the documentation. I mean it. Especially the bit about .destroy()
so when the request is done, destroy it
14:55
ja
I plan on using amazon lambda and try make 10,000 calls
ad see what ahppens
happens*
15:10
o/
*downvotes Kevin* Reason: bad welcome message
Hello, can anyone plz tell me how can i call a jquery custom function from an angular app ?
$.customFunction()
however
i have one custom jquery function which handle resposive navigation, which i want to call from angular app class after navigation menu data is fetched from api
if you're trying to apply it to DOM that is controlled by angular, you mightaswell just not
15:14
so it is not possible?
i saw something about directive how does that work and can it be used in this case?
anything's "possible", but the hoops you'll have to jump through to make it work probably isn't worth the time
basically... angular controls the dom that the plugin would be modifying
but when angular altars or rebuilds it, the plugin isn't going to know about it
so you'd have to apply logic that cleans up the plugin's event handlers/dom changes and then re-initializes it, assuming the plugin even has such functionality
which could have bad side effects, like in your case causing the navigation to close while it is in use
15:17
ic
if it's just a responsive navbar, chances are most of the work is done in CSS anyway, so it shouldn't be hard to replicate what the plugin is doing
i did , but could not achive the same, it also handles the multiple styles like big horizontal navigation . and then on going to mobile screen it will be like mobile app drawer like that.
i tried with jquery domchange event listener . only one problem with that is its looping as many time as the anglur chaing the element
big horizontal navigation is my rapper name
1
Q: Why is $ not defined?

Akhil VaidIm super new to React and am learning on my own. I was trying to import some JSON data from this url : http://jsonplaceholder.typicode.com/posts My index.js code: import React, { Component } from 'react'; import { render } from 'react-dom'; import './style.css'; import ReactDOM from 'react-dom'...

lol @ the first comment
15:30
pointy's?
updated
i assume he means where is the compiler injecting app js
err, index.js in this case
15:43
Either it is a joke or he made a stupid comment
15:53
How do I vertically center this text and make the background color of the text fill the entire parent?
https://jsfiddle.net/sebastian3495/t41s8ngm/3/
@xingZì
flexbox magic
Align-items stretch seems to be the "magic-word" that I was missing. Thanks!
I think align-items: stretch is actually redundant in this case; it's mostly the display: flex; that fixed it
SyntaxError: import declarations may only appear at top level of a module Error now after adding <script src="index.js"></script> into html file in FireFox — Akhil Vaid 55 secs ago
does anyone here use vs code?
16:02
a few
just wanted to know if there was a way for vs code to auto indent your js code properly?
@KevinB that dude is gonna struggle to figure out that he needs to build his code first...
editor.formatOnSave does nothing.
i haven't messed with the indentation other than setting it to 2 spaces
seems to auto-indent enough for me to not notice it not doing it
people who indent with only 2 spaces should be put in camps
16:09
Cows trying to scare Canadian goose but https://t.co/DXg3YyKK5e
Has someone tried to compile nodejs using emscripten ?
Hey, @ndugger, sorry for disturbing you, but it doesn't work when the text is less than the width of the parent.

Mind taking a look? https://jsfiddle.net/sebastian3495/t41s8ngm/7/
flex-grow: 1
and moved the justify-content to the anchor
What?! You are amazing! Thanks again! Holy cow this is confusing.
flexbox might take a while to wrap your head around, but it's extremely powerful
16:24
powerful flexible the game
16:39
Is it possible to intercept every single network request that is made in an application using JavaScript? Pretty much a way to have every single request go through an interceptor, whether it’s AJAX, window.location, form submit, iframe etc. is that possible?
maybe with an extension?
Well I was thinking natively, like only via JavaScript
I know I can handle all Ajax calls through xhr, but not form submits. I’m not sure what mechanism form submit uses to make the call
i don't think you can intercept those once they've been initiated
you can of course intercept the action that causes them, like the form submit or an anchor click etc
I usually create some kind of networking interface to make all of my calls through in my apps so I can set default headers, among other things
you can monkeypatch methods of xhr
16:46
Morning all!
o/
omg, it's been a while
@jAndy we have a food delivery service and it's vegan, so now we're vegan, I guess
4
yeah
And we met @Zirak
She's really cool
zirak is a 99 year old male goat; don't confuse us
16:59
She's so soft and cuddly
This is her encouraging me: copy.sh/straightdown.webm
17:12
@BadgerCat wow... you can't imagine how much I envy you for that
where are you
I'd go vegetarian if I didn't have to cook it. Meat has been kind of grossing me out lately
Especially when you're eating chicken wings, and you get a stringy dark vein that you have to gnaw through... makes me gag
I'd probably go episcopalian, or whatever it's called where you can still eat eggs and fish
lmao, that's the wrong term
that's like a religion
> Pescetarianism
that's the one
lol
-4
Q: res.send() not parsing JSON strings correctly

Dan LI am fairly new to JS and have jumped right in for a school project I am currently working on. I have 2 JS programs right now, app.js for the server side and index.js for the browser-client side stuff. in app.js I am using res.send() (yes I've tried res.json as well) to send over two arrays, on...

17:29
I'm trying to strip out an <ApplicationData> node from an XML string using regex. I can't seem to get it to handle if there is content before and/or after the <ApplicationData> block...
const regex = new RegExp(`^(<.+?ApplicationData.+?>.+?<\/.+?ApplicationData.+?>)`);
const response = xml.replace(regex, '');
Did you mean to put ^ in?
apparently not, but removing that doesn't seem to match in my regex101 test
Why aren't you using a regex literal?
Red
Red
Anyone aware of any text to voice API's?
(that are free)
Why are you allowing content before the tag name?
Why are you allowing content in the closing tag?
17:32
I believe there are free JS apis for text to speech
Why are you capturing it in a group?
Why are you using + instead of *?
the answer to all of your questions is that i'm really bad at regex
don't use regexp to parse *ml
if there is a better approach to what i'm doing, i would be eager to hear it
17:33
xml parser, probably
so an xml parser just to strip out a section?
since regex cannot reliably nor sufficiently parse X/HTML, yeah
Red
Red
@ndugger yeah I was looking at that actually, have you used it before?
I don't remember. I remember playing around with something like it a few years ago
back when the browser support was really bad
Red
Red
yeah I mean the speech to text support is still pretty useless but
I guess I don't really need that anyway
17:36
Hi guys, sorry to bother if wrong chat (couldn't find a general discussion), chose this cause it's popular. I'm a beginner but have experience in C, Python, JS, HTML, and CSS. I got a call from a recruiter about the apprentice application. just read the job description and wondering if it's a good place to start with IT?
@ndugger Well, it can...
PS: I'm not sure what I wanna do yet. probably with my experience I'm leaning towards soft dev but obviously I couldn't possibly know what will really interest me in the long run
Is apprentice like an internship?
sort of, yeah, 9k per annum here.... not great but gives you some certifications too
Red
Red
@PawelFlajszer I did an apprenticeship as well
17:38
> Working Hours: Monday to Friday, 37.5 hours per week
> Salary: £9,000 per annum
oof
basically full time, get paid peanuts
Red
Red
I used my apprenticeship as a gateway into university really
Red
Red
but they did offer me a job after on about 14k (not great)
I'm self taught though, no uni
Red
Red
but without a degree you've gotta climb
if you wanna be a developer but wanna skip university, apprenticeship is the best way into the field
17:39
I did the startup route instead of getting a degree. The startup bombed out, but my career skyrocketed afterwards.
I'm not interested so much in money but is that a job that anyone can do, like a normal call center, just named "application support" or is it actually already in the field?
Red
Red
@ndugger what was the startup?
It's long gone now. I couldn't even tell you what the company did, since they pivoted like 4 times in a year. They had no real business plan, it was just some dudes throwing money away
Red
Red
@PawelFlajszer it's 1st line support, so it's not actually just a call centre job
not as lucrative as being a developer
@ndugger did you ever get paid for it?
Up until my last paycheque, when they illegaly withheld it
17:47
Can we extend an event method on specific element prototypes? For example, extend HTMLIframe.prototype.onloadstart so it executes custom code.
i have a f2f interview on Mon
trouble is I have to travel to another town which is crap
I threatened to sue, and collected evidence against them, but it was over like 1.5k... the lawyer fees would have been greater
people suck
@jAndy Mexico, Playa del Carmen
You should come over, we have lots of vegan restaurants where you can get a full meal for 2-3 euros
@DemCodeLines you shouldn't modify objects you don't own, unless you're polyfilling
My parents were just in mexico. My mom wants to make mexico like the family vacation spot since she loves it
Where in Mexico?
17:49
@ndugger in basically trying to modify all iframes that are there anywhere in the application so their src property is in a specific format.
I'm not sure... I know they've been to cozumel a couple of times... not sure where they went this time
Hey Guys!

I'm spawning npm install -g create-react-app from a js script. I want to know if it's possible to know the progress of the installation using spawn ?
const npmExecutable = /^win/.test(process.platform) ? "npm.cmd" : "npm";
const npm = spawn(npmExecutable, ["install", "-g", "create-react-app"]);
@BadgerCat It was cozumel again this time
had to look through emails
We're super close to Cozumel
Oh awesome. If I ever make it down there, I'll see if I can swing a visit. It's hard to travel with a dog at home, since I can't put him up at a kennel because he's so afraid of everything
18:38
Do you guys load your .js files from a CDN or a local file? I choosed to put all .js code inside only one file and save it on my server to minimize the number of requests, and also get some points on Google PageSpeed
18:55
<script src="https://maps.googleapis.com/maps/api/js?key=XXXXX&callback=CTX_MAP.initMap.bind(this,'map')"

Can you tell me whats wrong with my callback function, how else can i pass the argument to initMap function? Above doesnt work.
@TheGarrus Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
I just get
GET *URL* net::ERR_ABORTED 400 every time
@nobody
well
your .bind isn't gonna do anything there
@nobody
Load it from local files if its serious project. You should not depend on CDNS.
that's a JSONP request, all you can specify as a callback is a function name.
19:00
Alright i see
and the function has to be global
Most of my js files are bundled now days
prior to that i loaded from a cdn
Il fix it, i just wondered if this was possible.

@nobody
Also you dont have to put all your stuff inside one file. Make your code modular and then just use something like gulp or webpack to bundle files for production.
19:15
@TheGarrus when i load a plugin, or a file using a CDN, the CDN provider get the IP of the my website or the IP from the machine that's requesting?
While using tinymce, I was saving base64 encoded image data in database, while I am trying to update date, the base64 data is not converted into image, rather am empty space is shown.

Why and how to fix it?

N.B.: googled since past few hours, found nothing
@nobody
I guess the user and then serves from the nearest server from the user.
Im not sure.
testing testing
@PuneetSharma Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
19:31
does anyone know if, on github, the repo owner can delete issues? or can they only close them?
I believe they recently added the ability to delete issues
amazing
That was not amazing
20:25
o/
🚽
20:38
toilet time?
I'm importing this script on a project at work, looking at the docs I should have access to `$createObservableFunction` function.

But it is logging as undefined
this is the script I import
I would use require or import here but the way we write the 3rd party widgets, you have to add via cdn or bundle it
pretty much following along the rxjs example from here - cvuorinen.net/2016/05/using-rxjs-observables-with-angularjs-1
I assumed that if I did Objecy.defineProperty(HTMLElement.prototype... and then created an element in the html file, then it would have the changes I just defined. But I guess that’s not how it works?
21:18
@DavidKamer woah really triggering
talking about abstraction
Hello
Misha130
Goodnight everybody
right
@misha130 Make sure you have a container to container your container
I love docker, buuuuuuut it gets a little overboard
maybe he wasn't talking about that directly, but that's what I got from it. trying to containerize everything has probably decreased my productivity by about 10x lately lol, but that's probably my fault somehow...
21:44
One thing I like about containers is not having to pollute my laptop with stuff. Before Vagrant / Docker it was a nightmare to work on two projects if they needed different versions of something like mongodb.
yeah I think containerization is kind of a steep initial investment but it typically pays off
And it's super sweet to know develop and production have the same exact version of everthing.
and if it doesn't then you probably should stop doing it haha
right ^
benefits almost always outweigh the negatives, but the existing products are intentionally complicated in my opinion. You have one end of the spectrum where you have a PaaS like Firebase where you can just upload your code and on the other end you have k8s, and it's like finding a sweet spot in the middle where you aren't making life more difficult just ends up bringing you into some other weird yml file structure that you have to learn
I'm not complaining about the concept but the tooling

« first day (3078 days earlier)      last day (2094 days later) »