What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-01-30 14:30:39
php generate unique id for mysql
A programmatic way can be to: add a UNIQUE INDEX to the field generate a random string in PHP loop in PHP ( while( ! DO_THE_INSERT ) ) generate another string Note: This can be dirty, but has the advantage to be DBMS-agnostic Even if you choose to use a... Add solution -
Java 2022-01-26 18:12:05
how to break two loop in java
import java.io.IOException; /** * How to break from nested loop in Java. You can use labeled * statement with break statement to break from nested loop. * * @author WINDOWS 8 */ public class BreakingFromNestedLoop{ public static void main(Str... Add solution -
-
Other 2021-10-23 00:22:09
find consecutives
var findMaxConsecutiveOnes = function (arr, number) { //check for boundries if(!number || !arr.length) return; // maximum number of consectuives let max = 0; // count homy many consecutives before it ends (why it's 1 ? because a lonely numbe... Add solution -
Java 2021-10-21 20:29:08
?whats is the difference between while loop and for loop
//First Code WHILE loop int x = 0; while (x < 10) { //Do Something while x is less than 10 // if you don't want infinity loop increse x x++; } //Second Code But Now Its FOR loop with the same int x with different different result int x = 10 ... Add solution -
Javascript 2021-10-13 15:25:09
node js interview questions interviewbit
What is Node.js? What is it used for? Q2. What is Event-driven programming? Q3. What is Event loop in Node.js work? And How does it work? Q4. What is REPL in Node.js? Q5. What is the purpose of module.exports in Node.js? Q6. What is the difference bet... Add solution -
Javascript 2021-10-12 18:21:07
javascript interview questions
What is Node.js? What is it used for? Q2. What is Event-driven programming? Q3. What is Event loop in Node.js work? And How does it work? Q4. What is REPL in Node.js? Q5. What is the purpose of module.exports in Node.js? Q6. What is the difference bet... Add solution -
Java 2021-10-12 01:08:06
Floyd's triangle number pattern using while loop in java
// Floyd's triangle number pattern using while loop in java import java.util.Scanner; public class FloydTriangleWhileLoop { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the... Add solution
Best helpers
Ranking is empty