Nifty Corners Cube

VN:F [1.9.22_1171]
Rating: 7.0/10 (1 vote cast)

Rounded corners the javascript way
Nifty Corners Cube

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.

How to implement member functions for a C++ class that stores a positive integer as a string

11 January 2026 @ 3:09 pm

I’m working on a C++ assignment where I need to implement several member functions for a class called customPositiveInt. The class stores a positive integer as a string and tracks the number of digits. The class definition is provided, and I am not allowed to modify it. Getter functions are already implemented, so I do not need to write those. I’m unsure about the correct and idiomatic way to implement these functions—especially the operator>> and operator+. What would a clean implementation of these methods look like? Here is the provided class definition: enter image description here enter image description here enter image description here I need to implement the foll

How do you implement a virtual waiting room? [closed]

11 January 2026 @ 3:07 pm

I’m currently working on a sports event ticketing website. The app is deployed on a shared cloud server (not a VPS). For example, an event has a quota of 200 tickets, but the number of daily users can reach up to 1,000. How do you handle race conditions and prevent double entries when 1,000 users try to buy tickets at the same time while only 200 tickets are available? I have an idea to implement a virtual waiting room, where the server processes incoming requests one by one. Each IP address can only make one active request at a time. Once a request is completed, the next request in the queue will be processed. An analogy would be like a cake shop: The shop sells only 200 cakes per day The shop capacity is 50 people at a time Each customer can buy only 1 cake 1,000 people are waiting outside So, the first 50 customers enter the shop, get served, and receive their cak

Generating clangd error on `using` line without actually instantiating the type

11 January 2026 @ 2:51 pm

I would like to see a clangd error on "using MyStruct" instead of in static_assert. Right now it is not generating any errors because MyStruct is not instantiated. If it is, I get a clangd error on the static_assert. How I am really using this is for my users to define MyStruct using MyStructTemplate. I would like them to know there is an error on their code, and not in my code (MyStructTemplate), and was wondering if there is any suggestion on how I can do this best. Ideally I want to only be touching my code (MyStructTemplate), and I don't want my user to instantiate MyStruct because it will take up space. template <int... Is> struct MyStructTemplate { static_assert(!((Is == 1) || ...)); }; using MyStruct = MyStructTemplate<1, 2, 3>;

Why does std::print segfaults when using a string parameter?

11 January 2026 @ 2:43 pm

Consider the following code: #include <print> int main() { std::println("hello from {}", "me"); return 0; } On x86-64 this outputs hello from me. But on ARM64 it segfaults. ASM generation compiler returned: 0 Execution build compiler returned: 0 Program returned: 135 Program terminated with signal: SIGBUS If I make the string parameter permanent by putting it in a constexpr, the same error happens: #include <print> int main() { static constexpr auto name = "me"; std::println("hello from {}", name); return 0; } I'm using ARM64 gcc trunk with --std=c++23. The godbolt link to reproduce is here: https://godbolt.org/z/ss7xq87rG How do I pass strings as parameters to the st

Matplotlib error ValueError3171581 while plotting data

11 January 2026 @ 2:41 pm

So im trying to get data from a csv and got an error while parsing maybe, could you take a look? import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy import stats # Load data df = pd.read_csv("MyData.csv") # Remove index column if "Unnamed: 0" in df.columns: df = df.drop(columns=["Unnamed: 0"]) df.head() maybe i did an error allready here?

Why pandas module is not found even though, it is already installed?

11 January 2026 @ 2:27 pm

I want to run a dummy code on python to test the pandas library. Even though there is pandas package in the pip list of the Python virtual environment, it still shows the error that says "C:\Users\Youseng Taiheng\AppData\Local\Microsoft\WindowsApps\python3.13.exe" "c:/Users/Youseng Taiheng/OneDrive/Desktop/vscode/python/pandnew.py" Traceback (most recent call last): File "c:\Users\Youseng Taiheng\OneDrive\Desktop\vscode\python\pandnew.py", line 1, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas' my python code import pandas as pd df = pd.DataFrame([[1,2,3],[4,5,6],[7,8,9]], columns = ["A", "B","C"]) print(df) pip list of my venv (there is pandas library in there) Packag

Flutter web deployed on firebase is unable to receive any data though database streams

