1、如果能将类的方法定义成static,就尽量定义成static,它的速度会提升将近4倍。2、$row[’id’]
的速度是$row[id]的7倍。3、echo 比 print 快,并且使用echo的多重参数(译注:指用逗号而不是句点)代替字符串连接,比如echo
$str1,$str2。4、在执行...
分类:
Web程序 时间:
2014-06-20 08:48:10
阅读次数:
337
匿名FTP设置方法:通常在登录FTP服务器的用户不确定的情况下,应将FTP服务器设置为允许匿名账号登录的FTP服务器1.启用匿名帐号anonymous_enable=YESlocal_enable=YESwrite_enable=YESlisten=YES设置完成后,重启vsftd.将允许匿名账号和...
分类:
其他好文 时间:
2014-06-11 22:23:44
阅读次数:
275
最近在看一个项目,其中用到异步进程——控件Invoke,这里将具体用法介绍如下:以进度条为例://声明委托delegate
void SetProgressBarEnabledDelegate(ToolStripProgressBar progressBar,bool
enable);//运行异步进...
分类:
其他好文 时间:
2014-06-11 12:47:16
阅读次数:
352
在程序包管理器控制台1.执行:Enable-Migrations-Force
生成:Migrations2 修改AutomaticMigrationsEnabled默认为false改为true3.执行:Update-Database
-Verbose
分类:
数据库 时间:
2014-06-11 11:05:45
阅读次数:
310
使用boost库时,经常会看到如下的类class A:public
enable_share_from_this在什么情况下要使类A继承enable_share_from_this?使用场合:当类A被share_ptr管理,且在类A的成员函数里需要把当前类对象作为参数传给其他函数时,就需要传递一个指...
分类:
其他好文 时间:
2014-06-07 16:59:55
阅读次数:
234
根据开发反馈,最近每天早上7:30应用会报警,应用的日志显示数据库连接池满了,新的连接被拒绝。
首先,我做了ASH报告(报告区间:7:25 ~ 7:35),从ASH的等待事件发现enq: TX - row lock contention居然高达76.54%,如下所示:
Top User Events
Event
Event Class
% Even...
分类:
数据库 时间:
2014-06-07 13:52:50
阅读次数:
308
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.
3
7 4
2 4 6
8 5 9 3
That is, 3 + 7 + 4 + 9 = 23.
Find th...
分类:
其他好文 时间:
2014-06-07 13:45:25
阅读次数:
189
离散化+暴力
Consecutive Blocks
Time Limit: 2 Seconds Memory Limit: 65536 KB
There are N (1 ≤ N ≤ 105) colored blocks (numbered 1 to N from left to right) which are lined up in a row. An...
分类:
其他好文 时间:
2014-06-07 13:08:07
阅读次数:
193
json.Append(String.Format("{\"total\":{0},\"row\":{1}}",
lineCount, strJSON));直接会报错字符串中包含{或者},则需要用{{ 来代替字符 {,用}} 代替
}如:json.Append(String.Format("{{\"...
分类:
Web程序 时间:
2014-06-07 08:48:42
阅读次数:
921
①字体 其中gridView是gridView的Name(下同)gridView[column,
row].Style.ForeColor =
Color.Red;//设置第row行column列的单元格字体颜色gridView.Rows[row].DefaultCellStyle.ForeColo...
分类:
其他好文 时间:
2014-06-07 08:07:42
阅读次数:
1115