Set the Hostname

Before you begin installing and configuring the components described in this guide, please make sure you've followed our instructions for setting your hostname. Issue the following commands to make sure it is set properly:

hostname
hostname -f

Run the  following commands to update your package repositories, upgrade your system, and install Exim:

apt-get update 
apt-get upgrade
apt-get install exim4-daemon-light mailutils

Configure Exim for Local Mail Service

Issue the following command to start Exim configuration:

dpkg-reconfigure exim4-config 

You'll be presented with a welcome screen, followed by a screen asking what type mail delivery you'd like to support. Choose the option for "internet site" and select "Ok" to continue.

Exim4 mail delivery type configuration on Ubuntu 10.04 LTS (Lucid).

Enter your system's FQDN (fully qualified domain name) in the "mail name" configuration screen.

Exim4 system mail name configuration on Ubuntu 10.04 LTS (Lucid).

Enter "127.0.0.1" when asked which IP address to listen on for SMTP connections.

Exim4 listening IP address configuration on Ubuntu 10.04 LTS (Lucid).

Make sure you list your FQDN, hostname, and localhost entries when you're asked which destinations mail should be accepted for.

Exim4 mail destination configuration on Ubuntu 10.04 LTS (Lucid).

Leave the relay domains and relay machines fields blank.

Exim4 relay domains configuration on Ubuntu 10.04 LTS (Lucid).

Select "No" when asked whether to keep DNS queries to a minimum.

Exim4 DNS queries configuration on Ubuntu 10.04 LTS (Lucid).

You may select either "mbox" or "Maildir" when asked about the delivery method used for incoming mail. While many utilities use mbox format, Maildir format can make handling individual locally delivered mail messages easier, and is widely supporting by a range of applications.

Exim4 mail format configuration on Ubuntu 10.04 LTS (Lucid).

Accept the default "non-split" option for your mail configuration file. Enter at least one external email address (choose one that you check frequently) in addition to "root" when asked to specify postmaster mail recipients.

Exim4 postmaster recipient configuration on Ubuntu 10.04 LTS (Lucid).

Test Your Mail Configuration

Issue the following command to send a test email, substituting an external email address for someone@somedomain.com.

echo "This is a test." | mail -s Testing someone@somedomain.com 

Congratulations! You've configured Exim to send email from your Linux VPS.

posted @ 2012-04-16 21:13 James 阅读(3) 评论(0) 编辑

1, First edit the /etc/hostname and /etc/hosts file

sudo vi /etc/hosts

sudo vi /etc/hostname 

 

2,  run hostname service

  sudo service hostname start

posted @ 2012-04-16 20:38 James 阅读(3) 评论(0) 编辑

最近发了很多QTP的资料和帖子,搞得我自己都有点头大,特此做一个索引贴,希望对大家阅读有帮助。
每一个都带着难度和我自己的评价,大家根据自己的水平去选择。
今年的QTP招聘非常多,pay的也很不错,大家有时间多读读这里中高级的题目,并且照着连连。

-James

QTP索引贴

QTP Tutorial
说明: 只有一百来页,短小精悍,推荐QTP第一读物。
技术难度:入门,初级
http://51it.ca/bbs/thread-200-1-3.html

Quick Test Pro(QTP) user guide(中文版)
说明: Mercury的中文版用户手册,8.0版的,有800多页。新版的都有1600多页了。手册,按内容排序,而不是按照难度。有些章节比较难,有些简单。
技术难度:入门,初级,中级,高级
http://51it.ca/bbs/thread-201-1-2.html

QuickTest Pro(QTP) 学习与实践经验总结(1-5)
说明:非常不错的学习经验总结。全是经验总结,不是教程。
技术难度:中级,高级
http://51it.ca/bbs/thread-202-1-2.html

QuickTest Pro(QTP) 中的VBScript速查手册
说明:教程加常用函数速查手册,非常推荐,学习VBScript的第一本书。
技术难度:入门,初级
http://51it.ca/bbs/thread-203-1-2.html

QuickTest Pro(QTP)分析测试结果
说明:如何分析运行结果,没有用过QTP的可以一看,上我们课的就可以省了
技术难度:入门
http://51it.ca/bbs/thread-204-1-2.html

QuikcTest Pro (QTP) regular expression usage
说明:讲述如何在QTP中使用正则表达式,也就是我们常说的模式匹配
技术难度:初级,中级
http://51it.ca/bbs/thread-206-1-2.html

Quick Test Pro(QTP) FAQ
说明: 问题和解答,看起来不是FAQ,而是一些面试题,有些还是很有难度的
技术难度:初级,中级,高级
http://51it.ca/bbs/thread-207-1-2.html

