April 2009 Archives

如何坚持一年做一件事情?

| No Comments

要找一个好的方法,鼓励自己完成下去,关键是坚持的这件事情每次需要多长时间呢?

目前从2.4开始的交易日截图一直在做,但从来没去review一下,只是想让自己时时来关注这个市场。

现在很想还是能继续将AmiBroker系统深入的学习一下,以后每天半个小时的时间,抽出来,学习,立此为证~

 

--EOF--

9个月+6天 73.7cm 10kg

| No Comments

小谷多9个月的体检结果:

除了头偏大,其它一切正常~~

已经出了6颗牙齿了,上面4颗,下面2颗。

 

医生建议带她到儿童医院或者妇幼去做智力检查,原因:头太大~

 

--EOF--

MySQL api自动重连的问题

| No Comments

在mysql 4.1中,无法设置是否启用自动重连机制,即默认总是会自动重连。

对于这个情况,我们的程序部署时可能需要注意(如果没有使用session变量等,问题还不是很大),但在某些情况下,因为字符集的问题,需要尽量避免mysql底层的自动重连,或者在配置中需要加上:

[mysqld] init_connect='SET NAMES utf8'

但这需要部署另外的mysql实例。

Google 后有相关资料:

http://blog.taragana.com/index.php/archive/how-to-enable-disable-auto-reconnect-in-mysql/

 

 

How to disable MySQL client auto reconnect

In view of the side-effects you may want to disable auto reconnect. In MySQL version 5.1 and above auto reconnect is disabled by default. In any version you can disable auto reconnect with the following PHP code:
my_bool reconnect = 0;
mysql_options(&mysql, MYSQL_OPT_RECONNECT, &reconnect);

 

 

Mysql 4.1的手册中的相关说明:

 

17.7.13. Controlling Automatic Reconnect Behavior

The MySQL client library can perform an automatic reconnect to the server if it finds that the connection is down when you attempt to send a statement to the server to be executed. In this case, the library tries once to reconnect to the server and send the statement again.

Some client programs might provide the capability of controlling automatic reconnection. For example, mysql reconnects by default, but the --skip-reconnect option can be used to suppress this behavior.

Automatic reconnection can be convenient because you need not implement your own reconnect code, but if a reconnection does occur, several aspects of the connection state are reset and your application will not know about it. The connection-related state is affected as follows:

·         Any active transactions are rolled back and autocommit mode is reset.

·         All table locks are released.

·         All TEMPORARY tables are closed (and dropped).

·         Session variables are reinitialized to the values of the corresponding variables. This also affects variables that are set implicitly by statements such as SET NAMES.

·         User variable settings are lost.

·         Prepared statements are released.

·         HANDLER variables are closed.

·         The value of LAST_INSERT_ID() is reset to 0.

Locks acquired with GET_LOCK() are released.

--EOF--

由于校验是在mysql4和mysql5之间,校验生成同一sql语句在mysql4和mysql5之间成生的校验码都不一样,原因:

MySQL 5.0 and later all retain trailing spaces in "VARCHAR", while previous versions would remove them.

mysql4 and pre ver 在保存一个后面有空格的值到varchar时会把后面的空格去掉,mysql5 会保存

--EOF--

年初进行后台DB版本升级:mysql 4.1.x -> mysql 5.0。有的机器是直接重新安装MySQL,然后按照dump的数据重做slave,再进行表数据校验(maatkit),一切正常。

后来服务逐渐迁移到新的MySQL5的版本后,升级原有的MySQL4.1的slave时,采取了偷懒的一种办法,直接覆盖安装MySQL,数据库文件不变,结果导致性能很差。

后跟进查原因,原来发现MySQL5.x之后的InnoDB默认行存储格式有了较大变化,下面列的就是相关资料了:

 

7.4.2. Make Your Data as Small as Possible

One of the most basic optimizations is to design your tables to take as little space on the disk as possible. This can result in huge improvements because disk reads are faster, and smaller tables normally require less main memory while their contents are being actively processed during query execution. Indexing also is a lesser resource burden if done on smaller columns.

