2007-09-17

有意思的firefox功能,美国的信用卡欺诈网站很多啊
由于我用我的信用卡消费了一笔美元,最近在我的邮箱中发现这样两封邮件
第一封:
from Bank Of America <update@gmail.com>
hide details Sep 15 (2 days ago)

date
Sep 15, 2007 5:51 AM

subject
Bank of America Account Review Department !
We recently have determined that different computers have logged onto your Online Banking account, and multiple password failures were present before the logons. We now need you to re-confirm your account information to us.

If this is not completed by September 18, 2007, we will be forced to suspend your account indefinitely, as it may have been used for fraudulent purposes. We thank you for your cooperation in this manner.


To confirm your Online Banking records click on the following link:
http://home.graffiti.net/lanashpa/index.html


Thank you for your patience in this matter.

Bank of America Customer Service

Please do not reply to this e-mail as this is only a notification. Mail sent to this address cannot be answered.



© 2007 Bank of America Corporation. All rights reserved.
第二封:
Bank Of America <pp-verify@yahoo.com>

show details
5:36 am (5 hours ago)
Dear Bank of America client,

You have received this email because you or someone had used your account from different locations.For security purpose, we are required to open an investigation into this matter.

In order to safeguard your account, we require that you confirm your banking details.

The help speeed up to this process, please access the following link so we ca complete the verification of your Bank of America Online Banking Account registration information.

http://031327447202/online/sslencrypt218bit/online_banking/


If we do no receive the appropriate account verification within 48 hours, then we will assume this Bank of America account is fraudulent and will be suspended.

The purpose of this verification is to ensure that your bank account has not been fraudulently used and to combat the fraud from our community. We appreciate your support and understanding and thank you for your prompt attention to this matter.
当你在浏览器打开后会看到这样的提示
firefox

ie7

大家以后要小心了,尤其是国外的不明邮件
P:其实我早知道这个是欺诈的,看发件人,和地址就知道,只是想验证一下。

2007-09-13

gigix,ThoughtWorks咨询师,转贴一篇他的文章,原文地址:http://www.javaeye.com/topic/122616

风险对冲

先做个练习。假如你在10元价位买了一支股票,这个股票未来有可能涨到15元,也有可能跌到7元。你对于收益的期望倒不是太高,更主要的是希望如果股票下跌也不要亏掉30%那么多。你要怎么做才可以降低股票下跌时的风险?

一种可能的方案是:你在买入股票的同时买入这支股票的认沽期权——期权是一种在未来可以实施的权利(而非义务),例如这里的认沽期权 可能是“在一个月后以9元价格出售该股票”的权利;如果到一个月以后股价低于9元,你仍然可以用9元的价格出售,期权的发行者必须照单全收;当然如果股价 高于9元,你就不会行使这个权利(到市场上卖个更高的价格岂不更好)。由于给了你这种可选择的权利,期权的发行者会向你收取一定的费用,这就是期权费。

原本你的股票可能给你带来50%的收益或者30%的损失。当你同时买入执行价为9元的认沽期权以后,损益情况就发生了变化:可能的收益变成了
(15元-期权费)/10元
而可能的损失则变成了
(10元-9元+期权费)/10元
潜在的收益和损失都变小了。通过买入认沽期权,你付出了一部分潜在收益,换来了对风险的规避。这就叫风险对冲

(不难看出,如果加以精心安排,你可以用股票和期权构造这样一个投资组合:不论股价朝向哪个方向变化,投资组合在期末的价值必定相等。黑话这个就叫套期保值。由于套期保值组合的存在,期权的定价只由股票的期初价格、期末价格、期权时限、执行价和无风险利率——例如国债利率——这几个因素决定,与股票涨跌的概率无关。Black-Scholes模型等期权定价公式也表明了这一事实……扯远了,打住。)

另一种常见的风险对冲则是外汇的套期保值。比如说以人民币为会计本币的企业和外国公司做生意,不得不接受一笔为期三个月的美元应收帐款,老板就心里 发毛:人民币升值多猛啊,三个月以后没准美元又大跌了,害我平白无故少收5%我找谁哭去?这时候他就可以同时买入美元的看跌期权(也就是认沽期权),把原 本5%的外汇风险变成只有1%,甚至多付一些期权费从而完全规避掉外汇风险。这时候的期权,其作用就像是一张保单,给自己买了一份外汇风险保险。

(风险对冲的原则:对冲你不精通的、不想打理的、不是你主营业务的风险。风险总是和收益成正比,要是把主营业务的风险给对冲掉,稳妥倒是稳妥了,公 司离倒闭也就不远了。对于个人也是一样,你弄清楚自己想要从什么地方赚钱,就去承担这个方面的风险;别的方面的风险,就想办法对冲掉吧。)

如今说起来就满脸威风的对冲基金,其实一开始就是干这类“保险”业务的保险精算师。一帮大富翁挖铁矿、挖石油赚了钱,却不知道该怎么理财。老话说创 业容易守业难啊。于是就有了这些专门从事风险对冲业务的基金,帮大富翁们投资适当的金融产品,花不多的一些钱,把“一夜回到解放前”的风险给对冲掉。这些 个土财主,也不求变成世界首富,只要能保住自己的钱留给儿孙,还能适当的跟着无风险利率小增点值,他们就心满意足了。所以对冲基金在最开始的时候,是不折 不扣的风险规避者——从“风险对冲”这个词,就能看出来。

是不是越看反而越不明白了?以稳妥为目的、以规避风险为主业的对冲基金,怎么到现在变成在全球金融业兴风作浪的角色了?这个,要留待下一部分:套利。


2007-09-12

jsp include 乱码问题的解决
jsp include 的文件有时候会出现乱码,经过测试发现如下方法可以修改。
第一种情况可以修改被include的文件:
1.当jsp include动态文件时(jsp文件)可以在被include的jsp文件头部加上代码:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
可以解决。

2.当jsp include静态文件时(html文件)可以在被include的html文件的<head></head>标签内加上代码:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
同样可以解决。
第二种情况不能够修改被include的文件:
此时可以修改tomcat的web.xml达到目的

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<jsp-config>
<jsp-property-group>
<description>
Special property group for JSP Configuration JSP
example.
</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<el-ignored>true</el-ignored>
<page-encoding>UTF-8</page-encoding>
<scripting-invalid>false</scripting-invalid>
<include-prelude></include-prelude>
<include-coda></include-coda>

<description>
Special property group for JSP Configuration JSP
example.
</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.html</url-pattern>
<el-ignored>true</el-ignored>
<page-encoding>UTF-8</page-encoding>
<scripting-invalid>false</scripting-invalid>
<include-prelude></include-prelude>
<include-coda></include-coda>
</jsp-property-group>
</jsp-config>

</web-app>

其中
jsp-config一段是用来说明你要将包含的页面默认按照什么编码格式包含。web-app 标签的version必须是2.4的。
具体可以参见
http://www.javaworld.com.tw/jute/post/view?bid=9&id=44041&sty=1&tpg=1&age=-1