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

6:07 PM
answer 1 question a day, any question
after a year or so you'll just have passive rep coming in all the time
i earned 16 rep today doing nothing but casting downvotes/closevotes
 
user8729657
Lol
 
my most downvoted question got downvoted again today too
doesn't matter
 
I've had a pretty good day today rep wise
one of my four "ohh I guess I'll go on main" a year days
 
Finding a question to answer is hard
 
6:14 PM
Javascript is confusing
!!help
 
@PremRamman Information on interacting with me can be found at this page
 
no
 
how do i run code here ?
!!/listcommands
 
@PremRamman help, afk, backup, ban, clap, convert, define, die, doge, eval, forget, google, hang, imdb, info, jb, jquery, juicebox, learn, listcommands, listen, live, mdn, meme, moustache, msdn, mustache, nudge, quote, refresh, spec, stat, stats, summon, tell, unban, undo, unonebox, unsummon, urban, weather, welcome, wiki, xkcd, youtube, zalgo, !, !!, $.baby, (4337654<<1)+1, (y), /somecommand, 007, 1+1-1, 111test, 2+2-1, 2020/07/23, 3, 666, :p, </pissing>, ?, ???, ^, ^5, abesnacking, abhi
abhishekpornfreak, acronym, afsari, agario, ah, ahah, algosmarts, aliens, alienware, alot, am, america,
 
user8729657
!!clap
 
6:16 PM
you ๐Ÿ‘ are ๐Ÿ‘ bad ๐Ÿ‘ at ๐Ÿ‘ this
 
user8729657
awesome!
 
!!sandbox
 
@Cereal Please go and play in the Sandbox
 
!!echo stop
 
HAMMERTIME!
stop
HAMMERTIME!
 
6:18 PM
How about we remove you?
 
"need"? why?
 
why would u do that ?
 
Instead of shit talking about the bot, how about you read the help page she so gracefully linked you.
 
let a = 5;
a.constructor; // returns Number()
a instanceof Number; // returns false
 
user8729657
I like the bot commands
 
6:21 PM
in a bit
 
If you wanna play with Cap, please go play in the sandbox.
!!sandbox
 
@Trasiva Please go and play in the Sandbox
 
yea no
 
user8729657
lool
 
!!ban 11376975
 
6:22 PM
rekt
 
@rlemon 11376975 added to mindjail.
 
that was so weird
That was like... really strange
 
meh
par for the course
 
Zoe
You have mail flags:tm:
 
yes
dealt with
carry on
 
6:23 PM
lol free advertising
!!backup
 
@BenFortune Donna Noble has left The Library Donna Noble has been saved.
 
gotta love that Dr Who reference :)
 
catherine tate nailed it
 
she did, but she's no karen gillian
 
overrated
 
6:28 PM
I actually thought she was quite a good cast... have you seen that comic relief sketch with her and David Tennant in the class room?
 
user8729657
You gentlemen are freaks
 
martha jones was the best companion imo. everyone loves Rose
but Martha did the best
 
bruh
billie piper
 
I just think Karen is gorgeous
 
yeah, but Martha was a member of Torchwood - more stuff to do stuff with
My personal favourite combo was Tennant and Piper
 
6:30 PM
unpopular opinion: eccleston was better than tennant
tennant was better than Joe Camel looking mofo
 
they were all good
 
eh, I didn't like smith
I liked his story lines
 
except what's his face
 
I didn't like him
 
paul something
 
6:30 PM
My favourite doctors are Tom Baker and Tennant, but I really, really, really, wanted Capaldi to work out, but apart from one/two episodes, the writing was just disappointing... he could have been so much better
I did like Clara though
 
yea clara was a good plot point
but matt smith bugs me
can't peg why
 
he's too quirky
 
@JonClements speaking of TW, is there any word of a [M|R]icky appearance?
Martha is going to be in the new TW reboot
 
in terms of assistants, I'd probably go for Rose, Clara, Donna, Martha... then everyone else can fill the next spot equally...
@rlemon don't know... haven't read up on it in a while... saw there were doing a new one and with the actress that played Gwen in it... then haven't checked since
 
Amy & Martha (tie), Rose beats Clara only because we didn't have as much character / story development. but the story we got was crazy. then Donna
but my god what I'd have given to have had a few eps with Brian travelling with the doctor
while rory and amy were off having kids or something
incredible actor they got to play him
 
6:36 PM
I stopped watching it at matt smith, how's jodie?
attack the block is hilarious
heh, she grew up in the town over from me
 
