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 |
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
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
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
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
<?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
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
/// | |
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
Build flags: --configuration release | |
swiftc: -Ounchecked -gnone -whole-module-optimization -static-stdlib | |
Time elapsed for inverse: 2.64717900753021 s. | |
Time elapsed for inverse2: 1.35483705997467 s. | |
Time elapsed for inverse3: 11.727156996727 s. | |
Time elapsed for inverse4: 1.38384604454041 s. | |
Time elapsed for inverse5: 11.8544869422913 s. | |
Time elapsed for inverse6: 1.38975405693054 s. | |
Time elapsed for inverse7: 1.37177407939121 s. |
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 | |
/// Work in PHP < 5.4.1 | |
interface ITest { | |
public function testSelf(self $test); | |
} | |
class Test implements ITest { | |
private $a = 10; | |
OlderNewer