Random snippets of all sorts of code, mixed with a selection of help and advice.
how can i get multiple website team page data through automation
6 May 2026 @ 4:14 am
How can I automate the extraction of team page data from multiple websites?
I need to collect person details from pages like “Team,” “Our Team,” “Meet the Team,” “Leadership,” or “Join the Team.” However, every website has a different structure and layout.
Image won't update despite variables being updated properly
6 May 2026 @ 3:39 am
In the following snapshot, the image of the pet is supposed to be in an "Idle" state, but is currently in a "Sad" state, despite the console saying the state is currently in "Idle". I have been able to modify the original variable "State" so that it should be able to change the image to the "Idle" state, and the prints show it is in an "Idle" state
import random, csv
import tkinter as tk
from tkinter import ttk, messagebox, PhotoImage
root = tk.Tk()
class MyFrame(ttk.Frame):
# Assets folder contain all pet assets, including frames and quotes
# PlayerPets.csv contains all accounts and current stats of their pets
PetStates = ["Idle", "Happy", "Sad", "Dirty"
import random, csv
import tkinter as tk
from tkinter import ttk, messagebox, PhotoImage
root = tk.Tk()
class MyFrame(ttk.Frame):
# Assets folder contain all pet assets, including frames and quotes
# PlayerPets.csv contains all accounts and current stats of their pets
PetStates = ["Idle", "Happy", "Sad", "Dirty"Why is my GitHub contribution graph (green squares) in my profile not updating upon re-adding an email?
6 May 2026 @ 3:28 am
I had thousands of commits in my GitHub profile contribution graph before. I removed my primary email from the settings, and they disappeared. So, I added the email back and verified it (and made it primary again).
That's all I did. It should have restored my commits to the contribution graph. But it didn't, even after waiting 2 days.
Here are the things that I've tried:
Verified that my email was verified and correct
Verified the "keep my email addresses private" option was turned off as before
Made a few commits to trigger a refresh (the new commits appeared in the graph, but not the old ones)
Checked the commit history of my old repositories (from the GitHub website) and ensured that the "author" correctly points to my GitHub profile
I was the owner of most of the repositories. And all commits were made directly to the main branch. Can someone help me fix this i
url_launcher import error: Target of URI doesn't exist
6 May 2026 @ 3:25 am
I'm trying to add url_launcher on my Flutter-based payment SDK:
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:url_launcher/url_launcher.dart';
class _PGPaymentModalState extends State<ArtoPaymentModal> {
late final WebViewController _controller;
bool _isLoading = true;
@override
void initState() {
super.initState();
WebViewCookieManager().clearCookies();
_controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setBackgroundColor(Colors.white)
..addJavaScriptChannel(
'PGSdkChannel',
onMessageReceived: (JavaScriptMessage message) {
_handleMessage(message.message);
},
)
..setNavigationDelegate(
NavigationDelegate(
onNavigationReques
Optimizing Docker Layer Caching for Private PHP/Laravel Packages with Multi-Stage Builds and BuildKit Secrets
6 May 2026 @ 3:23 am
i am trying to optimize a Docker Multi-Stage build for a Laravel application that requires private GitHub packages. I have two main issues that I can't seem to solve efficiently:
Caching vs. Secrets: I’m using docker build-kit secrets (--mount=type=secret) to pass my GitHub Token for composer install. However, every time I change the secret or even some unrelated files, the composer install layer re-runs, which is very slow. How can I ensure that composer install stays cached as long as composer.lock hasn't changed, even when using secrets?
Secure Layering: I want to make sure the private repo credentials never end up in the final image or any intermediate layer history.
Here is my current Dockerfile structure:
Dockerfile
# syntax=docker/dockerfile:1
FROM php:8.2-fpm-alpine AS builder
WORKDIR /app
# Install system dependencies
RUN apk add --no-cache git unzip
# Copy dependency files
COPY composer.json composer.lock ./
# The problem layer:
RU
Why are buttons overlapping in a flex container?
6 May 2026 @ 3:20 am
The buttons I have put in the flex container overlaps and I can't seem to figure out why. I have tried text and that seems to work fine. Can someone help?
#docksnav {
background-color: rgba(0, 0, 0, 0.7);
position: absolute;
bottom: 20px;
left: 50px;
padding: 20px;
width: 500px;
box-sizing: border-box;
border-radius: 9px;
cursor: pointer;
display: flex;
flex-direction: column;
gap: 5px;
}
.navbutton {
color: white;
font-size: 15px;
text-decoration: none;
background-color: rgba(0, 0, 0, 0.7);
position: absolute;
padding: 20px;
box-sizing: border-box;
border-radius: 9px;
cursor: pointer;
font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Console", monospace;
}
How to add comments before JSON property?
6 May 2026 @ 3:11 am
I would like to use JSON as the format for my program's configuration file. When writing the file to disk, it should contain comments that describe each field. These comments should be controlled through an attribute if possible.
public class Person
{
[JsonComment("Name of the person")]
public string Name { get; set; }
[JsonComment("Age of the person")]
public int Age { get; set; }
}
And the output should look like this:
{
/*Name of the person*/
"Name": "Jack",
/*Age of the person*/
"Age": 22
}
Some previous questions show how to write comments after the value, eg after "Jack". I would like to write the comment before the property name, eg before "Name". Using Json.NET or System.Text.Json or some other library, is it possible
C++ Cast base class unique_ptr to derived class unique_ptr [duplicate]
5 May 2026 @ 11:05 pm
I have a method in a derived class which I want to call via a unique_ptr to the base class.
How do I cast my unique_ptr to the base class to allow me to call the method in the derived class?
#include <iostream>
#include "memory"
using namespace std;
class Base
{
public:
Base() {};
};
class Derived: public Base
{
public:
Derived() {};
void Mathod()
{
std::cout << "Derived method" << std::endl;
}
};
int main()
{
std::unique_ptr<Base> basePtr;
(*basePtr).Mathod(); // How to cast basePtr to call Method() ?
return 0;
}
Apple developer program enroll
5 May 2026 @ 9:31 pm
Someone tried to discover why Apple services are so slow and bad? If app-store will work like app dev this company already was closed.
I tried enroll first time. Paid, sent documents but no answer 4 days. Then I go to web, but I see a button enroll there, so I think that something went bad and press it, and it start a new enrollment. When I see payment info I think "I do now want pay twice" but go out from this I can't so I pressed unenroll. Then I write to support. After 7 days they saod that they will return money. After 3 days money was returned.
I start second time, but no money on card I forgot so payment not go. Now there is no button retry, now same I need to write another email and wait 5-7 days. I do not want it, so I press unenroll.
I started third time, now I say double payment so it can't, please contact support.
Question: maybe someone asked or just know why Apple work so bad in there services? On reddit dozens post like people unab
When getting Relationships through Forma API, the entity id I receive from a sheetlineage does not match a sheet id
5 May 2026 @ 11:27 am
Let's say I have this Relationship between a Submittal and a Sheet:
{
"id": "74b70bb8-8802-a1fd-f201-890375a60c8f",
"createdOn": "2015-10-21T16:32:22Z",
"isReadOnly": true,
"isService": false,
"isDeleted": false,
"entities": [
{
"domain": "autodesk-construction-sheet",
"type": "sheetlineage",
"id": "2b95ba7a-3df5-4e99-a693-9c7cc15ee8c0",
"createdOn": "2021-07-29T11:39:12+01:00"
},
{
"domain": "autodesk-construction-submittals",
"type": "submittalitem",
"id": "urn:adsk.wipprod:dm.lineage:hC6k4hndRWaeIVhIjvHu8w",
"createdOn": "2021-07-29T13:39:12+01:00"
}
]
}
Now