Most voted questions in Java

0 votes
0 answers

How to add days to Date?

How can I add days to the ...READ MORE

Dec 8, 2022 in Java by Nicholas
• 7,760 points
220 views
0 votes
0 answers

How to stop timer in javascript?

I'd want to end a timer by clicking a button, but I can't figure out how.  I tried using clearInterval() to halt a timer, but I'm not sure whether it was called correctly. This is my current code. <html> <head> <title>Bootstrap</title> ...READ MORE

Dec 8, 2022 in Java by Nicholas
• 7,760 points
678 views
0 votes
0 answers

Convert a number into a Roman numeral in JavaScript

What is the best way to convert integers to roman numerals? function romanNumeralGenerator (int) { } Consider the following sample inputs and outputs: 1 = "I" 5 = ...READ MORE

Dec 8, 2022 in Java by Nicholas
• 7,760 points
668 views
0 votes
0 answers

How do I remove an object from an array with JavaScript?

I have a JavaScript object that looks ...READ MORE

Dec 8, 2022 in Java by Nicholas
• 7,760 points
223 views
0 votes
0 answers

How to get the current London time and date using javascript

Using the code below, I attempted to& ...READ MORE

Dec 7, 2022 in Java by Nicholas
• 7,760 points
727 views
0 votes
0 answers

How is a JavaScript hash map implemented?

I'm using OpenLayers right now and need ...READ MORE

Dec 7, 2022 in Java by Nicholas
• 7,760 points
228 views
0 votes
0 answers

Check if a value is an object in JavaScript

How do you check if a value ...READ MORE

Dec 7, 2022 in Java by Nicholas
• 7,760 points
218 views
0 votes
0 answers

How does the "this" keyword work, and when should it be used?

I'm trying to figure out what the&nbs ...READ MORE

Dec 7, 2022 in Java by Nicholas
• 7,760 points
377 views
0 votes
0 answers

What is the meaning of polyfills in HTML5?

Actually, I have no idea what polyfills ...READ MORE

Dec 7, 2022 in Java by Nicholas
• 7,760 points
205 views
0 votes
0 answers

Best place to insert JavaScript within a HTML document

Where should the javascript code go? ...READ MORE

Dec 6, 2022 in Java by Nicholas
• 7,760 points
275 views
0 votes
0 answers

How do I link a JavaScript file to a HTML file?

How should a JavaScript file be linked ...READ MORE

Dec 6, 2022 in Java by Nicholas
• 7,760 points
222 views
0 votes
0 answers

Javascript remove background color and opacity

How can I delete the background-color  ...READ MORE

Dec 6, 2022 in Java by Nicholas
• 7,760 points
1,925 views
0 votes
0 answers

What is 'Currying'?

I've seen references to curried functions in ...READ MORE

Dec 6, 2022 in Java by Nicholas
• 7,760 points
193 views
0 votes
0 answers

How to check if an object is a Promise?

Whether it's an ES6 Promise, a Bluebird ...READ MORE

Dec 6, 2022 in Java by Nicholas
• 7,760 points
251 views
0 votes
0 answers

Javascript counting number of objects in object

