StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

WSL:Ubuntu in Visual studio code - losing connection

1 January 2026 @ 2:49 pm

I set up visual studio code to code with python using Windows 11. I wanted to use a package for python called sage (math software), but to use it with windows I need to connect to WSL:Ubuntu. Now, everytime I start vsc it successfully connects to Ubunute, but loses connection after 1 or 2 minutes. A window pops up saying it tries to reconnect, but this is never succesful. Only restarting helps. Since I need to execute a program which takes more than a minute, this is a problem for me. For the remote-connection to Ubuntu I am using the extension WSL v0.104.3, which is the newest one I could find. It also says that there are no updates for VSC. Is anyone familiar with this problem? Thanks in advance.

fatal error showing in wordpress plugin update

1 January 2026 @ 2:44 pm

Fatal error: Declaration of Alpha_Animated_Text_Elementor_Widget::get_style_depends() must be compatible with Elementor\Widget_Heading::get_style_depends(): array in /home/ok3v4yd6poio8/public_html/wp-content/plugins/u-design-core/framework/widgets/animated-text/widget-animated-text-elementor.php on line 46

GSAP Flip animation blink/glitch only the third element works fine

1 January 2026 @ 2:26 pm

I’m using GSAP Flip to animate images from a grid of cards into a detail view by reparenting the clicked image. The animation works correctly for the 3rd but the 1st and 2nd and 4th cards show a brief blink / jump during the transition. What’s confusing is that: All cards use the same markup and logic The glitch happens only on the first row There’s no console error The issue is visible for ~1 frame (looks like a layout or transform jump) Environment GSAP 3.12.x Flip plugin Chrome / Edge (reproducible) CSS Grid layout <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <titl

401 Client Error: Unauthorized for url: https://www.kaggle.com/api/v1/kernels/push

1 January 2026 @ 2:18 pm

Got the above error when pushing a notebook from my local machine(mac) to kaggle with the below command kaggle kernels push beforehand, I have successfully initialized the kernel-metadata.json with following kaggle kernels init what can be the possible cause for this?

XAMPP Apache and Mariadb not starting on Windows, localhost not loading Body: [closed]

1 January 2026 @ 2:16 pm

I am using XAMPP on Windows 10. I am trying to run a local server using localhost for a basic Mariadb setup. Issue: XAMPP starts, but Apache and/or Mariadb fail to run consistently When I open http://localhost, the page does not load Sometimes Mariadb throws an “Access denied” error, other times the service does not start at all What I’ve tried: Restarting XAMPP as administrator Stopping Mariadb service and starting it again Checking port conflicts (Apache on 80, MySQL on 3306) Errors observed: “Access denied for user '@localhost'” “Not enough memory resources available” (intermittent) What could cause XAMPP services to repeatedly fail on Windows, and how can I stabilize the local server setup?

How to stop my THorse controller from executing after the middleware send a 401

1 January 2026 @ 2:13 pm

I am trying to build an api in Delphi 12 CE, using THorse. I have setup middleware to handle the authorization, but it does not stops there. my project file (simplyfied) begin dmMain := TdmMain.Create(nil); TTokenStore.Initialize; // Activate JSON middleware THorse //.Use(Jhonson()) .Use(AuthMiddleware); RegisterAuthorizationRoutes; TMainController.RegisterRoutes; Writeln('Horse MVC server running on http://localhost:9000/'); THorse.Listen(9000); TTokenStore.Finalize; end. my middleware uses Horse, System.SysUtils, TokenStore, Winapi.ActiveX, Horse.Exception, Horse.Commons; procedure AuthMiddleware(Req: THorseRequest; Res: THorseResponse; Next: TProc); implementation threadvar ComInitialized: Boolean; procedure EnsureCOMInitialized; begin if not ComInitialized then begin CoInitialize(nil); // <<< STA, verplicht voor ADO ComInitialized := True; end; end; procedure Au

How to set LZ4_NBWORKERS?

1 January 2026 @ 1:44 pm

I am using LZ4 v1.10.0 - Multicores edition. I would like to set LZ4_NBWORKERS to take advantage of multi-core CPUs: import subprocess, time, platform, sys, os # Information of the system print('OS:', platform.platform()) print('CPU:', platform.processor()) print('Number of logical cores:', os.cpu_count()) print('Python:', platform.architecture()[0], platform.machine(), sys.version) # Paths tarPath = "tar" # Windows 11 has tar.exe on PATH lz4Path = r"C:\Users\Akira\Downloads\Compressed\lz4_win64_v1_10_0\lz4.exe" srcDir = r"E:\Personal Projects\tmp" filesToArchive = ["chunk_0.ndjson", "chunk_0.ndjson"] outLz4 = r"E:\Personal Projects\tmp\test.tar.lz4" # Version of lz4 print() result = subprocess.run([lz4Path, "-V"], capture_o

Lifetime of temporary to which a local reference is bound in a c++ coroutine

1 January 2026 @ 11:41 am

On cppreference (which I understand is not the c++ standard itself) I have read that the coroutine state contains "local variables and temporaries whose lifetime spans the current suspension point.", (emphasis mine) but I don't think I understand how this works. Suppose I have a coroutine that looks something like this: /*...*/ SomeCoroutine() { const auto& ref = std::string("abc"); co_yield ref.size(); // assume the coroutine really does suspend co_return ref.size(); } Before the coroutine is suspended, is ref a local variable on the stack, or is it really a member of the coroutine state (in which case I doubt it can actually be a reference)? After the coroutine is resumed, is ref a local variable on the stack, or is it really a member of the coroutine state? If it is still a reference, is it dangling now, or did the string get

PySide6 QOpenGLWidget flickers even with minimal example inside a layout

1 January 2026 @ 11:25 am

I am experiencing flickering when using QOpenGLWidget with PySide6, even with a minimal setup. Environment: - PySide6 (tested with 6.5 / 6.6) - Python 3.x - OS: Linux / Windows (happens on multiple systems) - GPU drivers: standard system drivers Minimal reproducible example: import sys from PySide6.QtWidgets import ( QApplication, QMainWindow, QWidget, QVBoxLayout ) from PySide6.QtOpenGLWidgets import QOpenGLWidget from PySide6.QtGui import QSurfaceFormat from PySide6.QtCore import Qt class GLWidget(QOpenGLWidget): def initializeGL(self): pass def resizeGL(self, w, h): pass def paintGL(self): # No dibujamos nada a propósito pass class MainWindow(QMainWindow): def __init__(self): super().__init__() central = QWidget() layout = QVBoxLayout(central) self.gl = GLWidget() layout.addWidget(self.gl) self.setCentralWidge

lambda boolean equality operator usage without outer triger mechanism

1 January 2026 @ 10:09 am

I'm just hanging out and trying freecodecamp lambda built-in function for code exercise using Learn Lambda Functions by Building an Expense Tracker python course section... lambda expense: expense['amount'], expenses)` So, lambda x: x * 2 is an example which is obvious... then lambda expense: expense['category'] == category is a usage for filtering out mechanism usage scenario as an example: expense1 = {'amount': 10, 'category': 'Food'} expense2 = {'amount': 20, 'category': 'Travel'} category = 'Food' check = lambda expense: expense['category'] == category print(check(expense1)) # True → true print(check(expense2)) # False → exact violation and filtering out This i