Recent

Author Topic: Corona outbreak  (Read 4403 times)

minesadorada

  • Hero Member
  • *****
  • Posts: 605
  • Retired
Re: Corona outbreak
« Reply #45 on: March 27, 2020, 11:09:05 am »
To make it quicker to flick between countries, I made a small change to my copy of the source.

Code: Pascal  [Select][+][-]
  1. procedure TMainForm.TreeViewClick(Sender: TObject);
  2. var
  3.   fs: TFormatSettings;
  4.   counts: array[TCaseType] of string = ('', '', '');
  5.   dates: array[TCaseType] of string = ('', '', '');
  6.   dt: TDataType;
  7.   ct: TCaseType;
  8.   saX, saY: TStringArray;
  9.   i: Integer;
  10.   ser: TChartSeries;
  11.   Y, Y0, dY, dY0: Double;
  12. begin
  13.   // START
  14.   if bClearOnClick then
  15.   begin
  16.        Chart.ClearSeries;
  17.        CreateMeasurementSeries;
  18.        UpdateGrid;
  19.   end;
  20.   // END
  21.  
  22.   if TreeView.Selected = nil then ........ etc. etc.
bClearOnClick is a boolean toggled by a checkbox that I added to the UI.  Default value is TRUE.It's probably not the best way to do it - just a quick hack to suit the way I like to use the app.

GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

kupferstecher

  • Sr. Member
  • ****
  • Posts: 401
Re: Corona outbreak
« Reply #46 on: March 27, 2020, 11:09:47 am »
@wp: Thaks for sharing the application. I just tried, workes fine.
I'd prefer a grid line for each day, would be imho more intuitive.

The possibility to show countries together is very nice. I grouped some regions, its really terrifying that the rising numbers can be seen everywhere in the world.

But,
@all: Please don't make this a non-technical thread.

Alextp

  • Hero Member
  • *****
  • Posts: 1059
    • UVviewsoft
Re: Corona outbreak
« Reply #47 on: March 27, 2020, 12:01:23 pm »
In Moscow we have flu increased, +50 a day, +60 a day, +100 a day, +150 a day... in next week, Msk may be closed at all. or not. no one knows. if internet will be blocked in Msk, I will not have inet. so no updates to all by codes.
no one here is sure for our future.

wp

  • Hero Member
  • *****
  • Posts: 7399
Re: Corona outbreak
« Reply #48 on: March 27, 2020, 01:40:37 pm »
its really terrifying that the rising numbers can be seen everywhere in the world.
... and that many of the small numbers double also within a few days. Exponential growth is faster than any human activity to prevent damage. Only while the numbers are small there is some chance to do something. Don't waste time.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

circular

  • Hero Member
  • *****
  • Posts: 3407
    • Personal webpage
Re: Corona outbreak
« Reply #49 on: April 02, 2020, 12:09:18 am »
So we need to slow down the spread. In the meantime, we can try some cures, like hydroxychloroquine. By the way my government did not test people coming from China even when the first cases were discovered in France, not even take their temperature.

that's a realy bad idea!

https://theintercept.com/2020/03/24/trump-hyped-chloroquine-cure-covid-19-man-arizona-took-died/
Come on that's a strawman argument! That man self-medicated himself, and not with hydroxychloroquine. The bad idea is to self-medicate and even worse if you don't even know precisely what drug to take. I cannot believe that someone could consider this article as a proof against the drug.

Chloroquine is not a new drug. It has been tested for decades and proven safe, of course under medical supervision. Whether Trump agrees or not does not make it true or false. Use your brain to think instead of bathing in irony and believing just "the contrary of Trump"!

This kind of misdirection would not be too bad if people were not dying because they are not treated soon enough. Used under medical supervision, hydrochloroquine along with a certain antibiotic has already had great effect against Covid-19, just like it already had against SARS. But it needs to be given as soon as the person infection is detected.

For now in France the cure has only been allowed in hospitals, but when people get to hospitals, they are often already pretty bad. Nurses and doctors do not have enough masks nor hydroalcoholic gel because our government did not make stocks and encourages delocalisations so we only start to produce some. We do not have time to make the proper tests to prove things with 99,99% accuracy.
Conscience is the debugger of the mind

Scoops

  • Jr. Member
  • **
  • Posts: 86
Re: Corona outbreak
« Reply #50 on: April 02, 2020, 12:37:10 am »
Im fed up hearing 'stay home' by the French leaders, iam back in work monday after only 10 days temps partiel , the company we cater for are allowed to stay open, so we have to provide catering. so minimum 150  meals, goodbye security of confinement.

kupferstecher

  • Sr. Member
  • ****
  • Posts: 401
Re: Corona outbreak
« Reply #51 on: July 28, 2020, 09:28:16 pm »
I added coloring for the weekendes, see attached screenshot.
For those interested: Create the Chart.OnChartAfterDrawBackWall event and insert the below code.

Regards

Code: Pascal  [Select][+][-]
  1. procedure TMainForm.ChartAfterDrawBackWall(ASender: TChart; ACanvas: TCanvas;
  2.   const ARect: TRect);
  3. var
  4.   bmp: TBitmap;
  5.   LeftExtent,UnitsPerPixel: Double;
  6.   valX: Double;
  7.   ii: Integer;
  8.   RangeX: Integer;
  9. const
  10.   saturday = 0;
  11.   sunday = 1;
  12.   clWeekend = $00E0E0E0;
  13. begin
  14.   bmp:= TBitmap.Create;
  15.   bmp.Width := ARect.Right  - ARect.Left;
  16.   bmp.Height:= ARect.Bottom - ARect.Top;
  17.  
  18.   bmp.Canvas.CopyRect(Rect(0,0,bmp.width,bmp.height),ACanvas,ARect);
  19.  
  20.   bmp.canvas.Pen.color:= clWeekend;
  21.   LeftExtent:= Chart.CurrentExtent.a.X;
  22.   UnitsPerPixel:= (Chart.CurrentExtent.b.X - LeftExtent) / bmp.width;
  23.  
  24.   for ii:= 1 to bmp.width-1 do begin
  25.     valX:= LeftExtent + ii * UnitsPerPixel; //Calculate chart value at x position
  26.     RangeX:= round(valX) mod 7; // Determine current weekday
  27.     if (RangeX = saturday) or (RangeX = sunday) then begin
  28.       bmp.Canvas.MoveTo(ii,1);
  29.       bmp.Canvas.LineTo(ii,bmp.height);
  30.     end;//if
  31.   end;//do
  32.  
  33.  
  34.   ACanvas.Draw(ARect.Left,ARect.Top,bmp);
  35.   bmp.Free;
  36.  
  37.  
  38. end;

wp

  • Hero Member
  • *****
  • Posts: 7399
Re: Corona outbreak
« Reply #52 on: July 30, 2020, 01:09:06 pm »
Thanks for this idea. I incorporated it into the current version.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

 

TinyPortal © 2005-2018