Random snippets of all sorts of code, mixed with a selection of help and advice.
Best Source Online to learn Kotlin
9 June 2026 @ 2:33 pm
I have recently discovered kotlin and this language is so fantastic so far. Despite fact that i hate Java's boilerplate syntax i love Kotlin and id appreciate a good source for learning it! Thank you in advance ( for some more info im new to static typed languages as before i mainly used python and lua which are dynamicaly typed )
I am getting too much performance issues in react [closed]
9 June 2026 @ 2:26 pm
I have build an e-commerce website recently using React, Node and MySql and Hosted my website, its admin panel and node server on hostinger vps. But I am getting too much scroll lag issues and slow speed. What are the best practices to make my site fast and smooth. Which strategies are mostly used in e-commerce platforms to handle thousands of products smoothly.
Open62541 OPC UA library with OpenSSL
9 June 2026 @ 2:25 pm
I am trying to build a new open62541.lib with OpenSSL support but am not sure my CMakeSettings.json file is correct when building the lib.
I am using Visual Studio 2019 on Windows 11 and have downloaded OpenSSL v3.6.2 and v4.0.0 to test.
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": [
{
"name": "CMAKE_MSVC
Meta App Review: user_birthday rejected for "missing end-to-end experience" despite comprehensive screencast. How to resolve?
9 June 2026 @ 2:16 pm
I'm stuck in an app review loop with Meta about the user_birthday permission for our website's Facebook login integration. Meta has confirmed that our business use cases are allowed, but our submission keeps getting rejected because the screencast apparently "fails to demonstrate the end to end experience."
I'd appreciate any insights from anyone who has successfully navigated this recently.
Our Approved Use Cases
In our submission notes, I defined the following three valid use cases:
Account Identity: The birthday is a primary demographic attribute used to complete the user's mandatory profile registration alongside their name and email.
Age Verification: To ensure platform safety and legal compliance, we use the date of birth to restrict access for users under the age of 18.
Personalized User Experience:
Python turtle screen setup
9 June 2026 @ 2:08 pm
I have tried to set up my turtle screen as usual in python using:
screen = turtle.Screen()
However I get this error returned
NameError: name 'Screen' is not defined. Did you mean: 'screen'?
Im pretty confused as I have always set up my screen as so as it usually works, but for some reason it just doesnt now even thought its the same version (3.12.1), and I havent changed anything about python.
More context if needed:
Here is the full code I was using
import turtle
import time
import random
#from PIL import Image
screen = turtle.Screen()
screen.bgcolor("light blue")
screen.setup(1.0, 1.0)
screen.title("flapy bird")
canvas = screen.getcanvas()
root = screen._root
CURSOR_SIZE = 20
SQUARE_SIZE = 50
FONT_SIZE = 40
FONT = ('Arial', FONT_SIZE, 'bold')
class game
Claude OPUS and Concurrency in C++?
9 June 2026 @ 2:06 pm
Implementing new feature in a desktop app (mac) -> C++
Used claude (even opus 4.8 max) for major implementation, it actually sucks at handling concurrency.
After examining logs it makes assumptions, for eg:
Claude: "The thread1 locks the mutex causing a deadlock!"
Me: The lock is Recursive so shouldn't be a problem as thread1 will be the one accessing it again.
Claude: "Yep *** AGAIN SOME NEW ASSUMPTIONS"
My goal: understand the race condition cases and discuss fixes with claude.
Can anyone help me out here, do I need to improve my prompting?
suggestions are welcome (if anyone still uses StOve)
link-time error linking opencv program under cygwin
9 June 2026 @ 2:02 pm
i'm running into a link-time error when i try to write a very simple program to open a video file using the opencv library under cygwin. the linker isn't able to find the VideoCapture constructor with the correct signature.
here is the source:
#include <iostream>
#include <filesystem>
#include <opencv2/opencv.hpp>
using namespace std;
int main(int argc, char *argv[])
{
if (!filesystem::exists(argv[1])) {
cerr << "Video file not found: " << argv[1] << "\n";
return 1;
}
cv::VideoCapture cap(argv[1]);
if (cap.isOpened()) {
cap.release();
cout << "OK!\n";
} else {
cerr << argv[1] << ": can't open video for reading\n";
}
}
the compilation proceeds without error:
$ g++ -c -g opencvread.cpp -o opencvread.o
then the error on link:
$ g++ -g -L/us
How to extract data from a matrix in Google Sheets when some data does not exactly Match the "Row Headers"?
9 June 2026 @ 1:33 pm
I'm working on a costing matrix using Google Sheets and have run into some issues. I have a costing matrix of the form below:
Matrix
I would like to have a formula that is able to extract a price from this matrix given the size and grade of material. I have been able ro achieve this with both, Index/Match and nested Xlookup functions. The specific issue I'm running into is when a size that is not on this list is specified. In the case that one or more of the dimensions specifed does not match any option on the list, I would like the formula to choose the next larget option for that dimension and pull data from the corresponding row. For example, if given an input of 8.5 L, 4.0 W, and 2.5 t, I would like the formula to return the cost for the 10.0 L, 4.8 W, and 3.0 t size of the same grade. I tried to solve this by using the built in options for the above functions to select the next larger size,
Making the prefix 0o for octal numbers mandatory?
9 June 2026 @ 12:53 pm
Most people on this planet have no idea what octal numbers are. For this it would be better to make the prefix 0o for octal numbers in parsers mandatory. However, the behaviour for base 0 of strtol and strtoul can't be changed without breaking tons of code and the expected behaviour of quite many applications.
The open source strtol wrappers of https://github.com/klux21/str2num are switching to a different auto-detection mode now if the base is set to 1 instead of 0 were they are expecting octal numbers to be always prefixed by 0o and treat numbers without that prefix but leading zeros as decimal numbers.
This doesn't brake existing code were the base is set to 0 and is an optional thing only.
Wouldn't this be a nice feature for the C and C++ compilers and the standards as well?
Sorry, I'm not allowed to reply to any questions here e.g. why it is a quite bad idea to treat 012 as 10 or
Repo state at a particular commit in VS Code
9 June 2026 @ 11:58 am
In VS Code, how can I see the state of the repo at a particular commit ?
I don't want to the the patch, but the state (ie all files) of the repo at a given commit. I would like to avoid having to type (hence remember) commands.
In Git GUI, there is a Patch / Tree switch that does exactly that :
What is the (visual) equivalent in VS Code?
What is the (visual) equivalent in VS Code?