MySQL supports many different storage engines (table types) and row formats. For each table, you can decide which storage and indexing method to use. Choosing the proper table format for your application may give you a big performance gain. See Chapter 13, Storage Engines.

You can get better performance for a table and minimize storage space by using the techniques listed here:

  • Use the most efficient (smallest) data types possible. MySQL has many specialized types that save disk space and memory. For example, use the smaller integer types if possible to get smaller tables. MEDIUMINT is often a better choice than INT because a MEDIUMINT column uses 25% less space.

  • Declare columns to be NOT NULL if possible. It makes everything faster and you save one bit per column. If you really need NULL in your application, you should definitely use it. Just avoid having it on all columns by default.

  • For MyISAM tables, if you do not have any variable-length columns (VARCHAR, TEXT, or BLOB columns), a fixed-size row format is used. This is faster but unfortunately may waste some space. See Section 13.4.3, "MyISAM Table Storage Formats". You can hint that you want to have fixed length rows even if you have VARCHAR columns with the CREATE TABLE option ROW_FORMAT=FIXED.

  • InnoDB tables use a compact storage format. In versions of MySQL earlier than 5.0.3, InnoDB rows contain some redundant information, such as the number of columns and the length of each column, even for fixed-size columns. By default, tables are created in the compact format (ROW_FORMAT=COMPACT). If you wish to downgrade to older versions of MySQL, you can request the old format with ROW_FORMAT=REDUNDANT.

    The presence of the compact row format decreases row storage space by about 20% at the cost of increasing CPU use for some operations. If your workload is a typical one that is limited by cache hit rates and disk speed it is likely to be faster. If it is a rare case that is limited by CPU speed, it might be slower.

    The compact InnoDB format also changes how CHAR columns containing UTF-8 data are stored. With ROW_FORMAT=REDUNDANT, a UTF-8 CHAR(N) occupies 3 × N bytes, given that the maximum length of a UTF-8 encoded character is three bytes. Many languages can be written primarily using single-byte UTF-8 characters, so a fixed storage length often wastes space. With ROW_FORMAT=COMPACT format, InnoDB allocates a variable amount of storage in the range from N to 3 × N bytes for these columns by stripping trailing spaces if necessary. The minimum storage length is kept as N bytes to facilitate in-place updates in typical cases.

  • The primary index of a table should be as short as possible. This makes identification of each row easy and efficient.

  • Create only the indexes that you really need. Indexes are good for retrieval but bad when you need to store data quickly. If you access a table mostly by searching on a combination of columns, create an index on them. The first part of the index should be the column most used. If you always use many columns when selecting from the table, you should use the column with more duplicates first to obtain better compression of the index.

  • If it is very likely that a string column has a unique prefix on the first number of characters, it's better to index only this prefix, using MySQL's support for creating an index on the leftmost part of the column (see Section 12.1.7, "CREATE INDEX Syntax"). Shorter indexes are faster, not only because they require less disk space, but because they also give you more hits in the index cache, and thus fewer disk seeks. See Section 7.5.2, "Tuning Server Parameters".

  • In some circumstances, it can be beneficial to split into two a table that is scanned very often. This is especially true if it is a dynamic-format table and it is possible to use a smaller static format table that can be used to find the relevant rows when scanning the table.

 

7.4.2. 使你的数据尽可能小

最基本的优化之一是使表在磁盘上占据的空间尽可能小。这能给出巨大的改进,因为磁盘读入较快,并且在查询执行过程中小表的内容被处理时占用较少的主存储器。如果在更小的列上做索引,索引也占据较少的资源。

MySQL支持许多不同的存储引擎(表类型)和行格式。对于每个表,可以确定使用哪个存储引擎和索引方法。为应用程序选择合适的表格式可以大大提高性能。参见第15章:存储引擎和表类型