11 January 2026 @ 2:11 pm

I am trying to deploy a flutter web application on firebase. In this minimum working example a stream from a collection should be returned and simply displayed. When run locally, the object is correctly displayed but when run deployed on firebase hosting, the stream hangs indefinitely with only the CircularProgressIndicator being displayed. import 'package:amateur_arena/firebase_options.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); runApp(MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { final db = FirebaseFirestore.instance; return MaterialApp( the

Tell me if any same codes written 2 or 3 times

11 January 2026 @ 2:10 pm

[/Script/Engine.RendererSettings] r.AFME.Enable=5 r.Kuro.AFME.Enable=1 r.SupportStationarySkylight=1 r.Mobile.SSR=2 r.SSFS.HighQuality=1 r.SSFS.FullPrecision=1 r.SSFS.PassAmount=10 r.SSFS.Format=1 r.SSFS.LuminanceWeighting=1 [SystemSettings] r.Mobile.DeviceEvaluation=5 r.Mobile.DeviceEvaluation.EnableOverride=1 r.Mobile.DeviceEvaluation.ForceMaxQuality=1 r.Mobile.DeviceEvaluation.OverrideProfile=Android_VeryHigh r.EnableLensflareSceneSample=1 r.DepthOfFieldQuality=3 r.SceneColorFringeQuality=3 r.Tonemapper.GrainQuantization=0 r.Tonemapper.Quality=2 r.DetailMode=3 r.MaterialQualityLevel=2 r.ViewDistanceScale=2 foliage.DensityType=2 grass.CullDistanceScale=9 foliage.LODDistanceScale=9 r.LandscapeLODDistributionScale=10.0 r.LandscapeLODBias=-3 r.Mobile.SSAO=3 r.Water.WaterMesh.LODCountB

Failure to Detect <img> Tags When Bulk Downloading Copyright-Free Images

11 January 2026 @ 1:49 pm

The bulk image downloader fails to detect <img> tags on the target website, resulting in zero or incomplete image extraction, even though images are visibly loading in the browser. I am trying to download an image from manga website but the images are unable to downloaded here is the example script code which I have develop using python import requests import os def download_image(image_url, save_dir="images", filename=None): """ Downloads an image from a given URL and saves it locally. :param image_url: Direct image URL :param save_dir: Directory to save the image :param filename: Optional custom filename """ # Create directory if it doesn't exist os.makedirs(save_dir, exist_ok=True) # Set headers to avoid basic bot blocking headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" } try:

Should I return a cleanup callback in useEffectEvent for compactness?

11 January 2026 @ 12:20 pm

I'm wondering whether I can return useEffectEvent-related cleanup logic so the useEffect callback invokes them at the end of the component's lifecycle. Here's a somewhat hamfisted example (based on this part of the official documentation) just to demonstrate what I mean: import { useEffect, useContext, useEffectEvent } from 'react'; function Page({ url }) { const { items } = useContext(ShoppingCartContext); const numberOfItems = items.length; const onNavigate = useEffectEvent((visitedUrl) => { logVisit(visitedUrl, numberOfItems); return myLogCleanup; // some method which does some logging-related cleanup, just for the sake of the example }); useEffect(() => onNavigate(url), [url]); // we return a cleanup callback here } I think genera

960.gs

VN:F [1.9.22_1171]
Rating: 8.0/10 (1 vote cast)

CSS Grid System layout guide
960.gs

IconPot .com

VN:F [1.9.22_1171]
Rating: 7.0/10 (1 vote cast)

Totally free icons

Interface.eyecon.ro

VN:F [1.9.22_1171]
Rating: 6.0/10 (1 vote cast)

Interface elements for jQuery
Interface.eyecon.ro

ThemeForest.net

VN:F [1.9.22_1171]
Rating: 7.0/10 (2 votes cast)

WordPress Themes, HTML Templates.

kuler.adobe.com

VN:F [1.9.22_1171]
Rating: 8.0/10 (1 vote cast)

color / colour themes by design

webanalyticssolutionprofiler.com

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Web Analytics::Free Resources from Immeria
webanalyticssolutionprofiler.com

WebAIM.org

VN:F [1.9.22_1171]
Rating: 4.0/10 (1 vote cast)

