Second | Input | Processed | Left | Rejected |
---|---|---|---|---|
1 | 300 | 200 | 0 | 100 |
2 | 301 | 200 | 0 | 101 |
3 | 337 | 200 | 0 | 137 |
This file contains hidden or 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
{ | |
"scripts": { | |
"auto-scripts": { | |
"cache:clear": "symfony-cmd", | |
"assets:install %PUBLIC_DIR%": "symfony-cmd" | |
}, | |
"post-install-cmd": [ | |
"@auto-scripts" | |
], | |
"post-update-cmd": [ |
Second | Input | Processed | Left | Rejected |
---|---|---|---|---|
1 | 300 | 300 | 0 | 0 |
2 | 301 | 300 | 0 | 1 |
3 | 337 | 300 | 0 | 37 |
Second | Input | Processed | Left |
---|---|---|---|
1 | 300 | 200 | 100 |
2 | 400 | 200 | 200 |
3 | 500 | 200 | 300 |
Second | Input | Processed | Left |
---|---|---|---|
300 | 600 | 300 | 300 |
301 | 601 | 300 | 301 |
Second | Input | Processed | Left |
---|---|---|---|
1 | 301 | 300 | 1 |
2 | 302 | 300 | 2 |
3 | 303 | 300 | 3 |
This file contains hidden or 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
WITH period_ranges AS ( | |
SELECT | |
id, | |
tstzrange(period_start, period_end) AS period | |
FROM | |
your_table | |
), recursive_group AS ( | |
SELECT | |
id, | |
period, |
This file contains hidden or 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 | |
final class PricesHttpClient implements PricesClient | |
{ | |
public function __construct( | |
// AMPHP http client (https://github.com/amphp/http-client) | |
private HttpClient $httpClient, | |
) { | |
} |
This file contains hidden or 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
#[AsDoctrineListener(event: ToolEvents::postGenerateSchema)] | |
final readonly class QuestionForeignKeyListener | |
{ | |
/** @throws SchemaException */ | |
public function postGenerateSchema(GenerateSchemaEventArgs $eventArgs): void | |
{ | |
$schema = $eventArgs->getSchema(); | |
$table = $schema->getTable('answers'); |
This file contains hidden or 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
// warning: this approach is error-prone in case if there's a doctrine's lazy-entity proxy! | |
// when trying to call getQuestion() method on such non-initialized object, "property not initialized" error will come up | |
trait ManyToOneOtherEntityRelationshipMappingTrait | |
{ | |
protected Question $question; | |
#[ORM\Column(type: 'uuid')] | |
private Uuid $questionId; |
NewerOlder