Trending questions in Java

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
683 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
671 views
0 votes
0 answers

Loop over an array in JavaScript

How can I use JavaScript to loop ...READ MORE

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

When to use promise.all()?

What is/are the appropriate scenario(s) for using promise.all() OR Is there a better way to utilize promise.all()?  Should it be used ideally just when all of the promise objects are of the same or comparable type? The only one that comes to mind is: Use promise.all() if you want to resolve the promise only if all of ...READ MORE

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

How do I get the current time only in JavaScript

In JavaScript, how can I retrieve the ...READ MORE

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

JavaScript: undefined !== undefined?

When I first tried to access Facebook API operations after integrating Facebook Connect with Tersus, I received the error messages Invalid Enumeration Value and Handler already exists. It was discovered that the source of the problem was object.x === undefined When there is no property 'x' in 'object,' returns false. I solved the problem by substituting normal equality for rigorous equality in two Facebook functions: FB.Sys.isUndefined = function(o) { return ...READ MORE

Dec 9, 2022 in Java by Nicholas
• 7,760 points
330 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
381 views
0 votes
0 answers

Which is better: <script type="text/javascript">...</script> or <script>...</script>

Which is more effective or convenient  ...READ MORE

Dec 9, 2022 in Java by Nicholas
• 7,760 points
260 views
0 votes
2 answers

What is the difference between Set and List in java?

List is an ordered sequence of elements. ...READ MORE

Apr 26, 2018 in Java by Akrati
• 3,190 points
62,763 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
225 views
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
223 views
0 votes
0 answers

Const in JavaScript: when to use it and is it necessary?

In JavaScript, I recently came across the ...READ MORE

Dec 8, 2022 in Java by Nicholas
• 7,760 points
218 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
234 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
279 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
223 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
209 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
255 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
225 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
195 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,034 views
0 votes
1 answer

Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio

In Android Studio 3.1, you can see ...READ MORE

Feb 17, 2022 in Java by Aditya
• 7,680 points
12,603 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
662 views
0 votes
1 answer

How to get current formatted date dd/mm/yyyy in Javascript and append it to an input

The stringent equality operator (===) works exactly like the abstract equality operator (==), with the exception that no type conversion is performed, and the types must be the same to be regarded equal. Javascript Tutorial on Comparison Operators After performing any required type transformations, the == operator will check for equality.  Because the === operator does not perform the conversion, it will simply return false if two values are not of the same type.  Both are equally fast. "abc" == new String("abc") ...READ MORE

Nov 4, 2022 in Java by Damonlang
• 700 points
1,095 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
573 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
549 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
477 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
485 views
0 votes
0 answers

could not extract ResultSet in hibernate

I am getting this exception: "HTTP Status ...READ MORE

May 20, 2022 in Java by Kichu
• 19,050 points
8,274 views
0 votes
1 answer

How do I declare and initialize an array in Java?

To declare and initialize an array in ...READ MORE

Jun 22, 2023 in Java by Khan Sarfaraz
• 700 points
257 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
447 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
387 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
431 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
270 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
349 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
291 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
318 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
221 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
254 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
286 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
237 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
523 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
210 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
532 views
0 votes
0 answers

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyController':

I am trying to create a spring ...READ MORE

May 9, 2022 in Java by Kichu
• 19,050 points
8,420 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
217 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
439 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
391 views
0 votes
1 answer

What does the function then() mean in JavaScript?

The then() method is similar to "Javascript ...READ MORE

Nov 4, 2022 in Java by Damonlang
• 700 points
585 views
0 votes
1 answer

How to show console in jsfiddle

Normally by pressing F12 or using inspect ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
485 views