MySQL Download URL
https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz
- Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
| -- отключаем проверку | |
| SET foreign_key_checks = 0; | |
| -- выполняем нужные запросы | |
| DELETE FROM downloads WHERE id = 59; | |
| -- включаем проверку назад | |
| SET foreign_key_checks = 1; |
| {% macro recursiveCategory(category) %} | |
| <li> | |
| <h4><a href="{{ path(category.route, category.routeParams) }}">{{ category }}</a></h4> | |
| {% if category.children|length %} | |
| <ul> | |
| {% for child in category.children %} | |
| {{ _self.recursiveCategory(child) }} | |
| {% endfor %} | |
| </ul> |
| <?php | |
| /** | |
| * @author iron-viper | |
| */ | |
| $array = [ | |
| [ | |
| "id" => 1, | |
| "name" => "test-1", | |
| "parent" => 0, | |
| "children" => [ |
| <?php | |
| function quickSort($array) | |
| { | |
| if (count($array) < 2) { | |
| return $array; | |
| } | |
| $pivot = array_shift($array); |
| <?php | |
| $credentials = "username:password"; | |
| // Read the XML to send to the Web Service | |
| $request_file = "./SampleRequest.xml"; | |
| $fh = fopen($request_file, 'r'); | |
| $xml_data = fread($fh, filesize($request_file)); | |
| fclose($fh); | |
| -- 1. Вывести список сотрудников, получающих заработную плату большую чем у непосредственного руководителя | |
| SELECT * | |
| FROM Employee AS employees, Employee AS chieves | |
| WHERE chieves.id = employees.chief_id AND employees.salary > chieves.salary; | |
| -- 2. Вывести список сотрудников, получающих максимальную заработную плату в своем отделе | |
| SELECT * | |
| FROM Employee AS employees | |
| WHERE employees.salary = (SELECT MAX(salary) FROM Employee AS max WHERE max.department_id = employees.department_id); |
| #!/bin/bash | |
| # Function to convert the version string | |
| convert_version_string() { | |
| local input_string=$1 | |
| local version_number="${input_string#*/v}" # Remove everything before '/v' | |
| local version_parts=($(echo "$version_number" | tr '.' ' ')) # Split version string into parts | |
| # Ensure we have at least three parts (major, minor, patch) | |
| while (( ${#version_parts[@]} < 3 )) |
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Console\Concerns\CallsCommands; | |
| use Illuminate\Support\Facades\Http; | |
| use Laravel\Forge\Forge; | |
| use Laravel\Forge\Resources\Daemon; |
| server { | |
| listen 80; | |
| server_name site.dev; | |
| index index.php; | |
| root /Users/balkon_smoke/Sites/site.dev/web; | |
| error_log /Users/balkon_smoke/Sites/site.dev/logs/error.log; | |
| access_log /Users/balkon_smoke/Sites/site.dev/logs/access.log; | |
| location / { |