页面正在加载...
2012-4
22

stlport据说是一位俄罗斯高人之作,目的就是为了让我们在多平台下可以使用高效的SGI STL,废话少说,先介绍下它的主页:

http://sourceforge.net/projects/stlport/

下面是下载地址,最新版本是5.2.1:

http://sourceforge.net/projects/stlport/

下载后解压,假设目录为:D:\STLport,接下来就该编译它了:

1.在开始菜单中找到VC 命令行工具,这样可以省去很多事(网上很多教程要做很多热身运动,为啥不让M$代行呢?接下来切换到D:\STLport目录。

2.可以运行configure –help看看编译选项,用MSVC编译器编译的话,输入以下命令:

configure msvc9

3.输入

cd build/lib

4.输入

nmake clean install

稍等几分钟就可以编译好

5.在VS2008 IDE中做收尾工作:

依次选择“工具”->“选项”,在“项目和解决方案”下选择“VC++ 目录”,把D:\STLport\bin目录添加到“可执行文件”,把D:\STLport\include目录添加到“包含文件”(注意要放在最前,这样就可以取代默认的MSVC自己的STL库了),再把D:\STLport\lib目录添加到库目录和引用文件就ok了。

6.引用声明:

http://www.cnblogs.com/binterminator/articles/1638091.html

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading ... Loading ...

一、原因

网上复制文章,或者从txt里复制文章到word中,总会出现一些软回车,在word中用shirft+enter也可以打出个符号,这样很不美观,也不好排版

shiftenter

二、区别

1.硬回车(enter)

表现:弯曲的小箭头

段落标记:^p

2.软回车(shift+enter)

向下的箭头

段落标记:^l

它换行,但是并不换段

三、替换

编辑——替换,点击高级,在“查找内容”点入“特殊字符”中的手动换行符,再在“替换为”中点入“特殊字符”中的"段落标记",最后点击全部替换。
^l 转换为^p

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

2012-4
9

一、运行时错误

任何人写程序都会出错,正如《C++编程规范》所说,真正可怕的错误不是编译时的错误,而是运行时错误。

有的程序可以通过编译, 但在运行时会出现Segment fault(段错误)

这通常都是指针错误(一般就是空指针)引起的,或者访问了不能访问的内存(数组越界,系统保护)

二、core文件

我们不可能用GDB一句一句的去找,真正的英雄都善于使用手中的武器。这就是core file

所谓core,就是当程序down掉的时候,操作系统把程序的内存内容dump下来,这个动作就是core dump,动作的结果就是core文件

产生:

1.程序挂了,操作系统产生

2.通过gcore $pid命令直接导出相应进程的core文件,此命令运行后, 会恢复程序的执行, 不影响程序的运行

3.通过另一个进程发送SIGABRT信号给当前进程, 虽然也能产生core文件,但是程序随着一起终止掉

三、core文件开关设置

1.终端级别

怎么样才能让程序down掉的时候,自动core dump呢?可以通过 ulimit查看和设置

#查看core文件的信息 ulimit -a

?Download download.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
ju@musicoder:~$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
ju@musicoder:~$

可以看到,core file size 是0,那就是说程序down了的时候,不会生成core文件,这个功能是关闭的。
More …

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

一、说明

如果设置了firefox退出时清除记录,那么firefox每次打开后,地址栏输入东西的时候,没有了之前的提示,上次关闭之前访问过的页面地址也不出来,如何让firefox保留,地址栏记录,经过google,原来在此设置。

二、方法

工具-选项-隐私

1.记住xxx天内访问的网页,前面的框勾上。

2.退出firefox时自动清除我的私有数据,前面的框不要打勾。

firefox_no_record

More …

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

2012-2
14
分类: 电脑应用 | 作者: ju | 访问:107 views | 2条评论 | | 查看评论 发表评论

一、说明

文档中有好多空行,想删除就得一个一个删除,对于一个大点的文本来说,那是一件很头痛的事,网上肯定也有一些什么什么的软件,要么连接到黄色网站,要么是广告网站,或者病毒网站,用C++写一个也用不了几句话。但无论如何,还是一个批处理程序来的最快。

二、方法

新建一个文本文档,改扩展名txt为bat,加入下面的内容,保存。

1
2
3
4
5
6
@echo off
for %%a in (*.txt) do (
for /f "tokens=*" %%b in ('type "%%a"') do echo %%b>>"1%%a"
del "%%a"
ren "1%%a" "%%a"
)

三、使用

它会遍历所有的txt文件,所以最好还是把要处理的txt文件,放一个文件夹中,然后也把这个批处理程序也放到相同的文件夹下面运行就可以,然后文本文档的空行就会被删除。(记得备份哦)

wp_dos_line

四、增加空行

如果想要增加空行怎么增加呢,也可以用一个批处理直接搞定

1
2
3
4
5
6
@echo off
for %%a in (*.txt) do (
for /f "tokens=*" %%i in ('type "%%a"') do echo     %%i>>"1%%a"
del "%%a"
ren "1%%a" "%%a"
)

五、OK

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

一、说明

2011年5月25日,WordPress表示,WordPress认为,由于网页技术的进步越来越多复杂的代码已经被加入,IE6无论是性能还是支持度都相当低下,并且编写代码时提供对IE6的支持要花费大量的时间。他们将在最新一次更新中放弃对Internet Explorer 6的支持。

还有看到下面这些话:

据了解,新版WordPress在被IE6访问时会跳出红色警告框并提示升级,而其它”过时”的浏览器会导致橙色警告,并同样提供升级主流浏览器的链接。

但按原理来说也不真实,wordpress只是后台程序而已,真正对IE6头疼的只是前端人员,这不高耦合了么。

经过证实,只是在登录后台后,有些功能不能用而已。

虽然其它浏览器上看着好好的,在IE6上可能变形,但IE6还是有它的用户量,特别是在国外,人家的软件不是你想安就有盗版让你安的。国内虽然盗版多,但信息技术落后,用IE的用户可能也不在少数。有义务提醒他们,或者让他们知道,世界上还有更好的浏览器,也算是对国家信息产业的贡献。

二、方法

只需把下面代码添加到head.php文件的head区域即可,里面的提示文字可以自行修改。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
<!--[if lt IE 7]>
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>    
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'>
<a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a>
</div>    
<div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>      
<div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div>      
<div style='width: 275px; float: left; font-family: Arial, sans-serif;'>        
<div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>您正在使用已经过时的IE 6浏览器!</div>        
<div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>由于IE 6的安全问题以及对互联网标准的支持问题,建议您升级您的浏览器,以达到更好的浏览效果!</div>     
</div>      
<div style='width: 75px; float: left;'><a href='http://www.firefox.com' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>      
<div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div>      
<div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>      
<div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>    
</div>  
</div>  
<![endif]-->

自己改了7为9后,用IE8测试了一个图:

wp_ie_tip

三、推荐大家都用Forefox.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

一、说明

3Dplanesoft.com一直以制作精良屏保闻名于世,涉及的主题包括:中世纪学者居所,俯视地球,魔法森林,机械时钟,自然景观,火和壁炉,沉船和珍宝,怀表,水下的世界(热带鱼),梦想中的天堂等等.惊艳得让你对屏保有全新的看法。

二、图片

其中有一个Deep Space的太空屏保超级精良,十分美丽。

Deep Space Screenshot 02

Deep Space Screenshot 01


More …

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading ... Loading ...

一、说明

之前看到很多页面都有这个效果,在网速比较卡的时候给人一种缓冲的特效,效果还很不错,也用到了自己的网站,备份一下。

二、代码

(1)简单的淡入效果:

1
2
3
4
5
6
<script type="text/javascript">
//页面淡入淡出
$(document).ready(function() {
$('body').hide().fadeIn(1000);
});
</script>

(2)淡入淡出效果
More …

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

第 1 页,共 7 页12345...最旧 »
Tinkerbell Personal Checks |Garden Planters | Jewellery For Women | Best Dog Foods | Budget Wedding Gowns | Shop For Jewellery | Vintage Jewellery| Diamante Jewellery | Car Finance Credit | DoorStep Loans