2006年4月26日
#
全面的
http://www.wujianrong.com/docs/regular_expression.htm
http://unibetter.com/deerchao/zhengzhe-biaodashi-jiaocheng-se.htm
http://blog.csdn.net/colin310/archive/2005/02/18/292830.aspx
有时候我们需要对超链接<a href="路径"
title="提示文字">链接文字</a>里边的提示文字使用换行(即需要多行提示),可是title,alt之类里边的提示内容是不支持HTML书写的,怎么解决?
很容易,下面有三种方法:
1、把
<BR>换成
就可以了,如下代码:
<a href="" title="标题:Test Title Clip
时间:2005-11-20
作者:goaler">Test Title Clip</a>
效果如下:
Test Title Clip 2、把
换也
或
效果也一样
3、直接加硬回车也一样的效果,例如:
<a href="...." title="AAAAA
BBBBB
CCCCC
DDDDD">test</a>
在验证码页面后加一个随机的参数。这样历史记录里就不会有相同的请求了,也就不存在缓存的问题了。
代码如下:
<img id="imgvc" src="ValidateCode.aspx?t='+Math.round(Math.random()*1e17)'" onclick="getObject('imgvc').src='ValidateCode.aspx?t='+Math.round(Math.random()*1e17);" width="66" height="20" align="absmiddle" />
在本版面出现这个问题的频率也算是很高的了,新手通常会比较多遇到这个问题
原因很简单,安装SQL Server时是使用默认登录用户来作为启动SQL Server服务的账号(对于自己使用的单机,通常就是administrator了),当该用户更改了用户名(如有人喜欢把administrator改成admin)或更改了其口令时,再次启动服务器,就出现“同于登录失败而无法启动服务”的错误了
知道了原因,解决方法也就很显然了
1,把用户口令改回原来的,再启动服务
2,使用控制面版服务管理器,找到MSSQLSERVER服务,更改启动账号信息,改成变更后的,再启动服务
3,也是推荐使用的方法,创建一个新用户,专门用于启动SQL Server服务,安装SQL Server时就使用该用户来启动SQL Server,这样就可以避免用于频繁更改administrator口令而带来的1069错误了。如果已经安装好SQL Server,也可以在控制面版服务管理器下更改MSSQLSERVER服务的服务账号信息,换成SQL服务专用的用户。
【转自世
|
大师不是仅靠作品为唯一标准的,以国内几位公认的大师来说,徐悲鸿开拓了中西结合的先例,(以前有,但没有被普及,与社会背景有绝对关系);刘海粟以现代美术教育成名(人体艺术没有他估计要等很久才能被中国艺术界接受);齐白石晚年变法将文人画推入一个新的高度,关键他将民间艺术与所谓文人艺术巧妙结合并影响一代人的画风。 从这些例子看出的是大师是作为艺术承前启后的贡献者来做衡量标准,作品及其技法在其次,如果你要看好的作品---我指直观的作品就未必只看大师的东西,但要了解艺术流派与社会发展对艺术的影响则必须从大师的作品中找答案。 从现在的社会背景来说,是一个不可能产生大师的时代。政治因素能影响艺术的发展,但不大,时代影响大师的出现主要在于社会的发展,社会发展到需要进化的时候,则必然能刺激很多领域发展或改革,这个时候,抓住社会脉搏的人开创新的,被当代认可并影响后世发展的人就具备了成为大师的基本条件。
|
自己写的发邮件的函数经常发送几次后就发送不了了。
经过研究发现是邮箱的反垃圾邮件功能在搞鬼。
一般的反垃圾邮件的原理都是通过邮件的Head信息来工作的。
我在网上找到了以下信息:
X-Mailer是信件原文中信件头的其中一项,X-Mailer表示信件是从哪个客户端发送出来的,常见的客户端工具,Outlook Express, Foxmail和Coremail 的Webmail都可以查看邮件原文,例如,
Date: Tue, 6 Aug 2002 16:43:27 +0800 (CST)
From: "Purple" <pjl@163.net>
To: china@netease.com
Subject: =?gb2312?B?zfjC59Gn1LqxqLzb?=
X-Priority: 3
X-Originating-IP: [202.96.159.254]
X-Mailer: Coremail2.0 Copyright Tebie Ltd., 2001
X-Mailer是代理发信的客户端,如果是Coremail,代表是从Coremail的Webmail发出的信件(163.net),如果是从Outlook发出的,
X-Mailer内容会是这样的 X-Mailer: Microsoft Outlook Express 5.50.4807.1700
iScanBMail 里面集成的邮件发送系统可以设定不同的X-Mailer,这样可以避开一些垃圾邮件过滤系统的过滤,所以从iScanBMail发出的邮件一般不会被标识为垃圾邮件。

