[fpc-pascal] Re: Changes in fcl-web
After installing all components, I try to open one of the examples (from 03-12 version of webdesign package) and I got: ERROR: There are more GeckoComponentsShutdown then GeckoComponentsStartup. And how do I use the components actually? The examples have lfm consisting of THtml containing THead etc. But I can't make THtml as parent of THead in the designer. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Changes-in-fcl-web-tp3239906p3244666.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] TThread descendant with public events
Hi, What is the rules regarding a TThread descendants and public events. I created a thread that has OnXXX events. These events are triggered in the Execute method of that event. Now my main event (which manages the application GUI) hooked into these event by implementing event handlers. Those event handlers take the data from the event and updates a StringGrid. Is this safe to do? Must the thread execute the event via a Synchronize() call, or is it now needed? The reason I'm not sure here, is because the thread doesn't actuall update the GUI component (stringgrid in this example) directly, it just triggers the event. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TThread descendant with public events
On 01.11.2010 09:57, Graeme Geldenhuys wrote: Hi, What is the rules regarding a TThread descendants and public events. I created a thread that has OnXXX events. These events are triggered in the Execute method of that event. Now my main event (which manages the application GUI) hooked into these event by implementing event handlers. Those event handlers take the data from the event and updates a StringGrid. Is this safe to do? Must the thread execute the event via a Synchronize() call, or is it now needed? The reason I'm not sure here, is because the thread doesn't actuall update the GUI component (stringgrid in this example) directly, it just triggers the event. The code is still run in the thread's context, no matter whether the code is in your TThread class or e.g. a global procedure. So you should use Synchronize to trigger the event. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TThread descendant with public events
On Monday, 1. November 2010 09.57:21 Graeme Geldenhuys wrote: > Is this safe to do? > No. An onxx event is a tmethod. "Triggering" the event means calling the method -> it runs in context of the calling thread. Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TThread descendant with public events
Op 2010-11-01 11:06, Sven Barth het geskryf: > > The code is still run in the thread's context, no matter whether the > code is in your TThread class or e.g. a global procedure. So you should > use Synchronize to trigger the event. Thank you very much Sven and Martin. What you said then confirms why my application crashes after X amount of lines were added to the StringGrid, but worked correctly when the event was triggered inside the Synchronize() call. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] MSEide+MSEgui rev.2.4
Hi, MSEide+MSEgui version 2.4 for FPC 2.4.2 has been released: https://developer.berlios.de/project/showfiles.php?group_id=11520 Questions and bug reports please to mailing list: https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk NNTP gateway: nntp://news.gmane.org/gmane.comp.ide.mseide.user Mail achive: http://www.mail-archive.com/mseide-msegui-t...@lists.berlios.de/ Have a lot of fun! Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Reading MDB (MS-Access) data under Linux
Hi, I need to write a data conversion app. Has anybody read MDB data under Linux yet, using SqlDB? I saw there was a ODBC database component, and searched by Ubuntu repository. I installed 'iodbc', 'libiodbc2' and 'libiodbc2-dev'. The 'iodbc' package came with a GTK ODBC Admin app, but I have no clue how ODBC works. * Anybody that can confirm that I can read MDB files via SqlDB's ODBC component. * Any pointers and URL's on how to setup ODBC under Linux (Ubuntu)? Any help or pointers would me much appreciated. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Reading MDB (MS-Access) data under Linux
On 1-11-2010 12:18, Graeme Geldenhuys wrote: > Hi, > > I need to write a data conversion app. Has anybody read MDB data under > Linux yet, using SqlDB? I saw there was a ODBC database component, and > searched by Ubuntu repository. I installed 'iodbc', 'libiodbc2' and > 'libiodbc2-dev'. The 'iodbc' package came with a GTK ODBC Admin app, but > I have no clue how ODBC works. > > * Anybody that can confirm that I can read MDB files via SqlDB's ODBC > component. > > * Any pointers and URL's on how to setup ODBC under Linux (Ubuntu)? > > > Any help or pointers would me much appreciated. > > > Regards, > - Graeme - > Hi Graeme, I suspected there's no ODBC driver for Access under Linux... but: There is a tool to read mdb files, have only tried it once or so: http://mdbtools.sourceforge.net/ Don't think it's an ODBC driver though hmmm apparently the docs http://mdbtools.sourceforge.net/faq.html#what tell me I'm wrong ;) aptitude search mdb returns these promising results: libmdbodbc mdbtools The unixodbc package also shows up. (on an old Ubuntu 7.10 machine) Apparently you have to install unixODBC. IIRC there are 2 free ODBC driver managers under Linux: unixODBC and iODBC. I've used one or the other in the past, wasn't that hard to get working, IIRC you had to edit some text/ini files that specified which driver (= the mdbtools ODBC driver in your case) you wanted to use. Then setup a ODBC data source more or less like in Windows... Might be a good idea to remove iodbc etc to lessen scope for confusion. Good luck, -- Regards, jb ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Reading MDB (MS-Access) data under Linux
On Mon, 1 Nov 2010, Graeme Geldenhuys wrote: Hi, I need to write a data conversion app. Has anybody read MDB data under Linux yet, using SqlDB? I saw there was a ODBC database component, and searched by Ubuntu repository. I installed 'iodbc', 'libiodbc2' and 'libiodbc2-dev'. The 'iodbc' package came with a GTK ODBC Admin app, but I have no clue how ODBC works. This is not enough. You must install a ODBC driver for access database. The MDBTools contain one; install "libmdbodbc" (it will install other mdb tools). You must make a DSN in the ODBC configuration that defines your database. Install unixodbc-bin and run the (graphical) odbcconfig tool. It's pretty straightforward from then on. * Anybody that can confirm that I can read MDB files via SqlDB's ODBC component. On windows it can. * Any pointers and URL's on how to setup ODBC under Linux (Ubuntu)? There is little to set up: Set up the DSN, and point the TODBCConnection to the DSN you set up. Then run your query. But be careful, the mdb tools SQL abilities are rather limited. Don't expect to be able to run just about any SQL query. If you just need SELECT * FROM TABLE, then that should work fine. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Sun, Oct 31, 2010 at 8:14 AM, Marcos Douglas wrote: >> I need to do a full text scan in PDF files i.e. convert PDF in plain >> text, parser and save the informations. >> I saw the XPDF[1] lib but I would like a lib coded in Pascal... if is >> possible. >> >> What do you recommends to do that? > > Ok Guys. > I already know how convert PDF files in Text files. > To search strings in Text files, which lib in FPC do you recommends? > I need speed and the program is a console program. Somebody can help me please? I need to search strings in Text files using just FPC. I'm using the xpdf (pdftotext.exe) to convert PDF files to Text files and searching some words in these files. If is possible to search in PDF files is the better for me. But text files is ok too. Thanks Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
Somebody can help me please? I need to search strings in Text files using just FPC. how about reading every line and then using Pos() to see if some string is there? HTH ;-) Cheers, A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 9:34 AM, Alberto Narduzzi wrote: >> Somebody can help me please? >> I need to search strings in Text files using just FPC. > > how about reading every line and then using Pos() to see if some string is > there? > I don't think this way is the fast way :( I have many PDF files with several pages each. Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Reading MDB (MS-Access) data under Linux
On Mon, 1 Nov 2010 13:00:23 +0100 (CET), Michael Van Canneyt wrote: > > >On Mon, 1 Nov 2010, Graeme Geldenhuys wrote: > >> Hi, >> >> I need to write a data conversion app. Has anybody read MDB data under >> Linux yet, using SqlDB? I saw there was a ODBC database component, and >> searched by Ubuntu repository. I installed 'iodbc', 'libiodbc2' and >> 'libiodbc2-dev'. The 'iodbc' package came with a GTK ODBC Admin app, but >> I have no clue how ODBC works. > > >This is not enough. You must install a ODBC driver for access database. >The MDBTools contain one; install "libmdbodbc" (it will install other mdb >tools). > >You must make a DSN in the ODBC configuration that defines your database. >Install unixodbc-bin and run the (graphical) odbcconfig tool. >It's pretty straightforward from then on. > >> >> * Anybody that can confirm that I can read MDB files via SqlDB's ODBC >> component. > >On windows it can. > >> >> * Any pointers and URL's on how to setup ODBC under Linux (Ubuntu)? > >There is little to set up: >Set up the DSN, and point the TODBCConnection to the DSN you set up. >Then run your query. > >But be careful, the mdb tools SQL abilities are rather limited. >Don't expect to be able to run just about any SQL query. > >If you just need SELECT * FROM TABLE, then that should work fine. > Just tacking on the other MS database MSSQLServer: Is it possible to also work with MS SQLServer databases via ODBC on FPC from Linux? Obviously the SQLServer must be running on Windows so this is about network access to the database engine. When I make data sources in Windows for these databases I do not use ODBC but a native SQLServer driver, is such available also on Linux? Bo Berglund ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Reading MDB (MS-Access) data under Linux
On Mon, 01 Nov 2010 13:34:00 +0100, Bo Berglund wrote: > Just tacking on the other MS database MSSQLServer: > Is it possible to also work with MS SQLServer databases via ODBC on > FPC from Linux? Obviously the SQLServer must be running on Windows so > this is about network access to the database engine. > When I make data sources in Windows for these databases I do not use > ODBC but a native SQLServer driver, is such available also on Linux? > > Bo Berglund I only know of a unixodbc driver called FreeTDS. I successfully connected to a MSSQL Server 2008 from my FPC application on Linux, using unixodbc, freetds and sqldb :) Best Regards, Andreas Schneider. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Reading MDB (MS-Access) data under Linux
Op 2010-11-01 14:34, Bo Berglund het geskryf: > > Just tacking on the other MS database MSSQLServer: > Is it possible to also work with MS SQLServer databases via ODBC on I would imagine the only obstacle in that would be to find a ODBC MS-SQL Server driver for Linux. EasySoft has one listed, but I don't know if it's for Linux and if it's commercial/free. http://www.easysoft.com As for accessing the MDB file via ODBC under Linux. No matter what I tried, I couldn't connect to it. I installed all the mentioned apps and packages, but no luck. I did find a MDB File Viewer app though, so I opened my MDB file, and simply exported the tables I need to CSV files. My app will process them from there... Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
On Mon, Nov 1, 2010 at 7:13 AM, Martin Schreiber wrote: > Hi, > MSEide+MSEgui version 2.4 for FPC 2.4.2 has been released: > https://developer.berlios.de/project/showfiles.php?group_id=11520 > > Questions and bug reports please to mailing list: > https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk > NNTP gateway: > nntp://news.gmane.org/gmane.comp.ide.mseide.user > Mail achive: > http://www.mail-archive.com/mseide-msegui-t...@lists.berlios.de/ > > Have a lot of fun! If you use the FPC from http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 then the version is 2.4.3, right? Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
Op 2010-11-01 15:48, Marcos Douglas het geskryf: > If you use the FPC from > http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 then the version > is 2.4.3, right? Yes, and that works with MSEide too. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
On Mon, Nov 1, 2010 at 11:14 AM, Graeme Geldenhuys wrote: > Op 2010-11-01 15:48, Marcos Douglas het geskryf: >> If you use the FPC from >> http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 then the version >> is 2.4.3, right? > > Yes, and that works with MSEide too. The 2.4.3 version is the version of do you use? This is the version oficial to production, from SVN? Thanks, Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
Op 2010-11-01 16:33, Marcos Douglas het geskryf: > > The 2.4.3 version is the version of do you use? This is the version > oficial to production, from SVN? I use that version (fixes_2_4 branch) for my day-to-day programming at work and home. It's normally the most stable development platform to work from. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
On Monday, 1. November 2010 15.33:34 Marcos Douglas wrote: > On Mon, Nov 1, 2010 at 11:14 AM, Graeme Geldenhuys > > wrote: > > Op 2010-11-01 15:48, Marcos Douglas het geskryf: > >> If you use the FPC from > >> http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 then the version > >> is 2.4.3, right? > > > > Yes, and that works with MSEide too. > > The 2.4.3 version is the version of do you use? This is the version > oficial to production, from SVN? > Thanks, > Yes, I normally use FPC SVN fixes_2_4 for production. Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
Which address should I be using? It looks like the UUID and revision are the same while Last changed revision and path are different. svn info http://svn.freepascal.org/svn/fpc/tags/release_2_4_2 Path: release_2_4_2 URL: http://svn.freepascal.org/svn/fpc/tags/release_2_4_2 Repository Root: http://svn.freepascal.org/svn/fpc Repository UUID: 3ad0048d-3df7-0310-abae-a5850022a9f2 Revision: 16285 Node Kind: directory Last Changed Author: marco Last Changed Rev: 16278 Last Changed Date: 2010-10-31 10:08:18 -0700 (Sun, 31 Oct 2010) svn info http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 Path: fixes_2_4 URL: http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 Repository Root: http://svn.freepascal.org/svn/fpc Repository UUID: 3ad0048d-3df7-0310-abae-a5850022a9f2 Revision: 16285 Node Kind: directory Last Changed Author: marco Last Changed Rev: 16277 Last Changed Date: 2010-10-31 10:01:50 -0700 (Sun, 31 Oct 2010) On Mon, Nov 1, 2010 at 7:14 AM, Graeme Geldenhuys wrote: > Op 2010-11-01 15:48, Marcos Douglas het geskryf: >> If you use the FPC from >> http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 then the version >> is 2.4.3, right? > > Yes, and that works with MSEide too. > > > > Regards, > - Graeme - > > -- > fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal > http://opensoft.homeip.net:8080/fpgui/ > > ___ > fpc-pascal maillist - fpc-pas...@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
On Monday, 1. November 2010 16.24:30 Brian Winfrey wrote: > Which address should I be using? It looks like the UUID and revision > are the same while Last changed revision and path are different. > [...] For MSEide+MSEgui you can use both. It is your choice if you wan't to use a tagged release or the fixes branch. MSEide+MSEgui is not tested with FPC SVN trunk. Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Reading MDB (MS-Access) data under Linux
I only know of a unixodbc driver called FreeTDS. I successfully connected to a MSSQL Server 2008 from my FPC application on Linux, using unixodbc, freetds and sqldb :) I can confirm this setup (FreeTDS+unixodbc) only I accessed SQL Server from Linux via Zeos instead of sqldb. Artur ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Monday, 1. November 2010 13.34:45 Marcos Douglas wrote: > On Mon, Nov 1, 2010 at 9:34 AM, Alberto Narduzzi > > wrote: > >> Somebody can help me please? > >> I need to search strings in Text files using just FPC. > > > > how about reading every line and then using Pos() to see if some string > > is there? > > I don't think this way is the fast way :( > I have many PDF files with several pages each. > MSEgui ttextstream has search functions (lib/common/kernel/msestream.pas), I don't know if it is fast enough for your purpose. Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 1:21 PM, Martin Schreiber wrote: > On Monday, 1. November 2010 13.34:45 Marcos Douglas wrote: >> On Mon, Nov 1, 2010 at 9:34 AM, Alberto Narduzzi >> >> wrote: >> >> Somebody can help me please? >> >> I need to search strings in Text files using just FPC. >> > >> > how about reading every line and then using Pos() to see if some string >> > is there? >> >> I don't think this way is the fast way :( >> I have many PDF files with several pages each. >> > MSEgui ttextstream has search functions (lib/common/kernel/msestream.pas), I Thanks Martin, I will see this file. > don't know if it is fast enough for your purpose. I suppose your implementation always is fast enough ;) Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
In our previous episode, Marcos Douglas said: > wrote: > >> Somebody can help me please? > >> I need to search strings in Text files using just FPC. > > > > how about reading every line and then using Pos() to see if some string is > > there? > > > > I don't think this way is the fast way :( > I have many PDF files with several pages each. You'll be surprised. I've done multi million line logfiles that way. A pdf2txt is infinitely slow compared with such processing. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 3:10 PM, Marco van de Voort wrote: > In our previous episode, Marcos Douglas said: >> wrote: >> >> Somebody can help me please? >> >> I need to search strings in Text files using just FPC. >> > >> > how about reading every line and then using Pos() to see if some string is >> > there? >> > >> >> I don't think this way is the fast way :( >> I have many PDF files with several pages each. > > You'll be surprised. I've done multi million line logfiles that way. A > pdf2txt is infinitely slow compared with such processing. Ok, but I need to work with pure text. The PDF files are "compiled". Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, November 1, 2010 19:10, Marco van de Voort wrote: > In our previous episode, Marcos Douglas said: >> wrote: >> >> Somebody can help me please? >> >> I need to search strings in Text files using just FPC. >> > >> > how about reading every line and then using Pos() to see if some >> string is >> > there? >> > >> >> I don't think this way is the fast way :( >> I have many PDF files with several pages each. > > You'll be surprised. I've done multi million line logfiles that way. A > pdf2txt is infinitely slow compared with such processing. Well, there at least two gotchas there. First, it's better to use a reasonable (= large enough) buffer size. Second, the simplest approach implying reading line by line and searching using Pos() obviously isn't sufficient for searching across line breaks, i.e. you either need to handle that yourself, or use some unit providing such functionality. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 3:31 PM, Tomas Hajny wrote: > On Mon, November 1, 2010 19:10, Marco van de Voort wrote: >> In our previous episode, Marcos Douglas said: >>> wrote: >>> >> Somebody can help me please? >>> >> I need to search strings in Text files using just FPC. >>> > >>> > how about reading every line and then using Pos() to see if some >>> string is >>> > there? >>> > >>> >>> I don't think this way is the fast way :( >>> I have many PDF files with several pages each. >> >> You'll be surprised. I've done multi million line logfiles that way. A >> pdf2txt is infinitely slow compared with such processing. > > Well, there at least two gotchas there. First, it's better to use a > reasonable (= large enough) buffer size. Second, the simplest approach > implying reading line by line and searching using Pos() obviously isn't > sufficient for searching across line breaks, i.e. you either need to > handle that yourself, or use some unit providing such functionality. Which unit do you recommends? Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, November 1, 2010 19:20, Marcos Douglas wrote: > On Mon, Nov 1, 2010 at 3:10 PM, Marco van de Voort > wrote: >> In our previous episode, Marcos Douglas said: >>> wrote: >>> >> Somebody can help me please? >>> >> I need to search strings in Text files using just FPC. >>> > >>> > how about reading every line and then using Pos() to see if some >>> string is >>> > there? >>> > >>> >>> I don't think this way is the fast way  :( >>> I have many PDF files with several pages each. >> >> You'll be surprised. I've done multi million line logfiles that way. A >> pdf2txt is infinitely slow compared with such processing. > > Ok, but I need to work with pure text. The PDF files are "compiled". Sorry, I'm confused now. Do you want to search for text strings within PDF files or within regular text files? Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 3:36 PM, Tomas Hajny wrote: > On Mon, November 1, 2010 19:20, Marcos Douglas wrote: >> On Mon, Nov 1, 2010 at 3:10 PM, Marco van de Voort >> wrote: >>> In our previous episode, Marcos Douglas said: wrote: >> Somebody can help me please? >> I need to search strings in Text files using just FPC. > > how about reading every line and then using Pos() to see if some string is > there? > I don't think this way is the fast way :( I have many PDF files with several pages each. >>> >>> You'll be surprised. I've done multi million line logfiles that way. A >>> pdf2txt is infinitely slow compared with such processing. >> >> Ok, but I need to work with pure text. The PDF files are "compiled". > > Sorry, I'm confused now. Do you want to search for text strings within PDF > files or within regular text files? I need to search for text strings in PDF files... but I don´t know do that, so I use the pdf2txt[1] to convert in pure text. If there is a unit that can search for text within a PDF file, would be the best solution for me. [1] http://www.foolabs.com/xpdf/home.html Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, November 1, 2010 19:42, Marcos Douglas wrote: > On Mon, Nov 1, 2010 at 3:36 PM, Tomas Hajny wrote: >> On Mon, November 1, 2010 19:20, Marcos Douglas wrote: >>> On Mon, Nov 1, 2010 at 3:10 PM, Marco van de Voort >>> wrote: In our previous episode, Marcos Douglas said: > wrote: > >> Somebody can help me please? > >> I need to search strings in Text files using just FPC. > > > > how about reading every line and then using Pos() to see if some > string is > > there? > > > > I don't think this way is the fast way  :( > I have many PDF files with several pages each. You'll be surprised. I've done multi million line logfiles that way. A pdf2txt is infinitely slow compared with such processing. >>> >>> Ok, but I need to work with pure text. The PDF files are "compiled". >> >> Sorry, I'm confused now. Do you want to search for text strings within >> PDF >> files or within regular text files? > > I need to search for text strings in PDF files... but I don´t know do > that, so I use the pdf2txt[1] to convert in pure text. > If there is a unit that can search for text within a PDF file, would > be the best solution for me. I see, but that means that Marco's comment applies - conversion of PDF files to pure text will probably require more time than finding your string within the (converted) text file. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 3:50 PM, Tomas Hajny wrote: > On Mon, November 1, 2010 19:42, Marcos Douglas wrote: >> On Mon, Nov 1, 2010 at 3:36 PM, Tomas Hajny wrote: >>> On Mon, November 1, 2010 19:20, Marcos Douglas wrote: On Mon, Nov 1, 2010 at 3:10 PM, Marco van de Voort wrote: > In our previous episode, Marcos Douglas said: >> wrote: >> >> Somebody can help me please? >> >> I need to search strings in Text files using just FPC. >> > >> > how about reading every line and then using Pos() to see if some >> string is >> > there? >> > >> >> I don't think this way is the fast way :( >> I have many PDF files with several pages each. > > You'll be surprised. I've done multi million line logfiles that way. A > pdf2txt is infinitely slow compared with such processing. Ok, but I need to work with pure text. The PDF files are "compiled". >>> >>> Sorry, I'm confused now. Do you want to search for text strings within >>> PDF >>> files or within regular text files? >> >> I need to search for text strings in PDF files... but I don´t know do >> that, so I use the pdf2txt[1] to convert in pure text. >> If there is a unit that can search for text within a PDF file, would >> be the best solution for me. > > I see, but that means that Marco's comment applies - conversion of PDF > files to pure text will probably require more time than finding your > string within the (converted) text file. I agree. But as I search for text within PDF files? Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, November 1, 2010 19:34, Marcos Douglas wrote: > On Mon, Nov 1, 2010 at 3:31 PM, Tomas Hajny wrote: >> On Mon, November 1, 2010 19:10, Marco van de Voort wrote: >>> In our previous episode, Marcos Douglas said: wrote: >> Somebody can help me please? >> I need to search strings in Text files using just FPC. > > how about reading every line and then using Pos() to see if some string is > there? > I don't think this way is the fast way  :( I have many PDF files with several pages each. >>> >>> You'll be surprised. I've done multi million line logfiles that way. A >>> pdf2txt is infinitely slow compared with such processing. >> >> Well, there at least two gotchas there. First, it's better to use a >> reasonable (= large enough) buffer size. Second, the simplest approach >> implying reading line by line and searching using Pos() obviously isn't >> sufficient for searching across line breaks, i.e. you either need to >> handle that yourself, or use some unit providing such functionality. > > Which unit do you recommends? I don't have any specific one in mind, I just wanted to point out that you need to take care about that. Personally, I'd probably use my unit Buffered (http://www.volny.cz/xhajt03/buffered.zip) and handle the part related to spanning of text across lines myself if relevant (obviously, that depends on your use case), but I'm sure that there are more complete solutions for your needs readily available too; my comment was just to signalize that "Pos" mentioned by Marco may not be sufficient by itself. BTW, to answer your other e-mail too - I don't know about solutions for searching within PDF files directly, I'd also use the external converter myself. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)
Sorry, I agree. But as I search for text within PDF files? I assumed true the following statement of yours... [Somebody can help me please? I need to search strings in Text files using just FPC.] so I suggested the fast-enough (in my opinion) use of the Pos function. If _now_ you want to search directly in the PDFs, then I cannot help you, as I myself would go for the conversion to text files on first instance. TTYTT, I usually search for text in PDFs (using Acrobat Reader, just searching, when I need to convert some e-books) and I see it's blooody slow, compared to a search in a plain text file. I doubt (but also would like to be discredited here...) there is a faster library than the Adobe Acrobat Reader one itself, so I think the combination of the two methods (conversion, and then search) would bring to the same overall speed; if not higher... Just my last 2c on the thing. P.S. Why don't you give it a try, cronometer at hand, first? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 4:02 PM, Tomas Hajny wrote: > On Mon, November 1, 2010 19:34, Marcos Douglas wrote: >> On Mon, Nov 1, 2010 at 3:31 PM, Tomas Hajny wrote: >>> On Mon, November 1, 2010 19:10, Marco van de Voort wrote: In our previous episode, Marcos Douglas said: > wrote: > >> Somebody can help me please? > >> I need to search strings in Text files using just FPC. > > > > how about reading every line and then using Pos() to see if some > string is > > there? > > > > I don't think this way is the fast way :( > I have many PDF files with several pages each. You'll be surprised. I've done multi million line logfiles that way. A pdf2txt is infinitely slow compared with such processing. >>> >>> Well, there at least two gotchas there. First, it's better to use a >>> reasonable (= large enough) buffer size. Second, the simplest approach >>> implying reading line by line and searching using Pos() obviously isn't >>> sufficient for searching across line breaks, i.e. you either need to >>> handle that yourself, or use some unit providing such functionality. >> >> Which unit do you recommends? > > I don't have any specific one in mind, I just wanted to point out that you > need to take care about that. Personally, I'd probably use my unit > Buffered (http://www.volny.cz/xhajt03/buffered.zip) and handle the part > related to spanning of text across lines myself if relevant (obviously, > that depends on your use case), but I'm sure that there are more complete > solutions for your needs readily available too; my comment was just to > signalize that "Pos" mentioned by Marco may not be sufficient by itself. > > BTW, to answer your other e-mail too - I don't know about solutions for > searching within PDF files directly, I'd also use the external converter > myself. Ok Tomas. Thanks for informations and file (I'll see it). Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)
On Mon, Nov 1, 2010 at 4:27 PM, Alberto Narduzzi wrote: > Sorry, > >> I agree. But as I search for text within PDF files? > > I assumed true the following statement of yours... > > [Somebody can help me please? > I need to search strings in Text files using just FPC.] Yes, I changed my first mail because nobody answered me about search in PDF files! > so I suggested the fast-enough (in my opinion) use of the Pos function. > If _now_ you want to search directly in the PDFs, then I cannot help you, as > I myself would go for the conversion to text files on first instance. I'll try this method too. Now, I'm trying to convert the PDF files as best I can... I don't know if pdf2txt is the best way... > TTYTT, I usually search for text in PDFs (using Acrobat Reader, just > searching, when I need to convert some e-books) and I see it's blooody slow, > compared to a search in a plain text file. > I doubt (but also would like to be discredited here...) there is a faster > library than the Adobe Acrobat Reader one itself, so I think the combination > of the two methods (conversion, and then search) would bring to the same > overall speed; if not higher... Yes, that's what I thought too ;-) > Just my last 2c on the thing. > > P.S. > Why don't you give it a try, cronometer at hand, first? Because I have not gotten in this stage yet :) Thanks, Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re[2]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)
Hello FPC-Pascal, Monday, November 1, 2010, 8:40:45 PM, you wrote: MD> On Mon, Nov 1, 2010 at 4:27 PM, Alberto Narduzzi MD> wrote: >> Sorry, >> >>> I agree. But as I search for text within PDF files? >> >> I assumed true the following statement of yours... >> >> [Somebody can help me please? >> I need to search strings in Text files using just FPC.] MD> Yes, I changed my first mail because nobody answered me about search MD> in PDF files! Search an string in a pdf directly is far away from trivial, you need at least a parse.r and a decompressor. The decompressor is not a problem usually as most files have streams compressed with zlib, but the parser is very complex, locate the text zones is easy (more or less) but if the strings have international characters, it implies the use o CMAPs which is a nighmare. So if you are looking for ASCII words, use PDF2Text and use the POS function over the result: function HaveString(Filename: String; TheString: string): Boolean; var F: TFileStream; S: String; AtPos: integer; begin Result:=false; F:=TFileStream.Create(Filename,fmOpenReadOnly); SetLength(S,F.Size); if F.Size>0 then begin F.ReadBuffer(S[1],F.Size); AtPos:=Pos(UpperCase(TheString),S); if AtPos>0 then Result:=true; end; F.Free; end; -- Best regards, José ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Re: TPLY
"leledumbo" wrote in message news:1288343826290-3241740.p...@n5.nabble.com... > >> I would start with this site to learn how to create recursive descent >> parsers using Pascal :) > > Definitely, but it doesn't build AST, which is required if you need to > write > a parser for a language that can't be parsed in single pass like Java. > True, but you just have to use the code as a starting point and generate an AST :) "Shouldn't be too hard..." (tm) LOL cheers, Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)
Hi, I don't know the PDF file format at all, but I would guess if you look at the many pdf-to-text conversion tools, you will see what they have done. In all likelihood, those conversion tools will be written in C, which you will have to translate to Object Pascal - but that is normally not a difficult task, just a boring task. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MSEide+MSEgui rev.2.4
Op 2010-11-01 17:24, Brian Winfrey het geskryf: > Which address should I be using? release_2_4_2 is simply the "tagged" release of the future FPC 2.4.2 release - currently in beta testing. The fixes_2_4 is already at version 2.4.3 and contains everything from 2.4.2 and more... As Martin said, you can use either of those. > It looks like the UUID and revision are the same while Last changed revision Simply because both of those refer to the SubVersion repository as a whole. Both those branches are in the save SubVersion repository, hence the same UUID. Also a SubVersion repository uses a revision number across the whole repository - not per branch. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal