给JavaScript的String对象添加startsWith(), endsWith()等方法 25 February 2012 Jeff JavaScript 用C#用习惯了,在写JavaScript代码时,用字符串时没有了startsWith()和endsWith()方法颇感不适应。于是自己给JavaScript的String对象添加两个,顺便再添加一个删除所有空白字符的方法。 // // 给字符串对象添加一个startsWith()方法 // String.prototype.startsWith = f... [More]
对JavaScript的Math.pow()函数的一个修正 21 February 2012 Jeff JavaScript, Math 数学 一、问题: JavaScript的Math对象中有一个方法Math.pow(x, y),用来求x的y次方。它有一个问题,即当x<0且y<1的时候,它总是返回NaN。对于x<0且1/y为偶数时,它返回NaN是有道理的,因为负数不能够被开偶数次方根。但是对于x<0且1/y为奇数时,返回NaN就没有道理了,因为负数也可以被开奇数次方根。 即JavaScript的Math.po... [More]
The fix for bug “Cannot delete subscribers” in BlogEngine.NET 20 February 2012 Jeff BlogEngine.NET [Background] There is a bug in BlogEngine.NET 2.5. [Bug Description] You cannot delete the subscribers from the newsletter widget. [Repro Steps] Navigate to your BlogEngine.NET blog Log in as adminis... [More]
The better word count extension for BlogEngine.NET 19 February 2012 Jeff Blog, BlogEngine.NET What is its usage? Displays count of the words in the post. How does this extension come out? The other day I found a word count extension for BlogEngine.NET that can display counts of the words... [More]
如何快速筛选出重复值 19 February 2012 Jeff SQL, Excel 问题: 如果有一张含有多行的数据列表,如何快速地定位到那些含有相同字段的数据行呢?举个例子,下面有个 id 数据列表,我们如何快速地找出那些 id 号相同的数据行呢? sn id type [0] 4ef168bb-40f2-4f28-93e2-89ed14159b33 strin... [More]
How to quickly filter out the duplicated values 19 February 2012 Jeff Excel, SQL Question: There is a list which consists of many rows. We want to quickly figour out which rows are duplicated with a specific field. For example, below is a list records the id info, how can we quic... [More]
How to make reCaptcha extension work in your BlogEngine.NET 18 February 2012 Jeff BlogEngine.NET Go to Admin tool, select settings tab, under comments settings, make sure “Use Disqus as a comment provider” is unchecked Go to Extensions tab, make sure the “SimpleCaptcha” extension ... [More]
Upgrade BlogEngine.NET from 2.5 to 2.6 15 February 2012 Jeff BlogEngine.NET If you are running BlogEngine.NET 2.5, and you want to add post view count statistics feature to your webblog, then I recommend you apply this update to your blog installation. New feature: Post view ... [More]
如何查询SQLite数据库中的索引信息 13 February 2012 Jeff SQL, BlogEngine.NET 一、问题: 在SQLite数据库中,已知索引名称(为idx_be_Posts_BlogID_PostID),查询其详细信息。 二、问题分析: 在SQLite数据库中,索引信息储存在sqlite_mater表中。 三、解决方案: SELECT * FROM sqlite_master WHERE (name = 'idx_be_Posts_BlogID_PostID') 执行上述... [More]