List of freely available resources to study computer graphics programming.
This file contains hidden or 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
| /* | |
| * Copyright 2026 Kyriakos Georgiopoulos | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
| @Composable | |
| fun MarkdownPreview(text: String) { | |
| val context = LocalContext.current | |
| val annotatedString = parseMarkdownToAnnotatedString(text) | |
| var textLayoutResult by remember { mutableStateOf<TextLayoutResult?>(null) } | |
| Text( | |
| text = annotatedString, | |
| modifier = Modifier |
This file contains hidden or 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
| interface NetworkMonitor { | |
| val isOnline: Flow<Boolean> | |
| } | |
| class NetworkMonitorImpl @Inject constructor( | |
| @ApplicationContext private val context: Context, | |
| @Dispatcher(IO) private val ioDispatcher: CoroutineDispatcher, | |
| ) : NetworkMonitor { | |
| override val isOnline: Flow<Boolean> | |
| get() = callbackFlow { |
This file contains hidden or 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
| import androidx.compose.foundation.text.ClickableText | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.ui.Modifier | |
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.platform.LocalUriHandler | |
| import androidx.compose.ui.text.SpanStyle | |
| import androidx.compose.ui.text.buildAnnotatedString | |
| import androidx.compose.ui.text.font.FontWeight | |
| import androidx.compose.ui.text.style.TextDecoration | |
| import androidx.compose.ui.unit.TextUnit |
This file contains hidden or 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
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
| plugins { | |
| id("org.jetbrains.dokka") version "1.6.10" | |
| id("maven-publish") | |
| id("java-library") | |
| id("signing") | |
| id("jacoco") | |
| application | |
| kotlin("jvm") version "1.6.10" |
This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like
pipewire-debian, you might get into conflicts.
Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.
Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.
Based on Debian Wiki, but simplified for Ubuntu 22.04.
This file contains hidden or 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
| const recorder = new Tone.Recorder(); | |
| const synth = new Tone.Synth().connect(recorder); | |
| // start recording | |
| recorder.start(); | |
| // generate a few notes | |
| synth.triggerAttackRelease("C3", 0.5); | |
| synth.triggerAttackRelease("C4", 0.5, "+1"); |
NewerOlder