Inspiratory Muscle Strength Training – Is It Right For You?

https://www.youtube.com/watch?v=7GNt3xfoxFg

Researchers at the University of Colorado Boulder tried Inspiratory Muscle Strength Training (IMST) on patients who had high blood pressure, but were otherwise in good health. The results were astonishing with all of them lowering their systolic by 12mm. More research is being conducted, but it does look promising for those needing to expand their lung capacity without doing 30 minutes of aerobics.

Channel Dad Bryon Lape reads an article on Get Pocket by Sarah Sloat. Are you a couch potato who needs to get moving? Could IMST help you accomplish your fitness goals? Listen and learn.

Converting lazy Foo tutorials To C#

Perhaps no other library has abstracted the creation and use of a GUI from the code like SDL2 Framework. It is available on Windows, macOS, and Linux. It is written in C, but interfaces well with C++.

Search for tutorials on using SDL2 and most likely there will be a short path to Lazy Foo. The self-hosted tutorial is 55 lessons long and starts with how to install SDL2 Framework on Windows, macOS (OS/X), and Linux. The Lazy Foo tutorials then cover how to create a window, using images, True Type Fonts (TTF), Sound, Events, and all the way to Touch. The one catch, all the code is in the ancient language of C++.

Creating a .Net Core 3 layer for SDL2 requires not only understanding how to interface C# code with SDL2 Framework, but also creating some tutorials to help others understand. Why not combine converting code with an already established and recognized SDL2 tutorial set? Enter the project to convert Lazy Foo to C#.

Great! Where to start? Getting things setup in Rider? Ok. What about Visual Studio? Don’t have. Arg. Very well. Let’s skip all that and go to the code. If you want the .Net Core3 layer for SDL2, visit Brainmuffin’s GitHub.

Got it? Let’s go.

The code for the first Lazy Foo tutorial is here.

Let’s get to converting. First, the includes.

The Lazy Foo tutorial starts with two very simple header files. Only two, if you can believe it:

#include <SDL.h> #include <stdio.h>

C# will need a bit more than that. There are the standard system items, the need for interop services, as well as, the calls from the .Net Core 3 layer.

using System;
using System.Runtime.InteropServices;

using static SDL2.NetCore3.SDL;
using static SDL2.NetCore3.SDL_error;
using static SDL2.NetCore3.SDL_pixels;
using static SDL2.NetCore3.SDL_timer;
using static SDL2.NetCore3.SDL_surface;
using static SDL2.NetCore3.SDL_video;

The globals will need to be moved into class variables. After all, the calling is coming from somewhere else. Using Rider on macOS or Linux means only command line programs.

As this is the first Lazy Foo tutorial, the class name will reflect it as L01_Hello_SDL. Also, being C#, the calls to SDL are unsafe, no matter which Operating System is being used. This is where the Native Interop Services is used. Call .Show from a command line program.

public static class L01_Hello_SDL
{
private const int SCREEN_WIDTH = 640;
private const int SCREEN_HEIGHT = 480;

public static void Show()
{
unsafe
{
if (SDL_Init(SDL_INIT_VIDEO) != 0)
throw new Exception($"SDL could not initialize! SDL_Error: {SDL_GetError()}");

var window = SDL_CreateWindow("SDL Tutorial", SDL_WINDOWPOS_UNDEFINED_MASK, SDL_WINDOWPOS_UNDEFINED_MASK,
SCREEN_WIDTH, SCREEN_HEIGHT, (uint) SDL_WindowFlags.SDL_WINDOW_SHOWN);
if (window == IntPtr.Zero)
throw new Exception($"Window could not be created! SDL_Error: {SDL_GetError()}");

var screenSurface = SDL_GetWindowSurface( window );
var convertedScreen = Marshal.PtrToStructure<SDL_Surface>(screenSurface);

//Fill the surface white
SDL_FillRect( screenSurface, null, SDL_MapRGB( convertedScreen.format, 0xFF, 0xFF, 0xFF ) );

//Update the surface
SDL_UpdateWindowSurface( window );

//Wait two seconds
SDL_Delay( 2000 );

SDL_DestroyWindow( window );

//Quit SDL subsystems
SDL_Quit();
}
}
}

BSG Reboot Gets A Show Runner

It has only been 11 years since Ronald D. Moore’s reboot of Battlestar Galactica finished and end its run. Later there was a prequel mini-series showing the start of the Cylon invasion. There was also a spin-off show called Caprica. Is barely a decade too soon to reboot?

Hollywood is too afraid of new ideas, so naturally NBC is looking to reboot Battlestar and play it on its new streaming service called Peacock. Yes, not only is yet another reboot of Galactica being planned, there is yet another streaming service behind a paywall. Good grief.

The show runner for Galactica reboot has been named and it is Michael Lesslie. There is not much of a track record there either.

Channel Dad Bryon Lape reads an article by Jim Vejvoda on IGN which has all the details. Are you ready for yet another Battlestar Galactica reboot? Do you think Michael Lesslie will do a good job?

Read the source article:
https://www.ign.com/articles/battlestar-galactica-reboot-announces-its-showrunner

Thanks for subscribing to Bryon Lape’s channel