« first day (3266 days earlier)      last day (1906 days later) » 
00:00 - 18:0018:00 - 00:00

00:17
your
 
2 hours later…
02:12
morn
 
4 hours later…
06:42
hola
06:53
hmm sublime text has an odd font change with py scripts
which one is the l in lower or in upper case? 🙂
how to convert infintie-html to characters ?
https://jsfiddle.net/rhcaz4j0/
07:10
"infintie-html" = ... ?
I mean this: »
you have to roll the text through a DOM parser. Use DOMParser api for that.
I did, thx
07:26
thank you buddy, just out of curiosity, what are other kinds of 'text/html' ?
it is described in domparser API doc (check mimetype)
oh very good .. thx
08:19
@KarelG lowercase first
It's more rounded
yup. It is not obvious if the upper case is not there. :P
I thought that it was an upper case until upon execution, there was a syntax error. I was like "whaaa"
08:49
dev.to/ronakpatel70/… this is probably one of the worst comparisons between React Native and some other framework... No numbers, no sources, plain wrong statements. What a shame.
> React Native focuses on “Learn once, write anywhere”. It aims at developing high performing applications with an appealing user interface. With React you can create amazing UI for every platform. NativeScript focuses on “Write once, use anywhere”. This means the codes will be written once and then you can have running across the different platforms. At this point, NativeScript wins over React Native.
They have different aims. How can one win there?!
wtf
@geisterfurz007 you're right lol
So it's not just me? Very good.
> First, "So would have been the AirBnB project gained with the NativeScript?" is not a question, I'm not sure it grammatically correct either.
Solid comment :D
09:05
> Here the source code is written in JavaScript, and so there is no need to compile the code every time a change is made and this way it is possible to boost productivity enormously.
eh visited his business site
> Aglowid IT Solutions is the globally recognised React Native App Development Company
tbh I never have heard of it.
It's globally recognised!
You HAVE to know it!
@KarelG Straightup no clue what the shit he is writing about :D
at the bottom, there is a label
"top web developers clutch 2019"
Checked their site aaannd... could not find them (directly?)
hmm nvm
09:36
I'm currently working on user import via npm's [activedirectory](https://www.npmjs.com/package/activedirectory) (which uses ldapjs) and calling [findUser](https://www.npmjs.com/package/activedirectory#findUser) which, according to their docs, returns by default the following attributes:
userPrincipalName, sAMAccountName, mail, lockoutTime, whenCreated, pwdLastSet, userAccountControl, employeeID, sn, givenName, initials, cn, displayName, comment, description. I do need addtional objects to be retrieved (i.E. 'uid' & 'isLocked') - Anyone knows how to override/extend the default attributes?
Formatting doesn't work in chat when you got a linebreak in there :c
Is it safe store a json in a const? That const values are going to be stored as additional data in the database. But I wont allow the possibilitie to be modified from the client from the browser console or something, is it possible?
10:25
@SilverSurfer It totally depends on the scope, the variable is in. If you declare the const in the global scope, its easy to read and write. Try to wrap a function around and you are almost safe.
@Launemax 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 can I deal with this?
if (whatever) {
    const test = "value";
} else {
    const test = "";
}
 console.log(test);
@SilverSurfer Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
"test is not defined"
@SilverSurfer use let or setup that if/else block in a function
10:36
1 message moved to Trash can
@Launemax Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
1 message moved to Trash can
@Launemax Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@CapricaSix how does this work?
Hello guys, i am looking for a application/website to host my website for free. A couple months ago i found this app/website and now i can't remind myself. Link of hosted page included name of this app/website. Maybe do you know any app/website to share my page for friend/client?
@jaro0 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.
@KarelG It gives the same result undefined
Launemax select the code and hit CONTROL + K
An If-Statement doesnt change the scope. You need a function for this. It's hard to inspect variables inside a function.
Example:
(function() {
const test = "value";
console.log("Inside the function you can access your const.", test);
})();
console.log("Outside, your const is undefined", test);
but then everything is a code :(
10:40
@jaro0 that depends entirely on what you require from the website
do you need a server, or is a static page enough?
do you need database services? storage?
Hey guys.
Do you know id its not possible to use spread operator in vuei18n
My probleme is that I have an argument which is not required
And I'd like to do something like
this.$i18n.t(`gallery.invites.mail.public.${this.name ? 'named' : 'anonymous'}`, {...this})
With (this) being either {userName, name} or just {userName}
@Baldráni You can parse the name as variable and switch the name string to "", if its anonymous.
this.$i18n.t(`gallery.invites.mail.public.${this.name ? 'named' : 'anonymous'}`, { name: this.name ? this.name : '' })
Hum yeah, well null would be more appropriate I think but yes :)
Alternativly you can wrap it around an if statement and call different translation functions ;)
10:49
Something like { name : this.name || null } is not such a bad idea I guess
may also work, yes
Alternativly haha But I want to avoid a bunch of if if I can
The thing is I've gave you the simpliest case
But I've got sometime much more args
but it will eliminate the if inside the translation key ;)
But yeah you've pointed out that if spread is not working this is probably because vuei18n is waiting for something in the shape of
{name: this.name}
if(this.name)
    this.$i18n.t(`gallery.invites.mail.public.named`, { name: this.name, foo: "bar" })
