posts - 319, comments - 22, trackbacks - 0, articles - 11
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

     摘要: 字符集编码与 C/C++ 源文件字符编译乱弹 2010年2月24日Breaker原创发表评论阅读评论 最近在看国际化编程 (i18n: internationalization) 的东西,也弄清楚了点字符集有关的一些问题,其实网上的一些牛人已经将字符集、Unicode 等相关的问题说的很清楚了,我在这里引用他们的总结并自己小结一下心得,并且实验一下在编译时,源代码自身的字...  阅读全文

posted @ 2011-05-12 21:40 RTY 阅读(471) | 评论 (0)编辑 收藏

Xilisoft Video Converter Ultimate 6.5 是一款简单,快速,可靠,转换格式超过 150 种 视频和音频转换器,支持转换几乎所有流行的格式音视频格式 AVI, MPEG, WMV, DivX, MP4, H.264/AVC, AVCHD, MKV, RM, MOV, XviD, 3GP,MP3, WMA, WAV, RA, M4A, AAC, AC3, OGG。针对 PSP, PS3, iPod, iPhone, Apple TV, Xbox, Google phones, iPad 等常用的数码设备,提供了最有效的方法来解码 /编码高清视频等预置方案。
此外,从视频中抓取您喜爱的图片或者将多张图片製作成独特的视频,合併,剪裁,剪辑录像;调整视频顏色和效果,加水印,字幕和音轨,并设定视频 /音频参数。支持多线程和批量转换,多核心CPU处理,转换速度快。随著 Xilisoft视频转换器6,你永远不会缺少办法,使您的影片视觉和听觉都令人惊讶。软件语言多国语言含简体中文版。
主要功能:
˙高清晰度视频转换器,HD Video 如 H.264/MPEG-4 AVC, AVCHD Video (*.m2ts, *.mts), Apple TV h.264 720P, MKV, HD WMV, and MPEG2/MPEG-4...
˙支持多核心 CPU 处理,多线程和批量转换。现在快 5倍!
˙支持高清视频解码 /编码和 5.1 杜比环绕声。
˙转换所有流行的视频和音频格式。
˙合併多个视频或图片,并添加每两个文件之间的转换,以获得一个完整的视频。
˙剪辑视频文件,以获取你最喜欢的片段,并选择将其合併成一个新的视频。

Xilisoft Video Converter Ultimate官方网站:
http://www.xilisoft.com/
Xilisoft Video Converter Ultimate v6.5.2官方下载:
http://www.xilisoft.com/downloads/x-video-converter-ultimate6.exe
Xilisoft Video Converter Ultimate v6.5.2注册码:
用户名:www.yyyww.com
注册码:898F677B-5EDF-444C-B9843-8B0F-7D35-AD9E 

新闻来源:yyyww咿呀呀www.yyyww.com  原文链接:http://www.yyyww.com/application/2011-02-06/356.html

posted @ 2011-05-12 21:33 RTY 阅读(1323) | 评论 (0)编辑 收藏

Microsoft Mathematics 提供了一套数学工具,可以帮助学生轻松快速地完成学校作业。 通过 Microsoft Mathematics,学生可以在更好地了解预代数、代数、三角法、物理学、化学和微积分方面的基本概念的同时,学会分步解方程。
Microsoft Mathematics 包含一个功能全面的图形计算器,其功能可媲美手持计算器。 其他的数学工具还可帮助您计算三角关系、将一种单位制转换为另一种单位制以及解方程组。
Microsoft Mathematics 提供了图形计算器(可用于绘制 2D 和 3D 图形)、分步解方程功能以及帮助学生进行数学和科学研究的有用工具。

Microsoft Mathematics官方下载网站:
http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=9caca722-5235-401c-8d3f-9e242b794c3a
Microsoft Mathematics 4.0简体中文版下载地址:
32位下载     64位下载

 

-
2 顶0 踩
新闻来源:yyyww咿呀呀www.yyyww.com  原文链接:http://www.yyyww.com/application/2011-04-22/547.html

posted @ 2011-05-12 21:31 RTY 阅读(287) | 评论 (0)编辑 收藏

