What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-13 04:27:06
console.log
console.log('Hello World'); console.error('This is an error'); console.warn('This is a warning'); console.dir(document); console.log(document.URL); console.table([{name: 'Anthony', email: 'test.com', age: 33}]); console.clear(); console.group('Say Hello'... Add solution -
Other 2021-10-13 00:50:05
average calculator
1. make an array nums[number of neumbers you will calculate the average of] wich will store the numbers and a variable sum=0 (make it double) 2. input that array with a loop 3. in the loop, after you have entered nums[i] add it to sum 4. after loop o... Add solution -
C++ 2021-10-12 16:33:10
find nth word in sentence c++
#include <iostream> #include <string> #include <vector> using namespace std; void splitString(const string &str, vector<string> &output) { string::size_type start = 0; // Where to start string::size_type last = st... Add solution -
Java 2021-10-12 10:45:05
remove extra blank spaces from string in java
import java.util.Scanner; class RemoveExtraSpace{ //starting of class public static void main(String[] args){ //starting of the main function Scanner sc=new Scanner(System.in); //declaring an object of the Scanner class String input,ou... Add solution -
Javascript 2021-10-12 10:40:10
javascript loop array
<!DOCTYPE html> <html> <body> <h2>JavaScript For Loop</h2> <p id="demo"></p> <script> const cars = ["BMW", "Volvo", "Saab", "Ford"]; let i = 0; let len =... Add solution -
Python 2021-10-11 23:08:04
pygame python
# Be sure to install pygame via pip import pygame import sys # initialize it pygame.init() # configurations frames_per_second = 30 window_height = 600 window_width = 400 # colors WHITE = (255, 255, 255) BLACK = (0, 0, 0) BLUE = (0, 0, 255) # creating... Add solution -
Python 2021-10-10 08:17:16
RuntimeError: cannot open featureclass in python
import arcpy infc = arcpy.GetParameterAsText(0) # Enter for loop for each feature for row in arcpy.da.SearchCursor(infc, ["OID@", "SHAPE@"]): # Print the current multipoint's ID print("Feature {}:".format(row[0])) ... Add solution -
Javascript 2021-10-09 23:47:03
loop over an array
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 -
Javascript 2021-10-09 18:33:03
Iterate Through an Array with a For Loop
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 -
Python 2021-10-09 11:41:07
python list of tuples
#List of Tuples list_tuples = [('Nagendra',18),('Nitesh',28),('Sathya',29)] #To print the list of tuples using for loop you can print by unpacking them for name,age in list_tuples: print(name,age) #To print with enumerate--->enumerate is nothing b... 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