可以使用下面的技术可以使表的性能更好并且使存储空间最小:

  • 尽可能地使用最有效(最小)的数据类型。MySQL有很多节省磁盘空间和内存的专业化类型。
  • 尽可能使用较小的整数类型使表更小。例如,MEDIUMINT经常比INT好一些,因为MEDIUMINT列使用的空间要少25%
  • 如果可能,声明列为NOT NULL。它使任何事情更快而且每列可以节省一位。注意如果在应用程序中确实需要NULL,应该毫无疑问使用它,只是避免 默认地在所有列上有它。
  • 对于MyISAM表,如果没有任何变长列(VARCHARTEXTBLOB),使用固定尺寸的记录格式。这比较快但是不幸地可能会浪费一些空间。参见15.1.3节,"MyISAM表的存储格式"。即使你已经用CREATE选项让VARCHARROW_FORMAT=fixed,也可以提示想使用固定长度的行。
  • MySQL/InnoDB中,InnoDB表使用更紧凑的存储格式。在以前版本的MySQL中,InnoDB记录包含一些冗余信息,例如列数目和每个列的长度,即使对于固定大小的列。默认情况,创建的表为紧凑格式(ROW_FORMAT=COMPACT)。如果想要降级旧版本的MySQL/InnoDB,可以用ROW_FORMAT=REDUNDANT要求旧的格式。
  • 紧凑InnoDB格式也改变了包含UTF-8数据的CHAR列的保存方式。在ROW_FORMAT=REDUNDANT格式中UTF-8 CHAR(n)占用3*n字节UTF-8编码的字符的最大长度是3字节。许多语言可以主要用单字节UTF-8字符来编写,固定的存储长度通常会浪费空间。通过根据需要剥离尾部的空格,ROW_FORMAT=COMPACT格式为这些列分配可变数量的n..3*n字节。最小存储长度按顺序保存为n字节,以在典型情况下帮助更新。
  • 每张表的主索引应该尽可能短。这使一行的识别容易而有效。
  • 只创建你确实需要的索引。索引对检索有好处,但是当你需要快速存储东西时就变得糟糕。如果主要通过搜索列的组合来存取一个表,对它们做一个索引。第一个索引部分应该是最常用的列。如果从表中选择时总是使用许多列,应该首先以更多的副本使用列以获得更好的索引压缩。
  • 如果很可能一个索引在头几个字符上有唯一的前缀,仅仅索引该前缀比较好。MySQL支持对一个字符列的最左边部分创建一个索引(参见13.1.4节,"CREATE INDEX语法")。更短的索引会更快,不仅因为它们占较少的磁盘空间,而且因为它们将在索引缓存中提供更多的访问,因此磁盘搜索更少。参见7.5.2节,"调节服务器参数"

·         在一些情形下,将一个经常被扫描的表分割为2个表是有益的。特别是如果它是一个动态格式的表,并且可能使用一个扫描表时能用来找出相关行的较小静态格式的表。

 

13.5.13.4. Physical Row Structure

The physical record structure for InnoDB tables is dependent on the row format specified when the table was created. For MySQL 5.1, by default InnoDB uses the COMPACT format, but the REDUNDANT format is available to retain compatibility with older versions of MySQL.

Records in InnoDB ROW_FORMAT=REDUNDANT tables have the following characteristics:

  • Each index record contains a six-byte header. The header is used to link together consecutive records, and also in row-level locking.

  • Records in the clustered index contain fields for all user-defined columns. In addition, there is a six-byte field for the transaction ID and a seven-byte field for the roll pointer.

  • If no primary key was defined for a table, each clustered index record also contains a six-byte row ID field.

  • Each secondary index record contains also all the fields defined for the clustered index key.

  • A record contains also a pointer to each field of the record. If the total length of the fields in a record is less than 128 bytes, the pointer is one byte; otherwise, two bytes. The array of these pointers is called the record directory. The area where these pointers point is called the data part of the record.

  • Internally, InnoDB stores fixed-length character columns such as CHAR(10) in a fixed-length format. InnoDB truncates trailing spaces from VARCHAR columns.

  • An SQL NULL value reserves 1 or 2 bytes in the record directory. Besides that, an SQL NULL value reserves zero bytes in the data part of the record if stored in a variable length column. In a fixed-length column, it reserves the fixed length of the column in the data part of the record. The motivation behind reserving the fixed space for NULL values is that it enables an update of the column from NULL to a non-NULL value to be done in place without causing fragmentation of the index page.

