« first day (2823 days earlier)      last day (2143 days later) » 

1:16 AM
morn y'all
 
 
3 hours later…
3:49 AM
is there a way of uniquely identifying a client with 100% certainty that it will always be the same?
unlike IP adresses that can change, is there some serial sent via a request that i can use to identify the client?
in express
 
hello, anyone here is software developer javascript I have a question
 
that's what this chat's for
also, you don't need to ask to ask
just ask away
 
@JacobSchneider unique and 100% certainty?
sounds pretty hard
 
@phenomnomnominal yea, I know, would I need some client-side script to add a MAC address for example?
 
don't think you can do that from the client
well, not from a browser client
 
3:58 AM
Is there no way get the MAC address? or some serial?
 
I mean, you could google "browser fingerprinting"
It's a whole big thing
but this kinda feels like an XY problem kinda deal
why do you need this?
 
I'm trying to build a portal that only people who are whitelisted can access, so for example only staff working at XYZ from computer DEF can gain access. I just don't want to use a password.
 
4:54 AM
Hi all I am getting error saying react component missing can someone please help me here -> stackoverflow.com/questions/51233621/…
 
5:13 AM
is anyone here active with rxjs and maybe redux-observable?
 
5:48 AM
Hello folks, what is a tool that would generate jsdoc comments in my source code?
Ah, never mind...got it...
 
/shrug
 
6:12 AM
I'm in trouble
I forgot to make the coffee last night for this morning
so now I'm coffeeless
 
6:27 AM
do you not have a coffee machine at work?
 
sure, but it takes a credit key to get one
I don't have one because I always bring my coffee to work with me :(
 
what do you mean with "credit key" ?
 
well the machines take these little plastic key things which have credit on them
they won't take money
 
so you have to pay to get coffee? o.O
 
yes ._.
 
6:34 AM
it is freeeee here
I do not know any companies so far that expects you to pay for coffee. Soft drinks sometimes yes. I have worked for 3 so far. All of those offered coffee and water for free
 
Well, I suppose here the culture is a little mroe "factory worker" than anything else
you can get water from the tap, or bottled water for 50 cents
and coffee for 30
You're right, it's silly, but here the tendency is to charge for every little thing, however stupid it might be
I get it, it's a cost so they need to be reimbursed for the cost of things, and that system allows you to be charged according to consumption
but it's also a little demoralizing.. nobody's hogging bottles of water
 
Did you have thought to get a coffee machine at your own and make a fresh one when you arrive at your office?
 
I'm pretty sure they'd frown on that
 
what's wrong with it? you only consume their electricity...
 
also not sure if a coffee machine might do to the power grid, and I'd hate to be the cause of roughly 200 computers turning off all at once
yeah, well, you'd think so but no
they have preference where you spend your "coffee break"
I can't wait to be able to start working directly from Turin
I'm sure they're a lot more lenient in a smaller office
 
 
2 hours later…
8:20 AM
NEOARES!
yesterday, I ate some jamon's. seems just a spanian version of parma ham
 
8:43 AM
parmaham sounds like the name of a city
 
Good day everyone
I have a small question about iterating over ES6 map entries.
const mapOfThings: Map<ThingIndex, ThingValue> = new Map();
return Array.from(mapOfThings.entries())
  .map(thing => {
    //
  });
Is it possible to destructure thing during each iteration, so that I wouldn't need to reference objects inside through indexes?
I've tried to do .map((const [index: ThingIndex, value: ThingValue] = thing) => {, but it doesn't compile
Anyone?
 
9:14 AM
this room is like a desert since that "SO is unwelcoming" drama
@Eugene Map has a .forEach btw
 
I know about .forEach. I would like to skip additional variables for aggregation. With .forEach as far as I can tell, I can't avoid using additional variable for storing before returning. The way I wrote, I can return .map result right away.
What drama? I haven't been for a while here.
 
the thing is an array of [key, value]
mhm lemme think
 
Statement about array is correct and sure thing, think. I am doing same as well.
 
