Category "javascript"

JavaScript - How do I print an input inside an array? [closed]

I already tried many ways to solve this, but it always returns undefined. What should I do to solve this issue? function printThreeFavoriteCol

Laravel Livewire set is Removing Map Marker

I am using Laravel 8 with Livewire and am displaying a Mapbox map in my page. When I click on the map, I am getting the coordinates of the click and placing a m

How to invoke a lambda function in aws-sdk v3

How can I invoke a lambda function using Javascript (TypeScript) aws-sdk v3? I use the following code which does not seems to work: // the payload (input) to th

How to add an icon in password field to show & hide password in rails

My code: div.form-group.col-md-12 label =t('.password') = f.text_field :password, required: true,

How do I change the language of moment.js?

I am trying to change the language of the date which is being set by moment.js. The default one is English, but I want to set the German language. These is what

How to create text border radius without wrap view in React Native?

In React-Native, how do I set borderRadius to Text-components? I've tried using borderRadius in text stylesheet but it not work: import { formatPhone, mapNameWi

having issues adding functionality to skip, play and pause a react music player

Below is the code with the react component, there is functionality to the play and pause button also the ability to skip to the next track or previous track. Sc

My useState in React/NEXTjs is not appending the result from a socket.io event from the server, just overwriting it

Frameworks used: Next.js, Socket.io, React I am making a simple messaging app. I am basically just emitting a message someone types, sending that message to the

Understanding and updating the gun user alias system

On the gun alias system: Is it like a phone book (public key book) where every user could have a different name for each key? Is it stored in a user's user spac

eventlistener not functioning when post request is sent

I am trying to add a number indicator to my cart icon that will display the number of items added after the product has been saved to my database. <div class

VSC Default Directory for IntelliSense?

I use the code-runner extension in VSC to run untitled files on the fly, which is super helpful for quickly testing code snippets. Under the hood, the extension

GET json api data in datatable with axios and vuejs

I have a datatable and I want to pass the data according to the api that returns a json using findAll() from the sequelize.. But in console.log when I call the

Javascript: check multiple elements in array [closed]

I have an array: a=[10,11,12,13]. How can check elements from a[0] to a[2] if they >0 in the shortest way and don't use for loop? Does anyo

regular expression to match exactly 5 digits

testing= testing.match(/(\d{5})/g); I'm reading a full html into variable. From the variable, want to grab out all numbers with the pattern of exactly 5 digit

Style dd and dt tags with bootstrap

I created dt and dd tags in my javaScript. I also have some styling for them in my CSS file. But I am switching to bootstrap, how can I style them? const pr

How to use filter with two Observables and return only one in rxjs

I have a part of code that checks if two observables are up to date and returns the second observable if they are: combineLatest([$source1, $source2]).pipe( f

Read a file content as a string in Vue

Some other post respond to the same problem (here, here and here) by using raw-loader but from my understanding it is deprecated for webpack v5 (but I'm not sur

How to create a test Unit method for a get request that fetches Data from Database(MongoDB)?

Get request method in tasks.js file const { Task } = require('../model/Tasks.js') const asyncWrapper =require('../middleware/async') const getTask = asyncWrapp

Complex top level parents by param of the lowest child Saving your hierarchy and without repeating his hierarchy

Good evening. Today I am looking for a recursive function that will help me find all the greatest parents of a child of an element of a multidimensional array o

Live modification/creation of file/data with pure php

For example [['Inflammation'],['Noxious stimuli cause resident effector cells to secrete cytokines<br>Cytokines ↑ vascular dilation & permeabili