I have an object something like: Object {0=Object, ...READ MORE

Nov 17, 2022 in Java by Nicholas
• 7,760 points
474 views
0 votes
0 answers

How to detect #enable-force-dark flag on Chrome v78+ using JavaScript?

I just developed and implemented a dark ...READ MORE

Nov 17, 2022 in Java by Nicholas
• 7,760 points
335 views
0 votes
0 answers

What is the use of the JavaScript 'bind' method?

What is the use of bind() in ...READ MORE

Nov 17, 2022 in Java by Nicholas
• 7,760 points
267 views
0 votes
0 answers

How to remove item from array by value?

Is it possible to delete an item ...READ MORE

Nov 17, 2022 in Java by Nicholas
• 7,760 points
220 views
0 votes
0 answers

Generating Fibonacci Sequence

var x = 0; var y = 1; var ...READ MORE

Nov 17, 2022 in Java by Nicholas
• 7,760 points
380 views
0 votes
0 answers

What is the meaning of "$" sign in JavaScript

A dollar ($) symbol appears in the ...READ MORE

Nov 16, 2022 in Java by Nicholas
• 7,760 points
207 views
0 votes
0 answers

Can you control GIF animation with Javascript?

Is it feasible to use Javascript to ...READ MORE

Nov 16, 2022 in Java by Nicholas
• 7,760 points
568 views
0 votes
0 answers

What is DOM Event delegation?

Can anyone please explain event delegation in ...READ MORE

Nov 16, 2022 in Java by Nicholas
• 7,760 points
235 views
0 votes
0 answers

What is TypeScript and why would I use it in place of JavaScript?

Could you kindly explain the TypeScript language? What ...READ MORE

Nov 16, 2022 in Java by Nicholas
• 7,760 points
253 views
0 votes
0 answers

Why doesn't importing java.util.* include Arrays and Lists?

I am using java on debian 5 java ...READ MORE

Nov 16, 2022 in Java by Ashwini
• 5,430 points
543 views
0 votes
0 answers

Arrays.fill with multidimensional array in Java

Without using a loop, how can I ...READ MORE

Nov 16, 2022 in Java by Ashwini
• 5,430 points
446 views
0 votes
0 answers

What is the difference between contiguous and non-contiguous arrays?

In the numpy manual about the reshape() function, it ...READ MORE

Nov 16, 2022 in Java by Ashwini
• 5,430 points
479 views
0 votes
0 answers

How do JavaScript closures work?

How would you explain JavaScript closures to ...READ MORE

Nov 15, 2022 in Java by Nicholas
• 7,760 points
346 views
0 votes
0 answers

Download File Using JavaScript/jQuery

I have a similar requirement listed here. When ...READ MORE

Nov 15, 2022 in Java by Nicholas
• 7,760 points
315 views
0 votes
0 answers

Javascript counting number of objects in object

I have an object something like: Object {0=Object, ...READ MORE

Nov 15, 2022 in Java by Nicholas
• 7,760 points
423 views
0 votes
0 answers

How to validate password using following conditions?

Password should contain At least one uppercase letter At ...READ MORE

Nov 15, 2022 in Java by Nicholas
• 7,760 points
214 views
0 votes
0 answers

How to create an array containing 1...N

I'm looking for alternatives to the following for creating a JavaScript array with values ranging from 1 to N, where N is only known at  runtime. var foo = []; for (var i = ...READ MORE

Nov 15, 2022 in Java by Nicholas
• 7,760 points
283 views
0 votes
1 answer

Check if a variable is a string in JavaScript

This is what I've found to be ...READ MORE

Nov 15, 2022 in Java by Damonlang
• 1,230 points
288 views
0 votes
1 answer

Calculate string value in javascript, not using eval

You could use the Function() constructor: function evil(fn) ...READ MORE

Nov 15, 2022 in Java by Damonlang
• 1,230 points
2,171 views
0 votes
1 answer

How to draw a circle in HTML5 Canvas using JavaScript?

Here's how to draw a circle in ...READ MORE

Nov 15, 2022 in Java by Damonlang
• 1,230 points
659 views
0 votes
1 answer

Check if input is number or letter javascript

The isNaN function can be used to ...READ MORE

Nov 15, 2022 in Java by Damonlang
• 1,230 points
1,029 views
0 votes
1 answer

Violation Long running JavaScript task took xx ms

These messages are classified as warnings rather ...READ MORE

Nov 15, 2022 in Java by Damonlang
• 1,230 points
3,410 views
0 votes
0 answers

What is "callback hell" and how and why does RX solve it?

Can someone provide a precise description and ...READ MORE

Nov 9, 2022 in Java by Nicholas
• 7,760 points
389 views
0 votes
0 answers

Why were Javascript `atob()` and `btoa()` named like that?

A base64 string and window are both ...READ MORE

Nov 9, 2022 in Java by Nicholas
• 7,760 points
432 views
0 votes
0 answers

What is the difference between ( for... in ) and ( for... of ) statements?

I'm familiar with a for... in loop (it iterates over the keys), but this is the first I've heard of a for... of loop (it iterates over values). I don't understand the for...of loop. var arr = [3, 5, 7]; arr.foo ...READ MORE

Nov 9, 2022 in Java by Nicholas
• 7,760 points
199 views
0 votes
0 answers

How do you use the ? : (conditional) operator in JavaScript?

In simple words, what is the ?: ...READ MORE

Nov 9, 2022 in Java by Nicholas
• 7,760 points
355 views
0 votes
0 answers

How to round to at most 2 decimal places, if necessary

I'd like to round at most two ...READ MORE

Nov 9, 2022 in Java by Nicholas
• 7,760 points
515 views
0 votes
0 answers

What is the "debounce" function in JavaScript?

The JavaScript "debouncing" feature piques my attention. Unfortunately, the code is not presented in a way that I can comprehend.  How does it function (my comments are below)? I just do not understand how this works, to put it briefly. // Returns a function, ...READ MORE

Nov 8, 2022 in Java by Nicholas
• 7,760 points
225 views
0 votes
0 answers

javascript Image tag

I'm adding an image snapshot of a ...READ MORE

Nov 8, 2022 in Java by Nicholas
• 7,760 points
275 views
0 votes
0 answers

Difference between Relative path and absolute path in javascript

Have small clarifications, As of my knowledge, these ...READ MORE

Nov 8, 2022 in Java by Nicholas
• 7,760 points
397 views
0 votes
0 answers

What's the best way to convert a number to a string in JavaScript?

What method is the "best" for convert ...READ MORE

Nov 8, 2022 in Java by Nicholas
• 7,760 points
244 views
0 votes
0 answers

How can I get query string values in JavaScript?

Is there a method to retrieve query ...READ MORE

Nov 8, 2022 in Java by Nicholas
• 7,760 points
196 views
0 votes
1 answer

How to send an email from JavaScript

Javascript does not natively support email sending. However, you may access the user's mail client: window.open('mailto:test@example.com'); There are also some parameters to pre-fill ...READ MORE

Nov 8, 2022 in Java by Damonlang
• 700 points
392 views
0 votes
1 answer

What is location.search in javascript

http://example.com/index.php?foo=bar location.search > ?foo=bar ...READ MORE

Nov 8, 2022 in Java by Damonlang
• 700 points
272 views
0 votes
1 answer

Why firefox is written in C++ and javascript UI?

First off, Java and JavaScript are entirely ...READ MORE

Nov 8, 2022 in Java by Damonlang
• 700 points
525 views
0 votes
1 answer

Vanilla JavaScript equivalent of jQuery's $.ready() - how to call a function when the page/DOM is ready for it

Use Internet Explorer 9 or later if you're using VANILLA pure JavaScript without jQuery. document.addEventListener("DOMContentLoaded", function(event) { // ...READ MORE

Nov 8, 2022 in Java by Damonlang
• 700 points
2,255 views