Do you guys know if the browser will get slown down if it keeps throwing file not found errors? I'm loading external websites into a div and it throws millions of errors for resources not found that i cna't do nothing about...
@user5014677 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
Hello. I have a javascript code in which I've later added a react component (a sidebar) and now my app runs on localhost:3000.
Now I want to include another react component (a log in screen) that runs on localhost:9000 but I don't even know what to search to help me do this integration.
So the question is, how can I merge two separate react apps that run on different port and also use different package (one uses npm and other yarn)?
@Suisse you can just use .forEach or a normal loop. Depends on what you're after. If you want to traverse the tree then you might need a different solution but I'm not sure.
@aDeveloper 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.
@Ankit I'm starting to wonder the same thing. momentjs promises locale aware date formatting and that's what I'm after, I want the dates to look nice for everyone no matter where they're from but so far it's just not working
is anyone familiar with formatting dates with momentjs?
I'm making a simple blog app for practice and I'm using momentjs for the first time. I'm trying to use moment() to timestamp each new database entry and then display that timestamp on an ejs page. I have all my packages installed and required and have the appropriate app.use() defined for each as...
@Suisse If you're doing this recursively, I'd just add the parent element as an optional parameter to split so, you'd do something like split(newArray, label, parentElement) and then you can use the parent after the recursive call.
You can do a similar thing with a loop and keep the parent and child together.
But I'm not really familiar with random decision forests, so I'm not sure what the algorithm is doing and how best to do it.
@ShrekOverflow Most of the time, you are working with a known number of things to await, hence we have for await of. It's quite rare that we need while await and even then we don't need a separate construct to handle it while(condition) condition = await doSomething(); should be fine.
Should be mentioned that for await of does handle indeterminate number of promises as well, if you have something like an async generator function.
I have an array of data:
let data = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];
I want to map it into a tree structure:
let tree = {
name: "node_0",
data : [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
children: [
...
For a work project I have created an HTML table that pulls information from different SharePoint subsites and populates it to one table on a certain landing page. I took a few looks at the DataTables AJAX manual, but don't quite understand it? It seems as if the AJAX is writing to a file wear as ...
@zgoforth just make 3 different calls.. there is no possiblity of combining the http calls - if you can change the backend and supply all the data you want into one endpoint - then you require only 1 call - and can split the data in frontend
I'd think even now would still be a good time to shop around, if the dealerships aren't running at full capacity yet - easier to email several and not waste time driving around
I'd lean towards the 3.5, most sales managers told me to stay away from the 2.7.
Funnily enough, the only dealership that suggested the 2.7 had that in about 80% of their trucks and offered an unbelievable deal on them, didn't really add up
Nvm it was because I was running under the JS file I wasnt using a framework had to add jQuery
jsfiddle.net/#&togetherjs=PEiCcONODK what can I do to call into the data array if it already exists Im so damn confused still boys my brain feels fried
GET before the function initialization? posting results or data.d.results as my variable data?
can someone help me with my issue please. i have a dropdown with checkboxes and im having trouble with the logic if a checkbox is checked it opens a bottom dropbox for example the first dropbox the user selects a vehicle make and the second dropbox has the models for the vehicle make.
the issue is that when i check 2 different makes the button dropdown doesnt show only when i check one
@LuDevGon Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
@LuDevGon Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
If it's to get help, follow the doc I directed you too. If it's not, and you are just going to make fun of people/annoy people, we will ban you from the room. This is your final warning.
In other news, I've started to learn C++. Trying to get into it. Not easy coming from JS.
ive been thinking about ditching the switch statements bc ive already experienced 2 bugs in my dev cycle of 1 week with forgetting the "break" statement at the end of each block
and also my code looks so damn ugly when the body of my code is indented 4 tabs to the right
basically I have to add some additional properties to share data between the methods of the Tool object. however, I couldn't just create an extension like class BetterTool extends Tool because it would break the visual rendering provided by the library (it's a HTML5 canvas lib)
oh no it's fine i resolved the issue by explicitly specifying
i was just curious what i was doing wrong earlier
basically i had to make betterTool a typescript interface that extended the Tool class, and it seems typescript wouldn't detect the type of this implicitly as betterToolinside of the methods of betterTool
@JBis ok i can't reproduce my weird typechecking issue in the TS playground. thanks for recommending me to try creating a MCVE; i've narrowed the issue down to the following tsconfig option:
noImplicitThis
Raise errors when 'this' would be any
turns out my (default) tsconfig wasn't strict enough to warn me about these errors
figured out the error. if noImplicitThis isn't set to true in tsconfig, then if you assign a value to an undefined property, then typescript quietly casts this as any.
@jdgregson Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
@VishalSholkay Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
@VishalSholkay 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.
I am trying to figure out which version of the below code, the 1st one, or the 2nd one is best practice? The one where I deleted the app (app.delete()) inside the first then or should I use nested then?