Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 138163 articles
Browse latest View live
↧

How to make GitHub Pages Markdown support mermaid diagram?

I am hoping to use mermaid in GitHub-pages, with simple commit and push. In other words, I am hoping to wirte in my markdown file like this```mermaid graph LR A --> B A -->C C -->D ``` and add...

View Article


How to properly use external modal in ReactNative?

I have main component in which i import smaller modal component import QuantityModal from './QuantityModal'; // ....... return ( <SafeAreaView style={styles.container}> <SectionList...

View Article


ERROR: undefined in React useContext and useReducer

I am trying to make a redux pattern with useContext and useReducer. I create a component that creates a context (a reducer), and I also have the initial values. I declare my reduction with the...

View Article

Hey, can anyone tell me how to create a phone number entering box for sharing...

I tried different methods using Javascript and HTML. But none of them was successful. Example: (Country code+91) (enter phone number). (share on WhatsApp)*Here () indicates boxes..share on WhatsApp is...

View Article

Using modular arithmetics for interval

Let's say we have range [-2, -1, 0, 1, 2, 3] which can be described as MIN_VALUE=-2 and MAX_VALUE=3 We want to implement function called infiniteCarousel() which will accept any number and used modulo...

View Article


Showing spinner before child component renders [closed]

enter image description hereI have a sidebar with links and in my App.vue i have a <component> element which dynamically renders component for each link when it is clicked. I also have a few...

View Article

CSS or JS - Hide old elements from html

I have a set of paragrapghs in my Ionic 4 project's html file:<! –– page 1 ––> <p *ngIf="x1">Text 1</p> <p *ngIf="x2">Text 2</p> <p *ngIf="x3">Text 3</p> <!...

View Article

What is the Big O ( time complexity ) for factorial computations?

It is linear for the iterative version:// O(n) function factorial (n) { let ret = 1; for(let i = 2; i <= n; i++) { ret = ret * i; } return ret; } and it appears to be linear for the recursive...

View Article


Use eventClick in FullCalendar (in Shiny)

I have a fullcalendar in shiny that I would like to incorporate "eventClicks" into. Ideally, I would like for additional information to be shown in a pop up/hover over text box when clicking on one of...

View Article


What is a practical use for a closure in JavaScript?

I'm trying my hardest to wrap my head around JavaScript closures.I get that by returning an inner function, it will have access to any variable defined in its immediate parent.Where would this be...

View Article

Remove characters from a string that are not firstname/surname characters

Please see the code below: @HostListener('paste', ['$event']) onPaste(event) { var test = event.clipboardData.getData('text'); var removedNumbers = test.replace(/[0-9]/g, ''); } Numbers are removed...

View Article

Print response from http GET request using axios in vue.js?

When I access https://jsonplaceholder.typicode.com/todos?_limit=1 in my browser I get:[ { "userId": 1, "id": 1, "title": "delectus aut autem", "completed": false } ] I am now trying to print the result...

View Article

Trying to use dictionary look up to dynamically map options in a select drop...

I have a react component that includes a dictionary of key/value pairs representing US state abbreviations for the key and their full name as the value like:const states = { AL: "Alabama", AK:...

View Article


Elements dont display on smartphone. JavaScript

Some elements don't display on smartphones, but on PC's with Firefox and Chromium, everything works. How can I fix this? I can't display elements from the showRecords js function.HTML: <html>...

View Article

form onload is not working. I need form load event to work so that I can fill...

I searched and found that suggestion contains use . that won't work in my case.<html> <head> </head> <body> <script> function datafill(){...

View Article


Class private method in newest chrome

I have newest google chrome currently version 80.0.3987.87. I copied example from JS docs which isclass ClassWithPrivateMethod { #privateMethod() { return 'hello world' } getPrivateMessage() { return...

View Article

Babel Not Working Outside of Main Node.js App

My Express.js server is currently being started by running start.js, which in turn runs server.js(code below). For example,nodemon start.js Problem: When I try to run the file at...

View Article


Java CometD Jetty protocol equivalent in javascript

webSocketClient = new WebSocketClient(); webSocketClient.start(); wsTransport = new JettyWebSocketTransport(null, null, webSocketClient); bayeuxClient = new BayeuxClient(url, wsTransport);...

View Article

Image may be NSFW.
Clik here to view.

React js - express: res.send Vs res.render Error

I am building a very small example application to practice a login page. I am working with :1) Bootstrap2) Bootswatch - in particular with Journal form3) Font AwesomeAfter successfully setting up all...

View Article

how to add a single quote string in the jquery append function?

I want to add elements to the HTML body, but I have a problem. the onclick function doesn't work because I blew the wrong one in the function. the following is the append code in my htmlvar html=...

View Article
Browsing all 138163 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>