« first day (3384 days earlier)      last day (1547 days later) » 

12:07 AM
Hmm I think the default formatter is having a grip with the mjs extension since in my web code it's working fine
 
 
2 hours later…
1:45 AM
Hi
 
2:10 AM
hello
 
 
2 hours later…
3:58 AM
@KevinB Someone should make a curb your enthusiasm like show but reenacting SO convos to show how ridiculous it is
Then again, each episode would be the same shit.
 
 
1 hour later…
5:01 AM
Hi. Anyone here worked on npm audit --json before. The normal npm audit command lists severity against the module. However the json version doesn't have that...any advice?
 
 
3 hours later…
8:28 AM
Hi guys
 
@paul23 it depends of the size of the code base as well tho
 
8:56 AM
Hello
 
@Reza 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.
 
Hi Reza
 
9:16 AM
@AnArrayOfFunctions You could always force it as JS with code.visualstudio.com/docs/languages/identifiers
 
Hello all, can any one help out with this post : stackoverflow.com/q/59500955/5783700
this was asked before a month but still not getting any response.
 
9:40 AM
Hi, I have a flash application which connects to XML Socket Server using Flash's XMLSocket. But now I am making the same application in HTML. How should I connect to that XML Socket Server in JavaScript?
 
9:51 AM
@JBis ye... isnt james a clone of caprica?
for example, it must have the commands like ||afk lunch
but... since you say it cannot join rooms via commands... it isnt a real clone
 
 
2 hours later…
11:35 AM
@Wietlol james was built from scratch it is not a clone
 
11:51 AM
Morning all
 
morning
 
Anyone up for cross examining this w me?
101
Q: Has Facebook sharer.php changed to no longer accept detailed parameters?

tdousWe have been opening a sharing popup (via window.open) with the URL like https://www.facebook.com/sharer/sharer.php?s=100&p[title]=EXAMPLE&p[summary]=EXAMPLE&p[url]=EXAMPLE&p[images][0]=EXAMPLE and until some unknown point in the last month or so everything was fine. What is happening now is...

It actually DOES indeed work. Kinda. Im just having trouble and dont understand why
Allow me to illustrate
For the life of me I cant figure out why this works
but this doesnt (Which is my original target)
Ive tried swapping url encodes out for regular characters and vice versa till Im blue in the face. The link w params just wont work
Note: at first glance the 2nd link appears to work correctly but upon closer inspection you'll see it does not work as it should point to a specific listing
 
12:09 PM
I think the culprit is the question mark at detail.php?Mfg=....
I don't use that tho. so not sure
 
Thanks KarelG, Ive tried changing that ? to %3F and back to no avail
It just wont pick up listing 165
kinda...
I say kinda b/c it goes 404 if you change 165 to say... 165555 (as it should) so it's making it that far, Its just not picking up any images or the correct page title for listing 165 like it does for 1st url provided above for bike-wont-start.html
I just now learned of this behavior
and refuse to use facebooks share code
If I cant pull it off like this, It aint gonna happen
 
according to the SO question - that one you just linked - you can only use a specific set of named parameters
 
Yea I saw that (kinda lol) but I think thats related to after the URL being provided. maybe? IDK??
such as quote= title=...
After just looking again, I think answer w 98 votes may just be the final answer
F facebookl
and their share code
but Thanks for the pointers / heads up KarelG
I guess I was selectively seeing
If anyone knows a way to beat them and get this to work for the 2nd example I provided above Ill be most appreciative and welcome your input (Hopefully w an "answer" on linked SO post)
and a notif here
Until then... Yall have a nice day
 
 
3 hours later…
2:57 PM
Does anyone know how I can duplicate a div and match the scrolling position to it's duplicated parent?
 
3:19 PM
I'm trying to mimic a propmter - on the web. So I have a window that's the feed to the prompter and I want a view that replicates the feed. I can mimic sizing and all that, but I don't know how to get to control the window.parent or the windowproxy object. I'm guessing it's some sort of security thing that I need to add or disable
 
 
1 hour later…
user8729657
@JBis, now we can really see what these woman look like :D
 
@OvieTrix nice.
@JBis Seems alright to me
 
If its human fact checkers they should be able to tell whether its digital art or its misinformation.
 
user8729657
#nofilter
 
5:24 PM
hey anyone ever heard of an emulated javascript canvas for other languages? like C#?
 
How does one format code spanning multiple lines in chat the same way you do when posting on stack over flow?
 
