« first day (3190 days earlier)      last day (1983 days later) » 
06:00 - 20:0020:00 - 00:00

06:36
@Tavo no "morn" today? ._.
sorry. Damn busy
howdy!
sup homies
how are you @KarelG?
06:58
Sending an email to persons and that email have approve and decline button so how do I get back his/her email id when clicking on btn ?
is their anything Inbox can give me email id in response ?
as i am unable to send his/her email with my email template buttons
I want to authenticate who approved or declined
Make the button a link that contains a unique token which you can use to identify them.
Rob
Rob
Don't just make it unique, it needs to be cryptographically random as well
@AbhiBurk the button just looks like a button. If it is a link, you can add parameters like http:// somedomain/approve.php?user=1234&issue=5678
What the blue guy said ^
bleh, I forget how to make it so that chat doesn't auto-format links
who's the blue guy?
07:03
Rob :D
While sending email to Persons I am not sending ID or attaching with my buttons
oh by his name
I mean to say links href and not actual buttons
@AbhiBurk you're composing the e-mail that he reads, aren't you?
then you can also add links into the e-mail
Rob
Rob
@AbhiBurk Before you send the email, generate a unique cryptographically random token. Save that token in your database and link it to the user id. Then include that token in the link
07:04
assuming the e-mail is of type html, it'll show it as a button
Rob
Rob
When they hit the link, verify the token (one use only, not expired, etc), and you're done
I am using PHP here so my $to = array of emails and the body will be same for all array emails so I cant add ID in body of templates
Rob
Rob
Then change it..
if the email sending function was in loop it could be possible and I could have attach id of the person to my anchor tags
The token thing has been the way to go for idk how long and there is a reason for that.
07:06
the e-mail client is entirely separate from your program, right?
This means literally the only way to connect back to your application is via a link
You don't want to use the ID of the person because then some funny guy could go along and could try to approve a wholel bunch of people. Instead do it the way Rob explained it with a cryptographically safe token which you connect to the user in the backend.
and if all the links are the same, how would you know who approved or denied what?
there is literally no other way through e-mail
is it possible lets say in Gmail Inbox like while my email goes to person I should be able to fetch that inbox email id and set it on my anchor
Rob
Rob
Nope
From what I understand you want to send out a bulk mail to all people at once instead of sending multiple ones to each user, right?
Rob
Rob
07:09
You need to generate the token and put it in the links
@geisterfurz007 the problem is I cant add anything from my side in email which will make a user unique
Rob
Rob
If your code currently sends the exact same email to multiple people, you need to change that
If you're using a provider like sendgrid, you can use templates and pass arguments
@geisterfurz007 Yes You are right I am sending Bulk emails
That won't work. There are too many different email clients to make that work with many not being uniquely identifiable(I am pretty sure about that).
You gotta change that, I am afraid.
@Tavo well, I wish I could say "good" but had not sufficient sleep last night
07:13
is it ever sufficient though?
cause: the ol' gamer problem: expected to play a hour - hour and half, got a nice mission aaannnnd it became early morning.
but sorry to hear
oooohhhh
self-inflicted
@AbhiBurk just follow Rob's advice.
@KarelG "I'll just play one more g... aaaaaaaaaaand it's morning..."
Happens every time I play Civ
07:21
Each time I play Minecraft ._.
p00p
it was AC Origins :P
okay
after some pre-missions, I had to kill an Anubis priest. But the problem is that there are 5 of them. The only directives I had was (1) he is wearing a blue cloth (forgot the exact word) and (2) he is coughing a lot. Yet when I arrived at the temple, it was peekish dark. 3 of them were sleeping, So I approached them, but could not see the color of that cloth. I lit a torch to examine them. They did not wake up 😀
Upgraded my unused app to React Native 0.60.0. Now I am back in the emptiness of boredom ._______.
07:36
@KarelG first world problems!
I got assigned to a new project recently where an Access database needs to be fixed. The only coworker that knows how that stuff works and can answer my questions still isn't at work
It's 9:37
access? ha
should be an mdb repair tool you run
It should sooner or later be redeveloped in JavaEE but for now we gotta get that old junk fixed. My manager already had an unpleasant meeting with other managers that require that thing to work because that other guy (who still didn't show up) doesn't get his shit together.
No idea why he still isn't fired after at least 5 complaints from another coworker.
G'day Mr. Fortune :)
Any company using an Access DB is probably stupid. Excel is 100x better if you need something lame like that
I can confirm the stupid part
07:51
> I am hopeful that it will normalize over a couple of months.
is that worded correctly or should I pick something else?
@MadaraUchiha I don't actually know 😃
@KarelG wat?
@geisterfurz007 he has something that other's does not have: knowledge of some critical components
I don't see a difference in him doing nothing because he is lazy and someone else doing nothing because they don't understand the stuff.
@geisterfurz007 the phrasing? activate your grammar nazi mode!
07:53
Oh, I thought that it was supposed to be a comment on some previous message ^^"
I would just plainly say "I hope that". Then again, I am no English native (:
meh already sent the mail
now I realized that I made a grammar mistake. Fuck my mind
> ...is experiencing problems with using our tools, therefore...
it should be when 😭
If that guy isn't here at 11 I will ask our manager if he knows anything... I am so fed up with team partners that do nothing and don't communicate. If he is ill, fine but please tell me about it -.-
some people starts at our office around 11
or even later :P
that is what you can get with "flexible hours"
He leaves at 17. He is nowhere near the weekly hours he is paid for.
08:12
does he have overtime?
I just expect my people to work ~40 hours per week
He does that for the 2.5 years I know him now.
if they got more or less, it is okay, but at the end of the month, the balance must be 0
well, that is a responsibility of your manager (or his if he has a different one)
Sometimes when our manager tells him to get his shit together he comes earlier but that is only for a week or so.
Our manager doesn't do shit unfortunately.
He received many complaints about that guy from another coworker and nothing happened except for a few talks without any followup.
08:18
go a lvl higher
or walk to HR
seems a form of "friend" protection that should not be allowed.
What are you talking about?
48 mins ago, by geisterfurz007
I got assigned to a new project recently where an Access database needs to be fixed. The only coworker that knows how that stuff works and can answer my questions still isn't at work
It seems to me you are talking about some coworker conflict sort of thing.
Hey everyone! Are there any webpack gods here that could answer my unanswered question? stackoverflow.com/questions/56971775/…
@PASH 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.
08:37
He made it! 10:34 and he made it here!
08:52
Can anyone please help me creating regex for first name and last name. These names should not allow any spaces, special characters or digits.
Really stuck here
@JupiterAmy combine toLowerCase() and match() ?
like
function isValidName(nameStr) {
  return nameStr && nameStr.toLowerCase().match(/^[a-z]+$/);
}
but that does not work if the user uses a let's say a japanese character (unicode) for his name
those unicode characters are "special character"s
Recommended reading:
https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
sooner or later that'll get you into trouble
all you can do is accept a name like you would accept a description
don't use it as an identifier ever
09:11
Yeah, even O'Neil would not work
I just don't allow digits in it. If someone uses an emoji, well I don't care.
I tried using this
/^[a-zA-Z]+(([\'\,\.\-][a-zA-Z])?[a-zA-Z]*)*$/
works well for my purpose
@JupiterAmy well, it does not work with french names such as Louis de Funès
(he's an French actor, see imdb.com/name/nm0000086)
you are missing a space. It is common for Spanish people have 2 names as family name
@KarelG LOL correct..but serves my purpose as the product I am building is internal to the organization
What if Louis de Funès joins your company?
@PASH I'd say your question bails down to how to later disable the CSS-modules feature for an app originally crafted with CSS modules enabled.
boils down to
09:23
@geisterfurz007 NEIN
aaah man
you need to reply with "DOCH"
That would require a ton of manual refactoring work to be done, IMO.
09:24
Oooooooh! I didn't know he was that guy ._. Sorry
@KarelG needs https*
@JupiterAmy You never know if someone joins that has French origin. Or that he has two names in family name
It is now legal in my country to have both the name of the father and mother in your family name
earlier, it was only the father name
now you have 4 options
@ShrekOverflow o.o? I am confused
@KarelG Seems like the regex has to be improved :D
@geisterfurz007 SO chat search is an abominable
Search for easter eggs and say that again.
@ShrekOverflow my meme?
09:35
The very recent one, obviously.
use relevence
oh the reddit link
was meant for other chat room
10:37
hi guys :-)
I want to share a variable through one html page to javascript page and another html page been loaded from javascript page so I want to access that variable into loaded html page..
I am trying to declare a variable from html page <script type="text/javascript">
var dagExecHistoryForGraph;
</script> it is accessible into example.js file but not into loaded html page.
Hi Fella,

I am getting the issue while checking scss, I am not able to use few stuff of scss but ia have scss
10:55
> I am not able to use few stuff of scss
what do you mean with that?
are you pre-processing the scss file before you deploy it?
@zhengquan-bai Shouldn't it not matter if I was originally using modules : true to craft my application? Don't all the files get re-transpiled every time I run webpack?
@ZhengquanBai for some reason it didn't tag you^
 
1 hour later…
12:29
@KarelG I mean am not able to use interpolation, mixins with arguments, for, each loop

I am a bit confused because the same code working fine on www.sassmeister.com
vOv
@KarelG needs one more
TypeScript: After 24 hours,
WHAT HAVE I DONE? IT FELT SO GOOD, SO RIGHT IN THE MOMENT!
No, typescript after 24 hours is everything's done, but youv'e spent 16 of the past 24 hours trying to figure out how to type something
@Cereal nah, at hour 24 you realize you can just any
and revert back to JS
@Cereal Oh aye, at first
The ratio of type overhead time to actual code time drops significantly as you work with it more
And the more complete a picture of types you gradually build, the easier it is to refactor/read the code afterwards.
Every single person I've introduced to TypeScript and said they hated it at first, ended up loving it and using it for everything.
12:41
people here does not want to adopt it ☹
so I could not learn more from TS unless I have enough spare time to toy with it
@MadaraUchiha Not everyone
😛
13:03
@MadaraUchiha that is the problem
your sample set is small :D
For 2 hours now there are two (up to about 15 minutes ago three) people in my office that have absolutely nothing to do here. They don't work, they just constantly talk with the other guy that arrived as early as half past ten and are productive like a fucking river rock.
And even after I plugged my headphones in and worked on a project they didn't understand that I was actually working and actively annoyed my and tried to get my attention. Only thing they got was a "fuck off".
I don't understand why it seems to be so hard for so many people here to just do their job.
</rant>
Sorry.
I like typescript when it works, just doesn't always work :D
Like next.js 9 added typescript support - but it uses babel not tsc
Soooooooooo nothing works
13:33
Hmm what is the correct word for "index beyond last index to test"?
Like I have "start_index" for the first entry, but how would I define the following interval (open ended):
[start_index, X)
A word for the increment of the last index?
Or the follower rather
Me no english
So it can correspond to "start_index + size"
@geisterfurz007 interesting you choose javascript room for your rant xD
Why do you need a word for that?
Variablename? :D
13:46
hi
let me ask you
var y = someValue;

function findX(){
       const xml = new XMLHttpRequest();
       xml.open('POST' , "http://127.0.0.1:5000/getX");
       xml.onload = ()=>{
         var respond = JSON.parse(xml.responseText);
     }
     const Data = new FormData();
     Data.append('y', y);
     xml.send(Data);
     return false;

   };

   findX();
if i have function like this
what i can use the result from findX() to run another conditional statement ?
You are always returning false, correct?
I assume that's not the result you mean?
if (respond.req === "True"){
 // do something
}
underneath the function
5002
Q: How do I return the response from an asynchronous call?

Felix KlingI have a function foo which makes an Ajax request. How can I return the response from foo? I tried returning the value from the success callback as well as assigning the response to a local variable inside the function and returning that one, but none of those ways actually return the response....

got it !! thanks @geisterfurz007
14:02
@JRick are you still not aware of the asynchronous nature of JavaScript?
@geisterfurz007 yes
@KarelG Promise {<resolved>: "no"}
I could use "start" and "end" - but than I'll confuse myself in the future since I normally always use open ended intervals.
@rlemon .reject(_ => console.log('poor you'));
I just realized that "bigint" is a native javascript type. I'm really wondering why.
14:09
because you need it for large numbers
@paul23 Because if you want to accurately represent numbers on the scale of 10 to the power of 30, you're SoL otherwise.
!!> Number.MAX_SAFE_INTEGER
@MadaraUchiha 9007199254740991
That's as high as you can go with normal numbers before starting to lose precision
Well there's the ability to have custom libraries for that (and it would make bigints objects), it's kind of weird that this is part of the standard while many other things aren't.
!!> 9007199254740991 === 9007199254740991 + .1
14:12
@MadaraUchiha true
@paul23 TBF what I really want are decimals
And not bigints
That indeed would be "better"
It just surprised me, that's all.
@MadaraUchiha btw this can be done with a lot of numbers smaller than max integer, at least to 1/4th of max_safe_integer..
*1/8th rounded up.
@MadaraUchiha java has BigDecimal, do you want to see that in js?
I never understood why FP math was so hard with JS, I've never really looked into the internals
Isn't it just IEEE 754 ?
14:18
IEEE 754 standard ben
it is even described there. Although @KendallFrey knows more about it than I do (he probably have red it completely
@KarelG With a nonterrible syntax, yes.
@BenFortune FP math is hard in general
yeah true. I am ok with that idea. The rounding syntax can be removed tho
Java/C#/others are not exempt from this.
Use the python way!
"It just works"(tm)
â„¢
14:20
Every once in a while I blow someone's mind that 1f / 0f is Float.POSITIVE_INFINITY in C#.
idk why I memorized that alt code <.<
@KarelG Ah, good ol' U+2212.
@MadaraUchiha I kind of thought that was common knowledge
I just press Alt then enter 0153
@KendallFrey And yet people always bash JS on the weird division by 0 behaviors and NaN
14:21
Weird? That's not weird
Even though those concepts do exist in those very languages they're used to (even if they're less common there)
easy to memorize tho, it is 0 then up 1 then 5 then back 3
rounding errors are weird
People are sure they'd get a DivisionByZeroException when dividing doubles/floats.
!!> 0/0
14:21
@paul23 "NaN"
That's fully expected.
!!> [0/0, 1/0, -1/0]
@MadaraUchiha ["NaN","Infinity","-Infinity"]
Still fully logical - that's just maths.
This is also the answer to the question of how to distinguish between 0 and -0, IIRC
14:22
@paul23 Not exactly.
!!> [1/0, 1/-0]
@KendallFrey ["Infinity","-Infinity"]
@paul23 it does not do any maths
From a pure math perspective, all 3 of those are undefined/meaningless.
Depends on your field of mathematics :P
14:23
the jumper just toggle the flag before using the arithmetic registries
@paul23 The correct one.
@MadaraUchiha 42 is the correct one!
"Any number divided by zero approaches +/- infinity depending from which side you come to zero".
1/-0 is an interesting artifact of one's complement - didn't know javascript emulated that.
14:25
It doesn't
That's standard IEEE 754
@KendallFrey those rounding issues you see in js is not documented right?
All of the "weird behaviors" of floating point math in JavaScript is exactly the same in C# and in Java.
lol NaN !== NaN
@KarelG What, .1 + .2 = .300000000000004 kind of problems?
@KarelG They're well-defined behaviour of IEEE 754
14:28
That's almost always the case
or 10 / 3
!!> 10/3
rounding errors are also easy to understand
@KarelG 3.3333333333333335
that little 5 bugs me
It shouldn't. Finite precision numbers are always an approximation.
14:29
discrete maths :P
we work in binary, binary has as only prime factor "2" (10 has 5 & 2) so only fractions which are of the for (1/(2^n)) can be represented without rounding errors.
Although it's weird that the display representation goes beyond the significant digits
In decimal any division based in (1/(2^n * 5^m)) can be represented correctly.
Lets' build computers based on base30 numeric systems.
C# displays 10/3 as 3.33333333333333
14:31
@KendallFrey And 0.1+0.2 as 0.3
But when you try to == it, it returns False.
In effect, it lies to you, whereas JS does not.
You shouldn't be using == on floats anyway
Or base 210
Or use rationals
@KendallFrey Exactly because of everything we just said...
@KendallFrey higher level languages.. We're not the 80s anymore.
Python...
14:33
I have no idea what that has to do with what I said
Well in python "it just works".
Don't ask me why btw.
What does?
python seems to be the same as C# for everything I tried
Python automatically starts using decimals and bigints if it thinks it needs to.
Python 3
so?
python has flaws tho
the == does not do any type check
$ python
>>> 0.1+0.2
0.30000000000000004
Surprisingly, 1.0/0.0 gives a ZeroDivisionError
So it doesn't adhere to IEEE 754 100%
It completely doesn't adhere - remember the integer is unbound.
15:04
noob question
how do I use hasOwnProperty in TS 😃 without any?
15:15
@ShrekOverflow What do you mean?
export default function isOAuth2(queryParams: any) {
    return OAUTH_2_0_QS_IDENTIFIERS.every(
        param => queryParams.hasOwnProperty(param)
    );
}
I don't want to use any there :)
@ShrekOverflow Should just work without any. typescript-play.js.org/#code/…
well wehn I remove it throws the implicit any
@ShrekOverflow Obviously
How would you expect it to infer queryParams's type?
I am not 😀
i am wondering which type should that be
seems to generic to create a custom type / interface
15:23
oh
Also I am programming after like 4 months of making presentations
so ... bit rusty cough cough
16:08
@ShrekOverflow { [key: string]: string }
i.imgur.com/VRxfTSD.png @forresthopkinsa
16:21
@MadaraUchiha seems like an overkill 😬
isn't there something like Dict<string> ?
I ended up import ParsedQuery from query-string instead 😀
which is basically what you said :)
@ShrekOverflow Record<string, string>
Which is the same thing, basically.
reading the chat Taylor spark is a creature!
@MadaraUchiha Thanks :)
Is there a tutorial/course/resource on how to add GridFS to a mongoose schema. How to do this: youtube.com/watch?v=3f5Q9wDePzY but also using mongoose schrma
17:00
Guys I am making a switch to front end development (angular), I want to learn TypeScript/JavaScript as much as possible. I am not totally new to JavaScript/TypeScript but I would like to know if there is a learning path that I must follow?
17:11
@SamuraiJack I always recommend Practical Javascript
but that's really meant for beginners so if you're pretty experienced you might find it frustrating
@forresthopkinsa I am to be working on a project that has complex architecture, complex object / array manipulation
Okay well on the other side of the spectrum, I'd recommend You Don't Know Javascript for more advanced stuff
@forresthopkinsa I thought about that.. but isn't it all about javascript and no typescript at all?
Yes.
The title is pretty self-explanatory. You don't know JS.
Since I will be working on angular, I would want to know only as much javascript as needed to master typescript
@forresthopkinsa lol true
17:18
Sounds like you probably want an Angular course
I've never taken a Typescript course, the language is pretty self-documenting for the most part. I generally look up the advanced stuff when I need it
But I have the advantage of my manager (slash code reviewer) catching me when I'm not doing something the right way
@MadaraUchiha that's hot
I have already watched many angular courses.. but the angular project that I have been assigned demands more knowledge of typescript/javascript than angular itself. I need to learn state management , patterns ,etc. I am currently trying to learn rxjs as well.. javscript could be overwhelming for someone from c# background
the basic syntax is similar though
A lot of that stuff you kind of have to learn by application
@forresthopkinsa I guess i will have to learn the hard way then.. dive into the project and constantly google stuff
I'd see if you can find a mature open-source repo that resembles the architecture you're pursuing and get familiar with it
Or if the project you're joining is already pretty mature then yeah you can take a shortcut and just familiarize yourself with that
@forresthopkinsa the project's architecture was designed by someone who is on a different continent , he is master in programming. He then gave it to guys who are fresh out of college and now its a complex mix of wow!!! and what??? moments lol
17:25
Oh that's a big yikes
He shouldn't have transferred off the project before training a new expert in it
I hope I could figure out what to adopt and what not to
@forresthopkinsa it's always the management who takes decisions .. and the cherry on the cake is that there is ZERO documentation
management should make the decision of firing themselves then
hahaha
whose decision was it to not write any docs
I don't know I was not there when this was happening I just joined the organization
18:19
hmm anyone knows of a tool to convert css to jss?
18:43
@paul23 This looks promising google.com/search?&q=convert+css+to+jss
A CodePen that does it and a Visual Studio Code plugin both jump out at me
codepen doesn't understand selectors
I'm not sure that's an accurate statement
Well the codepen source converts .row::before to rowBeforeClass instead of rowClass{ '&::before':
19:09
So it sounds like your concern is with the JavaScript of that demo, not with CodePen's CSS parser.
19:34
@TylerH Your dream is coming true
06:00 - 20:0020:00 - 00:00

« first day (3190 days earlier)      last day (1983 days later) »