Mike Lischke的虚拟树视图在网络上和第三方组件中都很受欢迎.我刚刚在我的机器上下载了4.8.7版本.
我有两个分区的Delphi 2010和Delphi 7.0.
Aftter单击虚拟树视图的安装程序,提示日志文件,说已成功安装.
我检查Delphi 2010,是的,它是在显示3个控件的组件面板上.
但是当我启动Delphi 7.0时,IDE会提示"无法加载VirtualtreesD7.bpl ...".我忽略它,发现虚拟树视图设计时包在列表中,但是UNCHECKED.如果我尝试检查它,它再次承诺"无法加载virtualtreesD7 ......".
我搜索整个磁盘并找到VirtualTreesD7D.bpl,并在设计时包列表中手动添加它.它是带有3个控件的调色板.
我快速测试并退出Delphi 7.0.但是,当我重新启动Delphi 7.0时,它再次提示"无法加载VirtualtreesD7.bpl ...",它再次不在palatte而不是在设计时包列表中检查.
这是一个非常简单的问题.你能告诉我怎么解决吗?非常感谢你提前.
编辑:
感谢您的评论.
我测试了你的评论,但没有成功.
新问题:
如果我通过单击unins000.exe卸载虚拟树视图并仅在Delphi 7.0中重新安装它,安装程序会在最后一个屏幕提示''... completed .."并且没有错误提示.当我启动Delphi 7时,虚拟树视图设计时间包不在包列表中.这比上次更糟糕(上次它在包列表中但未检查).
我仔细检查该日志文件的一行一行,它说:
...
...
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(41)
VirtualTreesD7.dpk(43)
**VirtualTreesD7D.dpk(32) Fatal: Required package 'VirtualTreesD7' not found**
Run Code Online (Sandbox Code Playgroud)
为什么?为什么它没有成功安装,也没有在上次安装屏幕中提示安装错误.
如何解决这个"致命......未找到"的问题.
谢谢大家的帮助.
新编辑:(这是答案吗?)
首先感谢您的帮助和建议.
我需要2个小时来测试并找到可能的解决方案.它适用于我的机器,可以安装在Delphi 7.0中.
脚步:
1. uninstall virtual treeview by clicking unins000.exe from Delphi 7.0 ( you can separately install virtual treeview in Delphi 2010)
2. clicking newly downloaded VirtualTreeview setup 4.8.7.exe, install it in Delphi …Run Code Online (Sandbox Code Playgroud) 能告诉我如何在weka中表示文本分类的属性或类.通过使用什么属性我可以做分类?单词频率还是单词?ARFF格式可能的结构是什么?你能给我几行结构的例子吗?
非常感谢你提前.
在文本中检测句子边界似乎很难.引号如.!?可能会被用来分隔句子,但不是那么准确,因为可能有歧义的词语和引用,如美国或教授或博士我正在研究Tperlregex图书馆和Jan Goyvaerts的正则表达手册,但我不知道如何写出那个表达式检测句子?
在delphi中使用Tperlregex可能是比较准确的表达式?
谢谢
目前我通过创建它来添加对象:
type
TRecord = class
private
str: string;
num: Integer;
public
constructor Create;
end;
...
procedure TForm1.Button2Click(Sender: TObject);
var
i: Integer;
rec: TRecord;
Alist: TStringList;
begin
Alist := TStringList.create;
Alist.Clear;
for i := 0 to 9 do
begin
rec := Trecord.Create; //create instance of class
rec.str := 'rec' + IntToStr(i);
rec.num := i * 2;
Alist.AddObject(IntToStr(i), rec);
end;
end;
Run Code Online (Sandbox Code Playgroud)
这种方法是正确还是低效?或者我可以直接添加对象而不是像使用记录一样创建它吗?
type
PRec = ^TRec;
TRec = record
str: string;
num: Integer;
end;
...
var
rec: TRec;
...
for i := …Run Code Online (Sandbox Code Playgroud) 我一直在使用Tperlregex.但今天当我尝试编译使用Tperlregex构建的应用程序时,它会提示"致命错误:内部错误L3169".
reg: Tperlregex;
begin
reg:=Tperlregex.create(nil); //If this line is removed, there is no error prompt.
...
...
end;
Run Code Online (Sandbox Code Playgroud)
我正在使用Perlregex2009.
请帮忙.
编辑:
安德烈亚斯,非常感谢你.
@Andreas非常感谢你的回复.我正在使用Delphi 7.你的答案是否适用于D7.我在pcre.pas中找到了注释(..Delphi 2009及更早版本有一个编译器错误,如果将TPerlRegEx安装到设计时包中,可能会导致内部错误,并且您不会同时将TPerlRegEx放入运行时包中.使用Delphi 2009及更早版本,如果您根本不使用软件包,则可以使用PCRE_STATICLINK(这意味着您不要将它安装到IDE中......").我还没有在IDE中安装它,我将perlregex单元放入使用interface.我在pcre.pas中设置这些行
...
{$DEFINE PCRE_LINKDLL}
{$IFDEF PCRE_STATICLINK}
{$UNDEF PCRE_LINKDLL}
{$ENDIF}
Run Code Online (Sandbox Code Playgroud)
以前,它有效.但今天它没有.
我有html源包含大约1000个微博(每行一条推文).大多数推文如下所示.我正在使用delphi备忘录尝试使用Pos函数和删除函数来删除html标记但是失败了.
<div id='tweetText'> RT <a onmousedown="return touch(this.href,0)" href="http://twitter.com/HighfashionUK">@HighfashionUK</a> RT: Surprise goody bag up 4 grabs, Ok. <a onmousedown="return touch(this.href,0)" href="http://plixi.com/p/57846587">http://plixi.com/p/57846587</a> when we get 150</div>
Run Code Online (Sandbox Code Playgroud)
我想剥离html标记,只有:
RT: Surprise goody bag up 4 grabs, Ok. http://plixi.com/p/57846587 when we get 150
Run Code Online (Sandbox Code Playgroud)
如何在delphi中提取这样的文本?
非常感谢你提前.
更新:
Cosmin Prund是对的.我错误地跳过了一部分.我想要的是:
RT @HighfashionUK RT: Surprise goody bag up 4 grabs, Ok. http://plixi.com/p/57846587 when we get 150
Run Code Online (Sandbox Code Playgroud)
Cosmin Prund很棒.
下面是关于在Delphi的TStrings项目中释放对象的想法Zarko Gajic在About.com.delphi 我使用的是Delphi 7,TStringList没有OwnsObjects.
运行以下代码将提示EaccessViolation错误.我不知道为什么以及如何绕过它来释放物品.
非常感谢.
procedure TForm6.freelist(const alist: TStringList);
var
i: integer;
begin
try
for i:=0 to pred(alist.Count) do begin
if Assigned(alist.Objects[i]) then begin
alist.Objects[i].Free;
alist.objects[i]:=nil;
end;
end;
alist.Clear;
finally
alist.Free;
end;
end;
Run Code Online (Sandbox Code Playgroud)
编辑:
我添加了这一行,alist.Objects [i]:= Pointer(0); 而且没有错误.
...
for i:=0 to pred(alist.Count) do begin
if Assigned(alist.Objects[i]) then begin
alist.Objects[i]:=Pointer(0); //newly added line.
alist.Objects[i].Free;
alist.objects[i]:=nil;
end;
end;
...
//But I do not know if this is correct and
// if the efficiency will be compromised.
//This is …Run Code Online (Sandbox Code Playgroud) 我想在字符串的每个可能位置插入一个char,除了start和end.例如
abc
I want to have
a-bc
ab-c
a-b-c
Run Code Online (Sandbox Code Playgroud)
以下是我的测试,但不正确:
procedure TForm1.Button2Click(Sender: TObject);
var
start, i,j,k,position,loop: integer;
laststart,lastend:integer;
c,item,stem:string;
str, prefix:string;
begin
str:='abcd';
memo1.clear;
memo1.Lines.Add(str);
laststart:=0;
lastend:=memo1.lines.count-1;
position:=0;
prefix:='';
loop:=0;
while loop<=length(str)-1 do
begin
for j:= laststart to lastend do
begin
item:=memo1.lines[j];
for k:=length(item) downto 1 do
begin
if item[k]='-' then
begin
position:=j;
break;
end;
end; //for k
prefix:=copy(item,1,position);
stem:=copy(item,position+1, length(item));
for start:=1 to length(stem)-1 do
begin
c:=prefix+copy(stem,1,start)+'-'+
copy(stem, start+1,length(stem));
memo1.lines.add(c);
end;
end; //for j
laststart:=lastend+1;
lastend:=memo1.Lines.Count-1;
inc(loop);
end; //end …Run Code Online (Sandbox Code Playgroud) 我不明白下面的对象在哪里以及如何清除它们?
例如:
public
Alist: TStringlist;
..
procedure TForm1.FormCreate(Sender: TObject);
begin
Alist:=Tstringlist.Create;
end;
procedure TForm1. addinstringlist;
var
i: integer;
begin
for i:=0 to 100000 do
begin
Alist.add(inttostr(i), pointer(i));
end;
end;
procedure TForm1.clearlist;
begin
Alist.clear;
// inttostr(i) are cleared, right?
// Where are pointer(i)? Are they also cleared ?
// if they are not cleared, how to clear ?
end;
procedure TForm1. repeat; //newly added
var
i: integer;
begin
For i:=0 to 10000 do
begin
addinstringlist;
clearlist;
end;
end; // No problem? …Run Code Online (Sandbox Code Playgroud)