scx
Hello everyone ,dont know whether it is the right channel. I have desktop application which makes ajax calls to server. There is no problem when ajax calls go in series.However when sent parallely I am getting 12152 error. To analyze network traffic I used Fiddler ,but when using Fiddler I am not facing issue.Is there some configuration in fiddler I have to set so that I can still recreate my issue
 
@scx 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.
 
@MyWrathAcademia Ctrl+k
cant have code and normal text in same chatbox though
 
@TaylorS Thanks
 
5:45 PM
np
 
6:01 PM
Now for my question: I'm trying to understand how the following recursive function works. To me it seems like the recursive function iterates over all nodes at the end of a branch in the DOM tree after doing something with a node which I assume means that a node is removed before the for loop, and only stops calling itself when there are no nodes left in the branch.
However when the first node is given as an argument in the recursive function call and the recursive function executes, doesn't the for loop's increment expression mean that i is reset to 0 so the same node object at index 0 is again the argument of the 2nd recursive function call, and this repeats. So how does the loop get passed the first iteration if the value of i always starts at 0 each time the recursive function is called?
    function walkTree(node) {
  if (node == null) //
    return;
  // do something with node
  for (var i = 0; i < node.childNodes.length; i++) {
    walkTree(node.childNodes[i]);
  }
}
 
@MyWrathAcademia I'm not clear where the misunderstanding is, but to clarify: It's iterating over the children of the current node, and every invocation has its own i.
i is not shared across recursive calls to the function.
 
6:16 PM
@user220944 Let me make it clearer. The misunderstanding is this: (1). non-recursive function call, loop executes, i = 0 (2) first recursive function call i = 0 again because i is initialized to 0 at the beginning of the for loop, (3) second recursive function call i = 0 again, same reason as before. Each time walkTree calls itself i = 0 is passed as the value of the parameter. Can you correct where my misunderstanding is?
And is i resetting the reason you say that every invocation has its own i?
Or may be you mean that every invocation has a different value of i from 0 to array length - 1?
 
6:27 PM
No, that is all correct
What changes is the node being passed in
non recursive function takes node, first recursive function takes node's first child, second call takes nodes first grand child, etc.
Yes, each call starts from i = 0 but they're iterating over a different set of nodes
And no, I don't mean
> Or may be you mean that every invocation has a different value of i from 0 to array length - 1?
Every invocation has it's own variable
The name "i" is irrelevant
the counting variable is unique for each invocation, it's local to that invocation
 
6:53 PM
posted on January 21, 2020 by Shelley Vohr

Notable Changes deps: upgrade to libuv 1.34.1 (cjihrig) #31332 upgrade npm to 6.13.6 (Ruy Adorno) #31304 module add API for interacting with source maps (bcoe) #31132 loader getSource, getFormat, transform hooks (Geoffrey Booth) #30986 logical conditional exports ordering (Guy Bedford) #31008 unflag conditional exports (Guy Bedford) #31001 process: allow monitoring uncaughtException (Gerha

 
7:34 PM
@user220944 Aahh I see, wow, thanks for making that part much clearer. Some how I missed that in each function call the next generation node is being passed as a parameter (i.e. like descending down a family tree). So I'm guessing that eventually a recursive function call will take null because there is no nth node at index 0?
 
not necessarily
 
I mean does a recursive function take null when you pass a node that has no children i.e. a node that has an empty array or does it happen when the node itself is empty (i.e. null) not the children (but then I think that calling node.childNodes[i] on an empty node object would cause a runtime error)?
And when a recursive function takes null (and the condition is true then) the recursive function call returns up each function stack back to the very first recursive function call and then i increments to 1 and the next iteration of the for loop executes with the same steps you described above except this time the second child is taken, then the second grand child, and so forth?
So this recursive function is almost like going down (i.e. descending) a directory and all its subdirectories, am I right?
 