I stopped watching at smith as well when it aired. like 3 eps into season 9 now
need something to watch while waiting for letterkenny
can only re-watch all six seasons of that like 2 times in a month
before I feel bad about it
 
Eh, I'm not into it
lee mack though ๐Ÿ˜ƒ
 
He's always a good laugh
I quite liked Mitchell & Webb doing the voices for the robots in that Dinosaurs in space one
 
I'm not against a female doctor. but from the first 2 minutes of that.. she's not a good doctor.
possibly as bad as smith
 
6:55 PM
posted on September 25, 2019

Thank you to everyone who came to events on my book tour! If you weren't able to make it to any of my tour events, How To is now available everywhere, including at Barnes and Noble, Target, Amazon, local independents, and more. Some Barnes and Noble locations and indies have special signed copies, so you can check with your bookseller to see if those are available.

 
@rlemon oh, for me, it's not about gender... it was the same feeling I got with Capaldi being the doctor... I've no doubt in my mind, if they'd have had good script writing, things could have been different - they're both really good actors, but just got the feeling that what they had to work with was just not that great
 
yea. I didn't think anyone here had a gender hangup, but being the climate we have today I had to preface with that.
so far peter is meh
he reminds me a bit of eccelston
but not as cool
 
I quite liked him... but, if he'd have had the scripts that Tennant got for instance... I imagine I'd view him so much better - if that makes sense?
 
imo Tennant embodied the doctor the best
I still liked christopher eccleston better tho
 
yeah... he was definitely darker in a way
I did like John Hurt's portrayal of the "War Doctor" though
 
7:17 PM
I can't wrap my head around learning algorithms! someone help
 
I mean
you just read the algo
and learn it
if you didn't learn it the first time, read it again
 
Or just write an algorithm for a computer to learn it for you
 
I been. how many time? this is getting frustrating dude
 
meh
 
I'm doing leetcode ones
 
7:20 PM
@Farhad while(!working()){ read(); attemptFix(); }
 
I mean I solve them, but I don't get them. lol
 
Q: I made an a webapp using Stack Exchange api 2 years ago and hosted it on heroku. From that, while making post request to api.stackexchange.com, Chrome doesn't make the options request first to check cors.
 
Do you guys recommend Cracking the Coding Interview?
 
I rewritten it in Angular and deployed it in firebase today. While making a post request, Chrome makes the options request and api.stackexchange.com have the response header Access-Control-Allow-Headers set to GET and POST
why chrome doesn't make the options request on first one?
 
first what?
 
7:27 PM
3 mins ago, by Sagar V
Q: I made an a webapp using Stack Exchange api 2 years ago and hosted it on heroku. From that, while making post request to api.stackexchange.com, Chrome doesn't make the options request first to check cors.
This one
 
Options requests happen under certain specific circumstances. Most commonly, when you specify a content type.
 
Which I deployed to heroku, 2 years ago
 
ugh, I hate the grace period.
dude answered with a completely wrong answer
while I answered with mine
 
In the second one, I'm using http.post(url,data)
 
then he updated his
now his looks older
 
7:28 PM
Without knowing more about the requests in question, we can't really tell you why one did and the other didn't other than by explaining the rules that dictate when said request is sent, which is already well documented.
 
Wait. Let me grab the code block
this.http.post(url,payload).subscribe(
      (data:any) => {
          //action
        },
     (error:any) => {}
);
This makes an options request
The older one uses jQuery's $.post
 
This is angular right?
 
$.post(url_add, payload, 'json').done(function(data) {
                     console.log(data);
                 });
@KevinB yes
 
doesn't angular by default send data as json?
which... would mean specifying a contentType by default
and thus causing an options
 
guess so
 
7:32 PM
jQuery on the other hand sends form params by default
it will only send json if you give it json
and it won't set a contentType for you
 
Yeah. I gave json in it
 
jQuery > Angular
 
The second code is jQuery
 
Right, the second one won't set a contentType.
'json' is the dataType
different
 
whats the easiest way to emulate a promise taking some time? setTimeout for resolve?
 
7:33 PM
yes
 
What should be the content-type to avoid options? application/x-www-formurlencoded?
 
k thanks
 
aka, create a promise that takes some time
:p
the important bit is this under the "simple requests" section
> The only allowed values for the Content-Type header are:
application/x-www-form-urlencoded
multipart/form-data
text/plain
Anything other than those 3 will result in a preflight
 
@KevinB Why's your avatar a yellow triangle?
 
That's a downvote button
 
7:43 PM
Is it?
I thought the downvote button was grey?
 
