Request:
Query Params
auth_key - required, string
event - required, integer, one of [0, 1, 2], 0 - DELETED, 1 - CHANGED, 2 - ADDED
SELECT blocked_locks.pid AS blocked_pid, | |
blocked_activity.usename AS blocked_user, | |
blocking_locks.pid AS blocking_pid, | |
blocking_activity.usename AS blocking_user, | |
blocked_activity.query AS blocked_statement, | |
blocking_activity.query AS current_statement_in_blocking_process | |
FROM pg_catalog.pg_locks blocked_locks | |
JOIN pg_catalog.pg_stat_activity blocked_activity ON blocked_activity.pid = blocked_locks.pid | |
JOIN pg_catalog.pg_locks blocking_locks | |
ON blocking_locks.locktype = blocked_locks.locktype |
Request:
Query Params
auth_key - required, string
event - required, integer, one of [0, 1, 2], 0 - DELETED, 1 - CHANGED, 2 - ADDED
#!/bin/bash | |
# Install dependencies only for Docker. | |
[[ ! -e /.dockerinit ]] && exit 0 | |
set -xe | |
# Update packages and install composer and PHP dependencies. | |
apt-get update -yqq | |
apt-get install git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev phpunit -yqq |
Если ты пишешь код, то наверняка его тестируешь. Если речь о какой-то функции, то ты можешь вызывать ее с разными аргументами, и смотреть, что она вернет. Если ты сверстал сайт, то ты открываешь его в браузере, жмешь ссылки и кнопки, проверяешь что все сделано верно. Это называется ручное тестирование — человек проверяет работу программы. Нельзя ли эту задачу переложить на плечи роботов? Обычно можно, и это называется автоматизированное тестирование.
Тестирование позволяет сделать твой код надежнее, а твою жизнь проще. Ведь согласись, лучше когда ты сам обнаруживаешь и исправляешь ошибку до релиза, чем когда рассерженный заказчик звонит на выходных и требует срочно исправить неработающий функционал.
Тестирование особенно полезно при разработке больших приложений в большой команде, когда ты можешь нечаянно сломать какую-то функцию, которую делал другой человек, и о которой ты не знал. Или когда надо доработать написанный ранее сложный проект.
В больших компаниях может быт
The inverse side has to have the mappedBy attribute of the OneToOne, OneToMany, or ManyToMany mapping declaration.
The mappedBy attribute contains the name of the association-field on the owning side.
The owning side has to have the inversedBy attribute of the OneToOne, ManyToOne, or ManyToMany mapping declaration.
The inversedBy attribute contains the name of the association-field on the inverse-side.
ManyToOne is always the owning side of a bidirectional association.
OneToMany is always the inverse side of a bidirectional association.
The owning side of a OneToOne association is the entity with the table containing the foreign key.
You can pick the owning side of a many-to-many association yourself.
Request: POST /api/sync-status?auth_key={auth_key}
{
// any data
}
Response:
/* | |
* 1. | |
* objects with properties which are themselves objects, only the references are copied over: | |
* var foo = { a: 0 , b: { c: 0 } }; | |
* var copy = { ...foo }; | |
*/ | |
var obj = { foo: "foo", bar: "bar" }; | |
var copy = { ...obj }; | |
var copy = Object.assign({}, obj); |
<?php | |
/* | |
14. Напишите, пожалуйста, код для сортировки массива $arr по полю id. Структура массива: | |
$arr = [ | |
['id' => 1, ...], | |
['id' => 2, ...], | |
['id' => 3, ...], | |
... | |
]; | |
*/ |
<?php | |
function foo($x) | |
{ | |
return $x === $x(); | |
} |
To design well decoupled components, it helps to reflect about: “if I would want to remove this business concept, by deleting its component root folder would all of the business concept code be removed and would the remaining application not break?” If the answer is yes, then we have a well decoupled component.
For example, in a Command Bus architecture the command and the handler do not work one without the other, they are conceptually and functionally bound together, so if we would need to remove that logic, we would remove them both, and if they are in the same place, we just remove one folder (the problem we are trying to solve is not about deleting code, it’s about having decoupled and cohesive code, but it helps to think in these terms). So to follow the CCP and the CRP, a command should be in the same folder as its handler.