Wednesday, September 18, 2024

Toggle Bluetooth On/Off with iPhone Action Button

  1. Search (swipe down in screen) and Open Shortcuts App. It should be installed by default, but if not found, can be installed from App store
    Find and open Shortcuts App


  2.  Tap the plus (+) button on the top right to add new shortcut
    Add new shortcut


  3. Look for search Actions
    Search Actions


  4. Search Action Bluetooth, and pick "Set Bluetooth"
    Search Action Bluetooth


  5. Click on Turn and select option Toggle. Click Done once selected.
    Set Bluetooth Options


  6. New shortcut Set Bluetooth Created
    New shortcut created


  7. Go to Settings and then select Action Button
    Action Button in Settings


  8. Scroll right to Shortcut. Click Choose a Shortcut...
    Shortcut in Action Button Options


  9. Select Set Bluetooth
    Selecting shortcut in Action Button Setting


  10. Action button is now assigned. You can now press hold Action button to toggle Bluetooth on and off
    Action button with Shortcut Assigned

 Screenshots on iOS 18

Wednesday, August 21, 2024

OneNote history of changes (view/rollback)

To view history of changes/and or restore to a previous verion, please follow below 1. OneNote, left side, click "Show Recent Notes"
2. Recent Notes should show. Pick the notebook, change you made, and right click 3. Select "Page Versions"
4. Select the change and click "Make current Page"
Tested on OneNote for Windows 10 Version 16001.14326.22008.0

Monday, May 20, 2024

C# Get JSON property name


using System.Text.Json.Serialization;
class TestClass {

[JsonPropertyName("test-id")]
public string TestId { get; set; }

public static string GetName(string name) => typeof(CompanyInfo).GetProperty(name)?.GetCustomAttribute<JsonPropertyAttribute>()?.Name ?? name;

}

using Newtonsoft.Json;
class TestClass {

[JsonPropertyName("test-id")]
public string TestId { get; set; }

public static string GetName(string name) => typeof(CompanyInfo).GetProperty(name)?.GetCustomAttribute<JsonPropertyAttribute>()?.PropertyName ?? name;

}

Use as:
TestClass.GetName(nameof(TestClass.GetName))

Thursday, February 8, 2024

UE5, Elements like PlayerStart are greyed out

In Unreal Engine 5, I was trying landscapes, and while hitting Play, my player character will just fall through the ground. I just couldn't figure out how to edit/update PlayerStart so it can start in a different location. In fact, everything, like lightning was also not editable. Only the landscape object was showing as editable!

Turns out I am in Landscape Editing mode and its not allowed here. Just need to toggle to Selection (Shift + 1), and I was able to edit

 

Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...