博文

目前显示的是 五月, 2011的博文

c++ cin input 输入

今天花了一个小时在cin 上面 明明输入两个东西是一样的。 string str1,str2 getline(cin,str1,'\t'); cin>>str2; 但是 if(str1==str2) 输入一样东西却不进入 if 太奇怪了 用cout< cout< 也不行,发现一样 灵机一动 换一种方法 cout<<111< 发现不一样 原来'\t'的关系,把两个string换成一样的输入就好了, 回去研究一下,cin 上午对pass by value 和 reference 居然还产生了问题 void myfunc(vector a){ a.resize(100); }; main(){vector b;b.resize(1);myfunc(b)} 不会改变vector size 因为c++是pass by value的 除非改成 void myfunc(vector &a){ a.resize(100); };

欧冠决赛

May 28 中午2:45 欧冠决赛 巴萨:曼联 巴萨实在太强了,看了现在足球适合这种打法。 梅西玩虐朴智星。 鲁尼干着急 比利亚,最后一球绝了,完美的香蕉球 范德赛,虽然宝刀未老,但毕竟足球还是团队运动 3:1的比分真实精彩。 Good Game!

Vector Pointer in C++

#include #include using namespace std; main(void){ vector *a; a->at(0)=0; printf("%d\n",a->at(0)); } My toy example, it results segmentation fault. I don't know why. Interesting problem.

c++ 模板

今天纠结了半天c++ 模板的问题 #include < vector > template < class DATA > class A{ } template < class DATA > class B{ vectorv < A < DATA > > a; } A用到了DATA所以class B 使用A的时候也要注明 template class.

Intern Preparation QA May 25

QA INTERN quality assurance One requirement is familiar with SQL. In case they may ask me questions about SQL. Simple MySQL command: 1. create: create table test (id INT primary key,name VARCHAR(30) unique,phone VARCHAR(12)); 2. insert: insert (id,name,phone) values(10,'yifei',888-888-2432); 3. drop: drop table test; 4. select: select id,name from test where id=10; 5. create procedure:mysql> delimiter // mysql> CREATE PROCEDURE simpleproc (OUT param1 INT) -> BEGIN -> SELECT COUNT(*) INTO param1 FROM t; -> END// Query OK, 0 rows affected (0.00 sec) mysql> delimiter ; mysql> CALL simpleproc(@a);

Today I become a Christian

今天在Julia阿姨的引领下(感谢她)我成为了基督徒,去教会很久了,今天真正做了这个决定。 前一段时间的不顺心,现在觉得都没有什么了。 成为神的孩子,自信的孩子。 也求神增添我的智慧,与力量。 我要把基督教带给更多不信主的人。 让他们也能蒙受主的恩典。 感谢主,我觉得心灵有了归宿,有一种回家的感觉。 第一次在美国有这种感觉。 我要记住这个重要的日子 2011.5.20 今天也是姥姥八十大寿,祝姥姥生日快乐。

Scrapy Error

These days when running tor, I kept getting this error twisted.internet.error.CannotListenError: Couldn't listen on any:6080: [Errno 98] Address already in use.

240 网址

http://www.cs.utsa.edu/~dj/cs3853/schedule.html

DBA Qualification

1. analyze business requirements, and develop database solutions for SQL Server 2008R2. 2. engineers to translate business needs into workable and scalable database solutions. 3. hands-on throughout the entire SDLC from design to development to plans for deployment. 4. Handle data load requests from business 5. automate those requests with SSIS, Powershell, .Net, etc. 6. understanding of the data architecture plus general application functionality used to maintain data integrity. 7. Convert reports from Crystal Reports to Reporting Services as needed

sql sever 面试题

安装:http://database.51cto.com/art/200910/155855_1.htm http://www.cnblogs.com/pincelee/articles/802882.html http://9host.cn/shujuku/200742218541214709.html 建立sql server 远程连接 如何打开sql server 2005 的1433端口 配置工具->Sql Server Configuration Manager->MSSQLSERVER的协议 看看TCP/IP协议是否启动,如果启动,右键菜单点"属性" ,在分页菜单中选"IP地址",把"IP1"和"IP2"中"TCP端口"为1433, "已启用"改为"是" 配置工具->Sql Server Configuration Manager->SQL Native Client 配置->客户端协议->TCP/IP 选择TCP/IP右键菜单中"属性",确认"默认端口"是1433,"已启用"为"是" SQL code SQL Server 2005 远程连接 配置TCP/IP属性. Surface Area Configuration --> Database Engine --> Remote Connections --->Using TCP/IT SQL Server 外围应用配置器—服务和连接外围配置—database englie—远程连接—启用(远程连接的TCP/IP和named pipes) SQL Server Configuration Manager—SQL2005网络配置—启用TCP/IP和named pipes

Pentium 4 奔腾4 处理器

今天看了奔腾4处理器的内部结构,computer architecture, 挺有意思,写下来。 奔腾4支持的特点是: deep pipeline(像生产汽车流水线的长度),multiple issue(在pipeline的第一个stage issue 多个instruction VLIW 把许多instruction 封装起来,一起decode ,一起issue),Speculation(code中可能有许多branch,预测他们可能jump或者不jump,jump到哪里,减少branch下面instruction等待时间)

2-D image deverative

x=fspecial('sobel'); y=fspecial('sobel'); Gx=filter2(x,img); Gy=filter2(y,img); G=(Gx.^2+Gy.^2).^0.5;