Random snippets of all sorts of code, mixed with a selection of help and advice.
Accessibility heading not work on Android 16(SDK 36) devices
27 January 2026 @ 2:57 am
I want to add Accessibility header to Textview widget, i try to do that use:
ViewCompat.setAccessibilityDelegate(textView, object : AccessibilityDelegateCompat() {
override fun onInitializeAccessibilityNodeInfo(host: View, info: AccessibilityNodeInfoCompat) {
super.onInitializeAccessibilityNodeInfo(host, info)
info.isHeading = value
}
})
and
ViewCompat.setAccessibilityHeading(textView, true)
It worked as expected on devices below Android 16(SDK 36), but not working on Android 16(SDK 36)
How can I run the MADDPG example from AgileRL?
27 January 2026 @ 2:53 am
How I can run the MADDPG example on Fedora 43? I get this C++ error when using the multi_agent_ale.py dependency (using pip) because it wants to use C++17 (I think because there is a std::int_8 error which says "did you mean wint_8") and defaults to C++20 in fedora.
I tried using a container (podman) but errors still popped up (ubuntu, python 3.11.4 and gcc 13) - not the same ones but different ones so Im not able to run it at all
does anyone know what could be the issues?
This is the DockerFile I used:
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /workspace
# ---- system deps ----
RUN apt-get update && apt-get install -y \
software-properties-common \
ca-certificates \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# ---- toolchains ----
RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \
add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update &&
Can PolarDB MySQL Read Replicas Guarantee Read-After-Write Consistency for Strong Session-Level Consistency?
27 January 2026 @ 2:46 am
In PolarDB MySQL, read replicas share the same storage as the primary but maintain their own buffer pools and apply redo logs asynchronously.
Suppose I execute a transaction on the primary that updates a row and commits at time T. I then immediately query the same row from a read replica.
Is there a possibility of reading a stale version even if the replica reports zero replication lag in the console?
Does PolarDB support session-level consistency (e.g., “read your writes”) on read replicas similar to Aurora’s aurora_replica_read_consistency?
We’re designing a user-facing feature that requires strong read-after-write guarantees.
How do I return the PID of an osascript call from within a function (or how do I create a persistent notification I can kill later in the script)?
27 January 2026 @ 2:38 am
Just to be clear, I'm using Bash in MacOS Tahoe, and Apple hasn't upgraded Bash since v3.2....
So, I've hacked together this function to show an informational dialog:
showDialog(){
local strDialogText=$1
local intDialogSeconds=$2
IFS='' read -r -d '' strJS <<EOF
function run(){
const app = Application.currentApplication();
app.includeStandardAdditions = true;
let strText = "$strDialogText";
let intSeconds = "$intDialogSeconds";
switch(true){
case intSeconds == 0:
break;
case intSeconds > 0:
strText = strText + "\n\n\nClosing in " + intSeconds + " seconds...";
break;
default:
intSeconds=10;
}
app.displayDialog(strText, {
buttons: ["Close"],
defaultButton: "Close",
givingUpAfter:intSeconds
});
}
EOF
osascript -e "$strJS" -l "JavaScript" -s s
}
It look
YouTube Transcript API returns "Could not retrieve a transcript" error - IP blocking or rate limiting? [closed]
27 January 2026 @ 2:25 am
I'm using `youtube-transcript-api` (v1.2.3) to fetch video transcripts. After making ~40 requests while testing, I'm now getting blocking errors for all videos.
Error
Could not retrieve a transcript for the video! This is most likely caused by:
- You have done too many requests and your IP has been blocked by YouTube
- You are doing requests from an IP belonging to a cloud provider
My Setup
Running on local machine (residential ISP, **not** cloud provider)
Made requests over 30 minutes during testing
Now ALL videos fail (even popular ones like "Me at the zoo")
Code
python
from youtube_transcript_api import YouTubeTranscriptApi
api = YouTubeTranscriptApi()
transcript = api.fetch('jNQXAC9IVRw', languages=\['en'\])
text = ' '.join(\[entry\['text'\] for entry in transcript.transcript\])
Questions
1.
TCPIP connection issue at the port in azure databricks
27 January 2026 @ 2:10 am
i am trying to do full load ,but the db is hosted in azure sql , created admin and also the login is working us west2 region. but while connecting to databricks its showing tcp ip error attached screenshots please suggest ? whats the issue.
steps i followed : step-1: Creation of resource group
step-2: Creation of SQL database along with SQL SERVER
step-3: Datasetup in SQL database
a) creating product table and loading the sample database
step-4: Creating the Keyvalult
a) creating secret_scope (https://learn.microsoft.com/en-us/azure/databricks/security/secrets/secret-scopes)
b) create secrets
How many way to implement Audio Streaming
27 January 2026 @ 2:10 am
I'm progressing web service project that just for portfolio, not for release service. and the project is "Music platform" like spotify, apple music and soundcloud(soundcoud is most similar service that on my mind)
So I have to implements streaming function. But now I know just only way to implement streaming function is HLS streaming
Then I want to know how many way to implement streaming function. Can you knowing me all of the way to implement audio streaming function and each way's pros and cons please
I have an environment : EC2 (I can use 2 instance), S3, Docker, Spring Boot, Java, RDS(MySQL)
How to properly retrieve context in an OpenAI Realtime conversation using response.create
27 January 2026 @ 2:04 am
I’m trying to generate an out-of-band response in Realtime OpenAI using response.create without appending to the default conversation. I want to summarize the conversation and output the client’s sentiment, but every time I send:
prompt = “”"
Analyze the conversation so far. Provide a 20-word summary and classify the client’s sentiment into: neutral, negative, or positive.
Format:
summary: {summary}
sentiment: {sentiment}
“”"
event = {
“type”: “response.create”,
“response”: {
“conversation”: “none”,
“metadata”: {“topic”: “sentiment_update”},
“output_modalities”: [“text”],
“instructions”: prompt,
},
}
ws.send(json.dumps(event))
I always get the next assistant next message instead of the expected summary/sentiment. I have tried more than 10 times.
This is an example of my response:
{
“type”: “response.done”,
“event_id”: “event_XXXXX�
I have an error with localhost about "DB_NAME" [closed]
27 January 2026 @ 12:54 am
I'm just trying to host a website on localhost... sorry, I don't really know what I'm doing.
I've got this error when trying to go to: http://localhost/wordpress/
**Fatal error**: Uncaught Error: Undefined constant "‘DB_NAME’" in C:\\xampp\\htdocs\\wp-config.php:23
Stack trace:
#0 C:\\xampp\\htdocs\\wordpress\\wp-load.php(55): require_once()
#1 C:\\xampp\\htdocs\\wordpress\\wp-blog-header.php(13): require_once('C:\\\\xampp\\\\htdocs...')
#2 C:\\xampp\\htdocs\\wordpress\\index.php(17): require('C:\\\\xampp\\\\htdocs...')
#3 {main} thrown in **C:\\xampp\\htdocs\\wp-config.php** on line **23**
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘wordpress’); **\<--- LINE 23**
When is it appropriate to use the "Async" suffix when naming a function? Yield, or non-blocking, or both?
27 January 2026 @ 12:52 am
Let's say I named a function DoSomethingAsync.
Now, without running it. Do you think it yields, or runs immediately, but returns something later, and allows the caller to continue running more stuff without waiting for DoSomethingAsync?
Not specifically tied to any language, could be anything.
For instance:
Important to those that create APIs in any sort of Engine, or Mozilla themselves. When should they actually name "Async" in a function?
Does "Async" in a function really say whether it yields or non-blocking?
When is it really wise to name a function "Async" ?
async function foo() { } is my only reason, because then you can use await in JavaScript for instance.
Let's say I have these functions:
OneAsync - non-blocking
TwoAsync - yields