avast! Internet Security 提供全面的防病毒、反间谍、反垃圾邮件和防火墙防护功能,现在又增加了全新的 avast! SafeZone 技术。 它可以创建一个隔离的虚拟桌面,供您安全地进行网上购物和网上银行操作,而任何黑客均无法察觉这一桌面。
绝对隐私的网上购物和网上银行操作
avast! SafeZone 可打开一个新的(干净的)桌面,其他程序不会侦测到您当前的操作,并且在此桌面关闭后不会留下任何历史记录。 使用社交网络和进行网上冲浪均可安全无忧
我们获认证和屡获好评的一流防病毒软件引擎和防护功能甚至可以阻挡先前未知的威胁 – 让您在聊天或使用社交网站(如 Facebook、Twitter 等)时无后顾之忧。
防止个人信息盗窃
我们的静默防火墙可阻挡针对您计算机的黑客攻击和其他未授权访问,确保您的数据万无一失。
保持您的邮件收件箱安全和干净
Internet Security 的反垃圾邮件功能可阻止垃圾邮件以及狡猾的钓鱼软件,避免您点击会令您蒙受损失的“无恶意”链接。

avast! Internet Security中文官方网站:
http://www.avast.com/zh-cn/index
avast! Internet Security 6.0.1125多国语言含简体中文版下载地址:
http://files.avast.com/iavs5x/setup_ais.exe
avast! Internet Security 6.0.1125许可文件下载:


Net2012-02-16License.rar 1f44788d11a5c8494333a8e7afe2ecaa.rar (1015 Bytes)

 

-
4 顶1 踩
新闻来源:yyyww咿呀呀www.yyyww.com  原文链接:http://www.yyyww.com/anquan/2011-05-11/603.html

posted @ 2011-05-12 21:26 RTY 阅读(1287) | 评论 (0)编辑 收藏

很多网友卸载低版本,想安装新版本或者安装了版本无法激活,又卸载,重新安装这样会导致office在安装或者卸载的时候出现各样的错误,以至于不能安装任何版本的office.
当您尝试安装新程序时,安装过程并未完成。因此,该程序处于部分安装状态。当您尝试再次安装该程序时,将不会成功。
此时无法删除以前安装的程序,因为安装文件已损坏。
如果以前尝试安装 Office 2010 时遇到问题。笔者最近就遇到无法卸载office 2010,点击卸载没有任何反应,才用此软件解决


Office 2010卸载工具下载:
http://download.microsoft.com/download/2/1/8/218C926D-9400-43D6-9E81-E236AD9ED2A5/MicrosoftFixit50450.msi
Office 2007卸载工具下载:
http://download.microsoft.com/download/B/C/7/BC767024-747D-417A-BFCF-3C0806826140/MicrosoftFixit50154.msi
Office 2003卸载工具下载:
http://download.microsoft.com/download/D/1/8/D1893A85-9299-4372-9B51-DAACE77CEDEE/MicrosoftFixit50416.msi


详细介绍:http://support.microsoft.com/kb/290301


新闻来源:yyyww咿呀呀www.yyyww.com  原文链接:http://www.yyyww.com/jiqiao/2010-11-21/69.html

posted @ 2011-05-12 21:22 RTY 阅读(825) | 评论 (0)编辑 收藏

目前苹果Mac OS X 10.6.7系统版本已经支持更新下载了,目前所有的MAC OS X 10.6用户都可以升级到10.6.7版本。
Mac OS X 10.6.7主要更新带来了更佳的AirPay支持,Bonjour服务也提升了对Windows文档共享的支持度,同时改进了图形驱动,修复了Mac App Store上的一些漏洞。
详细更新介绍可查看官方网站:
http://support.apple.com/kb/HT4472
简体中文更新包下载地址:
http://support.apple.com/downloads/DL1363/zh_CN/MacOSXUpd10.6.7.dmg
英文版更新包下载地址:
http://support.apple.com/downloads/DL1363/en_US/MacOSXUpd10.6.7.dmg

新闻来源:yyyww咿呀呀www.yyyww.com  原文链接:http://www.yyyww.com/news/2011-03-22/471.html

posted @ 2011-05-12 21:17 RTY 阅读(500) | 评论 (0)编辑 收藏

