我刚刚尝试使用jvisualvm分析一个相对简单的java程序。结果有点奇怪:一个小的4行代码的方法拥有最多的自我时间,明显比任何其他方法都多!
public class Hub
public void clock() {
for (int i = 0; i < cogs.length; i++) {
cogs[i].clock(cnt, i, this);
}
cnt++;
}
}
注意:在这种情况下,cogs.length是8!
这很奇怪,因为Cog.clock方法要大得多!我能想到的唯一合理的解
到目前为止,我已经尝试了相当多的东西,但都没有成功:
我使用的是TinyMCE,我通过mysql_real_escape_string()运行它,然后添加到数据库。
下面是一个存储在数据库中的字符串的示例:
<p>It would be nice to be able to put this in 2 categories....</p>\n<p>something to think about.</p>
我检索数据,然后就会遇到问题。我不能摆脱\n
$string =上面列出的数据库条目
$string = substr($item['