×
Clear all filters including search bar
Valeri Tandilashvili's Personal Professional Blog
paramVal
field if the row exists, otherwise inserts as a new rowINSERT INTO sysData (paramName, paramVal)
VALUES ('payprocess', 1)
ON DUPLICATE KEY
UPDATE paramVal = 1 WHERE paramName = 'payprocess';
$argv
contains filename and parameters, when the php script
is called through command line (cmd). test_args.php
file content:<?php
echo 'Filename:'.$argv[0]."; ";
echo 'First parameter:'.$argv[1]."; ";
echo 'Second parameter:'.$argv[2]."; ";
If we run the command: php test_args.php first-param second-param
in cmd
the script above will output the following:Filename:test_args.php; First parameter:first-param; Second parameter:second-param;
xs
Small - sm
Medium - md
Large - lg
Extra large - xl
sql.zip
file to the location /var/www/
of use.ge
server using root
user scp sql.zip root@use.ge:/var/www/
We can use full path for the file that we want to movescp /var/www/sql.zip root@use.ge:/var/www/
We can also use an IP address (instead of domain name) to specify the server that we want the file to move toscp /var/www/sql.zip root@167.172.187.21:/var/www/
After the command execution the user is required to enter password of root
usernpm install / npm i
Shows current version of npm
npm --version / npm -v
Creates package.json
file with default valuesnpm init --yes / npm init -y
Installs package moment
npm install moment --save / npm i moment -S
Installs package lodash
for dev environment
npm install lodash --save-dev / npm i moment -D
Installs package live-server
globally so that other apps can use itnpm install --global live-server / npm i -g live-server
Other shortcuts - https://docs.npmjs.com/misc/configxs
Extra small <576px
sm
Small ≥576px
md
Medium ≥768px
lg
Large ≥992px
xl
Extra large ≥1200px
REPLACE INTO
is the similar to INSERT INTO
statement.
The difference is that it updates the record if it already exists.
It's required one of the listed columns to be a private key of the tableREPLACE INTO students (id, first_name, points)
VALUES (41, 'ილიკო', 147)
Note 1
: If primary key is not listed, it will insert the record, but if the primary key is one of the listed columns, it will update the specified row that matches the primary key.
Note 2
: If the primary key exists, all the other omitted columns will get the default values after updating the record.
Similar to the REPLACE INTO
statement is ON DUPLICATE KEY
.
The only difference is that on duplicate key it updates only the listed columns but omitted values stays the sameINSERT INTO students (id, first_name, points)
VALUES (41, 'გიორგი', 149)
ON DUPLICATE KEY
UPDATE first_name = 'გიორგი', points = 123
node_modules
that are extraneous packages (that are not listed in package.json
)npm prune
Before running the above command, npm list --depth 0
showed several packages as extraneous.
Extraneous are packages that are not listed in dependencies
or devDependencies
but installed in node_modules
)+-- gulp@4.0.2 extraneous
+-- gulp-sass@4.1.0 extraneous
`-- moment@2.27.0
with
methodpublic function about() {
$param1 = 'this is a parameter of about us page';
return view('pages/about')->with('title', $param1);
}
Content of the blade template@extends('layouts.app')
@section('cntnt')
<h3>abt us {{$title}}</h3>
@endsection
public function services() {
$data = [
'title' => 'langs',
'languages' => ['PHP', 'Java', 'Python']
];
return view('pages/services')->with($data);
}
Receive the passed array@extends('layouts.app')
@section('cntnt')
<h3>{{$title}}</h3>
@if(count($languages))
@foreach($languages as $language)
<li>{{$language}}</li>
@endforeach
@endif
@endsection