EASEUS Partition Master是一所有功能于一身的分区解决方案和磁盘管理实用程序。它允许您扩展分区,特别是系统驱动器,解决磁盘空间不足的问题,轻松管理磁盘空间MBR和GUID分区表(GPT)在32位和64位上的Windows 2000 / XP / Vista/Windows 7。
最流行的硬盘管理功能,汇聚了强大的数据保护,包括:分区管理,磁盘和分区复制向导和分区恢复向导。此外,你可以建立在系统启动故障的情况下可启动的CD / DVD。

EASEUS Partition Master Professional官方网站:
http://www.easeus.com/
EASEUS Partition Master 8.0.1 Professional Edition活动完整版下载地址:
http://ishare.iask.sina.com.cn/f/14459128.html
注:软件活动时候的完整版本,安装无需任何序列号


新闻来源:yyyww咿呀呀www.yyyww.com  原文链接:http://www.yyyww.com/qita/2011-04-07/515.html

posted @ 2011-05-12 21:13 RTY 阅读(333) | 评论 (0)编辑 收藏

http://blog.163.com/modingfa_002/blog/static/11092546620114105622401/?latestBlog

一、lupdate 的命令行参数说明

 1 Usage:
 2     lupdate [options] [project-file]qt lupdate 功能说明 - modingfa_002 - 出发了不要问路在哪!
 3     lupdate [options] [source-file|path|@lst-file]qt lupdate 功能说明 - modingfa_002 - 出发了不要问路在哪!  -ts ts-files|@lst-file
 4 
 5 lupdate is part of Qt's Linguist tool chain. It extracts translatable
 6 messages from Qt UI files, C++, Java and JavaScript/QtScript source code.
 7 Extracted messages are stored in textual translation source files (typically
 8 Qt TS XML). New and modified messages can be merged into existing TS files.
 9 
10 Options:
11     -help  Display this information and exit.
12     -no-obsolete
13            Drop all obsolete strings.
14     -extensions <ext>[,<ext>]qt lupdate 功能说明 - modingfa_002 - 出发了不要问路在哪!
15            Process files with the given extensions only.
16            The extension list must be separated with commas, not with whitespace
17 .
18            Default: 'java,jui,ui,c,c++,cc,cpp,cxx,ch,h,h++,hh,hpp,hxx,js,qs,qml'
19 .
20     -pluralonly
21            Only include plural form messages.
22     -silent
23            Do not explain what is being done.
24     -no-sort
25            Do not sort contexts in TS files.
26     -no-recursive
27            Do not recursively scan the following directories.
28     -recursive
29            Recursively scan the following directories (default).
30     -I <includepath> or -I<includepath>
31            Additional location to look for include files.
32            May be specified multiple times.
33     -locations {absolute|relative|none}
34            Specify/override how source code references are saved in TS files.
35            Default is absolute.
36     -no-ui-lines
37            Do not record line numbers in references to UI files.
38     -disable-heuristic {sametext|similartext|number}
39            Disable the named merge heuristic. Can be specified multiple times.
40     -pro <filename>
41            Name of a .pro file. Useful for files with .pro file syntax but
42            different file suffix. Projects are recursed into and merged.
43     -source-language <language>[_<region>]
44            Specify the language of the source strings for new files.
45            Defaults to POSIX if not specified.
46     -target-language <language>[_<region>]
47            Specify the language of the translations for new files.
48            Guessed from the file name if not specified.
49     -ts <ts-file>qt lupdate 功能说明 - modingfa_002 - 出发了不要问路在哪!
50            Specify the output file(s). This will override the TRANSLATIONS
51            and nullify the CODECFORTR from possibly specified project files.
52     -codecfortr <codec>
53            Specify the codec assumed for tr() calls. Effective only with -ts.
54     -version
55            Display the version of lupdate and exit.
56     @lst-file
57            Read additional file names (one per line) from lst-file.
58 


二、lrealease的命令行参数说明

 1 Usage:
 2     lrelease [options] project-file
 3     lrelease [options] ts-files [-qm qm-file]
 4 
 5 lrelease is part of Qt's Linguist tool chain. It can be used as a
 6 stand-alone tool to convert XML-based translations files in the TS
 7 format into the 'compiled' QM format used by QTranslator objects.
 8 
 9 Options:
