wxWidgets中ListCtrl中的item数据遍历

在Ubuntu上安装,我现在比较喜欢用sudo apt-get install,简单。如果实在想手工干,当然下源码。
wxWidgets安装比较简单:

sudo apt-get install libwxbase2.8-dev wx2.8-i18n wx2.8-headers wx2.8-examples python-wxgtk2.8
需要安装的还有:
libwxgtk2.8-dev
libwxgtk2.8-dbg
wx-common
wxWidgets Examples安装目录是:/usr/share/doc/wx2.8-examples/
编译ListCtrl例子,需要将几个.gz解开即可。为了遍历数据,需要如下代码:

// 数据列表在此导出
int ItemCount, ColumnCount;
wxListItem Item;
wxString itemInfo;

ColumnCount = m_listCtrl->GetColumnCount();
ItemCount = m_listCtrl->GetItemCount();

Item.m_itemId = -1; //这个指出第一行,就是标题行
Item.m_mask = wxLIST_MASK_TEXT;
for(int i=0; i<columncount ; i++) {
//
m_listCtrl->GetColumn(i, Item);

itemInfo += wxT(">>") + Item.m_text;
}
itemInfo += wxT("\n"); //

for(int i=0; i<itemcount ; i++) {
Item.m_itemId = i; // 行从0开始
for(int j=0; j<ColumnCount; [...]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

安装NFS服务

本来想着在那台老的、旧的电脑上安装个NFS Server作为公共数据存储。毕竟为了下载配置了一块大硬盘。不过NFS在Windows上没有开源或者免费的服务版本,就作罢。还是在虚拟机里安吧。仅测试。
1.服务器安装
sudo apt-get install nfs-kernel-server nfs-common portmap
2. 服务器配置
sudo dpkg-reconfigure portmap
sudo /etc/init.d/portmap restart
3. 编辑/etc/exports,明确共享的目录和权限
sudo vi /etc/exports
如:/files 192.168.1.0/24(rw,no_root_squash,async)
rw,no_root_squash全面读写权限,允许范围,192.168.1.1~192.168.1.254
保存之后执行
sudo exportfs -a
4. 使用showmount 命令
showmount -e查看export的目录配置
5. 客户机安装client
sudo apt-get install portman nfs-common
sudo mount -t nfs X.X.X.X:/…/…/ /mnt
成功
6.如果想开机加载
sudo vi /etc/fstab
加入
x.x.x.x:/…/…/ nfs rsize=8192,wsize=8192,timeo=14, intr
我的因为是NFS这台电脑是虚拟出来的,就不试这个功能了。
参考:
1.HOWTO: NFS Server/Client
2. Ubuntu: How to setup an nfs server

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

Ubuntu, LAMP

1. install apache2
sudo apt-get install apache2
2. install mysql
sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
3. install php
sudo apt-get install php5-common php5-gd php5-mysql libapache2-mod-php
至于修改配置文件,我只是在/etc/apache2/httpd.conf中增加了
DirectoryIndex index.php index.htm index.html
又及:
1. 安装phpmyadmin
sudo apt-get install phpmyadmin
2. 今天学到
sudo apt-cache search …
可以搜得…相关的包名称

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

Please install the build and header files headers?

sudo apt-get install build-essential linux-headers-`uname -r`

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

apt-get,你说的模块名好难猜

测试coreseek中。
Ubuntu中的apt-get很好用,一行命令下去,下载、安装全搞定,很方便。新立得(synatpic)更方便,图形化的,直接搜索确定就好了。可是我用今天要用Ubuntu Server,连个图形都没装。这两个就都不方便了。
编译Coreseek Fulltext Server要用gcc,搞定它要mysql支持。于是尝试apt-get
1. sudo apt-get install gcc
ok.这个很方便
2. ./configure提示需要mysql-devel于是就
sudo apt-get install mysql-devel
….不成功
后来查了一下forum.ubuntu.org.cn才得知这个开发包要这么安:
sudo apt-get install libmysqlclient15-dev
这个模块名端地是很风骚。为啥就不用mysql-devel呢?用了synaptic发现是这个原因?

3. 这个名字难猜那就试试mysql server吧
sudo apt-get install mysql 失败
sudo apt-get install mysqlserver 失败
sudo apt-get install mysql-server 成功
乖乖龙滴东~~~
女孩的心事你别猜~~~

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks