Snippets Collections
const uuid = () => {
  return Date.now().toString(36) + Math.random().toString(36).substr(2);
}

export default uuid;
const randomID = new Date().getTime().toString().substring(3, 10)
// Java Program to print pattern
// Number triangle pattern
import java.util.*;

public class GeeksForGeeks {
	// Function to demonstrate pattern
	public static void printPattern(int n)
	{
		int i, j;
		// outer loop to handle number of rows
		for (i = 1; i <= n; i++) {
			// inner loop to print space
			for (j = 1; j <= n - i; j++) {
				System.out.print(" ");
			}
			// inner loop to print star
			for (j = 1; j <= i; j++) {
				System.out.print(i + " ");
			}
			// print new line for each row
			System.out.println();
		}
	}

	// Driver Function
	public static void main(String args[])
	{
		int n = 6;
		printPattern(n);
	}
}
// if you want to know a distance between the number and divisor of other number
int n,m;
n = 3, m = 17;
int mod = 17 % 3;     //3 is a divisor of 15 and distance between 15 and 18 is 2 
cout<<mod;            // 2
function lenOfNum(num) {
  num = Math.abs(num)
  if(num < 10 && num >= 0){
    return 1
  }
  let len = 0
  while(num > 1){
    num = num / 10
    len++
    }
  return len
}
double[] a = new double[n];
for (int i = 0; i <n; i++){
  a[i] = Math.random();
}
star

Sat Jan 27 2024 01:36:58 GMT+0000 (Coordinated Universal Time)

#javascript #uuid #number
star

Tue Nov 07 2023 00:13:25 GMT+0000 (Coordinated Universal Time)

#javascript #random #number
star

Sun Aug 27 2023 12:01:37 GMT+0000 (Coordinated Universal Time)

#java #pattern #number
star

Tue Sep 06 2022 16:54:56 GMT+0000 (Coordinated Universal Time)

#c++ #number #number_theory #modulo
star

Fri Sep 02 2022 13:04:44 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/modulo-operator-in-c-cpp-with-examples/

#c++ #number #number_theory #modulo
star

Thu Aug 18 2022 17:07:29 GMT+0000 (Coordinated Universal Time)

#n8n #json #sip #phone #number
star

Tue Jun 07 2022 14:26:35 GMT+0000 (Coordinated Universal Time)

#javascript #length #number
star

Wed Jan 26 2022 23:53:43 GMT+0000 (Coordinated Universal Time)

#random #number

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension