-
Content Count
380 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Clément
-
Storing a large amount of elements in a 50k lines unit
Clément posted a topic in Algorithms, Data Structures and Class Design
Hi, I'm almost releasing "dhsPinger v2.00" . One of the features is recognize a network device manufacturer taking the device MAC Address. Since the first version I'm generating a list with all available MAC vendors in a unit, this latest version has 49978 rows. (The very first release has 16k rows) My MACvendors.data unit is autogenerated, and has 50028 lines. It looks like this: var glbVendors : TDictionary<String,String>; procedure InitializeVendors; begin glbVendors.Add('286FB9','Nokia Shanghai Bell Co., Ltd.'); glbVendors.Add('08EA44','Extreme Networks Headquarters'); glbVendors.Add('F4EAB5','Extreme Networks Headquarters'); {... 49978 rows ...} glbVendors.Add('8C1F64657','Bright Solutions PTE LTD'); glbVendors.Add('8C1F64C9B','J.M. Voith SE & Co. KG '); glbVendors.Add('8C1F64B01','Blue Ocean UG'); end; initialization glbVendors := TDictionary<String,String>.Create(49978); InitializeVendors; finalization glbVendors.free; There's no impact on loading, and I had no problems (so far) using this structure. Getting the MAC and it's vendor is done from within a thread. The IDE (delphi 11) is handling it fine. When rebuilding, almost a minute is required just to compile this unit. But It's a freaking 50k lines unit. Is there any known limit I should be aware of? (Project compiles to windows only, both 32-bit and 64-bit are required ). TIA, Clément -
Storing a large amount of elements in a 50k lines unit
Clément replied to Clément's topic in Algorithms, Data Structures and Class Design
I will take a look at this sample. I'm still using V8.71. Thanks -
Storing a large amount of elements in a 50k lines unit
Clément replied to Clément's topic in Algorithms, Data Structures and Class Design
Cool. I'm using ICS to ping. From Threads Thanks for the link -
Storing a large amount of elements in a 50k lines unit
Clément replied to Clément's topic in Algorithms, Data Structures and Class Design
If I choose to ignore the compilation hick-ups, I had no issue. But for this project, an external file has it's advantages. This application runs on some servers where the internet connection is fiercefully controlled. Among other things, the new engine in this release will run also from a Windows Service. No outside connection will be allowed from this service (security issues) The download will happen from the interface ( the picture I posted in the first message). In the Service version, a notification will be sent to a registered administrator every time a "new device" is detected. One of the requirement is to have as much data as possible to identity it. Up until now, I would have to compile that 50k unit and include that unit in both, the interface and the service. Now both will load an external file. -
Storing a large amount of elements in a 50k lines unit
Clément replied to Clément's topic in Algorithms, Data Structures and Class Design
I'm downloading the CSV files from (https://standards-oui.ieee.org/). Those are the files processed that grew to 50k. -
Storing a large amount of elements in a 50k lines unit
Clément replied to Clément's topic in Algorithms, Data Structures and Class Design
It's a simple lookup. I never expected it to grow so fast. A pre-build event download some files, processes them, generate a unit that is compiled with the project. Everything is packet in a single exe file. I noticed some hick-ups when compiling and found out that unit. I know this not an excuse, but it was supposed to be a simple lookup in a simple application. Thanks for the advice -
Storing a large amount of elements in a 50k lines unit
Clément replied to Clément's topic in Algorithms, Data Structures and Class Design
I meant, I couldn't release the application the way it is now ( 50k unit file). I will generate an external file, and load it at start up.... so a Beta V is on the way. -
Storing a large amount of elements in a 50k lines unit
Clément replied to Clément's topic in Algorithms, Data Structures and Class Design
I just couldn't release the app like that. There will be a Beta V in the near future Thanks all for the insight! -
But... Message numbers in the second range (WM_USER through 0x7FFF) can be defined and used by an application to send messages within a private window class. These values cannot be used to define messages that are meaningful throughout an application because some predefined window classes already define values in this range. For example, predefined control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use these values. Messages in this range should not be sent to other applications unless the applications have been designed to exchange messages and to attach the same meaning to the message numbers. Since I'm explicitly posting a message to a private window that is designed to handle it in a specific way and is not a subclass of a Windows control, it should be safe to use it. Isn't it?
-
If it's a VCL ( or FMX ) application, I prefer using messages: const _UM_AFTER_SHOW = WM_USER +$0001 ; /// SOme constant.. Be sure not to repeat the number Type TForm1 = Class( TForm ) private procedure event_AfterShow( var aMessage : TMessage ); message _UM_AFTERSHOW; end; Implementation procedure TForm1.OnShow( aSender : TObject ); begin Inherited; {.. some code } PostMessage( Handle, _UM_AFTERSHOW, 0 , 0 ); // This will post a message to itself end; procedure TForm1.event_AfterShow( var aMessage : TMessage ); begin // Run the code here end;
-
Hi, In this project I must use Delphi XE with dbExpress. I'm connecting against a SQL Server 20xx.... There's a customer requesting a TLS 1.2 only setup. Using sslscan I get this result: SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 disabled TLSv1.1 disabled TLSv1.2 enabled TLSv1.3 disabled With this setting I'm unable to connect my sample project ( TSQLConnection only ). When activating the connection an error is raised (attached image) When reactivating the other verions : SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 enabled TLSv1.1 enabled TLSv1.2 enabled TLSv1.3 disabled Everything works fine. I'm searching the web, but the only two parameters I found out, are not working with the XE version of dbExpress. I wondering if there's any way to connect to SQL Server via TLS1.2 only setup. (https://stackoverflow.com/questions/65050540/tls-1-2-sql-server-and-delphi-client) Are there any other parameters I can try? Tia, Clément
-
I build a small sample using vanila dbExpress using Delphi 11.3 to try to connect to SQL Server in a TLS 1.2 only setup. No joy. (It seems to me dbExpress is linked to Native Client 10 or 11 only) The way I managed to connect is using dbExpress Driver for SQL Server (trial version). From either Delphi XE or Delphi 11.3. Very simple. Good job! Using other tecnologies: ADOConnection, ZConnection, FDConnection etc worked fine on in both IDE. I just can't migrate this project from dbExpress to any of these.
-
When will we have a 64-bit IDE version ?
Clément replied to luciano_f's topic in Delphi IDE and APIs
If I could guess, I would say, 64 bit IDE is not in their short term plans. BUT.... They have been working hard to "clean up" some features. ( Some still need some love) All that work will payoff, and among other things, the availability of 64 bits ( I'm an optimist, shoot me!). <SpyVsSpy> I'm almost certain some fellow developer is trying to compile "the project" in 64 bits and hopefully the hints, warnings and errors are getting lower. </SpyVsSpy> -
Grep'oMania Greppsody VelociGrepXpert
-
Is it possible to create a VPN client/server in Delphi?
Clément posted a topic in RTL and Delphi Object Pascal
Hi, I googled to find some hints on how to create my own VPN solution. I'm still researching and I found nothing in Delphi (or pascal) that covers this subject. Some C examples are in linux, but I would like to focus on windows only. Any ideas? TIA -
Is it possible to create a VPN client/server in Delphi?
Clément replied to Clément's topic in RTL and Delphi Object Pascal
I'm still reading and trying to figure some aspects of this projects. May be I just need to learn a little more to be able to ask my friend the right questions. -
Is it possible to create a VPN client/server in Delphi?
Clément replied to Clément's topic in RTL and Delphi Object Pascal
This is one of my strongest arguments against this projects. But since it's a friend, I want to make sure I can explain the "why, hows, and don'ts" He considered other applications ( I will ask him about WireGuard ), and most have "extra features" that are not required. He just wanted a "plain old simple VPN" that works without extra features that goes way beyond what he requires. When some specs uses the word "simple", it just makes me run the other way. The problem in this case is the "friend" part. He would have asked if didn't required it. So.. Now that I learned a little more to be scared, I think I can get him scared too . -
Is it possible to create a VPN client/server in Delphi?
Clément replied to Clément's topic in RTL and Delphi Object Pascal
As far as I can tell, a VPN ( no system-wide local network ) , a "basic" secure channel... I'm gathering information for our next meeting. -
Is it possible to create a VPN client/server in Delphi?
Clément replied to Clément's topic in RTL and Delphi Object Pascal
N in VPN (local network between peers connected through the channel) I was just talking with a friend, and he would to have his own VPN integrated solution. He asked me if I could do it (write both VPN server and Client in Delphi). And I said that I have no idea! If possible, I would like to use SSTP as protocol and ICS as Client and Server app. After googling up a little and found some python implementation of a "simple VPN server". I found C samples to open a Private Network in windows. Some code (in Python) of a VPN server, and some client application In C too... Unfortunately nothing in Delphi (or pascal). I'm just hoping not to find the word "Driver" in the specifications Anyway, I hope to find a way to implement the basics -
In this project I'm downloading a page in EdgeBrowser. My application is extracting the main table, and displays it nicelly in a TreeView structure. The HTML table has several rows, and the last cell has a "ng-click" which I need to click. My TreeView already has a button, when the user clicks that button, I must click the corresponding "ng-click" and download detailed information about the product and display it. The last cell information looks like this (This is the last cell HTML code.) I have no idea how to reach that "ng-click" fellow: <a href="" class="btn btn-transparent" ng-if="::thisProductInventory.availableBallast && thisProductInventory.isAvailable" ng-class="{'btn-block':$root.mediaQueries['$res-phone-mid-landscape']()}" ng-click="ProductInventory(thisProductInventory, $event)"> There's no Click, onClick or any other option which I'm familiar with. It appears to be some Angular stuff. Can shed some light? I'm using DOM to navigate / extract data from the page. So ideally id would be perfect to reach something like "element.click()". (I have no way to modify the javascript code. All I can do is "interact" through Delphi /Edge with the page.) TIA
-
JS is scary! Goes against everything that is safe and sound. I really can't say who ( or what) wrote that code. It be can be a person, a framework or ChatGPT. They prefer to use a "Desktop application" to handle filtering and selection rather than modify the code. This should raise some red flags.
-
Just managed to do it in plain JavaScript! I navigate to the corresponding row using DOM, found the <a> tag and called click..... So easy!
-
In order to decide between them I usually check a few things: 1. "Staticness" : How often will upper bound change. Is the Index "Static". 2. "Filledness" : How well will the structure be filled. 3. Missed Index : How often will I hit one of those empty index, and if I hit what happens ( How easily can I deal with it ) 4. Element Owner : If the elements are instances "Who" will created them. "Who" will free them. Will "Who" be the same? 🙂 Indexed array is a great structure. Can be both performant and low size. "Dictionary" has it's weight. I'll use them whenever it's benefit outweigh this cost. Anyway.. I often use TDictionary or (TObjectDictionary) because I rarely have static index. ex: GUID is the key to another structure. In the example I gave, it is possible to add decoders at runtime ( from a DLL, or a database). And it wouldn't required a recompilation. Which very cool!