Records in InnoDB ROW_FORMAT=COMPACT tables have the following characteristics:

  • Each index record contains a five-byte header that may be preceded by a variable-length header. The header is used to link together consecutive records, and also in row-level locking.

  • The record header contains a bit vector for indicating NULL columns. The bit vector occupies (n_nullable+7)/8 bytes. Columns that are NULL will not occupy other space than the bit in this vector.

  • For each non-NULL variable-length field, the record header contains the length of the column in one or two bytes. Two bytes will only be needed if part of the column is stored externally or the maximum length exceeds 255 bytes and the actual length exceeds 127 bytes.

  • The record header is followed by the data contents of the columns. Columns that are NULL are omitted.

  • Records in the clustered index contain fields for all user-defined columns. In addition, there is a six-byte field for the transaction ID and a seven-byte field for the roll pointer.

  • If no primary key was defined for a table, each clustered index record also contains a six-byte row ID field.

  • Each secondary index record contains also all the fields defined for the clustered index key.

  • Internally, InnoDB stores fixed-length, fixed-width character columns such as CHAR(10) in a fixed-length format. InnoDB truncates trailing spaces from VARCHAR columns.

  • Internally, InnoDB attempts to store UTF-8 CHAR(n) columns in n bytes by trimming trailing spaces. In ROW_FORMAT=REDUNDANT, such columns occupy 3*n bytes. The motivation behind reserving the minimum space n is that it in many cases enables an update of the column to be done in place without causing fragmentation of the index page.

The presence of the compact row format decreases row storage space by about 20% at the cost of increasing CPU use for some operations. If your workload is a typical one that is limited by cache hit rates and disk speed it is likely to be faster. If it is a rare case that is limited by CPU speed, it might be slower.

--EOF--

香港产子

| No Comments

同事给转发的,先记录,备用,仅做参考:

1. 选定香港仁安医院http://www.union.org/
2. 36周到香港产检,没有预约时间,结果11点到,才知道所有医生已经预约了,要等到5点半才有空。验血等花掉一千多大元。
3. 38周预约11日出生,恰逢重阳节,医院说节假日要加收1万元,就推到13日下午2点(约下午就可以当天去香港了)。需要提前3小时入院,提前6小时不能吃东西。
4. 13日早上7点起床吃早餐,8点半从家里出发,10点半到达医院,办理入院手续,要求加快办理出生证(生产第二个工作日就可以拿到),本来打算第二天就带BB办理回港证、回乡证的,但是医院告知BB在出院以前不可以带出去。
5. 17日到沙田政府出生处领取出生纸,带上我和老公的旅行证件、结婚证就可以了。回来马上上网预约申请回港证http://www.esd.gov.hk/campaign/1007/chi/default.asp和回乡证www.ctshk.com 的时间(父母是大陆户籍的bb只能到旺角或者中环的香港中旅社办理),不过旺角回乡证的预约都满了,只好到中环了(建议一定要预约,否则现场排队时间会很久)
6. 18日早上9点出院,10点到沙田出入境管理处(和领取出生证的在同一层楼)申请回港证,先填好表格就很快,表格下载http://www.immd.gov.hk/chtml/permits.htm,还要一个副署人签名的表格(非bb父母的,见过bb的任何人都可以)
7. 12点赶到中环香港中旅,申请回乡证。这是最麻烦的,需要我们的旅行证件、户口簿。而且只能当天下午五点在旺角香港中旅社才能领到为期一个月的临时回乡证,3年期的回乡证需要在两周之后回香港领取。
8. 全部费用下来大概4万,其中医院费用3.9万,证件费用:1千多。

