On Tue, May 24, 2011 at 12:21, José Mejuto joshy...@gmail.com wrote:
Hello FPC-Pascal,
Tuesday, May 24, 2011, 10:09:03 AM, you wrote:
i I've created a patch with the Escape and unEscape functions, and place
it
i here: http://bugs.freepascal.org/view.php?id=19407
Un/escapeHTML parsing
In our previous episode, Mattias Gaertner said:
A quick look at wikipedia will show that timsort has a disadvantage too. It
needs up to N records memory, not just Log(n) records like e.g. Quicksort.
It *can* be implemented to need only log(n). But the current fpc
implementation
of
You should not unescape recursively.
Input to EscapeHTML: 'lt;' Output: 'amp;lt;' : Correct
UnescapeHTML: input 'amp;lt;' Output '' Wrong.
This is because you replace 'amp;' with '' resulting in 'lt;' which is
translated to ' ' in the next line.
Ludo
-Message d'origine-
De :
On Wed, May 25, 2011 at 10:09, Ludo Brands ludo.bra...@free.fr wrote:
You should not unescape recursively.
Input to EscapeHTML: 'lt;' Output: 'amp;lt;' : Correct
UnescapeHTML: input 'amp;lt;' Output '' Wrong.
This is because you replace 'amp;' with '' resulting in 'lt;' which is
On Wed, 25 May 2011 09:02:46 +0200 (CEST)
mar...@stack.nl (Marco van de Voort) wrote:
In our previous episode, Mattias Gaertner said:
A quick look at wikipedia will show that timsort has a disadvantage too.
It
needs up to N records memory, not just Log(n) records like e.g.
This is a very minimalistic implementation covering only partial ascii
character escaping. To cover ASCII only in unescapeHTML you should also add
'nbsp' which corresponds with the space character ' '. Also the format
#entity_number; is missing ('lt;' or '#60;' equals '')
To support iso-8859-1
Hello FPC-Pascal,
Wednesday, May 25, 2011, 8:33:57 AM, you wrote:
amp;lt;
i I'm not sure what you mean here.
That's an already escaped html. Let it be a mini htmlpage:
htmltitle-amp;lt;-/title/html
i If you have already html entities you should not escape them. If you do not
i have html
Hello FPC-Pascal,
Wednesday, May 25, 2011, 9:02:46 AM, you wrote:
MvdV For heavier sorting I usually use heapsort and quicksort routines that
date
MvdV back to my M2 days
MvdV Usually heapsort since it is quite fast for already sorted collections.
Instead HeapSort you can use SmoothSort which
So you suggest to place the amp; translation last.
That would be a solution for this problem. My previous comments on the
minimalistic approach of the implementation suggest a different approach:
scan the source string once and replace html entities as you find them (with
a look up table for
On Wed, May 25, 2011 at 14:04, Ludo Brands ludo.bra...@free.fr wrote:
So you suggest to place the amp; translation last.
That would be a solution for this problem. My previous comments on the
minimalistic approach of the implementation suggest a different approach:
scan the source string
2011/5/24 Ludo Brands ludo.bra...@free.fr:
The following delphi articles should help creating an event sink:
http://www.informit.com/articles/article.aspx?p=130494seqNum=5 This is an
interesting one since it is written for Delphi 3-4 which missed a lot of the
automated COM handling. This is
Interfaceconnect calls Advice on the objects IConnectionPoint. I can't share
Delphi code here but essentially what you do is:
Get IConnectionPointContainer (CPC) from IUnknown (ActiveXObject) :
ActiveXObject.QueryInterface(IConnectionPointContainer, CPC);
Get IConnectionPoint (ppcp) for the
2011/5/25 Ludo Brands ludo.bra...@free.fr:
Regarding the tlb to pascal conversion, AFAIK there is no support in fpc.
Delphi is clearly better equiped to work with COM objects.
I have also been playing around with a generic eventsink class but the
problem is that events can have parameters
El 25/05/2011 01:35 a.m., fpc-pascal-requ...@lists.freepascal.org escribió:
Question out of curiosity:
Is there a reason why you allocate an array by hand?
Yes, getmem return NIL, when no more memory is available.
SetLength, no return NIL, It is work with Exceptions.
My intention was whether
The code in article
http://www.informit.com/articles/article.aspx?p=130494seqNum=5 goes a long
way in doing what you want to do. Unit Eventsink does pretty much of the
legwork. You should remove the procedure register since that is the Delphi
way to get a component on the toolbar. Remove also the
I guess you forgot the attachment?
My bad... well it was midnight here ;)
There you go:
http://free-pascal-general.1045716.n5.nabble.com/file/n4425751/suffixtrie.zip
suffixtrie.zip
BTW, do you know the hashtrie component?
Only ever heard of, never know the details. Thanks, this could be a
2011/5/25 Ludo Brands ludo.bra...@free.fr:
The code in article
http://www.informit.com/articles/article.aspx?p=130494seqNum=5 goes a long
way in doing what you want to do. Unit Eventsink does pretty much of the
legwork. You should remove the procedure register since that is the Delphi
way to
El 25/05/2011 01:35 a.m., fpc-pascal-requ...@lists.freepascal.org escribió:
Question out of curiosity:
Is there a reason why you allocate an array by hand?
Yes, getmem return NIL, when no more memory is available.
SetLength, no return NIL, It is work with Exceptions.
My intention was whether
Using variants you can transparently walk along the exposed objects. The
variant contains the Idispatch of the object and gets the exposed methods at
runtime. Properties are implemented as get and put methods or just get
methods for read only properties.
If you have something like
Itransducers
Always thanks!
Given your evident experience on this matter, I kindly ask your advice
on what is best to do.
opt 1) create a fpc class with some pascal style methods, which in
their implementation use variants and call the IDevice class with
late-binding . meaning that there is no compiler
20 matches
Mail list logo