This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Built this simple example by reading these two files | |
// - https://github.com/iina/iina/blob/dcb8bbda72a5a725bb68d9eae53f806dc6c72273/iina/PlayerWindowController.swift | |
// - https://github.com/insidegui/VirtualBuddy/blob/main/VirtualUI/Source/Session/Components/SwiftUIVMView.swift | |
// - https://stackoverflow.com/questions/64530822 | |
import SwiftUI | |
struct MouseWheelScrollEventView: NSViewRepresentable { | |
typealias NSViewType = MouseView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sudo apt install libpulse-dev | |
// valac -X -lm --pkg libpulse --pkg posix --pkg gtk+-3.0 --pkg libpulse-mainloop-glib pulseaudio_devices.vala | |
public class AudioDevice : GLib.Object { | |
private PulseAudio.GLibMainLoop loop; | |
private PulseAudio.Context context; | |
private PulseAudio.Context.Flags cflags; | |
public AudioDevice () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile with valac --pkg gtk+-3.0 --pkg=gio-2.0 Application.vala | |
public class Application : Gtk.Application { | |
private const int COVER_SIZE = 170; | |
private const int NAP_TIME = 500; // 0.1 Seconds | |
private const int MAX_TIMEOUT = 30000; // 30 Seconds | |
public Application () { | |
Object(application_id: "testing.my.application", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile with valac --pkg gtk+-3.0 --pkg=gio-2.0 Application.vala | |
public class Application : Gtk.Application { | |
private const int COVER_SIZE = 170; | |
public Application () { | |
Object(application_id: "testing.my.application", | |
flags: ApplicationFlags.FLAGS_NONE); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static String MergeStrings(String[] strings) { | |
Map<Character, Integer> charCount = new HashMap<>(); | |
for (String str : strings) { | |
for (int i = 0; i < str.length(); i++) { | |
char c = str.charAt(i); | |
if (Character.isAlphabetic(c)) { | |
charCount.merge(c, 1, (a, b) -> a + b); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | |
<opml version="1.0"> | |
<head> | |
<title>Pocket Casts Feeds</title> | |
</head> | |
<body> | |
<outline text="feeds"> | |
<outline type="rss" text="Yada Yada Cast" xmlUrl="http://feeds.soundcloud.com/users/soundcloud:users:279952541/sounds.rss" /> | |
<outline type="rss" text="Gugacast" xmlUrl="http://gugacast.libsyn.com/rss" /> | |
<outline type="rss" text="Revolushow" xmlUrl="http://feeds.feedburner.com/Revolushow" /> |