月度归档:2014年11月

Mathematica Table数据导出到文件如何自定义分隔符

解决百度知道问题:http://zhidao.baidu.com/question/1175318960009451299.html

1原问题:
2Mathematica 输出数据之间的长空格
3 
4代码如下,输出的数据之间空格太大太长,我只要一个小空格就可以了,怎么实现?
5 
6aaa = {{1, 2}, {3, 4}};
7Export["C:\data\a1234.dat", aaa, "Table"];

 

1解决方法加一个option, "FieldSeparators" -> "分隔符"
2aaa = {{1, 2}, {3, 4}};
3Export["d:\\a1234.dat", aaa, "Table", "FieldSeparators" -> " "];
4 
5参考:ref/format/Table(F1调出帮助,输入这个),帮助中还有很多可以修改的option 值得继续尝试。

 

Linux PPTP 连接数限制

Linux 搭建PPTP Server连接超过100个后,就再无法拨号成功了。

查看log 发现有以下信息:

1# logread |grep -v "GRE"
2Nov 20 11:17:13 pptpd[21132]: CTRL: Received PPTP Control Message (type: 5)
3Nov 20 11:17:13 pptpd[21132]: CTRL: Made a ECHO RPLY packet
4Nov 20 11:17:13 pptpd[21132]: CTRL: I wrote 20 bytes to the client.
5Nov 20 11:17:13 pptpd[21132]: CTRL: Sent packet to client

 

1#man pptpd.conf
2 
3connections n
4    limits  the  number  of client connections that may be accepted.
5    If pptpd is allocating IP addresses (e.g.  delegate is not used)
6    then  the  number of connections is also limited by the remoteip
7    option.  The default is 100.

 

PPTP Server 最大连接数,是connections和地址池数量一起控制的,connections默认是100,导致无法连接更多。
如果希望最大连接1000条,可以在pptpd.conf中添加一行配置(地址池要有1000个地址):
connections 1000