If it has no child nodes, wouldn't node.childNodes.length be 0?
thus not calling the loop, and not walking over the nodes (that don't exist)
 
Yes but wouldn't node.childNodes.length being 0 mean that the loop would not execute?
 
rihgt
 
7:41 PM
@KevinB So if it has no child nodes the function walkTree just ends without the chance of the condition node == null being true if there was another recursive call, right?
 
assuming walkTree is even ran, yes
under what circumstance would walkTree be ran without a node?
it won't run itself if there are no nodes to run on
if (node == null) is only necessary if something other than walkTree can possibly run walkTree with null
 
Something doesn't seem right, I thought a return statement in a function means that the function must return a value. Does this not apply to JavaScript?
 
return returns undefined if no value comes after the return
I think we're talking past each other
Right, so, lets take a real scenario
there's a div in the dom, and you've selected it and stored it in a variable, myDiv.
this div has no childnodes
If you called walkTree on that div, it would get past the if statement because the div isn't null, and then the loop would not run, thus walkTree does nothing and returns undefined
scenario 2: you selected a div that doesn't exist in the dom and stored it in a variable, myDiv.
this results in myDiv containing null
if you called walkTree(myDiv) in that scenario, it would return undefined at the first if statement
skipping the for loop that would have thrown an error
a scenario where myDiv DOES have childnodes would essentially copy scenario 1, recursively
you'd never have a case where node was null.
in other words, with proper protection in how you call walkTree, you could eliminate that if statement entirely
if you made sure it was never called with null to begin with
(but it's not a bad idea to leave it there anyway)
 
Very clear examples, thanks a lot. I have a few questions to strengthen my understanding. In the first scenario, how does walkTree return undefined when only the first if statement can return undefined?
Also, in the third scenario when div has child nodes how does an infinite recursion not occur if null is never passed to the recursive function call?
 
8:00 PM
When walkTree is called on a node that has no childnodes, walkTree returns undefined
the loop doesn't get reached
walkTree doesn't get called again in that scenario, it's done
at least for that node
 
8:13 PM
Does walkTree returning undefined in the first scenario have anything to do with undefined behaving as false (or in this case false behaving as undefined) because when i < node.childNodes.length is false I'm guessing JavaScript interprets this as undefined and then returns undefined.
Coming from Java I'm used to a method only returning a value when the method explicitly uses a return statement to return a value.
Or wait is scenario 1 just that when i < node.childNodes.length is false the function returns to its caller with the value undefined the same way that return returns undefined if no value comes after the return (i.e. a function returning without being commanded and a function returning due to a return command without a value both return to the function caller with the value undefined? Is this right?
What about my last question: "Also, in the third scenario when div has child nodes how does an infinite recursion not occur if null is never passed to the recursive function call?"
 
well, no, the return of walkTree is never used
so what it returns isn't really relevant
that it returned is relevant, because returning prevents all following code from running.
as far as infinite recursion, because walkTree is never called on the same node more than once, there's no way it can infinitely recurse
it loops over the child nodes calling walkTree on each one once, which walks through the childnodes of each of those nodes (etc etc till there are no more deeply nested child nodes), and then ends.
it doesn't call itself with the same node, so it can't infinitely recurse
 
hello everyone o/
 
o/
this is happening in case you missed it
 
8:28 PM
haha I have more rep than the new CEO
 
8:54 PM
0
A: CEO's 2020 Kickoff Blog: Where do you see Stack Overflow going?

JBis given that supporting the Community is a top priority for Stack Overflow, where do you see the network going in the next five years, and what do you think should be done in order to get there? I'd really like to see the chat renovated. You'd like to support the community and I think this wou...

 
 
1 hour later…
9:55 PM
I added starboard scrolling to the dark theme ext
fwiw
 
@DavidPostill I know those extensions exist however an official dark theme would be nice. Not just for chat but in general. — JBis 53 mins ago
But thanks, I have used before and its helpful!
 
yeah saw that, just pointing out that it's more than a dark theme these days 😛 but glad to know you're familiar
 
10:27 PM
I'm surprised at the amount of downvotes that post is getting.
Obviously there maybe more pressing issues but it doesn't mean chat isn't an issue.
 
hmm I don't think chat is an issue myself
I didn't downvote but I don't think it's something SE should spend their time with
 
You don't think it is something that can be significantly improved?
 
I think it can be improved of course but that doesn't mean it needs to be
It serves its purpose
 
I think chat provides a different way to help people for questions not always suited for the Q&A format.
 
and it's quite good enough for that
I appreciate that of the chat windows I keep open on my computer, SE Chat is by far the most lightweight
 
10:37 PM
Fair enough.
 
and I'd say that most of the people who use chat every day either use the extension or they at least know about it
 
Wow. Interesting. CSS cache can be used to track users:
 
yup
 
> One particularly clever tracking method is assigning a unique color value to a few pixels every time a new user visits a website. The different colors are stored in each user’s browser cache and can be loaded back – the color value of the pixels is a unique identifier that identifies the user.
Thats crazy. Never thought of that. I guess any cache can be used, including JS cache.
 
it's a losing battle to fight
 
10:52 PM
Is there any reason for User Agent Strings to exist besides tracking? Compatibility can be checked by checking if the APIs exist themselves.
 
11:37 PM
Always thought visited pseudo class selector was a way to track people, but still requires brute forcing.
 

« first day (3384 days earlier)      last day (1547 days later) »