May 1
刚安装好VirtualBox,新建虚拟机,配置完毕,双击运行->出错:
The VirtualBox kernel driver is not accessible to the current user.
Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups.
You will need to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).

错误提示的意思是当前用户无法访问/dev/vboxdrv
解决办法就是:
系统管理->用户和组->(解锁)->管理组->找到vboxusers组双击,勾选当前用户,确定->注销->登录->OK

当然,你也可以手动改配置文件:
#先备份
$sudo cp /etc/group /etc/group.bak001
#修改
$sudo gedit /etc/group
找到vboxusers开头的行,在末尾加入你的用户名,保存退出,注销,登录,OK

------------------

如果错误提示是:
VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Please install the virtualbox-ose-modules package for your kernel, e.g. virtualbox-ose-modules-generic..
VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).
返回 代码:
0x80004005
组件:
Console
界面:
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}

解决办法,转自 http://bbs.zdnet.com.cn/archiver/tid-396913.html
sudo apt-get install virtualbox-ose-source
安装模块源码然后
cd /usr/src
解压源码
sudo tar xjvf virtualbox*.bz2
cd modules/virtualbox-ose
sudo ./build_in_tmp install
让他编译安装模块驱动
完成后
sudo /etc/init.d/vboxdrv start

* Starting VirtualBox kernel module vboxdrv [ OK ]


VB能起来了,但是在虚拟机里不能用键盘,解决方法如下:

打开新立得,把scim-bridge- client-qt重装了下,同时把scim-bridge-client-qt4也给装了,然后virtualbox里的键盘就可以用了。
Tags:
May 1
2008年4月27日第二届中南地区程序设计邀请赛(国防科技大学)决赛B题
Problem B - The missionaries and cannibals

Desciption
Apr 30

emerald 不指定

felix021 @ 2008-4-30 21:23 [IT » 操作系统] 评论(0) , 引用(0) , 阅读(4020) | Via 本站原创
Emerald是一个很不错的小巧的桌面主题管理器,可以自定义出很漂亮的效果。

sudo apt-get install emerald

运行emerald --replace启动
Tags: ,
Apr 30
如/dev/sda1是第一硬盘第一分区,可能是安装了windowsxp的ntfs分区,可先在/media下建立好sda1文件夹
引用
$sudo mkdir /media/sda1


然后修改/etc/fstab文件
引用
$sudo gedit /etc/fstab

加入:
引用
UUID=0A240F82240F6FCD /media/sda1 ntfs-3g defaults,locale=zh_CN.UTF-8 0 1


我的fstab文件内容:
Apr 29
Overload operator <<

felix写的一个简单例子:
#include <iostream>
using namespace std;
class testclass{
public:
  int a, b;
  testclass(int a1, int b1){
    a = a1, b = b1;
  }
  
  friend ostream & operator <<(ostream & os, testclass a1){
    cout << "a = " << a1.a << ", b = " << a1.b << endl;
    return os;
  }
  
  friend ostream & operator <<(ostream & os, testclass *a1){
    cout << "a = " << a1->a << ", b = " << a1->b << endl;
    return os;
  }
};//end of testclass

int main(){
  testclass *a1 = new testclass(1, 2);
  cout << a1;
  cout << *a1;
  getchar();
  return 0;
}

下面是更详细的重载各个流操作符的例子,原出处是Thinking In C++
copy 自 http://www.cndev.org/forum/msg.aspx?pid=233806
Tags: ,
Apr 29
from http://www.vckbase.com/document/viewdoc/?id=1356

C++ 中重载 + 操作符的正确方法

作者:Danny Kalev
编译:MTT 工作室

原文出处:Overloading Operator + the Right Way

摘要:本文概要性地介绍如何选择正确的策略来为用户定义类型重载 + 操作符。
Tags: ,
Apr 27

TC2编程宝典 不指定

felix021 @ 2008-4-27 22:26 [IT » 程序设计] 评论(0) , 引用(0) , 阅读(3884) | Via 本站原创
下载文件 (已下载 1909 次)
Apr 24
ms已经是众人皆知的事情了,不过今天才知道Google为什么会有一个sb.google.com这个子域名:
from http://www.pconline.com.cn/pcedu/softnews/yejie/0609/865788.html

揭密:sb.google.com到底是什么入口?
出处:gseeker[ 2006-09-12 09:40:18 ]   作者:Ken Wong   责任编辑:linjixiong
  我们经常发现Google有一些趣的子域名,比如sina.google.com。后来有读者留言问到sb.google.com到底是什么入口?
  因为直接访问它会被转到Google主页。我当时也不知道答案。不过现在,答案似乎出现了。
  Philipp的一名读者无意中找到了Google的黑名单,而这个黑色单刚才是在sb.google.com上面的。另外,从它的链接即sb.google.com/safebrowsing/看来,sb指的应该就是SafeBrowsing(安全浏览)。因此我们不必再怀疑sb代表的是国内流行的那两个字了。
        Google做事总是出人意料
Tags: , ,
分页: 73/103 第一页 上页 68 69 70 71 72 73 74 75 76 77 下页 最后页 [ 显示模式: 摘要 | 列表 ]