Skip to content

Instantly share code, notes, and snippets.

@andreybolonin
andreybolonin / ControllerTest.php
Last active May 22, 2020 06:15
ControllerTest.php
<?php
namespace Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\HttpClient;
class ControllerTest extends TestCase
{
public function testRead()
@andreybolonin
andreybolonin / .gitlab-ci.yml
Last active November 28, 2020 11:47
.gitlab-ci.yml
image: ubuntu:focal
services:
- postgres:13
variables:
POSTGRES_PASSWORD: root
POSTGRES_USER: root
POSTGRES_DB: symfony

Libuv and libev, two I/O libraries with similar names, recently had the privilege to use both libraries to write something. Now let's talk about my own subjective expression of common and different points.

The topic of high-performance network programming has been discussed. Asynchronous, asynchronous, or asynchronous. Whether it is epoll or kqueue, it is always indispensable to the asynchronous topic.

Libuv is asynchronous, and libev is synchronous multiplexing IO multiplexing.

Libev is a simple encapsulation of system I/O reuse. Basically, it solves the problem of different APIs between epoll and kqueuq. Ensure that programs written using livev's API can run on most *nix platforms. However, the disadvantages of libev are also obvious. Because it basically just encapsulates the Event Library, it is inconvenient to use. For example, accept(3) requires manual setnonblocking after connection. EAGAIN, EWOULDBLOCK, and EINTER need to be detected when reading from a socket. This is a

<p style="widows: 2; orphans: 2;" align="CENTER">&nbsp;</p>
<div style="widows: 2; orphans: 2; text-align: center;"><strong><span style="color: #000000;"><span
style="font-family: Arial, sans-serif;"><span style="font-size: medium;"><span
style="font-style: normal;"><span
style="font-weight: normal;">ЗАЯВКА (реєстраційний №&nbsp;</span></span></span></span></span></strong>{{ applicationNumber }}
<strong><span style="color: #000000;"><span style="font-family: Arial, sans-serif;"><span
style="font-size: medium;"><span style="font-style: normal;"><span style="font-weight: normal;"> &nbsp;)<br/><br/></span></span></span></span></span></strong>
</div>
<div style="text-align: center;" align="CENTER">&nbsp;</div>
<div style="text-align: center;" align="CENTER"><span style="color: #000000;"><span
image: ubuntu:zesty
services:
- mariadb
variables:
MYSQL_DATABASE: smsclub_old
MYSQL_ROOT_PASSWORD: root
before_script:
sudo echo "deb https://download.docker.com/linux/ubuntu zesty edge" > /etc/apt/sources.list.d/docker.list
sudo apt update && sudo apt install docker-ce
CREATE TABLE `article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 NOT NULL,
`description` text CHARACTER SET utf8 NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
CREATE SEQUENCE article_id_seq;
CREATE TABLE article (
id int NOT NULL DEFAULT nextval('article_id_seq'),
name varchar(255) NOT NULL,
description text NOT NULL,
created_at TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
language: php
php:
- 7.1
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
- bin/console doctrine:schema:update --force
- bin/console doctrine:fixtures:load -q
<?php
/**
* Перед тестированием
* загрузить фикстуру
*
* LoadArticleData.php
*/
namespace Tests\AppBundle\Controller;