关闭centos5.2Tab键滴滴报警声音
编辑/etc/inputrc
去掉#set bell-style none前的井号,就可以脱离烦恼的滴滴声了。赶快去试试吧。
当使用visual stdio建立工程后,默认的入口时int _tmain(int argc, _TCHAR* argv[]),而不是常见的main()函数。
实际上_tmain是main的别名定义在#include <tchar.h>中的#define _tmain main,必须包含此头文件才能编译通过。编译后认为main。
默认是把#include <tchar.h>放在预编译头文件中stdafx.h中的,大家可以打开看看。
对了,还没说为什么要用_tmain(),是为了保证移植unicode而加入的(一般_t、_T、T()这些东西都和unicode有关系)
如何你的服务器支持gzip,那么给php开启gzip是很容易的
在.htaccess文件中添加:
php_flag zlib.output_compression on
php_value zlib.output_compression_level 9
即可以完成。
附加一个检测gzip压缩比的网站http://www.port80software.com/products/httpzip/
wordpress安装后,主页默认是没有meta的keywords和description选项,需要自己手动添加,我们就能解决了。
在主题目录下先找到的header.php文件,然后在文件找到
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
在该行之上添加如下代码:
<?php if (is_home()){
$description = "Google Support Blog Focus on Google technology!";
$keywords = "Google Docs,Google Chrome,Chrome theme,Chrome plugin,Google Analystic";
} elseif (is_single()){
$description = mb_substr(strip_tags($post->post_content),0,110,utf8);
$keywords = "";
$tags = wp_get_post_tags($post->ID);
foreach ($tags as $tag ) {
$keywords = $keywords . $tag->name . ", ";
}
}
?>
<meta name="keywords" content="<?=$keywords?>" />
<meta name="description" content="<?=$description?>" />
其中红色的代码可以解决description中乱码的问题。
test
最近刚好有位朋友用WordPress建站,想去掉分类URL永久链接中的category
查找了下资料,找到了个算比较简单的方法,记录下
打开wp-includes文件夹中的category-template.php
查找以下代码
$catlink = get_option( 'home' ) . user_trailingslashit( $catlink, 'category' );
其后面加上:
$catlink = str_replace('/category', "", $catlink); //add 2010-2-4 del category
之前一直备案,可是始终弄不下来备案号,没办法只好移民国外了。