What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-02-15 22:45:09
tutoriel insérer une image forum php
<?phpif(isset($_FILES['avatar']) AND !empty($_FILES['avatar']['name'])) { $tailleMax = 2097152; $extensionsValides = array('jpg', 'jpeg', 'gif', 'png'); if($_FILES['avatar']['size'] <= $tailleMax) { $extensionUpload = strtolower(substr(st... Add solution -
PHP 2022-02-14 09:30:11
convert gb to bytes php
function toByteSize($p_sFormatted) { $aUnits = array('B'=>0, 'KB'=>1, 'MB'=>2, 'GB'=>3, 'TB'=>4, 'PB'=>5, 'EB'=>6, 'ZB'=>7, 'YB'=>8); $sUnit = strtoupper(trim(substr($p_sFormatted, -2))); if (intval($sUnit) !== 0) { ... Add solution -
C++ 2022-02-12 03:45:02
how to search integer in c++
//******************************************************** // search algorithm for arrays //******************************************************** #include <iostream> using namespace std; void initializeArray(int list[], int listSize); int ... Add solution -
PHP 2022-02-11 00:45:26
laravel if file is image
$allowedMimeTypes = ['image/jpeg','image/gif','image/png']; $contentType = $request->file->getClientMimeType(); if(! in_array($contentType, $allowedMimeTypes) ){ return response()->json('error: Not an image'); }else{ return $this->product... Add solution -
Java 2022-02-09 16:50:36
set array length java
int[] intArray = new int[]{ 1,2,3,4,5,6,7,8,9,10 } Add solution -
PHP 2022-02-06 18:00:03
in_array in php
$myArr = [38, 18, 10, 7, "15"]; echo in_array(10, $myArr); // TRUE echo in_array(19, $myArr); // TRUE // Without strict check echo in_array("18", $myArr); // TRUE // With strict check echo in_array("18", $myArr, true); // F... Add solution -
TypeScript 2022-02-03 03:37:18
changing the elements of an array using a for loop java
int[] anIntArray = new int[6]; /* This is for when you want to increment the contents of an array using a for loop. */ for (int i = 0; i < anIntArray.length; i++) { anIntArray[i]++; } //================================... Add solution -
Java 2022-02-02 17:31:24
define array list in android
import java.util.ArrayList; public class ArrayListMethods { public static void main(String[] args) { //Integer ArrayList ArrayList<Integer> aList = new ArrayList<Integer>(); aList.add(5); aList.add(11)... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5