10     -help  Display this information and exit
11     -idbased
12            Use IDs instead of source strings for message keying
13     -compress
14            Compress the QM files
15     -nounfinished
16            Do not include unfinished translations
17     -removeidentical
18            If the translated text is the same as
19            the source text, do not include the message
20     -markuntranslated <prefix>
21            If a message has no real translation, use the source text
22            prefixed with the given string instead
23     -silent
24            Do not explain what is being done
25     -version
26            Display the version of lrelease and exit
27 


三、示例说明
1. 提取aboutDialog.cpp欲翻译的内容到ts文件中

lupdate -codecfortr GB2312 aboutdialog.cpp -ts aboutdialog.ts

2.如何在程序中使用ts生成的qm文件,下面用硬代码来解释
 1 #include <QtGui>
 2 #include "mainwindow.h"
 3 
 4 int main(int argc, char *argv[])
 5 {
 6     QApplication app(argc, argv);
 7 
 8     QTranslator translator;
 9     bool b = false;
10     b = translator.load("aboutdialog.qm");
11     app.installTranslator(&translator);
12 
13 
14     MainWindow w;
15     w.show();
16 
17     return app.exec();
18 }
19 

3. 加载多个独立的qm文件。一个QTranslator对象只有最后load的才算数!
    QTranslator translator;
    bool b = false;
    b = translator.load("aboutdialog.qm");
    b = translator.load("mainwindow.qm");
    app.installTranslator(&translator);
说明:只有"mainwindow.qm" 文件被正常使用。

下面可以通过声明两个Translator对象进行load,然后安装就可以分模块使用了!
1     QTranslator translator1, translator2;
2     bool b = false;
3     b = translator1.load("aboutdialog.qm");
4     b = translator2.load("mainwindow.qm");
5     app.installTranslator(&translator1);
6     app.installTranslator(&translator2);

posted @ 2011-05-12 07:27 RTY 阅读(554) | 评论 (0)编辑 收藏

和C#类似,Qt为类提供了可以“获取”、“设置”的快捷方式——Property,目的都是为了:数据成员方式使用,(函数成员方式定义)。
C#使用get、set方式,达到“数据成员方式定义”的属性;
Qt使用普通函数成员+Q_PROPERTY宏,完成属性,及元数据(简单说:就是运行时可以查看的有关类的信息)的加入;



<*.h>
……
Q_PROPERTY( type name READ getFunction [WRITE setFunction] [RESET resetFunction] [DESIGNABLE bool] [SCRIPTABLE bool] [STORED bool] )

/*
Q_PROPERTY宏:将信息注册如元对象(QMetaObject),
QMetaObject类:提供一系列方法,查询、修改已经注册进的信息(如:属性、枚举、继承关系、类名、信号、槽);
QObject类就利用QMetaObject来查询、修改属性的,同时也是一种“运行期操作类属性”的方法;
name用于QObject获取、设置属性时使用;
READ是必须的,不同与C#(C#可以仅定义只写属性);
*/

public:
        void setFunction(type);  
// 参数(或下面get函数的返回值)的类型(type)可以是QVariant的继承类,                                        
//也可以是enum,但必须用Q_ENUMS(myenum……)注册为元对象。

        type getFunction() const;
        void resetFunction();
private:
        type n;
……


<*.cpp>
……
void MyClass::setFunction(type name)
{
        n = name;
}
type MyClass::getFunction() const
{
        return n;
}
void MyClass::resetFunction()
{
        n = defaultName;
}
……


<使用方法>

方法一:
MyClass *mc =……;
mc->setFunction(value);
mc->getFunction();

方法二:

QObject *qo = ……;
qo->setProperty("name",value);
qo->getProperty("name");


除了上面提到的,QT的元对象还提供了一些其他的东东:
宏有:
Q_OBJECT
Q_PROPERTY
Q_ENUMS
Q_CLASSINFO
Q_OVERRIDE

tr()和trUtf8() 两个函数是用于国际化中的字符串翻译
______________________________________________________________________-

定义格式如下:
Q_PROPERTY(type name
           READ getFunction
           [WRITE setFunction]
           [RESET resetFunction]
           [DESIGNABLE bool]
           [SCRIPTABLE bool]
           [STORED bool])