一份QuickTest Pro(QTP) 学习笔记
说明: 某某大侠的学习笔记,不过看起来更像是工作中遇到问题和解决办法的note
技术难度:中级,高级
http://51it.ca/bbs/thread-213-1-2.html

管理QTP测试脚本的对象仓库
说明: 如何管理QTP的对象仓库,以便能让对象仓库易于维护、管理。
技术难度:初级,中级
http://51it.ca/bbs/thread-223-1-2.html

How to connect QTP with Testdirct
说明: 如何是QTP和QC链接
技术难度:初级
http://51it.ca/bbs/thread-229-1-2.html

Quick Test Pro FAQ
说明: 这是一份真正的FAQ,把QTP常见的问题罗列出来,100多页,非常适合学过QTP的同学一读。
技术难度:初级,中级,高级
http://51it.ca/bbs/thread-238-1-2.html

Quick Test Professional - handbook
说明: 入门教程,34页。
技术难度:入门,初级
http://51it.ca/bbs/thread-239-1-2.html

Programming concepts in QTP with some Basic Examples
说明: 讲述了QTP中编程方面的一些例子,不是单单VBScript,是结合中如何使用QTP中的一些对象。
技术难度:中级,高级
http://51it.ca/bbs/thread-240-1-2.html

Scripting Quicktest professional - 03 VBScript The Basics
说明: VBScript进阶读物,想深入学习者读
技术难度:初级,中级
http://51it.ca/bbs/thread-255-1-2.html

Scripting Quicktest professional - 04 VBScript Intrinsic procedures
说明:VBScript进阶读物,想深入学习者读,比起上篇来,这个更加一阶。
技术难度:中级,高级
http://51it.ca/bbs/thread-256-1-2.html

Scripting QTP系列
说明: QTP与VBSCript的完美结合,非常有深度,恐怕用过多年QTP的人读起来都非常受教。不全,我只能找这么多了。
技术难度:高级

Scripting QTP - CH04 - Advanced VBScrict
http://51it.ca/bbs/thread-278-1-2.html

Scripting QTP - CH05 - Regular Expressions
http://51it.ca/bbs/thread-277-1-2.html

Scripting QTP - CH07 - Working With Files
http://51it.ca/bbs/thread-279-1-2.html

Scripting Qtp - Ch08 - Adob
http://51it.ca/bbs/thread-280-1-2.html

Scripting Qtp - Ch09 - Wsh
http://51it.ca/bbs/thread-285-1-2.html

Scripting Qtp - Ch10 - Svg
http://51it.ca/bbs/thread-281-1-2.html

Scripting QTP - CH11 - Shell32
http://51it.ca/bbs/thread-282-1-2.html

Scripting QTP - CH13 - Win32API
http://51it.ca/bbs/thread-283-1-2.html

Scripting QTP - CH14 - DotNet
http://51it.ca/bbs/thread-284-1-2.html

Mercury QuickTest Professional 8.0 Shortcut Key Reference Card
说明: 快捷键列表,2页。打出来放到墙上,上班时候参考。
技术难度:入门
http://51it.ca/bbs/thread-360-1-1.html

QTP Script 系列
说明:介绍了不同场合下VBScript的应用,适用性强,难度适中
技术难度:初级,中级

QTP Script 1/14, How to launch a QTP application
http://51it.ca/bbs/thread-321-1-1.html

QTP Script 2, How to get data from Excel into QTP without importing the Excel.
http://51it.ca/bbs/thread-322-1-1.html

QTP Script 3 How to launch QTP, open a test, run it,
http://51it.ca/bbs/thread-323-1-1.html

QTP Script 4 Write the below code in a new test in qtp and run it.
http://51it.ca/bbs/thread-324-1-1.html

QTP Script 5 How to import excel into datatable in QTP.
http://51it.ca/bbs/thread-325-1-1.html

QTP Script 6 How to pass output parameter’s value
http://51it.ca/bbs/thread-326-1-1.html

QTP Script 7 How to copy data from Excel sheet to a Text file?
http://51it.ca/bbs/thread-330-1-1.html

QTP Script 8 How to count and get the path & name repositories
http://51it.ca/bbs/thread-331-1-1.html

QTP Script 9 How to move data from a text file to excel sheet.
http://51it.ca/bbs/thread-332-1-1.html

QTP Script 10 How to get all files and folders within a given folder?
http://51it.ca/bbs/thread-333-1-1.html

QTP Script 11 How to connect to Oracle 10g from QTP 9.5 and run a SQL query.
http://51it.ca/bbs/thread-334-1-1.html

QTP Script 12 get name of all the Recovery Scenarios associated with the test?
http://51it.ca/bbs/thread-335-1-1.html

QTP Script 13 check if a particular library file is associated with a test
http://51it.ca/bbs/thread-336-1-1.html

