V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  Tony8Finet  ›  全部回复第 2 页 / 共 2 页
回复总数  31
1  2  
2017-03-20 06:50:36 +08:00
回复了 xvx 创建的主题 Python Python 安装库的姿势
我在 ubuntu 16.04 下,先用 apt 安装 python-lxml ,若是 python 2.7 再用 pip 安装 lxml:

apt install python-lxml (自动安装在 python 3.5)
pip install lxml (手动安装在 python 2.7)
2016-12-12 00:32:49 +08:00
回复了 hymbz 创建的主题 Linux ubuntu 在 rc.local 里添加了命令为什么无法执行?
要设定执行权限:
sudo chmod +x /etc/rc.local
2016-12-07 23:08:33 +08:00
回复了 KnightNic 创建的主题 macOS 有朋友知道怎么恢复 macOS terminal 打开时的 last login message 啊?
这个是系统日志的档案,应该会定期自动清除才对。

检视内容:
syslog -f /var/log/asl/2016.12.07.G80.asl

如果要手动清除的话要先暂停系统日志:
sudo launchctl stop com.apple.syslogd
sudo launchctl stop com.apple.aslmanager

移除:
sudo rm -rf /private/var/log/asl/*.asl

mkdir -p ~/Desktop/temp/
sudo mv /var/log/asl/* ~/Desktop/temp/

重启:
sudo launchctl start com.apple.syslogd
2016-11-24 04:26:09 +08:00
回复了 Banio 创建的主题 Linux 2T 总容量的日志服务器 插入性能持续衰减
@Banio 不产生事务类日志, 写入效能会比一般表来得快。

看一下文件: CREATE TABLE

UNLOGGED

If specified, the table is created as an unlogged table. Data written to unlogged tables is not written to the write-ahead log (see Chapter 29), which makes them considerably faster than ordinary tables. However, they are not crash-safe: an unlogged table is automatically truncated after a crash or unclean shutdown.
2016-11-21 22:45:14 +08:00
回复了 ansheng 创建的主题 Vue.js Vue 有什么好的 markdown 插件?
2016-11-21 22:21:45 +08:00
回复了 Banio 创建的主题 Linux 2T 总容量的日志服务器 插入性能持续衰减
不怕死的话 PostgreSQL 9.1 起有:
CREATE UNLOGGED TABLE ...;
ALTER TABLE tablename SET UNLOGGED;
2016-10-10 23:36:25 +08:00
回复了 jjtx 创建的主题 C 用 C++ 包装 POSIX 消息队列是否有 ABI 问题?
System V IPC 是存在于作业系统中,因此其生命周期是和作业系统一样。一但建立了并未明确移除就一直存在,直到作业系统关机或重启。

你的程式有些问题:

* IPC\_CREATE 只能第一个人做 (注意存取权限),随后的人只能使用,不可再用 IPC\_CREATE:
<pre><code>MsgQueue(key_t key = 1235) {
int id = msgget(key, IPC_CREAT|0660);
created_ = (id == 0); // private: bool created_;
key_ = key; // private: key_t key_;
if (!created_) {
id = msgget(key, 0);
if (id == -1) {
throw std::runtime_error(std::string("msgget: ") +
strerror(errno));
}
}
id_ = id;
}
</code></pre>

* 建立者结束时要记得释放资源,若还有他人在使用中则系统会延迟到没人使用时才会释放:
<pre><code>~MsgQueue() {
if (created_) {
// 考虑释放资源,若不在此处释放则需另行手动处理 (ipcrm)
msgctl(key_, IPC_RMID, 0);
}
}
</code></pre>

有问题时程式应检查 errno 或用 strerror(errno)。

另外 IPC 的状态检视可用命令: `ipcs -a`
2016-04-12 05:53:55 +08:00
回复了 pimin 创建的主题 互联网 CnBeta 需要您的协助。。
@ob c25vb3B5Y2hlbkBnbWFpbC5jb20=
感谢
2016-04-11 04:03:56 +08:00
回复了 klesh 创建的主题 macOS unzip 没有-O 选项?
找 unzip610b.zip, 自己编译:

CHANGES AND NEW FEATURES
------------------------
UnZip 6.10b currently adds the following features:

- Implement Windows full Unicode support.
- Add -I and -O options for setting ISO and OEM character sets,
respectively, used by UnZip when doing character set translations.
- Various cleanup of VMS and Unicode code.
- Better handling of the PKWare verification bit.
- Implement Acorn port changes based on patch provided by J.L. that
updates the port to use current compilers, increases allowed file path
lengths to 1024 characters, adds directory attributes support, and updates
documentation.
1  2  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1033 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms · UTC 19:42 · PVG 03:42 · LAX 12:42 · JFK 15:42
Developed with CodeLauncher
♥ Do have faith in what you're doing.