Uncategorized

Topics that don't need a category, or don't fit into any other existing category

Font importation

- Posted in Uncategorized by

How to import a font into a C# program:

      //interop to allow import of game font
  [System.Runtime.InteropServices.DllImport("gdi32.dll")]
  private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont,
      IntPtr pdv, [System.Runtime.InteropServices.In] ref uint pcFonts);

Also before the form's constructor, add a form-level variable (but make sure it comes after the Win32 function import):

Font myFont;

If you have the desired font as a .resx resource in your Visual Studio project, you'll use the following code inside the form's constructor:

//Form1 constructor code that pulls game font into memory
      byte[] fontData = Properties.Resources.brushstr;
      IntPtr fontPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(fontData.Length);
      System.Runtime.InteropServices.Marshal.Copy(fontData, 0, fontPtr, fontData.Length);
      uint dummy = 0;
      fonts.AddMemoryFont(fontPtr, Properties.Resources.brushstr.Length);
      AddFontMemResourceEx(fontPtr, (uint)Properties.Resources.brushstr.Length, IntPtr.Zero, ref dummy);
      System.Runtime.InteropServices.Marshal.FreeCoTaskMem(fontPtr);

      myFont = new Font(fonts.Families[0], 16.0F);

Aftermath of Allan's Death

- Posted in Uncategorized by

As a family, we continue dealing with the aftermath of my brother's death six days ago on 8/31/2022. My heart especially goes out to Makayla, his daughter. I appreciate work giving me three days' bereavement leave. I still feel mentally numb and emotionally fragile, the aftermath of this tragedy. Mother is really struggling.

The last few days, I've spent some time using Visual Studio Code to do some console programming in C#. I really like the editor and how customizable it is.

My brother died today

- Posted in Uncategorized by

My brother died at 11:35 am EST today. His heart stopped. He'd abused his body with alcohol for many years. Such a shame. My niece is making arrangements and at this point, it's looking like an Ohio ceremony will likely take place on Sunday, August 4th.

Rest in peace, Big 'Al. Love, Big Brother

My brother near death

- Posted in Uncategorized by

Things with my brother have worsened. He's now on a ventilator and a form of dialysis called CRRT: Continuous Renal Replacement Therapy. His kidneys aren't working efficiently. In short, he's taken a turn for the worse. He is sedated, so hopefully not suffering. I think S and I are going to go up to Dayton Saturday to see him. I fear it will be this last time I see him alive. I just pray to God he's ready for eternity.

Experimenting with Git

- Posted in Uncategorized by

I wrote about my introductory experimentation with the Git version control system. I've been reading more about it today, and I added a C# console program that demonstrates calculating prime numbers in a desired range of numbers.

I got an update on my brother. He remains confused, and this is caused by toxins in his system. The nurse told me his ammonia levels were notably lower this morning, so that's good. He said this sort of encephalopathy often clears up in time, once these toxins are eliminated. So, my prayers go up to God that my brother will regain his faculties. Unfortunately, his cirrhotic liver isn't likely to improve, so he'll be dealing with ammonia and abdominal fluid buildup from now on.

I've made reengagement attempts with patients that needed it. I run a group with Dr. J in a bit less than an hour, and until then I'm going to read about solo roleplaying using the Tiny Dungeon 2e rules set.

Susan traveling, Allan very ill

- Posted in Uncategorized by

S, H, and B headed out this morning for Indiana for B's sister's birthday. They arrived safely. I picked up groceries at Walmart this morning and spent the day piddling around reading and mucking about on my desktop.

I'm revisiting two interests that I've flirted with in the past: Ren'Py and Git.

I tried to get a medical update on A a few minutes ago but the call wasn't answered after the desk worker tried to transfer me. I'll try back, but I'm going to reach out to M on FB.

My brother remains hospitalized

- Posted in Uncategorized by

Yesterday, I posted an update on my brother's condition. He continues to fight, but his ammonia level remains high. It was 72 when the hospital staff checked it this morning. He had an EEG which confirmed encephalopathy. The nurse I spoke with said he remains agitated and confused. They will perform a paracentesis today to draw fluid off his belly.

I sure do hate what he's suffering through. A lot of people look down on those who have a drug addiction. Some view it as a moral failure or a deficit of personal character. In reality, it's a disease. Not only is it a disease, it also doubly effects those who had adverse childhood experiences.

More photo optimization

- Posted in Uncategorized by

I'm going to convert a batch of thumbnail images from png to jpg using Advanced Batch Image Converter from Sourceforge. Before conversion, there were 1,247 thumbs, 116 of which are PNG format. Converting those 116 PNGs to JPGs reduced overall directory size from 8.x Mb to 6.x Mb. Then I ran RIOT on the photos, after which the directory size was 5.01 Mb. Uploading thumbs back to their website subdirectory now.

I'm ready to resume optimizing at j*.jpg

More photos uploaded

- Posted in Uncategorized by

Yesterday, I blogged about how I've begun to systematically upload tons of family photos to my blog. I ended last night with a total of 1,221 image files in my blog photo directory.

I've been at it again this morning while drinking coffee, and the photo count is now up to 1,502 2,532 -- 600 of those are thumbnail images.

RIOT photo directory

- Posted in Uncategorized by

I'm adding a photo gallery to my website. It's gonna take a while, because I have years of accumulated photos. I've uploaded 1,221 image files while watching Netflix with S this evening. And I still have plenty of photo directories to process with RIOT. I'll resume tomorrow with S's Aunt M's pics.

Page 2 of 11