« first day (3933 days earlier)      last day (998 days later) » 

12:38 AM
Hi all, has anyone used session replay tool like logrocket or something else for a javascript app?
 
@ozil 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.
 
1:26 AM
@ozil Yes. LogRocket.
 
 
1 hour later…
user13780186
2:56 AM
Hello Devs, I have an array and I want the value will be merge.

['data1', 'data2'].filter(Boolean);

if both are true. then the output will be 'data1 data2'.
 
3:06 AM
|| mdn filter
 
|| mdn join
 
@BeginnerCoder read those and give it a try
 
 
5 hours later…
8:05 AM
hey !
guy, someone has a method to filter an html table according to the name of a column (table> thead> th) x/
I started but I didn't know how to finish ><
i have the input for the filter. When i fill 'da' for 'dan' for example, and i check 'Département' i need to show the row concerned by 'Département'.
ie :

ZARTHAUD Nathalie twitter | Mark | Otto | @mdo | 1 | Dan | Otto | @mdo
here is my code : jsfiddle.net/cpn4rj7g/1
 
 
3 hours later…
10:54 AM
@mitsu when searching for the column header you can also get the column index which in turn can be used to filter by column like f.e.: jsfiddle.net/Lzg5c36n/1 also I've changed the logic from using .toggle to just hiding everything and using .show instead so one doesn't need to handle the problem of toggling a row multiple times
 
 
2 hours later…
12:25 PM
the list item were having too much jsx so I thought to just use a loop but now there is some error with <icons[icon] />
can someone tell the correct syntax?
import { GiBlood, GiKidneys } from "react-icons/gi";
do inform if the link is dead, sometimes people have told me that my link is dead
but I am able to open it
 
@makadev thank youuuu that works as charm _
 
12:42 PM
fixed it nvm
 
12:53 PM
how do I simulate ctrl button on my phone?
 
you don't ?
 
Well I have some feature where pressing ctrl while hovering extends the help information (normally a single compact phrase becomes like a paragraph of text).
 
1:15 PM
Hi anyone there?
 
@DivyanshiMangal 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.
 
@paul23 There is no "hovering" on phones either, so why care about hover + ctrl ;)
 
To minimize difference between mobile and desktop functionaility
The hover is replaced with a small "i" button next to the input
which opens till clicked away
 
you could use Hammer.js or something similar (gesture recognition libs for touch) and utilize longpress
 
1:33 PM
Hi. I am using a node js application. I have changed http to https. I get this error:
Error: write EPROTO 140523384970568:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n

Can anyone help?
 
1:59 PM
What do you become after becoming a Backend Developer? Talking about the career progression.
 
@paul23 Ctrl isn't a thing on mobile phones. Also, "pressing Ctrl while hovering extends the help information" is not really a standard browsing behavior
I just use "read more" or "expand"
 
2:41 PM
o/
 
@DivyanshiMangal 99% of the time you don't want to use https directly with node. Instead setup something like nginx and proxy to your node server.
@SantoshKumar Senior Backend Developer?
 
depends on where you want to go with your career
project management?
 
Hmm how to Type guard against "not null or undefined" as a function?
 
team lead?
 
Like I have
export function nullOrUndefined(val: {}): boolean  {
    return val === null || val === undefined;
}
in flowjs I would add %checks behind boolean and flow would understand it would be a type guard
Used as like:
someVal: string|undefined|null = "myval"; //or some complex function that might return null, like map.get
console.log("the value: " + (nullOrUndefined(someVal) ? "nothing given", someVal));
 
2:55 PM
Social security numbers are the dumbest things in the world. Furthermore, why the hell is it supposed to be secret?
 
@JBis You tell me, you're from the us :P
 
:shrug:
for a long time it was actually on our driver's license
 
I'd be happy to supply you my own number, worst you can do is request documents for extra social benefits but once you try to fill in you need my id anyways.
 
I wish I knew. Someone asked me for my SSN via email and my gut reaction was to ask them to call me instead, and I realized how dumb the entire thing is.
 
Wait that's even allowed?
 
2:58 PM
allowed, (or denied,) by who?
 
government
 
i mean
sending something via email isn't a whole lot different from sending something in a web form
 
A company (or anyone except for the government itself) can never ask for my ID number in europe, that is by actually not allowed.
They can ask for a copy of my id card - but then I should blackout the personal number on it.
 
It's used as a universal unique secret identifier, when it's not universal, unique, secret, or an identifier.
 
Just tell them "well if I tell you my number it's no longer secret right? and you can act like you're me to the next person that asks for it"
Then that organization will be clever and stop using it :)
 
3:00 PM
Also how does any company verify a SSN? They can't access to government DB.
 
And they'll do a proper call back to the government with a public visible key you've been given I take it on your id/passport?
@JBis They can't?
How is privacy and data control handled on the other side of the atlantic? Someone needs to have control over where your personal information is stored right?
 
there's plenty of black market databases out there with ssn's to verify against
 
@KevinB lol true
 
Like the government needs to be able to see your income -> so companies link that to your identity, together with the type of income (different taxes). Then landlords/banks also need to see your total income (to know if you can pay rent in the future) but they only get the average income and not how you earn it from the government.
Must be someone who manages that, and someone (like government, but anyone) you can ask for "hey with whom did you all share my information"?
 
Hi Thanks for your reply!
The nginx is already setup which uses port 443. My backend node.js application uses port 8081.
 
3:07 PM
@DivyanshiMangal great.. So you setup nginx with HTTPS not node.
Are you using letsencrypt?
 