Web Accessibility In Mind

2026 Predictions: The Next Big Shifts in Web Accessibility

22 December 2025 @ 11:22 pm

I’ve lived long enough, and worked in accessibility long enough, to have honed a healthy skepticism when I hear about the Next Big Thing. I’ve seen lush website launches that look great, until I activate a screen reader. Yet, in spite of it all, accessibility does evolve, but quietly rather than dramatically. As I gaze […]

Word and PowerPoint Alt Text Roundup

31 October 2025 @ 7:14 pm

Introduction In Microsoft Word and PowerPoint, there are many types of non-text content that can be given alternative text. We tested the alternative text of everything that we could think of in Word and PowerPoint and then converted these files to PDFs using Adobe’s Acrobat PDFMaker (the Acrobat Tab on Windows), Adobe’s Create PDF cloud […]

Accessibility by Design: Preparing K–12 Schools for What’s Next

30 July 2025 @ 5:51 pm

Delivering web and digital accessibility in any environment requires strategic planning and cross-organizational commitment. While the goal (ensuring that websites and digital platforms do not present barriers to individuals with disabilities) and the standards (the Web Content Accessibility Guidelines) remain constant, implementation must be tailored to each organization’s needs and context.   For K–12 educational agencies, […]

Up and Coming ARIA 

30 May 2025 @ 6:19 pm

If you work in web accessibility, you’ve probably spent a lot of time explaining and implementing the ARIA roles and attributes that have been around for years—things like aria-label, aria-labelledby, and role="dialog". But the ARIA landscape isn’t static. In fact, recent ARIA specifications (especially ARIA 1.3) include a number of emerging and lesser-known features that […]

Global Digital Accessibility Salary Survey Results

27 February 2025 @ 8:45 pm

In December 2024 WebAIM conducted a survey to collect salary and job-related data from professionals whose job responsibilities primarily focus on making technology and digital products accessible and usable to people with disabilities. 656 responses were collected. The full survey results are now available. This survey was conducted in conjunction with the GAAD Foundation. The GAAD […]

Join the Discussion—From Your Inbox

31 January 2025 @ 9:01 pm

Which WebAIM resource had its 25th birthday on November 1, 2024? The answer is our Web Accessibility Email Discussion List! From the halcyon days when Hotmail had over 35 million users, to our modern era where Gmail has 2.5 billion users, the amount of emails in most inboxes has gone from a trickle to a […]

Using Severity Ratings to Prioritize Web Accessibility Remediation

22 November 2024 @ 6:30 pm

So, you’ve found your website’s accessibility issues using WAVE or other testing tools, and by completing manual testing using a keyboard, a screen reader, and zooming the browser window. Now what? When it comes to prioritizing web accessibility fixes, ranking the severity of each issue is an effective way to prioritize and make impactful improvements. […]

25 Accessibility Tips to Celebrate 25 Years

31 October 2024 @ 4:38 pm

As WebAIM celebrates our 25 year anniversary this month, we’ve shared 25 accessibility tips on our LinkedIn and Twitter/X social media channels. All 25 quick tips are compiled below. Tip #1: When to Use Links and Buttons Links are about navigation. Buttons are about function. To eliminate confusion for screen reader users, use a <button> […]

Celebrating WebAIM’s 25th Anniversary

30 September 2024 @ 10:25 pm

25 years ago, in October of 1999, the Web Accessibility In Mind (WebAIM) project began at Utah State University. In the years previous, Dr. Cyndi Rowland had formed a vision for how impactful the web could be on individuals with disabilities, and she learned how inaccessible web content would pose significant barriers to them. Knowing […]

Introducing NCADEMI: The National Center on Accessible Digital Educational Materials & Instruction 

30 September 2024 @ 10:25 pm

Tomorrow, October 1st, marks a significant milestone in WebAIM’s 25 year history of expanding the potential of the web for people with disabilities. In partnership with our colleagues at the Institute for Disability Research, Policy & Practice at Utah State University, we’re launching a new technical assistance center. The National Center on Accessible Digital Educational […]

CatsWhoCode.com

VN:F [1.9.22_1171]
Rating: 7.0/10 (1 vote cast)

Titbits for web designers and alike

Unable to load the feed. Please try again later.