else
    this.$i18n.t(`gallery.invites.mail.public.anonymous`, { foo: "bar" })
10:52
Would there be a way to do destruct + spread 🤔
Something Like const arg = {userName, name} = this
And then use it like {...arg}
Actually it expects the second parameter to be an object. Try to use this as second arg.
I will ask it later
Who ?
Vuei18n ?
@SilverSurfer your question is already answered ;) check out the link i sent to you
So basically it cant be done in the way I was doing
10:59
@SilverSurfer it can, but you have to wrap your whole code inside a function, so nobody can access your private variables inside the function.
declare the conts after if else with a var value?
If/else is not a function. You need a function, a function! :D
Checkout my code: https://chat.stackoverflow.com/transcript/message/47396945#47396945
It doesnt need to be a function, it does need to be a "block"? And a if is a block
@SilverSurfer Sorry, i can't help you with your problem anymore. I gave my best :)
11:10
Just to get back to what I was saying :

Is there a reason not to do $i18n('message', {...this}) (Except for explicitely deisplaying props)
And why does is not works
Ho I think I know !
We want to have the syntax : {arg: arg} => {arg}
But when I do
const test = {test: "yolo"}
const args = {test, wtv} = test
console.log({...args}) //{test: "yolo"}
@SilverSurfer I suggest you have a good read on function and variable scopes, you seem to have a slight misunderstanding of the concept in general. A good exercise to get acustomed to a paradigm is to play around in jsfiddle or stackblitz a bit - good luck & have fun ;)
yeah, but this maybe contains functions and so... you can't spread this. But you can put the full "this"-object into the translation method and grab the property you want inside the translation key, can't you?
@All hi
If only I could
No its not working
I should be able to use it without spreading args and only destructuring this
But still I've got some kind of bug
For now I'll go with simplicity
Maybe I'll come back to this funny thing latter
ok. sorry :)
@SamSam hy Sam
11:29
Well after all I'm not giving up
Is there a better syntax than this
{name, publicLink, ...(this.userName ? {userName: this.userName} : null)}
Likely, is there a way of doing userName || null in an object ?
but "null" can't be spreaded
Why not like this:
{name, publicLink, userName: (this.userName ? this.userName : null) }
This is exactly why you would use spread
{name, publicLink, userName: (this.userName ? this.userName : null) } // {name: something, publicLink: something, userName: null}

