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.

Setting up Claude API for Smart CodeInsight in RAD Studio 12.3

5 June 2026 @ 9:10 am

I am setting up Claude API in Embarcadero 12.3, but every time I send a command, it just prompts Not Found. Settings are as follows:

Array index out of bounds error using Java 17 with valid array index

5 June 2026 @ 9:05 am

I am using Java language version 17 and encounter an error: Code: public class ArrayTest { public static void main(String[] args) { int arr_int[] = new int[5]; arr_int [0] = 1; arr_int [1] = 2; arr_int [2] = 3; arr_int [3] = 4; arr_int [4] = 5; for (int i: arr_int) { System.out.println(arr_int[i]); } } Error message: 2 3 4 5 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5 at org.example.ArrayTest.main(ArrayTest.java:15) Process finished with exit code 1

Docker healthcheck failing

5 June 2026 @ 9:03 am

I have a Docker image for a website I am attempting to set up a healthcheck on. As per various answers on Stack Overflow and elsewhere, I've updated the healthcheck to use wget instead of curl, as it is an Alpine image, but it is still failing. The error message is: Connecting to localhost:3000 ([::1]:3000) wget: can't connect to remote host: Connection refused website: image: --IMAGE-- restart: always healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/"] interval: 30s # Check every 30 seconds timeout: 10s # Fail if check takes longer than 10 seconds retries: 3 # Mark unhealthy after 3 consecutive failures start_period: 40s # Grace period for application startup

How to properly use metaclasses in Python?

5 June 2026 @ 9:01 am

The first thing I thought of when I discovered metaclasses was making singletons. Is this code acceptable? The same thing can be achieved using decorators, so what are the advantages/disadvantages? What are the other cases when metaclasses can be useful? from typing import Any class Singleton(type): def __call__[T](cls: type[T], *args: Any, **kwargs: Any) -> T: if "_instance" not in cls.__dict__: instance = super().__call__(*args, **kwargs) setattr(cls, "_instance", instance) return getattr(cls, "_instance") class X(metaclass=Singleton): @staticmethod def x() -> str: return 'abc' class Y(metaclass=Singleton): @staticmethod def y() -> str: return 'def' x = X() y = Y() z = Y() print(x.x(), y.y(), z is y)

Why is this while loop giving me an index error?

5 June 2026 @ 8:57 am

I'm making a block breaker game and this is a loop that decides which powerup to grant to the player. It is supposed to give a random powerup between the powerups that are not active (0). So I made this while loop that starts at a random index between 0 and 3 (powerup list length - 1) and goes down until the negative length of the powerup list, and if it does reach it (which is supposed to mean that every powerup is active) it just assigns a random powerup. I can't understand why it's giving me an index error. This is the code: t = 0 i = r.randint(0,len(LOGIC.powerup)-1) #(0 - 3) while(1): if LOGIC.powerup[i] == 0: #this is the line where i get the error t = i exit i-=1 if i < -len(LOGIC.powerup): # -4 t = r.randint(0,len(LOGIC.powerup)-1) exit LOGIC.powerup[t] += 1200

CompressPictures doesn't appear on my XML ribbon in PowerPoint anymore

5 June 2026 @ 8:49 am

Years ago I created my own PowerPoint addin. It's still used a lot. Parts of it are my own VBA macros, others are just MSO functions. One of the latter is Compress Pictures. I recently noticed that the button has disappeared. (Win11, Microsoft365) The XML code which worked for many years was: <button idMso="PicturesCompress" enabled="true" showLabel="false"/> Does anyone know if MS changed the idMso? (And if yes, what is the new one?) Also I already tried <control idMso="PicturesCompress" enabled="true" showLabel="false"/> but that didn't change anything, that's why I assume they may have changed the idMso. I would like to avoid any VBA workarounds here. There should be an XML solution to display it again. Thank you in advance!

Configuring Serilog and ApplicationInsights in AspNetCore application

5 June 2026 @ 8:48 am

I'm using Serilog to write ConsoleLogs and I was using the Serilog.Sink.ApplicationInsights package to write log messages to ApplicationInsights. Unfortunately I now have to upgrade ApplicationInsights 3.x which is not supported by the Serilog Sink. After reading the documentation I thought I could use Serilog to write only to the console sink and set "writeToProviders" to true so the logEvents can be written to ApplicationInsights by someone else. BUT! As soon as I add services.AddApplicationInsightsTelemetry to my setup, I end up with every LogProvider douplicated inside the ILoggerFactory implementation from Serilog. Minimal setup to reproduce: using System.Globalization; using Microsoft.Extensions.DependencyInjection.Extensions; using Serilog; Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .Enrich.FromLogContext() .WriteTo.Console(formatProvider: CultureInfo.InvariantCulture) .CreateBootstrapLogg

Order of loading classes in PHP

5 June 2026 @ 8:47 am

Please explain the mechanism of loading classes in PHP, and why the first example does not cause an error, but the second does? From documentation: Classes should be defined before instantiation (and in some cases this is a requirement). Under what conditions is this requirement mandatory? Example 1: namespace { echo (new \Foo\Bar)->someattr; echo (new Egg)->someattr; exit(0); class Egg { public $someattr = 2; } } namespace Foo { class Bar { public $someattr = 1; } } /* 1 2 */ Example 2: namespace { echo (new \Foo\Bar)->someattr . PHP_EOL; echo (new Egg)->someattr . PHP_EOL; exit(0); class Egg extends \Foo\Bar { public $someattr = 2; } } namespace Foo { class Bar { public $someattr = 1; } } /

CoPilot doesn't execute actions in Agentic mode with local LLM

5 June 2026 @ 8:43 am

I'm playing with local ollama model (qwen2.5-coder:7b) trying to connect it to CoPilot. The local model is detected without issues. Then, in Agent mode I give it a simple task like "Add a string field named XXX to this class" (C# project). Model runs, provides some answer which look sensible, but CoPilot doesn't execute the action, instead it prints json output into its chat, something like: {"name": "get_file", "arguments": {"filename": "...\\MyClass.cs"}} My impression is that CoPilot doesn't understand what model tells it. Obviously, it needs to provide file contents, but it doesn't do it. I did it in both Visual Studio 2026 and Visual Studio Code with the same result. Any advice what can be wrong?

Best approach for Docker health checks in .NET containers without curl/wget?

5 June 2026 @ 8:21 am

have a .NET application running in Docker and need to configure container health checks. Currently I see a few options: Option 1 Install curl in the runtime image. Use Docker HEALTHCHECK with a command such as: HEALTHCHECK CMD curl -f http://localhost:8080/health/ready || exit 1 Option 2 Use an image such as aspnet:10.0-alpine that already contains wget. Use wget for the health check. Option 3 Create a custom executable or .NET program that calls the application's health endpoint and returns an appropriate exit code. Use that executable in the Docker HEALTHCHECK. My concern is that installing additional tools such as curl or wget increases

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

An Extension is Not an Excuse

28 May 2026 @ 9:20 pm

The Department of Health and Human Services recently announced a one-year extension of the compliance dates for web content and mobile app accessibility requirements under Section 504 of the Rehabilitation Act. The requirements themselves are not new in substance: covered recipients of HHS federal financial assistance must make covered web content and mobile apps conform […]

Tolerating Inaccessibility

30 April 2026 @ 5:50 pm

The latest WebAIM Million report shows that detectable homepage accessibility errors increased over the past year. This article considers what those results may reveal about the organizational and societal forces that continue to deprioritize accessibility, and challenges us to imagine a world where inaccessibility is no longer tolerated.

Ask AIMee: An accessible accessibility-focused AI chatbot

31 March 2026 @ 4:49 pm

We’re happy to introduce AIMee – an easy-to-use, AI-powered conversational chatbot focused on accessibility. AIMee has been designed to be highly accessible to users with disabilities. Ask her accessibility questions to get quick answers and guidance. The name “AIMee” plays off of the “AIM” (Accessibility In Mind) from “WebAIM” and also “AI”. Here are some […]

A New Path for Digital Accessibility?

27 February 2026 @ 7:02 pm

Please note This post will explore how an adaptive, intelligent system could empower users with disabilities to optimize their experience in digital environments. Even were such a system available tomorrow, developers of digital content, services, and products would still be responsible for providing equal access to ALL users. Consider a few of the many exciting […]

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 […]

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.