Category "javascript"

react merging two components and sorting data by date and time (newest at top oldest and bottom)

I have codes below code removed The problem is it prints rows of expenses and then rows of incomes (i.e posts from expenses are printed first then after them i

swapping array elements without a temporary variable

The following code: var words = ['javascript', 'hmtl', 'css', 'python']; words[0] = words[3]; words[3] = words[0]; alert(words); ...gives

How to recognize Id attribute in rails form_tag?

I am using a form in rails to pass an id. That id will trigger the javascript Sweet Alert function which will pop up a modal with a confirmation message. When t

Why am I getting .slice is not a function? [closed]

I know that .slice() can only work on arrays and strings. I'm calling .slice() on an array and I am still getting that error. Here is my code:

set knockout.js value programatically from "outside"

I am brand new to knockout.js - I have taken over an existing app written in it, the previous maintainers having left - and I want to start by writing tests tha

send "&" in url angular

I'm using the Angular version 12 I want to send the following object in query params: { dynamicQueryOperators: 6&dynamicQueryOperators=8 } But in the end

Uncaught ReferenceError. Firebase SDK not recognised despite correct order of script tags

I am trying to implement firebase authentication on my website. However, whenever I try to test the function, I get the following error: Uncaught ReferenceError

I'm having trouble understanding how to get JavaScript to function as a program

This is going to sound really, really basic, but I just need a little help understanding one of the concepts I'm struggling with in Javascript. I have been read

Draw layers when drag map Openlayers

I have a map in openlayers 6 with some vectorLayer type layers drawn above, the problem is that when I drag the map the part of the layer that was not visible i

DOMException: Failed to load because no supported source was found in html file

im getting DOMException: Failed to load because no supported source was found in audio.play(). im getting his issue on audioElement.src = 'songs/${index+1}.mp

Uncaught (in promise) SyntaxError: Unexpected token in JSON at position 0 And 504 connection error to ipfs

I am trying to render NFTs I've created and am getting a 504 (timeout) error. This is very strange because it was working a while ago and I didn't actually chan

Knockout Binding not happen correctly

I want to bind data by knockout but data not binding correctly I have gotten the data by ajax and put it in self.DisplayItem object successfully But the problem

http request does not get called when uploading the data to Firebase - firebase cloud function

Hello everyone I am trying to fetch the data from Binance than do a schedule function that uploads the data from the previous fetch to the Cloud FireStore , the

given 2 arrays , create an object, matching the element of array1, with the key of the object of array2

I really don't know where I'm failing, I try 1000 ways, but I can't. function userCheck (arr1,arr2) { let map = {}; arr1.filter((user) => { arr2.f

NodeJS 'Readline' is not a constructor

I'm having issues with my NodeJS app. It's supposed to be a NodeJS server to serial port, but I'm having issues with Readline and it used to throw errors about

Slick slider mobile:first param not working (responsive not working)

I have slick slider implemented on a module and here's a summary of how I'm wanting it to function: <= 767px screen width: show dots (no arrows) and 1 slide.

Auth0 Endpoint "api/auth/me" returns a 404 Error in Next.js App

I have gone through the following tutorial to get my Next.js App integrated with Auth0. I am able to log in and log out just fine but when trying to display use

receive discord messages in pure, browser-based javascript?

(NOTE: this first section kinda just gives context, not too relevant to the message-receive thing, but again, it sets up some context that might help) So, I kno

SciChart: Working with JavaScript Heatmap Chart

I am using SciChart Library for showing JS Heatmap Chart. According to the below documentation, the zValues variable is generated using iterate function but whe

window.onstorage event doesn't seem to trigger

I'm working on a workaround with a synch'ing parent window, child window and grandchild window. I want to refresh the parent from the grandchild in case the chi