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
/// | |
public protocol ClampSupport { | |
func clamped(from lowerBound: Self, to upperBound: Self) -> Self | |
func clamped(from lowerBound: Self) -> Self | |
func clamped(to lowerBound: Self) -> Self | |
} | |
public extension ClampSupport where Self: Comparable { |
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 5.6.29: | |
ReflectionClass::newInstanceWithoutConstructor: 0.17457699775696 | |
ReflectionClass::newInstanceWithoutConstructor(json): 0.11926913261414 | |
unserialize: 0.21122980117798 | |
PHP 7.1.0: | |
ReflectionClass::newInstanceWithoutConstructor: 0.066795110702515 | |
ReflectionClass::newInstanceWithoutConstructor(json): 0.065139055252075 | |
unserialize: 0.10229301452637 |
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 | |
// Copyright (c) 2016 Andrey <[email protected]> Savitsky. All rights reserved. | |
// Site: http://qRoC.pro | |
namespace CommonBundle\DataFixtures; | |
use Doctrine\Common\DataFixtures\FixtureInterface; | |
use Doctrine\Common\DataFixtures\OrderedFixtureInterface; | |
use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
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
vim /etc/apt/sources.list | |
> deb http://httpredir.debian.org/debian/ jessie main contrib non-free | |
apt-get update | |
apt-get install lib32stdc++6 binutils firmware-linux-nonfree | |
wget http://debian.sevstar.net/hp/pool/non-free/hp-health_8.7.0.1.2-5_amd64.deb | |
dpkg -i hp-health_8.7.0.1.2-5_amd64.deb | |
wget http://debian.sevstar.net/hp/pool/non-free/cpqacuxe_8.70-9.0.7-8_amd64.deb | |
dpkg -i cpqacuxe_8.70-9.0.7-8_amd64.deb | |
wget http://debian.sevstar.net/hp/pool/non-free/hp-snmp-agents_8.7.0.1.7-9_amd64.deb | |
mkdir tmp |
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
DEBIAN 8 Настройка сервера | |
========================== | |
Генерация ключей доступа | |
------------------------ | |
$ cd ~/.ssh | |
$ ssh-keygen -t rsa | |
> KEY_NAME | |
> PASSPHRASE | |
$ ssh-keygen -R [SERVER_IP] |
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
printf "\n" | pecl install apcu-beta && echo extension=apcu.so > /usr/local/etc/php/conf.d/10-apcu.ini | |
printf "\n" | pecl install apcu_bc-beta && echo extension=apc.so > /usr/local/etc/php/conf.d/apc.ini | |
printf "\n" | pecl install channel://pecl.php.net/amqp-1.7.0alpha2 && echo extension=amqp.so > /usr/local/etc/php/conf.d/amqp.ini | |
pecl install channel://pecl.php.net/ev-1.0.0RC9 && echo extension=ev.so > /usr/local/etc/php/conf.d/ev.ini | |
cd /etc && git clone --depth=1 -b php7 https://github.com/phpredis/phpredis.git \ | |
&& cd /etc/phpredis \ | |
&& phpize \ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#include <float.h> | |
#include <sys/time.h> | |
#include <stdint.h> | |
typedef int64_t TimeVal; |
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
BenchmarkNewV1Arr-8 2000000000 1.86 ns/op | |
BenchmarkNewV1Struct-8 1000000000 2.04 ns/op | |
BenchmarkNewV2Arr-8 1000000000 3.18 ns/op | |
BenchmarkNewV2Struct-8 500000000 3.24 ns/op |
NewerOlder