×
Clear all filters including search bar
Valeri Tandilashvili's Personal Professional Blog
source_dir
to destination_dir
cp -r /home/user/source_dir/. /var/www/html/destination_dir/
-r
- copies recursively (with subfolders and files)
.
- copies all files and folders inside the folderhttps
it will make a request on 443
$ch = curl_init("https://xdatavpn.example.com/Bank");
If it starts with http
the request will use 80
port$ch = curl_init("http://xdatavpn.example.com/Bank");
decorations
table including column commentsSHOW FULL COLUMNS FROM decorations
is_optional
column comment which exists in decorations
table using information_schema
databaseSELECT COLUMN_COMMENT
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = 'geiger'
AND TABLE_NAME = 'decorations'
AND COLUMN_NAME = 'is_optional'
name
column in channels
tableALTER TABLE `channels` CHANGE `name` `name` varchar(255) COMMENT 'name of channel'
channels
table which exists in the geiger
databaseSELECT table_comment
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema='geiger'
AND table_name='channels'
ALTER TABLE `the_table_name` comment 'Some text about the table'
driveCar()
function using call()
function, this
will refer to the object that will be passed.
In this case: john
objectlet john = {
firstName: 'John',
lastName: 'Doe'
}
function driveCar() {
document.write(this.firstName + ' ' + this.lastName + ' is driving a car<br/>')
}
driveCar.call(john)
filter
filters the array members based on the getNames
function conditionlet myFavoritePlanets = [
{name: 'Earth', radius: 6371},
{name: 'Jupiter', radius: 69911},
{name: 'Neptune', radius: 24622, moons: ['Triton', 'Thalassa', 'Nereid', 'Proteus', 'Hippocamp', 'Naiad']}
]
let biggerPlanetsNames = myFavoritePlanets.filter(getNames);
function getNames(planet) {
return planet.radius > 20000
}
console.log(biggerPlanetsNames );
splice
changes content of an array.
Let's first create an array of integerslet myFavoriteNumbers = [5, 14, 16, 18, 23, 25, 27, 50, 70]
If we want to remove one element from an array, we need to pass 1
as the second argument and the index of the item as the first argument.
In this example 14
(second item) will be removed by passing 1 and 1
as argumentsmyFavoriteNumbers.splice(1, 1); // [5, 16,18, 23, 25, 27, 50, 70]
To remove two adjacent items, we need to pass first item's index 2
and quantity of items 2
that we want to remove.
In this example we want to remove 18
and 23
from the array at the same timemyFavoriteNumbers.splice(2, 2); // [5, 16, 25, 27, 50, 70]
Replaces 3 items starting from index 2 with 27
, 29
and 31
myFavoriteNumbers.splice(2, 2, 27, 29, 31); // [5, 16, 27, 29, 31, 50, 70]
Removes all the items of the array except the first and the last itemsmyFavoriteNumbers.splice(1, 5); // [5,70]
Adds the two new items 100
and 200
to the array after the first itemmyFavoriteNumbers.splice(1, 0, 100, 200); // [5, 100, 200, 70]