I see what you did there
 
You don't click it often enough
 
0
A: How to render out the text of a Javascript console.log in the DOM?

rlemonusing Element.outerHTML you can get the entire script tag including contents as a string. <script> console.log(123); </script> console.log( document.scripts[0].outerHTML ); will log: <script> console.log(123); </script>

can someone confirm this is the only valid interpretation of the problem?
based on the comments: "When I console.log a created script tag, I see the full html of the script tag in the console. When I try to inject it into the DOM using innerHTML or innerText, I get the following in the DOM: [object HTMLScriptElement]" this is my interpretation of the problem. If this is not what OP means they can comment as much. — rlemon 2 mins ago
Why are you not liking this comment? Appears to be doing exactly what I want... I use outerHTML on my script tag and add it to a variable. var x = videoScript.outerHTML document.getElementById('injectedScriptElement').innerText = x — 4ndy 57 secs ago
okay OP spoke up
everyone else is just dumb
4
๐Ÿ˜ƒ problem solved.
 
o/
i don't remember why i changed it to this
but i did
and now it's this until hat season
 
That is trivial and for the demo only. The core issue is getting a string you can send to the DOM. But if that is your hangup I can edit the demo. Seems silly to focus on that tho. and that code absolutely outputs what I said it would. — rlemon 2 mins ago
lol
I'm pretty sure he's butthurt because I rolled back his edit that broke my answer
but w/e
 
8:04 PM
Build :
1 hr ago | Master #31 | commit : Almost finished
1 Min ago | Master #38 | Commit : Almost finished
lol
Isn't it still a valid syntax? data?.body
VS code is underlining the . , type of data is any
 
8:25 PM
has that chaining crap landed?
 
8:44 PM
?.
It has in typescript
so maybe
stage 3
 
8:56 PM
orly
i've been using lodash for those cases
 
Hello will changing the target array inside an for of loop with splice create chaos?
 
You mean, changing the size of the array your currently looping over?
 
Would a filter be better suited to do the job?
or a reduce?
 
I want to remove every 2 duplicates of the same value to be single one
I dunno
 
9:01 PM
If you're just looking to de-duplicate it, probably easier ways to do it
array of strings?
objects?
 
I don't think sqlite3 is async
its blocking my app
 
1185
Q: Remove duplicate values from JS array

kramden88I have a very simple JavaScript array that may or may not contain duplicates. var names = ["Mike","Matt","Nancy","Adam","Jenny","Nancy","Carl"]; I need to remove the duplicates and put the unique values in a new array. I could point to all the codes that I've tried but I think it's useless be...

function getDistinctArray(arr) {
    return [...new Set(arr)];
}
but to your original question... no idea
i tend to avoid doing that
 
I want to remove only the 2 following values that duplicate
But I listened to your advice and I'm trying a filter right now
 
so, duplicates are ok, unless their together in the array?
 
9:15 PM
Finally completed it.
well... partially
Thank you all for the help. It's an app to mass flag comments url : autoflagger.os.sagarvd.me
 
 
2 hours later…
user8453102
10:53 PM
@KevinB Hi Kevin
 
@Pat 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.
 
user8453102
I have Parent Component > Upload (child component with input file button)
>child components for images uploaded

I want image child components to perform Ajax call on mount. How do I pass File from Upload child to Image child components?
 
user8453102
Right now I am passing file back to parent component.
 
user8453102
I tried passing it as JSON data but file is getting sent as empty file : {} in props
 
user8453102
So as an alternative I tried parent component calling Ajax but facing issues
 
user8453102
10:56 PM
-1
Q: Update component state within AJAX xhr

PatI have below Ajax call how do I update the component state on success/error? $.ajax({ method: 'POST', type: 'POST', url: "http://localhost:8080", crossDomain: true, processData: false, contentType: false, data: formData, xhr: funct...

 
11:10 PM
Thereโ€™s only one way to send a file via ajax
Thereโ€™s an SO question detailing how to upload files with ajax
 
11:33 PM
posted on September 25, 2019 by Ruben Bridgewater

Notable changes crypto: Add oaepLabel option #29489 deps: Update V8 to 7.7.299.11 #28918 More efficient memory handling Stack trace serialization got faster The Intl.NumberFormat API gained new functionality For more information: https://v8.dev/blog/v8-release-77 events: Add support for EventTarget in once #29498 fs: Expose memory file mapping flag UV_FS_O_FILEMAP #29260 inspector: N

 
00:00 - 18:0018:00 - 00:00

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