May 1

Ubuntu 让fstab即时生效 不指定

felix021 @ 2008-5-1 17:13 [IT » 操作系统] 评论(0) , 引用(0) , 阅读(5744) | Via 本站原创
不重启Ubuntu,让fstab中新加的行即时生效:
sudo mount -vt usbfs none /proc/bus/usb -o devgid=1002,devmode=664bu chon
Tags: ,
May 1
在Linux下查看chm文件的程序: kchmviewer

$sudo apt-get install kdebase kchmviewer

因为kchmviewer是kde桌面环境的程序,可能要安装kdebase(没有测试过,因为Felix的Hardy上之前就安装了KDEBase)
Tags: ,
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) , 阅读(4143) | 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: ,
分页: 73/103 第一页 上页 68 69 70 71 72 73 74 75 76 77 下页 最后页 [ 显示模式: 摘要 | 列表 ]