Re: [fpc-pascal] fpWeb and html and uri escaping/unescaping elements

2011-05-24 Thread ik
On Tue, May 24, 2011 at 00:28, ik ido...@gmail.com wrote: On Tue, May 24, 2011 at 00:23, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 24 May 2011, ik wrote: Hello, Does fpWeb have any method/function that escape and un-escape html and URI elements ? Yes. in

Re[2]: [fpc-pascal] fpWeb and html and uri escaping/unescaping elements

2011-05-24 Thread José Mejuto
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 must be in one go, specially the amp one. Test against: amp;lt; Right

Re: RE : RE : [fpc-pascal] support for using an activex

2011-05-24 Thread Roberto Padovani
Thanks a lot! I've been able to create the object and connect to my device.. and even reading some strings! This FPC + ActiveX stuff is really cool. Don't know if your ActiveX sends events that you want to catch. Creating event sinks is relatively complex. Yes, the most important thing is

Re: [fpc-pascal] TimSort

2011-05-24 Thread José Mejuto
Hello FPC-Pascal, Friday, May 20, 2011, 12:21:43 PM, you wrote: MG Is there already a TimSort implementation in fpc? MG http://en.wikipedia.org/wiki/Timsort Why is TimSort specially interesting to you ? -- Best regards, José ___ fpc-pascal

[fpc-pascal] Re: TimSort

2011-05-24 Thread Uffe Kousgaard
José Mejuto joshy...@gmail.com wrote in message Why is TimSort specially interesting to you ? If it is the best all-purpose sorting algorithm and now the standard in several other programming languages, it should be obvious why it is also worth looking at for pascal / delphi developers.

[fpc-pascal] Lazarus win32 Break Points

2011-05-24 Thread Justin Smyth
Quick Question , i am running a copy of lazarus twice from the same directory on 2 different projects.if i set a break point in one project should that breakpoint show in the other project if they have common units where the break points are set? apart from running two seperate copys from

Re: [fpc-pascal] TimSort

2011-05-24 Thread Mattias Gaertner
    José Mejuto joshy...@gmail.com hat am 24. Mai 2011 um 11:59 geschrieben: Hello FPC-Pascal, Friday, May 20, 2011, 12:21:43 PM, you wrote: MG Is there already a TimSort implementation in fpc? MG http://en.wikipedia.org/wiki/Timsort Why is TimSort specially interesting to you ?

Re: [fpc-pascal] Lazarus win32 Break Points

2011-05-24 Thread Martin
On 24/05/2011 11:37, Justin Smyth wrote: Quick Question , i am running a copy of lazarus twice from the same directory on 2 different projects.if i set a break point in one project should that breakpoint show in the other project if they have common units where the break points are set? apart

Re: [fpc-pascal] Lazarus win32 Break Points

2011-05-24 Thread Martin
On 24/05/2011 13:04, Justin Smyth wrote: I'm using a snapshot from 30288 x64. FPC 2.4.3 projects have different names , in the same folder since the share common units save sessions selected as *.lpi lazarus project info file In your project directory should be 2 files (one for each

[fpc-pascal] Record size

2011-05-24 Thread Carsten Bager
I have a data record (sVar_typ) compiled with the 2.2.5 arm compiler. It has the size of 32728 byte. Now I try to compile with the 2.4.5 arm compiler it has the size of 32736 byte. I write the addresses of the variables in the record, they have not changed. It looks like the compiler just adds

RE : RE : RE : [fpc-pascal] support for using an activex

2011-05-24 Thread Ludo Brands
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 much closer to where fpc is now.

Re: [fpc-pascal] Record size

2011-05-24 Thread Jonas Maebe
On 24 May 2011, at 15:54, Carsten Bager wrote: I have a data record (sVar_typ) compiled with the 2.2.5 arm compiler. It has the size of 32728 byte. Now I try to compile with the 2.4.5 arm compiler it has the size of 32736 byte. I write the addresses of the variables in the record, they

Re: [fpc-pascal] Record size

2011-05-24 Thread Jonas Maebe
On 24 May 2011, at 16:06, Jonas Maebe wrote: Padding at the end of a record is generally added to make sure that if such a record appears in an array, subsequent items all have the required alignment. I don't immediately see why the compiler would think that record needs alignment to a

[fpc-pascal] getmem

2011-05-24 Thread Luis Fernando Del Aguila Mejía
I know that you can use dynamic arrays (array of). Is better. But this does not understand and confuse me. Why to create an array of 3 elements (ANSIString) with GetMem, I have to put a size of 15 bytes (5*3) and not 12 bytes (4*3).? The program works with 15 bytes, but do not understand why not

Re[2]: [fpc-pascal] TimSort

2011-05-24 Thread José Mejuto
Hello FPC-Pascal, Tuesday, May 24, 2011, 1:06:43 PM, you wrote: Why is TimSort specially interesting to you ? MG I need a fast stable sort, so multiple sorts work as expected (contrary to MG QuickSort). MG TimSort is a candidate. That's exactly the answer I was looking for, the stability

Re: [fpc-pascal] getmem

2011-05-24 Thread Jürgen Hestermann
Luis Fernando Del Aguila Mejía schrieb: Var LCad:^ansiString; AnsiString is already a pointer. LCad is now a pointer to a pointer. That should read Var LCad: AnsiString; getmem(LCad,5*3); //ansistring is a pointer 4 bytes The memory allocation and freeing is done by the compiler