QTP Script 14 How to view the information about all the actions
http://51it.ca/bbs/thread-337-1-1.html

QTP Script 15 How to view the action information a Excel file?
http://51it.ca/bbs/thread-338-1-1.html

QTP帮助文档的使用
说明:如何使用QTP自带的帮助
技术难度:入门
http://51it.ca/bbs/thread-316-1-1.html

QTP: 怎么能够批量执行已经存在的测试呢?
说明: QTP如何批量执行多个测试,
技术难度:入门
http://51it.ca/bbs/thread-314-1-1.html

如何使用qtp检查网页中显示的文字颜色为指定的颜色
说明:这个比较有难度,不过这种情况很少见,遇到可以参考一下。
技术难度:中级,高级
http://51it.ca/bbs/thread-312-1-1.html

posted @ 2010-06-08 09:41 James 阅读(276) 评论(1) 编辑
QTP提供了很多自动启动应用程序的办法,方法如下:
        1)SystemUtil.Run 允许启动新的进程
        格式:SystemUtil.Run file, [params], [dir], [op], [mode]
        下面代码利用SystemUtil对象如何启动进程。

        '启动IE

          SystemUtil.Run "iexplore.exe"
         SystemUtil.Run "iexplore.exe", "http://www.51testing.com/?72" '打开pcl blog
         SystemUtil.Run "iexplore.exe", "http://www.knowledgeinbox.com", , , 3
 


打开其他软件:

SystemUtil.Run "E:\software\xshell30.exe"   


        2)InvokeApplication 启动应用程序
        格式:InvokeApplication(Command [,StartIn])

        例子:
        '启动ie
           InvokeApplication "IEXPLORE.EXE"
        '启动计算器
           InvokeApplication "calc.exe"

        3) COM - Wsh
           利用Wsh对象进行启动
        例子:

            Dim oShell
           set ōShell= CreateObject ("Wscrīpt.shell")
           oShell.Run "IEXPLORE.EXE"
           Set ōShell = Nothing
 


oShell.Run "E:\software\xshell30.exe"

        4)Qtp自动启动应用程序
          Qtp打开 Automation-〉Record and Run Settings 下进行设置

        5)录制启动过程

也可以手动将Dialog:运行的所有对象添加到对象库中,并首先启动dialog:运行

          Dialog("运行").WinEdit("打开(O):").Set "calc"
         Dialog("运行").WinButton("确定").Click
 
posted @ 2010-06-08 09:34 James 阅读(169) 评论(0) 编辑

这个例子是psql的,其他的也是一样,语法可能稍有不同。

select * from users where password in (
select distinct password from users group by password having count(password) >1 ) 

 

 

posted @ 2010-06-03 13:34 James 阅读(28) 评论(0) 编辑

1,首先,看看你现在是多少,将来恢复的时候还用得上。

sysctl -a | grep shmmax

kernel.shmmax = 33554432

 

2,然后,改掉它

#sysctl -w kernel.shmmax=4294967296 

 

这种改变只是暂时的,下次重新启动还会改回来。要想永久改变,就要把这个加到 /etc/sysctl.conf

kernel.shmmax = 4294967296 

posted @ 2010-06-03 13:10 James 阅读(50) 评论(0) 编辑

使用这个功能,你就可以在main函数执行之前,和main函数退出之后,执行你自己想要的操作。具体原理,网上很多,自己google一下就找到了,这里只是给一个例子。

 1 #include <stdio.h>
 2 #include <stdlib.h>
 3 
 4 static void start(void) __attribute__ ((constructor));
 5 static void stop(void) __attribute__ ((destructor));
 6 
 7 int
 8 main(int argc, char *argv[])
 9 {
10         printf("start == %p\n", start);
11         printf("stop == %p\n", stop);
12 
13         exit(EXIT_SUCCESS);
14 }
15 
16 void
17 start(void)
18 {
19         printf("hello world!\n");
20 }
21 
22 void
23 stop(void)
24 {
25         printf("goodbye world!\n");
26 }
27 

运行结果:

hello world!

start == 0x4005fb

stop == 0x40060b

goodbye world!

 

 

 

 

posted @ 2010-06-02 10:36 James 阅读(136) 评论(0) 编辑
gem install rubygems-update 
cd /var/lib/gems/1.9.1/bin
sudo ./update_rubygems
posted @ 2010-06-02 10:30 James 阅读(52) 评论(0) 编辑

我的主要设置的是google,今天电脑突然"呜呜"的怪叫,找不出什么毛病来,最后才发现,google今天的图片换成这个了经典游戏。好是好,但是上班的时候,电脑这么叫,的确很吓人啊。能不能先设置成静音,玩的时候在打开声音啊。

今天google疯了! 

