RSS

Posts in 2021

  • Most votes on javascript questions 2

    May 01, 2021 in FAQ

    Most votes on javascript questions 2. #11 How do I include a JavaScript file in another JavaScript file? #12 What is the most efficient way to deep clone an object in JavaScript? #13 What's the difference between using "let" and "var"? #14 For-each over an array in JavaScript #15 How to validate an email address in JavaScript #16 How do I check whether a checkbox is checked in jQuery? #17 How to replace all occurrences of a string in JavaScript? #18 How to create a GUID / UUID #19 "Thinking in AngularJS" if I have a jQuery background? #20 How do I check if an array includes a value in JavaScript?

    Read all the top votes questions and answers in a single page. #11: How do I include a JavaScript file in another JavaScript file? (Score: 5608) Created: 2009-06-04 Last updated: 2017-10-17 Tags: javascript, file, import, include Is there something …

    Read more

  • Most votes on javascript questions 10

    May 01, 2021 in FAQ

    Most votes on javascript questions 10. #91 How to print a number with commas as thousands separators in JavaScript #92 What is the scope of variables in JavaScript? #93 When should I use double or single quotes in JavaScript? #94 Check if a variable is a string in JavaScript #95 How to format numbers as currency strings #96 Generate random number between two numbers in JavaScript #97 JavaScript check if variable exists (is defined/initialized) #98 How does data binding work in AngularJS? #99 Get selected value in dropdown list using JavaScript #100 Get current URL with jQuery?

    Read all the top votes questions and answers in a single page. #91: How to print a number with commas as thousands separators in JavaScript (Score: 2094) Created: 2010-05-24 Last updated: 2020-07-01 Tags: javascript, formatting, numbers, integer I am …

    Read more

  • Most votes on javascript questions 1

    May 01, 2021 in FAQ

    Most votes on javascript questions 1. #1 How can I remove a specific item from an array? #2 How do I check if an element is hidden in jQuery? #3 What does "use strict" do in JavaScript, and what is the reasoning behind it? #4 How do I redirect to another webpage? #5 How do JavaScript closures work? #6 How to check whether a string contains a substring in JavaScript? #7 var functionName = function() {} vs function functionName() {} #8 How do I remove a property from a JavaScript object? #9 How do I return the response from an asynchronous call? #10 Which equals operator (== vs ===) should be used in JavaScript comparisons?

    Read all the top votes questions and answers in a single page. #1: How can I remove a specific item from an array? (Score: 9365) Created: 2011-04-23 Last updated: 2020-05-21 Tags: javascript, arrays I have an array of numbers and I’m using the …

    Read more

  • Most votes on java questions 9

    May 01, 2021 in FAQ

    Most votes on java questions 9. #81 Download a file with Android, and showing the progress in a ProgressDialog #82 Including all the jars in a directory within the Java classpath #83 What is the difference between canonical name, simple name and class name in Java Class? #84 How can I generate an MD5 hash? #85 What does 'synchronized' mean? #86 How can I get the current stack trace in Java? #87 How to mock void methods with Mockito #88 Why can't I use switch statement on a String? #89 :: (double colon) operator in Java 8 #90 Difference between HashMap, LinkedHashMap and TreeMap

    Read all the top votes questions and answers in a single page. #81: Download a file with Android, and showing the progress in a ProgressDialog (Score: 1082) Created: 2010-06-12 Last updated: 2014-11-26 Tags: java, android, download, android-asynctask …

    Read more

  • Most votes on java questions 8

    May 01, 2021 in FAQ

    Most votes on java questions 8. #71 How to parse JSON in Java #72 How to create a generic array in Java? #73 How to get the current working directory in Java? #74 What are the possible values of the Hibernate hbm2ddl.auto configuration and what do they do #75 How to install Java 8 on Mac #76 Converting 'ArrayList<String> to 'String[]' in Java #77 Can't execute jar- file: "no main manifest attribute" #78 Which @NotNull Java annotation should I use? #79 How can I pad an integer with zeros on the left? #80 Converting array to list in Java

    Read all the top votes questions and answers in a single page. #71: How to parse JSON in Java (Score: 1161) Created: 2010-04-07 Last updated: 2020-12-17 Tags: java, json, parsing I have the following JSON text. How can I parse it to get the values of …

    Read more

  • Most votes on java questions 7

    May 01, 2021 in FAQ

    Most votes on java questions 7. #61 'Must Override a Superclass Method' Errors after importing a project into Eclipse #62 How to directly initialize a HashMap (in a literal way)? #63 Difference between wait() and sleep() #64 Iterating through a Collection, avoiding ConcurrentModificationException when removing objects in a loop #65 Android SDK installation doesn't find JDK #66 Sort ArrayList of custom Objects by property #67 How do servlets work? Instantiation, sessions, shared variables and multithreading #68 Convert ArrayList<String> to String[] array #69 What are the -Xms and -Xmx parameters when starting JVM? #70 How can I initialise a static Map?

    Read all the top votes questions and answers in a single page. #61: 'Must Override a Superclass Method' Errors after importing a project into Eclipse (Score: 1277) Created: 2009-11-05 Last updated: 2020-04-19 Tags: java, android, eclipse, overriding, …

    Read more

  • Most votes on java questions 6

    May 01, 2021 in FAQ

    Most votes on java questions 6. #51 Why does Java have transient fields? #52 What does "Could not find or load main class" mean? #53 Fastest way to determine if an integer's square root is an integer #54 How can I concatenate two arrays in Java? #55 What exactly is Apache Camel? #56 How do I create a file and write to it? #57 Is null check needed before calling instanceof? #58 Why is executing Java code in comments with certain Unicode characters allowed? #59 How to round a number to n decimal places in Java #60 How to add local jar files to a Maven project?

    Read all the top votes questions and answers in a single page. #51: Why does Java have transient fields? (Score: 1558) Created: 2009-05-26 Last updated: 2016-05-06 Tags: java, field, transient Why does Java have transient fields? #51 Best answer 1 of …

    Read more

  • Most votes on java questions 5

    May 01, 2021 in FAQ

    Most votes on java questions 5. #41 Does Java support default parameter values? #42 How to split a string in Java #43 Sort a Map<Key, Value> by values #44 How can I avoid Java code in JSP files, using JSP 2? #45 Why use getters and setters/accessors? #46 Difference between StringBuilder and StringBuffer #47 How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version #48 How do I create a Java string from the contents of a file? #49 How can I convert a stack trace to a string? #50 How does the Java 'for each' loop work?

    Read all the top votes questions and answers in a single page. #41: Does Java support default parameter values? (Score: 1816) Created: 2009-06-15 Last updated: 2019-05-08 Tags: java, methods, parameters, overloading, default-parameters I came across …

    Read more

  • Most votes on java questions 4

    May 01, 2021 in FAQ

    Most votes on java questions 4. #31 How to get an enum value from a string value in Java? #32 How do you assert that a certain exception is thrown in JUnit 4 tests? #33 What's the simplest way to print a Java array? #34 How to use java.net.URLConnection to fire and handle HTTP requests? #35 What is a JavaBean exactly? #36 How do I break out of nested loops in Java? #37 Java inner class and static nested class #38 Comparing Java enum members: == or equals()? #39 How to generate a random alpha-numeric string #40 Why does this code using random strings print "hello world"?

    Read all the top votes questions and answers in a single page. #31: How to get an enum value from a string value in Java? (Score: 2119) Created: 2009-03-02 Last updated: 2018-09-11 Tags: java, enums Say I have an enum which is just public enum Blah { …

    Read more

  • Most votes on java questions 3

    May 01, 2021 in FAQ

    Most votes on java questions 3. #21 Why is printing "B" dramatically slower than printing "#"? #22 How can I create an executable JAR with dependencies using Maven? #23 How to fix 'android.os.NetworkOnMainThreadException'? #24 Does a finally block always get executed in Java? #25 How do I determine whether an array contains a particular value in Java? #26 How do I call one constructor from another in Java? #27 What is reflection and why is it useful? #28 What's the difference between @Component, @Repository & @Service annotations in Spring? #29 How do I declare and initialize an array in Java? #30 "implements Runnable" vs "extends Thread" in Java

    Read all the top votes questions and answers in a single page. #21: Why is printing "B" dramatically slower than printing "#"? (Score: 2820) Created: 2014-02-21 Last updated: 2018-04-06 Tags: java, performance, loops, for-loop, …

    Read more