<?xml version="1.0" standalone="yes"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>清风的blog - 学习收藏</title><link>http://blog.careff.com/</link><description>优然探索 - </description><generator>RainbowSoft Studio Z-Blog 2.2 Prism Build 140101</generator><language>zh-CN</language><copyright>Copyright (C) 2008-2024 careff.com Inc.,All  Rights Reserved.                    雅虎统计      </copyright><pubDate>Tue, 09 Jun 2026 11:29:47 +0800</pubDate><item><title>markdown里面的css(模仿github)</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/500.html</link><pubDate>Mon, 26 Jun 2017 16:59:13 +0800</pubDate><guid>http://blog.careff.com/post/500.html</guid><description><![CDATA[<p>&nbsp;</p><p>@charset &quot;utf-8&quot;;</p><p>html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }</p><p>body{<br/>&nbsp;&nbsp;&nbsp; color:#000000;<br/>&nbsp;&nbsp;&nbsp; font-family:Georgia, Palatino, &#39;Palatino Linotype&#39;, Times, &#39;Times New Roman&#39;, serif;<br/>&nbsp;&nbsp;&nbsp; font-size:13px;<br/>&nbsp;&nbsp;&nbsp; padding:1em;<br/>&nbsp;&nbsp;&nbsp; margin:auto;<br/>&nbsp;&nbsp;&nbsp; max-width:42em;<br/>&nbsp;&nbsp;&nbsp; background:#fefefe;<br/>&nbsp;line-height:25px;<br/>}</p><p>h1, h2, h3, h4, h5, h6 {<br/>&nbsp;&nbsp;&nbsp; font-weight: bold;<br/>}</p><p>h1 {<br/>&nbsp;&nbsp;&nbsp; color: #0077BB;<br/>&nbsp;&nbsp;&nbsp; font-size: 28px;<br/>}</p><p>h2 {<br/>&nbsp;&nbsp;&nbsp; border-bottom: 1px solid #CCCCCC;<br/>&nbsp;&nbsp;&nbsp; color: #000000;<br/>&nbsp;&nbsp;&nbsp; font-size: 24px;<br/>&nbsp;padding-top:10px;padding-bottom:10px;<br/>}</p><p>h3 {<br/>&nbsp;&nbsp;&nbsp; border-bottom: 1px solid #CCCCCC;<br/>&nbsp;&nbsp;&nbsp; font-size: 18px;<br/>&nbsp;padding-top:8px;padding-bottom:8px;<br/>}</p><p>h4 {<br/>&nbsp;&nbsp;&nbsp; font-size: 16px;<br/>}</p><p>h5 {<br/>&nbsp;&nbsp;&nbsp; font-size: 14px;<br/>}</p><p>h6 {<br/>&nbsp;&nbsp;&nbsp; color: #777777;<br/>&nbsp;&nbsp;&nbsp; background-color: inherit;<br/>&nbsp;&nbsp;&nbsp; font-size: 14px;<br/>}</p><p>hr {<br/>&nbsp;&nbsp;&nbsp; height: 0.2em;<br/>&nbsp;&nbsp;&nbsp; border: 0;<br/>&nbsp;&nbsp;&nbsp; color: #CCCCCC;<br/>&nbsp;&nbsp;&nbsp; background-color: #CCCCCC;<br/>}</p><p>p, blockquote, ul, ol, dl, li, table, pre {<br/>&nbsp;&nbsp;&nbsp; margin: 5px 0;<br/>&nbsp;<br/>}</p><p>p{<br/>&nbsp;&nbsp;&nbsp; margin:1em 0;&nbsp; <br/>}</p><p>pre { <br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; border: 1px solid #CCCCCC;<br/>&nbsp;&nbsp;&nbsp; border-radius: 3px;<br/>&nbsp;&nbsp;&nbsp; overflow: auto;<br/>&nbsp;&nbsp;&nbsp; padding: 10px;<br/>&nbsp;padding-top:10px;padding-bottom:10px;<br/>&nbsp;background-color:#ff0000;<br/>&nbsp;background:#F2F3F1;<br/>}</p><p>pre code {<br/>&nbsp;&nbsp;&nbsp; background-color: #F8F8F8;<br/>&nbsp;&nbsp;&nbsp; border: none;&nbsp;&nbsp;&nbsp; <br/>&nbsp;<br/>}<br/>.md-fences {<br/>&nbsp;background-color: #dadada;<br/>&nbsp;padding-left: 0ch;<br/>&nbsp;padding-right: 0ch;<br/>&nbsp;padding:10px;<br/>}<br/>.md-fences {<br/>&nbsp;margin-left: 0em;<br/>&nbsp;margin-bottom: 0em;<br/>}<br/>code {<br/>&nbsp;&nbsp;&nbsp; font-family: Consolas, Monaco, Andale Mono, monospace;<br/>&nbsp;&nbsp;&nbsp; background-color:#F8F8F8;<br/>&nbsp;&nbsp;&nbsp; border: 1px solid #CCCCCC;<br/>&nbsp;&nbsp;&nbsp; border-radius: 3px;<br/>&nbsp;&nbsp;&nbsp; padding: 0 0.2em;<br/>&nbsp;&nbsp;&nbsp; line-height: 1;<br/>&nbsp; <br/>}</p><p>pre &gt; code {<br/>&nbsp;&nbsp;&nbsp; border: 0;<br/>&nbsp;&nbsp;&nbsp; margin: 0;<br/>&nbsp;&nbsp;&nbsp; padding: 0;<br/>}</p><p><br/>a{ color: #0645ad; text-decoration:none;}<br/>a:visited{ color: #0b0080; }<br/>a:hover{ color: #06e; }<br/>a:active{ color:#faa700; }<br/>a:focus{ outline: thin dotted; }<br/>a:hover, a:active{ outline: 0; }</p><p>::-moz-selection{background:rgba(255,255,0,0.3);color:#000}<br/>::selection{background:rgba(255,255,0,0.3);color:#000}</p><p>a::-moz-selection{background:rgba(255,255,0,0.3);color:#0645ad}<br/>a::selection{background:rgba(255,255,0,0.3);color:#0645ad}</p><p>blockquote{<br/>&nbsp;&nbsp;&nbsp; color:#111111;<br/>&nbsp;&nbsp;&nbsp; margin:0;<br/>&nbsp;padding:10px;<br/>&nbsp;&nbsp;&nbsp; padding-left: 10px;<br/>&nbsp;&nbsp;&nbsp; border-left: 10px #D6DBDF solid;<br/>&nbsp;background:#F2F3F1;<br/>&nbsp;line-height:20px;<br/>&nbsp; <br/>&nbsp;<br/>}</p><p>ul, ol { }<br/>li p:last-child { }<br/>dd { margin: 0 0 0 2em; }</p><p>img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; max-width:100%;}</p><p>.md-table-edit {<br/>&nbsp;background: #ededed;<br/>&nbsp;&nbsp;&nbsp; padding-top: 4px;<br/>}</p><p>table {<br/>&nbsp;width: 100%;<br/>&nbsp;font-size: 1.125rem;<br/>}<br/>table &gt; thead &gt; tr &gt; th,<br/>table &gt; thead &gt; tr &gt; td,<br/>table &gt; tbody &gt; tr &gt; th,<br/>table &gt; tbody &gt; tr &gt; td,<br/>table &gt; tfoot &gt; tr &gt; th,<br/>table &gt; tfoot &gt; tr &gt; td {<br/>&nbsp;padding: 12px;<br/>&nbsp;line-height: 1.2;<br/>&nbsp;vertical-align: top;<br/>&nbsp;border-top: 1px solid #333;<br/>}<br/>table &gt; thead &gt; tr &gt; th {<br/>&nbsp;vertical-align: bottom;<br/>&nbsp;border-bottom: 2px solid #333;<br/>}<br/>table &gt; caption + thead &gt; tr:first-child &gt; th,<br/>table &gt; caption + thead &gt; tr:first-child &gt; td,<br/>table &gt; colgroup + thead &gt; tr:first-child &gt; th,<br/>table &gt; colgroup + thead &gt; tr:first-child &gt; td,<br/>table &gt; thead:first-child &gt; tr:first-child &gt; th,<br/>table &gt; thead:first-child &gt; tr:first-child &gt; td {<br/>&nbsp;border-top: 0;<br/>}<br/>table &gt; tbody + tbody {<br/>&nbsp;border-top: 2px solid #333;<br/>}</p><p>@media only screen and (min-width: 480px) {<br/>&nbsp;&nbsp;&nbsp; body{font-size:14px;}<br/>}</p><p>@media only screen and (min-width: 768px) {<br/>&nbsp;&nbsp;&nbsp; body{font-size:16px;}<br/>}</p><p></p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/500.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=500</wfw:commentRss></item><item><title>国务院关于取消和下放一批行政审批项目的决定</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/384.html</link><pubDate>Mon, 17 Feb 2014 16:41:28 +0800</pubDate><guid>http://blog.careff.com/post/384.html</guid><description><![CDATA[<p>&nbsp;<strong style="color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; font-size: 14px; line-height: 24px; text-indent: 28px;">国务院关于取消和下放一批行政审批项目的决定</strong></p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;">国发〔2014〕5号</p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;">各省、自治区、直辖市人民政府，国务院各部委、各直属机构：</p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;">经研究论证，国务院决定，再取消和下放64项行政审批项目和18个子项。另建议取消和下放6项依据有关法律设立的行政审批项目，国务院将依照法定程序提请全国人民代表大会常务委员会修订相关法律规定。</p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;">各地区、各部门要抓紧做好取消和下放管理层级行政审批项目的落实和衔接工作，并切实加强事中事后监管。要继续大力推进行政审批制度改革，使简政放权成为持续的改革行动。要健全监督制约机制，加强对行政审批权运行的监督，不断提高政府管理科学化、规范化水平。</p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;">附件：国务院决定取消和下放管理层级的行政审批项目目录（64项，另有18个子项）</p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;"><strong>附件</strong></p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;"><strong>国务院决定取消和下放管理层级的</strong></p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;"><strong>行政审批项目目录</strong></p><p style="margin: 0px 0px 25px; padding: 0px; text-indent: 28px; font-size: 14px; color: rgb(43, 43, 43); font-family: simsun, arial, helvetica, clean, sans-serif; line-height: 24px;">（64项，另有18个子项）</p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/384.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=384</wfw:commentRss></item><item><title>迅雷离线下载</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/379.html</link><pubDate>Mon, 18 Nov 2013 10:45:55 +0800</pubDate><guid>http://blog.careff.com/post/379.html</guid><description><![CDATA[<p>&nbsp;更多详情请关注微博,以便及时了解迅雷会员的最新发布信息</p><div>http//weibo.com/2371342660</div><div>&nbsp;</div><div>【注】为了避免顶号建议使用以下两种方法下载资源</div><div>（1）使用网页离线下载</div><div>&nbsp; &nbsp; &nbsp;操作步骤</div><div>&nbsp; &nbsp; &nbsp;1.打开网页离线下载地址http//lixian.vip.xunlei.com/task.html</div><div>&nbsp; &nbsp; &nbsp;2.用提供的免费白金会员帐号登录，复制你的下载文件地址</div><div>&nbsp; &nbsp; &nbsp;3.点击网页离线下载里面的新建按钮，把地址复制进去，点击开始下载</div><div>&nbsp; &nbsp; &nbsp;4.等待网页显示你下载文件下了100%，一般2秒搞定</div><div>&nbsp; &nbsp; &nbsp;5.打开你的迅雷，登录你自己的普通帐号，注意不是白金会员迅雷白金会员账号，然后点取回本地</div><div>&nbsp;</div><div>（2）下载迅雷7防踢补丁和安装说明，下载地址：http://t.cn/zRiP8w0</div><div>&nbsp;</div><div>【输入账号密码时，大家别再直接复制粘贴，请用手动输入，不然会提示密码错误！】</div><div>&nbsp;</div><div>迅雷会员账号123600668:2迅雷账号密码123456&nbsp;</div><div>迅雷会员账号123600668:1迅雷账号密码123456</div><div>迅雷会员账号814669097迅雷账号密码291649663</div><div>迅雷会员账号cao7377809:2迅雷账号密码mnbvlkjh</div><div>迅雷会员账号556569230:2迅雷账号密码123456</div><div>迅雷会员账号638383836:1迅雷账号密码123456</div><div>迅雷会员账号638383836:2迅雷账号密码654321</div><div>迅雷会员账号458713616:2迅雷账号密码857613</div><div>迅雷会员账号458713616:1迅雷账号密码798133</div><div>迅雷会员账号13410986752迅雷账号密码gs123456789</div><div>迅雷会员账号15229633846迅雷账号密码1058824217</div><div>迅雷会员账号easonmoon迅雷账号密码qwer1234</div><div>迅雷会员账号894804926:1迅雷账号密码567676</div><div>迅雷会员账号894804926:2迅雷账号密码475383</div><div>迅雷会员账号wmpt49394迅雷账号密码1958243</div><div>迅雷会员账号dark4818:2迅雷账号密码935993&nbsp;</div><div>迅雷会员账号zhangdi1211:2迅雷账号密码121100</div><div>迅雷会员账号869692265:1迅雷账号密码278814&nbsp;</div><div>迅雷会员账号wsc113970009:1迅雷账号密码666666</div><div>迅雷会员账号877638793迅雷账号密码dvd921</div><div>迅雷会员账号a27366754:2迅雷账号密码123123&nbsp;</div><div>迅雷会员账号zhangtian000002迅雷账号密码shaolei</div><div>迅雷会员账号275290207:2迅雷账号密码666578</div><div>迅雷会员账号345902939:1迅雷账号密码5201314</div><div>迅雷会员账号345902939:2迅雷账号密码5201314</div><div>迅雷会员账号a403460384:1迅雷账号密码123456780</div><div>迅雷会员账号a403460384:2迅雷账号密码123456780</div><div>迅雷会员账号ufvsowfxz迅雷账号密码12315254</div><div>迅雷会员账号556569230:1迅雷账号密码12345av</div><div>迅雷会员账号556569230:2迅雷账号密码123456</div><div>迅雷会员账号924986528迅雷账号密码94543017</div><div>迅雷会员账号638383836:1迅雷账号密码123456</div><div>迅雷会员账号638383836:2迅雷账号密码654321</div><div>迅雷会员帐号ssstryu:1迅雷账号密码123456</div><div>迅雷会员帐号ssstryu:2迅雷账号密码123456</div><div>&nbsp;</div><div>【注会员有效期 6-12 小时，最好手写迅雷白金会员迅雷白金会员迅雷白金会员密码，复制迅雷白金会员迅雷白金会员迅雷白金会员密码时不要把空格也复制上；迅雷企业会员子迅雷白金会员账号，需要下载最新版客户端才可用(并非尊享版)，支持云播；如果不用网页离线下载而直接使用迅雷客户端登陆会员进行下载，请安装防踢补丁。迅雷版本升级更新后，防踢补丁需要重新安装。】</div>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/379.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=379</wfw:commentRss></item><item><title>如何在windows server 2008的桌面上显示 我的电脑 我的文档 网上邻居？</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/356.html</link><pubDate>Mon, 18 Mar 2013 11:23:43 +0800</pubDate><guid>http://blog.careff.com/post/356.html</guid><description><![CDATA[<p>&nbsp;<span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: 宋体, 'Arial Narrow', arial, serif; font-size: 14px; line-height: 28px; ">装完windows server2008 r2 x64后发现桌面只有一个回收站图标，这一点和xp 20003都差不多，但是xp 2003很容易就把桌面上的 我的电脑 我的文档 网上邻居找到，但是windows server 2008找了半天也没有找到，最后在网上发行了一大奇招，详细如下</span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(85, 85, 85); font-family: 宋体, 'Arial Narrow', arial, serif; font-size: 14px; line-height: 28px; ">1.点击 开始 在搜索中输入 icon</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(85, 85, 85); font-family: 宋体, 'Arial Narrow', arial, serif; font-size: 14px; line-height: 28px; "><a target="\&quot;_blank\&quot;" href="http://img1.51cto.com/attachment/201106/21/746253_13086644964ZEq.jpg" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(1, 95, 145); text-decoration: none; "><img title="clip_image002" border="0" alt="clip_image002" height="519" src="http://img1.51cto.com/attachment/201106/21/746253_1308664504tHhg.jpg" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; vertical-align: top; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: initial; border-color: initial; border-width: initial; border-color: initial; border-width: initial; border-color: initial; background-image: none; border-bottom-width: 0px; border-bottom-color: initial; border-left-width: 0px; border-left-color: initial; border-top-width: 0px; border-top-color: initial; border-right-width: 0px; border-right-color: initial; " /></a></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(85, 85, 85); font-family: 宋体, 'Arial Narrow', arial, serif; font-size: 14px; line-height: 28px; "><a target="\&quot;_blank\&quot;" href="http://img1.51cto.com/attachment/201106/21/746253_1308664509L9RA.jpg" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(1, 95, 145); text-decoration: none; "><img title="clip_image002[4]" border="0" alt="clip_image002[4]" height="556" src="http://img1.51cto.com/attachment/201106/21/746253_1308664512vc95.jpg" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; vertical-align: top; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: initial; border-color: initial; border-width: initial; border-color: initial; border-width: initial; border-color: initial; background-image: none; border-bottom-width: 0px; border-bottom-color: initial; border-left-width: 0px; border-left-color: initial; border-top-width: 0px; border-top-color: initial; border-right-width: 0px; border-right-color: initial; " /></a></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(85, 85, 85); font-family: 宋体, 'Arial Narrow', arial, serif; font-size: 14px; line-height: 28px; ">2.点击&ldquo;显示或隐藏桌面上的通用图标&rdquo;</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(85, 85, 85); font-family: 宋体, 'Arial Narrow', arial, serif; font-size: 14px; line-height: 28px; "><a target="\&quot;_blank\&quot;" href="http://img1.51cto.com/attachment/201106/21/746253_1308664515So1a.jpg" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(1, 95, 145); text-decoration: none; "><img title="clip_image002[7]" border="0" alt="clip_image002[7]" height="443" src="http://img1.51cto.com/attachment/201106/21/746253_1308664516frQn.jpg" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; vertical-align: top; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: initial; border-color: initial; border-width: initial; border-color: initial; border-width: initial; border-color: initial; background-image: none; border-bottom-width: 0px; border-bottom-color: initial; border-left-width: 0px; border-left-color: initial; border-top-width: 0px; border-top-color: initial; border-right-width: 0px; border-right-color: initial; " /></a></p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/356.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=356</wfw:commentRss></item><item><title>山东</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/330.html</link><pubDate>Thu, 31 Mar 2011 14:45:52 +0800</pubDate><guid>http://blog.careff.com/post/330.html</guid><description><![CDATA[<p>1、JS补考全选<br />2、低于60分，自动提示是否补考<br />3、写个低于60分，设置补考状态功能。<br />4、JS回车跳转到下个文本控件上</p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/330.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=330</wfw:commentRss></item><item><title>要求</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/321.html</link><pubDate>Wed, 16 Mar 2011 12:21:10 +0800</pubDate><guid>http://blog.careff.com/post/321.html</guid><description><![CDATA[<p>1、评估历史不好用<br />2、成绩查询和导出，没有按照指标套包查询功能（不好用，所以关闭了）<br />3、科室不显示那么多，只显示自己需要评价的</p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/321.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=321</wfw:commentRss></item><item><title>2010年下半年信息系统项目管理师  </title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/316.html</link><pubDate>Wed, 12 Jan 2011 10:28:10 +0800</pubDate><guid>http://blog.careff.com/post/316.html</guid><description><![CDATA[<p><table class="search_table" cellspacing="8" cellpadding="0" align="center" border="0">    <tbody>        <tr>            <td valign="top">考试时间:</td>            <td>2010年下半年</td>        </tr>        <tr>            <td valign="top">资格名称：</td>            <td>信息系统项目管理师</td>        </tr>        <tr>            <td valign="top">准考证号：</td>            <td>020123170131</td>        </tr>        <tr>            <td valign="top">证 件 号：</td>            <td>&nbsp;</td>        </tr>        <tr>            <td valign="top">姓&nbsp;&nbsp;&nbsp;&nbsp;名：</td>            <td>&nbsp;</td>        </tr>        <tr>            <td valign="top">上午成绩：</td>            <td>42</td>        </tr>        <tr>            <td valign="top">下午成绩：</td>            <td>49</td>        </tr>        <tr>            <td valign="top">论文成绩：</td>            <td>46</td>        </tr>    </tbody></table></p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/316.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=316</wfw:commentRss></item><item><title>asp.net图片验证码</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/315.html</link><pubDate>Tue, 11 Jan 2011 14:31:16 +0800</pubDate><guid>http://blog.careff.com/post/315.html</guid><description><![CDATA[<p>using System;<br />using System.Drawing;<br />using System.Web.UI.WebControls;</p><p>namespace Lc.Framework.Webadmin.Sysadmin<br />{<br />&nbsp;&nbsp;&nbsp; public partial class code : System.Web.UI.Page<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Page_Load(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string checkCode = CreateCode(4);</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //用于验证 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Session[&quot;CheckCode&quot;] = checkCode;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateImages(checkCode);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*产生验证码*/<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string CreateCode(int codeLength)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string so = &quot;1,2,3,4,5,6,7,8,9,0&quot;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string[] strArr = so.Split(',');<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string code = &quot;&quot;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Random rand = new Random();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; codeLength; i++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; code += strArr[rand.Next(0, strArr.Length)];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return code;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*产生验证图片*/<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void CreateImages(string code)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Bitmap image = new Bitmap(60, 20);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Graphics g = Graphics.FromImage(image);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WebColorConverter ww = new WebColorConverter();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g.Clear((Color)ww.ConvertFromString(&quot;#ffffff&quot;));</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Random random = new Random();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //画图片的背景噪音线 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; 10; i++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int x1 = random.Next(100);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int x2 = random.Next(100);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int y1 = random.Next(40);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int y2 = random.Next(40);</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g.DrawLine(new Pen(Color.LightGray), x1, y1, x2, y2);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Font font = new Font(&quot;Arial&quot;, 12, FontStyle.Bold | FontStyle.Italic);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new Rectangle(0, 0, image.Width, image.Height), Color.Black, Color.Gray, 1.2f, true);</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //画验证码字符串 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; code.Length; i++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g.DrawString(code[i].ToString(), font, brush, i * 14 + 2, 2);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //画图片的前景噪音点 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //for (int i = 0; i &lt; 300; i++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; int x = random.Next(image.Width);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; int y = random.Next(image.Height);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; image.SetPixel(x, y, Color.LightGray);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //}</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //画图片的边框线 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g.DrawRectangle(new Pen(Color.Silver), 0, 0, image.Width - 1, image.Height - 1);</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Buffer = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ExpiresAbsolute = System.DateTime.Now.AddMilliseconds(0);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Expires = 0;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.CacheControl = &quot;no-cache&quot;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.AppendHeader(&quot;Pragma&quot;, &quot;No-Cache&quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //将验证码图片写入内存流，并将其以 &quot;image/Png&quot; 格式输出 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.IO.MemoryStream ms = new System.IO.MemoryStream();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image.Save(ms, System.Drawing.Imaging.ImageFormat.Png);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ClearContent();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ContentType = &quot;image/Png&quot;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.BinaryWrite(ms.ToArray());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; finally<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //显式释放资源 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g.Dispose();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image.Dispose();</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />}</p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/315.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=315</wfw:commentRss></item><item><title>调用微软的数据库连接对话框</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/311.html</link><pubDate>Tue, 11 Jan 2011 13:31:03 +0800</pubDate><guid>http://blog.careff.com/post/311.html</guid><description><![CDATA[<p>using Microsoft.Data.ConnectionUI;</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void button1_Click(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataConnectionDialog dlg = new DataConnectionDialog();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlg.DataSources.Add(DataSource.SqlDataSource);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlg.SelectedDataProvider = DataProvider.SqlDataProvider;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataConnectionDialog.Show(dlg, this);</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/311.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=311</wfw:commentRss></item><item><title>个比较实用的函数 C#</title><author>a@b.com (admin)</author><link>http://blog.careff.com/post/309.html</link><pubDate>Tue, 11 Jan 2011 13:26:13 +0800</pubDate><guid>http://blog.careff.com/post/309.html</guid><description><![CDATA[<p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 获取一个图片按等比例缩小后的大小。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;maxWidth&quot;&gt;需要缩小到的宽度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;maxHeight&quot;&gt;需要缩小到的高度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;imageOriginalWidth&quot;&gt;图片的原始宽度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;imageOriginalHeight&quot;&gt;图片的原始高度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;returns&gt;返回图片按等比例缩小后的实际大小&lt;/returns&gt;</p><p style="text-indent: 2em">public static Size GetNewSize(int maxWidth, int maxHeight, int imageOriginalWidth, int imageOriginalHeight)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; double w = 0.0;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; double h = 0.0;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; double sw = Convert.ToDouble(imageOriginalWidth);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; double sh = Convert.ToDouble(imageOriginalHeight); double mw = Convert.ToDouble(maxWidth);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; double mh = Convert.ToDouble(maxHeight);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; if (sw &lt; mw &amp;&amp; sh &lt; mh)</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w = sw;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h = sh;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; else if ((sw / sh) &gt; (mw / mh))</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w = maxWidth;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h = (w * sh) / sw;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; else</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h = maxHeight;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w = (h * sw) / sh;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; return new Size(Convert.ToInt32(w), Convert.ToInt32(h));</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 对给定的一个图片（Image对象）生成一个指定大小的缩略图。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;originalImage&quot;&gt;原始图片&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;thumMaxWidth&quot;&gt;缩略图的宽度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;thumMaxHeight&quot;&gt;缩略图的高度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;returns&gt;返回缩略图的Image对象&lt;/returns&gt;</p><p style="text-indent: 2em">public static System.Drawing.Image GetThumbNailImage(System.Drawing.Image originalImage, int thumMaxWidth, int thumMaxHeight)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; Size thumRealSize = Size.Empty;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image newImage = originalImage;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; Graphics graphics = null;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; try</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thumRealSize = GetNewSize(thumMaxWidth, thumMaxHeight, originalImage.Width, originalImage.Height);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newImage = new Bitmap(thumRealSize.Width, thumRealSize.Height);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics = Graphics.FromImage(newImage);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics.CompositingQuality = CompositingQuality.HighQuality;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics.SmoothingMode = SmoothingMode.HighQuality;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics.Clear(Color.Transparent);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics.DrawImage(originalImage, new Rectangle(0, 0, thumRealSize.Width, thumRealSize.Height), new Rectangle(0, 0, originalImage.Width, originalImage.Height), GraphicsUnit.Pixel);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; catch { }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; finally</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (graphics != null)</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; graphics = null;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; return newImage;</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 对给定的一个图片文件生成一个指定大小的缩略图。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;originalImage&quot;&gt;图片的物理文件地址&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;thumMaxWidth&quot;&gt;缩略图的宽度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;thumMaxHeight&quot;&gt;缩略图的高度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;returns&gt;返回缩略图的Image对象&lt;/returns&gt;</p><p style="text-indent: 2em">public static System.Drawing.Image GetThumbNailImage(string imageFile, int thumMaxWidth, int thumMaxHeight)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image originalImage = null;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image newImage = null;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; try</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; originalImage = System.Drawing.Image.FromFile(imageFile);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newImage = GetThumbNailImage(originalImage, thumMaxWidth, thumMaxHeight);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; catch { }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; finally</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (originalImage != null)</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; originalImage.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; originalImage = null;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; return newImage;</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 对给定的一个图片文件生成一个指定大小的缩略图，并将缩略图保存到指定位置。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;originalImageFile&quot;&gt;图片的物理文件地址&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;thumbNailImageFile&quot;&gt;缩略图的物理文件地址&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;thumMaxWidth&quot;&gt;缩略图的宽度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;thumMaxHeight&quot;&gt;缩略图的高度&lt;/param&gt;</p><p style="text-indent: 2em">public static void MakeThumbNail(string originalImageFile, string thumbNailImageFile, int thumMaxWidth, int thumMaxHeight)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image newImage = GetThumbNailImage(originalImageFile, thumMaxWidth, thumMaxHeight);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; try</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newImage.Save(thumbNailImageFile, ImageFormat.Jpeg);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; catch</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; { }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; finally</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newImage.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newImage = null;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 将一个图片的内存流调整为指定大小，并返回调整后的内存流。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;originalImageStream&quot;&gt;原始图片的内存流&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;newWidth&quot;&gt;新图片的宽度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;newHeight&quot;&gt;新图片的高度&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;returns&gt;返回调整后的图片的内存流&lt;/returns&gt;</p><p style="text-indent: 2em">public static MemoryStream ResizeImage(Stream originalImageStream, int newWidth, int newHeight)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; MemoryStream newImageStream = null;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image newImage = Globals.GetThumbNailImage(System.Drawing.Image.FromStream(originalImageStream), newWidth, newHeight);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; if (newImage != null)</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newImageStream = new MemoryStream();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newImage.Save(newImageStream, ImageFormat.Jpeg);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; return newImageStream;</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 将一个内存流保存为磁盘文件。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;stream&quot;&gt;内存流&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;newFile&quot;&gt;目标磁盘文件地址&lt;/param&gt;</p><p style="text-indent: 2em">public static void SaveStreamToFile(Stream stream, string newFile)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; if (stream == null || stream.Length == 0 || string.IsNullOrEmpty(newFile))</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; byte[] buffer = new byte[stream.Length];</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; stream.Position = 0;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; stream.Read(buffer, 0, buffer.Length);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; FileStream fileStream = new FileStream(newFile, FileMode.OpenOrCreate, FileAccess.Write);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; fileStream.Write(buffer, 0, buffer.Length);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; fileStream.Flush();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; fileStream.Close();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; fileStream.Dispose();</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 对一个指定的图片加上图片水印效果。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;imageFile&quot;&gt;图片文件地址&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;waterImage&quot;&gt;水印图片（Image对象）&lt;/param&gt;</p><p style="text-indent: 2em">public static void CreateImageWaterMark(string imageFile, System.Drawing.Image waterImage)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; if (string.IsNullOrEmpty(imageFile) || !File.Exists(imageFile) || waterImage == null)</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image originalImage = System.Drawing.Image.FromFile(imageFile);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; if (originalImage.Width - 10 &lt; waterImage.Width || originalImage.Height - 10 &lt; waterImage.Height)</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; Graphics graphics = Graphics.FromImage(originalImage);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; int x = originalImage.Width - waterImage.Width - 10;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; int y = originalImage.Height - waterImage.Height - 10;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; int width = waterImage.Width;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; int height = waterImage.Height;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.DrawImage(waterImage, new Rectangle(x, y, width, height), 0, 0, width, height, GraphicsUnit.Pixel);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; MemoryStream stream = new MemoryStream();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; originalImage.Save(stream, ImageFormat.Jpeg);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; originalImage.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image imageWithWater = System.Drawing.Image.FromStream(stream);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; imageWithWater.Save(imageFile);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; imageWithWater.Dispose();</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 对一个指定的图片加上文字水印效果。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;imageFile&quot;&gt;图片文件地址&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;waterText&quot;&gt;水印文字内容&lt;/param&gt;</p><p style="text-indent: 2em">public static void CreateTextWaterMark(string imageFile, string waterText)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; if (string.IsNullOrEmpty(imageFile) || string.IsNullOrEmpty(waterText) || !File.Exists(imageFile))</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image originalImage = System.Drawing.Image.FromFile(imageFile);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; Graphics graphics = Graphics.FromImage(originalImage);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.SmoothingMode = SmoothingMode.HighQuality;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.CompositingQuality = CompositingQuality.HighQuality;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; SolidBrush brush = new SolidBrush(Color.FromArgb(153, 255, 255, 255));</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; Font waterTextFont = new Font(&quot;Arial&quot;, 16, FontStyle.Regular);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; SizeF waterTextSize = graphics.MeasureString(waterText, waterTextFont);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; float x = (float)originalImage.Width - waterTextSize.Width - 10F;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; float y = (float)originalImage.Height - waterTextSize.Height - 10F;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.DrawString(waterText, waterTextFont, brush, x, y);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; graphics.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; brush.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; MemoryStream stream = new MemoryStream();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; originalImage.Save(stream, ImageFormat.Jpeg);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; originalImage.Dispose();</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; System.Drawing.Image imageWithWater = System.Drawing.Image.FromStream(stream);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; imageWithWater.Save(imageFile);</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; imageWithWater.Dispose();</p><p style="text-indent: 2em">}</p><p style="text-indent: 2em">/// &lt;summary&gt;</p><p style="text-indent: 2em">/// 判断上传组件是否包含内容。</p><p style="text-indent: 2em">/// &lt;/summary&gt;</p><p style="text-indent: 2em">/// &lt;param name=&quot;fileUpload&quot;&gt;ASP.NET 2.0标准上传组件&lt;/param&gt;</p><p style="text-indent: 2em">/// &lt;returns&gt;如果数据有效，则返回True，否则返回False&lt;/returns&gt;</p><p style="text-indent: 2em">public static bool IsAttachmentValid(FileUpload fileUpload)</p><p style="text-indent: 2em">{</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; if (fileUpload != null &amp;&amp;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fileUpload.PostedFile != null &amp;&amp;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !string.IsNullOrEmpty(fileUpload.PostedFile.FileName) &amp;&amp;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fileUpload.PostedFile.ContentLength &gt; 0)</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; {</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true;</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; }</p><p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; return false;</p><p style="text-indent: 2em">}</p>]]></description><category>学习收藏</category><comments>http://blog.careff.com/post/309.html#comment</comments><wfw:commentRss>http://blog.careff.com/feed.asp?cmt=309</wfw:commentRss></item></channel></rss>