{name, publicLink, ...(this.userName ? {userName: this.userName} : null)} // {name: something, publicLink: something}
hmm.... use "undefined" instead of "null" ?
generally null is better than undefined, just because you know you set it
i have a textArea and im assigning it some template value in javascript
like below
var template = "<b>Header</b>: This is header \n
<b>Main Content</b> : blablablablablabla \n
<b>To Whom:</b> To {EmployeeName}"
but the html tags doesnt reflect.
is it possible to do the way im doing?
11:49
@SamSam "\n" doesn't translate as you'd think in a html document
it is a newline in the html, but as you know, html is an encoding, not a literal text to show on the page
you need to use <br /> whenever you'd use \n to actually show a line break or wrap it in a <div> tag instead
probably preferable the latter
@Neil ok, but other html tags as well are not reflecting like bold, italic etc
@SilverSurfer understanding scoping is important. Just do
let test;
if (whatever) {
    test = "value";
} else {
    test = "";
}
console.log(test);
or
@SamSam textArea doesn't show html
just text
const test = getTest();
console.log(test);
and do your if elsies there
(you can use IIFE but it is not a clean hack)
then </br> is also not working
11:54
@SamSam Consider instead using a <div> with contenteditable set to true
@SamSam <br /> would work if it were html you were adding it to. textArea content is a bit different
@Neil but then again the thing is i need this data posted back to the service, so my framework will add that to formData for post if i use div.
@SamSam I don't think the content in the div would be considered at all if it weren't an input of some kind
you need to take an additional step on submission that takes the text content and puts it in a hidden textarea
or the html content if you can handle markup
@Neil ya, thanks
12:03
or you don't deal with markup in your textArea and done
your pick.
no actually my requirement is to have the markup
as what im displaying is a template.
then yeah, I would go that route
it complicate things a bit, but it's the best effect for the client
@Neil to have div?
yeah, editable div
@Neil ok thanks
12:24
@KarelG in todays edition of "bad code examples because I can"
const test = "";
if( whatever ) {
  test.padEnd(5,"value");
}
😉
@SamSam If you want to assign multiline value, use backtick `
var template = `<b>Header</b>: This is header
<b>Main Content</b> : blablablablablabla
<b>To Whom:</b> To {EmployeeName}`
this will work
var template = "<b>Header</b> \
<b>Main Content</b> \
escaping new lines is so 1999 and I love it";
this.http.get(url).subscribe((data)=>{
console.log(data);
response = JSON.parse(data)
                      ^^^^
                 VS Code shows some error
});
"some error" is literally useless to say
tell us the actual error
It underlines it in red
12:30
hover it
And the error pop up isn't working in it
I have the latest edition and the pop up blinks and then never come again
ctrl + click on data takes to subscribe((data)=>
Probably a typerror of some sort?
subscribe((data: string) =>
@Cameron that was it.
I need to change some of my practices
@rlemon @SagarV tried both the solutions but it did not worked
no
those would not solve your problem
12:43
@rlemon hmm I would have used a ternary operator but that does not change test me thinks
padEnd and padStart edit in place
one of the few string methods that do
!!> const s = ''; s.padEnd(3, 'lol'); console.log(s)
@rlemon "undefined" Logged: ""
well fuck off you ruined it
!!> const t = ''; t.padEnd(5,"value"); t
@KarelG ""
12:44
I swear it edited in line in my test
:(
console returns does not count
I know
I would be sad if it really did the change. const is const.
you're a dangerous boy
giving me some insecurity
😬
oh you want to render the html
hello
12:49
@KarelG const doesn't mean it can't change itself. just means you can't assign a new reference. a boxed string would have no problem updating its contents
@SamSam In that case, use ckeditor or any wysiwyg editor
I found a dark mode that works on every site
Didn't Samuel Liew make one?
does his work on all sites?
why couldn't you lie to me, I felt special
@StephanS I'm sorry ._.
which only targets stack exchange network sites
not "all sites"
Oh!
I thought that was the topic
I am sorry then
the one I linked is his 'general for all sites' script
which is pretty weak imo.
not that it's an easy task
@StephanS yea those are slightly better
inspecting the sites colours and toggling the high brightness ones
but it's still not perfect
colour themes are not easy
I understand the problems with it, but could you make a filter that changes the color base on it's color code range?
so instead of changing the colors on the page you just put a filter over it
what would that solve instead?
Idk, I'm a f***ing idiot
well isn't the problem that you have to know the website's structure to make the dark mode?
Why doesn't the following work?

for(let i = 1; i <= n; i++) { if(somethingHappened) { n = 1; } }
13:09
because it still lives in its parent's basement
does it mean the variable is being shadowed?
define "doesn't work"
No, it was a (subjectively) bad joke :)
@rlemon If "n" is set 1000 and the condition resolves to true then it should rather start from 1 again and exit
so it works. just not how you expected it to work
13:12
the current code will produce exact same result as using a break;
do you mean i=1 within condition?
@rlemon I thought it's issue with for loop but rather it's with PHP I think. sorry :)
how does php? what?
It doesn't work for me in this case as I just tested on PHP
for($i = 1; $i <= $n; $i++) {

      $res = ($i % 2);
      if($res === 0) {
        $startsRepeating = $this->plantBombs($grid);

        if($startsRepeating) {
          $n = ($n % $i) + 1;
          $i = 1;
          $this->firstGrid = false;
        }
      }
      else if($res === 1) {
        $this->detenoateBombs($grid);
      }
      echo 'n : ' . $n . ' i: ' . $i . '<br/>' ;
    }
np
Well, you're welcome, i'm glad we could help
I'm not saying send a check but I'll be waiting by the mailbox.
13:46
> clean code
> php
> echo '<br/>' ;
right? it's 2019, almost 2020
should be echo '<br>';
php stands for "please help php"
plehp
@ndugger Do you know the term "Debugging"?
:D
php is a bug
13:58
so as you :D
no, I have a bug infestation; it's not the same
PHP|Java is bad
_writes JS_
None is bad unless the developer is bad at
no they're all bad
most programming languages suck
everything is bad and life is meaningless
14:02
they're getting better
but they're still pretty bad
Remember js before lambdas
and await
Pepperidge farm remembers
and fetch
JS was one of the first languages I used
Bruh, people still aren't using fetch
14:02
back in 1998
Makes me irrationally angry
People like node
lol
> node sucks
_writes Ruby_
none of us have a leg to stand on
@rlemon Everything is bad at first but with time it improves
none
14:03
qbasic was my first language
The justification usually goes, "Well, IE11 doesn't support fetch, and I don't know what a polyfill is, so let's pull in a third party library called axios"
@Cleancode incorrect. water has always been perfect
No everything is bad. Once you use something enough, you become intimately aware of everything wrong with it
it's a curve. you know nothing about it, confused, know a little about it, amazed, know a lot about it, disgusted.
THat's how I feel about classic mechanics in physics
and I barely know anything
14:04
@rlemon :p
/r/hydrohomies
I listened to a joe rogan podcast, so I'm basically a subject matter expert
it's entirely possible
@Cereal That's the very reason people don't understand
Language barriers are the best
14:06
Oh no, you don't have to use php to know it's bad
Just look what happened to ikari
I have a JS file in an npm package that I can't include in my front-end build because the production build minifies it, which breaks functionality.
if you're going to argue JS is 'good' or 'better' now because you're narrowly looking at modern code, the same is true for PHP.
old JS was and is terribad.
old PHP was and is terribad
I still hate js on the server
Is there a way to either make it so this particular file isn't built without using the excludeFile (which makes it so I have to specify includeFiles)
That goes against my personal narrative, and is therefore wrong
14:09
> the production build minifies it, which breaks functionality.
fix that
don't bandaid it
minification shouldn't ever break your code.
It's not my code :(
There have been a few ES proposals as of late that make me want to abandon the language entirely, most notable globalThis
submit a PR
I find myself more and more just fixing the library instead of banging my head against it
It's an npm package. Which while maintained, isn't maintained frequently enough that the PR will be merged before I'm supposed to deliver this functionality
Private members got fucked up as well
14:10
See you say that
But that last PR I made was on a project which last update was 10 months ago
Maintainer replied in less than an hour
I'll see what I can do, I'm just not very hopeful.
@Cereal yea, I commented on an issue that was like 3 years old on a repo that hadn't been touched since node 4
within 2 hours the author replied
it's nice that it goes directly to their email :D
if they enabled it :P
or not filtering away
 
2 hours later…
16:49
0
Q: Padding is not being applied equally

Ike EvensTop and Bottom Padding on a div is not being applied equally. However, when you change the size of the browser window the padding is applied equally. I've added padding: 50px 0px; on a div but it is not being applied equally. div.banners { padding: 50px 0px; margin: 0px 0px; background-color: #...

17:06
> My dear, if I understand your doubt, do you want to pad down? If so try to use too;
Google translate oof
ahh it was edited
the original source on the question is very 1990's
just... why?
I know, I'll edit an almost 5 year old question that has no answers and last commented on in feb 2015 :D
Must be a slow day for him
nahh, he botted that
I thought robo edits were shunned
@Cerbrus @KevinB ??
It still can be possible use the 90´s theme of stack overflow? It was used on april fools right?
user8729657
17:24
Hey @rlemon, do you know any thing about VOIP services I can implement? This stuff is currently selling like hotcakes in Africa.
Nope
user8729657
:(
@Cerbrus I thought robo moderation was frowned upon
Yes it is... Not sure why I'm tagged?
17:28
because you know the ins and outs of the site so I asked you
but next time I'll not ping you, sorry
ooh that's why
I'm not sure I see the problem with that edit?
psa: I get almost all of my (small enough) rep from one answer
!!stat
it was automated.
@forresthopkinsa You (https://stackoverflow.com/users/2172566/forresthopkinsa) have 653 reputation, earned 10 rep today, asked 6 questions, gave 24 answers, for a q:a ratio of 1:4.
avg. rep/post: 21.76. Badges: 0g 14s 21b
the edit itself was fine
17:30
Oh, I thought you meant robo reviewing... as in not paying attention
I'm not sure what the policy is on automated edits.
I thought I read before that bots doing reviews and edits were bad
but I can't find anything on meta (not that meta search is particularly useful)
I don't recall reading about it... You could poke him in the SOCVR though
Eh, as long as the edit fixes most of the problems with the post, it’s fine
I mean, I'm not going to ask the guy who runs the bot if he thinks running a bot to do that is okay. I'm sure he thinks it's fine :D
in my opinion it's entirely illegal
17:37
and the edit itself isn't bad
I just thought bot edits were frowned upon
hence the question
Nah, pretty sure this specific case is very much allowed
What makes you think it’s a bot and not a browser extension automating pieces of it, but still ultimately controlled manually
This user has been doing this for a long time
Fixing old images, bad links, etc
@KevinB the "what does it do" in the gist calls it out as an automated process.
and he has people reporting false corrections
!!stat
@KevinB You (https://stackoverflow.com/users/400654/kevin-b) have 87601 reputation, earned 16 rep today, asked 7 questions, gave 2313 answers, for a q:a ratio of 7:2313.
avg. rep/post: 37.75. Badges: 13g 146s 163b
I got my rep from many answers
Mostly jquery
17:42
pretty sure most of my rep is from css answers
user8729657
17:54
I got to work on my rep, it's hard to get rep lol
eh
!!stats
@rlemon You (https://stackoverflow.com/users/829835/rlemon) have 14152 reputation, earned 68 rep today, asked 72 questions, gave 387 answers, for a q:a ratio of 8:43.
avg. rep/post: 30.83. Badges: 10g 82s 117b
got 68 rep today by writing like 10 lines
user8729657
Nice
00:00 - 18:0018:00 - 00:00

« first day (3266 days earlier)      last day (1906 days later) »