<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Charlie's path to dEAth</title>
	<atom:link href="http://blog.charliezhu.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.charliezhu.com</link>
	<description>an engineer's log</description>
	<pubDate>Fri, 05 Sep 2008 14:50:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Cross tabulation, Pivot table and OLAP Cube summarized by tools</title>
		<link>http://blog.charliezhu.com/2008/09/05/cross-tabulation-pivot-table-and-olap-cube-summarized-by-tools/</link>
		<comments>http://blog.charliezhu.com/2008/09/05/cross-tabulation-pivot-table-and-olap-cube-summarized-by-tools/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 14:15:28 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[BI]]></category>

		<category><![CDATA[DBA]]></category>

		<category><![CDATA[MS_ACCESS]]></category>

		<category><![CDATA[datamining]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/2008/09/05/241/</guid>
		<description><![CDATA[Cross tab
Cross tabulation , is defined on WikiPedia as A cross tabulation (often abbreviated as cross tab) displays the joint distribution of two or more variables.
As below figures, the column values of the first table is transformed to column names in the second one, so the production of


 
 


Cross tabs are frequently used because:

They are easy [...]]]></description>
			<content:encoded><![CDATA[<h3 id="o9e3">Cross tab</h3>
<p id="ux7s" class="firstHeading"><a id="yl6a" title="Cross tabulation" href="http://en.wikipedia.org/wiki/Cross_tab">Cross tabulation</a> , is defined on WikiPedia as <em>A cross tabulation (often abbreviated as cross tab) displays the joint distribution of two or more variables</em>.</p>
<p id="vlsf" class="firstHeading">As below figures, the column values of the first table is transformed to column names in the second one, so the production of</p>
<div id="b69q3">
<p id="qm7j"><img id="xaix" style="width: 271px; height: 204px;" src="http://docs.google.com/File?id=ah2dqnkjbwxt_885c5pdqffj_b" alt="" /></p>
<p id="d_2o"> </p>
<p id="zjvp1"> </p>
<div id="bw31" style="text-align: left; padding-top: 1em; padding-bottom: 1em; padding-right: 0px; padding-left: 0px"><img id="rhcl" style="width: 234px; height: 101px;" src="http://docs.google.com/File?id=ah2dqnkjbwxt_884xhvkpshg_b" alt="" /></div>
<div id="jrw9" style="text-align: left; padding-top: 1em; padding-bottom: 1em; padding-right: 0px; padding-left: 0px">
<p id="jrw91" style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em"><strong>Cross tabs are frequently used because:</strong></p>
<ol id="jrw93" style="line-height: 1.5em; margin-top: 0.3em; margin-right: 0px; margin-bottom: 0px; margin-left: 3.2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px">
<li id="jrw94" style="margin-bottom: 0.1em">They are easy to understand. They appeal to people who do not want to use more sophisticated measures.</li>
<li id="jrw95" style="margin-bottom: 0.1em">They can be used with any level of data: nominal, ordinal, interval, or ratio - cross tabs treat all data as if it is nominal.</li>
<li id="jrw96" style="margin-bottom: 0.1em">A table can provide greater insight than single statistics.</li>
<li id="jrw97" style="margin-bottom: 0.1em">It solves the problem of empty or sparse cells.</li>
<li id="jrw98" style="margin-bottom: 0.1em">They are simple to conduct.</li>
</ol>
</div>
<p id="d_2o0"> </p>
<p id="am3p0">I think the cross-tab is really what the Relational Database means. That&#8217;s a meaningful &#8220;Relationships&#8221; between entities but not entity and it&#8217;s attributes.</p>
<h3 id="qvrr0">Solution by SQL Server 2005</h3>
<p>Code:<br id="dnsq" /></p>
<pre id="e6oi">SELECT
    SalesPerson,
    [Oranges] AS Oranges,
    [Pickles] AS Pickles
FROM
    ( SELECT SalesPerson, Product, SalesAmount FROM tblSales ) ps
PIVOT
    (
      SUM (SalesAmount)
      FOR Product IN ( [Oranges], [Pickles])
    ) AS pvt</pre>
<p id="e6oi0" style="margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px"> </p>
<p id="eani48" style="margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px">This most weak part of feature is that you must list all pivot column name manually. It&#8217;s pain.</p>
<p id="ykcy" style="margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px"><br id="ykcy0" /></p>
<p id="qvrr1"><a id="x5cu" title="BOL: Using PIVOT and UNPIVOT" href="http://msdn.microsoft.com/en-us/library/ms177410.aspx">BOL: Using PIVOT and UNPIVOT</a></p>
<pre>SELECT &lt; non-pivoted column&gt;,
    [first pivoted column] AS ,
    [second pivoted column] AS ,
    ...
    [last pivoted column] AS
FROM
    (&lt; SELECT query that produces the data&gt;)
    AS
PIVOT
(
    &lt; aggregation function&gt;()
FOR
[&lt; column that contains the values that will become column headers&gt;]
    IN ( [first pivoted column], [second pivoted column],
    ... [last pivoted column])
) AS
&lt; optional ORDER BY clause&gt;;</pre>
<h3 id="wkcg0">Solution by MS Access</h3>
<p>Microsoft Access provides a very nice cross table design wizard.</p>
<div id="jdns" style="text-align: left; padding-top: 1em; padding-bottom: 1em; padding-right: 0px; padding-left: 0px; "><img id="au5h" style="width: 534px; height: 401px;" src="http://docs.google.com/File?id=ah2dqnkjbwxt_889fdmng9c4_b" alt="" /></div>
</div>
<p id="ftz2">With the wizard, we get the cross-tab script based on JET-SQL.</p>
<pre id="n5z00">TRANSFORM Sum(tblSales.SalesAmount) AS [Sum of SalesAmount]
SELECT tblSales.SalesPerson, Sum(tblSales.SalesAmount) AS [Total SalesAmount]
FROM tblSales
GROUP BY tblSales.SalesPerson
PIVOT tblSales.Product;</pre>
<p id="ftz20"> </p>
<div id="peyl" style="text-align: left; padding-top: 1em; padding-bottom: 1em; padding-right: 0px; padding-left: 0px; "><img id="gazy" style="width: 387px; height: 100px;" src="http://docs.google.com/File?id=ah2dqnkjbwxt_887cmx3nkfq_b" alt="" /></div>
<p id="adf6"> </p>
<p id="gazy0">Pivot columns is automaticly generated and the aggregation over all pivot column can be produced. The JET-SQL is so smart and smoothly for small applications those don&#8217;t have to be scaled. You can <a id="b9vk" title="use almost all VBA programming utilities in it" href="http://blog.charliezhu.com/2007/02/03/access-jet-sql%e4%b8%ad%e7%9a%84function/">use almost all VBA programming utilities in it</a>. The TRANSFORM/PIVOT feature is powerful and more then 5 years before the SQL Server&#8217;s implementation.</p>
<p id="gq.j">It is based on JET-SQL, so not availible in an ADP project.</p>
<h3>Solution by SQL Server 2000, CASE and GROUP</h3>
<p id="t.b:">The classic solution of cross-tab in SQL Server 2000 or before is produced by CASE and GROUP.</p>
<pre id="adf60">select
    SalesPerson,
    SUM(CASE Product WHEN 'Pickles' THEN SalesAmount ELSE 0 END ) as [Pickles],
    SUM(CASE Product WHEN 'Oranges' THEN SalesAmount ELSE 0 END ) as [Oranges],
    SUM(SalesAmount)    as [Total Sales]
from
    tblSales
group by
    SalesPerson</pre>
<p id="ry0b">We can find it&#8217;s footprint clearly in the SQL Server 2005&#8217;s pivot feature. And this is a base for other ideas.</p>
<h3>Solution by SQL Server 2000, Dynamic SQL</h3>
<p><a id="qnsp" title="Dynamic Cross-Tabs/Pivot Tables By Rob Volk" href="http://www.sqlteam.com/article/dynamic-cross-tabs-pivot-tables">Dynamic Cross-Tabs/Pivot Tables By Rob Volk</a></p>
<div id="ym0e">
<p id="ym0e0">The basic idea is to generate dynamic CASE-and-GROUP based SQL statement and execute.</p>
<p id="b83e">The following comments providing many improvement on this solution. i.e.</p>
<ul id="yutg0">
<li id="yutg1">Introduce an WHERE statement as parameter for the @PivotColTable.</li>
<li id="nd6y">Using string to generate pivot columns but global temp table for better supporting of concurency calling.</li>
<li id="zu6d">Using user defined table with an user session column instead of global temp table.</li>
<li id="u-va">To summarize multiple values.</li>
</ul>
<p id="d_2o1">There is also an similar solution I have not dived in, <a id="mcls" style="color: #551a8b; " title="Dynamic Crosstab Queries, by  Itzik Ben-Gan" href="http://www.sqlmag.com/Articles/Index.cfm?ArticleID=15608">Dynamic Crosstab Queries, by Itzik Ben-Gan</a> .</p>
</div>
<h3>Solution by Excel</h3>
<p id="txu0">But the most easy and rich tool I have used is MS Excel&#8217;s pivot table.</p>
<p><img id="rko80" style="width: 647px; height: 154px;" src="http://docs.google.com/File?id=ah2dqnkjbwxt_888f56cjcc3_b" alt="" /></p>
<h3 id="zx98">Pivot table and OLAP Cube</h3>
<p>The basic idea of OLAP Cube is a multi-dimession pivot table. The common visualization tool for OLAP is also a pivot table or pivot chart viewer. </p>
<p>So, draw a figure to show basic concepts in OLAP by example metioned above as the END.</p>
<p><img id="hd2s" style="width: 660px; height: 276px;" src="http://docs.google.com/File?id=ah2dqnkjbwxt_890ft3399dj_b" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/09/05/cross-tabulation-pivot-table-and-olap-cube-summarized-by-tools/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Implementing Slope-One in T-SQL</title>
		<link>http://blog.charliezhu.com/2008/07/21/implementing-slope-one-in-t-sql/</link>
		<comments>http://blog.charliezhu.com/2008/07/21/implementing-slope-one-in-t-sql/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 21:35:44 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[BI]]></category>

		<category><![CDATA[datamining]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/?p=223</guid>
		<description><![CDATA[Slope-One, the simplest form of non-trivial item-based collaborative filtering based on ratings. (Original Paper)
Referencing to Bryan O&#8217;Sullivan&#8217;s tutorial of implementing Slope One in Python, I write a the implementation in T-SQL. Believe it useful to many people and projects.
Brief process summary

Define the fact table as user data.
Calculating intermediate matrix(FreqDiff). The information about users is eliminated [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Slope_One">Slope-One</a>, the simplest form of non-trivial item-based collaborative filtering based on ratings. (<a href="http://www.daniel-lemire.com/fr/abstracts/SDM2005.html">Original Paper</a>)<br />
Referencing to <a href="http://www.serpentine.com/blog/2006/12/12/collaborative-filtering-made-easy/">Bryan O&#8217;Sullivan&#8217;s tutorial of implementing Slope One in Python</a>, I write a the implementation in T-SQL. Believe it useful to many people and projects.</p>
<h3>Brief process summary</h3>
<ul>
<li>Define the fact table as user data.</li>
<li>Calculating intermediate matrix(FreqDiff). The information about users is eliminated and frequency/ score differences data between items is produced.</li>
<li>Predicting from user input score with the intermediate data.</li>
</ul>
<h3>Data schema</h3>
<p>The UserData is fact table of business transactions. I use an view to wrap it for switching between testing data and working data.<br />
The Freq&#038;Diff matrix is square and sparse. Only non-zero values is meaningful and stored. And a half-matrix triangle holds full information about the matrix.<br />
There created two indices to avoid heavily bookmark-lookup.</p>
<pre>
create table UserData (                  -- fact table
    userid   varchar(50) not null,
    itemid   varchar(50) not null,
    rating   float not null default 0,
    updtime  datetime default getdate(),
    primary key (userid, itemid)
)
GO

create table FreqDiff (                  -- Freqs and Diffs
    itemid1  varchar(50),
    itemid2  varchar(50),
    freq     float not null default 0,
    diff     float not null default 0,
    updtime  datetime default getdate(),
    primary key (itemid1, itemid2)
)
GO
create index idx_freqdiff_itemid1 on FreqDiff(itemid1, freq, diff, itemid2)
create index idx_freqdiff_itemid2 on FreqDiff(itemid2, freq, diff, itemid1)

/*
 * The matrix FreqDiff is *almost* symmetric,
 * so only half of the data need to be stored.
 * There would be huge of space (50%) saved for large dataset.
 */
alter view vw_freqdiff as
select itemid1 as itemid1, itemid2 as itemid2, freq,     diff from FreqDiff fd
union all
select itemid2 as itemid1, itemid1 as itemid2, freq, -1* diff from FreqDiff fd
GO

/*
 * Wrap for userdata,
 * switch from one model to another easily.
 */
alter view vw_userdata as
select * from userdata
GO
</pre>
<h3>Testing data</h3>
<p>Same as Bryan&#8217;s but names changed for easily debugging print.</p>
<pre>
-- init userdata, Bryan O'Sullivan's sample data is used
insert into UserData values ( 'u1', 'i1',  1, getdate() )
insert into UserData values ( 'u1', 'i2', .5, getdate() )
insert into UserData values ( 'u1', 'i3', .2, getdate() )
insert into UserData values ( 'u2', 'i1',  1, getdate() )
insert into UserData values ( 'u2', 'i3', .5, getdate() )
insert into UserData values ( 'u2', 'i4', .2, getdate() )
insert into UserData values ( 'u3', 'i1', .2, getdate() )
insert into UserData values ( 'u3', 'i2', .4, getdate() )
insert into UserData values ( 'u3', 'i3',  1, getdate() )
insert into UserData values ( 'u3', 'i4', .4, getdate() )
insert into UserData values ( 'u4', 'i2', .9, getdate() )
insert into UserData values ( 'u4', 'i3', .4, getdate() )
insert into UserData values ( 'u4', 'i4', .5, getdate() )
GO
</pre>
<h3>Processing the intermediate table</h3>
<pre>
-- update process
delete FreqDiff
insert into FreqDiff
select
    ud1.itemid, ud2.itemid, count(*), (sum(ud1.rating - ud2.rating))/count(*), getdate()
from
    vw_userdata ud1
    join vw_userdata ud2 on
            ud1.userid = ud2.userid
        and ud1.itemid > ud2.itemid
group by ud1.itemid, ud2.itemid
</pre>
<h3>Predicting</h3>
<pre>
-- predict process
declare @pref table(itemid varchar(50), rating float)
insert into @pref values('i1', 0.4)

select -- distinct top 10
    itemid1,
    sum(freq)                               as freq,
    sum(freq*(diff + rating))            as pref,
    sum(freq*(diff + rating)) /sum(freq) as rating
from
    vw_freqdiff fd
    join @pref p on fd.itemid2 = p.itemid
where itemid1 not in( select itemid from @pref )
group by itemid1
</pre>
<p>Further works as intermediate data updating seems easy.<br />
So, writing here, listening for suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/07/21/implementing-slope-one-in-t-sql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>“逆转瓮安”，很有创意，值得一看</title>
		<link>http://blog.charliezhu.com/2008/07/16/%e2%80%9c%e9%80%86%e8%bd%ac%e7%93%ae%e5%ae%89%e2%80%9d%ef%bc%8c%e5%be%88%e6%9c%89%e5%88%9b%e6%84%8f%ef%bc%8c%e5%80%bc%e5%be%97%e4%b8%80%e7%9c%8b/</link>
		<comments>http://blog.charliezhu.com/2008/07/16/%e2%80%9c%e9%80%86%e8%bd%ac%e7%93%ae%e5%ae%89%e2%80%9d%ef%bc%8c%e5%be%88%e6%9c%89%e5%88%9b%e6%84%8f%ef%bc%8c%e5%80%bc%e5%be%97%e4%b8%80%e7%9c%8b/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 09:00:14 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/?p=225</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/eWDqhS6k91c&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/eWDqhS6k91c&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/07/16/%e2%80%9c%e9%80%86%e8%bd%ac%e7%93%ae%e5%ae%89%e2%80%9d%ef%bc%8c%e5%be%88%e6%9c%89%e5%88%9b%e6%84%8f%ef%bc%8c%e5%80%bc%e5%be%97%e4%b8%80%e7%9c%8b/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gridview排序和分页的基本机制</title>
		<link>http://blog.charliezhu.com/2008/07/09/gridview%e6%8e%92%e5%ba%8f%e5%92%8c%e5%88%86%e9%a1%b5%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%9c%ba%e5%88%b6/</link>
		<comments>http://blog.charliezhu.com/2008/07/09/gridview%e6%8e%92%e5%ba%8f%e5%92%8c%e5%88%86%e9%a1%b5%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%9c%ba%e5%88%b6/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 04:08:53 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/?p=222</guid>
		<description><![CDATA[排序

客户端PostBack。
在Sorting事件中，取得排序的列及排序方向。
调用DataSource的排序方法。
重新DataBind

分页

Gridview读取全部的数据源数据。
在PageIndexChanging事件中，取得要前往的页编号(e.NewPageIndex)
数据绑定前，设置PageIndex属性，实现分页。

也就是说，分页完全是在ASP.NET中进行的，对于大量数据集就会有性能问题。
解：


Paging Through a Query Result

回覆：GridView分頁/排序 重取資料 怎樣才有效率? 

SQL Server 存储过程的分页方案比拼 

]]></description>
			<content:encoded><![CDATA[<p>排序</p>
<ul>
<li>客户端PostBack。</li>
<li>在Sorting事件中，取得排序的列及排序方向。</li>
<li>调用DataSource的排序方法。</li>
<li>重新DataBind</li>
</ul>
<p>分页</p>
<ul>
<li>Gridview读取全部的数据源数据。</li>
<li>在PageIndexChanging事件中，取得要前往的页编号(e.NewPageIndex)</li>
<li>数据绑定前，设置PageIndex属性，实现分页。</li>
</ul>
<p>也就是说，分页完全是在ASP.NET中进行的，对于大量数据集就会有性能问题。<br />
解：</p>
<ul>
<li>
<a href="http://msdn.microsoft.com/en-us/library/tx1c9c2f(VS.71).aspx">Paging Through a Query Result</a></li>
<li>
<a href="http://forums.microsoft.com/MSDN-CHT/ShowPost.aspx?PostID=2880854&#038;SiteID=14">回覆：GridView分頁/排序 重取資料 怎樣才有效率? </a></li>
<li>
<a href="http://blog.csdn.net/lihonggen0/archive/2004/09/14/103511.aspx">SQL Server 存储过程的分页方案比拼</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/07/09/gridview%e6%8e%92%e5%ba%8f%e5%92%8c%e5%88%86%e9%a1%b5%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%9c%ba%e5%88%b6/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Config VirtualBox with Host Interface Networking (HIF)</title>
		<link>http://blog.charliezhu.com/2008/07/05/config-virtualbox-with-host-interface-networking-hif/</link>
		<comments>http://blog.charliezhu.com/2008/07/05/config-virtualbox-with-host-interface-networking-hif/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 12:05:22 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Engineer]]></category>

		<category><![CDATA[Network]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/?p=219</guid>
		<description><![CDATA[Diagram as the note.

]]></description>
			<content:encoded><![CDATA[<p>Diagram as the note.</p>
<p><a href='http://blog.charliezhu.com/wp-content/uploads/2008/07/virtual-box.png'><img src="http://blog.charliezhu.com/wp-content/uploads/2008/07/virtual-box.png" alt="Config VirtualBox with Host Interface Networking (HIF) " title="virtual-box" width="500" height="209" class="alignnone size-full wp-image-220" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/07/05/config-virtualbox-with-host-interface-networking-hif/feed/</wfw:commentRss>
		</item>
		<item>
		<title>党委、政府PK不过黑恶社会？（转载自人民网）</title>
		<link>http://blog.charliezhu.com/2008/07/05/%e5%85%9a%e5%a7%94%e3%80%81%e6%94%bf%e5%ba%9cpk%e4%b8%8d%e8%bf%87%e9%bb%91%e6%81%b6%e7%a4%be%e4%bc%9a%ef%bc%9f%ef%bc%88%e8%bd%ac%e8%bd%bd%e8%87%aa%e4%ba%ba%e6%b0%91%e7%bd%91%ef%bc%89/</link>
		<comments>http://blog.charliezhu.com/2008/07/05/%e5%85%9a%e5%a7%94%e3%80%81%e6%94%bf%e5%ba%9cpk%e4%b8%8d%e8%bf%87%e9%bb%91%e6%81%b6%e7%a4%be%e4%bc%9a%ef%bc%9f%ef%bc%88%e8%bd%ac%e8%bd%bd%e8%87%aa%e4%ba%ba%e6%b0%91%e7%bd%91%ef%bc%89/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 01:28:01 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/?p=218</guid>
		<description><![CDATA[人民网是老胡最爱上的网，能登这种文章不容易。早晚要删，留个底子。
http://leaders.people.com.cn/GB/7468985.html
党委、政府PK不过黑恶社会？
2008年07月04日09:28  来源：人民网
 【字号 大 中 小】 	打印 	留言 	论坛 	网摘 	手机点评 	纠错
	E-mail推荐:  
　　6月28日下午，贵州省瓮安县城发生一起严重的围攻政府部门和打砸烧突发事件。一些人因对瓮安县公安局对该县一名女学生死因鉴定结果不满，聚集到县政府和县公安局，并点火焚烧多间办公室和一些车辆。贵州省委书记、省人大常委会主任石宗源给“6.28”事件定性为“是黑恶势力人员直接插手参与的，公然向我党委、政府挑衅的群体性事件。”但他也说“6.28”事件何以由一起单纯的民事案件酿成一起严重的打、砸、抢、烧群体性事件，也是由于诸如当地一些社会矛盾长期积累，而没有得到及时有效的解决而造成的。他也列举了这些深层次的矛盾。
　　由“6.28”事件我们可以这样的看：每次发生大规模的群体事件，不管是什么原因引起，官方的结论都是千篇一律——都不是政府的错！就石宗源给“6.28”事件下的定性结论来看也是逻辑混乱：黑恶社会凭什么挑衅政府、挑衅党委？老百姓凭什么或为什么跟着黑恶社会走而不跟着政府走？什么是黑恶社会？和党委政府作对的那是什么样的黑恶社会？有直接与政府作对的黑恶社会吗？哪一个黑恶社会不是积极主动的与政府官员勾结，拉政府官员做靠山、做保护伞而能黑、能恶的？！难道堂堂伟光大的执政党的半个多世纪的国民教化，还抵不住区区几个黑恶社会的混混的煽动有力度？唯一可解释的就是那瓮安县党委、政府黑了、恶了！否则的话就是瓮安县的老百姓黑白不分。
　　当然，黑恶社会组织的本质一定是反党、反政府、反法律的。然而，政府和党委也是由官员的个体组成的，在某种意上说与党委或和政府的一把手勾结起来和与党委、政府勾结起来的区别不是很本质。有地方党委、政府其实就是党委和政府的化身。有了党委和政府的一把手做保护伞，其实与有党委、政府撑腰而护黑、护恶没什么区别。有的时候一个地方的党政一把手黑了恶了与那里的政府黑了、恶了也没什么大区别。
　　就“6.28”的性质来讲，我不怎么同意石宗源的说法。与其说这个说法有假借黑恶社会公然挑衅政府的大帽子而为政府党委执政的无能遮羞之嫌，还不如说就是老百姓不信任政府的心态已经发展到了很严重的程度了更贴切。话又说回来，难道党委、政府不容挑衅吗？挑衅党委又犯了那条国法？黑恶社会也好，老百姓也罢，这些人又不是中共党员，挑衅党委又何罪之有？难道西方国家的反对党都是黑恶社会不成？
　　政府或执政者在面对针对政府的大规模群体事件时，不能总是说与政府作对就怎么样的恶劣或十恶不赦。中国由于封建文化的作祟，在执政者的心目中凡是反对官府的或反对政府的都是刁民。
　　现在——为什么一些黑恶社会分子就能煽动或挑动上万群众包围县政府？过去——老百姓为什么拼死也要保护中共的干部？这——才是值得执政者深思的。
　　如果执政者只是一味的要严打那些打砸烧的人，或以严厉的打击这些打砸烧的行为而吓唬或恫吓、镇压民众而达到使得民众对政府或官员敬畏有加的目的，也就是采用杀鸡吓猴的惯用做法，我想只能是越来越不灵光。反右、文革、天安门事件以及最近的周老虎这些群体事件又哪一件不是政府对不住老百姓的？哪一个不是时隔很长时间执政者才期期艾艾的认错？社会或老百姓付出的代价又是何等的大？可以说在中国社会古往今来没有哪次群体事件是错在老百姓的。屈死不告官的老话就是真实的写照。
　　不要动不动就拿与政府作对说事。与政府作对在某种意义上说也是公民社会的正当权利的一种表现形式。处处迎合政府那不是公民社会，那是封建专制社会才会有的顺民规范。当然以打砸烧的方式与政府作对那是任何社会都不允许的违法犯罪行为。但是，官员们的胡作非为，也是老百姓们冲动或不理智的根源。官员平日里又是怎样粗暴的不理性的对待老百姓的？这才是值得执政者在群体事件发生时发生后要深思不已的。否则的话，不论执政者怎样的以手中的话语权或法律来镇压群体事件，只能是扬汤止沸或抱薪救火。
　　当公民与政府发生矛盾冲突时，首先是要政府深刻反思自己的执政行为，而不是抓住群体事件中的某些违法的东东抹黑整个群体事件与老百姓的正当诉求，为自己的错误开拓，甚至倒打一耙。就像美国炸了中国驻前南大使馆后，学生们围住美国驻中国使领馆，这样的游行又何尝事先报公安机关批准过？公安机关又何尝镇压过？
　　法律不能搞机会主义、实用主义。政府不能看见与自己一致的群体事件就以胡萝卜相待，看见与自己不一致的群体事件就大棒子伺候。法律不是捏糖人儿。
　　在中国每一个群体事件的发生都不是容易的事情。中国人对待政府有天生的惧怕心理。如果不到万不得已，不到死活一个价的时候，断不会揭竿而起。正所谓官逼民反、逼上梁山。
　　至于“6.28”事件是不是逼上梁山，是不是真的逼上梁山，还是伪的逼上梁山，不管是真的、还是伪的逼上梁山，群体老百姓只要采取了或有了上梁山的做法或心态，都是执政者的失败！（东北大虫）
　　本文仅代表作者个人意见，不代表人民网观点。如需转载，请与作者本人联系。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://politics.people.com.cn/GB/8198/125402/index.html">人民网是老胡最爱上的网</a>，能登这种文章不容易。早晚要删，留个底子。<br />
http://leaders.people.com.cn/GB/7468985.html<br />
党委、政府PK不过黑恶社会？</p>
<p>2008年07月04日09:28  来源：人民网<br />
 【字号 大 中 小】 	打印 	留言 	论坛 	网摘 	手机点评 	纠错<br />
	E-mail推荐:  </p>
<p>　　6月28日下午，贵州省瓮安县城发生一起严重的围攻政府部门和打砸烧突发事件。一些人因对瓮安县公安局对该县一名女学生死因鉴定结果不满，聚集到县政府和县公安局，并点火焚烧多间办公室和一些车辆。贵州省委书记、省人大常委会主任石宗源给“6.28”事件定性为“是黑恶势力人员直接插手参与的，公然向我党委、政府挑衅的群体性事件。”但他也说“6.28”事件何以由一起单纯的民事案件酿成一起严重的打、砸、抢、烧群体性事件，也是由于诸如当地一些社会矛盾长期积累，而没有得到及时有效的解决而造成的。他也列举了这些深层次的矛盾。</p>
<p>　　由“6.28”事件我们可以这样的看：每次发生大规模的群体事件，不管是什么原因引起，官方的结论都是千篇一律——都不是政府的错！就石宗源给“6.28”事件下的定性结论来看也是逻辑混乱：黑恶社会凭什么挑衅政府、挑衅党委？老百姓凭什么或为什么跟着黑恶社会走而不跟着政府走？什么是黑恶社会？和党委政府作对的那是什么样的黑恶社会？有直接与政府作对的黑恶社会吗？哪一个黑恶社会不是积极主动的与政府官员勾结，拉政府官员做靠山、做保护伞而能黑、能恶的？！难道堂堂伟光大的执政党的半个多世纪的国民教化，还抵不住区区几个黑恶社会的混混的煽动有力度？唯一可解释的就是那瓮安县党委、政府黑了、恶了！否则的话就是瓮安县的老百姓黑白不分。</p>
<p>　　当然，黑恶社会组织的本质一定是反党、反政府、反法律的。然而，政府和党委也是由官员的个体组成的，在某种意上说与党委或和政府的一把手勾结起来和与党委、政府勾结起来的区别不是很本质。有地方党委、政府其实就是党委和政府的化身。有了党委和政府的一把手做保护伞，其实与有党委、政府撑腰而护黑、护恶没什么区别。有的时候一个地方的党政一把手黑了恶了与那里的政府黑了、恶了也没什么大区别。</p>
<p>　　就“6.28”的性质来讲，我不怎么同意石宗源的说法。与其说这个说法有假借黑恶社会公然挑衅政府的大帽子而为政府党委执政的无能遮羞之嫌，还不如说就是老百姓不信任政府的心态已经发展到了很严重的程度了更贴切。话又说回来，难道党委、政府不容挑衅吗？挑衅党委又犯了那条国法？黑恶社会也好，老百姓也罢，这些人又不是中共党员，挑衅党委又何罪之有？难道西方国家的反对党都是黑恶社会不成？</p>
<p>　　政府或执政者在面对针对政府的大规模群体事件时，不能总是说与政府作对就怎么样的恶劣或十恶不赦。中国由于封建文化的作祟，在执政者的心目中凡是反对官府的或反对政府的都是刁民。</p>
<p>　　现在——为什么一些黑恶社会分子就能煽动或挑动上万群众包围县政府？过去——老百姓为什么拼死也要保护中共的干部？这——才是值得执政者深思的。</p>
<p>　　如果执政者只是一味的要严打那些打砸烧的人，或以严厉的打击这些打砸烧的行为而吓唬或恫吓、镇压民众而达到使得民众对政府或官员敬畏有加的目的，也就是采用杀鸡吓猴的惯用做法，我想只能是越来越不灵光。反右、文革、天安门事件以及最近的周老虎这些群体事件又哪一件不是政府对不住老百姓的？哪一个不是时隔很长时间执政者才期期艾艾的认错？社会或老百姓付出的代价又是何等的大？可以说在中国社会古往今来没有哪次群体事件是错在老百姓的。屈死不告官的老话就是真实的写照。</p>
<p>　　不要动不动就拿与政府作对说事。与政府作对在某种意义上说也是公民社会的正当权利的一种表现形式。处处迎合政府那不是公民社会，那是封建专制社会才会有的顺民规范。当然以打砸烧的方式与政府作对那是任何社会都不允许的违法犯罪行为。但是，官员们的胡作非为，也是老百姓们冲动或不理智的根源。官员平日里又是怎样粗暴的不理性的对待老百姓的？这才是值得执政者在群体事件发生时发生后要深思不已的。否则的话，不论执政者怎样的以手中的话语权或法律来镇压群体事件，只能是扬汤止沸或抱薪救火。</p>
<p>　　当公民与政府发生矛盾冲突时，首先是要政府深刻反思自己的执政行为，而不是抓住群体事件中的某些违法的东东抹黑整个群体事件与老百姓的正当诉求，为自己的错误开拓，甚至倒打一耙。就像美国炸了中国驻前南大使馆后，学生们围住美国驻中国使领馆，这样的游行又何尝事先报公安机关批准过？公安机关又何尝镇压过？</p>
<p>　　法律不能搞机会主义、实用主义。政府不能看见与自己一致的群体事件就以胡萝卜相待，看见与自己不一致的群体事件就大棒子伺候。法律不是捏糖人儿。</p>
<p>　　在中国每一个群体事件的发生都不是容易的事情。中国人对待政府有天生的惧怕心理。如果不到万不得已，不到死活一个价的时候，断不会揭竿而起。正所谓官逼民反、逼上梁山。</p>
<p>　　至于“6.28”事件是不是逼上梁山，是不是真的逼上梁山，还是伪的逼上梁山，不管是真的、还是伪的逼上梁山，群体老百姓只要采取了或有了上梁山的做法或心态，都是执政者的失败！（东北大虫）</p>
<p>　　本文仅代表作者个人意见，不代表人民网观点。如需转载，请与作者本人联系。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/07/05/%e5%85%9a%e5%a7%94%e3%80%81%e6%94%bf%e5%ba%9cpk%e4%b8%8d%e8%bf%87%e9%bb%91%e6%81%b6%e7%a4%be%e4%bc%9a%ef%bc%9f%ef%bc%88%e8%bd%ac%e8%bd%bd%e8%87%aa%e4%ba%ba%e6%b0%91%e7%bd%91%ef%bc%89/feed/</wfw:commentRss>
		</item>
		<item>
		<title>在线化学结构式图片生成服务</title>
		<link>http://blog.charliezhu.com/2008/06/16/%e5%9c%a8%e7%ba%bf%e5%8c%96%e5%ad%a6%e7%bb%93%e6%9e%84%e5%bc%8f%e5%9b%be%e7%89%87%e7%94%9f%e6%88%90%e6%9c%8d%e5%8a%a1/</link>
		<comments>http://blog.charliezhu.com/2008/06/16/%e5%9c%a8%e7%ba%bf%e5%8c%96%e5%ad%a6%e7%bb%93%e6%9e%84%e5%bc%8f%e5%9b%be%e7%89%87%e7%94%9f%e6%88%90%e6%9c%8d%e5%8a%a1/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 14:49:45 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[chemoinformatics]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/2008/06/16/216/</guid>
		<description><![CDATA[利用一些网站提供的资源，可以在线生成结构式图片。其中比较突出的是DayLight提供的服务，在另外一篇 结构式图片生成服务, DayLight SMI2GIF 中做过详细介绍。DayLight的服务传入的结构式参数是SMILES，而且有很丰富的参数以调节输出效果。
NIST是美国国家标准与技术局(National Institute of Standards and Technology)，NIST WebBook 是老牌的免费化合物信息数据库，提供丰富的化合物物理、化学性质数据。其化合物的编码方式，其实是CAS号码。把CAS号码转换成数字，就可以很容易得到结构式图片的地址了。
http://webbook.nist.gov/cgi/cbook.cgi?Struct=C490119

NIST WebBook的数据量并不是很大，只有几万条记录。不知道是不是因为太老的原因（05年就没再更新过），其中还有错误数据。至少到这篇发布的时候，上面的例子仍就是一个错误结构。我写Email报告了这个问题，不知道啥时候能修正。
NLM是(National Library of Medicine) 它提供的ChemIDPlus数据库 也是用CAS号码进行编码的。数据量要比NIST大很多，结构式输出的质量也更好。
http://chem.sis.nlm.nih.gov/chemidplus/RenderImage?maxscale=30&#38;width=200&#38;height=200&#38;superlistid=000490119


对于化合物的标记，SMILES是公开的标准，直观还原结构式信息，值得应用；CAS不公开不免费，但也成为了既成的行业标准。现在能与CAS相提并论的，我想就是NCBI的PubChem 数据库了。NCBI是美国国立生物技术信息中心(The National Center for Biotechnology Information。在在线数据库的范畴内来说，PubChem的Compound ID(cid)基本上是必被引用的。所以也勉强将它用cid作结构参数的图片生成接口纳入进来。这个接口背后也有很多参数用以调节输出。
http://pubchem.ncbi.nlm.nih.gov/image/imagefly.cgi?cid=10273&#38;width=400&#38;height=400

有一篇很好的文章，Thirty-Two Free Chemstry Databases（32个免费化学数据库） ，仔细读过的话也许还会有更多的发现。
]]></description>
			<content:encoded><![CDATA[<p id="qdvy">利用一些网站提供的资源，可以在线生成结构式图片。其中比较突出的是DayLight提供的服务，在另外一篇 <a id="k9he0" href="http://blog.charliezhu.com/2008/05/16/%e7%bb%93%e6%9e%84%e5%bc%8f%e5%9b%be%e7%89%87%e7%94%9f%e6%88%90%e6%9c%8d%e5%8a%a1-daylight-smi2gif/" rel="bookmark">结构式图片生成服务, DayLight SMI2GIF</a> 中做过详细介绍。DayLight的服务传入的结构式参数是SMILES，而且有很丰富的参数以调节输出效果。</p>
<p id="qdvy">NIST是美国国家标准与技术局(National Institute of Standards and Technology)，<a title="NIST WebBook" href="http://webbook.nist.gov/chemistry" id="iqhf">NIST WebBook</a> 是老牌的免费化合物信息数据库，提供丰富的化合物物理、化学性质数据。其化合物的编码方式，其实是CAS号码。把CAS号码转换成数字，就可以很容易得到结构式图片的地址了。</p>
<pre>http://webbook.nist.gov/cgi/cbook.cgi?Struct=C490119</pre>
<p><img src="http://webbook.nist.gov/cgi/cbook.cgi?Struct=C490119"></p>
<p>NIST WebBook的数据量并不是很大，只有几万条记录。不知道是不是因为太老的原因（05年就没再更新过），其中还有错误数据。至少到这篇发布的时候，上面的例子仍就是一个错误结构。我写Email报告了这个问题，不知道啥时候能修正。</p>
<p id="qdvy3">NLM是(National Library of Medicine) 它提供的<a title="ChemIDPlus数据库" href="http://chem.sis.nlm.nih.gov/chemidplus/" id="hpk8">ChemIDPlus数据库</a> 也是用CAS号码进行编码的。数据量要比NIST大很多，结构式输出的质量也更好。</p>
<pre>http://chem.sis.nlm.nih.gov/chemidplus/RenderImage?maxscale=30&amp;width=200&amp;height=200&amp;superlistid=000490119
</pre>
<p><img src="http://chem.sis.nlm.nih.gov/chemidplus/RenderImage?maxscale=30&#038;width=200&#038;height=200&#038;superlistid=000490119"></div>
<p id="zjt8">对于化合物的标记，SMILES是公开的标准，直观还原结构式信息，值得应用；CAS不公开不免费，但也成为了既成的行业标准。现在能与CAS相提并论的，我想就是NCBI的<a title="PubChem" href="http://www.ncbi.nlm.nih.gov/sites/gquery" id="vmcq">PubChem</a> 数据库了。NCBI是美国国立生物技术信息中心(The National Center for Biotechnology Information。在在线数据库的范畴内来说</span>，PubChem的Compound ID(cid)基本上是必被引用的。所以也勉强将它用cid作结构参数的图片生成接口纳入进来。这个接口背后也有很多参数用以调节输出。</p>
<pre>http://pubchem.ncbi.nlm.nih.gov/image/imagefly.cgi?cid=10273&amp;width=400&amp;height=400</pre>
<p><img src="http://pubchem.ncbi.nlm.nih.gov/image/imagefly.cgi?cid=10273&#038;width=400&#038;height=400"></p>
<p id="sss4">有一篇很好的文章，<a id="lov9" href="http://depth-first.com/articles/2007/01/24/thirty-two-free-chemistry-databases">Thirty-Two Free Chemstry Databases（32个免费化学数据库）</a> ，仔细读过的话也许还会有更多的发现。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/06/16/%e5%9c%a8%e7%ba%bf%e5%8c%96%e5%ad%a6%e7%bb%93%e6%9e%84%e5%bc%8f%e5%9b%be%e7%89%87%e7%94%9f%e6%88%90%e6%9c%8d%e5%8a%a1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>下载Google App Engine站点的代码</title>
		<link>http://blog.charliezhu.com/2008/06/15/%e4%b8%8b%e8%bd%bdgoogle-app-engine%e7%ab%99%e7%82%b9%e7%9a%84%e4%bb%a3%e7%a0%81/</link>
		<comments>http://blog.charliezhu.com/2008/06/15/%e4%b8%8b%e8%bd%bdgoogle-app-engine%e7%ab%99%e7%82%b9%e7%9a%84%e4%bb%a3%e7%a0%81/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 16:48:52 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/?p=215</guid>
		<description><![CDATA[GAE到目前为止并没有提供从站点上下载或备份代码的功能，本地的开发代码一旦丢失或损坏，就会有无法恢复的麻烦。所以本地代码用SVN之类的管理工具管理起来是很必要的。
Manatlan编写了一个工具，可以将整个GAE站点的代码打成zip包下载。是一个很简单的过程


在根目录下根据manatlan的代码建立zipme.py。

在app.yaml中加入handles: - url: /zipme  script: zipme.py。

访问youapp.appspot.com/zipme即可。

这个程序会通过google的身份认证来判断访问者是不是管理员。而且对于各个版本的代码，也可以分别下载了。
不过不能直接访问代码的确是GAE的明显缺陷。


代码可能损坏或丢失而无法恢复
使得合作开发模式也并不灵光，开发者之间需要其他渠道交换和维护代码。
代码的版本和发布的版本不好对应。

所以相信这个问题很快会解决掉，至少能和Google Code结合在一起，代码管理和发布管理的功能集成起来。
]]></description>
			<content:encoded><![CDATA[<p>GAE到目前为止并没有提供从站点上下载或备份代码的功能，本地的开发代码一旦丢失或损坏，就会有无法恢复的麻烦。所以本地代码用SVN之类的管理工具管理起来是很必要的。<br />
<a href="http://manatlan.com/blog/zipme___download_sources_of_your_gae_website__as_a_zip_file">Manatlan编写了一个工具</a>，可以将整个GAE站点的代码打成zip包下载。是一个很简单的过程</p>
<ul>
<ol>
在根目录下根据manatlan的代码建立zipme.py。</ol>
<ol>
在app.yaml中加入handles: - url: /zipme  script: zipme.py。</ol>
<ol>
访问youapp.appspot.com/zipme即可。</ol>
</ul>
<p>这个程序会通过google的身份认证来判断访问者是不是管理员。而且对于各个版本的代码，也可以分别下载了。<br />
不过不能直接访问代码的确是GAE的明显缺陷。
<ul>
<li>
代码可能损坏或丢失而无法恢复</li>
<li>使得合作开发模式也并不灵光，开发者之间需要其他渠道交换和维护代码。</li>
<li>代码的版本和发布的版本不好对应。</li>
</ul>
<p>所以相信这个问题很快会解决掉，至少能和Google Code结合在一起，代码管理和发布管理的功能集成起来。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/06/15/%e4%b8%8b%e8%bd%bdgoogle-app-engine%e7%ab%99%e7%82%b9%e7%9a%84%e4%bb%a3%e7%a0%81/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Firefox加载Java Applet后死翘的问题</title>
		<link>http://blog.charliezhu.com/2008/06/14/firefox%e5%8a%a0%e8%bd%bdjava-applet%e5%90%8e%e6%ad%bb%e7%bf%98%e7%9a%84%e9%97%ae%e9%a2%98/</link>
		<comments>http://blog.charliezhu.com/2008/06/14/firefox%e5%8a%a0%e8%bd%bdjava-applet%e5%90%8e%e6%ad%bb%e7%bf%98%e7%9a%84%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 05:22:45 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/?p=212</guid>
		<description><![CDATA[现象就是加载了带Java Applet的网页后，直接死翘或者在关闭页面的时候死翘，整个Firefox失去响应，只能强制结束进程。
真好吃: JVM卡死firefox提出了正解。
我的firefox有时候不能正常现实applet
反映就是卡死firefox
但是有一个奇怪的现象就是 如果运行本地的网页applet后
在不关闭firefox的前提下 去看含有applet的网页没有任何问题

我百思不得其解 最后分析出了一个大概的原因
jvm大概无法获取firefox的代理服务器设置
所以就卡死掉了

我在java 控制面板中代理服务器设置选择直接连接就解决问题了

如图设置，搞定

]]></description>
			<content:encoded><![CDATA[<p>现象就是加载了带Java Applet的网页后，直接死翘或者在关闭页面的时候死翘，整个Firefox失去响应，只能强制结束进程。<br />
<A href="http://www.mytbc.cn/farmer1992/2008/03/jvmfirefox.html" target=_blank>真好吃: JVM卡死firefox</A>提出了正解。</p>
<pre>我的firefox有时候不能正常现实applet
反映就是卡死firefox
但是有一个奇怪的现象就是 如果运行本地的网页applet后
在不关闭firefox的前提下 去看含有applet的网页没有任何问题

我百思不得其解 最后分析出了一个大概的原因
jvm大概无法获取firefox的代理服务器设置
所以就卡死掉了

我在java 控制面板中代理服务器设置选择直接连接就解决问题了
</pre>
<p>如图设置，搞定<br />
<a href='http://blog.charliezhu.com/wp-content/uploads/2008/06/firefox_java.png'><img src="http://blog.charliezhu.com/wp-content/uploads/2008/06/firefox_java-300x267.png" alt="JVM connection setting" title="firefox_java" width="300" height="267" class="alignnone size-medium wp-image-213" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/06/14/firefox%e5%8a%a0%e8%bd%bdjava-applet%e5%90%8e%e6%ad%bb%e7%bf%98%e7%9a%84%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		</item>
		<item>
		<title>结构式图片生成服务, DayLight SMI2GIF</title>
		<link>http://blog.charliezhu.com/2008/05/16/%e7%bb%93%e6%9e%84%e5%bc%8f%e5%9b%be%e7%89%87%e7%94%9f%e6%88%90%e6%9c%8d%e5%8a%a1-daylight-smi2gif/</link>
		<comments>http://blog.charliezhu.com/2008/05/16/%e7%bb%93%e6%9e%84%e5%bc%8f%e5%9b%be%e7%89%87%e7%94%9f%e6%88%90%e6%9c%8d%e5%8a%a1-daylight-smi2gif/#comments</comments>
		<pubDate>Fri, 16 May 2008 00:06:19 +0000</pubDate>
		<dc:creator>charlie</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[chemoinformatics]]></category>

		<guid isPermaLink="false">http://blog.charliezhu.com/2008/05/16/211/</guid>
		<description><![CDATA[
SMILES的发明者，DayLight公司提供了一个非常实用的Web Service工具，可以在线通过化合物的SMILES编码，生成它的结构式图片。这个工具就是SMI2GIF 。它是基于DayLight公司的产品&#8221;HTTP Toolkit&#8220;建立的。我们可以购买这个产品自己建立Web Service，也可以直接在线使用DayLight提供的服务。


    下面的图片是一个最简单的在线应用。

    

        图片的HTML代码是

        &#60;img src="http://www.daylight.com/dayhttp/smi2gif?smiles=Oc1ccccc1"&#62;&#60;/img&#62;
    

        DayLight给出了一个参考文档，对这个接口的调用参数和功能，讲述得非常详细。下面就把简单的，我也懂的参数作一点举例介绍。
    

        图片的高度和宽度，线条的粗细，输出的格式(PNG/GIF)

  [...]]]></description>
			<content:encoded><![CDATA[<p id="c03f0">
SMILES的发明者，<a title="DayLight公司" href="http://www.daylight.com" id="gtik">DayLight公司</a>提供了一个非常实用的Web Service工具，可以在线通过化合物的SMILES编码，生成它的结构式图片。这个工具就是<a title="SMI2GIF" href="http://www.daylight.com/dayhttp/smi2gif">SMI2GIF</a> 。它是基于DayLight公司的产品&#8221;<a title="HTTP Toolkit" href="http://www.daylight.com/dayhtml/doc/prog/prog.http.html">HTTP Toolkit</a>&#8220;建立的。我们可以购买这个产品自己建立Web Service，也可以直接在线使用DayLight提供的服务。
</p>
<p id="c03f0">
    下面的图片是一个最简单的在线应用。<br id="uz-v0">
</p>
<p>    <img src="http://www.daylight.com/dayhttp/smi2gif?smiles=Oc1ccccc1"></p>
<p id="qd2.0">
        图片的HTML代码是</p>
<pre id="topi0">
        &lt;img src="http://www.daylight.com/dayhttp/smi2gif?smiles=Oc1ccccc1"&gt;&lt;/img&gt;
    </pre>
<p id="qd2.1">
        DayLight给出了一个<a title="参考文档" href="http://www.daylight.com/dayhttp/smi2gif?info">参考文档</a>，对这个接口的调用参数和功能，讲述得非常详细。下面就把简单的，我也懂的参数作一点举例介绍。<br id="a:3w0">
    </p>
<h3 id="qd2.1">
        图片的高度和宽度，线条的粗细，输出的格式(PNG/GIF)</h3>
<pre id="l6zd0">
        http://www.daylight.com/dayhttp/smi2gif?width=100&amp;height=100&amp;smiles=O%3DC1CCCCC1&amp;Linewidth=thick&amp;output=PNG</pre>
<p>    <img src="http://www.daylight.com/dayhttp/smi2gif?width=100&#038;height=100&#038;smiles=O%3DC1CCCCC1&#038;Linewidth=thick&#038;output=PNG" /></p>
<h3 id="dag41">
        色调搭配</h3>
<p>提供了几种基本色调</p>
<p>    <tt id="kiy21"><a id="kiy22" href="http://www.daylight.com/dayhttp/smi2gif?colormode=COB&amp;smiles=O%3DC1CCCCC1"><br />
        COB</a></tt> - color on black<br />
    <tt id="kiy24"><a id="kiy25" href="http://www.daylight.com/dayhttp/smi2gif?colormode=COW&amp;smiles=O%3DC1CCCCC1"><br />
        COW</a></tt> - color on white<br />
    <tt id="kiy27"><a id="kiy28" href="http://www.daylight.com/dayhttp/smi2gif?colormode=COP&amp;smiles=O%3DC1CCCCC1"><br />
        COP</a></tt> - color on paper<br />
    <tt id="kiy210"><a id="kiy211" href="http://www.daylight.com/dayhttp/smi2gif?colormode=BOW&amp;smiles=O%3DC1CCCCC1"><br />
        BOW</a></tt> - black on white<br />
    <tt id="kiy213"><a id="kiy214" href="http://www.daylight.com/dayhttp/smi2gif?colormode=BOP&amp;smiles=O%3DC1CCCCC1"><br />
        BOP</a></tt> - black on paper<br />
    <tt id="kiy216"><a id="kiy217" href="http://www.daylight.com/dayhttp/smi2gif?colormode=WOB&amp;smiles=O%3DC1CCCCC1"><br />
        WOB</a></tt> - white on black<br />
    <tt id="kiy219"><a id="kiy220" href="http://www.daylight.com/dayhttp/smi2gif?colormode=WOP&amp;smiles=O%3DC1CCCCC1"><br />
        WOP</a></tt> - white on paper</p>
<pre id="zk1g0">
        http://www.daylight.com/dayhttp/smi2gif?smiles=O%3DC1CCCCC1&amp;colormode=COW
    </pre>
<p>    <img src="http://www.daylight.com/dayhttp/smi2gif?smiles=O%3DC1CCCCC1&#038;colormode=COW" /></p>
<p>对原子单独指定颜色</p>
<pre id="oif:1">
        http://www.daylight.com/dayhttp/smi2gif?numcolors=10&amp;tdt=%24SMI%3COCCCCCCCCCC%3EALAB%3C0.0%2C.1%2C.2%2C.3%2C.4%2C.5%2C.6%2C.7%2C.8%2C.9%2C1.0%3E%7C
    </pre>
<p>    <img src="http://www.daylight.com/dayhttp/smi2gif?numcolors=10&#038;tdt=%24SMI%3COCCCCCCCCCC%3EALAB%3C0.0%2C.1%2C.2%2C.3%2C.4%2C.5%2C.6%2C.7%2C.8%2C.9%2C1.0%3E%7C" /></p>
<h3 id="i3ho0">
        是否显示手性结构</h3>
<pre id="pqu30">
        http://www.daylight.com/dayhttp/smi2gif?hide_chi_h=false&amp;smiles=C[C%40%40H](N)C(%3DO)O
    </pre>
<p>    <img src="http://www.daylight.com/dayhttp/smi2gif?hide_chi_h=false&#038;smiles=C[C%40%40H](N)C(%3DO)O" /></p>
<h3 id="i3ho1">
        突出显示子结构</h3>
<p>    这样的功能一般都用在子结构检索之后的结果输出中。</p>
<pre id="i3ho3">
        http://www.daylight.com/dayhttp/smi2gif?smiles=O%3DC1CCCCC1&amp;highlight=O%3DC
    </pre>
<p>    <img src="http://www.daylight.com/dayhttp/smi2gif?smiles=O%3DC1CCCCC1&#038;highlight=O%3DC" /></p>
<h3 id="o88r0">
        URL编码</h3>
<p>对查询URL中的SMILES字符串，应该用URL-Encode(<a id="vbyt0" href="http://www.ietf.org/rfc/rfc1738.txt">RFC1738</a>)进行编码。同时，SMI2GIF也支持省略掉百分号的简洁编码方式，比如 (O=C1CCCCC1)可直接表示成 4f3d4331434343434331</p>
<h3 id="o88r1">
        参数缩写</h3>
<p>    SMI2GIF的各个参数，都可以按照下面的映射进行缩写<br id="uoh52"></p>
<table id="uoh54" border="1" cellpadding="4">
<tbody id="uoh55">
<tr id="uoh56">
<td id="uoh57">
                    <b id="uoh58">Option</b>
                </td>
<td id="uoh59">
                    <b id="uoh510">Abbreviation</b>
                </td>
</tr>
<tr id="uoh511">
<td id="uoh512">
                    colormode
                </td>
<td id="uoh513">
                    c
                </td>
</tr>
<tr id="uoh514">
<td id="uoh515">
                    fromto
                </td>
<td id="uoh516">
                    f
                </td>
</tr>
<tr id="uoh517">
<td id="uoh518">
                    height
                </td>
<td id="uoh519">
                    he
                </td>
</tr>
<tr id="uoh520">
<td id="uoh521">
                    hide_chi_h
                </td>
<td id="uoh522">
                    hi
                </td>
</tr>
<tr id="uoh523">
<td id="uoh524">
                    hlen_pct
                </td>
<td id="uoh525">
                    hl
                </td>
</tr>
<tr id="uoh526">
<td id="uoh527">
                    hydrogens
                </td>
<td id="uoh528">
                    hy
                </td>
</tr>
<tr id="uoh529">
<td id="uoh530">
                    numcolors
                </td>
<td id="uoh531">
                    linew
                </td>
</tr>
<tr id="uoh532">
<td id="uoh533">
                    linewidth
                </td>
<td id="uoh534">
                    n
                </td>
</tr>
<tr id="uoh535">
<td id="uoh536">
                    old_style
                </td>
<td id="uoh537">
                    ol
                </td>
</tr>
<tr id="uoh538">
<td id="uoh539">
                    orient
                </td>
<td id="uoh540">
                    or
                </td>
</tr>
<tr id="uoh541">
<td id="uoh542">
                    output
                </td>
<td id="uoh543">
                    ou
                </td>
</tr>
<tr id="uoh544">
<td id="uoh545">
                    reaction
                </td>
<td id="uoh546">
                    r
                </td>
</tr>
<tr id="uoh547">
<td id="uoh548">
                    scale
                </td>
<td id="uoh549">
                    sca
                </td>
</tr>
<tr id="uoh550">
<td id="uoh551">
                    schematic
                </td>
<td id="uoh552">
                    sch
                </td>
</tr>
<tr id="uoh553">
<td id="uoh554">
                    smiles
                </td>
<td id="uoh555">
                    smil
                </td>
</tr>
<tr id="uoh556">
<td id="uoh557">
                    smirks
                </td>
<td id="uoh558">
                    smir
                </td>
</tr>
<tr id="uoh559">
<td id="uoh560">
                    tdt
                </td>
<td id="uoh561">
                    t
                </td>
</tr>
<tr id="uoh562">
<td id="uoh563">
                    width
                </td>
<td id="uoh564">
                    w
                </td>
</tr>
<tr id="uoh565">
<td id="uoh566">
                    xsmiles
                </td>
<td id="uoh567">
                    x
                </td>
</tr>
</tbody>
</table>
<p id="hmhk0">
]]></content:encoded>
			<wfw:commentRss>http://blog.charliezhu.com/2008/05/16/%e7%bb%93%e6%9e%84%e5%bc%8f%e5%9b%be%e7%89%87%e7%94%9f%e6%88%90%e6%9c%8d%e5%8a%a1-daylight-smi2gif/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