于是我研究了一下Outlook发送的邮件。发现Outlook发送的邮件比我自己的程序发送的邮件多了几个字段:
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
我就试着在我的邮件发送类中增加了以下几行:
mail.Headers.Add("X-Priority", "3");
mail.Headers.Add("X-MSMail-Priority", "Normal");
mail.Headers.Add("X-Mailer", "Microsoft Outlook Express 6.00.2900.2869");
mail.Headers.Add("X-MimeOLE", "Produced By Microsoft MimeOLE V6.00.2900.2869");
最后我怀着无比激动的心情测试了一下。。。。。发现果然发送成功了!!
后续。。。。。。。
邮件能不能发送成功还与服务器有关,有些服务器即使做了以上的修改,也只能保证前几次能发送成功。
发多了还是要被挡掉。(据我估计:可能是使用的邮件服务器信用不好)
看来要完全斗过反垃圾软还是有点困难。总之人品好才是最重要的。
修改URl中的一个参数值:
public static string ChangeParam(string url, string paramName, string value)

{
if (Regex.IsMatch(url, "[?&]" + paramName + "=[^&]*",RegexOptions.IgnoreCase))

{
url = Regex.Replace(url, "(?<s>[?&]" + paramName + "=)[^&]*", "${s}" + value,RegexOptions.IgnoreCase);
}
else if (Regex.IsMatch(url, "[?&]"))

{
url += '&' + paramName + "=" + value;
}
else

{
url += '?' + paramName + "=" + value;
}
return url;
}

/**//// <summary>
/// 将字符串类型的泘点数或整数乘100,返回整数部分的字符串。
/// 主要用于美元的换算
/// </summary>
/// <param name="floatString"></param>
/// <returns></returns>
public static string FloatMultiplyHundred(string floatString)

{
floatString = floatString.Trim() + "00";
return Regex.Replace(floatString, @"^(?<int>\d+)\.(?<cent>\d{2})\d*$", "${int}${cent}");
}

有时候数据库还原后.在SQL Server的企业管理器里查看到用户的权限都是正常的, 但是数据库连接就是有问题.
我的解决办法就是把数据库的用户删了重新建~
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\Service Manager
Remote的值改为2
前几天下了个微软的快速入门教程.在自己机子上打开没什么问题.到实验室电脑上就打不开了.出现了以下错误:
出现了Failed to access IIS metabase
Google了一下就找到了解决办法.
(Google百度真的是什么都能找到~~

我想编程中我能遇到的问题, 别人肯定都遇到过.在网上肯定能找到它的解决办法)
解决办法:
C:\WINNT\Microsoft.NET\Framework\v2.0.50727>aspnet
_regiis.exe -i
运行过程:
Start installing ASP.NET (2.0.50727).
...................................
Finished installing ASP.NET (2.0.50727).
最近在做一个项目时要求导出Excel文件,本来用的是比较原始的办法,直接生成字符串发运到客户端.这当然不会出什么问题. 毕竟不是真正的Excel文件看起来总是不舒服.于是改用COM组件来生成Excel文件.用COM其实也挺简单的:).在本地测试没发现任何问题一发到服务器上就出了问题. 因为是菜鸟不知道怎么看错误信息.就在这个问题上折腾了好几天.最后终于上我发现了错误信息!!于是立马百度一下~问题就解决了~.
异常信息:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
问题原因: 远程用户无法运行Excel应用程序
解决办法:(百度上什么都能搜出来~)
直接把原文贴下面.
Example Application

The problem is that by default Microsoft Excel as a COM object can only activated by the following accounts:
- Administrator
- System
- Interactive
When you are running your ASP.Net account on Windows XP your web application is running as the ASPNET account.
The way to resolve this issue is to edit the DCOM configuration settings for the Microsoft Excel Application object.
Configure DCOM
- Go to the Start-Run menu item.
- Type in "DCOMCNFG" and hit enter.
- This should load the "Component Services" MMC (you can also load from Administrative Tools - Component Services"
- Expand "Component Services"
- Expand "Computers"
- Expand "My Computer"
- Select the "DCOM Config" item
- Select the "Microsoft Excel Application" item.
- Right click and select Properties
- Select the Security Tab and you should see the following:

- Under "Launch and Activation Permissions" select the "Customize" option.
- Click the "Edit" button

- Click the "Add" button to add a new account to the list.
- On the dialog that is displayed click the Locations button
(this is because by default your domain will be selected and we need a local account)
In this dialog scroll the list to the top (sometimes the first item is not visible) but scroll to the top and select the first item which is your computer name. In the list below "CCROWE" is the name of my computer.

- Click the OK button
- On the dialog that is displayed enter "ASPNET" as the account name.

- Click the OK button
Note: A quicker way is to just enter the computer name and the account so in my case that would be:
ccrowe\ASPNET
- Now make sure you select the following options for the "ASP.NET Machine Account"
- Local Launch : Allow
- Remote Launch : [blank]
- Local Activation : Allow
- Remote Activation : [blank]
These settings can be seen below:

Click the OK button and test your web application again and it should work fine.