id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_2310145 | stackoverflow | FRONTEND_DEVELOPMENT | JavaScript, getting value of a td with id name | JavaScript, getting value of a td with id name
Originally, I was using input with an id and grabbing its value with getElementById. Currently, I'm playing with <td>s. How can I grab the values of the <td>s?
Originally, I used:
<input id="hello">
document.getElementById("hello").value;
Now I want to get value of <td>,... | https://stackoverflow.com/questions/2310145/javascript-getting-value-of-a-td-with-id-name | javascript | 1,266,833,598 |
se_71451140 | stackoverflow | FRONTEND_DEVELOPMENT | JazzCash payment integration with API REACT NATIVE | JazzCash payment integration with API REACT NATIVE
I have been trying to integrate JazzCash payment with JazzCash Sandbox, but I am getting the same error in response from the server
Please provide valid value for pp_SecureHash.
I have tried various methods to create HMAC-SHA256
Documentation Link JZ PAYMENT
API LI... | https://stackoverflow.com/questions/71451140/jazzcash-payment-integration-with-api-react-native | javascript, react-native, payment-gateway, hmacsha256 | 1,647,101,242 |
se_21548537 | stackoverflow | FRONTEND_DEVELOPMENT | Equalize height of columns with different parent - jQuery | Equalize height of columns with different parent - jQuery
I'm using a jQuery snippet to equalize height of the columns in the dropdown megamenu:
$(document).ready(function(){
var maxheight = 0;
$('.menu .parent .dropdown .dropdown-inner .column').each(function(){
if($(this).height() > maxheight) { maxhei... | https://stackoverflow.com/questions/21548537/equalize-height-of-columns-with-different-parent-jquery | javascript, jquery | 1,391,506,263 |
se_79983933 | stackoverflow | FRONTEND_DEVELOPMENT | iOS keyboard breaks page layout when opened | iOS keyboard breaks page layout when opened
I am using Vite + React + Bootstrap. This is my code:
componentDidMount() {
this.updateAppHeight();
if (window.visualViewport) {
window.visualViewport.addEventListener('resize', this.updateAppHeight);
window.visualViewport.addEventListener('scroll', t... | https://stackoverflow.com/questions/79983933/ios-keyboard-breaks-page-layout-when-opened | javascript, css, ios, user-interface, vite-reactjs | 1,784,741,091 |
se_75190826 | stackoverflow | FRONTEND_DEVELOPMENT | Horizontal Slider X axis | Horizontal Slider X axis
I have a container in which it is a horizontal scroll slider. I am just trying to figure how to show the element that is in the viewport at the time
I tried to look for left. I tried to put the slides in an array and look for the x axis but I am a little stumped.
This is my scroll function.
... | https://stackoverflow.com/questions/75190826/horizontal-slider-x-axis | javascript, html, css | 1,674,268,816 |
se_79202956 | stackoverflow | FRONTEND_DEVELOPMENT | javascript MediaRecorder does not record on stop | javascript MediaRecorder does not record on stop
I want to record some audio using javascript. I found some explanations, but it doesn't work for me. As far as I understood my code below, stop should trigger addEventListener('dataavailable' .... But as far as I can tell, this code is never executed. Could someone tell... | https://stackoverflow.com/questions/79202956/javascript-mediarecorder-does-not-record-on-stop | javascript, audio, mediarecorder | 1,732,010,883 |
se_79983514 | stackoverflow | FRONTEND_DEVELOPMENT | How to invalidate CloudFront path if the filename contains an apostrophe? | How to invalidate CloudFront path if the filename contains an apostrophe?
Using the JavaScript SDK V3 for CloudFront, I need to invalidate a path that contains the ' character. If that makes a difference, the CF distribution is caching an S3 bucket, and the ' character is valid and supported in S3 filenames.
I have tr... | https://stackoverflow.com/questions/79983514/how-to-invalidate-cloudfront-path-if-the-filename-contains-an-apostrophe | javascript, typescript, amazon-web-services, amazon-cloudfront | 1,784,634,089 |
se_1057716 | stackoverflow | FRONTEND_DEVELOPMENT | Validate a timestamp in JavaScript | Validate a timestamp in JavaScript
I need a regular expression to validate a timestamp of the format, using Javascript:
YYYY/MM/DD HH:MI:SS
I tried cooking up a few, but seems my regex skills fail to cover something or other.
Please give me a reference or way to do it.
P.S. : I mention regex, only as a suggest... | https://stackoverflow.com/questions/1057716/validate-a-timestamp-in-javascript | javascript, regex, validation, timestamp | 1,246,273,120 |
se_29427928 | stackoverflow | FRONTEND_DEVELOPMENT | Make table column dragable (sort) in bootstrap | Make table column dragable (sort) in bootstrap
I designed a table in bootstrap and a list of column name. I want when I drag any column name in list or table column it will drag both.(table column and list li)
Check this link table column is dragable. When you drag table column it runs.
Go to your mouse table column... | https://stackoverflow.com/questions/29427928/make-table-column-dragable-sort-in-bootstrap | javascript, jquery, twitter-bootstrap, sorting | 1,428,045,532 |
se_33728224 | stackoverflow | FRONTEND_DEVELOPMENT | How to know when async function call is finished (Javascript) | How to know when async function call is finished (Javascript)
If I have a function call callFunc(), and inside that function there is an async call (like a $http in Angular)... from where I call callFunc() is there some way for me to know when the function - including all of the async within it - has finished executin... | https://stackoverflow.com/questions/33728224/how-to-know-when-async-function-call-is-finished-javascript | javascript, angularjs | 1,447,645,828 |
se_79983647 | stackoverflow | FRONTEND_DEVELOPMENT | In Vitest with Angular, How to fix Compilation error ''Can't bind to 'myProperty' since it isn't a known property of 'app-a' for running tests? | In Vitest with Angular, How to fix Compilation error ''Can't bind to 'myProperty' since it isn't a known property of 'app-a' for running tests?
In vitest, I have a component AComponent which I want to write out for, for writing, but I write test-wrapper TestComponent which uses view chi... | https://stackoverflow.com/questions/79983647/in-vitest-with-angular-how-to-fix-compilation-error-cant-bind-to-myproperty | javascript, angular, vitest | 1,784,658,303 |
se_13459227 | stackoverflow | FRONTEND_DEVELOPMENT | "=" sign in JSON text causes parsing error | "=" sign in JSON text causes parsing error
"Cost to Implement \nRate 5 to 1\nHigh = 5\nLow = 1"
as part of a JSON parses fine in jsonlint, but fails in Chrome with any of these approaches (each tried separately):
sections = $.parseJSON(myJSONstr);
sections = JSON.parse(myJSONstr);
sections = eval('(' + ... | https://stackoverflow.com/questions/13459227/sign-in-json-text-causes-parsing-error | javascript, jquery, json, escaping | 1,353,346,962 |
se_27452864 | stackoverflow | FRONTEND_DEVELOPMENT | JavaScript: compare child instance and its parent object instance for equality | JavaScript: compare child instance and its parent object instance for equality
This question comes from my interview with a local company. I believe my answer was correct, but the interviewer said otherwise.
The question: Inherit from the Parent object Shape, create an object named Circle, then tell if the Circle in... | https://stackoverflow.com/questions/27452864/javascript-compare-child-instance-and-its-parent-object-instance-for-equality | javascript, inheritance, equality | 1,418,422,033 |
se_43462114 | stackoverflow | FRONTEND_DEVELOPMENT | Don't see logs on the server side when using console.log | Don't see logs on the server side when using console.log
This is the first time in my life I touch js or node so please bear with me.
I am trying to make my app output logs on the server side.
getUser.onclick = function () {
console.log('Server running at http://127.0.0.1:1337/');
var req = new XMLHt... | https://stackoverflow.com/questions/43462114/dont-see-logs-on-the-server-side-when-using-console-log | javascript, node.js, express, node-webkit | 1,492,478,939 |
se_74224087 | stackoverflow | FRONTEND_DEVELOPMENT | Don't show .getDisplayMedia() screen select + start pop-up | Don't show .getDisplayMedia() screen select + start pop-up
Currently, I'm working on a WebRTC screen sharing proof of concept.
const stream = await navigator.mediaDevices.getDisplayMedia({
video: {
cursor: "always"
},
audio: false
});
I'm looking for a solution for one thing.
In my applicatio... | https://stackoverflow.com/questions/74224087/dont-show-getdisplaymedia-screen-select-start-pop-up | javascript, getusermedia, get-display-media | 1,666,882,361 |
se_19030935 | stackoverflow | FRONTEND_DEVELOPMENT | Chrome doesn't remember input field value | Chrome doesn't remember input field value
I'm using HTML code like this:
<form method="post" action="#">
<input type="text" name="inputFIeld" id="someVal" value="" />
<button id="submitFun" type="submit">Dodaj</button>
</form>
The only thing I do is preventDefault on submit button click and then I m... | https://stackoverflow.com/questions/19030935/chrome-doesnt-remember-input-field-value | javascript, html, google-chrome, preventdefault, input-field | 1,380,205,482 |
se_50689303 | stackoverflow | FRONTEND_DEVELOPMENT | If !0 is truthy then how come "true && !0" returns true and not !0? | If !0 is truthy then how come "true && !0" returns true and not !0?
From what I understand if both values are truthy it should return the last truthy value which in this case should be !0. | https://stackoverflow.com/questions/50689303/if-0-is-truthy-then-how-come-true-0-returns-true-and-not-0 | javascript | 1,528,149,312 |
se_36182048 | stackoverflow | FRONTEND_DEVELOPMENT | Referencing this in .querySelector | Referencing this in .querySelector
If I use the following to select a certain node
var Link = document.querySelector('table .ctrlcLink');
I get the first column value for the column with class ctrlLink, which is what I expected.
However, since I have an onclick event set to an other column in the same table, I wou... | https://stackoverflow.com/questions/36182048/referencing-this-in-queryselector | javascript, jquery, jquery-selectors | 1,458,746,293 |
se_75464970 | stackoverflow | FRONTEND_DEVELOPMENT | React HashRouter doesn't render anything on GitHub Pages | React HashRouter doesn't render anything on GitHub Pages
HashRouter doesn't render anything on GitHub pages and the console doesn't show any errors either. Also it renders locally only if I put a # before the app name so instead of typing: localhost:3000/chat-app I have to type localhost:3000/#/chat-app.
App.js
im... | https://stackoverflow.com/questions/75464970/react-hashrouter-doesnt-render-anything-on-github-pages | javascript, reactjs, github, react-router-dom, github-pages | 1,676,491,697 |
se_69882100 | stackoverflow | FRONTEND_DEVELOPMENT | eslint-loader - TypeError: eslint.CLIEngine is not a constructor | eslint-loader - TypeError: eslint.CLIEngine is not a constructor
I'm starting a new VueJS project in WebStorm. I've created a new VueJS project, upgraded NPM, added Vuetify and after starting the server, it raises this error:
ERROR Failed to compile with 1 errors ... | https://stackoverflow.com/questions/69882100/eslint-loader-typeerror-eslint-cliengine-is-not-a-constructor | javascript, vue.js, npm, eslint | 1,636,367,810 |
se_44367357 | stackoverflow | FRONTEND_DEVELOPMENT | How to make multi level dropdown menu using select option method | How to make multi level dropdown menu using select option method
I want to make multi level dropdown menu using select and option method
<select>
<option value="" data-display-text="Select">None</option>
<option value="oranges">SSC</option>
<option value="oranges">GATE</option>
<option value="bananas">BANK... | https://stackoverflow.com/questions/44367357/how-to-make-multi-level-dropdown-menu-using-select-option-method | javascript, html, css | 1,496,659,964 |
se_68046643 | stackoverflow | FRONTEND_DEVELOPMENT | Immer only supports setting array indices and the 'length' property | Immer only supports setting array indices and the 'length' property
What types of things would cause Immer only supports setting array indices and the 'length' property' from the code below? This FoodLogState type is a class. I've done something very similar with no issue. I notice I am not updating even the a... | https://stackoverflow.com/questions/68046643/immer-only-supports-setting-array-indices-and-the-length-property | javascript, redux-toolkit, immer.js | 1,624,104,722 |
se_46902415 | stackoverflow | FRONTEND_DEVELOPMENT | How to check if an AJAX response payload from a CodeIgniter controller is empty | How to check if an AJAX response payload from a CodeIgniter controller is empty
I have a script that basically check if there is a result from a query:
$.post('<?php echo site_url('xxx/yyy'); ?>', {data:no}, function(result){
if (!result) {
alert("No Data");
} else{
alert("Data retrieved");
... | https://stackoverflow.com/questions/46902415/how-to-check-if-an-ajax-response-payload-from-a-codeigniter-controller-is-empty | javascript, php, jquery, ajax, codeigniter | 1,508,820,517 |
se_79965916 | stackoverflow | FRONTEND_DEVELOPMENT | Smoothly animating real-time GPS vehicle position with only 1 update/second, without adding lag | Smoothly animating real-time GPS vehicle position with only 1 update/second, without adding lag
I'm building a real-time dashboard that displays moving vehicles (cars) on screen, based on GPS data. The GPS itself is accurate (no significant noise), but I only receive one position update per second, while I need to ren... | https://stackoverflow.com/questions/79965916/smoothly-animating-real-time-gps-vehicle-position-with-only-1-update-second-wit | javascript, algorithm, gps, interpolation, bezier | 1,782,223,743 |
se_54063255 | stackoverflow | FRONTEND_DEVELOPMENT | Simple secure websocket (wss) chat using Node.js server and Jquery client | Simple secure websocket (wss) chat using Node.js server and Jquery client
I have added voice to this chat, so it is now a combined voice/text chat. You can find my contribution up on github at the following URL:
https://github.com/HowardRichman/simple-text-voice-chat-in-node-and-javascript
Here is a working example ... | https://stackoverflow.com/questions/54063255/simple-secure-websocket-wss-chat-using-node-js-server-and-jquery-client | javascript, node.js, websocket, mod-proxy-wstunnel | 1,546,790,064 |
se_46018212 | stackoverflow | FRONTEND_DEVELOPMENT | scrollTo() function does nothing | scrollTo() function does nothing
I wanted to scroll to the bottom of the page using vanilla JS, but I encountered a problem. The code below is supposed to scroll to the bottom of the page:
window.scrollTo(0,document.body.scrollHeight);
Whereas all it does is logs "undefined" in the console. Inputting
document.body... | https://stackoverflow.com/questions/46018212/scrollto-function-does-nothing | javascript, google-chrome, scrollbar | 1,504,386,583 |
se_56162138 | stackoverflow | FRONTEND_DEVELOPMENT | How to give width, height, x and y coordinates in generating pdf from html using JSPDF new html API | How to give width, height, x and y coordinates in generating pdf from html using JSPDF new html API
I have been using JSPDF to generate pdf document based on some html. Earlier using jspdf fromHTML Api, we could give margins like this
var margins2 = {
top: 415,
bottom: 10,
left: 55,
widt... | https://stackoverflow.com/questions/56162138/how-to-give-width-height-x-and-y-coordinates-in-generating-pdf-from-html-using | javascript, pdf, pdf-generation, jspdf, jspdf-autotable | 1,557,988,176 |
se_79980516 | stackoverflow | FRONTEND_DEVELOPMENT | Why would one use WebAssembly in the backend? | Why would one use WebAssembly in the backend?
From my research, I understand WebAssembly is a tool that allows software developers to run non-JavaScript languages (e.g., C/C++) on the client-side, but I have also seen comments online suggesting it can be used on the backend.
In what scenario would a developer need to ... | https://stackoverflow.com/questions/79980516/why-would-one-use-webassembly-in-the-backend | advice, javascript, webassembly | 1,784,003,175 |
se_79983478 | stackoverflow | FRONTEND_DEVELOPMENT | Is it possible to retrieve all non-contiguous text selections in Microsoft Word using Office.js? | Is it possible to retrieve all non-contiguous text selections in Microsoft Word using Office.js?
I am developing a Microsoft Word Add-in using Office.js.
Microsoft Word allows users to select multiple non-contiguous text ranges by holding the Ctrl key on Windows or the Command (⌘) key on macOS while making additional ... | https://stackoverflow.com/questions/79983478/is-it-possible-to-retrieve-all-non-contiguous-text-selections-in-microsoft-word | javascript, ms-word, office-js | 1,784,625,205 |
se_46577690 | stackoverflow | FRONTEND_DEVELOPMENT | Hide Bootstrap Modal using Pure JavaScript On Click | Hide Bootstrap Modal using Pure JavaScript On Click
I was working on Bootstrap Pop Up Modals.
I have 2 Buttons named Button1 & Button2.
&
I have 2 Modals named Modal1 & Modal2.
Note : Button2 is inside the Modal1 & Button1 is on the Web Page.
If I click Button1 , Modal1 should be Open & If I click Button2 tha... | https://stackoverflow.com/questions/46577690/hide-bootstrap-modal-using-pure-javascript-on-click | javascript, twitter-bootstrap | 1,507,176,416 |
se_44597875 | stackoverflow | FRONTEND_DEVELOPMENT | CSS won't align <li> | CSS won't align <li>
I want to set list in header section but everytime I do, my home, about and blog goes out of background color or background color minimize. I don't know how much you can understand me what I want to say if you want I can put picture where I want list to be.
header {
background: #3048... | https://stackoverflow.com/questions/44597875/css-wont-align-li | javascript, html, css | 1,497,646,575 |
se_14484787 | stackoverflow | FRONTEND_DEVELOPMENT | How to insert newlines into a string variable every n characters in JavaScript | How to insert newlines into a string variable every n characters in JavaScript
I have a variable named str in JavaScript and it contains text, saying something like:
"A quick brown fox jumps over a lazy dog".
I want the text to wrap at certain points, and I want to insert the proper \n or <br> tags at the correct pl... | https://stackoverflow.com/questions/14484787/how-to-insert-newlines-into-a-string-variable-every-n-characters-in-javascript | javascript, jquery, newline, word-wrap | 1,358,959,287 |
se_17163897 | stackoverflow | FRONTEND_DEVELOPMENT | How do you document an array of objects as a parameter in JSDoc? | How do you document an array of objects as a parameter in JSDoc?
I have an array that looks like this:
[{
"name": "c917379",
"email": "jim@bmw.de"
},
{
"name": "c917389",
"email": "jane@bmw.de"
}]
It is an array of arbitrary length with a number of repeating fields (I've reduced this to two fields ... | https://stackoverflow.com/questions/17163897/how-do-you-document-an-array-of-objects-as-a-parameter-in-jsdoc | javascript, jsdoc | 1,371,543,714 |
se_46553062 | stackoverflow | FRONTEND_DEVELOPMENT | What is the preferred declaration convention for objects or arrays: const or let? | What is the preferred declaration convention for objects or arrays: const or let?
I'm not asking what's technically possible; I know you can do
const a = [];
const b = {};
a.push['sup'];
b.test = 'earth';
What I'm wondering is whether there's any convention for preferring let over const when it comes to arrays and ... | https://stackoverflow.com/questions/46553062/what-is-the-preferred-declaration-convention-for-objects-or-arrays-const-or-let | javascript, standards, tslint | 1,507,063,223 |
se_41685693 | stackoverflow | FRONTEND_DEVELOPMENT | How to warn when you forget to `await` an async function in Javascript? | How to warn when you forget to `await` an async function in Javascript?
I'm using Babel and Webpack. If I forget to await an async function, it can often go unnoticed. Once in a while, if I forgot the await, an error occurs in the async function and I get an Unhandled promise rejection. Then, I realize that I forgot t... | https://stackoverflow.com/questions/41685693/how-to-warn-when-you-forget-to-await-an-async-function-in-javascript | javascript, webpack, babeljs | 1,484,603,959 |
se_77286160 | stackoverflow | FRONTEND_DEVELOPMENT | How to get page title in Nuxt 3? | How to get page title in Nuxt 3?
I am struggling to find a way to get page title in Nuxt 3 and reuse it in layout. I am pretty sure there is a way to do it through some meta object but I just can not find it.
I tried to do it through route meta
/layouts/default.vue
<template>
<h1>
{{ route.meta.title }}
... | https://stackoverflow.com/questions/77286160/how-to-get-page-title-in-nuxt-3 | javascript, vue.js, nuxt.js | 1,697,185,180 |
se_307179 | stackoverflow | FRONTEND_DEVELOPMENT | What is JavaScript's highest integer value that a number can go to without losing precision? | What is JavaScript's highest integer value that a number can go to without losing precision?
Is this defined by the language? Is there a defined maximum? Is it different in different browsers? | https://stackoverflow.com/questions/307179/what-is-javascripts-highest-integer-value-that-a-number-can-go-to-without-losin | javascript, math, browser, cross-browser, largenumber | 1,227,221,274 |
se_79963399 | stackoverflow | FRONTEND_DEVELOPMENT | Text horizontally next to an image on a navbar | Text horizontally next to an image on a navbar
<nav class="navbar navbar-expand-lg bg-transparent "> <!--bg-body-tertiary*/-->
<div class="container-fluid">
<a class="navbar-brand m-3" ><img src="../images/main/unssaf_marquee.jpg" alt="marq" width="150" height="225">
<h1 class="style2" ><strong>WELCOME ... | https://stackoverflow.com/questions/79963399/text-horizontally-next-to-an-image-on-a-navbar | javascript, html, css, class, nav | 1,781,919,692 |
se_31115151 | stackoverflow | FRONTEND_DEVELOPMENT | how to get the href of a link when I press another href | how to get the href of a link when I press another href
I want to get the attr href of an above link beside the one I press which is the last link from productinfo div class. I tried with closest but it gets me the same link I press and I want the above one. The link I want to store in produs_href is the link from fir... | https://stackoverflow.com/questions/31115151/how-to-get-the-href-of-a-link-when-i-press-another-href | javascript, jquery, ajax, html | 1,435,579,222 |
se_14178674 | stackoverflow | FRONTEND_DEVELOPMENT | If class equals something then add attrib to another div | If class equals something then add attrib to another div
I am trying to write a function that will look for the class name "blocknew", and then add to the imgframe div's style attribute. Is this even possible?
Go from this:
<div class="block"><div class="imgframe" style="background:url(images/blah.jpg);"></div></div>
... | https://stackoverflow.com/questions/14178674/if-class-equals-something-then-add-attrib-to-another-div | javascript, html, jquery, css | 1,357,439,360 |
se_79982108 | stackoverflow | FRONTEND_DEVELOPMENT | Could this fetch response still be cached by the browser? | Could this fetch response still be cached by the browser?
Please suppose that fetch an BLOB of data as below:
fetchAudio = fetch(
`http://${url}/audio/${id}`,
{ method: 'GET', mode: 'same-origin', cache: 'no-store' }
);
and then perform all relevant steps to ensure that the fetch was success... | https://stackoverflow.com/questions/79982108/could-this-fetch-response-still-be-cached-by-the-browser | javascript, fetch-api, browser-cache, revokeobjecturl | 1,784,512,746 |
se_67141439 | stackoverflow | FRONTEND_DEVELOPMENT | How to test Reac Lazy inside an object | How to test Reac Lazy inside an object
At the project I'm working on, there's a few named exports like the object below:
export const object = {
component: React.lazy(() => import('some-component'))
}
(They have more properties but I'll just show this one for brevity)
The issue
When I try to test it using Jest, I... | https://stackoverflow.com/questions/67141439/how-to-test-reac-lazy-inside-an-object | javascript, reactjs, testing, jestjs | 1,618,682,902 |
se_34227535 | stackoverflow | FRONTEND_DEVELOPMENT | ServiceNow UI Action calling client and server code | ServiceNow UI Action calling client and server code
I have a UI action that I created and I am attempting to use a GlideDialogForm to get and return user input to the UI action. I am new to scripting in general (and ServiceNow in particular) and can't figure out where to stick the paces of my code to make it flow. The... | https://stackoverflow.com/questions/34227535/servicenow-ui-action-calling-client-and-server-code | javascript, servicenow | 1,449,849,271 |
se_34582471 | stackoverflow | FRONTEND_DEVELOPMENT | Define cell format on AlaSQL/JS-XLSX Excel Export | Define cell format on AlaSQL/JS-XLSX Excel Export
Is it possible to define cell format on AlaSQL export to Excel?
I'm maintaining a system that exports grid data to Excel using AlaSQL. The problem is that Excel data is not being converted to NUMBER. DATE values do OK, but Numeric types are always displayed as General.... | https://stackoverflow.com/questions/34582471/define-cell-format-on-alasql-js-xlsx-excel-export | javascript, excel, alasql | 1,451,860,823 |
se_79981183 | stackoverflow | FRONTEND_DEVELOPMENT | Audio blobs and objectURL: is there a create/load delay in Firefox? | Audio blobs and objectURL: is there a create/load delay in Firefox?
I cannot provide a MWE because this involves loading audio blobs. These appear to be the relevant parts of the code, which has run in Firefox without issue for the past two years--unless I just never hit this scenario but I think that is unlikely. Als... | https://stackoverflow.com/questions/79981183/audio-blobs-and-objecturl-is-there-a-create-load-delay-in-firefox | javascript, audio, createobjecturl | 1,784,182,125 |
se_71271770 | stackoverflow | FRONTEND_DEVELOPMENT | Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable when accessing available var | Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable when accessing available var
I'm writing a client that communicates with a websocket server. Currently, the socket server sends a generated "token" to the client, which then sets it in storage with:
localStorage.setItem('t... | https://stackoverflow.com/questions/71271770/uncaught-domexception-an-attempt-was-made-to-use-an-object-that-is-not-or-is-n | javascript, websocket, local-storage | 1,645,823,576 |
se_28781290 | stackoverflow | FRONTEND_DEVELOPMENT | Javascript if statement if (ball.style.left === '0px') { | Javascript if statement if (ball.style.left === '0px') {
I think the problem is really simple, but I'm not seeing it.
I just want to move the "ball" to the left 132.5px when I click the "dice" and if the ball is 0px left.
I think the if statement is wrong!! Can someone help me?
var ball = document.getEleme... | https://stackoverflow.com/questions/28781290/javascript-if-statement-if-ball-style-left-0px | javascript, css | 1,425,123,677 |
se_36995617 | stackoverflow | FRONTEND_DEVELOPMENT | Convert Array-like objects, Array.prototype.slice or Array.from | Convert Array-like objects, Array.prototype.slice or Array.from
I know there are two ways to convert Array-like objects to Array.
Array.prototype.slice.call(arguments)
Array.from(arguments)
I wonder what's the differences between them , which one should I use to convert Array-like objects. | https://stackoverflow.com/questions/36995617/convert-array-like-objects-array-prototype-slice-or-array-from | javascript | 1,462,249,653 |
se_79958924 | stackoverflow | FRONTEND_DEVELOPMENT | Is fixing child.prototype.constructor necessary in ES5 if we solely rely on [[Prototype]] check methods like Object.getPrototypeOf()? | Is fixing child.prototype.constructor necessary in ES5 if we solely rely on [[Prototype]] check methods like Object.getPrototypeOf()?
When implementing the parasitic combination inheritance pattern in ES5, almost every resource (including Nicholas Zakas' book) insists on fixing the constructor property like this:
func... | https://stackoverflow.com/questions/79958924/is-fixing-child-prototype-constructor-necessary-in-es5-if-we-solely-rely-on-pr | javascript, constructor, prototype, ecmascript-5, ecmascript-3 | 1,781,476,695 |
se_73768686 | stackoverflow | FRONTEND_DEVELOPMENT | how to add header to fetch GET method | how to add header to fetch GET method
In my header, I will send token for authentication to my back-end
but I don't know how I can add header to get method ..
fetch('https://api.github.com/users/mralexgray/repos', {
method: 'GET',
headers: {
"Content-Type":"application/json",
"Accept": "applica... | https://stackoverflow.com/questions/73768686/how-to-add-header-to-fetch-get-method | javascript, authentication, fetch-api, getmethod | 1,663,563,708 |
se_38796756 | stackoverflow | FRONTEND_DEVELOPMENT | React Components - What is the proper way to create them? | React Components - What is the proper way to create them?
I'm learning React and I came across two different ways to create components. One is by Facebook and the other by AirBnB. I also saw them in the tutorials I've been watching.
This may be a stupid question, but which one is better?
Facebook:
var React = requi... | https://stackoverflow.com/questions/38796756/react-components-what-is-the-proper-way-to-create-them | javascript, reactjs, components, frontend, jsx | 1,470,426,286 |
se_3978492 | stackoverflow | FRONTEND_DEVELOPMENT | Fastest way to duplicate an array in JavaScript - slice vs. 'for' loop | Fastest way to duplicate an array in JavaScript - slice vs. 'for' loop
In order to duplicate an array in JavaScript, which of the following is faster to use?
slice method
var dup_array = original_array.slice();
for loop
for(var i = 0, len = original_array.length; i < len; ++i)
dup_array[i] = original_arr... | https://stackoverflow.com/questions/3978492/fastest-way-to-duplicate-an-array-in-javascript-slice-vs-for-loop | javascript, arrays, duplicates, copy, slice | 1,287,582,235 |
se_44613870 | stackoverflow | FRONTEND_DEVELOPMENT | How to get class (Index) serial number of clicked button | How to get class (Index) serial number of clicked button
I need help!
HTML
<input type="button" onclick="myFunction()" class="myButton" value="Button1">
<input type="button" onclick="myFunction()" class="myButton" value="Button2">
<input type="button" onclick="myFunction()" class="myButton" value="Button3">
<input t... | https://stackoverflow.com/questions/44613870/how-to-get-class-index-serial-number-of-clicked-button | javascript, html, css | 1,497,780,383 |
se_71776123 | stackoverflow | FRONTEND_DEVELOPMENT | What is a factory function? | What is a factory function?
I understand that this question may be considered broad. I am currently learning Javascript and throughout the process I've stumbled upon different terms of functions that are thrown around such as: factory function, and constructor functions regarding to object-oriented programming. I am h... | https://stackoverflow.com/questions/71776123/what-is-a-factory-function | javascript, oop | 1,649,303,511 |
se_44711536 | stackoverflow | FRONTEND_DEVELOPMENT | Executing the function appear() appear inside If statement | Executing the function appear() appear inside If statement
//Blinking of the letter " X " on the Screen
function blink() {
document.getElementById('blinkText').innerHTML = "";
setTimeout("appear()", Math.random() * 3000);
}
//Re-Appearing of the letter " X " on the Screen
function appear() {
document.getElement... | https://stackoverflow.com/questions/44711536/executing-the-function-appear-appear-inside-if-statement | javascript, html, css | 1,498,179,859 |
se_44183324 | stackoverflow | FRONTEND_DEVELOPMENT | Check if file is corrupted with node.js | Check if file is corrupted with node.js
There are some ways to check file is corrupted with node.js?
I tried many File System methods, like fs.readFile, fs.open and fs.access but all of them return ok status, and I'm sure my file is corrupted in my tests.
To be more clear, my objective is to check if PDF is readable (... | https://stackoverflow.com/questions/44183324/check-if-file-is-corrupted-with-node-js | javascript, node.js | 1,495,723,212 |
se_42120501 | stackoverflow | FRONTEND_DEVELOPMENT | boostrap-select error: Uncaught TypeError: Cannot read property '3' | boostrap-select error: Uncaught TypeError: Cannot read property '3'
Boostrap select live search brings an error when typing into the box snapshot
and javascript console error log
bootstrap-select.js:199 Uncaught TypeError: Cannot read property '3' of undefined
at a.expr.pseudos.icontains (bootstrap-sele... | https://stackoverflow.com/questions/42120501/boostrap-select-error-uncaught-typeerror-cannot-read-property-3 | javascript, jquery, twitter-bootstrap | 1,486,577,209 |
se_44513023 | stackoverflow | FRONTEND_DEVELOPMENT | Pop up mobile menu issue | Pop up mobile menu issue
Having issues with the mobile menu for a site. Opening and closing animation of the background is no worries, gets the information up there, whenever I am testing and click on one of the links it just closes the animation and nothing happens. Also can't get the close animation of the text to w... | https://stackoverflow.com/questions/44513023/pop-up-mobile-menu-issue | javascript, html, css | 1,497,331,829 |
se_71132570 | stackoverflow | FRONTEND_DEVELOPMENT | Discord.js DiscordAPIError: Invalid Form Body issue | Discord.js DiscordAPIError: Invalid Form Body issue
I have a Discord bot and there is a problem with the command named privacy policy in this bot, I asked a lot of people and they said they don't know.
Node.js version: 16.13.2
Discord.js version: 13.6.0
MAİN
client.commands = new Collection();
const commandFiles = ... | https://stackoverflow.com/questions/71132570/discord-js-discordapierror-invalid-form-body-issue | javascript, node.js, discord, discord.js | 1,644,954,829 |
se_26025677 | stackoverflow | FRONTEND_DEVELOPMENT | Bootstrap Validator not working on File Input | Bootstrap Validator not working on File Input
I have a form field that should only accept a .jpg or .png image at a certain file size. The validation doesn't seem to be working(tested with invalid file types). This is what I have so far, so what is it I'm missing? I should work like it does here http://bootstrapvalida... | https://stackoverflow.com/questions/26025677/bootstrap-validator-not-working-on-file-input | javascript, jquery | 1,411,589,710 |
se_17469837 | stackoverflow | FRONTEND_DEVELOPMENT | window.opener undefined in JavaScript popup after redirect | window.opener undefined in JavaScript popup after redirect
I have a problem with a website that displays a payment dialog using window.open().
The page in the popup redirects to a different domain that redirects back to a result page. On the result page, I try to set a property on window.opener to signal that the pay... | https://stackoverflow.com/questions/17469837/window-opener-undefined-in-javascript-popup-after-redirect | javascript, html | 1,372,939,460 |
se_44505724 | stackoverflow | FRONTEND_DEVELOPMENT | How to center bootstrap row elements? | How to center bootstrap row elements?
I'm trying to figure out how to center the contents of a row bootstrap. I'll explain:
The Row consists of 12 columns (as normal for bootstrap). In my layout, I use only 9 (3 elements out of 3). How do I make the excess space be equally divided between the outer margins of my width... | https://stackoverflow.com/questions/44505724/how-to-center-bootstrap-row-elements | javascript, html, css | 1,497,289,700 |
se_44130986 | stackoverflow | FRONTEND_DEVELOPMENT | Align elements in form of a table horizontally | Align elements in form of a table horizontally
I am making an App in which I have a slide in/out menu. When this menu is displayed I want it to show the images in two rows. Since there are many images, I want to have a horizontal scroll to navigate through them as well as arrows.
My problem is that I am not able arr... | https://stackoverflow.com/questions/44130986/align-elements-in-form-of-a-table-horizontally | javascript, html, css | 1,495,531,970 |
se_51395393 | stackoverflow | FRONTEND_DEVELOPMENT | How to trigger `paste` event manually in javascript? | How to trigger `paste` event manually in javascript?
I have an event listener which listens on ctrl - v paste event. Inside the listener I use clipboardData.getData method to get the copied data from clipboard. But now I need to implement a button when users click on that button it does the copy logic. My question is ... | https://stackoverflow.com/questions/51395393/how-to-trigger-paste-event-manually-in-javascript | javascript, html | 1,531,896,814 |
se_65467233 | stackoverflow | FRONTEND_DEVELOPMENT | WP5 Module Federation: Singleton instantiated multiple times | WP5 Module Federation: Singleton instantiated multiple times
Unfortunately, my repro for this is in a complex proprietary project, so I will do my best to explain what is going on.
The closest example project to my use-case is this one: https://github.com/module-federation/module-federation-examples/tree/master/dynami... | https://stackoverflow.com/questions/65467233/wp5-module-federation-singleton-instantiated-multiple-times | javascript, webpack, webpack-5, webpack-module-federation | 1,609,082,149 |
se_77341789 | stackoverflow | FRONTEND_DEVELOPMENT | How do I use vite with the "new" .net 7 web assembly project | How do I use vite with the "new" .net 7 web assembly project
I am building an client-side application (using html/javascript) and would like to use a web assembly in it, compiled with .net 7.
https://learn.microsoft.com/en-us/aspnet/core/client-side/dotnet-interop
https://www.meziantou.net/using-dotnet-code-... | https://stackoverflow.com/questions/77341789/how-do-i-use-vite-with-the-new-net-7-web-assembly-project | javascript, .net, vite, webassembly, .net-7.0 | 1,698,010,702 |
se_53777184 | stackoverflow | FRONTEND_DEVELOPMENT | Postman - Get only endpoint from a URL | Postman - Get only endpoint from a URL
Having this kind of endpoint:
https://example.com/p1/m/p2
I want to get rid of the https://example.com and get only the /p1/m/p2 part on the Pre-request Script.
I know I can do it using request.url.replace(/^.*\/\/[^\/]+/, ''), getting the desired output /p1/m/p2.
Is there any ot... | https://stackoverflow.com/questions/53777184/postman-get-only-endpoint-from-a-url | javascript, url, postman, url-parsing | 1,544,780,885 |
se_79981958 | stackoverflow | FRONTEND_DEVELOPMENT | Why can my VS Code extension client not find a local module? | Why can my VS Code extension client not find a local module?
I am writing a VS Code extension called bg3-osiris that has a server and client. I would like to add a shared module that contains definitions for requests and request parameters made between the client and server. The client and server should both be able t... | https://stackoverflow.com/questions/79981958/why-can-my-vs-code-extension-client-not-find-a-local-module | javascript, typescript, npm, vscode-extensions | 1,784,441,569 |
se_49119014 | stackoverflow | FRONTEND_DEVELOPMENT | React Select with very large options lists | React Select with very large options lists
I have a select component that will need to handle around 7,000 options in it. I am running into two problems.
1) when typing into the search parameter things are loading too slowly.
2) I need to filter though all of the options and disable options that have previously been... | https://stackoverflow.com/questions/49119014/react-select-with-very-large-options-lists | javascript, reactjs, large-data, react-select | 1,520,282,143 |
se_40523895 | stackoverflow | FRONTEND_DEVELOPMENT | Why can’t a `let` declaration read from the same identifier from an outer scope? | Why can’t a `let` declaration read from the same identifier from an outer scope?
I was playing with some code and ran into a situation where I couldn't identify why let is behaving the way it does.
For the below block of code:
var x = 20; // global scope
function f() {
let x = x || 30;
}
f(); // VM3426:1 Uncau... | https://stackoverflow.com/questions/40523895/why-can-t-a-let-declaration-read-from-the-same-identifier-from-an-outer-scope | javascript | 1,478,769,644 |
se_29455407 | stackoverflow | FRONTEND_DEVELOPMENT | How to add any event in fullcalendar on click of button? | How to add any event in fullcalendar on click of button?
I have added ('+') button on each day/ cells.
var add_button = '<input type="button" value="+" />';
$(".fc-day-number").prepend(add_button);
How to add event after clicking on this ('+') button, able to do the same on click of any day by writing this:
day... | https://stackoverflow.com/questions/29455407/how-to-add-any-event-in-fullcalendar-on-click-of-button | javascript, jquery, fullcalendar, fullcalendar-3 | 1,428,221,851 |
se_12342092 | stackoverflow | FRONTEND_DEVELOPMENT | How to detect touch device browsers vs desktop using javascript? | How to detect touch device browsers vs desktop using javascript?
What is the code to detect touch devices (smartphones and tablets) vs desktops browsers using userAgent.match and return a boolean variable (for example 'isipad')?
I need to test this against Android and Apple devices mainly. If the device browser is An... | https://stackoverflow.com/questions/12342092/how-to-detect-touch-device-browsers-vs-desktop-using-javascript | javascript, user-agent, browser-detection, device-detection | 1,347,217,836 |
se_71930979 | stackoverflow | FRONTEND_DEVELOPMENT | Uncaught TypeError: Cannot read properties of undefined (reading 'maps') | Uncaught TypeError: Cannot read properties of undefined (reading 'maps')
I'm trying to display map from google map on file html.twig, but this errors it displayed to me
Uncaught TypeError: Cannot read properties of undefined (reading 'maps')
my twig :
let map, google;
let markers = [];
var infowindow = n... | https://stackoverflow.com/questions/71930979/uncaught-typeerror-cannot-read-properties-of-undefined-reading-maps | javascript, google-maps | 1,650,400,263 |
se_36142349 | stackoverflow | FRONTEND_DEVELOPMENT | Cannot find module from "undefined" | Cannot find module from "undefined"
I am trying to import an external module inside my Sublime Text 3. The external module Ship.ts is a s follows:
export interface Ship {
name: string;
port: string;
displacement: number;
}
The output.ts file contains import Ship = require("./Ship"); and this f... | https://stackoverflow.com/questions/36142349/cannot-find-module-from-undefined | javascript, typescript | 1,458,597,223 |
se_37053175 | stackoverflow | FRONTEND_DEVELOPMENT | TypeError: socket.emit is not a function | TypeError: socket.emit is not a function
I'm trying to write basic online game, just to check my current level in web programming. Here is some code I have right now:
var io = require('socket.io') (serv, {});
io.sockets.on('connection', function(socket) {
console.log('1 '+socket);
function fight (player,monste... | https://stackoverflow.com/questions/37053175/typeerror-socket-emit-is-not-a-function | javascript, node.js, socket.io | 1,462,458,320 |
se_58745857 | stackoverflow | FRONTEND_DEVELOPMENT | How to format a cell header in xlsx angular | How to format a cell header in xlsx angular
How to format a cell in angular using xlsx or the cellStyles.
here's the code.
list.component.ts
const ws = XLSX.utils.json_to_sheet(reportData);
ws['!cols'] = [];
Object.keys(reportData[0]).forEach((cell: any) => {
const colWidth =
... | https://stackoverflow.com/questions/58745857/how-to-format-a-cell-header-in-xlsx-angular | javascript, angular | 1,573,119,650 |
se_57967757 | stackoverflow | FRONTEND_DEVELOPMENT | How can I pass multiple value by select in reactjs | How can I pass multiple value by select in reactjs
I need to pass multiple value by using onChange when I select the option, but I can not select single option . it select whole objects .
Here is my code .
const test = [{id:1, name:'test, value:{x:10}}]
<Select
showSearch
style={{ width: 200 }}
placeh... | https://stackoverflow.com/questions/57967757/how-can-i-pass-multiple-value-by-select-in-reactjs | javascript, arrays, node.js, reactjs, object | 1,568,697,585 |
se_63678723 | stackoverflow | FRONTEND_DEVELOPMENT | Is there a Python equivalent to template literals in JavaScript? | Is there a Python equivalent to template literals in JavaScript?
To provide a basic example, say I wanted to write:
name = str(input())
age = int(input())
print('Hi, {name}, you are {age}.')
In javascript, this would look like:
console.log(`Hi, ${name}, you are ${age}.`)
I assume there is no direct implementation of... | https://stackoverflow.com/questions/63678723/is-there-a-python-equivalent-to-template-literals-in-javascript | javascript, python, template-literals | 1,598,911,116 |
se_31792106 | stackoverflow | FRONTEND_DEVELOPMENT | How to detect Caps Lock state on page load (that is, not on keypress) with JavaScript? | How to detect Caps Lock state on page load (that is, not on keypress) with JavaScript?
So I've been researching solutions for Caps Lock detection for a form, using JavaScript/jQuery. There is a huge thread on stackoverflow offering many solutions. But the only problem is they don't check whether Caps Lock is pressed d... | https://stackoverflow.com/questions/31792106/how-to-detect-caps-lock-state-on-page-load-that-is-not-on-keypress-with-javas | javascript, forms, capslock | 1,438,618,562 |
se_63561502 | stackoverflow | FRONTEND_DEVELOPMENT | How to add a script to a wordpress page based on category | How to add a script to a wordpress page based on category
We recently contracted a digital marketing firm and they've given me 3 tracking scripts to add to our site: 1 for the home page, 1 for product pages and 1 for all other pages. I have the script being added to the front page and the general product page as expec... | https://stackoverflow.com/questions/63561502/how-to-add-a-script-to-a-wordpress-page-based-on-category | javascript, wordpress | 1,598,273,762 |
se_57861796 | stackoverflow | FRONTEND_DEVELOPMENT | How to set data from a react hook inside of a function or event? | How to set data from a react hook inside of a function or event?
I'm trying to learn to create hooks so I can re-use data that I have to change in different components.
I'm using Material UI's Tabs and need to use useTab, a custom hook to change the tab id.
import React, { useContext } from 'react';
import { Product... | https://stackoverflow.com/questions/57861796/how-to-set-data-from-a-react-hook-inside-of-a-function-or-event | javascript, reactjs, next.js | 1,568,067,222 |
se_75883720 | stackoverflow | FRONTEND_DEVELOPMENT | 504 (Outdated Optimize Dep) while using react-vite | 504 (Outdated Optimize Dep) while using react-vite
I installed a package called big decimal js while using React with JavaScript on Vite. On compiling, it showed the following error on the console, and the application did not load:
My package.json:
{
"name": "settleup",
"private": true,
"version": "0.0.0",
"t... | https://stackoverflow.com/questions/75883720/504-outdated-optimize-dep-while-using-react-vite | javascript, reactjs, vite, bigdecimal | 1,680,144,511 |
se_69955497 | stackoverflow | FRONTEND_DEVELOPMENT | Problem with service worker JavaScript on mobile browsers | Problem with service worker JavaScript on mobile browsers
This is driving me crazy. I have been trying to implement push notifications for a website and I found a solution (Javacript API notification). The thing is: notifications are not working on mobile devices.
I read about service workers and I have been using thi... | https://stackoverflow.com/questions/69955497/problem-with-service-worker-javascript-on-mobile-browsers | javascript, mobile, notifications | 1,636,815,908 |
se_44059913 | stackoverflow | FRONTEND_DEVELOPMENT | How to do two symmetric rectangular triangles in JavaScript | How to do two symmetric rectangular triangles in JavaScript
I would like to do something like this with JavaScript.
This is my code for creating the first half:
var numberOfLines = 10;
var str = '*';
var space = ' ';
for (var i = 0; i < numberOfLines; i++){
document.write(str ... | https://stackoverflow.com/questions/44059913/how-to-do-two-symmetric-rectangular-triangles-in-javascript | javascript, html, css | 1,495,155,981 |
se_43379496 | stackoverflow | FRONTEND_DEVELOPMENT | Popup pointing to button CSS | Popup pointing to button CSS
I have a button in my form. When I press the button i want to execute my CSS script. The CSS code shows a popup box.
Goal
The goal is when i click on the button it fires up my CSS popup which will be pointing to my button.
Edit
I managed to get the popup showing onClick but now the popup b... | https://stackoverflow.com/questions/43379496/popup-pointing-to-button-css | javascript, html, css | 1,492,030,549 |
se_79850003 | stackoverflow | FRONTEND_DEVELOPMENT | any opinion on use AI for vibe coding as a newbie | any opinion on use AI for vibe coding as a newbie
How to learn javascript and typescript programing DSA in current day and age without use AI cheat code and can any one tech me as mentor that would be helpful, I'm always getting jammed around when hard coding javascript syntaxes but i know how im going to solve the p... | https://stackoverflow.com/questions/79850003/any-opinion-on-use-ai-for-vibe-coding-as-a-newbie | javascript, node.js, typescript, next.js | 1,766,030,566 |
se_79970309 | stackoverflow | FRONTEND_DEVELOPMENT | Getting image from external endpoint in Node and passing to React | Getting image from external endpoint in Node and passing to React
I am consuming an external endpoint that provides product images from an ERP system.
Using the endpoint in Postman I can see the actual image in the preview and can view the raw body or base64.
I want to show this image in my React frontend but have to ... | https://stackoverflow.com/questions/79970309/getting-image-from-external-endpoint-in-node-and-passing-to-react | javascript, node.js, image, base64 | 1,782,735,557 |
se_43982854 | stackoverflow | FRONTEND_DEVELOPMENT | Using getElementById() with bgcolor attribute | Using getElementById() with bgcolor attribute
Why doesn't this code work?
<!DOCTYPE html>
<html>
<head>
<title> Home </title>
</head>
<body id = "b" bgcolor = "lightblue">
<button onclick = "document.getElementById('b').bgcolor = 'lightgreen'"> Light Green </button>
... | https://stackoverflow.com/questions/43982854/using-getelementbyid-with-bgcolor-attribute | javascript, html, css | 1,494,860,729 |
se_43768111 | stackoverflow | FRONTEND_DEVELOPMENT | How to make the below text in the center of the box in responsive way? | How to make the below text in the center of the box in responsive way?
Here is the Problem; I want to vertically align the text:
Here is my Code on jsfiddle:
https://jsfiddle.net/AliRaza610/c5gs3Lnn/3/
I want the text block in the middle in responsive grid. In this example if I change the size the text is no longer i... | https://stackoverflow.com/questions/43768111/how-to-make-the-below-text-in-the-center-of-the-box-in-responsive-way | javascript, html, css | 1,493,838,272 |
se_43696605 | stackoverflow | FRONTEND_DEVELOPMENT | Adding text JavaScript progressbar | Adding text JavaScript progressbar
I would like to add a description text to my progress bar. This description text should appear at the left top of the bar. The best way to do it is by modifying my JavaScript. It should be very easy to do but I don't have a lot of knowledge in js and I don't know how to do it.
Here i... | https://stackoverflow.com/questions/43696605/adding-text-javascript-progressbar | javascript, html, css | 1,493,474,730 |
se_3319870 | stackoverflow | FRONTEND_DEVELOPMENT | Is there a framework for multiplayer board game in JavaScript? | Is there a framework for multiplayer board game in JavaScript?
I will probably use javascript to develop an online board/card game.
My approach will be to have a client that will be able to work in standalone mode, so it must enforce rules. That means for example, if a player can't play a card, he or she shouldn't eve... | https://stackoverflow.com/questions/3319870/is-there-a-framework-for-multiplayer-board-game-in-javascript | javascript, node.js, erlang, game-engine | 1,279,900,111 |
se_63769583 | stackoverflow | FRONTEND_DEVELOPMENT | How to find X and Y position of text caret/cursor | How to find X and Y position of text caret/cursor
I want to position a pop-up element directly below the text caret/blinking text cursor in a textarea or content editable element.
I've found answers that give me the text index within an element where the caret exists, but as far as I can tell this is useless to me. (l... | https://stackoverflow.com/questions/63769583/how-to-find-x-and-y-position-of-text-caret-cursor | javascript | 1,599,433,061 |
se_46067156 | stackoverflow | FRONTEND_DEVELOPMENT | How to merge two strings alternatively in javascript? | How to merge two strings alternatively in javascript?
given input str1 is "abc" and str2 is "def" output should be adbecf
and given str1 = "ab" and str2 = "def" output should be adbef
my output has been:
merge('abc','def')
"adbecfNaN"
merge('ab','def')
"adbeundefinedf"
I have been attempting to filter undefined an... | https://stackoverflow.com/questions/46067156/how-to-merge-two-strings-alternatively-in-javascript | javascript, string, merge | 1,504,674,376 |
se_7888238 | stackoverflow | FRONTEND_DEVELOPMENT | Javascript Split string on UpperCase Characters | Javascript Split string on UpperCase Characters
How do you split a string into an array in JavaScript by Uppercase character?
So I wish to split:
'ThisIsTheStringToSplit'
into
['This', 'Is', 'The', 'String', 'To', 'Split'] | https://stackoverflow.com/questions/7888238/javascript-split-string-on-uppercase-characters | javascript | 1,319,540,325 |
se_66929570 | stackoverflow | FRONTEND_DEVELOPMENT | How to differentiate on click handler? | How to differentiate on click handler?
I have a navigation class component in which I want to use modal after clicking in 'about' or 'contact'.
I use event handler which changes state and then open modal, but I don't know how to differentiate the click between 'about' and 'contact' to open different modal. Any help?
c... | https://stackoverflow.com/questions/66929570/how-to-differentiate-on-click-handler | javascript, reactjs | 1,617,442,289 |
se_43432760 | stackoverflow | FRONTEND_DEVELOPMENT | Looking for a fast prime-counting function | Looking for a fast prime-counting function
I need to calculate the number of primes less than or equal to some N, which is the prime-counting function or the PI function. I have this one but it works too slowly:
function PI(x) {
var primes = 4;
for (var i = 3; i <= x; i += 2) {
if (i % 3 === 0 || i % ... | https://stackoverflow.com/questions/43432760/looking-for-a-fast-prime-counting-function | javascript | 1,492,305,384 |
se_66403904 | stackoverflow | FRONTEND_DEVELOPMENT | How do I check if a value has changed in Javascript? | How do I check if a value has changed in Javascript?
So, how do you check if a value has changed in Javascript by user input? For example, if they clicked a button that would change a variable's value by 1, how do you detect that?
Currently, I have a variable:
var value = 1;
var lastValue = value;
and I want to detec... | https://stackoverflow.com/questions/66403904/how-do-i-check-if-a-value-has-changed-in-javascript | javascript, variables | 1,614,463,801 |
se_62261430 | stackoverflow | FRONTEND_DEVELOPMENT | How to update the value of a javascript map with object key | How to update the value of a javascript map with object key
I have a map with an object as a key. For example: {date:"01/01/1990", idActiv:"4"}.
Then as a value, I have a string ("T" or "F") that represents True or False. My goal is to update that value, given a key.
var mapElem = new Map();
mapElem.set({date: "08/... | https://stackoverflow.com/questions/62261430/how-to-update-the-value-of-a-javascript-map-with-object-key | javascript, dictionary, key | 1,591,617,091 |
se_77257639 | stackoverflow | FRONTEND_DEVELOPMENT | Nest js install package | Nest js install package
I made a package for my project and I have installed it to my repository. However I can not import the functions from that package.
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators"... | https://stackoverflow.com/questions/77257639/nest-js-install-package | javascript, npm, package, npm-install, nest | 1,696,843,291 |
se_56533049 | stackoverflow | FRONTEND_DEVELOPMENT | How to get Excel sheet names? | How to get Excel sheet names?
I am trying to get the list of the sheets from an excel file in order to display it in a combobox. The idea is that the user can select the file that he want to import from an excel file instead of typing and avoid typo errors
function getSheets(file)
{
var reader;
reader = new F... | https://stackoverflow.com/questions/56533049/how-to-get-excel-sheet-names | javascript | 1,560,198,108 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.