#include
#include
using namespace Eigen;
using namespace std;
int main()
{
MatrixXd m = MatrixXd::Random(3,3);
MatrixXd n;
n=MatrixXd::Constant(3,3,1.2); //这是一个3*3的矩阵,里面的值全部是1。2
cou...
分类:
编程语言 时间:
2014-09-26 20:56:48
阅读次数:
318
A straight tunnel without branches is crowded with busy ants coming and going. Some ants walk left
to right and others right to left. All ants walk at a constant speed of 1 cm/s. When two ants meet, ...
分类:
其他好文 时间:
2014-09-26 02:19:18
阅读次数:
188
给redmine1.2.1,安装code review插件时执行 rake db:migrate_plugins RAILS_ENV=production 遇到这个错误uninitialized constant Redmineapp,经过不断的查找是因为code review 的版本下载错了,得用code review 0.4.4,最后重新安装则成功...
分类:
移动开发 时间:
2014-09-25 19:59:27
阅读次数:
153
题目大意:
在一个1000*1000的二维平面上,每一个整点都有一个权值,权值大小是 the production in the grid points (x, y) is (x + A)(y + B) where A, B are two constant.
思路分析:
先离线处理出所有的询问,对于每一个询问都有一个极角,按照极角排序。
然后对于平面上每一个点,都依次的加入到B...
分类:
其他好文 时间:
2014-09-25 03:55:08
阅读次数:
247
Weblogic JDBC配置test on reserve之后仍然出现com.mysql.jdbc.exceptions.jdbc4.CommunicationsException的分析...
分类:
数据库 时间:
2014-09-24 23:27:10
阅读次数:
376
这几天在看nginx,发现凡是有内存申请的地方都有pool这个东东出现,仔细看看,原来pool的类型是ngx_pool_t,是nginx用来做内存管理的,于是就决定看看他的实现。
1 nginx内存池相关的结构体
ngx_pool_t定义在core/ngx_palloc.h ngx_palloc.c中,下面是几个主要的结构体
ngx_pool_data_t
typede...
分类:
其他好文 时间:
2014-09-24 21:07:58
阅读次数:
332
最近在开发im服务器,需要大并发链接。QT默认的是使用select模型的,这种轮询方式非常慢。在高并发连接,我们需要epoll才能发挥linux服务器的性能.而且使用简单,整个服务端代码架构无需修改,设置QT的分发事件就可以使用了...
分类:
其他好文 时间:
2014-09-24 19:15:07
阅读次数:
151
今天正给项目写代码的时候发现想用switch语句,写的时候有点困惑.
一般的switch都是这样
swith(constant)
{
case 1: statement;break;
case 2: statement;break;
...
default: break;
}
每一个case 都是一个...
分类:
其他好文 时间:
2014-09-24 15:31:47
阅读次数:
143
当一个COM接口支持IDispatch的时候(Dual接口),它就可以被其他语言调用。
这里我用perl试了一下。
perl测试代码
use warnings;
use strict;
use Win32::OLE;
use constant ADS_UF_ACCOUNTDISABLE => 2;
use constant ADS_SCOPE_SUBTREE => 2;
my $MyCo...
分类:
其他好文 时间:
2014-09-24 15:02:47
阅读次数:
269
Linear Constant-coefficient difference equations...
分类:
其他好文 时间:
2014-09-23 19:20:45
阅读次数:
167