├── .gitignore ├── articles ├── thrift │ └── demo │ │ ├── python │ │ ├── gen-py │ │ │ ├── __init__.py │ │ │ └── Services │ │ │ │ ├── __init__.py │ │ │ │ ├── UserService │ │ │ │ ├── __init__.py │ │ │ │ ├── ttypes.pyc │ │ │ │ ├── __init__.pyc │ │ │ │ ├── UserService.pyc │ │ │ │ └── constants.py │ │ │ │ └── __init__.pyc │ │ └── client.py │ │ ├── php │ │ ├── workerman-thrift │ │ │ ├── Applications │ │ │ │ ├── Statistics │ │ │ │ │ ├── Web │ │ │ │ │ │ ├── js │ │ │ │ │ │ │ └── scripts.js │ │ │ │ │ │ ├── img │ │ │ │ │ │ │ ├── favicon.png │ │ │ │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ │ │ │ ├── apple-touch-icon-114-precomposed.png │ │ │ │ │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ │ │ │ │ ├── apple-touch-icon-57-precomposed.png │ │ │ │ │ │ │ └── apple-touch-icon-72-precomposed.png │ │ │ │ │ │ ├── css │ │ │ │ │ │ │ └── style.css │ │ │ │ │ │ ├── config.php │ │ │ │ │ │ ├── less │ │ │ │ │ │ │ ├── breadcrumbs.less │ │ │ │ │ │ │ ├── component-animations.less │ │ │ │ │ │ │ ├── wells.less │ │ │ │ │ │ │ ├── thumbnails.less │ │ │ │ │ │ │ ├── close.less │ │ │ │ │ │ │ ├── utilities.less │ │ │ │ │ │ │ ├── jumbotron.less │ │ │ │ │ │ │ ├── media.less │ │ │ │ │ │ │ ├── pager.less │ │ │ │ │ │ │ └── badges.less │ │ │ │ │ │ └── _init.php │ │ │ │ │ ├── Config │ │ │ │ │ │ ├── Cache │ │ │ │ │ │ │ ├── empty │ │ │ │ │ │ │ └── 1477966754.iplist.cache.php │ │ │ │ │ │ └── Config.php │ │ │ │ │ ├── data │ │ │ │ │ │ └── statistic │ │ │ │ │ │ │ └── statistic │ │ │ │ │ │ │ ├── UserService │ │ │ │ │ │ │ ├── userList.2018-02-12 │ │ │ │ │ │ │ └── none.2018-02-12 │ │ │ │ │ │ │ └── WorkerMan │ │ │ │ │ │ │ └── Statistics.2018-02-12 │ │ │ │ │ ├── README.md │ │ │ │ │ ├── Views │ │ │ │ │ │ ├── footer.tpl.php │ │ │ │ │ │ └── log.tpl.php │ │ │ │ │ └── Lib │ │ │ │ │ │ └── Cache.php │ │ │ │ └── ThriftRpc │ │ │ │ │ ├── Services │ │ │ │ │ └── HelloWorld │ │ │ │ │ │ ├── HelloWorldHandler.php │ │ │ │ │ │ └── Types.php │ │ │ │ │ ├── Lib │ │ │ │ │ └── Thrift │ │ │ │ │ │ ├── Factory │ │ │ │ │ │ └── TTransportFactory.php │ │ │ │ │ │ ├── StringFunc │ │ │ │ │ │ └── TStringFunc.php │ │ │ │ │ │ ├── Type │ │ │ │ │ │ └── TMessageType.php │ │ │ │ │ │ ├── Server │ │ │ │ │ │ └── TServerTransport.php │ │ │ │ │ │ └── Protocol │ │ │ │ │ │ └── JSON │ │ │ │ │ │ └── BaseContext.php │ │ │ │ │ └── start.php │ │ │ ├── .gitignore │ │ │ ├── vendor │ │ │ │ ├── workerman │ │ │ │ │ └── workerman │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── Lib │ │ │ │ │ │ └── Constants.php │ │ │ │ │ │ └── MIT-LICENSE.txt │ │ │ │ ├── autoload.php │ │ │ │ └── composer │ │ │ │ │ ├── autoload_classmap.php │ │ │ │ │ ├── autoload_namespaces.php │ │ │ │ │ ├── autoload_psr4.php │ │ │ │ │ ├── autoload_static.php │ │ │ │ │ └── LICENSE │ │ │ ├── composer.json │ │ │ ├── start.php │ │ │ └── MIT-LICENSE.txt │ │ ├── composer.json │ │ └── vendor │ │ │ ├── composer │ │ │ ├── autoload_psr4.php │ │ │ ├── autoload_classmap.php │ │ │ ├── autoload_namespaces.php │ │ │ ├── autoload_static.php │ │ │ ├── LICENSE │ │ │ └── installed.json │ │ │ └── autoload.php │ │ ├── java │ │ ├── thrift │ │ │ ├── src │ │ │ │ └── main │ │ │ │ │ ├── resources │ │ │ │ │ └── log4j2.properties │ │ │ │ │ └── java │ │ │ │ │ └── Services │ │ │ │ │ └── UserService │ │ │ │ │ └── ErrCodeEnum.java │ │ │ └── ReadMe.txt │ │ └── gen-java │ │ │ └── Services │ │ │ └── UserService │ │ │ └── ErrCodeEnum.java │ │ └── UserService.thrift ├── swoole │ ├── mail │ │ ├── vendor │ │ │ ├── phpmailer │ │ │ │ └── phpmailer │ │ │ │ │ └── VERSION │ │ │ ├── autoload.php │ │ │ └── composer │ │ │ │ ├── autoload_classmap.php │ │ │ │ ├── autoload_namespaces.php │ │ │ │ ├── autoload_psr4.php │ │ │ │ ├── autoload_static.php │ │ │ │ └── LICENSE │ │ ├── composer.json │ │ ├── MailConfig.php │ │ └── client.php │ ├── app │ │ ├── controller │ │ │ ├── Index.php │ │ │ ├── Db.php │ │ │ ├── Session.php │ │ │ ├── Http.php │ │ │ └── Base.php │ │ └── lib │ │ │ └── Db.php │ └── chat │ │ └── client.html ├── chinese_search │ ├── elasticSearch │ │ ├── vendor │ │ │ ├── psr │ │ │ │ └── log │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── Psr │ │ │ │ │ └── Log │ │ │ │ │ │ ├── InvalidArgumentException.php │ │ │ │ │ │ ├── LoggerAwareInterface.php │ │ │ │ │ │ ├── LogLevel.php │ │ │ │ │ │ ├── LoggerAwareTrait.php │ │ │ │ │ │ └── NullLogger.php │ │ │ │ │ ├── composer.json │ │ │ │ │ └── LICENSE │ │ │ ├── elasticsearch │ │ │ │ └── elasticsearch │ │ │ │ │ ├── docs │ │ │ │ │ ├── build │ │ │ │ │ │ ├── PROJECT_VERSION │ │ │ │ │ │ ├── SAMI_VERSION │ │ │ │ │ │ ├── interfaces.asciidoc │ │ │ │ │ │ ├── namespaces.asciidoc │ │ │ │ │ │ └── renderer.index │ │ │ │ │ ├── php-version-requirement.asciidoc │ │ │ │ │ ├── overview.asciidoc │ │ │ │ │ └── index.asciidoc │ │ │ │ │ ├── travis │ │ │ │ │ └── generate_docs.sh │ │ │ │ │ ├── .gitmodules │ │ │ │ │ ├── util │ │ │ │ │ ├── docstheme │ │ │ │ │ │ ├── manifest.yml │ │ │ │ │ │ ├── layout │ │ │ │ │ │ │ └── base.twig │ │ │ │ │ │ └── pages │ │ │ │ │ │ │ ├── namespaces.twig │ │ │ │ │ │ │ ├── interfaces.twig │ │ │ │ │ │ │ └── classes.twig │ │ │ │ │ ├── docsConfig.php │ │ │ │ │ └── RestSpecRunner.php │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── src │ │ │ │ │ └── Elasticsearch │ │ │ │ │ │ ├── Common │ │ │ │ │ │ ├── Exceptions │ │ │ │ │ │ │ ├── ElasticsearchException.php │ │ │ │ │ │ │ ├── Missing404Exception.php │ │ │ │ │ │ │ ├── RuntimeException.php │ │ │ │ │ │ │ ├── TransportException.php │ │ │ │ │ │ │ ├── Forbidden403Exception.php │ │ │ │ │ │ │ ├── MaxRetriesException.php │ │ │ │ │ │ │ ├── NoNodesAvailableException.php │ │ │ │ │ │ │ ├── NoDocumentsToGetException.php │ │ │ │ │ │ │ ├── NoShardAvailableException.php │ │ │ │ │ │ │ ├── RequestTimeout408Exception.php │ │ │ │ │ │ │ ├── ServerErrorResponseException.php │ │ │ │ │ │ │ ├── ClientErrorResponseException.php │ │ │ │ │ │ │ ├── Conflict409Exception.php │ │ │ │ │ │ │ ├── BadRequest400Exception.php │ │ │ │ │ │ │ ├── ScriptLangNotSupportedException.php │ │ │ │ │ │ │ ├── AlreadyExpiredException.php │ │ │ │ │ │ │ ├── InvalidArgumentException.php │ │ │ │ │ │ │ ├── RoutingMissingException.php │ │ │ │ │ │ │ ├── UnexpectedValueException.php │ │ │ │ │ │ │ ├── BadMethodCallException.php │ │ │ │ │ │ │ └── Curl │ │ │ │ │ │ │ │ ├── CouldNotConnectToHost.php │ │ │ │ │ │ │ │ ├── OperationTimeoutException.php │ │ │ │ │ │ │ │ └── CouldNotResolveHostException.php │ │ │ │ │ │ └── EmptyLogger.php │ │ │ │ │ │ ├── Endpoints │ │ │ │ │ │ ├── BulkEndpointInterface.php │ │ │ │ │ │ ├── Indices │ │ │ │ │ │ │ ├── Template │ │ │ │ │ │ │ │ └── AbstractTemplateEndpoint.php │ │ │ │ │ │ │ ├── Alias │ │ │ │ │ │ │ │ └── AbstractAliasEndpoint.php │ │ │ │ │ │ │ ├── Delete.php │ │ │ │ │ │ │ ├── Seal.php │ │ │ │ │ │ │ └── Recovery.php │ │ │ │ │ │ ├── Info.php │ │ │ │ │ │ ├── Ping.php │ │ │ │ │ │ ├── Remote │ │ │ │ │ │ │ └── Info.php │ │ │ │ │ │ ├── Cat │ │ │ │ │ │ │ ├── Help.php │ │ │ │ │ │ │ ├── Master.php │ │ │ │ │ │ │ ├── Plugins.php │ │ │ │ │ │ │ ├── NodeAttrs.php │ │ │ │ │ │ │ ├── Health.php │ │ │ │ │ │ │ ├── Nodes.php │ │ │ │ │ │ │ ├── PendingTasks.php │ │ │ │ │ │ │ ├── Repositories.php │ │ │ │ │ │ │ └── Tasks.php │ │ │ │ │ │ ├── Cluster │ │ │ │ │ │ │ ├── PendingTasks.php │ │ │ │ │ │ │ ├── Settings │ │ │ │ │ │ │ │ └── Get.php │ │ │ │ │ │ │ └── Nodes │ │ │ │ │ │ │ │ ├── Shutdown.php │ │ │ │ │ │ │ │ └── HotThreads.php │ │ │ │ │ │ └── Ingest │ │ │ │ │ │ │ └── Pipeline │ │ │ │ │ │ │ └── Get.php │ │ │ │ │ │ ├── ConnectionPool │ │ │ │ │ │ ├── ConnectionPoolInterface.php │ │ │ │ │ │ ├── Selectors │ │ │ │ │ │ │ ├── SelectorInterface.php │ │ │ │ │ │ │ ├── RandomSelector.php │ │ │ │ │ │ │ └── RoundRobinSelector.php │ │ │ │ │ │ └── SimpleConnectionPool.php │ │ │ │ │ │ ├── Serializers │ │ │ │ │ │ └── SerializerInterface.php │ │ │ │ │ │ ├── Namespaces │ │ │ │ │ │ └── RemoteNamespace.php │ │ │ │ │ │ └── Connections │ │ │ │ │ │ └── ConnectionFactoryInterface.php │ │ │ │ │ ├── .github │ │ │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ │ │ └── ISSUE_TEMPLATE.md │ │ │ │ │ ├── .php_cs │ │ │ │ │ ├── tests │ │ │ │ │ ├── bootstrap.php │ │ │ │ │ └── Elasticsearch │ │ │ │ │ │ └── Tests │ │ │ │ │ │ ├── ConnectionPool │ │ │ │ │ │ └── SniffingConnectionPoolIntegrationTest.php │ │ │ │ │ │ ├── ClientIntegrationTests.php │ │ │ │ │ │ └── Endpoints │ │ │ │ │ │ └── AbstractEndpointTest.php │ │ │ │ │ ├── phpunit-integration.xml │ │ │ │ │ ├── phpunit.xml │ │ │ │ │ └── composer.json │ │ │ ├── guzzlehttp │ │ │ │ ├── ringphp │ │ │ │ │ ├── docs │ │ │ │ │ │ ├── requirements.txt │ │ │ │ │ │ └── conf.py │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── src │ │ │ │ │ │ ├── Exception │ │ │ │ │ │ │ ├── RingException.php │ │ │ │ │ │ │ ├── CancelledException.php │ │ │ │ │ │ │ ├── CancelledFutureAccessException.php │ │ │ │ │ │ │ └── ConnectException.php │ │ │ │ │ │ └── Future │ │ │ │ │ │ │ ├── FutureArrayInterface.php │ │ │ │ │ │ │ ├── FutureValue.php │ │ │ │ │ │ │ ├── FutureArray.php │ │ │ │ │ │ │ ├── MagicFutureTrait.php │ │ │ │ │ │ │ └── CompletedFutureArray.php │ │ │ │ │ ├── tests │ │ │ │ │ │ ├── bootstrap.php │ │ │ │ │ │ └── Future │ │ │ │ │ │ │ └── CompletedFutureArrayTest.php │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── phpunit.xml.dist │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── composer.json │ │ │ │ │ └── LICENSE │ │ │ │ └── streams │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── src │ │ │ │ │ ├── Exception │ │ │ │ │ │ ├── CannotAttachException.php │ │ │ │ │ │ └── SeekException.php │ │ │ │ │ ├── MetadataStreamInterface.php │ │ │ │ │ ├── NoSeekStream.php │ │ │ │ │ ├── LazyOpenStream.php │ │ │ │ │ └── InflateStream.php │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── tests │ │ │ │ │ ├── InflateStreamTest.php │ │ │ │ │ ├── Exception │ │ │ │ │ │ └── SeekExceptionTest.php │ │ │ │ │ └── DroppingStreamTest.php │ │ │ │ │ ├── phpunit.xml.dist │ │ │ │ │ ├── composer.json │ │ │ │ │ ├── README.rst │ │ │ │ │ └── LICENSE │ │ │ ├── react │ │ │ │ └── promise │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── src │ │ │ │ │ ├── functions_include.php │ │ │ │ │ ├── Exception │ │ │ │ │ │ └── LengthException.php │ │ │ │ │ ├── PromisorInterface.php │ │ │ │ │ ├── CancellablePromiseInterface.php │ │ │ │ │ ├── PromiseInterface.php │ │ │ │ │ ├── ExtendedPromiseInterface.php │ │ │ │ │ └── UnhandledRejectionException.php │ │ │ │ │ ├── tests │ │ │ │ │ ├── Stub │ │ │ │ │ │ └── CallableStub.php │ │ │ │ │ ├── bootstrap.php │ │ │ │ │ ├── fixtures │ │ │ │ │ │ ├── SimpleTestCancellable.php │ │ │ │ │ │ ├── SimpleTestCancellableThenable.php │ │ │ │ │ │ ├── SimpleFulfilledTestThenable.php │ │ │ │ │ │ ├── SimpleRejectedTestPromise.php │ │ │ │ │ │ └── SimpleFulfilledTestPromise.php │ │ │ │ │ ├── PromiseAdapter │ │ │ │ │ │ ├── PromiseAdapterInterface.php │ │ │ │ │ │ └── CallbackPromiseAdapter.php │ │ │ │ │ ├── PromiseTest │ │ │ │ │ │ └── FullTestTrait.php │ │ │ │ │ ├── TestCase.php │ │ │ │ │ └── DeferredTest.php │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── composer.json │ │ │ │ │ ├── phpunit.xml.dist │ │ │ │ │ └── LICENSE │ │ │ ├── autoload.php │ │ │ └── composer │ │ │ │ ├── autoload_classmap.php │ │ │ │ ├── autoload_namespaces.php │ │ │ │ ├── autoload_files.php │ │ │ │ ├── autoload_psr4.php │ │ │ │ └── LICENSE │ │ ├── composer.json │ │ ├── clientPut.php │ │ └── clientGet.php │ └── sphinx │ │ └── client.php ├── queue │ ├── beanstalk │ │ ├── vendor │ │ │ ├── davidpersson │ │ │ │ └── beanstalk │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── tests │ │ │ │ │ └── PutBench.php │ │ │ │ │ ├── composer.json │ │ │ │ │ └── LICENSE │ │ │ ├── autoload.php │ │ │ └── composer │ │ │ │ ├── autoload_classmap.php │ │ │ │ ├── autoload_namespaces.php │ │ │ │ ├── autoload_psr4.php │ │ │ │ ├── autoload_static.php │ │ │ │ └── LICENSE │ │ ├── composer.json │ │ ├── producer.php │ │ └── consumer.php │ ├── redis │ │ ├── queuePush.php │ │ ├── topicPublish.php │ │ ├── topicSubscribe.php │ │ └── queuePop.php │ ├── httpsqs │ │ ├── producer.php │ │ └── consumer.php │ ├── kafka │ │ ├── producer.php │ │ └── consumer.php │ ├── rabbitMQ │ │ └── producer.php │ └── php │ │ └── array.php ├── pay │ ├── wx │ │ ├── WxpayAPI │ │ │ ├── doc │ │ │ │ ├── README │ │ │ │ └── README.doc │ │ │ ├── image │ │ │ │ ├── bk.png │ │ │ │ ├── image001.jpg │ │ │ │ └── image002.png │ │ │ ├── example │ │ │ │ ├── qrcode.php │ │ │ │ └── WxPay.NativePay.php │ │ │ └── lib │ │ │ │ └── WxPay.Exception.php │ │ └── view │ │ │ ├── WxWeb.html │ │ │ └── WxWebRedirect.html │ └── apple_pay │ │ └── image │ │ ├── top.jpg │ │ └── 苹果支付流程图.jpg ├── PHP7 │ └── new_features │ │ └── type.php └── http │ └── php │ ├── fork.php │ ├── server_stream.php │ ├── signal.php │ ├── event_stdin.php │ └── server_socket.php └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .git 2 | .idea 3 | -------------------------------------------------------------------------------- /articles/thrift/demo/python/gen-py/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /articles/thrift/demo/python/gen-py/Services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /articles/swoole/mail/vendor/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.0.3 -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/psr/log/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/js/scripts.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Config/Cache/empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /articles/queue/beanstalk/vendor/davidpersson/beanstalk/.gitignore: -------------------------------------------------------------------------------- 1 | composer.lock 2 | vendor 3 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | .buildpath 3 | .project 4 | .settings 5 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/docs/build/PROJECT_VERSION: -------------------------------------------------------------------------------- 1 | master -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/docs/build/SAMI_VERSION: -------------------------------------------------------------------------------- 1 | 3.3.0-DEV -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx_rtd_theme 2 | -------------------------------------------------------------------------------- /articles/pay/wx/WxpayAPI/doc/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/pay/wx/WxpayAPI/doc/README -------------------------------------------------------------------------------- /articles/pay/apple_pay/image/top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/pay/apple_pay/image/top.jpg -------------------------------------------------------------------------------- /articles/pay/wx/WxpayAPI/image/bk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/pay/wx/WxpayAPI/image/bk.png -------------------------------------------------------------------------------- /articles/swoole/mail/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "apache/thrift": "0.10.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /articles/thrift/demo/python/gen-py/Services/UserService/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ['ttypes', 'constants', 'UserService'] 2 | -------------------------------------------------------------------------------- /articles/pay/apple_pay/image/苹果支付流程图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/pay/apple_pay/image/苹果支付流程图.jpg -------------------------------------------------------------------------------- /articles/pay/wx/WxpayAPI/doc/README.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/pay/wx/WxpayAPI/doc/README.doc -------------------------------------------------------------------------------- /articles/queue/beanstalk/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "davidpersson/beanstalk": "^2.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /articles/pay/wx/WxpayAPI/image/image001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/pay/wx/WxpayAPI/image/image001.jpg -------------------------------------------------------------------------------- /articles/pay/wx/WxpayAPI/image/image002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/pay/wx/WxpayAPI/image/image002.png -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | build/artifacts/ 3 | composer.lock 4 | docs/_build/ 5 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "elasticsearch/elasticsearch": "^5.3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/.gitignore: -------------------------------------------------------------------------------- 1 | composer.lock 2 | composer.phar 3 | phpunit.xml 4 | build/ 5 | vendor/ 6 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/travis/generate_docs.sh: -------------------------------------------------------------------------------- 1 | php vendor/sami/sami/sami.php update util/DocsConfig.php -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_STORE 3 | coverage 4 | phpunit.xml 5 | composer.lock 6 | vendor/ 7 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/vendor/workerman/workerman/.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | .buildpath 3 | .project 4 | .settings 5 | .idea 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /articles/thrift/demo/python/gen-py/Services/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/thrift/demo/python/gen-py/Services/__init__.pyc -------------------------------------------------------------------------------- /articles/queue/redis/queuePush.php: -------------------------------------------------------------------------------- 1 | connect('127.0.0.1'); 5 | $name = 'flux'; 6 | $val = '放入第一个内容'; 7 | $redis->rPush($name, $val); -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/data/statistic/statistic/UserService/userList.2018-02-12: -------------------------------------------------------------------------------- 1 | 127.0.0.1 1518435673 3 0.0095422267913818 0 0 [3] 2 | -------------------------------------------------------------------------------- /articles/thrift/demo/python/gen-py/Services/UserService/ttypes.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/thrift/demo/python/gen-py/Services/UserService/ttypes.pyc -------------------------------------------------------------------------------- /articles/thrift/demo/python/gen-py/Services/UserService/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-litt/demo/HEAD/articles/thrift/demo/python/gen-py/Services/UserService/__init__.pyc -------------------------------------------------------------------------------- /articles/pay/wx/WxpayAPI/example/qrcode.php: -------------------------------------------------------------------------------- 1 | connect('127.0.0.1'); 5 | $channel = 'flux'; 6 | $message = '放入第一个内容'; 7 | $redis->publish($channel, $message); -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/src/functions_include.php: -------------------------------------------------------------------------------- 1 | '127.0.0.1', 4 | ); 5 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/psr/log/Psr/Log/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | put($name, $val); 9 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "util/elasticsearch"] 2 | path = util/elasticsearch 3 | url = https://github.com/elasticsearch/elasticsearch.git 4 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/src/Exception/LengthException.php: -------------------------------------------------------------------------------- 1 | Powered by Workerman! 2 | 3 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/Stub/CallableStub.php: -------------------------------------------------------------------------------- 1 | connect('127.0.0.1'); 5 | $channel = 'flux'; 6 | $redis->subscribe(array($channel), 'callback'); 7 | function callback($redis, $chan, $msg){ 8 | echo $msg; 9 | } -------------------------------------------------------------------------------- /articles/swoole/app/controller/Index.php: -------------------------------------------------------------------------------- 1 | 'smtp.qq.com', 7 | 'port' => '465', 8 | 'fromName' => 'Mr.litt', 9 | 'username' => '137057181@qq.com', 10 | 'password' => '', 11 | ]; -------------------------------------------------------------------------------- /articles/swoole/mail/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | db->query("show tables")->fetchall(); 10 | var_dump($tables); 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/data/statistic/statistic/WorkerMan/Statistics.2018-02-12: -------------------------------------------------------------------------------- 1 | 127.0.0.1 1518435282 0 0 1 0.75864791870117 [1] 2 | 127.0.0.1 1518435402 0 0 2 0.75972390174866 [2] 3 | 127.0.0.1 1518435673 3 0.0095422267913818 0 0 [3] 4 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/src/PromisorInterface.php: -------------------------------------------------------------------------------- 1 | getMessage(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | addPsr4('React\\Promise\\', __DIR__); 8 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/docs/php-version-requirement.asciidoc: -------------------------------------------------------------------------------- 1 | == PHP Version Requirement 2 | 3 | Version 5.0 of Elasticsearch-PHP requires PHP version 5.6.6 or higher. In addition, it requires the native JSON 4 | extension to be version 1.3.7 or higher. 5 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/ThriftRpc/Services/HelloWorld/HelloWorldHandler.php: -------------------------------------------------------------------------------- 1 | setServer("localhost", 9312); 5 | $s->setMatchMode(SPH_MATCH_ANY); //匹配模式 SPH_MATCH_ALL:完全匹配 6 | $result = $s->query("管理", 'test1'); 7 | $list = $result['matches']; // 匹配的内容,会返回配置文件设定到属性,key为id,可根据id到MySQL查询详细到信息 8 | print_r($list); -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/ThriftRpc/Services/HelloWorld/Types.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/davidpersson/beanstalk/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /articles/swoole/mail/vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /articles/queue/redis/queuePop.php: -------------------------------------------------------------------------------- 1 | connect('127.0.0.1'); 5 | $name = 'flux'; 6 | while (1) { 7 | $data = $redis->blPop(array($name), 10); 8 | if ($data == false) { // 没有数据 9 | sleep(1); 10 | } else { // 处理业务 11 | print_r($data); 12 | } 13 | } -------------------------------------------------------------------------------- /articles/thrift/demo/php/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/apache/thrift/lib/php/lib'), 10 | ); 11 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/workerman/workerman'), 10 | ); 11 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/fixtures/SimpleTestCancellable.php: -------------------------------------------------------------------------------- 1 | cancelCalled = true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "workerman/thrift-rpc", 3 | "type" : "project", 4 | "keywords": ["thrift","rpc"], 5 | "homepage": "http://www.workerman.net", 6 | "license" : "MIT", 7 | "require": { 8 | "workerman/workerman" : ">=3.3.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/react/promise/src/functions_include.php', 10 | ); 11 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php: -------------------------------------------------------------------------------- 1 | get($name); 9 | if ($data == false) { // 没有数据 10 | sleep(1); 11 | } else { // 处理业务 12 | print_r($data); 13 | } 14 | } 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.4 5 | - 5.5 6 | - 5.6 7 | - hhvm 8 | 9 | before_script: 10 | - composer self-update 11 | - composer install --no-interaction --prefer-source --dev 12 | 13 | script: vendor/bin/phpunit 14 | 15 | matrix: 16 | allow_failures: 17 | - php: hhvm 18 | -------------------------------------------------------------------------------- /articles/swoole/app/controller/Session.php: -------------------------------------------------------------------------------- 1 | session->start(); 10 | $_SESSION['session_test'] = 1; 11 | } 12 | 13 | public function read() 14 | { 15 | $this->session->start(); 16 | var_dump($_SESSION); 17 | sleep(5); 18 | } 19 | } -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/css/style.css: -------------------------------------------------------------------------------- 1 | body {margin: 10px 0px} 2 | .nav { 3 | margin-bottom: 10px; 4 | } 5 | .height-400{ 6 | height:400px 7 | } 8 | 9 | .footer { 10 | margin: 8px auto 0 auto; 11 | padding-bottom: 8px; 12 | color: #666; 13 | font-size: 12px; 14 | text-align: center; 15 | } 16 | 17 | .footer > a 18 | { 19 | font-size:bold; 20 | color:#333; 21 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/docs/build/namespaces.asciidoc: -------------------------------------------------------------------------------- 1 | 2 | [[ElasticsearchPHP_Namespaces]] 3 | == Reference - Namespaces 4 | 5 | This is a complete list of available namespaces: 6 | 7 | * <> 8 | * <> 9 | include::Elasticsearch.asciidoc[] 10 | include::Elasticsearch/Namespaces.asciidoc[] 11 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/src/MetadataStreamInterface.php: -------------------------------------------------------------------------------- 1 | connect('127.0.0.1', 9501, -1)) 5 | { 6 | exit("connect failed. Error: {$client->errCode}\n"); 7 | } 8 | $data = [ 9 | 'address' => '137057181@qq.com', 10 | 'subject' => '消息提醒', 11 | 'body' => '消息提醒:测试信息主体' 12 | ]; 13 | $client->send(json_encode($data)); 14 | echo $client->recv(); 15 | $client->close(); -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/src/Future/FutureValue.php: -------------------------------------------------------------------------------- 1 | setLogLevel(LOG_DEBUG); 5 | $rk->addBrokers("127.0.0.1"); // 集群使用127.0.0.1,127.0.0.2的形式 6 | 7 | $topic = $rk->newTopic("flux"); // 设置topic 8 | 9 | for ($i = 0; $i < 5; $i++) { 10 | $topic->produce( 11 | RD_KAFKA_PARTITION_UA, // 分区,rd_kafka_partition_ua代表随机分区 12 | 0, // 消息标志,始终为0 13 | '放入一个内容' . $i // 内容 14 | ); 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/clientPut.php: -------------------------------------------------------------------------------- 1 | build(); 8 | 9 | $params = [ 10 | 'index' => 'megacorp', 11 | 'type' => 'employee', 12 | 'id' => 3, 13 | 'body' => [ 14 | 'id' => 3, 15 | 'name' => '用户3' 16 | ] 17 | ]; 18 | 19 | $response = $client->index($params); 20 | print_r($response); -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/psr/log/Psr/Log/LoggerAwareInterface.php: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | tests 7 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /articles/http/php/fork.php: -------------------------------------------------------------------------------- 1 | response->status(302); 11 | //使用此函数代替PHP的header函数 12 | $this->response->header('Location', 'http://www.baidu.com/'); 13 | } 14 | 15 | public function cookie() 16 | { 17 | $this->response->cookie('http_cookie','http_cookie_value'); 18 | } 19 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/clientGet.php: -------------------------------------------------------------------------------- 1 | build(); 8 | 9 | $params = [ 10 | 'index' => 'megacorp', 11 | 'type' => 'employee', 12 | 'body' => [ 13 | 'query' => [ 14 | 'match' => [ 15 | 'name' => '用户' 16 | ] 17 | ] 18 | ] 19 | ]; 20 | 21 | $response = $client->search($params); 22 | print_r($response); -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/fixtures/SimpleTestCancellableThenable.php: -------------------------------------------------------------------------------- 1 | cancelCalled = true; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ElasticsearchException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | interface ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/tests/InflateStreamTest.php: -------------------------------------------------------------------------------- 1 | assertEquals('test', (string) $b); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /articles/swoole/app/controller/Base.php: -------------------------------------------------------------------------------- 1 | appServer = $appServer; 18 | } 19 | 20 | public function __get($name) 21 | { 22 | return $this->appServer->$name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /articles/queue/beanstalk/producer.php: -------------------------------------------------------------------------------- 1 | true, // 长连接 9 | 'host' => '127.0.0.1', 10 | 'port' => 11300, 11 | 'timeout' => 1, // 连接超时时间 12 | 'logger' => null 13 | ]; 14 | 15 | $beanstalk = new Client($defaults); 16 | $beanstalk->connect(); 17 | $beanstalk->useTube('flux'); // 使用 tube `'flux'`. 18 | $beanstalk->put( 19 | 23, // 优先级 20 | 0, // 延时 21 | 60, // 任务处理时间 22 | '放入第一内容' // 数据 23 | ); 24 | $beanstalk->disconnect(); -------------------------------------------------------------------------------- /articles/swoole/app/lib/Db.php: -------------------------------------------------------------------------------- 1 | pdo = new \PDO('mysql:host=localhost;dbname=test', 'root', '123456'); 11 | } 12 | 13 | public function __call($name, $arguments) 14 | { 15 | if (count($arguments) == 1) { 16 | return $this->pdo->$name($arguments[0]); 17 | } else if(count($arguments) == 2) { 18 | return $this->pdo->$name($arguments[0], $arguments[1]); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Missing404Exception.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class Missing404Exception extends \Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RuntimeException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class RuntimeException extends \RuntimeException implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/TransportException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class TransportException extends \Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Forbidden403Exception.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class Forbidden403Exception extends \Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/MaxRetriesException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class MaxRetriesException extends TransportException implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php: -------------------------------------------------------------------------------- 1 | assertSame($s, $e->getStream()); 14 | $this->assertContains('10', $e->getMessage()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoNodesAvailableException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class NoNodesAvailableException extends \Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | tests 7 | 8 | 9 | 10 | 11 | src 12 | 13 | src/functions.php 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/psr/log/Psr/Log/LoggerAwareTrait.php: -------------------------------------------------------------------------------- 1 | logger = $logger; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoDocumentsToGetException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class NoDocumentsToGetException extends ServerErrorResponseException implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoShardAvailableException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class NoShardAvailableException extends ServerErrorResponseException implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RequestTimeout408Exception.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class RequestTimeout408Exception extends BadRequest400Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class ServerErrorResponseException extends TransportException implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ClientErrorResponseException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class ClientErrorResponseException extends TransportException implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Conflict409Exception.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class Conflict409Exception extends \Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadRequest400Exception.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class BadRequest400Exception extends \Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ScriptLangNotSupportedException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class ScriptLangNotSupportedException extends BadRequest400Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/src/NoSeekStream.php: -------------------------------------------------------------------------------- 1 | stream->attach($stream); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/AlreadyExpiredException.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class AlreadyExpiredException extends \Exception implements ElasticsearchException 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.4 5 | - 5.5 6 | - 5.6 7 | - 7.0 8 | - nightly 9 | - hhvm 10 | 11 | before_install: 12 | - composer self-update 13 | 14 | install: 15 | - composer install 16 | 17 | script: 18 | - ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml 19 | 20 | after_script: 21 | - if [ -f ./build/logs/clover.xml ]; then travis_retry composer require satooshi/php-coveralls --no-interaction --update-with-dependencies; fi 22 | - if [ -f ./build/logs/clover.xml ]; then php vendor/bin/coveralls -v; fi 23 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/react/promise/src'), 10 | 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 11 | 'GuzzleHttp\\Stream\\' => array($vendorDir . '/guzzlehttp/streams/src'), 12 | 'GuzzleHttp\\Ring\\' => array($vendorDir . '/guzzlehttp/ringphp/src'), 13 | 'Elasticsearch\\' => array($vendorDir . '/elasticsearch/elasticsearch/src/Elasticsearch'), 14 | ); 15 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class InvalidArgumentException extends \InvalidArgumentException implements ElasticsearchException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RoutingMissingException.php: -------------------------------------------------------------------------------- 1 | 12 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 13 | * @link http://elastic.co 14 | */ 15 | class RoutingMissingException extends ServerErrorResponseException implements ElasticsearchException 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/UnexpectedValueException.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class UnexpectedValueException extends \UnexpectedValueException implements ElasticsearchException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /articles/queue/beanstalk/vendor/davidpersson/beanstalk/.travis.yml: -------------------------------------------------------------------------------- 1 | # 2 | # beanstalk: A minimalistic PHP beanstalk client. 3 | # 4 | # Copyright (c) 2009-2014 David Persson 5 | # 6 | # Distributed under the terms of the MIT License. 7 | # Redistributions of files must retain the above copyright notice. 8 | # 9 | 10 | language: php 11 | 12 | php: 13 | - 5.4 14 | - 5.5 15 | - 5.6 16 | 17 | before_install: 18 | - sudo apt-get install -qq beanstalkd 19 | - sudo beanstalkd -d -l 127.0.0.1 -p 11301 20 | 21 | before_script: 22 | - composer install --no-interaction 23 | 24 | script: 25 | - TEST_BEANSTALKD_HOST=127.0.0.1 TEST_BEANSTALKD_PORT=11301 vendor/bin/phpunit tests -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadMethodCallException.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class BadMethodCallException extends \BadMethodCallException implements ElasticsearchException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /articles/http/php/server_stream.php: -------------------------------------------------------------------------------- 1 | getenv('TEST_BEANSTALKD_HOST'), 20 | 'port' => getenv('TEST_BEANSTALKD_PORT') 21 | ]); 22 | for ($i = 0; $i < 100000; $i++) { 23 | $connection->put(1024, 0, 60, $i); 24 | } 25 | 26 | ?> -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/config.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright walkor 11 | * @link http://www.workerman.net/ 12 | * @license http://www.opensource.org/licenses/mit-license.php MIT License 13 | */ 14 | namespace Statistics\Web; 15 | class Config 16 | { 17 | // 数据源端口,会向这个端口发送udp广播获取ip,然后从这个端口以tcp协议获取统计信息 18 | public static $ProviderPort = 55858; 19 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/fixtures/SimpleFulfilledTestThenable.php: -------------------------------------------------------------------------------- 1 | exclude('benchmarks') 6 | ->exclude('docs') 7 | ->exclude('util') 8 | ->exclude('.github') 9 | ->exclude('util') 10 | ->exclude('travis') 11 | ->exclude('util/cache') 12 | ->exclude('util/elasticsearch') 13 | ->exclude('vendor') 14 | ->in(__DIR__); 15 | 16 | return Symfony\CS\Config\Config::create() 17 | ->setUsingCache(true) 18 | ->level(Symfony\CS\FixerInterface::PSR2_LEVEL) 19 | ->finder($finder); 20 | } 21 | 22 | return php_cs(); 23 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: 8px 15px; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | > li { 13 | display: inline-block; 14 | + li:before { 15 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 16 | padding: 0 5px; 17 | color: @breadcrumb-color; 18 | } 19 | } 20 | > .active { 21 | color: @breadcrumb-active-color; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/psr/log/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "psr/log", 3 | "description": "Common interface for logging libraries", 4 | "keywords": ["psr", "psr-3", "log"], 5 | "homepage": "https://github.com/php-fig/log", 6 | "license": "MIT", 7 | "authors": [ 8 | { 9 | "name": "PHP-FIG", 10 | "homepage": "http://www.php-fig.org/" 11 | } 12 | ], 13 | "require": { 14 | "php": ">=5.3.0" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "Psr\\Log\\": "Psr/Log/" 19 | } 20 | }, 21 | "extra": { 22 | "branch-alias": { 23 | "dev-master": "1.0.x-dev" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/fixtures/SimpleRejectedTestPromise.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | class CouldNotConnectToHost extends TransportException implements ElasticsearchException 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/fixtures/SimpleFulfilledTestPromise.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | class OperationTimeoutException extends TransportException implements ElasticsearchException 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /articles/http/php/signal.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | class CouldNotResolveHostException extends TransportException implements ElasticsearchException 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | stream = $stream; 16 | $msg = $msg ?: 'Could not seek the stream to position ' . $pos; 17 | parent::__construct($msg); 18 | } 19 | 20 | /** 21 | * @return StreamInterface 22 | */ 23 | public function getStream() 24 | { 25 | return $this->stream; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/docs/conf.py: -------------------------------------------------------------------------------- 1 | import sys, os 2 | import sphinx_rtd_theme 3 | from sphinx.highlighting import lexers 4 | from pygments.lexers.web import PhpLexer 5 | 6 | 7 | lexers['php'] = PhpLexer(startinline=True, linenos=1) 8 | lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) 9 | primary_domain = 'php' 10 | 11 | extensions = [] 12 | templates_path = ['_templates'] 13 | source_suffix = '.rst' 14 | master_doc = 'index' 15 | project = u'RingPHP' 16 | copyright = u'2014, Michael Dowling' 17 | version = '1.0.0-alpha' 18 | exclude_patterns = ['_build'] 19 | 20 | html_title = "RingPHP" 21 | html_short_title = "RingPHP" 22 | html_theme = "sphinx_rtd_theme" 23 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 24 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/src/ExtendedPromiseInterface.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | ### Code snippet of problem 8 | 9 | 19 | 20 | ### System details 21 | 22 | 27 | 28 | - Operating System 29 | - PHP Version 30 | - ES-PHP client version 31 | - Elasticsearch version -------------------------------------------------------------------------------- /articles/http/php/server_socket.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | tests/Elasticsearch/Tests/YamlRunnerTest.php 16 | 17 | 18 | 19 | 20 | src 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/BulkEndpointInterface.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | interface BulkEndpointInterface 18 | { 19 | /** 20 | * Constructor 21 | * 22 | * @param SerializerInterface $serializer A serializer 23 | */ 24 | public function __construct(SerializerInterface $serializer); 25 | } 26 | -------------------------------------------------------------------------------- /articles/queue/beanstalk/consumer.php: -------------------------------------------------------------------------------- 1 | true, // 长连接 9 | 'host' => '127.0.0.1', 10 | 'port' => 11300, 11 | 'timeout' => 1, // 连接超时时间 12 | 'logger' => null 13 | ]; 14 | 15 | $beanstalk = new Client($defaults); 16 | $beanstalk->connect(); 17 | $beanstalk->watch('flux'); 18 | 19 | while (true) { 20 | $job = $beanstalk->reserve(); // 堵塞直到有新的job,job结构:['id' => 123, 'body' => '放入第一个内容'] 21 | 22 | // 业务处理job 23 | echo $job['body']; 24 | $result = false; 25 | 26 | if ($result) { // 处理成功,删除 27 | $beanstalk->delete($job['id']); 28 | } else { // 处理未成功,休眠,如防止规定时间后job未处理会变成ready被重复处理 29 | $beanstalk->bury($job['id'], 23); 30 | } 31 | } -------------------------------------------------------------------------------- /articles/thrift/demo/php/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'Thrift' => 13 | array ( 14 | 0 => __DIR__ . '/..' . '/apache/thrift/lib/php/lib', 15 | ), 16 | ), 17 | ); 18 | 19 | public static function getInitializer(ClassLoader $loader) 20 | { 21 | return \Closure::bind(function () use ($loader) { 22 | $loader->prefixesPsr0 = ComposerStaticInitfd228b6db5e642a467025110717ee1d7::$prefixesPsr0; 23 | 24 | }, null, ClassLoader::class); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/util/docstheme/pages/namespaces.twig: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.twig" %} 2 | 3 | {% from "macros.twig" import markdown_path, replace_backslash, back_to_forward, sanitize %} 4 | 5 | {% block title %} 6 | [[{{ sanitize(replace_backslash("ElasticsearchPHP_Namespaces")) }}]] 7 | == {{ "Reference - Namespaces" }} 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 12 | This is a complete list of available namespaces: 13 | 14 | {% for namespace in namespaces %} 15 | * <<{{ replace_backslash(namespace) }}, {{ namespace }}>> 16 | {% else %} 17 | * There are no namespaces available. 18 | {% endfor %} 19 | {% for namespace in namespaces %} 20 | include::{{ back_to_forward(namespace) }}.asciidoc[] 21 | {% else %} 22 | {% endfor %} 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | .img-thumbnail(); 9 | display: block; // Override the inline-block from `.img-thumbnail` 10 | margin-bottom: @line-height-computed; 11 | 12 | > img { 13 | .img-responsive(); 14 | margin-left: auto; 15 | margin-right: auto; 16 | } 17 | } 18 | 19 | 20 | // Add a hover state for linked versions only 21 | a.thumbnail:hover, 22 | a.thumbnail:focus, 23 | a.thumbnail.active { 24 | border-color: @link-color; 25 | } 26 | 27 | // Image captions 28 | .thumbnail .caption { 29 | padding: @thumbnail-caption-padding; 30 | color: @thumbnail-caption-color; 31 | } 32 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/docs/overview.asciidoc: -------------------------------------------------------------------------------- 1 | == Overview 2 | 3 | This is the official PHP client for Elasticsearch. It is designed to be a very low-level client that does not stray from the REST API. 4 | 5 | All methods closely match the REST API, and furthermore, match the method structure of other language clients (ruby, python, etc). We hope that this consistency makes it easy to get started with a client, and to seamlessly switch from one language to the next with minimal effort. 6 | 7 | The client is designed to be "unopinionated". There are a few universal niceties added to the client (cluster state sniffing, round-robin requests, etc) but largely it is very barebones. This was intentional. We want a common base that more sophisticated libraries can build on top of. 8 | 9 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/src/UnhandledRejectionException.php: -------------------------------------------------------------------------------- 1 | reason = $reason; 21 | 22 | $message = sprintf('Unhandled Rejection: %s', json_encode($reason)); 23 | 24 | parent::__construct($message, 0); 25 | } 26 | 27 | public function getReason() 28 | { 29 | return $this->reason; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/start.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | tests 16 | tests/Elasticsearch/Tests/YamlRunnerTest.php 17 | 18 | 19 | 20 | 21 | src 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/psr/log/Psr/Log/NullLogger.php: -------------------------------------------------------------------------------- 1 | logger) { }` 11 | * blocks. 12 | */ 13 | class NullLogger extends AbstractLogger 14 | { 15 | /** 16 | * Logs with an arbitrary level. 17 | * 18 | * @param mixed $level 19 | * @param string $message 20 | * @param array $context 21 | * 22 | * @return void 23 | */ 24 | public function log($level, $message, array $context = array()) 25 | { 26 | // noop 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react/promise", 3 | "description": "A lightweight implementation of CommonJS Promises/A for PHP", 4 | "license": "MIT", 5 | "authors": [ 6 | {"name": "Jan Sorgalla", "email": "jsorgalla@gmail.com"} 7 | ], 8 | "require": { 9 | "php": ">=5.4.0" 10 | }, 11 | "require-dev": { 12 | "phpunit/phpunit": "~4.8" 13 | }, 14 | "autoload": { 15 | "psr-4": { 16 | "React\\Promise\\": "src/" 17 | }, 18 | "files": ["src/functions_include.php"] 19 | }, 20 | "autoload-dev": { 21 | "psr-4": { 22 | "React\\Promise\\": "tests/fixtures" 23 | } 24 | }, 25 | "keywords": [ 26 | "promise", 27 | "promises" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /articles/queue/beanstalk/vendor/davidpersson/beanstalk/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "davidpersson/beanstalk", 3 | "description": "Minimalistic PHP client for beanstalkd.", 4 | "keywords": ["queue", "socket", "beanstalk", "beanstalkd"], 5 | "homepage": "https://github.com/davidpersson/beanstalk", 6 | "license": "MIT", 7 | "authors": [ 8 | { 9 | "name": "David Persson", 10 | "email": "davidpersson@gmx.de" 11 | } 12 | ], 13 | "require": { 14 | "php": ">=5.4.1" 15 | }, 16 | "require-dev": { 17 | "phpunit/phpunit": ">=4.0.0" 18 | }, 19 | "suggests": { 20 | "monolog/monolog": "This or any other PSR-3 logger can be used to enable logging." 21 | }, 22 | "autoload": { 23 | "psr-4": { "Beanstalk\\": "src/" } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | interface ConnectionPoolInterface 17 | { 18 | /** 19 | * @param bool $force 20 | * 21 | * @return ConnectionInterface 22 | */ 23 | public function nextConnection($force = false); 24 | 25 | /** 26 | * @return void 27 | */ 28 | public function scheduleCheck(); 29 | } 30 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/util/docstheme/pages/interfaces.twig: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.twig" %} 2 | 3 | {% from "macros.twig" import class_item, replace_backslash, back_to_forward, sanitize %} 4 | 5 | {% block title %} 6 | [[{{ sanitize(replace_backslash("ElasticsearchPHP_Interfaces")) }}]] 7 | == {{ "Reference - Interfaces" }} 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 12 | This is a complete list of available interfaces: 13 | 14 | {% for interface in classes if interface.interface %} 15 | * <<{{ replace_backslash(interface) }}, {{ interface }}>> 16 | {% else %} 17 | * There are no interfaces available. 18 | {% endfor %} 19 | {% for interface in classes if interface.interface %} 20 | include::{{ back_to_forward(interface) }}.asciidoc[] 21 | {% else %} 22 | {% endfor %} 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/_init.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright walkor 11 | * @link http://www.workerman.net/ 12 | * @license http://www.opensource.org/licenses/mit-license.php MIT License 13 | */ 14 | define('ST_ROOT', realpath(__DIR__.'/../')); 15 | require_once ST_ROOT .'/Lib/functions.php'; 16 | require_once ST_ROOT .'/Lib/Cache.php'; 17 | require_once ST_ROOT .'/Config/Config.php'; 18 | // 覆盖配置文件 19 | foreach(glob(ST_ROOT . '/Config/Cache/*.php') as $php_file) 20 | { 21 | require_once $php_file; 22 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "guzzlehttp/streams", 3 | "description": "Provides a simple abstraction over streams of data", 4 | "homepage": "http://guzzlephp.org/", 5 | "keywords": ["stream", "guzzle"], 6 | "license": "MIT", 7 | "authors": [ 8 | { 9 | "name": "Michael Dowling", 10 | "email": "mtdowling@gmail.com", 11 | "homepage": "https://github.com/mtdowling" 12 | } 13 | ], 14 | "require": { 15 | "php": ">=5.4.0" 16 | }, 17 | "require-dev": { 18 | "phpunit/phpunit": "~4.0" 19 | }, 20 | "autoload": { 21 | "psr-4": { "GuzzleHttp\\Stream\\": "src/" } 22 | }, 23 | "extra": { 24 | "branch-alias": { 25 | "dev-master": "3.0-dev" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Lib/Cache.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright walkor 11 | * @link http://www.workerman.net/ 12 | * @license http://www.opensource.org/licenses/mit-license.php MIT License 13 | */ 14 | namespace Statistics\Lib; 15 | class Cache 16 | { 17 | public static $statisticDataCache = array(); 18 | public static $ServerIpList = array(); 19 | public static $modulesDataCache = array(); 20 | public static $lastFailedIpArray = array(); 21 | public static $lastSuccessIpArray = array(); 22 | } -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/ThriftRpc/start.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright walkor 11 | * @link http://www.workerman.net/ 12 | * @license http://www.opensource.org/licenses/mit-license.php MIT License 13 | */ 14 | use Workerman\Worker; 15 | require_once __DIR__ . '/ThriftWorker.php'; 16 | 17 | 18 | $worker = new ThriftWorker('tcp://0.0.0.0:9090'); 19 | $worker->count = 16; 20 | $worker->class = 'UserService'; 21 | 22 | 23 | // 如果不是在根目录启动,则运行runAll方法 24 | if(!defined('GLOBAL_START')) 25 | { 26 | Worker::runAll(); 27 | } 28 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureArrayTest.php: -------------------------------------------------------------------------------- 1 | 'bar']); 11 | $this->assertEquals('bar', $f['foo']); 12 | $this->assertFalse(isset($f['baz'])); 13 | $f['abc'] = '123'; 14 | $this->assertTrue(isset($f['abc'])); 15 | $this->assertEquals(['foo' => 'bar', 'abc' => '123'], iterator_to_array($f)); 16 | $this->assertEquals(2, count($f)); 17 | unset($f['abc']); 18 | $this->assertEquals(1, count($f)); 19 | $this->assertEquals(['foo' => 'bar'], iterator_to_array($f)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /articles/queue/kafka/consumer.php: -------------------------------------------------------------------------------- 1 | set('group.id', 'group1'); // 设置分组ID 5 | $rk = new RdKafka\Consumer($conf); 6 | $rk->setLogLevel(LOG_DEBUG); 7 | $rk->addBrokers("127.0.0.1"); 8 | 9 | $topicConf = new RdKafka\TopicConf(); // 设置自动上传偏移量信息 10 | $topicConf->set("auto.commit.interval.ms", 1e3); 11 | $topicConf->set("offset.store.sync.interval.ms", 60e3); 12 | $topic = $rk->newTopic("flux", $topicConf); 13 | 14 | $topic->consumeStart( 15 | 0, // 从哪个分区开始消费 16 | RD_KAFKA_OFFSET_STORED // 开始消费的偏移量,可选值:RD_KAFKA_OFFSET_BEGINNING, RD_KAFKA_OFFSET_END, RD_KAFKA_OFFSET_STORED. 17 | ); 18 | 19 | while (true) { 20 | $msg = $topic->consume( 21 | 0, // 分区 22 | 1000 // 超时时间 23 | ); 24 | if (empty($msg) || $msg->err) { // 当前队列中无数据 25 | sleep(1); 26 | } else { // 业务处理 27 | echo $msg->payload, "\n"; 28 | } 29 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | interface SelectorInterface 15 | { 16 | /** 17 | * Perform logic to select a single ConnectionInterface instance from the array provided 18 | * 19 | * @param ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from 20 | * 21 | * @return \Elasticsearch\Connections\ConnectionInterface 22 | */ 23 | public function select($connections); 24 | } 25 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/util/docstheme/pages/classes.twig: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.twig" %} 2 | 3 | {% from "macros.twig" import class_item, replace_backslash, back_to_forward, sanitize %} 4 | 5 | {% block title %} 6 | [[{{ sanitize(replace_backslash("ElasticsearchPHP_Endpoints")) }}]] 7 | == {{ "Reference - Endpoints" }} 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 12 | This is a complete list of namespaces and their associated endpoints. 13 | 14 | NOTE: This is auto-generated documentation 15 | 16 | {% for class in classes if not class.interface %} 17 | * <<{{ replace_backslash(class) }}, {{ class }}>> 18 | {% else %} 19 | * There are no endpoints available. 20 | {% endfor %} 21 | {% for class in classes if not class.interface %} 22 | include::{{ back_to_forward(class) }}.asciidoc[] 23 | {% else %} 24 | {% endfor %} 25 | {% endblock %} 26 | 27 | 28 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /articles/pay/wx/view/WxWeb.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 微信H5支付 6 | 7 | 8 |
待付款订单号
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/AbstractTemplateEndpoint.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | abstract class AbstractTemplateEndpoint extends AbstractEndpoint 17 | { 18 | /** @var string */ 19 | protected $name; 20 | 21 | /** 22 | * @param $name 23 | * 24 | * @return $this 25 | */ 26 | public function setName($name) 27 | { 28 | $this->name = $name; 29 | 30 | return $this; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /articles/thrift/demo/UserService.thrift: -------------------------------------------------------------------------------- 1 | # 定义命名空间 2 | namespace java Services.UserService 3 | namespace php Services.UserService 4 | namespace py Services.UserService 5 | 6 | # 定义枚举类型 7 | enum ErrCodeEnum { 8 | SERVER_ERROR = 10001, 9 | PARAM_ERROR = 20001, 10 | } 11 | 12 | # 定义结构体 13 | struct UserListReq { 14 | 1: required list uidList; 15 | } 16 | 17 | struct UserInfo { 18 | 1: required i32 uid, 19 | 2: required string name, 20 | 3: required i8 sex, 21 | 4: required i16 age, 22 | 5: optional string nick = '', 23 | } 24 | 25 | struct UserListResp { 26 | 1: required list lists; 27 | } 28 | 29 | # 定义异常 30 | exception ApiErrorException { 31 | 1: ErrCodeEnum errCode; 32 | 2: string errMsg; 33 | } 34 | 35 | # 定义服务 36 | service UserService{ 37 | 38 | # 获取用户列表 39 | UserListResp userList(1: UserListReq req) throws (1: ApiErrorException e) 40 | 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /articles/swoole/chat/client.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/docs/index.asciidoc: -------------------------------------------------------------------------------- 1 | 2 | = Elasticsearch-PHP 3 | 4 | include::overview.asciidoc[] 5 | 6 | include::quickstart.asciidoc[] 7 | 8 | include::installation.asciidoc[] 9 | 10 | include::configuration.asciidoc[] 11 | 12 | include::per-request-configuration.asciidoc[] 13 | 14 | include::futures.asciidoc[] 15 | 16 | include::php_json_objects.asciidoc[] 17 | 18 | include::index-operations.asciidoc[] 19 | 20 | include::crud.asciidoc[] 21 | 22 | include::search-operations.asciidoc[] 23 | 24 | include::namespaces.asciidoc[] 25 | 26 | include::security.asciidoc[] 27 | 28 | include::connection-pool.asciidoc[] 29 | 30 | include::selectors.asciidoc[] 31 | 32 | include::serializers.asciidoc[] 33 | 34 | include::php-version-requirement.asciidoc[] 35 | 36 | include::breaking-changes.asciidoc[] 37 | 38 | include::community.asciidoc[] 39 | 40 | include::build/classes.asciidoc[] 41 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Info.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class Info extends AbstractEndpoint 15 | { 16 | /** 17 | * @return string 18 | */ 19 | public function getURI() 20 | { 21 | $uri = "/"; 22 | 23 | return $uri; 24 | } 25 | 26 | /** 27 | * @return string[] 28 | */ 29 | public function getParamWhitelist() 30 | { 31 | return array( 32 | ); 33 | } 34 | 35 | /** 36 | * @return string 37 | */ 38 | public function getMethod() 39 | { 40 | return 'GET'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ping.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class Ping extends AbstractEndpoint 15 | { 16 | /** 17 | * @return string 18 | */ 19 | public function getURI() 20 | { 21 | $uri = "/"; 22 | 23 | return $uri; 24 | } 25 | 26 | /** 27 | * @return string[] 28 | */ 29 | public function getParamWhitelist() 30 | { 31 | return array( 32 | ); 33 | } 34 | 35 | /** 36 | * @return string 37 | */ 38 | public function getMethod() 39 | { 40 | return 'HEAD'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | ./tests/ 17 | 18 | 19 | 20 | 21 | 22 | ./src/ 23 | 24 | ./src/functions_include.php 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /articles/queue/rabbitMQ/producer.php: -------------------------------------------------------------------------------- 1 | 创建channel-->创建交换机对象-->发送消息 4 | 5 | // 创建连接 6 | $config = array( 7 | 'host' => '127.0.0.1', 8 | 'port' => '5672', 9 | 'login' => 'guest', 10 | 'password' => 'guest', 11 | 'vhost'=>'/' 12 | ); 13 | $conn = new AMQPConnection($config); 14 | if (!$conn->connect()) { 15 | die("不能创建连接!\n"); 16 | } 17 | // 创建信道 18 | $channel = new AMQPChannel($conn); 19 | // 创建交换机对象 20 | $ex = new AMQPExchange($channel); 21 | $exName = 'exName'; 22 | $ex->setName($exName); //设置交换机名称 23 | $ex->setType(AMQP_EX_TYPE_DIRECT); // direct类型 24 | $ex->setFlags(AMQP_DURABLE); // 持久化 25 | $ex->declareExchange(); // 声明一个新交换机,如果已经存在,则不再需要声明 26 | 27 | //发送消息 28 | $route = 'key_1'; // 路由key 29 | //$channel->startTransaction(); //开始事务 30 | for($i=5; $i<10; ++$i){ 31 | //sleep(1);//休眠1秒 32 | $ex->publish('放入一个内容' . $i, $route); 33 | } 34 | //$channel->commitTransaction(); //提交事务 35 | $conn->disconnect(); 36 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Config/Config.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright walkor 11 | * @link http://www.workerman.net/ 12 | * @license http://www.opensource.org/licenses/mit-license.php MIT License 13 | */ 14 | namespace Statistics; 15 | class Config 16 | { 17 | // 数据源端口,会向这个端口发送udp广播获取ip,然后从这个端口以tcp协议获取统计信息 18 | public static $ProviderPort = 55858; 19 | 20 | // 管理员用户名,用户名密码都为空字符串时说明不用验证 21 | public static $adminName = ''; 22 | 23 | // 管理员密码,用户名密码都为空字符串时说明不用验证 24 | public static $adminPassword = ''; 25 | 26 | public static $dataPath = ''; 27 | } 28 | 29 | Config::$dataPath = __DIR__ . '/../data/'; -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Remote/Info.php: -------------------------------------------------------------------------------- 1 | 12 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 13 | * @link http://elastic.co 14 | */ 15 | class Info extends AbstractEndpoint 16 | { 17 | /** 18 | * @return string 19 | */ 20 | public function getURI() 21 | { 22 | return "/_remote/info"; 23 | } 24 | 25 | /** 26 | * @return string[] 27 | */ 28 | public function getParamWhitelist() 29 | { 30 | return array(); 31 | } 32 | 33 | /** 34 | * @return string 35 | */ 36 | public function getMethod() 37 | { 38 | return 'GET'; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php: -------------------------------------------------------------------------------- 1 | _value[$offset]); 14 | } 15 | 16 | public function offsetGet($offset) 17 | { 18 | return $this->_value[$offset]; 19 | } 20 | 21 | public function offsetSet($offset, $value) 22 | { 23 | $this->_value[$offset] = $value; 24 | } 25 | 26 | public function offsetUnset($offset) 27 | { 28 | unset($this->_value[$offset]); 29 | } 30 | 31 | public function count() 32 | { 33 | return count($this->_value); 34 | } 35 | 36 | public function getIterator() 37 | { 38 | return new \ArrayIterator($this->_value); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /articles/queue/beanstalk/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'Beanstalk\\' => 10, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'Beanstalk\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/davidpersson/beanstalk/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInit93997113bf2a0e39d54d3bc28fb799ef::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInit93997113bf2a0e39d54d3bc28fb799ef::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /articles/queue/php/array.php: -------------------------------------------------------------------------------- 1 | arr, $val); // 队尾入队 10 | } 11 | 12 | public function tailDequeue() 13 | { 14 | return array_pop($this->arr); // 队尾出队 15 | } 16 | 17 | public function headEnqueue($val) 18 | { 19 | return array_unshift($this->arr, $val); // 队首入队 20 | } 21 | 22 | public function headDequeue() 23 | { 24 | return array_shift($this->arr); //队首出队 25 | } 26 | 27 | public function length() 28 | { 29 | return count($this->arr); // 队列长度 30 | } 31 | 32 | public function head() 33 | { 34 | return reset($this->arr); // 获取队首元素 35 | } 36 | 37 | public function tail() 38 | { 39 | return end($this->arr); // 获取队尾元素 40 | } 41 | 42 | public function clear() 43 | { 44 | unset($this->arr); // 清空队列 45 | return true; 46 | } 47 | } -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'Workerman\\' => 10, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'Workerman\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/workerman/workerman', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInit772f7a4533b52c196a786a11005182c0::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInit772f7a4533b52c196a786a11005182c0::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /articles/pay/wx/view/WxWebRedirect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 微信H5支付回调 6 | 7 | 8 | 9 |
支付是否已经完成(官方推荐由用户点击是否完成,因为用户取消支付也会跳转此页面,最好用模态层弹出)
10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /articles/swoole/mail/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInit869d5f7bb83be94beb4a92053ee89dc4::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInit869d5f7bb83be94beb4a92053ee89dc4::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/docs/build/renderer.index: -------------------------------------------------------------------------------- 1 | C:19:"Sami\Renderer\Index":944:{a:3:{i:0;a:9:{s:20:"Elasticsearch\Client";s:40:"c92166baaf85cb08a91ce4e3cf845b1626ba12f0";s:27:"Elasticsearch\ClientBuilder";s:40:"347f22134a07f53b3355a211264d8e53aa545243";s:37:"Elasticsearch\Namespaces\CatNamespace";s:40:"51d06cd6b8334bcf3a2580f67bbc5c88f8fde761";s:41:"Elasticsearch\Namespaces\ClusterNamespace";s:40:"0934f56b5dfa7978ab1907b6c8a04b0a293ae274";s:41:"Elasticsearch\Namespaces\IndicesNamespace";s:40:"3d23245494af9443c215b31faa4e78dd6ab29750";s:40:"Elasticsearch\Namespaces\IngestNamespace";s:40:"b52adeb7071f16cba79cdcc3dac3fa6e53ed62bd";s:39:"Elasticsearch\Namespaces\NodesNamespace";s:40:"da4e71f9d953d00600920c26fe585b6884e45f94";s:42:"Elasticsearch\Namespaces\SnapshotNamespace";s:40:"e28a1807789b0fcca3fd6b9712ed713650cf7ac2";s:39:"Elasticsearch\Namespaces\TasksNamespace";s:40:"2de86d7ab409a629320725f6444c76d2a9313c72";}i:1;a:1:{i:0;s:6:"master";}i:2;a:2:{i:0;s:13:"Elasticsearch";i:1;s:24:"Elasticsearch\Namespaces";}}} -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RandomSelector.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class RandomSelector implements SelectorInterface 17 | { 18 | /** 19 | * Select a random connection from the provided array 20 | * 21 | * @param ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from 22 | * 23 | * @return \Elasticsearch\Connections\ConnectionInterface 24 | */ 25 | public function select($connections) 26 | { 27 | return $connections[array_rand($connections)]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elasticsearch.org 13 | */ 14 | class SniffingConnectionPoolIntegrationTest extends \PHPUnit_Framework_TestCase 15 | { 16 | public function testSniff() 17 | { 18 | $client = ClientBuilder::create() 19 | ->setHosts([$_SERVER['ES_TEST_HOST']]) 20 | ->setConnectionPool('\Elasticsearch\ConnectionPool\SniffingConnectionPool', ['sniffingInterval' => -10]) 21 | ->build(); 22 | 23 | $pinged = $client->ping(); 24 | $this->assertTrue($pinged); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/EmptyLogger.php: -------------------------------------------------------------------------------- 1 | 17 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 18 | * @link http://elastic.co 19 | */ 20 | class EmptyLogger extends AbstractLogger implements LoggerInterface 21 | { 22 | /** 23 | * Logs with an arbitrary level. 24 | * 25 | * @param mixed $level 26 | * @param string $message 27 | * @param array $context 28 | * 29 | * @return null 30 | */ 31 | public function log($level, $message, array $context = array()) 32 | { 33 | return; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SerializerInterface.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | interface SerializerInterface 15 | { 16 | /** 17 | * Serialize a complex data-structure into a json encoded string 18 | * 19 | * @param mixed The data to encode 20 | * 21 | * @return string 22 | */ 23 | public function serialize($data); 24 | 25 | /** 26 | * Deserialize json encoded string into an associative array 27 | * 28 | * @param string $data JSON encoded string 29 | * @param array $headers Response Headers 30 | * 31 | * @return array 32 | */ 33 | public function deserialize($data, $headers); 34 | } 35 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/RemoteNamespace.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class RemoteNamespace extends AbstractNamespace 17 | { 18 | /** 19 | * @param $params array Associative array of parameters 20 | * 21 | * @return array 22 | */ 23 | public function info($params = array()) 24 | { 25 | /** @var callback $endpointBuilder */ 26 | $endpointBuilder = $this->endpoints; 27 | 28 | /** @var Info $endpoint */ 29 | $endpoint = $endpointBuilder('Remote\Info'); 30 | $endpoint->setParams($params); 31 | 32 | return $this->performRequest($endpoint); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/src/LazyOpenStream.php: -------------------------------------------------------------------------------- 1 | filename = $filename; 25 | $this->mode = $mode; 26 | } 27 | 28 | /** 29 | * Creates the underlying stream lazily when required. 30 | * 31 | * @return StreamInterface 32 | */ 33 | protected function createStream() 34 | { 35 | return Stream::factory(Utils::open($this->filename, $this->mode)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Help.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Help extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'help', 35 | 's', 36 | 'format', 37 | ); 38 | } 39 | 40 | /** 41 | * @return string 42 | */ 43 | public function getMethod() 44 | { 45 | return 'GET'; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientIntegrationTests.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 11 | * @link http://elasticsearch.org 12 | */ 13 | class ClientIntegrationTests extends \PHPUnit_Framework_TestCase 14 | { 15 | public function testCustomQueryParams() 16 | { 17 | $params = array(); 18 | 19 | $client = Elasticsearch\ClientBuilder::create()->setHosts([$_SERVER['ES_TEST_HOST']])->build(); 20 | 21 | $getParams = array( 22 | 'index' => 'test', 23 | 'type' => 'test', 24 | 'id' => 1, 25 | 'parent' => 'abc', 26 | 'custom' => array('customToken' => 'abc', 'otherToken' => 123), 27 | 'client' => ['ignore' => 400] 28 | ); 29 | $exists = $client->exists($getParams); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/tests/DroppingStreamTest.php: -------------------------------------------------------------------------------- 1 | assertEquals(3, $drop->write('hel')); 14 | $this->assertFalse($drop->write('lo')); 15 | $this->assertEquals(5, $drop->getSize()); 16 | $this->assertEquals('hello', $drop->read(5)); 17 | $this->assertEquals(0, $drop->getSize()); 18 | $drop->write('12345678910'); 19 | $this->assertEquals(5, $stream->getSize()); 20 | $this->assertEquals(5, $drop->getSize()); 21 | $this->assertEquals('12345', (string) $drop); 22 | $this->assertEquals(0, $drop->getSize()); 23 | $drop->write('hello'); 24 | $this->assertFalse($drop->write('test')); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Views/log.tpl.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 32 |
33 |
34 |
35 |
36 | 37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/README.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | Guzzle Streams 3 | ============== 4 | 5 | Provides a simple abstraction over streams of data. 6 | 7 | This library is used in `Guzzle 5 `_, and is 8 | (currently) compatible with the WIP PSR-7. 9 | 10 | Installation 11 | ============ 12 | 13 | This package can be installed easily using `Composer `_. 14 | Simply add the following to the composer.json file at the root of your project: 15 | 16 | .. code-block:: javascript 17 | 18 | { 19 | "require": { 20 | "guzzlehttp/streams": "~3.0" 21 | } 22 | } 23 | 24 | Then install your dependencies using ``composer.phar install``. 25 | 26 | Documentation 27 | ============= 28 | 29 | The documentation for this package can be found on the main Guzzle website at 30 | http://docs.guzzlephp.org/en/guzzle4/streams.html. 31 | 32 | Testing 33 | ======= 34 | 35 | This library is tested using PHPUnit. You'll need to install the dependencies 36 | using `Composer `_ then run ``make test``. 37 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/src/Future/MagicFutureTrait.php: -------------------------------------------------------------------------------- 1 | _value = $this->wait(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/src/InflateStream.php: -------------------------------------------------------------------------------- 1 | stream = new Stream($resource); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class PendingTasks extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cluster/pending_tasks"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | ); 37 | } 38 | 39 | /** 40 | * @return string 41 | */ 42 | public function getMethod() 43 | { 44 | return 'GET'; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | font-size: @jumbotron-font-size; 10 | font-weight: 200; 11 | line-height: (@line-height-base * 1.5); 12 | color: @jumbotron-color; 13 | background-color: @jumbotron-bg; 14 | 15 | h1 { 16 | line-height: 1; 17 | color: @jumbotron-heading-color; 18 | } 19 | p { 20 | line-height: 1.4; 21 | } 22 | 23 | .container & { 24 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 25 | } 26 | 27 | @media screen and (min-width: @screen-sm-min) { 28 | padding-top: (@jumbotron-padding * 1.6); 29 | padding-bottom: (@jumbotron-padding * 1.6); 30 | 31 | .container & { 32 | padding-left: (@jumbotron-padding * 2); 33 | padding-right: (@jumbotron-padding * 2); 34 | } 35 | 36 | h1 { 37 | font-size: (@font-size-base * 4.5); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /articles/thrift/demo/python/client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | import sys 3 | sys.path.append('gen-py') 4 | 5 | from Services.UserService import UserService 6 | from Services.UserService.ttypes import UserListReq, UserListResp, UserInfo, ApiErrorException 7 | 8 | from thrift import Thrift 9 | from thrift.transport import TSocket 10 | from thrift.transport import TTransport 11 | from thrift.protocol import TBinaryProtocol 12 | 13 | def main(): 14 | 15 | try: 16 | transport = TSocket.TSocket('localhost', 9090) 17 | transport = TTransport.TBufferedTransport(transport) 18 | protocol = TBinaryProtocol.TBinaryProtocol(transport) 19 | client = UserService.Client(protocol) 20 | # Connect 21 | transport.open() 22 | # request 23 | req = UserListReq() 24 | req.uidList = [1, 2] 25 | result = client.userList(req) 26 | print result 27 | 28 | # Close 29 | transport.close() 30 | except Thrift.TException as e: 31 | print e 32 | except ApiErrorException as e: 33 | print e 34 | 35 | if __name__ == '__main__': 36 | main() -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php: -------------------------------------------------------------------------------- 1 | result[$offset]); 17 | } 18 | 19 | public function offsetGet($offset) 20 | { 21 | return $this->result[$offset]; 22 | } 23 | 24 | public function offsetSet($offset, $value) 25 | { 26 | $this->result[$offset] = $value; 27 | } 28 | 29 | public function offsetUnset($offset) 30 | { 31 | unset($this->result[$offset]); 32 | } 33 | 34 | public function count() 35 | { 36 | return count($this->result); 37 | } 38 | 39 | public function getIterator() 40 | { 41 | return new \ArrayIterator($this->result); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/util/docsConfig.php: -------------------------------------------------------------------------------- 1 | files() 18 | ->name('*Namespace.php') 19 | ->name("Client.php") 20 | ->name("ClientBuilder.php") 21 | ->notName("AbstractNamespace.php") 22 | ->in(__DIR__.'/../src/'); 23 | 24 | return new Sami($iterator, array( 25 | 'theme' => 'asciidoc', 26 | 'template_dirs' => array(__DIR__.'/docstheme/'), 27 | 'title' => 'Elasticsearch-php', 28 | 'build_dir' => __DIR__.'/../docs/build', 29 | 'cache_dir' => __DIR__.'/cache/', 30 | )); -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | createCallableMock(); 10 | $mock 11 | ->expects($this->exactly($amount)) 12 | ->method('__invoke'); 13 | 14 | return $mock; 15 | } 16 | 17 | public function expectCallableOnce() 18 | { 19 | $mock = $this->createCallableMock(); 20 | $mock 21 | ->expects($this->once()) 22 | ->method('__invoke'); 23 | 24 | return $mock; 25 | } 26 | 27 | public function expectCallableNever() 28 | { 29 | $mock = $this->createCallableMock(); 30 | $mock 31 | ->expects($this->never()) 32 | ->method('__invoke'); 33 | 34 | return $mock; 35 | } 36 | 37 | public function createCallableMock() 38 | { 39 | return $this 40 | ->getMockBuilder('React\\Promise\Stub\CallableStub') 41 | ->getMock(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/tests/PromiseAdapter/CallbackPromiseAdapter.php: -------------------------------------------------------------------------------- 1 | callbacks = $callbacks; 14 | } 15 | 16 | public function promise() 17 | { 18 | return call_user_func_array($this->callbacks['promise'], func_get_args()); 19 | } 20 | 21 | public function resolve() 22 | { 23 | return call_user_func_array($this->callbacks['resolve'], func_get_args()); 24 | } 25 | 26 | public function reject() 27 | { 28 | return call_user_func_array($this->callbacks['reject'], func_get_args()); 29 | } 30 | 31 | public function notify() 32 | { 33 | return call_user_func_array($this->callbacks['notify'], func_get_args()); 34 | } 35 | 36 | public function settle() 37 | { 38 | return call_user_func_array($this->callbacks['settle'], func_get_args()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "elasticsearch/elasticsearch", 3 | "description": "PHP Client for Elasticsearch", 4 | "keywords": ["search","client", "elasticsearch"], 5 | "type": "library", 6 | "license": "Apache-2.0", 7 | "authors": [ 8 | { 9 | "name": "Zachary Tong" 10 | } 11 | ], 12 | "require": { 13 | "php": "^5.6|^7.0", 14 | "psr/log": "~1.0", 15 | "guzzlehttp/ringphp" : "~1.0" 16 | }, 17 | "require-dev": { 18 | "phpunit/phpunit": "^4.7|^5.4", 19 | "mockery/mockery": "0.9.4", 20 | "symfony/yaml": "^2.8", 21 | "symfony/finder": "^2.8", 22 | "cpliakas/git-wrapper": "~1.0", 23 | "sami/sami": "~3.2", 24 | "doctrine/inflector": "^1.1" 25 | }, 26 | "suggest": { 27 | "ext-curl": "*", 28 | "monolog/monolog": "Allows for client-level logging and tracing" 29 | }, 30 | "autoload": { 31 | "psr-4": { 32 | "Elasticsearch\\": "src/Elasticsearch/" 33 | } 34 | }, 35 | "autoload-dev": { 36 | "psr-4": { 37 | "Elasticsearch\\Tests\\": "tests/Elasticsearch/Tests/" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/ThriftRpc/Lib/Thrift/StringFunc/TStringFunc.php: -------------------------------------------------------------------------------- 1 | selector->select($this->connections); 29 | } 30 | 31 | public function scheduleCheck() 32 | { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/Makefile: -------------------------------------------------------------------------------- 1 | all: clean coverage docs 2 | 3 | docs: 4 | cd docs && make html 5 | 6 | view-docs: 7 | open docs/_build/html/index.html 8 | 9 | start-server: stop-server 10 | node tests/Client/server.js &> /dev/null & 11 | 12 | stop-server: 13 | @PID=$(shell ps axo pid,command \ 14 | | grep 'tests/Client/server.js' \ 15 | | grep -v grep \ 16 | | cut -f 1 -d " "\ 17 | ) && [ -n "$$PID" ] && kill $$PID || true 18 | 19 | test: start-server 20 | vendor/bin/phpunit $(TEST) 21 | $(MAKE) stop-server 22 | 23 | coverage: start-server 24 | vendor/bin/phpunit --coverage-html=build/artifacts/coverage $(TEST) 25 | $(MAKE) stop-server 26 | 27 | view-coverage: 28 | open build/artifacts/coverage/index.html 29 | 30 | clean: 31 | rm -rf build/artifacts/* 32 | cd docs && make clean 33 | 34 | tag: 35 | $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1")) 36 | @echo Tagging $(TAG) 37 | chag update -m '$(TAG) ()' 38 | git add -A 39 | git commit -m '$(TAG) release' 40 | chag tag 41 | 42 | perf: start-server 43 | php tests/perf.php 44 | $(MAKE) stop-server 45 | 46 | .PHONY: docs 47 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Settings/Get.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | 17 | class Get extends AbstractEndpoint 18 | { 19 | /** 20 | * @return string 21 | */ 22 | public function getURI() 23 | { 24 | $uri = "/_cluster/settings"; 25 | 26 | return $uri; 27 | } 28 | 29 | /** 30 | * @return string[] 31 | */ 32 | public function getParamWhitelist() 33 | { 34 | return array( 35 | 'flat_settings', 36 | 'master_timeout', 37 | 'timeout', 38 | ); 39 | } 40 | 41 | /** 42 | * @return string 43 | */ 44 | public function getMethod() 45 | { 46 | return 'GET'; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RoundRobinSelector.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class RoundRobinSelector implements SelectorInterface 17 | { 18 | /** 19 | * @var int 20 | */ 21 | private $current = 0; 22 | 23 | /** 24 | * Select the next connection in the sequence 25 | * 26 | * @param ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from 27 | * 28 | * @return \Elasticsearch\Connections\ConnectionInterface 29 | */ 30 | public function select($connections) 31 | { 32 | $this->current += 1; 33 | 34 | return $connections[$this->current % count($connections)]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php: -------------------------------------------------------------------------------- 1 | 10]], 15 | [['invalid' => 10, 'invalid2' => 'another']], 16 | ]; 17 | } 18 | 19 | /** 20 | * @dataProvider invalidParameters 21 | * @expectedException Elasticsearch\Common\Exceptions\UnexpectedValueException 22 | */ 23 | public function testInvalidParamsCauseErrorsWhenProvidedToSetParams(array $params) 24 | { 25 | $this->endpoint->expects($this->once()) 26 | ->method('getParamWhitelist') 27 | ->willReturn(['one', 'two']); 28 | 29 | $this->endpoint->setParams($params); 30 | } 31 | 32 | protected function setUp() 33 | { 34 | $this->endpoint = $this->getMockForAbstractClass(AbstractEndpoint::class); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /articles/swoole/mail/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /articles/queue/beanstalk/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | .clearfix(); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pagination-bg; 19 | border: 1px solid @pagination-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pagination-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pagination-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/vendor/workerman/workerman/Lib/Constants.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright walkor 11 | * @link http://www.workerman.net/ 12 | * @license http://www.opensource.org/licenses/mit-license.php MIT License 13 | */ 14 | 15 | // Date.timezone 16 | if (!ini_get('date.timezone')) { 17 | date_default_timezone_set('Asia/Shanghai'); 18 | } 19 | // Display errors. 20 | ini_set('display_errors', 'on'); 21 | // Reporting all. 22 | error_reporting(E_ALL); 23 | 24 | // Reset opcache. 25 | if (function_exists('opcache_reset')) { 26 | opcache_reset(); 27 | } 28 | 29 | // For onError callback. 30 | define('WORKERMAN_CONNECT_FAIL', 1); 31 | // For onError callback. 32 | define('WORKERMAN_SEND_FAIL', 2); 33 | 34 | // Compatible with php7 35 | if(!class_exists('Error')) 36 | { 37 | class Error extends Exception 38 | { 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /articles/thrift/demo/java/thrift/src/main/java/Services/UserService/ErrCodeEnum.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.10.0) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | package Services.UserService; 8 | 9 | 10 | import java.util.Map; 11 | import java.util.HashMap; 12 | import org.apache.thrift.TEnum; 13 | 14 | public enum ErrCodeEnum implements TEnum { 15 | SERVER_ERROR(10001), 16 | PARAM_ERROR(20001); 17 | 18 | private final int value; 19 | 20 | private ErrCodeEnum(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static ErrCodeEnum findByValue(int value) { 36 | switch (value) { 37 | case 10001: 38 | return SERVER_ERROR; 39 | case 20001: 40 | return PARAM_ERROR; 41 | default: 42 | return null; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/react/promise/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2016 Jan Sorgalla 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /articles/thrift/demo/java/gen-java/Services/UserService/ErrCodeEnum.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.10.0) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | package Services.UserService; 8 | 9 | 10 | import java.util.Map; 11 | import java.util.HashMap; 12 | import org.apache.thrift.TEnum; 13 | 14 | public enum ErrCodeEnum implements org.apache.thrift.TEnum { 15 | SERVER_ERROR(10001), 16 | PARAM_ERROR(20001); 17 | 18 | private final int value; 19 | 20 | private ErrCodeEnum(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static ErrCodeEnum findByValue(int value) { 36 | switch (value) { 37 | case 10001: 38 | return SERVER_ERROR; 39 | case 20001: 40 | return PARAM_ERROR; 41 | default: 42 | return null; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | interface ConnectionFactoryInterface 18 | { 19 | /** 20 | * @param $handler 21 | * @param array $connectionParams 22 | * @param SerializerInterface $serializer 23 | * @param LoggerInterface $logger 24 | * @param LoggerInterface $tracer 25 | */ 26 | public function __construct(callable $handler, array $connectionParams, 27 | SerializerInterface $serializer, LoggerInterface $logger, LoggerInterface $tracer); 28 | 29 | /** 30 | * @param $hostDetails 31 | * 32 | * @return ConnectionInterface 33 | */ 34 | public function create($hostDetails); 35 | } 36 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/psr/log/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 PHP Framework Interoperability Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "guzzlehttp/ringphp", 3 | "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Michael Dowling", 8 | "email": "mtdowling@gmail.com", 9 | "homepage": "https://github.com/mtdowling" 10 | } 11 | ], 12 | "require": { 13 | "php": ">=5.4.0", 14 | "guzzlehttp/streams": "~3.0", 15 | "react/promise": "~2.0" 16 | }, 17 | "require-dev": { 18 | "ext-curl": "*", 19 | "phpunit/phpunit": "~4.0" 20 | }, 21 | "suggest": { 22 | "ext-curl": "Guzzle will use specific adapters if cURL is present" 23 | }, 24 | "autoload": { 25 | "psr-4": { 26 | "GuzzleHttp\\Ring\\": "src/" 27 | } 28 | }, 29 | "autoload-dev": { 30 | "psr-4": { 31 | "GuzzleHttp\\Tests\\Ring\\": "tests/" 32 | } 33 | }, 34 | "extra": { 35 | "branch-alias": { 36 | "dev-master": "1.1-dev" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /articles/queue/beanstalk/vendor/davidpersson/beanstalk/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2009-2015 David Persson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Master.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Master extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat/master"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | 'h', 37 | 'help', 38 | 'v', 39 | 's', 40 | 'format', 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'GET'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Plugins.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Plugins extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat/plugins"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | 'h', 37 | 'help', 38 | 'v', 39 | 's', 40 | 'format', 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'GET'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/ThriftRpc/Lib/Thrift/Type/TMessageType.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | abstract class AbstractAliasEndpoint extends AbstractEndpoint 18 | { 19 | /** @var null|string */ 20 | protected $name = null; 21 | 22 | /** 23 | * @param $name 24 | * 25 | * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException 26 | * 27 | * @return $this 28 | */ 29 | public function setName($name) 30 | { 31 | if (is_string($name) !== true) { 32 | throw new InvalidArgumentException('Name must be a string'); 33 | } 34 | $this->name = urlencode($name); 35 | 36 | return $this; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class NodeAttrs extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat/nodeattrs"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | 'h', 37 | 'help', 38 | 'v', 39 | 's', 40 | 'format', 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'GET'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Health.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Health extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat/health"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | 'h', 37 | 'help', 38 | 'ts', 39 | 'v', 40 | 's', 41 | 'format', 42 | ); 43 | } 44 | 45 | /** 46 | * @return string 47 | */ 48 | public function getMethod() 49 | { 50 | return 'GET'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class Shutdown extends AbstractNodesEndpoint 15 | { 16 | /** 17 | * @return string 18 | */ 19 | public function getURI() 20 | { 21 | $node_id = $this->nodeID; 22 | $uri = "/_shutdown"; 23 | 24 | if (isset($node_id) === true) { 25 | $uri = "/_cluster/nodes/$node_id/_shutdown"; 26 | } 27 | 28 | return $uri; 29 | } 30 | 31 | /** 32 | * @return string[] 33 | */ 34 | public function getParamWhitelist() 35 | { 36 | return array( 37 | 'delay', 38 | 'exit', 39 | ); 40 | } 41 | 42 | /** 43 | * @return string 44 | */ 45 | public function getMethod() 46 | { 47 | return 'POST'; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Nodes.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Nodes extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat/nodes"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | 'h', 37 | 'help', 38 | 'v', 39 | 's', 40 | 'full_id', 41 | 'format', 42 | ); 43 | } 44 | 45 | /** 46 | * @return string 47 | */ 48 | public function getMethod() 49 | { 50 | return 'GET'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/PendingTasks.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class PendingTasks extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat/pending_tasks"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | 'h', 37 | 'help', 38 | 'v', 39 | 's', 40 | 'format', 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'GET'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Repositories.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Repositories extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $uri = "/_cat/repositories"; 24 | 25 | return $uri; 26 | } 27 | 28 | /** 29 | * @return string[] 30 | */ 31 | public function getParamWhitelist() 32 | { 33 | return array( 34 | 'local', 35 | 'master_timeout', 36 | 'h', 37 | 'help', 38 | 'v', 39 | 's', 40 | 'format', 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'GET'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/ringphp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/guzzlehttp/streams/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /articles/pay/wx/WxpayAPI/example/WxPay.NativePay.php: -------------------------------------------------------------------------------- 1 | SetProduct_id($productId); 21 | $values = WxpayApi::bizpayurl($biz); 22 | $url = "weixin://wxpay/bizpayurl?" . $this->ToUrlParams($values); 23 | return $url; 24 | } 25 | 26 | /** 27 | * 28 | * 参数数组转换为url参数 29 | * @param array $urlObj 30 | */ 31 | private function ToUrlParams($urlObj) 32 | { 33 | $buff = ""; 34 | foreach ($urlObj as $k => $v) 35 | { 36 | $buff .= $k . "=" . $v . "&"; 37 | } 38 | 39 | $buff = trim($buff, "&"); 40 | return $buff; 41 | } 42 | 43 | /** 44 | * 45 | * 生成直接支付url,支付url有效期为2小时,模式二 46 | * @param UnifiedOrderInput $input 47 | */ 48 | public function GetPayUrl($input) 49 | { 50 | if($input->GetTrade_type() == "NATIVE") 51 | { 52 | $result = WxPayApi::unifiedOrder($input); 53 | return $result; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Delete.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Delete extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $index = $this->index; 24 | $uri = "/$index"; 25 | 26 | if (isset($index) === true) { 27 | $uri = "/$index"; 28 | } 29 | 30 | return $uri; 31 | } 32 | 33 | /** 34 | * @return string[] 35 | */ 36 | public function getParamWhitelist() 37 | { 38 | return array( 39 | 'timeout', 40 | 'master_timeout', 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'DELETE'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Tasks.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Tasks extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | return "/_cat/tasks"; 24 | } 25 | 26 | /** 27 | * @return string[] 28 | */ 29 | public function getParamWhitelist() 30 | { 31 | return array( 32 | 'format', 33 | 'node_id', 34 | 'actions', 35 | 'detailed', 36 | 'parent_node', 37 | 'parent_task', 38 | 'h', 39 | 'help', 40 | 'v', 41 | 's' 42 | ); 43 | } 44 | 45 | /** 46 | * @return string 47 | */ 48 | public function getMethod() 49 | { 50 | return 'GET'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/ThriftRpc/Lib/Thrift/Server/TServerTransport.php: -------------------------------------------------------------------------------- 1 | acceptImpl(); 47 | 48 | if ($transport == null) { 49 | throw new TTransportException("accept() may not return NULL"); 50 | } 51 | 52 | return $transport; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Seal.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | class Seal extends AbstractEndpoint 18 | { 19 | /** 20 | * @throws \Elasticsearch\Common\Exceptions\RuntimeException 21 | * @return string 22 | */ 23 | public function getURI() 24 | { 25 | $index = $this->index; 26 | $uri = "/_seal"; 27 | 28 | if (isset($index) === true) { 29 | $uri = "/$index/_seal"; 30 | } 31 | 32 | return $uri; 33 | } 34 | 35 | /** 36 | * @return string[] 37 | */ 38 | public function getParamWhitelist() 39 | { 40 | return array(); 41 | } 42 | 43 | /** 44 | * @return string 45 | */ 46 | public function getMethod() 47 | { 48 | return 'POST'; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/util/RestSpecRunner.php: -------------------------------------------------------------------------------- 1 | workingCopy(dirname(__DIR__) . '/util/elasticsearch'); 23 | 24 | echo "Update elasticsearch submodule\n"; 25 | $git->fetchAll(array('verbose' => true)); 26 | 27 | $hash = $_SERVER['TEST_BUILD_REF']; 28 | echo "Checkout yaml tests (hash: $hash)\n"; 29 | $git->checkout($hash, array('force' => true, 'quiet' => true)); 30 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Recovery.php: -------------------------------------------------------------------------------- 1 | 13 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 14 | * @link http://elastic.co 15 | */ 16 | class Recovery extends AbstractEndpoint 17 | { 18 | /** 19 | * @return string 20 | */ 21 | public function getURI() 22 | { 23 | $index = $this->index; 24 | $uri = "/_recovery"; 25 | 26 | if (isset($index) === true) { 27 | $uri = "/$index/_recovery"; 28 | } 29 | 30 | return $uri; 31 | } 32 | 33 | /** 34 | * @return string[] 35 | */ 36 | public function getParamWhitelist() 37 | { 38 | return array( 39 | 'detailed', 40 | 'active_only', 41 | 'human' 42 | ); 43 | } 44 | 45 | /** 46 | * @return string 47 | */ 48 | public function getMethod() 49 | { 50 | return 'GET'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/ThriftRpc/Lib/Thrift/Protocol/JSON/BaseContext.php: -------------------------------------------------------------------------------- 1 | [$d, 'promise'], 17 | 'resolve' => [$d, 'resolve'], 18 | 'reject' => [$d, 'reject'], 19 | 'notify' => [$d, 'progress'], 20 | 'settle' => [$d, 'resolve'], 21 | ]); 22 | } 23 | 24 | /** @test */ 25 | public function progressIsAnAliasForNotify() 26 | { 27 | $deferred = new Deferred(); 28 | 29 | $sentinel = new \stdClass(); 30 | 31 | $mock = $this->createCallableMock(); 32 | $mock 33 | ->expects($this->once()) 34 | ->method('__invoke') 35 | ->with($sentinel); 36 | 37 | $deferred->promise() 38 | ->then($this->expectCallableNever(), $this->expectCallableNever(), $mock); 39 | 40 | $deferred->progress($sentinel); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2009-2015 walkor and contributors (see https://github.com/walkor/workerman/contributors) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "apache/thrift", 4 | "version": "0.10.0", 5 | "version_normalized": "0.10.0.0", 6 | "source": { 7 | "type": "git", 8 | "url": "https://git-wip-us.apache.org/repos/asf/thrift.git", 9 | "reference": "b2a4d4ae21c789b689dd162deb819665567f481c" 10 | }, 11 | "require": { 12 | "php": ">=5.3.0" 13 | }, 14 | "time": "2016-04-04T18:25:03+00:00", 15 | "type": "library", 16 | "extra": { 17 | "branch-alias": [] 18 | }, 19 | "installation-source": "source", 20 | "autoload": { 21 | "psr-0": { 22 | "Thrift": "lib/php/lib/" 23 | } 24 | }, 25 | "notification-url": "https://packagist.org/downloads/", 26 | "license": [ 27 | "Apache-2.0" 28 | ], 29 | "authors": [ 30 | { 31 | "name": "Apache Thrift Developers", 32 | "email": "dev@thrift.apache.org", 33 | "homepage": "http://thrift.apache.org" 34 | } 35 | ], 36 | "description": "Apache Thrift RPC system", 37 | "homepage": "http://thrift.apache.org/" 38 | } 39 | ] 40 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/Applications/Statistics/Web/less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | } 26 | 27 | // Hover state, but only for links 28 | a.badge { 29 | &:hover, 30 | &:focus { 31 | color: @badge-link-hover-color; 32 | text-decoration: none; 33 | cursor: pointer; 34 | } 35 | } 36 | 37 | // Quick fix for labels/badges in buttons 38 | .btn .badge { 39 | position: relative; 40 | top: -1px; 41 | } 42 | 43 | // Account for counters in navs 44 | a.list-group-item.active > .badge, 45 | .nav-pills > .active > a > .badge { 46 | color: @badge-active-color; 47 | background-color: @badge-active-bg; 48 | } 49 | .nav-pills > li > a > .badge { 50 | margin-left: 3px; 51 | } 52 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/HotThreads.php: -------------------------------------------------------------------------------- 1 | 11 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 12 | * @link http://elastic.co 13 | */ 14 | class HotThreads extends AbstractNodesEndpoint 15 | { 16 | /** 17 | * @return string 18 | */ 19 | public function getURI() 20 | { 21 | $node_id = $this->nodeID; 22 | $uri = "/_cluster/nodes/hotthreads"; 23 | 24 | if (isset($node_id) === true) { 25 | $uri = "/_cluster/nodes/$node_id/hotthreads"; 26 | } 27 | 28 | return $uri; 29 | } 30 | 31 | /** 32 | * @return string[] 33 | */ 34 | public function getParamWhitelist() 35 | { 36 | return array( 37 | 'interval', 38 | 'snapshots', 39 | 'threads', 40 | 'type', 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'GET'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /articles/thrift/demo/php/workerman-thrift/vendor/workerman/workerman/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2009-2015 walkor and contributors (see https://github.com/walkor/workerman/contributors) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /articles/chinese_search/elasticSearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Get.php: -------------------------------------------------------------------------------- 1 | 14 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 15 | * @link http://elastic.co 16 | */ 17 | class Get extends AbstractEndpoint 18 | { 19 | /** 20 | * @throws \Elasticsearch\Common\Exceptions\RuntimeException 21 | * @return string 22 | */ 23 | public function getURI() 24 | { 25 | if (isset($this->id) !== true) { 26 | return '/_ingest/pipeline/*'; 27 | } 28 | 29 | $id = $this->id; 30 | 31 | return "/_ingest/pipeline/$id"; 32 | } 33 | 34 | /** 35 | * @return string[] 36 | */ 37 | public function getParamWhitelist() 38 | { 39 | return array( 40 | 'master_timeout' 41 | ); 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getMethod() 48 | { 49 | return 'GET'; 50 | } 51 | } 52 | --------------------------------------------------------------------------------