Category "javascript"

how to render toastr within angular?

How do you import toastr into an angular app? I'm following the Angular Fundamentals course, and attempting to simply display toastr.success from within my exp

webdriverio wait for page to load

Is there a way to make webdriverio wait for a page to load? I saw that in java I can have something like: executeScript("return document.readyState").equals("co

Javascript Autocomplete doesn't clear suggestion with no input

I watched a tutorial on how to use Javascript with Autocomplete using a JSON file and Fetch. Everything works fine; except for the following: If I clear the inp

How to use Jest global Setup and Teardown in a nodeJS project?

I added tests to my node js project using jest but for each test suite there's a beforeAll method that creates a new test server and connects to a mongo databas

How to find value of input field using name attribute?

How to access the value of this input field by its name attribute using Javascript <input type='text' name='hey'> document.querySelectorAll('input[name=

How to add wai-aria property for file picker?

I am currently following this tutorial to have a file picker functionality. http://www.alecjacobson.com/weblog/?p=1645 I would like to add wai-aria attribute f

How to import image (.svg, .png ) in a React Component

I am trying to import an image file in one of my react component. I have the project setup with web pack Here's my code for the component import Diamond from

Largest Triple Products without using sort?

I implemented the Largest Triple Products algorithm, but I use sort which makes my time complexity O(nlogn). Is there a way to implement it without a temporary

EmailJS - Vue.js 2 and TS

I'm sorry, but I didn't find some similar issue on the web Here is my problem, I tried to make a form to get contacted from an app. I code with Vue.js 2 and Typ

Python Scrapy Web Scraping : problem with getting URL inside the onclick element which has ajax content

I am beginner for the web scraping with scrapy . I try to scrape user reviews for specific book from goodreads.com . I want to scrape all of the reviews about b

Is there a simple way to stream a non-public IP camera into a website?

I'm trying to embed a non-public rtsp camera into a website without third-party software or plugins and capable for all browsers and devices. I found a workarou

Is there a simple way to stream a non-public IP camera into a website?

I'm trying to embed a non-public rtsp camera into a website without third-party software or plugins and capable for all browsers and devices. I found a workarou

Vue Dynamic Layouts mounting router-view component twice

I setup my Vue project to use dynamic layouts - that is, layouts that persist from page to page, assuming the layout for the new page is the same as the last pa

Chart.js add direction arrows to the X and Y axes

I'm trying to add/draw arrows to the axis of my charts. (So they can look a bit more like that) I've tried to look into the doc, but I didn't find any options c

Node.js - PostgreSQL (pg) : Client has already been connected. You cannot reuse a client

I am just trying to write simple register/login system. I am trying to find if username exists. Here is the steps : Go localhost:3000/users/register page Fill i

Using reduce() to find min and max values?

I have this code for a class where I'm supposed to use the reduce() method to find the min and max values in an array. However, we are required to use only a si

Support for the experimental syntax 'jsx' isn't currently enabled

I'm trying to run very simple code, but I'm getting an error, I didn't use the create react app! It looks like my babel.config.js file is being ignored! This is

fetch response.text() returns pending promise

I test the fetch API with jsonplaceholder URL, but my function returns "Promise State: Pending", and I don't understand why : function getUsers(url) { return

javascript sode for mouse position display and Geolocation with openlayer and geocodezip example

I want to combine Geolocation and Mouse Position Display (lng/lat; outside of map)from the Openlayer and geocodezip site.I tried various combinations of codes B

multer file upload req.file.path undefined put request

I've created a simple RESTapi with express and for file upload I'm using multer. Creating a new item / post works. My issue is with the put route and the functi