宝宝回到大陆需要下列三种证件:
出生纸:
医院代为申请,加快的话可以在宝宝出生第二个工作日拿到,需要父亲或者母亲到医院所在地的香港政府领取,需要的证件:父亲或者母亲的旅行证件,结婚证

回港证:
需要带上宝宝到香港政府出入境管理处申请,最好网上预约,在申请后半个小时左右拿到,需要的证件:出生纸,父亲或者母亲的旅行证件、副署人签名的表格。

回乡证:
需要带上宝宝到香港中旅社申请,最好网上预约,如果在中午前申请,当天下午5点可以拿到临时证(1个月有效)。3年期有效的证件12天后才能拿到(加快5天),最迟半年内领取。通常都是同时申请临时证和三年期证两个证件。需要的证件:出生纸、回港证、父亲或者母亲的旅行证件、户口簿。

办理各种证件的次序:出生纸、回港证、回乡证

注:如果时间预约合适,可以一天之内办理好所有的证件。由于香港部分医院在住院期间不会给宝宝出去,建议这样的行程就可以一天之内办理好证件:提前一天领取出生纸,最迟9点出院,预约出院当天上午9点半申请回港证,预约出院当天12点左右申请回乡证(最好选择旺角香港中旅社办理,中环的太远,时间有点紧)。回港证、回乡证都可以网上预约具体的时间、地点办理(香港中旅社的预约页面在大陆上不了,在香港就没有问题)。如果比预约时间早一点或者晚一点到,都没有问题的。在去之前最好把所有的申请表格都填好。

--EOF--


http://www.cnblogs.com/deadshot123/archive/2009/01/13/1320892.html
在windows xp sp2下安装mdac2.8,提示不兼容。

解决方法:
一、在c:\windows\inf\mdac.inf,上点击右键,选择安装,提示插入系统光盘,
     如果有光盘,插入光盘完成操作。
二、如果没有光盘,请点击这里下载安装必须文件。
注意:本压缩包适用在xp sp2上,没有在其他版本上试过,如果失败请重新安装正确的版本。
http://files.cnblogs.com/deadshot123/MDAC2.8-offline.rar

 

--EOF--

set ws=wscript.createobject("wscript.shell")
ws.run "win.bat /start",0
(其中win.bat为你自己的批处理名字,自己改)
然后把这个记事本保存为后缀名为.vbe的文件,到时候你只要运行这个vbe文件就达到目的了!

 

其它相关:

http://hi.baidu.com/avalon3515/blog/item/07f3ccf8c8f38c08d8f9fd1b.html
最经典方法:某高人写的:
rem @echo off
if "%1" == "h" goto begin
mshta javascript : new ActiveXObject('WScript.Shell').Run('cmd %~dp0%~nx0 h',0);(window.close() )&&exit
:begin
rem 在这里添加你的代码


