Windows 7 下删除hiberfil.sys

May 12, 2009 · Filed Under Windows 7

C盘下有个hiberfil.sys,占用跟物理内存差不多大小的硬盘空间。删除方法是:

以管理员身份运行cmd,然后输入powercfg -h off即可,hiberfil.sys文件会自动消失。

ContextSwitchDeadlock was detected

May 7, 2009 · Filed Under C#

在运行C#程序的时候得到如下错误信息:

The CLR has been unable to transition from COM context 0×197060 to COM context 0×196ef0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

简单的修复方法是:(VS2005下) 打开 Debug -> Exceptions -> Managed Debug Assistants,

把ContextSwitchDeadlock取消勾选就可以了。

Ubuntu 无法启动Terminal

May 5, 2009 · Filed Under LINUX学习笔记, Ubuntu

从8.04升级到8.10后,打开Terminal后出现如下错误:

There was an error creating the child process for this terminal

Terminal打不开。

在/etc/fstab里添加如下两句后重启电脑就好了:
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0

SQL Server Management Studio 2008 – 没有Open Table这个选项的解决办法

May 1, 2009 · Filed Under Uncategorized

在SQL Server Management Studio 2005里,如果右键点击一个表,会有Open Table这个选项,查询表里所有的数据。

但在2008里,就没有这个选项了。默认的是Select Top 1000 Rows和Edit Top 200 Rows。原因是因为表只会越来越大,所以在打开一个很大的表的时候会浪费Server比较多的时间。对用户来说,这个不是每次都必须做的,所以在2008中把Open Table给去掉了。

有两个办法可以解决:

  • “Script table as” – “SELECT To” – “New Query Editor Window”,然后按F5就可以查询这个表中的所有数据
  • “Tools” – “Options” – “SQL Server Object Explorer” – “Commands”, 然后把”Value for Edit Top <n> Rows Command”从200改为你想要的数字,或者是0代表全部。把”Value for Select Top <n> Rows Command”从1000改为想要的数字或是0。这样在点击右键的时候,Select Top 1000 Rows和Edit Top 200 Rows就会变成Select All Rows和Edit All Rows。

WorkPress使用NextGen Gallery出现的GD2 LIBRARY错误

March 7, 2009 · Filed Under PHP

在本地Wordpress中使用NextGen Gallery相册。上传图片完成后,建立小图标的时候出现以下错误提示信息:
You do not have the GD Library installed. This class requires the GD library to function properly.
visit http://us2.php.net/manual/en/ref.image.php for more information

解决办法:

php.ini

:extension=php_gd2.dll

去除前面的分号

php.ini 重新复制到C:\windows

Apache 重启

← Previous PageNext Page →