c0d3r
Members-
Content Count
129 -
Joined
-
Last visited
-
Days Won
1
Everything posted by c0d3r
-
Shutting down TidTCPServer (kbmMWTCPIPIndyServerTransport)causing Window Service timeout
c0d3r replied to c0d3r's topic in Indy
As usual I sent email to Kim last week, no response. Wish me luck if I get response. Try registrating to its forum to ask questions, nope, my work email was used and can't register, try 'Forgot/Lost Password' link, Oops, your email doesn't exist. I sent email to Kim about registration issue on Sunday, lets see when I would get the response, so far no any response. EDIT: Oh, Oh, the only email I can always get from him was the email that asking me to pay the annual subscription fee on due date. -
Shutting down TidTCPServer (kbmMWTCPIPIndyServerTransport)causing Window Service timeout
c0d3r replied to c0d3r's topic in Indy
Here was what I found tonight on one of our customers server: While stopping the service and timeout, there was a remote connection to the port that having FIN_WAIT_1 status (using netstat -a), What was that? -
Shutting down TidTCPServer (kbmMWTCPIPIndyServerTransport)causing Window Service timeout
c0d3r replied to c0d3r's topic in Indy
@Remy Lebeau Thanks for the answers. Much appreciated. We didn't write any codes for any TidTCPServer event handlers. The TransportServer is a TkbmMWTCPIPIndyServerTransport object, it uses TIdTCPServer internally as its Socket instance. What we did was that in OnServiceStartEvent, calling TransportServer.Listen (which calls TidTCPServer.Active := True), and in OnServiceStopEvent, calling TransportServer.Close (which calls TidTCPServer.Active := False), kbmMW handles everything else underneath (dealing with client side requests/server side responses). As for TerminateWaitTime property default to 5 seconds, we never set or change it by any chance, I thought Windows service timeout was set way longer (at least 30 seconds, we tested 90 seconds in the past) than TerminateWaitTime. The hard part was that we can't reproduce on our development machines. Only some of our customers who were heavily using the servers were having the issue. We don't know how to debug at this point and where we should look at from. -
FirebirdSQL client library parameter in INI
c0d3r replied to ertank's topic in MARS-Curiosity REST Library
Yes. you can as long as fbclient.dll is the right one.- 7 replies
-
- mars-curiosity
- firebird
-
(and 1 more)
Tagged with:
-
Could anyone help what the warning was about, Codes was fine in Delphi2007, but not in Delphi 10.4.1: ServiceMethod: TServiceMethod; which is a type of function (Sender: TObject, ...): variant of object;
-
Figured it out, the type should be a type of function, not object function.
-
Appreciated!
-
Hi, For the last couple of days I tried figure out the issue about Canvas.Polygon wasn't working properly. Here is my routine: procedure DrawTriangle(ACanvas: TCanvas; AColor: TColor; ARect: TRect); begin ACanvas.Brush.Style := bsSolid; ACanvas.Brush.Color := ColorToRGB(clRed); //ColorToRGB(AColor); ACanvas.Pen.Color := ColorToRGB(clRed); //ColorToRGB(AColor); //ACanvas.Pen.Mode := pmCopy; ACanvas.Polygon([Point(ARect.Right - 1, ARect.Bottom - 10), Point(ARect.Right - 1, ARect.Bottom - 1), Point(ARect.Right - 10, ARect.Bottom - 1)]); end; if I passed clRed as one of the Color parameter on the red background, it drawed a white triangle, as you see from the below screenshot,. It was only painted right at the most right column. Even I hard coded to set color to clRed, it still drawed a white triangle. I just can't figure out what I was doing wrong.
-
Solved the issue, but I don't understand the reason why, I had like: SaveIndex := SaveDC(Canvas.Handle); try IntersectClipRect(Canvas.Handle, .....); PaintRows(Canvas, ...); finally RestoreDC(Canvas.Handle, SaveIndex); end; The codes in procedure PaintRows: SaveIndex2 := SaveDC(ACanvas.Handle); try IntersectClipRect(ACanvas.Handle, .....); ..... PaintCells(ACanvas, ...); ...... finally RestoreDC(ACanvas.Handle, SaveIndex2); end; By removing the SaveDC/RestoreDC from procedure PaintRows, it solves, but Why? can't nest call SaveDC/RestoreDC??
-
Tried reversing the order of pen and brush assignments, doesn't work either.
-
@Anders Melander tried yours but still the same issue: procedure DrawTriangle(ACanvas: TCanvas; AColor: TColor; ARect: TRect); var SaveIndex: Integer; begin ACanvas.Lock; try SaveIndex := SaveDC(ACanvas.Handle); try ACanvas.Brush.Style := bsSolid; ACanvas.Brush.Color := clBlack; ACanvas.Pen.Color := clBlack; ACanvas.Polygon([Point(ARect.Right - 1, ARect.Bottom - 10), Point(ARect.Right - 1, ARect.Bottom - 1), Point(ARect.Right - 10, ARect.Bottom - 1)]); finally RestoreDC(ACanvas.Handle, SaveIndex); end; finally ACanvas.Unlock; end; end;
-
Tried without, it doesn't work either.
-
if I use clBlack instead:
-
Customizing source editor
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I created a new post for my delphi ide editor themes, you may download the files from there: -
Some one is asking for my themes, so I thought its better to create a new post to benefit any one who like them, I called them "Nature" themes, one Nature original theme and one Nature Warm theme, you may use Delphi IDE theme editor (https://github.com/RRUZ/delphi-ide-theme-editor) to apply them: Please click Like if you enjoy it. Nature warm (based on my Nature original theme): File: c0d3r-YW-Nature-warm.theme.xml
-
Nature: The brick red represents: Flowers, The green: Forest, the orange/yellow: Moon/Sun, the cream white: Clouds, the dark blue background: Deep ocean, the light green (blueish, used for comments) : Rivers. the brown white space: earth. the Sky blue brace pair highlight: The Sky. The red error lines: Fire. File: c0d3r-YW-Nature.theme.xml
-
Just realized that the compiler error counts were always offset by 1, so where is that extra one? Are the EMBRAS... guys able to count their fingers? if not, I can teach them.
-
1 error + 1 error = 3 errors? where is the extra one?
c0d3r replied to c0d3r's topic in Delphi IDE and APIs
can't compile the unit is not an error that should be included, its a result due to that ONE typo error in the codes. The errors should be reported exactly as whats in your codes. -
1 error + 1 error = 3 errors? where is the extra one?
c0d3r replied to c0d3r's topic in Delphi IDE and APIs
Create a new vcl application, drop 2 labels, and make ONE label name typo in Oncreate event. When compiling, it said there were 2 errors in the codes: -
Customizing source editor
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Yes. I think so, from Options/User Interface/Editor/Color/Color Speedsetting dropdown -
Customizing source editor
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Yes. I did switch between colour schemes by using Delphi IDE Theme Editor. The last scheme I posted was used more often now. -
Customizing source editor
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I called my this IDE colour schema : Nature. the red: Flowers, the green: Forest, the orange/yellow: Moon/Sun, the cream white: Clouds, the dark blue background: Deep ocean, the light green (a bit blueish) : Rivers. the brown white space: earth. the Sky blue brace pair highlight: The Sky. The red error lines: Fire. -
Customizing source editor
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Here is another Delphi IDE color scheme I used to use: -
I had exact the same issue. See the screenshot. Its reproducible if I ctrl-shift-up to the procedure declaration section, then ctrl-shift-down back to the procedure body, then move the cursor, you would see it. However, I'm in a VM though.
-
Customizing source editor
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Original Delphi Editor