http://hi.baidu.com/art008/blog/item/e8a3942f9c1486381f30899e.html
批处理隐藏运行的10种思路
1.基础
HideRun.vbs
--------------------------------------------------------------------------------
CreateObject("WScript.Shell").Run "cmd /cD:\test.bat",0
其中D:\test.bat是你的批处理路径
HideRun.bat
--------------------------------------------------------------------------------
echo CreateObject("WScript.Shell").Run "cmd /cD:\test.bat",0>$tmp.vbs
cscript.exe /e:vbscript $tmp.vbs
del $tmp.vbs
这个批处理其实不能使其批处理本身隐藏,但是下面大部分隐藏调用批处理的原理和基础。
HideRun.js
--------------------------------------------------------------------------------
new ActiveXObject('WScript.Shell').Run('cmd /cD:\Test.bat',0);
用Javascript有什么好处呢?js的字符串变量可以用单引号,从而方便命令行作为参数调用,而且js很好的支持多行语句用 ; 分隔写成一行。要注意的是:js要区分大小写,方法必须用括号,结尾必须有分号。所以就成了下面的命令:
--------------------------------------------------------------------------------
mshta "javascript:new ActiveXObject('WScript.Shell').Run('cmd /cD:\test.bat',0);window.close()"
2.用快捷方式
如果要使一个批处理本身隐藏,可以参考附件里的一个快捷方式,修改附件中的相关路径即可隐藏启动你的批处理。可以用vbs来建立一个 .lnk,其实用批处理也行(先echo一个vbs出来)
3.利用系统服务
可以用sc建立一个系统服务然后启动这个服务来启动批处理。缺点是启动服务较慢,需要管理员权限
查考这个帖子,
http://www.cn-dos.net/forum/view ... =%E6%9C%8D%E5%8A%A1
asbai 兄的大作,极大的方便了我们的使用。
CODE:  [Copy to clipboard]
--------------------------------------------------------------------------------
runassrv add /cmdline:"C:\Windows\System32\cmd.exe /cD:\test.bat" /name:"mysrv"
net start mysrv
4.利用at计划任务
用at可以建立一个计划任务,在不输入 /interactive 参数可以后台运行。但是建使用at必须有管理员权限
CODE:  [Copy to clipboard]
--------------------------------------------------------------------------------
at 09:10 "cmd /cD:\Test.bat"
然后在 9:10 系统就会自动后台以SYSTEM权限运行这个bat
5.利用ftype文件关联
综合上面的技术,使所有批处理都隐藏运行
CODE:  [Copy to clipboard]
--------------------------------------------------------------------------------
ftype batfile=C:\Windows\System32\mshta "javascript:new ActiveXObject('WScript.Shell').Run('cmd /c%1',0);window.close();"
大家可以讨论下下面的思路,目前没有明确的方法,但是理论上是可行的
6.rundll32
其实这个方法只是理论上估计的,这里提出来占个位置,留个记号,等待高手研究
rundll32可以调用 dll 里的API,如果有个dll可以隐藏run一个exe就可以实现隐藏启动批处理,呵呵。目前我也没找到方法。
7.其他用户
Windows 2k/XP支持多用户,如果能在后台登陆另一个账户的桌面然后运行一个批处理,就能完全达到隐藏的目的
8.bat2vbs
这个方法只是一个不是很成熟的思路。
查考这个帖子:
http://www.cn-dos.net/forum/view ... p;highlight=exe2bat
这使我们产生了一个想法:把bat转换成vbs,然后vbs生成一个临时bat文件,然后WScript.Shell.Run隐藏启动这个临时bat
9. .NET编译
参考这个帖子:
http://www.cn-dos.net/forum/view ... hlight=script%2Bnet
里面提到了一个 .NET Warpper,我们完全可以利用系统自带的组件把bat编译到 exe 当中。如果bat不涉及交互,exe自然就安静的运行了。
10.注入汇编
最后向大家推出的今天最隆重的,ASCII Assembly Code专家 Herbert Kleebauer 的又一力作:showwin.exe
  Quote:
showwin.exe let you minimize/maximize/hide the command window
within a batch program (requires W2k or better).
Usage:  showwin.exe number
0 SW_HIDE
   Hides the window and activates another window.
1 SW_SHOWNORMAL
   Activates and displays a window. If the window is minimized or maximized,
   the system restores it to its original size and position. An application
   should specify this flag when displaying the window for the first time.
2 SW_SHOWMINIMIZED
   Activates the window and displays it as a minimized window.
3 SW_MAXIMIZE
   Maximizes the specified window.
3 SW_SHOWMAXIMIZED
   Activates the window and displays it as a maximized window.
4 SW_SHOWNOACTIVATE
   Displays a window in its most recent size and position. This value is
   similar to SW_SHOWNORMAL, except the window is not actived.
5 SW_SHOW
   Activates the window and displays it in its current size and position.
6 SW_MINIMIZE
   Minimizes the specified window and activates the next top-level window
   in the Z order.
7 SW_SHOWMINNOACTIVE
   Displays the window as a minimized window. This value is similar to
   SW_SHOWMINIMIZED, except the window is not activated.
