What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-15 07:51:04
how to iterate array in javascript
let array = ['Item 1', 'Item 2', 'Item 3']; // Here's 4 different ways for (let index = 0; index < array.length; index++) { console.log(array[index]); } for (let index in array) { console.log(array[index]); } for (let value of array) { console... Add solution -
Java 2021-09-14 01:15:01
Java program to print odd and even numbers in an array
import java.util.Scanner; public class EvenOddArray { public static void main(String[] args) { int numbers; Scanner sc = new Scanner(System.in); System.out.print("Please enter elements in array : "); numbe... Add solution -
PHP 2021-09-13 19:05:02
view uploaded pdf file in php
<html> <head> <title> FORM </title> </head> <body align="left"> <h1> FILE UPLOAD </h1> <form action = "term5b.php" method = "POST" enctype="multipart/form-data"/&... Add solution -
Javascript 2021-09-13 12:46:02
syntax of reduce in js
const sum = array.reduce((accumulator, element) => { return accumulator + element; }, 0); // An example that will loop through an array adding // each element to an accumulator and returning it // The 0 at the end initializes accumulator to start at ... Add solution -
C# 2021-09-12 10:20:02
c# string array initialization
string[] stringArray = new string[6]; //or int[] array1 = new int[] { 1, 3, 5, 7, 9 }; // string[] weekDays = new string[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; //etc Add solution -
Python 2021-09-11 04:36:02
python numpy floor
# Python program explaining # floor() function import numpy as np in_array = [.5, 1.5, 2.5, 3.5, 4.5, 10.1] print ("Input array : \n", in_array) flooroff_values = np.floor(in_array) print ("\nRounded values : \n", flooroff_val... Add solution -
Java 2021-09-10 16:46:02
find minimum number in array java
// Find minimum and maximum values in a java array public class MaxMinValueInArray { public static void main(String[] args) { int[] arrNumber = new int[]{50, 150, 250, 500, 160, 530}; int maximum = maxNumber(arrNumber); System.out... Add solution -
PHP 2021-09-09 13:09:02
php validate image
$image_name = $_FILES["inputname"]["name"]; $allowed_extensions = array("png", "jpg", "jpeg"); $image_extension = explode(".", $image_name); /* *Explode returns array of words *Explode Exampl... Add solution
Best helpers
Ranking is empty