Re: Re[2]: [fpc-pascal] TimSort

2011-05-24 Thread Mattias Gaertner
    José Mejuto joshy...@gmail.com hat am 24. Mai 2011 um 18:07 geschrieben: Hello FPC-Pascal, Tuesday, May 24, 2011, 1:06:43 PM, you wrote:   Why is TimSort specially interesting to you ? MG  I need a fast stable sort, so multiple sorts work as expected (contrary to MG

[fpc-pascal] Suffix Trie implementation, please review

2011-05-24 Thread leledumbo
I've written a unit containing suffix trie implementation. It could be used for: fast string existence search (could be extended with other information if required), though takes quite a lot of spaces (O(n^2) for a string where n is the string length, but grow slower as more strings get added),

Re: [fpc-pascal] Re: TimSort

2011-05-24 Thread Marco van de Voort
In our previous episode, Uffe Kousgaard said: Why is TimSort specially interesting to you ? If it is the best all-purpose sorting algorithm and now the standard in several other programming languages, it should be obvious why it is also worth looking at for pascal / delphi developers. A

Re: [fpc-pascal] Re: TimSort

2011-05-24 Thread Mattias Gaertner
    Marco van de Voort mar...@stack.nl hat am 24. Mai 2011 um 18:53 geschrieben: In our previous episode, Uffe Kousgaard said: Why is TimSort specially interesting to you ? If it is the best all-purpose sorting algorithm and now the standard in several other programming

Re: [fpc-pascal] Suffix Trie implementation, please review

2011-05-24 Thread Flávio Etrusco
I guess you forgot the attachment? ;-) BTW, do you know the hashtrie component? http://www.softcomplete.com/hashtrie.asp Best regards, Flávio On Tue, May 24, 2011 at 1:48 PM, leledumbo leledumbo_c...@yahoo.co.id wrote: I've written a unit containing suffix trie implementation. It could be used

Re: Re[2]: [fpc-pascal] TimSort

2011-05-24 Thread Vincent Snijders
2011/5/24 José Mejuto joshy...@gmail.com: Hello FPC-Pascal, Tuesday, May 24, 2011, 1:06:43 PM, you wrote:   Why is TimSort specially interesting to you ? MG  I need a fast stable sort, so multiple sorts work as expected (contrary to MG QuickSort). MG  TimSort is a candidate. That's

Re[4]: [fpc-pascal] TimSort

2011-05-24 Thread José Mejuto
Hello FPC-Pascal, Tuesday, May 24, 2011, 6:31:56 PM, you wrote: MG It uses a lot of tricks, but it seems to me that Tim explained all the MG important things. MG It would be nice, if thetimsort unit has the same license as the FCL (modified MG LGPL-2). MG Maybe you can ask him for

Re: Re[4]: [fpc-pascal] TimSort

2011-05-24 Thread Jonas Maebe
On 24 May 2011, at 19:53, José Mejuto wrote: Implementing from paper needs permission to licensing ? Normally not. Is the algo copyrighted/patented ? Algorithms cannot be copyrighted. Whether or not it's patented I don't know (while the individual sorting algorithms have been known for a

Re: [fpc-pascal] TimSort

2011-05-24 Thread Mattias Gaertner
On Tue, 24 May 2011 19:53:12 +0200 José Mejuto joshy...@gmail.com wrote: Hello FPC-Pascal, Tuesday, May 24, 2011, 6:31:56 PM, you wrote: MG It uses a lot of tricks, but it seems to me that Tim explained all the MG important things. MG It would be nice, if thetimsort unit has the same

Re[2]: [fpc-pascal] TimSort

2011-05-24 Thread José Mejuto
Hello FPC-Pascal, Tuesday, May 24, 2011, 8:25:07 PM, you wrote: MG If you do only the insertion+mergesort, then you have only implemented MG a long known improved mergesort variant and you can not call it MG TimSort. Of course then you don't need to ask Tim for permission. Well, in first try

Re: [fpc-pascal] getmem

2011-05-24 Thread Luis Fernando Del Aguila Mejía
I'm surprised this compiles at all. Ok, Does my program does not compile on your computer ? You're mixing up manual allocation of memory on the heap for variables such as arrays with compiler allocation of heap memory for ansistrings (which are reference counted and deallocated

Re: [fpc-pascal] getmem

2011-05-24 Thread Sven Barth
On 24.05.2011 17:22, Luis Fernando Del Aguila Mejía wrote: I know that you can use dynamic arrays (array of). Is better. But this does not understand and confuse me. Why to create an array of 3 elements (ANSIString) with GetMem, I have to put a size of 15 bytes (5*3) and not 12 bytes (4*3).? The

Re: [fpc-pascal] getmem

2011-05-24 Thread Jonas Maebe
On 24 May 2011, at 20:57, Luis Fernando Del Aguila Mejía wrote: Yes something like that. I'm trying to emulate something like this: VarLCad = array[0..2] of ansistring; Begin LCad[0]:='01234'; LCad[1]:='56789'; LCad[2]:='1'; Writeln(LCad[2]); End. But using

Re: [fpc-pascal] getmem

2011-05-24 Thread Claudio Lo Gaffo
El 24/05/2011 03:57 p.m., Luis Fernando Del Aguila Mejía escribió: I'm surprised this compiles at all. Ok, Does my program does not compile on your computer ? You're mixing up manual allocation of memory on the heap for variables such as arrays with compiler allocation of heap memory for