Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
falsy values
In JavaScript, there are 6 falsy values:
1. false: the boolean value false
2. 0: the number zero
3. '': the empty string, a string with no characters
4. NaN : stands for "Not a Number", usually caused by math errors
5. undefined: a variable's value before it is assigned a value
6. null: a blank value that can be assigned to a variable
by Valeri Tandilashvili
2 years ago
0
JavaScript
0
How FOR loop works
In the example code below the loop flows through these steps: Setting initial variable value of i to 0 Testing if the loop should be running while i is 0 Running the code block console.log(i) Updating i to be 1 Testing if the loop should be running while i is 1 Running the code block console.log(i) Updating i to be 2 Testing if the loop should be running while i is 2 This means the code will log 0 and 1 to the console.
for (let i = 0; i < 2; i++) {
   console​.log(i)
}
by Valeri Tandilashvili
2 years ago
0
JavaScript
FOR loop
0
Make an object from a string
function mapString(string) {
  let map = {};
  for (let i = 0; i < string.length; i++) {
    let letter = string[i];
    if (map[letter]) {
      map[letter].push(i);
    } else {
      map[letter] = [i];
    }
  }
  return map;
}
console.log(mapString('blblllaaha'))
by Valeri Tandilashvili
2 years ago
0
JavaScript
objects
0
create a .gitignore file inside that directory that contains these four lines
# Ignore everything in this directory
*
# Except this file
!.gitignore
by Luka Tatarishvili
2 years ago
0
0
IMPORTS:
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
import java.util.TimeZone;
 
Scanner scan = new Scanner(System.in);
        System.out.print("");

        int num = scan.nextInt();
        scan.close();

        TimeZone tz = TimeZone.getTimeZone("UTC");
            SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
        df.setTimeZone(tz);
        String time = df.format(new Date(num * 1000));
        System.out.println(time);
by Luka Tatarishvili
2 years ago
0
JAVA
0
1:
sudo apt update
2:
sudo apt -y upgrade
3:
sudo systemctl reboot
maybe this fails but not problem Add Ondřej Surý PPA repository: 4.1
sudo apt update
4.2
sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y
4.3
sudo add-apt-repository ppa:ondrej/php
5:
sudo apt update
install PHP 8.1 6:
sudo apt install php8.1
Hit the y key to start installation Check for the current version of PHP 7:
php -v
by Luka Tatarishvili
2 years ago
0
PHP
20.04
ubuntu
0
by Luka Tatarishvili
2 years ago
0
PHP
20.04
22.04
ubuntu
0
sudo npm install --unsafe-perm=true --allow-root
by Luka Tatarishvili
2 years ago
0
0
in_array for Multidimensional array
foreach($taxonomy_tree as $item){

                   $taxonomy_item_family = (json_encode($item));

                    $string = '"id":"1"';

                   if (str_contains($taxonomy_item_family, $string)) {
                        dd($item);
                    }


                }
by Giorgi Ivanidze
2 years ago
0
PHP
array
0
Laravel could not read .env file
Solution to the problem:
composer dump-autoload
php artisan cache:clear
php artisan config:clear
php artisan view:clear
by Valeri Tandilashvili
2 years ago
0
Laravel
artisan
0
Results: 1580