[fpc-pascal] SQLQuery published properties

2007-08-07 Thread Jesus Reyes A.
Hi, I noted that in fpc2.3.1 several important TSqlQuery properties(and 
events) are not published anymore, for example the active property, all 
OnBefore*, OnAfter* events and more.


I'ts something definitive?.

Jesus Reyes A. 


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] connection problem

2008-03-29 Thread Jesus Reyes A.


- Original Message - 
From: "Jonas Maebe" <[EMAIL PROTECTED]>

Sent: Saturday, March 29, 2008 6:01 AM

On 26 Mar 2008, at 19:55, Jesus Reyes wrote:

i, I'm experiencing connection problems to bugs.freepascal.org and
svn.freepascal.org.

[EMAIL PROTECTED]:~/temp> svn co
http://svn.freepascal.org/FPC/svn/lazarus/trunk l
svn: requerimiento PROPFIND falló en '/FPC/svn/lazarus/trunk'
svn: PROPFIND de '/FPC/svn/lazarus/trunk': 405 Method Not Allowed
(http://svn.freepascal.org)


You're using the wrong url. The correct one is 
http://svn.freepascal.org/svn/lazarus/trunk



Jonas
---

Yes, Vincent show me that shortly after I posted the message, but it was a 
bad example from my part, I simply adapted the url I found in my entries 
file and replaced the svn+ssh info with http.


For fpc repository I use http://svn.freepascal.org/svn/fpc/trunk and it 
doesn't work anyway, I don't get the PROPFIND problem though, after I type 
svn update, the command doesn't do anything.


svn2.freepascal.org it's working fine, the only problem is I need write 
access to lazarus repository, and bugs.freepascal.org and viewvc are 
unreliable to me.


btw I also modified MTU settings in both windows and linux without much 
success :(


Jesus Reyes A.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Bitcounting

2016-03-06 Thread Jesus Reyes A.

En Sat, 05 Mar 2016 12:03:24 -0600, Bart  escribió:


Hi,

Does FreePascal have a routine for counting bits?
So that e.g. BitCount(%100110011) gives 5 (number of bits that are  
1)?


I came up with (extracted from IntToBin()):

function BitCount(N: Int64): Integer;
var
  Q: QWord;
  i: Integer;
begin
  Result := 0;
  Q := QWord(N);
  for i := 0 to (8 * SizeOf(N) - 1) do
  begin
if ((Q and 1) = 1) then Inc(Result);
Q := Q shr 1;
  end;
end;

Surely this can be done better?

Bart



function BitCount(N: Int64): Integer;
var
  i: Integer;
begin
  Result := 0;
  if N=0 then
exit;
  for i := 0 to (8 * SizeOf(N) - 1) do
  begin
if (N and (1 shl i)) <> 0 then Inc(result);
  end;
end;

not tested :D

Jesus Reyes A.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How do I test the testfppdf on Windows?

2016-03-06 Thread Jesus Reyes A.
On Sat, 05 Mar 2016 14:03:49 -0600, Michael Van Canneyt  
 wrote:




This is what I get with the normal test font:
http://www.freepascal.org/~michael/test.pdf

Can you please try with the original font too, please ?
(freesans is freely available)

If that works, it would mean there is something wrong with the Arial  
font handling.


Michael.


your file looks like the one I produced here when using "Visor de  
documentos" which happen to be evince, this is what it looks  
http://ctrlv.in/722669 the only change I did was adding JRAXX at the end  
of every P.WriteText'd string where XX is the index of each instance.  
Seems only latin text is working.


Later I will try with other readers.

Jesus Reyes A.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How do I test the testfppdf on Windows?

2016-03-09 Thread Jesus Reyes A.
On Sun, 06 Mar 2016 03:15:06 -0600, Michael Van Canneyt  
 wrote:





On Sat, 5 Mar 2016, Jesus Reyes A. wrote:

On Sat, 05 Mar 2016 14:03:49 -0600, Michael Van Canneyt  
 wrote:



 This is what I get with the normal test font:
http://www.freepascal.org/~michael/test.pdf
 Can you please try with the original font too, please ?
(freesans is freely available)
 If that works, it would mean there is something wrong with the Arial  
font handling.

 Michael.


your file looks like the one I produced here when using "Visor de  
documentos" which happen to be evince, this is what it looks  
http://ctrlv.in/722669 the only change I did was adding JRAXX at the  
end of every P.WriteText'd string where XX is the index of each  
instance. Seems only latin text is working.


Strange, because if I recall correctly it was tested with Cyrillic, and  
that worked ?



Later I will try with other readers.


Please do, I'd welcome any hints as to what could be wrong !

(evince is one of the readers that was used to test, BTW)

Michael.


The problem of evince not showing some texts it's because the compressed  
font file stream size is written with an incorrect value. There is an  
option to enable font file compression (poCompressFonts) but in the code,  
compression is always enabled, the compressed stream size is returned in  
the function that writes down the compressed stream, too late because the  
/length item was already written using the uncompressed size. The attached  
patch addresses both problems and makes sure length1 item is not written  
down if not needed.


This however doesn't fix the Cyrillic and other texts :(

Jesus Reyes A.Index: fppdf.pp
===
--- fppdf.pp(revisión: 33164)
+++ fppdf.pp(copia de trabajo)
@@ -396,8 +396,10 @@
   private
 FKey: TPDFName;
 FObj: TPDFObject;
+FHidden: Boolean;
   protected
 procedure Write(const AStream: TStream);override;
+property Hidden : Boolean read FHidden write FHidden;
   public
 constructor Create(Const ADocument : TPDFDocument; const AKey: string; 
const AValue: TPDFObject);
 destructor Destroy; override;
@@ -2397,10 +2399,13 @@
 
 procedure TPDFDictionaryItem.Write(const AStream: TStream);
 begin
-  FKey.Write(AStream);
-  TPDFObject.WriteString(' ', AStream);
-  FObj.Write(AStream);
-  TPDFObject.WriteString(CRLF, AStream);
+  if not FHidden then
+  begin
+FKey.Write(AStream);
+TPDFObject.WriteString(' ', AStream);
+FObj.Write(AStream);
+TPDFObject.WriteString(CRLF, AStream);
+  end;
 end;
 
 constructor TPDFDictionaryItem.Create(Const ADocument : TPDFDocument;const 
AKey: string; const AValue: TPDFObject);
@@ -2484,7 +2489,7 @@
 var
   ISize,i, NumImg, NumFnt: integer;
   Value: string;
-  M : TMemoryStream;
+  M, Buf : TMemoryStream;
   E : TPDFDictionaryItem;
   D : TPDFDictionary;
 begin
@@ -2520,18 +2525,29 @@
   if Pos('Length1', E.FKey.Name) > 0 then
   begin
 M:=TMemoryStream.Create;
+Buf:=TMemoryStream.Create;
 try
   Value:=E.FKey.Name;
   NumFnt:=StrToInt(Copy(Value, Succ(Pos(' ', Value)), 
Length(Value) - Pos(' ', Value)));
   m.LoadFromFile(Document.FontFiles[NumFnt]);
+  // write buffer with compressed (if requested) fontfile stream
+  ISize := TPDFEmbeddedFont.WriteEmbeddedFont(Document, M, Buf);
+  D:=Document.GlobalXRefs[AObject].Dict;
+  // if compression was enabled write Filter
+  if poCompressFonts in Document.Options then
+  begin
+D.AddName('Filter','FlateDecode');
+LastElement.Write(AStream);
+  end;
   // write fontfile stream length in xobject dictionary
-  D:=Document.GlobalXRefs[AObject].Dict;
-  D.AddInteger('Length',M.Size);
+  D.AddInteger('Length',ISize);
   LastElement.Write(AStream);
   WriteString('>>', AStream);
   // write fontfile stream in xobject dictionary
-  TPDFEmbeddedFont.WriteEmbeddedFont(Document, M, AStream);
+  Buf.Position := 0;
+  Buf.SaveToStream(AStream);
 finally
+  Buf.Free;
   M.Free;
 end;
   end;
@@ -3099,8 +3115,8 @@
 
 begin
   FDict:=CreateGlobalXRef.Dict;
-  FDict.AddName('Filter','FlateDecode');
   FDict.AddInteger('Length1 
'+IntToStr(EmbeddedFontNum),StrToInt(FontDef.FOriginalSize));
+  FDict.LastElement.Hidden := not (poCompressFonts in Options);
 end;
 
 procedure TPDFDocument.CreateImageEntry(ImgWidth, ImgHeight, NumImg: integer);
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How do I test the testfppdf on Windows?

2016-03-09 Thread Jesus Reyes A.
On Sun, 06 Mar 2016 03:15:06 -0600, Michael Van Canneyt  
 wrote:


Forgot to say, this is how it now looks the generated document:  
http://ctrlv.in/724645


Jesus Reyes A.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How do I test the testfppdf on Windows?

2016-03-19 Thread Jesus Reyes A.
En Thu, 17 Mar 2016 21:10:03 -0600, silvioprog   
escribió:


On Tue, Mar 15, 2016 at 4:38 AM, Michael Van Canneyt  
 wrote:

[...]

I have (hopefully) fixed this. rev. 33255.


The crash was fixed after upgrade my FPC. But it still generating five  
empty pages even applying the Jesus Reyes' patch. :-/


--Silvio Clécio


I took a look at the pdf file you posted on march 5. I think I know why  
your file looks so odd, all numeric values non-integers are written in the  
pdf file using COMMA :)


This is an extract of some stream on your file:


/F3 23 Tf
0 0 0 RG
BT
70,87 785,31 TD
(Basic Shapes) Tj
ET
1 0 0 RG
0,21 0,7 0,27 rg
1 J
3 w
85,04 615,23 113,39 56,69 re

An this is how it should look:


/F3 23 Tf
0 0 0 RG
BT
70.87 785.31 TD
(Basic Shapes) Tj
ET
1 0 0 RG
0.21 0.7 0.27 rg
1 J
3 w
85.04 615.23 113.39 56.69 re

so your locale is playing a role here, numeric conversions in the pdf  
library should be made locale agnostic.

try to change your decimalseparator to "." before and try again.

Jesus Reyes A.

--
Usando el cliente de correo de Opera: http://www.opera.com/mail/___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Pending fcl-pdf changes

2016-09-15 Thread Jesus Reyes A.

Hi,

There are some changes in fcl-pdf that are still not merged to fixes, the  
new LazReport PDF exporter can only work with FPC trunk without those and  
it would be nice to have it working with FPC fixes and 3.0.2. Can you  
please merge any missing change to fixes?, thanks.



Jesus Reyes A.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TSQLQuery and buffering.

2017-03-26 Thread Jesus Reyes A.
En Sat, 25 Mar 2017 02:32:33 -0600, Gary Doades   
escribió:


Many thanks for your reply. I had read about UniDirectional and I have  
indeed tried this. It doesn't seem to make any significant difference.  
Looking through the source code for TBufDataset it looks like  
UniDirectional just turns off building various indexes/structures etc.  
and fetches the result set all in one go instead of 10 row chunks. It  
still buffers everything in memory.




From your original message one could think that you were using  
PacketRecords:=-1 which means fetch all records at once, but if you are  
using the standard setting, which is 10 and yet it is still fetching  
everything at once, it sounds like a bug to me.


Jesus Reyes A.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Jesus Reyes A.
En Sun, 20 May 2018 07:23:25 -0500, Sven Barth via fpc-pascal  
 escribió:



Hello together!

I'm pleased to announce that after nearly a year various extensions for  
dynamic arrays have been finished. This includes the following features:


- support for array constructors using "[...]" syntax
- support for Insert(), Delete() and Concat()
- support for "+" operator
- support for dynamic array constants (and variable initializations)



Wow!
Thanks :)

Jesus Reyes A.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal