Disk(盘片) 光盘、磁盘等等碟形物,计算机领域常指磁盘,软盘、硬盘等。 Hard Disk(硬盘) 磁盘的一种,这里以它作为主要对象来说说。 Track(磁道) 盘面可以划分出若干同心圆环,每个圆环是一个磁...
编译用于在 Windows 系统下开发 ARM Linux 的 Qt 库
1、在 https://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/ 下载 Windows 版 ARM 交叉编译工具链。 Sourcery CodeBench Lite Edition Sourcery CodeBench Lite Edition is a free, unsupported version of Sourcery CodeBench, available for select processors. Sourcery CodeBench is a complete development environment for embedded C/C++ development. Sourcery CodeBench Lite Edition includes: GNU C and C++ compilers GNU assembler and linker C and C++ runtime libraries GNU debugger 我使用的是 arm-2014.05-29-arm-none-linux-gnuea...
iF.SVNAdmin 安装和使用笔记
iF.SVNAdmin 是一个基于 Web 的 GUI(图形用户界面)工具,用于管理 Subversion 的库和授权文件。 安装 Apache: yum -y install mod_dav_svn #apache svn支持模块 安装 PHP: yum -y install php 安装 Subversion yum -y install subversion svnserve --version #查看版本信息,测试安装是否成功 安装 iF.SVNAdmin: wget https://github.com/mfreiholz/iF.SVNAdmin/archive/stable-1.6.2.tar.gz tar -zxf stable-1.6.2.tar.gz mv iF.SVNAdmin-stable-1.6.2/ /data/svnadmin/ chown -R apache:apache /data/svnadmin/ 在 /etc/httpd/conf.d/ 创建一个虚拟服务器配置:svnadmin-vhost.conf Listen 888 <VirtualHost 192.168.72.100:888> ServerAdmin name@email.com ServerName 192.168.72.100 ErrorLog /etc/httpd/logs/svnadmin-error_log TransferLog /etc/httpd/logs/svnadmin-access_log SSLEngine on SSLCertificateFile /data/ssl/localhost.crt SSLCertificateKeyFile /data/ssl/localhost.key DocumentRoot /data/svnadmin <Directory "/data/svnadmin"> Options FollowSymLinks AllowOverride all Require all granted </Directory> Alias /svn /var/www/svn1 <Location /svn> DAV svn SVNParentPath /data/svn1 AuthzSVNAccessFile /data/svn1/authz AuthUserFile /data/svn1/htpasswd AuthName "Subversion Repositories" AuthType Basic Require valid-user </Location> </VirtualHost> 创建服务目录: mkdir /data/svn1 touch /data/svn1/authz touch /data/svn1/htpasswd chown -R apache:apache /data/svn1 禁用 SELinux: setenforce 0 #临时关闭 vim /etc/selinux/config 将SELINUX=enforcing改为SELINUX=disabled #需要重启 配置防火墙: firewall-cmd --permanent --add-port=888/tcp systemctl restart firewalld systemctl restart httpd.service 打开网页 https://192.168.72.100:888,跳转到初始化配置页面,配置如下: Subversion authorization file: /data/svn1/authz User view provider type: passwd User edit provider type: passwd Group view provider type: svnauthfile Group edit provider type: svnauthfile Repository view provider type: svnclient Repository edit provider type: svnclient User authentication file (SVNUserFile): /data/svn1/htpasswd Parent directory of the repositories (SVNParentPath): /data/svn1 Subversion client executable: /usr/bin/svn Subversion admin executable: /usr/bin/svnadmin 保存配置,提示自动生成管理员账户和密码:User: admin ,Password: admin 编辑配置文件: vim /data/svnadmin/data/config.ini 在[GUI]下增加一行: ApacheDirectoryListing=https://192.168.72.100:888/svn/%1/%2 源码修改记录: function xml_svn_list_character_data($xml_parser, $tagdata) 中的 $this->curList->curEntry->name.= self::encode_string(trim($tagdata)); trim函数会使 “01 测试”类似的字符与汉字间的空格也被清掉,临时换用ltrim来解决这个问题。 改为: $this->curList->curEntry->name.= self::encode_string(ltrim($tagdata)); 中文库名的支持: 从 1.7 版本开始使用 Apache + SVN,虽然在默认的情况下,mod_dav_svn 支持库内出现非纯英文命名的文件夹或文件名,但是一直不支持库名中出现非纯英文的字符。 试了很多方法都不能解决,偶然间了解到 mod_dav_svn 使用 7 位的 ASCII 编码与其钩子脚本交互,所以对于 UTF-8 等多字节的编码是不支持的,所以总会出现 Internal error: Can't convert string from 'UTF-8' to native encoding,即使库名已经使用了 UTF-8 编码也不行。 从 1.8 版本开始支持 SVNUseUTF8 On|Off 配置,在 httpd.conf 中添加一行: SVNUseUTF8 On 就可以支持中文的库名...
Qt Property
在 C# 等语言中提供了 Property (属性)特性,对类内部的私有变量(字段)对外界提供读写方法和控制,而 C++ 没有提供这种特性。有些编译器,比如 C++ Builder 提供了 __property 关键字就是为了扩展 C++ 的这一特性。然而基于标准 C++ 编译器的 Qt 并没有这样去做。 除了使用模版、重载操作符来模拟属性的功能,通常简单地写出读、写公共函数,对私有变量进行操作。Qt 还提供了一种基于 moc (Meta-Object Compiler)的动态属性方法:QObject::property() 与 QObject::setProperty()。使用 QObject::setProperty() 还可以方便地在运行时动态地添加和删除新的属性。看下面一个例...