What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-18 02:36:04
iterate through list js
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Java 2021-10-17 20:09:06
for vs foreach loop java
1- For Loop: -It is flexible to iterate array both ascending and descending order. For Each: -It iterates from initial to end 2- For Loop: -It runs until given condition become false For Each: -Keeps execution until last element get executed 3-... Add solution -
Python 2021-10-17 14:25:10
create square matrix python
R = int(input("Enter the number of rows:")) C = int(input("Enter the number of columns:")) # Initialize matrix matrix = [] print("Enter the entries rowwise:") # For user input for i in range(R): # A for l... Add solution -
Python 2021-10-17 06:02:04
python numpy how to empty array cycle
In [210]: %%timeit .....: l = [] .....: for i in xrange(1000): .....: l.append([3*i+1,3*i+2,3*i+3]) .....: l = np.asarray(l) .....: 1000 loops, best of 3: 1.18 ms per loop In [211]: %%timeit .....: a = np.empty((0,3), int) ........ Add solution -
Javascript 2021-10-16 11:22:03
modify array elements javascript
Using a FOR loop, write a function addNumber which adds the argument n to each number in the array arr and returns the updated arr: const addNumber=(arr, n)=>{ let arr1=[]; for(let i=0;i<Math.max(arr.length);i++){ arr1.push((arr[i]||0)+n)... Add solution -
Other 2021-10-16 07:37:05
how to do database testing in your framework
For database testing For manual I use Oracle sql developer for producing SQL queries FOR AUTOMATION; I use JDBC library to integrate java by getting a CONNECTION from oracle database then creating STATEMENTS using SQL queries and then storing the data int... Add solution -
Javascript 2021-10-14 20:24:07
change icon on click angular
import { Component } from '@angular/core' export interface CollapsibleItem { label: string; text: string; state: boolean; } @Component({ selector:'whateveryouwant', template: ` <ul class="collapsible" data-collapsible="a... Add solution
Best helpers
Daniel Cook
+5
Czlsws
+5
Shahruz Raad
+5
Horse
+5
Csandreas1
+5
SOUMEN
+5
Vy32
+5
Anugram
+5
ImMathan
+5
Joyo
+5
Huggy Buggy
+5