posted @ 2010-05-21 10:43 James 阅读(35) 评论(0) 编辑
摘要: 1,说澳大利亚的父母喜欢女孩,如果生出来的第一个女孩,就不再生了,如果是男孩就继续生,直到生到第一个女孩为止,问若干年后,男女的比例是多少;这个问题 我以为是什么智力问题,因为也看过不少有些面试官问问题,不一定要得到你的标准答案或者说根本就没有答案,他们只是想看到你对问题的处理能力,我就往社会 问题上答“如果社会不平衡......”,答了一会儿,他说不要将这个理解为社会问题...阅读全文
posted @ 2010-05-18 20:27 James 阅读(147) 评论(0) 编辑
摘要: 自己总结的,可能也只是对自己有用。第一,有明确目标,目标高尚好,不高尚也凑合,但是一定要明确。比如,当你按下电源,电脑开启的时候,你就要想清楚这次打开电脑的目的,完成了就关上。当你用鼠标点击屏幕上每一个像素,浏览器中每一个一个链接的时候,一定要清楚你要什么,达到就手工,别乱看。第二个,多用键盘,少用鼠标,你会发现用键盘的目标性比用鼠标要强10倍以上。阅读全文
posted @ 2010-05-17 19:09 James 阅读(42) 评论(0) 编辑
摘要: [代码]阅读全文
posted @ 2010-05-17 19:05 James 阅读(18) 评论(0) 编辑
摘要: 1, Client的check url[代码]2, Controller的action[代码]3, RJS 文件代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->exist_user=User.find_by_username(params[:use...阅读全文
posted @ 2010-05-16 15:06 James 阅读(18) 评论(0) 编辑
摘要: 1, Client[代码]注意这里的submit 是Form的ID, update是ajax回来以后要update的DOM的ID2, server[代码]阅读全文
posted @ 2010-05-16 13:22 James 阅读(18) 评论(0) 编辑
摘要: 密码怎么能存下来呢,要存也存一个Hash以后的啊。失败,程序直接就找出密码来了。windows xp + vc++ 7.0下编译通过。#include <windows.h>#include <wincrypt.h>#include <stdio.h>#pragma comment(lib, "Crypt32.lib")//Following definitio...阅读全文
posted @ 2005-08-18 22:07 James 阅读(633) 评论(0) 编辑
摘要: 已经好处时间没有写技术的Blog了,决定重新开始捡起来。其实在Blogshot上我也有几个Blog,不过他们更像是记事本,网上看到的东西,懒的存,就直接Blog it 了。最近发现自己原创的东西太少,希望这里能多写一些原创的东西。其实我也不是特别像在这里写网络安全之类的东西,比较这里是.Net Guys的天下。虽然我以前也还可以,但是现在已经不是像以前那样关心了。 现在工作的内容全部是Open S...阅读全文
posted @ 2005-04-03 03:48 James 阅读(706) 评论(2) 编辑
摘要: 界面漂亮,至少支持Office那种的界面支持自己的多个Blog帐户,可以快速切换,可以同时发布到好几个帐户上。能从服务器端拿到分类。支持插件,常用站点插件能自动下载。主要为了适应dudu这种能天天增加功能的站长。支持非英语语言和不同的编码,实现多语言界面。支持在线更新,好多Blog站点的接口也可以更新 支持模板 支持Comments和自动恢复 尽可能多的把Web上的操作拿到本地来作(比如修改参数什...阅读全文
posted @ 2004-08-11 21:48 James 阅读(1291) 评论(8) 编辑
摘要: 白话文,就是简单实用的意思,这是我以前的学习笔记。1, PInvoke什么意思? Platform Invocation Services2, 干什么用? 导入外部函数?什么是外部函数,就是不属于.Net托管的函数。3,如何用?看下面的例子。用[DllImport(dllname)]来实现,但是首先要把System.Runtiime.InteropServices using进来。但是不using...阅读全文
posted @ 2004-08-11 21:27 James 阅读(1858) 评论(4) 编辑
摘要: 网上太多了,找了好多都不是很好使。最后安装www.apache.org上面介绍的资料,安装成功。文档说的很详细,不多解释了。安装的主要目的是经常带着笔记本跑来跑去,调试不方便,不如安装一个windows版本的,盼望功能上不会有大的区别。阅读全文
posted @ 2004-08-11 20:55 James 阅读(1343) 评论(0) 编辑
摘要: 一个最主要的问题就是中文显示的问题,赶紧在web.config中加上:<globalization fileEncoding="GB2312" requestEncoding="GB2312" responseEncoding="GB2312"/>好点了,但是类别什么的中文显示还是有问题。 到处都配置了,还是不管用。没有方法,读读代码。跟踪了好长一段时间,终于找到了问题。就是在Proj...阅读全文
posted @ 2004-08-09 21:35 James 阅读(843) 评论(1) 编辑