Posted on February 28, 2018, 12:49 pm, by admin, under
mysql.
DELETE FROM main_table USING main_table, main_table e1 WHERE main_table.id > e1.id AND main_table.entity_id = e1.entity_id;DELETE FROM main_table USING main_table, main_table e1 WHERE main_table.id > e1.id AND main_table.entity_id = e1.entity_id;
Posted on February 26, 2018, 9:38 am, by admin, under
tips.
Рекомендации с сайта computer-ergonomics.blogspot.com 1. Офисное кресло с подлокотниками. Подлокотники должны быть регулируемыми по высоте, и само кресло должно регулироваться по высоте и наклону вперед назад. У кресла должна быть специальная поддержка поясничного отдела 2. Расположите монитор на расстоянии вытянутой руки. Примечание: Мне все же надо монитор распологать на 5 см дальше вытянутой руки. Когда […]
Posted on February 16, 2018, 11:35 am, by admin, under
bash,
mysql.
cat file.csv | awk -F, ‘{print "INSERT INTO mytable VALUES ("$1",*"$2"*,"$3");"}’cat file.csv | awk -F, '{print "INSERT INTO mytable VALUES ("$1",*"$2"*,"$3");"}' echo https://api.trustpilot.com/tagname/tags | awk -F/ ‘{print $2}’echo https://api.trustpilot.com/tagname/tags | awk -F/ '{print $2}'
Posted on February 13, 2018, 2:50 pm, by admin, under
docker.
1.1 Run docker to make a mariadb container on windows no password docker run -d -it -p 3306:3306 -v C:/Users/username/Projects/projectname:/var/lib/mysql –name hostingnamedbs -e MYSQL_ALLOW_EMPTY_PASSWORD=1 –restart unless-stopped mariadb:10.11docker run -d -it -p 3306:3306 -v C:/Users/username/Projects/projectname:/var/lib/mysql –name hostingnamedbs -e MYSQL_ALLOW_EMPTY_PASSWORD=1 –restart unless-stopped mariadb:10.11 docker run –name myhostingercouk -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 8000:80 -p 3306:3306 -v //c/Users/username/Projects/projectname:/var/lib/mysql -d mariadb:10.11docker […]
Posted on February 13, 2018, 2:00 pm, by admin, under
docker.
Docker Image – Read only layer Docker Container – Read/Write layer 1. Run docker bash in interactive mode for latest ubuntu image docker run -i -t ubuntu:latest /bin/bashdocker run -i -t ubuntu:latest /bin/bash 2. Run docker bash in server mode for latest ubuntu image docker run -d -t ubuntu:latest /bin/bashdocker run -d -t ubuntu:latest /bin/bash […]
Posted on February 9, 2018, 2:17 pm, by admin, under
git.
Add new tag: git tag -a 1.1.0 -m "Version 1.1.0"; git push –tagsgit tag -a 1.1.0 -m "Version 1.1.0"; git push –tags List tags: git taggit tag Delete local tag: git tag -d 1.0git tag -d 1.0 Delete remote tag: git push origin :refs/tags/1.0git push origin :refs/tags/1.0
Posted on February 8, 2018, 4:03 pm, by admin, under
laravel.
composer create-project laravel/laravel myproject 5.1composer create-project laravel/laravel myproject 5.1
Posted on February 5, 2018, 3:16 pm, by admin, under
php,
tips.
The right ! will result in a boolean, regardless of the operand. Then the left ! will be applied to that boolean. It means if $row has a truthy value, it will return true, otherwise false, converting to a boolean value. It is equalent of casting to boolean as it convert anything to boolean. return […]
Posted on February 5, 2018, 1:54 pm, by admin, under
java.
1. File Simple.java import java.io.FileInputStream; import java.util.Properties; import java.io.IOException; import java.io.FileNotFoundException; class Simple { public static void main(String[] args) { try { Properties config = new Properties(); String configFile = "config.properties"; FileInputStream input = new FileInputStream("config.properties"); config.load(input); String valueStr = config.getProperty("textlocal_key"); System.out.println(valueStr); } catch (FileNotFoundException e) { […]
Posted on February 2, 2018, 3:58 pm, by admin, under
laravel.
1. Create php artisan make:command MyApp –command=myapp:performphp artisan make:command MyApp –command=myapp:perform 2. Edit vi app/Console/Commands/MyApp.php …. /** * Execute the console command. * * @return mixed */ public function handle() { echo ‘My App’; }vi app/Console/Commands/MyApp.php …. /** * Execute the console command. * * @return mixed */ public function handle() { echo 'My App'; […]