* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Getting the keys pressed in the Linux OS
« Last post by dbannon on Today at 12:46:19 am »
......
In the Linux OS, the GetKeyState retrieve the key pressed only if my program has the focus.
Do you know if there is a way to retrieve the keys pressed in the Linux OS when the program has not the focus ?

Gee, I hope not. That would seem a very nasty security bug !

Davo
2
Graphics / Re: Resource files in Lazarus
« Last post by wp on Today at 12:39:14 am »
How do I extract individual bitmaps from a loaded resource file please?
Code: Pascal  [Select]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   pic: TPicture;
  4. begin
  5.   pic := TPicture.Create;
  6.   pic.LoadFromResourceName(HINSTANCE, 'BTN_YES');   // <---- read the resource of the program
  7.   Image1.Picture.Assign(pic);
  8.   pic.Free;
  9. end;
3
Graphics / Resource files in Lazarus
« Last post by PatBayford on Today at 12:17:18 am »
How do I extract individual bitmaps from a loaded resource file please? Used to be easy using the Windows API LoadBitmap function, but Lazarus does not support this, presumably as part of the multi-platform drive.
In fact, I would like to get hold of a good reference to Resource file use in Lazarus - anybody come across one?
4
TAChart / Re: Horizontal bar chart (missing labels)
« Last post by wp on Today at 12:10:55 am »
Thanks for demo.

This issue, unfortunately, is not covered by the tutorial which has a separate chartsource for the labels. In your case, however, the axis labels are taken from the same chartsource which also provides the x/y values.

When you use the Marks.Style for the bottom axis of an unrotated chart (vertical bars) the labels are drawn at the x values of the ChartSource items.

When the bars are rotated the labels should still be drawn at the x positions, but since the vertical axis still is the y axis internally it picks the coordinates from the y value of the data point.

An axis does not "know" whether it is drawn for a normal or a rotated series, and therefore it cannot detect automatically that it should pick the other coordinate for label positioning of a rotated series. (This is different from the series which has the AxisIndexX and AxisIndexY properties).

Of course you can help the axis and exchange the x/y values in another chartsource assigned to the Marks.Source of the left axis. You can use a UserDefinedChartSource which picks the data from the main chartsource and swaps x and y.

Code: Pascal  [Select]
  1. procedure TForm1.UserDefinedChartSource1GetChartDataItem(
  2.   ASource: TUserDefinedChartSource; AIndex: Integer; var AItem: TChartDataItem);
  3. begin
  4.   AItem.X := PublicPrioritaire.Item[AIndex]^.Y;
  5.   AItem.Y := PublicPrioritaire.Item[AIndex]^.X;
  6.   AItem.Text := PublicPrioritaire.Item[AIndex]^.Text;
  7. end;  

Don't forget to set the PointsNumber of the UserDefinedChartSource to the data point count of the ListChartSource which provides the data:

Code: Pascal  [Select]
  1. procedure TForm1.FormShow(Sender: TObject);
  2. begin
  3.   PublicPrioritaire.Clear;
  4.   PublicPrioritaire.Add(0, 29, 'Nord');
  5.   PublicPrioritaire.Add(1, 15, 'Sud');
  6.   PublicPrioritaire.Add(2, 11, 'Est');
  7.   PublicPrioritaire.Add(3, 5, 'Ouest');
  8.  
  9.   UserDefinedChartSource1.PointsNumber := PublicPrioritaire.Count;
  10. end;  

Assign this UserDefinedChartSource to the Marks.Source of the LeftAxis, and set its Marks.Style to smsLabel.
5
Amine, you are going to be banned again like last time by the moderators of this forum. All you do is keep advertising your products.

Be careful.
6
Hello..

My Dense and Sparse Scalable Parallel implementation of Conjugate Gradient Linear System Solver library for Delphi and FreePascal and for Windows and Linux and for 32 bit and 64 bit is here :

Sparse linear system solvers are ubiquitous in high performance computing (HPC) and often are the most computational intensive parts in scientific computing codes. A few of the many applications relying on sparse linear solvers include fusion energy simulation, space weather simulation, climate modeling, and environmental modeling, and finite element method, and large-scale reservoir simulations to enhance oil recovery by the oil and gas industry. .

Conjugate Gradient is known to converge to the exact solution in n steps for a matrix of size n, and was historically first seen as a direct method because of this. However, after a while people figured out that it works really well if you just stop the iteration much earlier - often you will get a very good approximation after much fewer than n steps. In fact, we can analyze how fast Conjugate gradient converges. The end result is that Conjugate gradient is used as an iterative method for large linear systems today.

Scalable Parallel implementation of Conjugate Gradient Dense Linear System Solver library that is NUMA-aware and cache-aware, version 1.71

You can download it from:

https://sites.google.com/site/aminer68/scalable-parallel-implementation-of-conjugate-gradient-linear-system-solver-library-that-is-numa-aware-and-cache-aware

And:

Scalable parallel implementation of Conjugate Gradient Linear Sparse System Solver library version 1.71

You can download it from:

https://sites.google.com/site/aminer68/parallel-implementation-of-conjugate-gradient-sparse-linear-system-solver



Thank you,
Amien Moulay Ramdane.
7
Third party / A powerful Parallel Compression Library
« Last post by Sky68 on May 21, 2018, 11:04:34 pm »
Hello,

My powerful Parallel Compression Library version 4.32 for Windows and Linux and for 32 bit and 64 bit is here..

Author: Amine Moulay Ramdane

Description:

Parallel Compression Library implements Parallel LZ4 , Parallel LZMA , and Parallel Zstd algorithms using my Thread Pool Engine.

