u/gameplayer55055

What's the purpose of the diode between chassis and USB shield?

What's the purpose of the diode between chassis and USB shield?

I disassembled my keyboard and found this. The USB connector has 5 pins. 4 of them are usual and go to the MCU, and the 5th pin goes to the chassis (metal casing of the keyboard).

But what's the purpose of that SS14 diode? Is it for ESD?

AI says complete nonsense, so I am asking real human beings for explanation. Help is appreciated.

u/gameplayer55055 — 6 days ago
▲ 237 r/AvaloniaUI+1 crossposts

C# is known for its boilerplate and verbosity. Most of the time, it's reasonable, and MS does a good thing by teaching you to follow the structure (so others can maintain your code, lol).

But sometimes you really want a simple IDisposable app, like university coursework or a small utility. In this case, people use Python. But now C# is a great candidate too!

Here's the code sample. It uses Avalonia, so it is cross-platform, and it uses no XAML for simplicity (my friends were surprised it's possible).

It has 3 NuGet references at the top, then here goes the class with AppBuilder, when we start an app, we:

  1. Add a theme (optional, but it looks good)
  2. Create a window object
  3. Create a Label
  4. Show the window we just created and run the app!
#:package Avalonia@*
#:package Avalonia.Desktop@*
#:package Avalonia.Themes.Simple@*

using Avalonia;
using Avalonia.Controls;

class MainClass {
    public static void Main(string[] args) {
        AppBuilder
            .Configure<Application>()
            .UsePlatformDetect()
            .Start(AppMain, args);
    }

    public static void AppMain(Application app, string[] args) {
        // Application needs a theme to render window content
        app.Styles.Add(new Avalonia.Themes.Simple.SimpleTheme());
        app.RequestedThemeVariant = Avalonia.Styling.ThemeVariant.Default; // Default, Dark, Light

        // Create window
        var win = new Window();
        win.Title = "Avalonia no XAML";
        win.Width = 800;
        win.Height = 600;

        var text = new Label();
        win.Content = text;

        text.Content = "Hello from C#!";
        text.HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Center;
        text.VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center;
        text.FontSize = 72;

        win.Show();
        app.Run(win);
    }
}
u/gameplayer55055 — 9 days ago

Начитався крутих заголовків, що в росії напередодні параду інтернет вирубають з коренями, але якщо зайти у контру чи доту, то неначе нічого не змінилося - у катках всерівно кидає росіян.

Це взаємовиключні параграфи, як росіяни користуються стімом (западная платформа ж!) якщо їм усе блокують (якщо вірити новинам).

reddit.com
u/gameplayer55055 — 9 days ago

As far as I know, the AirPods 4 ANC case has a built-in speaker to make it easy to find. But it starts chirping randomly when I open the case or start charging it. I haven't found a clear pattern when that happens.

I don't have an iPhone, I use my AirPods with Android, macOS and Windows.

I don't know the root cause, it might be something from the following (I guess?)

- MacBook Pro pinging my AirPods

- MaterialPods android app interfering

- Windows Bluetooth name is "AirPods (Find My)" which is concerning

- neighbors with iPhones tripping the chirping

Help is appreciated because unwanted sounds are the last thing I want during night music listening.

reddit.com
u/gameplayer55055 — 11 days ago