Today is my 1 year SO anniversary
 
@JBis It's actually a huge project. I am not aware of all the things present end-to-end but when you asked, I searched for letsencrypt in nginx repository and yes I can see letsEncrypt.
 
@DivyanshiMangal if you are using letsencrypt, certbot will setup https for you
 
@DivyanshiMangal The idea is that nginx handles ssl => from nginx to your nodejs server (if they run on the same network) you communicate using normal http.
 
@BeerusDev Happy Cake day! Oh wait thats reddit
 
3:12 PM
@JBis If that is the case, do I not need to specify https explicitly in my node.js application?
@paul23 Does it mean I cannot use https?
 
You can but JBis suggests you shouldn't to make things easier.
 
@DivyanshiMangal definitively not
 
@JBis @paul23 I can use http then but it's getting flagged during sonar scan :(
 
@JBis thanks
 
@paul23 Does it mean that my node.js application acts as a proxy? What do we exactly mean by proxy here in this case then?
 
3:17 PM
You will be using HTTPS, it's just who's doing it. Instead of Node providing HTTPS, you let nginx handle it. There is no different from the clients perspective.

Client <-- HTTPS --> ( nginx <-- HTTP --> node )
nginx is the proxy
 
@DivyanshiMangal This points at a design choice that you should discuss then. There are valid reason to have communicating between "internal" servers use https, for example when they communicate through an DNS and are no longer located on a single network. Hence NGINX and NODE need to verify each other's identity.
But that brings extra work and complexity, and should be a very well planned design choice.
 
@paul23 Nit: If you need to encrypt data between internal servers on separate networks, you'd probably use TLS with TCP, not HTTPS.
 
@KevinB 😁
so true
 
@JBis Interesting! I was trying so hard to understand why https isn't working for node application APIs. Thanks a lot!
@paul23 Understood. Thank you so much!
 
4:05 PM
Is using a block bad practice/impact readability?
{
   // code
}
probably not great, but whatever im using it
 
i've never seen one used in practice
 
I have a long function and I'm copy and pasting code with variable declarations and changing stuff slightly and I am getting 'already declared' errors. I should really use separate functions but I am lazy, so I just put each copy & paste in it's own block.
 
that block scoping is useless wiht modules nowadays
learned something though
ctrl+l while your focus is in dev console clears it
 
 {
        const date = new Date();
        date.setDate(date.getDate() - 7);
        const memberships = await Membership.query()
        ...
}
 {
        const date = new Date(); // this conflicts as well as some other stuff
        date.setDate(date.getDate() - 3);
        const raffleTickets = await RaffleTicket.query()
        ...
}
 
is it not possible to have more meaningful name? :D
 
4:15 PM
> but I am lazy
 
I've been in lazy-modus from time to time as well :)
and yeah, I re-encountered this and asked myself "who wrote this!" to figure out it was me ...
 
@KarelG :D
 
I am stuck on my updateTotSearchCount function, which is the last piece I need for this DataTable to work, when I try to append to the HTML I have no clue where I am getting the value of 11 from???? jsfiddle.net/BeerusDev/gm10rqp7/479 line 554. If anyone has a moment, it would be greatly appreciated
 
 
2 hours later…
6:16 PM
@JBis - thanks, if you don't mind, could you share some of your experience using logrocket, was it easy to integrate, and to find errors once set up. I also want to see , if i can use it for analytics as well , like if users like one feature/page better than others ....
also was there any good help/tutorial, other than documentation out there to integrate this
 
@ozil very easily to implement, pretty easy to find errors, i didn't use it for analytics purposes but something like GA is probably better at that
 
@JBis - thanks again. yeah i looked into GA, google analytics but it doesn't quite do it all
 
They are for two different purposes. LogRocket is mainly for debugging and GA is mainly for analytics.
You can use both
 
great thanks
@JBis- not sure , if anyone could answer this without seeing the project, but i'm working on a react js app for this, which has a server folder for the backend and client folder for the frontend , with their own package.json file
technically, where would the logrocket be used from ?
should i install it in the backend or the frontend folder
?
 
7:00 PM
@ozil for future reference, this is a common setup in the JS world. it's called a monorepo.
@ozil frontend
 
@JBis - thank you very much. sorry i know my questions are very basic
appreaciate your help
 
np
 
7:32 PM
Hi,
I know ReactJs setState is asynchronous but how can I update this variable immediately?
axios.post("url", data)
.then(response => {
setData(response.data);

I want this to take effect immediately, how can I achieve it ?
 
7:48 PM
wdym "immediately"?
i guess i didn't respond soon enough ;}
 
user6484487
How can this be improved and fixed up?

jsfiddle.net/zcoyuren/6

  function coverClickHandler(evt) {
    const cover = evt.currentTarget;
    hide(cover);
    const slide = document.querySelector(".j1");
    slide.classList.add("move-left");
    const slide2 = document.querySelector(".j2");
    slide2.classList.add("move-right");
    const curtain = document.querySelector(".curtain");
    curtain.classList.add("slide");
  }
 
@htmlcoding876 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.
 
user6484487
Can someone look at it for me and see if anything can be done to improve it.
 
10:15 PM
posted on July 23, 2021 by Daniel Gagnon

The Beta channel has been updated to 92.0.4515.111 (Platform version: 13982.60.0) for most Chrome OS devices. This build contains a number of bug fixes, security updates and feature enhancements. If you find issues, please let us know by visiting our forum or filing a bug. Interested in switching channels? Find out how. You can submit feedback using 'Repo

 

« first day (3933 days earlier)      last day (998 days later) »