Random snippets of all sorts of code, mixed with a selection of help and advice.
Transfer learning from NTU RGB+D to UCF101 (skeleton-based action recognition) performs worse than training from scratch
12 April 2026 @ 4:03 pm
Problem
I pretrain DeGCN on NTU RGB+D 60 (cross-subject, 83.3% top-1) then fine-tune on UCF101. Fine-tuning reaches only 58.76%, while training from scratch on UCF101 reaches ~80%. I expected at least comparable performance.
Setup
Data pipeline. Both datasets are converted to a shared Common15 15-joint space before entering the model:
NTU RGB+D 25 joints → Common15 (pelvis/shoulder_center averaged, head/hands/feet dropped)
COCO17 keypoints (YOLO + MotionBERT 3D lift) → Common15 (same averaging, face dropped)
Both pipelines produce index-identical joint layouts (joint 0 = pelvis in both).
NTU25 → Common15: [Image]
COCO17 → Common15: [Image]
Common15 joint layout (DeGCN input): [Image]
Model. DeGCN input shape: (N, C=3, T=64, V=15, M=2)
How to run 2 commands at once, in parallel, auto-executing each command in a pane. For PowerShell but looking for a cross-platform terminal workflow
12 April 2026 @ 3:52 pm
About running 2 commands at once, for example to run 2 console programs with 1 single command, in PowerShell, one way to do this is with a command in the next format, just by adding ; between each of the 2 commands/sub-commands, all in 1 single line:
python C:/path/to/program_2/program_2.py; C:/path/to/program_1/program_1.exe
Or if the 2 programs are in the same path, and already being in that path:
python program_2.py; ./program_1.exe
In this way, the 2 programs run sequentially, one after the other, all in the same terminal window/tab.
Now I'm looking for a way to run 2 commands in the next way:
At once (1 single action).
At the same time (or as close as possible).
In parallel.
1 single action that automatically opens a terminal pane for each command, side-by-side, in the same terminal window.
Android java ArrayList Object
12 April 2026 @ 3:41 pm
Trying to educate myself from a sample Android app in Android Studio, I have found an ArrayList<String>.
In the debugging mode, the value(s) of this array is as below (using the view tool of the IDE)
I don't really understand how to recognixe each elenet of the array.
I would appreciate any help.
The list is constructed as below (from a json file)
public static List<ArrayList<String>> getPrintDataFromJson(Context context, String jsonFileName, int copies, float multiple) {
try {
String jsonContent = AssetJsonReader.readJsonFromAssets(context, jsonFileName,
error -> Log.e(TAG, "Json not found: " + jsonFileName + ", error: " + error));
if (jsonContent == null || jsonContent.isEmpty()) {
Log.e(TAG, "JSON is empty: " + jsonFileName);
return null;
}
retur
How do I match the start of a class name with CSS? [duplicate]
12 April 2026 @ 3:31 pm
I am trying to make a CSS selector to match elements with a class that starts with ai-. So for example, I would want to match items with ai-images or ai-videos, but not kizuna-ai-images or samurai-images.
<div class="category ai-images"/> <!-- Match -->
<div class="category ai-videos"/> <!-- Match -->
<div class="category kizuna-ai-images"/> <!-- Don't match -->
<div class="category samurai-images"/> <!-- Don't match -->
I tried:
Matching the start of the attribute value with [class^="ai-"] will only match if the first class starts with ai-.
Using a wildcard in the class name via .ai-* is considered invalid CSS.
Matching any class containing ai- with [class*="ai-"]
Laravel Storage::response() returns download instead of displaying PDF inline
12 April 2026 @ 3:29 pm
I'm trying to display a PDF file inline in the browser using Laravel, but instead of showing the file, the browser downloads it.
Here is my code:
return Storage::disk('public')->response(
$path,
$responseFileName,
['Content-Type' => 'application/pdf'],
'inline'
);
This route is accessed via a GET request.
My expectation is that the PDF should open in the browser (inline), but instead it always triggers a download.
What am I missing? Is there something wrong with how I'm setting the headers or using the `response()` method?
Any help would be appreciated.
connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: sorry, too many clients already
12 April 2026 @ 3:25 pm
I'm using celery with django to run some task that runs multiple threads querying the database. The example below is a simplified version of the original one in a larger project, but the logic and results are the same. The error occurs either way.
models.py
from django.db import models
class Example(models.Model):
name = models.CharField(max_length=255)
urls.py
from django.urls import path
from core.views import ExampleView
urlpatterns = [path('example/', ExampleView.as_view())]
views.py
from core.tasks import run_task
from rest_framework.response import Response
from rest_framework.views import APIView
class ExampleView(APIView):
def get(self, request, *args, **kwargs):
run_task.delay()
return Response(status=200)
tasks.py
from concurrent.futures import ThreadPoolExecutor, as_completed
Why does asyncio.gather with pandas DataFrame rows not run concurrently?
12 April 2026 @ 3:10 pm
I'm processing a large pandas DataFrame (500k rows) where each row requires an HTTP request. I switched from requests to aiohttp + asyncio expecting a significant speedup, but the async version runs just as slowly as the synchronous loop. I can't figure out where the concurrency is being blocked.
Here's a minimal reproducible example:
import asyncio
import aiohttp
import pandas as pd
import time
# Sample DataFrame with 100 rows, each hitting a delayed endpoint
df = pd.DataFrame({
'id': range(100),
'url': ['http://httpbin.org/delay/0.1'] * 100
})
async def fetch(session, url, row_id):
async with session.get(url) as response:
await response.text()
return row_id
async def process_dataframe(df):
async with aiohttp.ClientSession() as session:
tasks = []
for _, row in df.iterrows():
task = asyncio.create_task(fetch(session, row['u
Force ComboBox1_SelectedValueChanged to reset ComboBox to its starting appearence, showing only the user prompt label
12 April 2026 @ 2:46 pm
How to force ComboBox1_SelectedValueChanged to reset ComboBox to its starting appearence, showing only the user prompt label. Here a simple code example :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Days As New List(Of String) From {"Monday", "Tuesday", "Wednesday"}
ComboBox1.Items.Clear()
ComboBox1.Text = "Choose Day"
Dim i as Integer
For i = 0 To Days.Count -1
ComboBox1.Items.Add(Days(i))
Next i
End Sub
Private Sub ComboBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedValueChanged
If ComboBox1.SelectedValue = "Monday" Then
' contunue with my code
Else
ComboBox1.Text = "Choose Day"
End If
End Sub
'This is my question :
Starting the code, the ComboBox1 appears only the s
How should navigation between views be implemented in WPF using MVVM and ICommand?
12 April 2026 @ 2:24 pm
Is the following considered a good design in WPF?
MainWindow
↓
ContentControl
↓
ViewModel switching
↓
UserControl
Could you explain why the following design is considered poor?
MainWindow
↓
Button
↓
Command
↓
TransactionsView (Window)
Learning coding from scratch
12 April 2026 @ 1:51 pm
I wanted to start learn how to code from scratch without using the help from AI. What should I know about coding, like which programming language I should start with, how to test the code if it works or not on a website since I only have potato laptop that already 6 years old. I need help from you guys, on how to start learning coding without having any kind of knowledge. Hope someone can help, GBU