8 SW_SHOWNA
   Displays the window in its current size and position. This value is
   similar to SW_SHOW, except the window is not activated.
9 SW_RESTORE
   Activates and displays the window. If the window is minimized or maximized,
   the system restores it to its original size and position. An application
   should specify this flag when restoring a minimized window.
10 SW_SHOWDEFAULT
   Sets the show state based on the SW_ value specified in the STARTUPINFO
   structure passed to the CreateProcess function by the program that
   started the application.
11 SW_FORCEMINIMIZE
   Windows 2000/XP: Minimizes a window, even if the thread that owns the
   window is not responding. This flag should only be used when minimizing
   windows from a different thread.
---------------------------------------------------------------------------
A simple example:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-:
@echo off
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>showwin.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>showwin.com
echo >showwin.com">T}{zE~@gwkBG@OEKcUt`E}@mqqBsy?seHBEaPhxr?@zAB`LrPEyoDt@Cj?>>showwin.com
echo >showwin.com">pky_jN@QEKpEt@ij?jySjN@REKpEt@jj?jyGjN@SEKkjtlGuNw?p@pjirz>>showwin.com
echo >showwin.com">FEvAUSQ?_YLTQ@@?~QCo_F~RDU@?aU?@MQ_AMy1GHs?Gw`LbLK@shM`S_d>>showwin.com
echo bD_nsDddlTr_sPdlnTcnaTv_xP_ngD_rhDhsrT_kkDhrtT_fmDRNCTILk?>>showwin.com
echo >showwin.com">staThg_So_rPfnqTl`qTdq_ShtpTrdqThV_Sqrm@ILm?O?cOKFDP?@@?dx>>showwin.com
echo >showwin.com">OdFUu?N?_B@J@??KD?HUA?QOGB_QO?F?SCAQO?UDF?UCE?Q_F?DUA?CUB?>>showwin.com
echo >showwin.com">OFO?FOS?DUO?IUO?FOW?RU{OWFO?mYU?wdsTeQs@OQ@?QAQ?LUA?_F_og~>>showwin.com
echo >showwin.com">UODUO?FOSAFOeAUOyAO_DCSHUOOQO?OCFGuHUOGFO?TUO?DRTTqrQ@kcmS>>showwin.com
echo gFkPFUO?ngRThVvTncmTJFvPMQDTrKDDcmqOFkkDFOSAFOeAUOyAdFFSnB>>showwin.com
echo >showwin.com">sT`llTKcmTdmhTFQ@PBsdTrmnTdknTmhVTvncTwDSSOshTbnqTrrdTT~?K>>showwin.com
echo ?OGOQp?o??Gds?wOw?PGAtaCHQvNntQv_w?A?it\=upkNQD??OuQsQG[i?>>showwin.com
echo RwrqosHy?Mjmv\@IuBlpUrHdjNAslF~mH}OKT?U??PT~OL?O?O?i?COT~B>>showwin.com
echo U?OCU?YF0x>>showwin.com
showwin.com>showwin.exe
del showwin.com
dir
:: wait 4 seconds
ping -n 4 localhost >nul
:: hide window
showwin.exe 0
dir /b
:: wait 4 seconds
ping -n 4 localhost >nul
:: show window
showwin.exe 5
:: wait 4 seconds
ping -n 4 localhost >nul
del showwin.exe 

--EOF--

tcpdump数据用wireshark分析

| No Comments

偶尔从同事那里学到的,原来可以这样:

http://www.wireshark.org/docs/wsug_html_chunked/AppToolstcpdump.html
D.3. tcpdump: Capturing with tcpdump for viewing with Wireshark
Prev  Appendix D. Related command line tools
D.3. tcpdump: Capturing with tcpdump for viewing with Wireshark
There are occasions when you want to capture packets using tcpdump rather than wireshark, especially when you want to do a remote capture and do not want the network load associated with running Wireshark remotely (not to mention all the X traffic polluting your capture).
However, the default tcpdump parameters result in a capture file where each packet is truncated, because tcpdump, by default, only captures the first 68 bytes of each packet.
To ensure that you capture complete packets, use the following command:
tcpdump -i <interface> -s 1500 -w <some-file>
     
