Rails apps auto generate sitemap
2010-04-15, Nortan Posted in Ruby, Programming | 8 回复 | 查看全文>>
标签: Rails, Rails Sitemap Plugin, rails sitemap生成器, sitemap generator, 生成sitemapDisable WordPress’s post revisions
2010-01-28, Nortan Posted in usefulness | 我来说两句 | 查看全文>>
From the version of 2.6,wordpress add the post revision function,this function may affect the performance of wordpress,so ,if you want disable this function ,you can add this code to wp-config.php
define('WP_POST_REVISIONS', false);
About the value of the WP_POST_REVISIONS is:
true (default) or -1: saving all post revisions false or 0: don't saving any post revisions Integer n greater than 0: save n post revisions (+1 only save the first post revision),and the old post revision will be deleted
Everyone is still recommended to set 1 or 2, and the total time of accidentally deleted
UITextField increase textDidChange callback function
2010-01-20, Nortan Posted in Objective-c | 1 回复 | 查看全文>>
In UISearchBar,when type something,it calls textDidChange function,but UITextField have not this function,the only similar shouldChangeCharactersInRange function,called before type change,rather than after the change
To achieve this function, you can increase the use of component event listeners the way, this is similar to the Java-Listener, this interface is: 查看全文…
URLEncoding for Objective-c
2010-01-18, Nortan Posted in Objective-c | 1 回复 | 查看全文>>
In Objective-c for network programming, we often need to convert the data to URLEncoding encoding, such as “+” sign encoded into “%2b”. Here we give an implementation.
//NSString+URLEncoding.h #import @interface NSString (URLEncodingAdditions) - (NSString *)URLEncodedString; - (NSString *)URLDecodedString; @end