This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ * @Assert\Choice(callback={IepBundle\Enum\StudentSelectionStates::class, "getValues"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$qb = $this->createQueryBuilder('country'); | |
return $qb | |
->join(Source::class, 'source', Join::WITH, 'source.country = country') | |
->getQuery() | |
->getResult(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Скачать `docker`, в состав входит `docker-machine` | |
2) Скачать `virtualbox`, но есть и другие способы | |
3) Запустить `docker-machine create NAME` | |
4) Поставить nfs для более быстрой синхронизации через `docker-machine-nfs NAME`, пакет можно скачать через brew | |
5) Экспортировать в окружение переменные машины, которые можно получить через `docker-machine env NAME` | |
6) Запустить `docker-compose up` | |
7) В хостам вместо `127.0.0.1` указать ip машины | |
8) Следовать дальнейшей инструкции | |
`VBoxManage modifyvm "VM name" --natdnshostresolver1 on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CustomsStatisticsController { | |
/** | |
* @SWG\Response( | |
* response=200, | |
* description="Returns customs statistics list joined by tnved", | |
* @Model(type=\App\Form\Model\View\CustomStatisticsListView::class) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Form\Model; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Filesystem\Filesystem; | |
use Symfony\Component\HttpFoundation\File\File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Doctrine\DBAL\Connection; | |
... | |
return $this | |
->getEntityManager() | |
->getConnection() | |
->executeQuery( | |
'SELECT * from posts WHERE id IN (?)', | |
[$postIdCollection], | |
[Connection::PARAM_INT_ARRAY] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Doctrine\ORM\Query\Expr\Join; | |
//... | |
//Many Sources has one country | |
$qb = $this->createQueryBuilder('country'); | |
return $qb | |
->join(Source::class, 'source', Join::WITH, 'source.country = country') | |
->getQuery() | |
->getResult(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type userSession struct { | |
sync.Mutex | |
userID int64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return $this | |
->getEntityManager() | |
->getConnection() | |
->executeQuery( | |
"SELECT id, concat(first_name, ' ', last_name) name, avatar FROM profiles WHERE id IN (?)", | |
[$userIds], | |
[Connection::PARAM_INT_ARRAY] | |
) | |
->fetchAll(\PDO::FETCH_UNIQUE); |
NewerOlder