did you have tried to map it into objects?
like .map(el => {return {key: el[0], val: el[1]}}).map(o =>// use o.key or o.val
seems a valid workaround until there is a better approach for now
 
Hey guys. giphy API is down again, does he know?
 
9:25 AM
@Squirrelkiller the bot's giphy thing uses rlemon's proxy
 
Let me rephrase.
Hey guys. rlemons gateway for Cap's giphy command is broken again, have you pinged rlemon already or should I do that?
 
@rlemon ^-- squirrel needs to meet a moose
 
Because usually I ping him, but lately Frendall came over and told me to shut it, so I thought I'd look in here whether you did it already.
I'd love to meet Sam Winchester, he's awesome
 
@KarelG How sad that I get that reference
 
should I be happy that I don't?
 
9:38 AM
Well, young maybe
happy, I don't know, probably not
The Adventures of Rocky and Bullwinkle and Friends is the blanket title for an American animated television series that originally aired from November 19, 1959, to June 27, 1964, on the ABC and NBC television networks. The current blanket title was imposed for home video releases over 40 years after the series originally aired and was never used when the show was televised; television airings of the show were broadcast under the titles of Rocky and His Friends from 1959 to 1961, The Bullwinkle Show from 1961 to 1964, and The Rocky and Bullwinkle Show (or The Adventures of Rocky and Bullwinkle or...
 
I hoped that nobody got that reference :P
maybe rlemon would
 
> originally aired from November 19, 1959, to June 27, 1964
O-O
 
Good day
 
Wasn't that around the time where the wheel was invented? :3
 
How to convert this to 2 numbers only in javascript?
22.22234151
I want to output like 22 only
because I'm computing age
thank you
 
9:40 AM
Math.trunc
!!> Math.trunc(22.22234151)
 
@KarelG 22
 
Oh thank you sir @KarelG
 
or do something geeky
 
I saw it from reruns
 
!!> 22.22234151 << 0
 
9:41 AM
I'm not that old
 
@KarelG 22
 
!!> Math.floor(22.22234151)
 
@geisterfurz007 22
 
@jsonGPPD function convertTo2Digits(num) { return 10; }
 
Difference between floor and trunc is the behaviour for negative numbers, right?
 
9:42 AM
yes
 
Good, good! I understood something, it seems.
 
the << 0 trick works either with negatives
@Neil same here.
the animation drawings seems old tho
they did it better at The Flinstones
I was surprised when it was from '60
 
I didn't realize flintstones wasn't meant for kids (or at least not directly) until later
 
is there a nice way to make the root of a module async, so you can await require('...')?
 
it was supposed to be a "show for the whole family"
 
9:47 AM
ran into a thing where the way I define database models is asynchronous, and the models module returns a promise that resolves with the completed models object
but I wouldn't want to need to wrap all other modules that use the models into a .then or async () => {}
 
that goes against the nature of modules ...
 
you can always convert from async to synchronous
it's better to get an asynch response
 
I see a problem tho.
if you await on require, then you are stalling the process of statements after that
I don't like it
get your module and await in your functions ...
 
well, I'm just going to separate the async and sync parts of that module, and return them as separate exports
the async parts are actually database queries, the sync part is just mapping some schemas from require to a bookshelf model
what I will mostly want is the schemas anyway. I had it all in one because it was less code to write
 
I having some problem in getting an age
here's my code that works with onchange of the input date
retrieveAge(dOb) {return Math.trunc((Date.now() - new Date(dOb)) / (31557600000));}
this works fine on my onchange
 
10:01 AM
@KarelG so the correct one was
 
@Eugene Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
const mapOfThings: Map<ThingIndex, ThingValue> = new Map();
return Array.from(mapOfThings.entries())
  .map(([ivalueObject: ThingValue, indexObject: ThingIndex]) => {
    //
  });
 
@Eugene TIL.
 
When when I want to try to my age from api, it doesn't work
 
tried it without brackets :D
 
10:02 AM
Same thing
 
this.retrieveAge(response.data.dob); it doen't return age but number 0 only
 
31557600000 ...
 
2018-12-31T00:00:00
this is the sample from my api but it doesn't work
 
what is that 31557600000 ?
 
It's for date I guess I just saw from google and it works on my onchange
I'm receiving the correct age
 
10:04 AM
!!> 365 * 24 * 60 * 60 * 1000
 
@KarelG 15768000000
 
errr it must be 24 instead of 12
 
@KarelG 31536000000
 
that is not even close to your numbers
you need to get the age differently since there are leap years ...
look up for age calculation algorithms
 
But my concern is, the format I guess
 
10:06 AM
Hi guys
 
Why this code doesn't work:
 
the format to return it as age properly
 
using - will call .getTime so ...
 
1 message moved to Trash can
@Boypro Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
10:06 AM
you need to subtract the years first
then look at the month
and then day of month
 
@CapricaSix That is so cool ._.
 
var butt = document.getElementsByClassName(".Butt");
butt.addEventListener(
  "click",
  function() {
    alert("Hi");
  },
  false
);
 
> click dat butt
 
I know I know, it's a funny name.
But what matters is why it doesn't work.
I linked my html file with this
 
I think the name matters more
let's talk about the name
buttons are usually shortened to btn
 
10:10 AM
<script src="Elements Selectors.js"></script>
 
use kebab-case for file names, not Pascal Spaced
 
Kebab case?
 
PascalCase and camelCase for file names are also sometimes acceptable
but spaces will ruin your experience with a lot of editors
@Boypro kebab-case
that's what it's called
 
Oh I guess it's a name that is joined by "-" or "_" like url, right?
 
urls can have spaces in them
it's just not usual
same for files
 
10:12 AM
that's called kebab case? TIL
 
It still doesn't work.
 
kebab is specifically all lowercase with -
@Boypro oh, I'm not trying to fix your code
not directly anyway
 
@Boypro So check that the page is including your js file
you'd know because if you can view the file using developer tools in your browser, you included the file
 
either way, if you have standard variable and file names, it will make people more likely to help you
 
then check that you've got Butts on your page
 
10:14 AM
Yes, it includes it.
 
the code seems fine to me
 
@Neil it ain't
 
@towc "it should work" is what I meant
 
I know it may not help but I edit with VSC
 
getElementsByClassName('.something') is pretty much querySelector('..something')
 
10:15 AM
A random information but it's ok
 
that's likely where your error is
what bothers me is that if that's the case, you should have had an error
and you didn't tell us about it
 
oh, you're not using querySelector
 
@towc wait, if querySelector is better than get... then why they didn't make it obsolete?
 
in querySelector you'd use .Butt
 
@Boypro it's not better
 
10:16 AM
But there are no error.
 
it does something different
 
getElementsByClassName takes the name of the class, (so Butt, not .Butt)
 
I think that querySelector makes a nodelist
 
towc is right
 
also getElementsByClassName returns an array(-ish), not an element
 
10:16 AM
while get... gets the first element?
 
^^
 
Close.
 
you are trying to bind event listener on a collection
 
I didn't know that.
 
I don't understand how that doesn't give you an error
 
10:17 AM
I use EShint btw
 
@towc it should. He did not tried it in browser tbf
@Boypro does not cover DOM functions
(if you meant ESlint >.> )
 
I mean EShint
It's like ESlint
 
why not just eslint?
 
ESlint gave me an error.
No configuration bla bla
 
just to be clear: your lack of standards is making it hard for people to help you
 
10:20 AM
so I unistalled it and installed EShint
 
between file/variable names, and now a different tool
 
can you link a webpage of that EShint package?
I could not find it.
 
@Boypro well, then get some configuration
 
I tried but it still returns me an error
ESlintconfg or bla bla doesn't exist
It annoyed me so I said screw it, and I installed EShint
I know it's worse but I don't want to deal with errors
 
@Boypro well, you did wrong
 
10:22 AM
Why?
It returns "btn is null" in dev tools.
"The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol."
 
@Boypro that's not a return. That's an error
@Boypro you need a meta charset tag
but it shouldn't affect your js stuff
 
towc, I suggest to ignore him. He is either trolling or talking nonsense.
 
4 mins ago, by towc
just to be clear: your lack of standards is making it hard for people to help you
@KarelG just seems like the next self-entitled idiot. I think I used to be like him
someone should have given me a beating. I'm happy to provide the beating for this one
 
nah you were a stubborn know-it-all fool that we sometimes love today <#
 
what, troll?
Why I am a troll?
Do you even know what is the troll?
And "idiot"?
Do you even know what is the noob/beginner?
 
10:27 AM
@Boypro welcome to life. Deal with it
 
If this wasn't a respectable room, I would have said some word that is bigger than your heads.
But I won't go down to your level.
 
@Boypro we tell you things, give you reasons, but you decide to ignore them without another compelling reason. That's being an idiot
 
ignore them?
 
@Boypro this is not a respectable room
 
I applied everything you said to me.
Meta tag
btn
Query selector
 
10:28 AM
ok, great
you gave no indication of it
how about eslint?
you can use eshint, but you can't expect people to help you out with that
 
why?
 
because almost noone uses it
 
What, are you serious?
 
eh towc
 
I found 1 million downloads in VSC extensions
 
10:29 AM
and you don't have a compelling reason not to use eslint, other than your laziness, which also doesn't make people want to help you
 
I could not find anything on ESHint
so I asked him for a link to the project
 
@KarelG don't look on npm
 
"laziness"?
I fucking researched in google for 3 hours.
 
Gave up and replaced it.
 
10:30 AM
8 mins ago, by Boy pro
It annoyed me so I said screw it, and I installed EShint
 
checked among multiple package managers. Even tried in composer
 
wait a min
 
huh must have died off
jshint was definitely a thing, but I thought eshint was too
 
neh. I was thinking at jshint first
 
hi, am having one doubt that is not related to technical.. shall i ask?
 
10:32 AM
but he did not even correct himself
 
Yep, it is jshint
 
@worstCoder feel free to ask
 
But there are little to no different honestly
 
...
 
ES = JS standard I guess
 
10:34 AM
yeah okay.. one of my friend got chance to go gulf country for UI dev postion , and he's having 3 yrs of exp. employer ready to provide package in USD for monthly or year based. how much should he ask?
@KarelG and others also pls share your thoughts..
currently he is getting 5 lac INR pa.
+ addtional info. he's planning to go with his family
 
i am not familiar with curreny from india (?)
 
no issues.. just share your thoughts
 
best to look at expenses first: average value household + margin
 
time of experience isn't much of an indicator anymore, when it comes to javascript
it's certainly an indicator, but not as relevant as in other careers
 
then subtract the net salary with that. And see if the remainder is sufficient enough for other things
 
10:38 AM
ho okay... ll suggest him this things to consider
 
or you can lookup for average salary in IT in that country if there are statistics
 
yeah i tried payscale.com we had some clear picture about package locally. but converting into USD. no idea
 
10:52 AM
just look at exchange rates?
 
nope.. let me try
 
@towc how can I convert \xF0\x9F\x91\x8D nicely ?
 
Finally I fixed it!
No thanks to you.
 
@KarelG you should know not to ping me :P
but if there's no other text I'd .split('\\x').map
@Boypro did we claim to be professional?
 
11:08 AM
Where's ignore option?
The mods were right.
 
@Boypro you realize you're not making it easy for yourself to get more help later on, right?
 
I should have ignored from the first time we met.
Dude, I don't need help anymore.
 
great
why did you remove that?
it was glorious
nvm
 
Yeah chat flags, 10K users validated that, please stop and let us do other stuff
 
11:20 AM
@towc I am just curious at the character behind it
is it an emoji? or just a character from UTF16
 
behind?
the ð?
oh, you mean the type of data those things represent
where did you get it from?
doesn't look like standard unicode
f09f is part of the private charset group
and f09f918d is nothing
might be some other kind of raw data
 
πŸ˜€ is U+1F600
how do you get the first when you have 'U+1F600'?
there is a trick but I forgot it
 
the first what?
 
the emoji itself
@KarelG either way, you can look it up here: unicode-table.com/en/search/?q=1f600
 
I'm so confused
 
11:30 AM
your codes don't seem to have a meaning there
 
well kendal. Let say s = 'U+1F600'
how can you make it that it displays πŸ˜€
 
Well in JS you'll need to use UTF-16
Are you asking how to convert UTF-32 to a JS string?
 
well, you can do eval(\u{${hexcode}})
 
yes, because I got an error mail about "invalid character" \xF0\x9F\x91\x8D
but I do not know if it is an emoji or one of those UTF 16 characters
 
so eval('\u{1F600}')
@KarelG looks like nothing to me
the fact that the first half-byte is all 1s suggests it's not utf, if I remember correctly
 
11:34 AM
@towc why eval?
 
@KendallFrey if you want to do it programmatically
given a variable s = 'U+1F600'
 
aaaah
figured it
 
eval(`\u{${s.split('+')[1]}}`)
 
πŸ‘ is the character behind \xF0\x9F\x91\x8D
 
how?
 
huh
 
input type is hexadecimal (if you do not know which one to pick)
 
@towc pretty sure you're gonna need extra quotes
 
@KendallFrey sure
 
aaah now i remember
I added \ manually then used repl and then that decodeUriComponent
!!> decodeURIComponent('\\xF0\\x9F\\x91\\x8D'.replace(/\\x/g, '%'))
 
11:45 AM
@KarelG "πŸ‘"
 
hello :)
 
@Mohammad 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.
 
how do you type the unicode emoji in chat? or do you copy paste them?
 
@Mohammad Hey, welcome!
 
i use an extension πŸ™‚
 
11:54 AM
@neil i have an issue in my java script code , but i'm not sure how to ask it with all details needed :D
 
it depends of how much detailed details is :P
 
@Mohammad Well do the best you can. There is www.jsfiddle.net that could help you prepare a simple example of your problem
 
@neil oh i forgot i can use jsfiddle , thank you :)
 
( β€˜-’)δΊΊ(゚_゚ )
 

« first day (2823 days earlier)      last day (2143 days later) »