Alexander Sviridenkov
-
Content Count
255 -
Joined
-
Last visited
-
Days Won
25
Posts posted by Alexander Sviridenkov
-
-
-
9 minutes ago, Arnaud Bouchez said:I missed the info, sorry.
For a SQL solution, it is very good.
Out of curiosity, how much memory does it need for the 16.5 GB file?
Does it use SQLite3 and its virtual tables internally for its SQL dialect (something like https://www.sqlite.org/csv.html)?Memory is around 20Mb and doesn;t depend on file size.
No SQLite or other external solutions are used, everything is written in plain Delphi - SQL parser, SQL execution classes, etc.
https://delphihtmlcomponents.com/sql/ -
17 minutes ago, Arnaud Bouchez said:Easy, and wrong.
You are reading the station weathers reference data with one row per station.
And making a min/max/average of a single data per station.The challenge is to read a 1 billion (1,000,000,000) rows of CSV data for all those 41343 stations, and compute it.
There is a generator of a 16GB CSV file to inject and process.
So 0.33s for 41343 rows would make around 8000 seconds, i.e. 5.5 days.
-
16 minutes ago, Clément said:The unit I'm tracking does not appear in the graph.
If I remove the path or rename the unit the project doesn't compile.
I deleted all dcus from the library root to be sure only valid ".pas" files are compiled.
This is quite strange. Does unit map looks correct (all other units are present)?
-
33 minutes ago, Clément said:Very nice tool! But it didn't display the unit I'm looking for. The unit is not directly linked in the project file, instead it is in a folder defined in the IDE environment. I would have to add folders to a list of folders to look for. Is it possible with the latest version you made available?
Last version should show all files used in application, not only ones mentioned in .dpr.
It starts from .dpr units and recursively find all units listed in inteface and implementation sections. Of course IDE Library path and projects paths settings are used when scanning.
BTW it can extract interface and implementation units even if only .dcu is available.
-
1 hour ago, DelphiUdIT said:May the be graph attached in that post ?
https://en.delphipraxis.net/topic/10229-unit-dependency-viwer/?do=findComment&comment=81286
Link to latest build:
- 1
- 2
-
18 hours ago, kolbasz said:Because he forget to mention how long it take to populate table weather_station with one billion records. I'm guessing many minutes, unless he has a very performant hardware. Running a query is only half part of the story. The post is funny though.
There are no tables. Query is executed directly on CSV file.
-
43 minutes ago, Stefan Glienke said:So assuming that your code scales linearly it will only take 92 days for 1 billion rows
Scaling is not linear there. Real 10^9 file (16.5 Gb) is processed in 15 minutes (936 sec) on Ryzen 5 4600H notebook (single thread).
- 1
-
-
38 minutes ago, gioma said:then if I have a unicode string like this: 'ABCDEFGHI' and I put it inside a byte array if I want to remove the first character from the byte array do I have to remove two bytes and not one?
Yes, two or four (for symbols behind BMP).
- 1
-
Unicode (UTF16) symbol size is at least 2 bytes, so after deleting 1 byte string became incorrect.
- 1
-
Just now, dormky said:That does simple to be the simple thing I was looking for, thanks 🙂 How do I free this though ?
https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.Dispose
-
var p: PMyRec;
New(p); -
Delphi 12 support.
New htide unit - installed Delphi versions, Library paths, PAS and DCU parsing, etc.
New demo (/Sample Projects/graph) - Unit dependency viewer.- Video: https://youtu.be/ec0pOy2uY4w
- Compiled demo: https://delphihtmlcomponents.com/graph.zip
Cairo canvas support on Linux and Windows for Delphi and Lazarus.
Canvas supports precise text rendering so PDF and other documents converted by HTML Office library now can be properly displayed on Linux.
PDF export on Linux via Cairo.
Reports library now supports Lazarus
Big upgrade of SQL framework: perform SQL queries on CSV and text files, JSON, XML, Excel,
Outlook, SQL scripts and other sources.- Video: https://www.youtube.com/watch?v=IzV9jZe6ksQ
- Compiled demo: https://delphihtmlcomponents.com/sqltest.zip
- Manual: https://delphihtmlcomponents.com/sql/
What it can do:
- Convert to/from CSV, JSON, XML, HTML, Excel, SQL script.
- Upload files/objects to database
- Export data from database
- Check data consistency
- Display data/objects in DB-aware controls, HtPanel, StringGrid, VirtualTreeview, ControlList
- Extend database capabilities (f.e. use Pivot in Firebird).
- Serialize and deserialize objects
- Reduce calls to REST server by using already loaded data.
Supported data sources:
- CSV file
- JSON file
- JSON string
- XML file
- HTML file
- Text file with fixed size fields
- SQL script
- ZIP archive
- XLS/XLSX Excel sheet (requires HTML Office Library).
- Outlook PST/OST file (requires HTML Office Library).
- TList<T>
- TObjectList
- Any class with IEnumerable or GetEnumerator support
- TDataset
- array of T
- SQL Query
- Custom sources can be added by implementing IDMDatasource interface.
Supported dialects:
- SQL 92
- Oracle
- MS SQL Server
- Firebird
- MySQL
- PostrgesSQL
- SQLite
- ElevateDB
Result can be exported to
- CSV
- XML
- JSON
- SQL script
- TDataset
- TStringList
- TObjectList
- SQL table
- HTML (plain table or using template)
- Array of variant
- Binary file
- or any other format, using custom processing of result data.
- 2
- 4
-
One day 20% discount on HTML Component Library, HTML Editor Library, Bundle (Editor + Reports) and HTML Office Library.
Please use coupon code BF2023
-
-
AFAIK this list is created using TControlList component.
If you want to use HTML and create more complex layouts, there is HTML Component Library that allows to use HTML in Delphi controls and create layouts of any complexity.
-
Maybe this come from SKIA webp support?
-
Sample test application for SQL framework.
https://delphihtmlcomponents.com/sqltest.rar
What it can do?
Extract and transform data directly from Excel, CSV, JSON and XML files and archives.
How to use: choose file or folder and write SQL query.
Example: select all data from Excel sheet (sample.xlsx is included):
select * from sample.sheet1
List of countries (we should exclude first row with caption using _row pseudo field).
select distinct b from sample.sheet1 where _row > 0
Calculate sum of sales by country
select B country, sum(H) sales from sample.sheet1 where _row > 0 group by 1
Countries (B) present in both segments (A)
select B from sample.sheet1 where A = 'Government' intersect select B from sample.sheet1 where A = 'Midmarket'
JSON file (customers.json is included):select * from customers where email like '%.ca'
Using joins (sales_data.zip is included, it contains four JSON files: sales, orders, customers and products):
select c.name, o.orderId, o.date, p.name, s.quantity from sales_data.sales s join sales_data.orders o on o.orderid=s.orderid join sales_data.customers c on c.customerid=o.customerid join sales_data.products p on p.productid=s.productid
Calc percent from max quantity
select c.name, o.orderId, o.date, p.name, round(100 * s.quantity / (select max(cast(quantity as float)) from sales_data.sales)) qpercent from sales_data.sales s join sales_data.orders o on o.orderid=s.orderid join sales_data.customers c on c.customerid=o.customerid join sales_data.products p on p.productid=s.productid
List of products by order
select o.orderId, o.date, list(p.name, ', ') products from sales_data.sales s join sales_data.orders o on o.orderid=s.orderid join sales_data.products p on p.productid=s.productid group by 1, 2
XML (cust.xml example included).
Sometimes XML files has comples structure and contain different objects.
To select only necessary objects we use XPATH. Also XPATH can be used in field names:select CustomerID, "/CompanyName" Company, "/FullAddress/City" City from cust('/Customers/Customer')
Join with orders in the same file:
select c.CustomerID, c."/CompanyName" Company, c."/FullAddress/City" City, cast(o."/OrderDate" as Date) OrderDate from cust('/Customers/Customer') c join cust('/Orders/Order') o on o."/CustomerID" = c.CustomerID
CSV (survey.csv is included)
Same naming scheme as for Excel.Excample: top 10 industries by income select C industry, sum(H) income from survey where F = 'Total income' group by 1 order by 2 desc rows 1 to 10
What is supported:select from select
join, left join
union, union all, intersect
distinct, order by, group by, rollup, having
first skip last rows limit fetch nulls last
sum, max, min, avg, list/listagg
= <> > >= < <= + - * / mod || in between like not like starting with and or
exists, any, some, all
subselects
cast, decode, iif, case, coalesce
Almost all Firebird funcions https://firebirdsql.org/refdocs/langrefupd21-intfunc.html, Oracle and MSSQL functions.- 1
-
@Renate Schaaf just for reference: I've implemented blur using two pass box blur and SIMD, speed is 20ms for 3000x1200 image (180 000 000 px/sec).
Here is compiled sample: delphihtmlcomponents.com/blur.zip
-
Thank you. Just uploaded 1.0.0.29 - fixed black ellipses and reverted layout to initial settings.
- 1
-
2 minutes ago, Die Holländer said:The extra Unit dependencies screen is now showing black circles
without text and I don't know what they are.
Could you please show a screenshot?
-
1.0.0.28
Show unit initialization order.
-
On 10/6/2023 at 5:15 PM, mvanrijnen said:Looks good, you gonna release the SQL classes apart from the HTML Library ?
btw where did you learn to type that fast ? 😉
No, this will be included in Reports (Bundle)
WebUI framework: Technical preview. Part 1.
in I made this
Posted
It's under development, just preview. Release is expected in May and will be included in HTML Library bundle for customers on subscription.