小编Mat*_*Kri的帖子

用C#winforms绘制大文本文件的最快方法

我有一个大文本文件(~100MB),我将它的行保存在字符串列表中.我的Winform偶尔需要显示它的一部分,例如500,000行.

我尝试使用ListBox,RichTextBox和TextBox,但绘图花费了太多时间.

例如,TextBox需要25秒才能显示500,000行,而记事本会立即打开此大小的文本文件.

什么是最快的解决方案?

c# textbox notepad large-files winforms

7
推荐指数
1
解决办法
1514
查看次数

在Red Hat linux中编译g ++ 4.4.7上的C++ 11

我已经尝试过了:

g++ -std=c++11 my_file.cpp -o my_prog
g++ -std=c++0x ...
g++ -std=gnu++0x ... 
Run Code Online (Sandbox Code Playgroud)

我一直收到这条消息:

error: unrecognized command line option
Run Code Online (Sandbox Code Playgroud)

redhat compilation g++ c++11

7
推荐指数
1
解决办法
2万
查看次数

使用VS2012在C#上进行错误的浮点转换

我在这里用C#得到了一个非常奇怪的行为:

float num = 144771463f;
// num is 144771456.0
Run Code Online (Sandbox Code Playgroud)

我也试过了

float num = Convert.ToSingle(144771463f);
// num is still 144771456.0
Run Code Online (Sandbox Code Playgroud)

为什么会这样?

c# visual-studio-2012 floating-point-conversion

4
推荐指数
1
解决办法
86
查看次数