Results: 1024
call file_get_content() function with headers
First we create an array with the headers
$opts = [
	"http" => [
		"method" => "GET",
		"header" => 
			"Channel-Name: ".CHANNEL."\r\n" .
			"Authorization: ".AUTHORIZATION."\r\n"
	]
];
// Then we create a stream
$context = stream_context_create($opts);
Then we pass the
$content
to
file_get_contents()
function as the
third
parameter
$result = file_get_contents($url, false, $context);
Copy all files and folders to another directory
Copies all files and folders from
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 folder
http / https
If the URL starts with
https
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");
Select column comment with some other column specifications
Shows details about each column from
decorations
table including column comments
SHOW FULL COLUMNS FROM decorations
Select column comment
Selects
is_optional
column comment which exists in
decorations
table using
information_schema
database
SELECT COLUMN_COMMENT 
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'geiger' 
    AND TABLE_NAME = 'decorations' 
    AND COLUMN_NAME = 'is_optional'
Set column comment
Sets new comment for
name
column in
channels
table
ALTER TABLE `channels` CHANGE `name` `name` varchar(255) COMMENT 'name of channel'
Select table comment
Selects comment of
channels
table which exists in the
geiger
database
SELECT table_comment 
FROM INFORMATION_SCHEMA.TABLES 
WHERE table_schema='geiger' 
    AND table_name='channels'
Set table comment
Sets comment for the specified table to make it easy for other developers what the purpose of this table is
ALTER TABLE `the_table_name` comment 'Some text about the table'
function "call" CODE
If we call
driveCar()
function using
call()
function,
this
will refer to the object that will be passed. In this case:
john
object
let john = {
  firstName: 'John',
  lastName: 'Doe'
}

function driveCar() {
  document.write(this.firstName + ' ' + this.lastName + ' is driving a car<br/>')
}

driveCar.call(john)
filter CODE
The function
filter
filters the array members based on the
getNames
function condition
let 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 );
Results: 1024