What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-27 08:20:18
basic java interview questions
There are many questions that can be made to test your java knowledge, like the ones below: Explain JDK, JRE and JVM? Explain public static void main(String args[]) in Java Why Java is platform independent? Why Java is not 100% Object-oriented? What are ... Add solution -
Java 2022-03-26 13:40:11
generate all prime number less than n java
/** Author: Jeffrey Huang As far as I know this is almost the fastest method in java for generating prime numbers less than n. A way to make it faster would be to implement Math.sqrt(i) instead of i/2. I don't know if you could implement sieve of eratost... Add solution -
Other 2022-03-23 00:20:08
Executing an update/delete query
/* I received this exception when trying to run a bulk UPDATE query in a non-JTA (i.e. resource-local) entity manager in Java SE. I had simply forgotten to wrap my JPQL code in*/ em.getTransaction().begin(); //and em.getTransaction().commit(); Add solution -
Javascript 2022-03-21 05:40:05
Using Array.isArray() method and Array.length
// create empty array in javascript let empty_array = [] // check empty is Array and then check array length if(Array.isArray(empty_array) && empty_array.length){ // if empty_array is a array and empty_array has a length console.log("Ar... Add solution -
PHP 2022-03-17 22:55:27
web api return json example in php
$option = $_GET['option']; if ( $option == 1 ) { $data = [ 'a', 'b', 'c' ]; // will encode to JSON array: ["a","b","c"] // accessed as example in JavaScript like: result[1] (returns "b") } else { $d... Add solution -
Javascript 2022-03-07 23:10:36
tochararray in javascript
// there is not toCharArray() function in javascript .. // if you want to split string into char array .. then do this method.. let name="hello"; let charArray=name.split(''); // this split string into char .. console.log(charArray); // outpu... Add solution -
Other 2022-03-06 08:10:34
allof method hamcrest
allOf method --> it is similar to "AND" = "&&" in Java. Basically both condition must be true in order test to pass For example : assertThat("John Doe", allOf(startsWith("Jo"),containsString("Doe&q... Add solution
Best helpers
Michaelyus
+5
EBA2018
+5
Eric Lewis
+5
J. Tatum
+5
Erwaman
+5
Jp_
+5
Fauve
+5
Katy Forde
+5
Jcvamp
+5
Chris
+5
Xiaotian Pei
+5