用JavaScript获取图片 base64 数据,你需要创建一个canvas元素 with the correct dimensions and copy the image data with the drawImage function. Then you can use the toDataURL function to get a data: ur……继续阅读 »
11年前 (2015-02-07) 11691浏览 0评论
0个赞
获得 WebBrowser中的图片 数据方法
/// <summary>
/// 获取WebBrowser指定的图片
/// </summary>
/// <param name="webBrowser">需要获取图片的WebBrowser</param>
/// <param n……继续阅读 »
11年前 (2015-02-07) 2917浏览 0评论
0个赞
一、 sql server日期时间函数
Sql Server中的日期与时间函数
1. 当前系统日期、时间
select getdate()
2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值
例如:向日期加上2天
select dateadd(day,2,’2004-10-15……继续阅读 »
11年前 (2015-02-03) 1862浏览 0评论
0个赞
用了一段时间sql server 2008 后,今天打开sqlserver时提示“ 评估期已过 。有关如何升级的测试版软件的信息,请访问http://www.microsoft.com/sql/howtobuy ”。
“ 评估期已过 ”解决方法:
开始–>所有程序–>Microsoft SQL Server 2008……继续阅读 »
11年前 (2015-01-30) 3248浏览 0评论
0个赞
下面是 ServiceController示例 ,检查 Telnet 服务的当前状态。如果该服务已停止,此示例将启动该服务。如果该服务正在运行,此示例将停止该服务。
// Toggle the Telnet service –
// If it is started (running, paused, etc), stop the service……继续阅读 »
11年前 (2015-01-26) 3439浏览 0评论
0个赞
字符串比较
这个可能很多人知道了,但还是提一下。
string s = “”;
1) if(s == “”){}
2) if(s == string.Empty){}
3) if (string.IsNullOrEmpty(s)) { }
4) if(s != null && s.Length……继续阅读 »
11年前 (2015-01-23) 3149浏览 0评论
0个赞
不要迷信正则表达式
正好在第一个例子里说到了正在表达式(Regex)对象就顺便一起说了。
很多人以为正则表达式很快,非常快,超级的快。
虽然正则表达式是挺快的,不过千万不要迷信他,不信你看下面的例子。
//方法1
public static string ConvertQuot1(string html)
{
return html.Replac……继续阅读 »
11年前 (2015-01-23) 4005浏览 0评论
0个赞
减少重复代码 是最基本的 性能优化 方案,尽可能减少那些重复做的事,让他们只做一次,比较常见是这种代码,同样的Math.Cos(angle) 和Math.Sin(angle)都做了2次。
private Point RotatePt(double angle, Point pt)
{
Point pRet = new Point();
……继续阅读 »
11年前 (2015-01-23) 4017浏览 0评论
0个赞
How to customize the ToolTip for a TreeList cell
Yes, it’s possible. You should drop the ToolTipController onto a form, set the TreeList’s ToolTipController property ……继续阅读 »
11年前 (2015-01-21) 3483浏览 0评论
0个赞