Q_PROPERTY() 是一个宏,用来在一个类中声明一个属性property,由于该宏是qt特有的,需要用moc进行编译,故必须继承于QObject类。在外界看 来,property跟类中数据成员没有什么区别,但是还是有几点不一样,参考qt文档,主要有以下几点:
1.必须有一个read函数。
2.有一个可选的write函数。
3.如果定义了"stored"属性表明这是一直存在的。
4.一个reset函数能够把property设置成其默认状态
5.一个"desinable"属性表明该property能在GUI builder(一般为Qt Designer)可见

然后对照这些,自己写了一个例子

class Test : public QObject
{
  Q_OBJECT
  Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled)
public:
  Test(QObject *parent = 0) : QObject(parent) {}  
  virtual ~Test(){}
  void setEnabled(bool e) { enabled = e; }
  bool isEnabled() const { return enabled; }

private:
  bool enabled;
};

然后在主函数中
Test *test = new Test;
test->setProperty("enabled", true);
//test->setEnabled(true);        //ok also work
if(test->property("enabled").toBool())

posted @ 2011-05-12 07:24 RTY 阅读(1889) | 评论 (0)编辑 收藏

1.程序中要国际化的静态字符串用tr()<源代码是latin1字符串时>及trUtf8()<源代码不是latin1字符 时>

2.动态string用qstring的arg()方法,如tr("host %1 found").arg(hostname),所谓动态是指需要参数生成字符串

3.在用tr转换变量之前,变量用QT_TR_NOOP,此方法用在静态字符串数组上
  如: static const char *greeting_strings[] = {
         QT_TR_NOOP("Hello"),
         QT_TR_NOOP("Goodbye")
     };
     tr(greeting_strings[0]);
 
4.宏QT_NO_CAST_FROM_ASCII强制tr检查

5. QTextCodec及QTextStream提供不同的字符编码支持。app可能偶尔需要输入输出不同于locale编码的字符编码。
app运行时,系统的locale决定了8-bit 数据的8-bit 编码方式。
当app在Cyrillic KOI8-R locale (the de-facto standard locale in Russia)需要输出Cyrillic in the ISO 8859-5 encoding,可用如下参考代码:
QString string = ...; // some Unicode text
 QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
 QByteArray encodedString = codec->fromUnicode(string);
  从Unicode转化到local 8-bit 编码,一个简便方法是用QString::toLocal8Bit(),另一个是用 QString::toUtf8()
  烦方向的转换有 QString::fromUtf8() and QString::fromLocal8Bit(),或更通用的从ISO 8859-5 Cyrillic到Unicode的转换:
    QByteArray encodedString = ...; // some ISO 8859-5 encoded text
 QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
 QString string = codec->toUnicode(encodedString);
 
QTextCodec::codecForLocale()返回的编码方式是最可能需要支持的编码方式,因为用户最可能使用它与其他人分享交流文档。

如果tr中不是latin1,在.qro中增加codecfortr = utf-8指明字符编码,在main中也应QTextCodec::setCodecfortr


6.QApplication::setLayoutDirection可以设置书写方向

7.可以把qm文件放在exe中,可以用qt的资源系统

8. 在app中用QTranslator::load()及QCoreApplication::installTranslator()根据用户语言加载语 言文件.
qt可以安装多个QTranslator
int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);

     QTranslator qtTranslator;
     qtTranslator.load("qt_" + QLocale::system().name(),
             QLibraryInfo::location(QLibraryInfo::TranslationsPath));
     app.installTranslator(&qtTranslator);

     QTranslator myappTranslator;
     myappTranslator.load("myapp_" + QLocale::system().name());
     app.installTranslator(&myappTranslator);

     ...
     return app.exec();
 }

9.qlocale可以指定数字和日期时间。其他locale信息可用C++标准函数setlocale或localeconv
10.icon的国际化,可在qre文件中用lang属性:
如<qreresource>
 </qreresource>
 <qreresource lang="es">
 </qreresource>
11. 1)在.qro中增加欲支持的语言,
  TRANSLATIONS=app-cn.ts \
  app-fr.ts \
  app-ca.ts

 2)lupdate提取所有的tr中的字符形成qm文件
 3)用qt linguist转换不同语言
 
 4)用lrelease把.ts文件转换成二进制的.qm文件

posted @ 2011-05-12 07:21 RTY 阅读(951) | 评论 (0)编辑 收藏

仅列出标题
共31页: First 21 22 23 24 25 26 27 28 29 Last