Yuxiang Liu

Results 9 issues of Yuxiang Liu

i build it succesfully,but I don't know if it can work, because I haven't bought the network card yet. Can Tenda U6 work?it may be RTL8192EU(the official drive seem to...

add a extension function `getOrNull(int index)` on List to get element at the specified index safely. If out of bounds, return null. It can work well with nnbd. ref: [https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/get-or-null.html](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/get-or-null.html)

背景: 开启了大量worker数(128甚至256以上)的服务器 mysql、redis等长连接即便是每个进程1个也会导致占用特别多的连接数; 需要每个进程单独维护连接,切换数据库也比较麻烦(需要重启或每个进程通知到),不便于管理; 使用了2.0的协程后,在大并发情况下,会出现大量的 mysql、redis的频繁打开和关闭连接问题,增加服务器负担; 最终导致的结果就是数据库和redis的压力非常大,而一个业务复杂的大型系统往往数据库是最大的性能瓶颈。 解决思路: 提供跨进程传输客户端的方法sendfd(),recvfd()以及客户端增加setfd(),允许单独开一个进程来管理连接,worker内使用recvfd接收客户端并setfd初始化。 ```php $pool = new Swoole\Proccess\Pool(1, SWOOLE_IPC_SOCKET); $pool->on('WorkerStart', function($pool, $id){ $pool->init(); }); $pool->on('Message', function($pool, $data){ $cli = $pool->getClient(); $pool->sendfd($cli->sock); }); ``` ```php...

I don't want to inject a dev config in prod env.Now the code like below: ``` @dev class DevConfig {} @prod class ProdConfig{} $initGetIt(getIt,environment:prod); ``` but the DevConfig still be...

used to know if the touch is end

Like lucene, it can use a customize freeze function that only write if the number of children nodes > MIN, otherwise it will be dropped. This allows only save part...

In macos, the dynamic library name is 'libLLVM.dylib' and it's not ELF format. FFiMe only support ELF format so I can't generate the ffi code. I use the llvm7.php and...

``` PHPCParser\Error: Syntax error, unexpected IDENTIFIER(__gwchar_t), expecting ',' or ';' on line 393 in /home/parallels/PhpstormProjects/pphp/vendor/ircmaxell/php-c-parser/lib/ParserAbstract.php:235 Stack trace: #0 /home/parallels/PhpstormProjects/pphp/vendor/ircmaxell/php-c-parser/lib/ParserAbstract.php(104): PHPCParser\ParserAbstract->doParse() #1 /home/parallels/PhpstormProjects/pphp/vendor/ircmaxell/php-c-parser/lib/CParser.php(23): PHPCParser\ParserAbstract->parse(Array, Object(PHPCParser\Context)) #2 /home/parallels/PhpstormProjects/pphp/vendor/ircmaxell/ffime/lib/FFIMe.php(101): PHPCParser\CParser->parse('llvm-c/Core.h', Object(PHPCParser\Context)) #3 /home/parallels/PhpstormProjects/pphp/tool/GenerateLLVMFFiCode.php(14):...

the param type is private _ParameterList, it cause i can't specify type annotation, dart analysis will report this warning (I use flutter project analysis_option)