You will have to specify the correct interface and the name of a file to save into. In addition, you will have to terminate the capture with ^C when you believe you have captured enough packets.
 Note!
tcpdump is not part of the Wireshark distribution. You can get it from: http://www.tcpdump.org for various platforms.

--EOF--

关于网页gzip

| No Comments

前段时间测试网站CGI的gzip压缩情况,跑到准IDC进行测试,配置和测试环境一样,但却总是返回的不是gzip压缩后的数据。

一直以为是apache配置的问题,和运维同事调整了好半天仍然没能搞定。

晚上回家很不爽,突然想到我是在会议室的时候进行测试的,在办公区同事自己测试是好的,而办公区和会议室的防火墙策略有很大不同,很兴奋的第二天大早跑到会议室和同事联调测试。

这次比较乖了,我本地抓发送的http包,他在服务器tcpdump数据包,然后进行比较。

果然发现从会议室过去的请求数据支持http压缩的:

Accept-Encoding: gzip, deflate

被公司防火墙过滤了。

可能的原因:公司的防火墙机会没有端口限制,也不需要证书和入域进行访问,相对还是比较宽松的,但是可能需要对所有的数据流进行监控,压缩后的监控可能比较难受?所以干脆不支持gzip类型的数据传输了。

难怪以前我们在会议室访问网站有时候总觉得慢一些呢~

之前还有一次使用WPE Pro的时候也发现有个数据包的分包在办公区和会议室总是不同,使得我之前的WPE的flt失效,折腾半天才发现原来封包数据发送有变。

--EOF--

经过无数次测试,不经意间终于发现了如何设置:
点击 500 Bars (xxx Bars)后面的 ...
去掉后面的Filter Data Outside Market Hours 或再选择试试。

可能的原因:

看下面的log:
MarketOpen=1899-12-30 9:30:00, MarketClose=1899-12-30 16:00:0

这里不知道是否是故意设置成这样的,时间显然是错误的。
去掉上面的选项后,即时图就可以显示拉~~
不过日线图仍然不能使用,但日线图去使用yahoo的更好拉~~~

2009-03-11 22:43:27Z RTData Information RT3.OpenRequest2: WLD requests data: BIDU, NumBars=500, RequestType=biMinutes, BarIntervall=1, FilterMarketHours=False, MarketOpen=1899-12-30 9:30:00, MarketClose=1899-12-30 16:00:0

 

--EOF--

PowerDesigner的PhysicalDataModel本身是不支持同时显示name和code的,但不知道是否可以通过name,code的转换做一些变通同时都显示出来?

今天从同事那里学了一招,可以作为一个简单的替代方案:

将表,字段的stereotype都设置成和name一样,然后再选择显示code,这样假的name,code都可以显示出来了~

 

--EOF--

近期小玩熊

| No Comments

开通一通帐户后,一直没啥机会玩几把,心里总是很痒痒,主要平时公司上班也没啥时间可以盯盘。上上周刚好请假在家,小玩了几把,来回几次薅了点羊毛,甚是兴奋。

倒不是赚钱多少,而是觉得好玩,嘿嘿。一通下单的速度还是不错,操作起来多练手几次倒也很喜欢,关键佣金便宜,操作就没任何负担了。

周一又在家,这下可好,带小孩,盯盘,结果被套,亏死!

前天在机场wifi,割肉出了2/3,结果昨天大涨40%,懒得管了,今天又跌回去。

62990~~~看来买入卖出点还需要多多锻炼。

 

另外,现在主要玩权证,不敢上仓位,主要也是练练看盘的感觉吧。

 

--EOF--

2个看全球期指的网站

| No Comments

Pages

May 2016

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Archive

This page is an archive of entries from April 2009 listed from newest to oldest.

March 2009 is the previous archive.

May 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.