V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  gouchaoer2  ›  全部回复第 4 页 / 共 9 页
回复总数  175
1  2  3  4  5  6  7  8  9  
2019-03-05 14:16:42 +08:00
回复了 chenhonzhou 创建的主题 问与答 “好人为师”好吗
好为人师
另外不同的人的思维不太一样,有的人容易被冒犯,遇到这种人就需要注意一点,尽量忽略掉
你的行为并没有错
2019-03-04 17:14:57 +08:00
回复了 snoopy1024 创建的主题 程序员 世界上为什么会有正则表达式这么反人类的玩意儿?
如果没有正则你写的东西读起来会更加困难
关了吧,我傻逼,造成这个的原因是,plink 是不可用的,但是 ssh 是可用的
我用 netstat 的时候原来一直是加了-anp 选项,发现 plink 不可用,然后检测 ssh 的时候没有加-anp 选项
这就导致一部分绑定的连接没有出来
netstat 运行是在 docker 内部的,在内部 ssh 或者 plink 就没有去绑定端口
@NetworkManager 3q 我试试
看了几款支持的 tplink 的 usb 网卡,都没有卖了: https://help.ubuntu.com/community/HardwareSupportComponentsWirelessNetworkCardsTP-Link#USB
2019-02-11 10:30:26 +08:00
回复了 NueXini 创建的主题 PHP [ PHP 求助]
preg_repalce,regex 为([a-z])\\1 这样匹配
@reus 我怎么这么菜呢?气死我了!
@frylkrttj 是的,在用 git 上比你菜,但不是所有的事情都比你菜哦
一个 lfs 特性都做不好,每次 check out 都出问题我也很无奈啊
@tempdban 我错了还不行么?
@tempdban 这个管用,3q
2019-02-01 14:53:06 +08:00
回复了 feiyuanqiu 创建的主题 PHP PHP 的 JIT 终于要来了
shell 的语法实在是太暧昧了,经常看着看着不知道这是啥意思,弄个 bashdb 在那里 debug。。。做一件事有 N 种方法
2019-02-01 14:51:17 +08:00
回复了 feiyuanqiu 创建的主题 PHP PHP 的 JIT 终于要来了
@jfcherng 我也分享一个我日常用 php 写脚本的心得:

不习惯写 shell 的可以这样写:

```
#!/bin/bash
php -v > /dev/null 2>&1
if [ $? -ne 0 ];then
echo "Please install php and ensure 'php -v' output version info in command line"
echo "For ubuntu/debian, 'sudo apt-get install php' or 'sudo apt-get install php5' for old distribution"
echo "For centos/RHEL, 'sudo yum install php' "
fi

#php script
php<<'PHPSCRIPT'
<?php

chdir("..");
echo getcwd();
exec("command 2>&1", $o, $r);//这里 exec 只保存 stdout 而不保存 stderr,所以需要把 stderr 重定向到 stdout
if ($r!=0)
{
echo "command return code:{$r}, output:" . var_export($o, true);
exit();
}
PHPSCRIPT
```
2019-02-01 14:46:48 +08:00
回复了 feiyuanqiu 创建的主题 PHP PHP 的 JIT 终于要来了
@realpg
@jfcherng
现在 swoole 走 golang 那种纯的协程之后,io 就不再是瓶颈了,于是 cpu 就成了瓶颈了。。。不过这就抛弃了 fpm
也抛弃了 fpm 下面的很多生态和优点,见仁见智吧
@Cooky glxinfo 的话正常的那台 glxinfo | less 可以查看到 display0 的 vendor 是 nvidia。。。不正常的那台没有这个命令,安装好了 mesa-utils 之后 glxinfo 显示 vendor 是 SGI。。。我觉得原因似乎呼之欲出了
@kokutou 并没有。。。
@Cooky 正常的那台的 /etc/X11/xorg.conf 内容是:
```

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection

```

不正常的那台为空
1  2  3  4  5  6  7  8  9  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3402 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms · UTC 11:44 · PVG 19:44 · LAX 04:44 · JFK 07:44
Developed with CodeLauncher
♥ Do have faith in what you're doing.