- It supports memory streams, file streams and files

- 64 bit supports - lets you create archive files over 4 GB ,  supports archives up  to 2^63 bytes, compresses and  decompresses files up to 2^63 bytes.

- Parallel compression and parallel decompression are extremely fast

- Now it supports processor groups on windows, so that it can use more than 64 logical processors and it scales well.

- It's NUMA-aware and NUMA efficient on windows

- It minimizes efficiently the contention so that it scales well.

- It supports both compression and decompression rate indicator

- You can test the integrity of your compressed file or stream

- Easy programming interface

- Full source codes available.

Now my Parallel compression library is optimized for NUMA(it parallelizes the reads and writes on NUMA nodes)  and it supports processor groups on windows and it uses only two threads that do the IO (and they are not contending) so that it reduces at best the contention, so that it scales well.  Also now the process of calculating the CRC is much more optimized and is fast, and the process of testing the integrity is fast.

I have done a quick calculation of the scalability prediction for my Parallel Compression Library,  and i think it's good: it can scale beyond 100X on NUMA systems.

Here are the parameters of the constructor:

First parameter is: The number of cores you have specify to run the compression algorithm in parallel.

Second parameter is: A boolean parameter that is processorgroups to support processor groups on windows , if it is set to true it will enable you to scale beyond 64 logical processors and it will be NUMA efficient.

Just look at the Easy compression library for example,

if you have noticed it's not a parallel compression library.

http://www.componentace.com/ecl_features.htm

And look at its pricing:

http://www.componentace.com/order/order_product.php?id=4

My parallel compression library costs you 0$ and it's a parallel compression library..

My Parallel compression library was updated,  i have ported the Parallel LZ4 compression algorithm(one of the fastest in the world)  to the Windows 64 bit system, now Parallel LZ4 compression algorithm is working perfectly with Windows 32 bit and 64 bit, if you want to use Windows 64 bit Parallel LZ4 just copy the lz4_2.dll inside the LZ4_64 directory (that you find inside the zip file) to your current directory or to the c:\windows\SysWow64 directory, and if you want to use the Windows 32bit Parallel LZ4  use the lz4_2.dll inside the LZ4_32 directory.

If you want to use Windows 64 bit Parallel LZMA with Windows 64 bit just copy the LZMAStream1.dll inside the LZMA_fpc64  directory and LZMAStream2.dll inside LZMA_dcc64 directory to your
current directory or to the c:\windows\SysWow64 directory, and if you want to use Windows 32bit Parallel LZMA copy the LZMAStream1.dll inside the LZMA_fpc32 directory and LZMAStream2.dll inside LZMA_dcc32 directory to your current directory or to the c:\windows\system32 directory.


You can download it from:

https://sites.google.com/site/aminer68/parallel-compression-library

Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating systems: Windows , Linux

Required FPC switches: -O3 -Sd -dFPC

-Sd for delphi mode....

Required Delphi switches:  -$H+ -DDelphi32

Required Delphi XE-XE5 switches: -DXE       

{$DEFINE CPU32} and {$DEFINE Windows32} for 32 bit systems

{$DEFINE CPU64} and {$DEFINE Windows64} for 64 bit systems


Thank you,
Amine Moulay Ramdane.
8
General / Re: Scroll bars on checklistbox or Listbox?
« Last post by jbmckim on May 21, 2018, 10:51:25 pm »
Well that's truly bizarre...

I just went back in and rebuilt the project to double check my error before making a demo.  Now it works.

Next question:  Where's the combo "pound head against wall" + "relief" emoji?

Thanks.
9
TAChart / Re: Horizontal bar chart (missing labels)
« Last post by JD on May 21, 2018, 10:49:12 pm »
It's hard to tell from the distance what you did wrong. If possible upload a small demo which shows the issue.

Did you look at the tutorial http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_BarSeries#Horizontal_bar_series)? And the tutorial project is also avaiable in your Lazarus installation in folder (lazarus)/tachart/tutorials/bar_series, both in a vertical and a horizontal bar series version.

Hi there wp. Yes I've looked at the tutorials, tried to follow them but I still have a problem with the labels. Here is a sample project.

Thanks,

JD
10
General / Re: My own robotic arm-some progress
« Last post by krolikbest on May 21, 2018, 10:41:14 pm »

Thanks for your replies. Yes, if you get feedback or are carefully calibrated you can tune on/off to be a curve instead of abrupt.

Probably our robot will be aluminium. and I'll probably using dspice33's (using C or, less likely Mikropascal).If I need more, they'll probably be linked over CAN, with a W5500 ethernet chip to communicate with PC (or RPI for the mobile, demonstration setup)

These (dspic33epxxxMU806/810/814) are the standard chips we use, and they are very suitable for this, with 14 two pin motor peripherals and 16 single pin and two encoders and DSP functionality to do realtime analysis (like FFT), though I have no experience with the DSP part yet. Till now I just use the single pin peripherals as a signal generation for external motor drivers like yours. But till this project most of our motorcontrol was ad-hoc and not design-in, so this will be different.

The robot will be an vertical axis that can turn 90 degrees and on top of this something that can extend (linear actuator?) and some gripping device on the point of that. So it can pick up a bottle from some store area, rotate 90 degrees, extend in the machine, and drop it. Precision is course, 5mm or so. Reliability is more important.

Aluminium is good choice. Stable, doesn't shake.
I feel I have to learn Mikropascal. Atmegas were programmed in Bascom, but I would like to make step forward and use not only 8-bit uC. Someone have interesting HOW TO BEGIN with Mikropascal?

btw I envy this task.
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus