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.

Logic introductory exercise

15 June 2026 @ 4:37 am

The problem and the explanation: The problem is: "N numbers are entered one by one. Display: A. Quantity of numbers between 100 and 500. B. Percentage of numbers equal to zero. C. Average of negative numbers. D. Sum of the entered numbers that belong to the first half. E. Average of the entered numbers." We cannot use arrays, and the critical point to solve is point D, as it's ambiguous what strictly constitutes the "first half." This is an introductory logic exercise where we can only work with the tools we've been taught, such as variables and loops. We cannot use functions, arrays, or For loops.

"How to handle class imbalance in PyTorch when using ImageFolder for medical image classification?"

15 June 2026 @ 3:25 am

Problem Description: I am building a pneumonia detection model using the chest-xray-pneumonia dataset. My dataset is imbalanced: the 'PNEUMONIA' class has significantly more samples than the 'NORMAL' class. I am using torchvision.datasets.ImageFolder and DataLoader for training. What I have tried: I have implemented a standard training loop with CrossEntropyLoss. The model achieves high accuracy but seems biased towards the majority class. I am looking for the best practice to handle this in PyTorch. Specific Question: Should I use WeightedRandomSampler or pos_weight in the loss function? Which approach is more recommended for a binary classification task in a medical context where false negatives are critical?

Best practice for organizing Claim Types and Values as constants in ASP.NET

15 June 2026 @ 3:24 am

I'm trying to refactor the authorization layer in my ASP.NET Core Web API project to remove any hard coded strings in policies. For roles, I used an enum, and for policies I used a flat static class, and it works fine. However, I am struggling to find the cleanest way to represent (Claim type, Claim value) pairs without hardcoding. Here's what I had done previously: .AddPolicy(PolicyName.SampleAccess, policyConfig => policyConfig.RequireClaim("sampleClaim", "sampleValue")); Now I wanted to avoid hardcoding the claim type (sampleClaim) and the allowed values (sampleValue). One approach was to create separate classes, but I'm confused if that's the proper industry standard. Please help. TIA

Parsing Wind financial data's HHMMSSmmm integer time

15 June 2026 @ 3:04 am

Wind financial data exports use an integer time format — 92501020 means 09:25:01.020. The date is another integer, e.g. 20251222. I need to combine them into a DolphinDB TIMESTAMP for sorting and filtering. Date is straightforward: temporalParse(string(20251222), "yyyyMMdd") // → 2025.12.22 But I couldn't find a format string that works for 92501020. Tried variations like temporalParse(string(92501020), "HHmmSSS") — no luck. I ended up writing a manual arithmetic parser: def parseWindTime(t) { ms = t % 1000 sec = (t / 1000) % 100 mnt = (t / 100000) % 100 hr = t / 10000000 return hr * 3600000l + mnt * 60000l + sec * 1000l + ms } Then combine: ts = timestamp(temporalParse(string(date), "yyyyMMdd")) + parseWindTime(time) It produces correct results, but feels lik

Backend request crashing [closed]

14 June 2026 @ 11:57 pm

What could be the issue if you are receiving an error 500 or simply your backend is crashing due to missing supabase_service_role_key, yet you have configured your var correctly in cloudfare pages?

Is fixing child.prototype.constructor necessary in ES5 if we solely rely on [[Prototype]] check methods like Object.getPrototypeOf()?

14 June 2026 @ 10:38 pm

When implementing the parasitic combination inheritance pattern in ES5, almost every resource (including Nicholas Zakas' book) insists on fixing the constructor property like this: function inheritPrototype(childSide, parentSide) { childSide.prototype = Object.create(parentSide.prototype); // Is this line below actually necessary in ES5? childSide.prototype.constructor = childSide; } However, from an OLOO (Objects Linking to Other Objects) perspective, the .constructor property seems to be just a fragile, misleading illusion left over from trying to make JavaScript look like a class-based language. If my architecture explicitly bans the usage of instance.constructor for type checking, and we strictly use modern ES5/ES6 diagnostic tools like: Object.getPrototypeOf(instance) Parent.prototype.isPrototypeOf(inst

Health Connect rate-limit RemoteException on API 33 and below, even on the first call

14 June 2026 @ 9:01 pm

I use Health Connect inside a DataSapien SDK. On API 34 our read flow works fine. On API 33 and below, we get this immediately android.os.RemoteException: Request rejected. Rate limited request quota has been exceeded. Please wait until quota has replenished before making further requests. Setup: androidx.health.connect:connect-client:1.1.0, compileSdk 36, minSdk 26, Kotlin 2.1.0 / 2.2.21. My Implementation: Client creation: fun getHealthConnectClient(): HealthConnectClient? { val ctx = context ?: return null when (HealthConnectClient.getSdkStatus(ctx)) { HealthConnectClient.SDK_UNAVAILABLE -> return null HealthConnectClient.SDK_UNAVAILABLE_PROVIDER_UPDATE_REQUIRED -> return null // opens Play Store } return HealthConnectClient.getOrCreate(ctx) } Before reads we check/request permissions:

Eager loading nested collections via multi-level Include statements causes synchronization delays in desktop data contexts

14 June 2026 @ 8:26 pm

I am working on an optimized logistics application using a desktop client interface with an isolated SQLite data source managed by Entity Framework Core. When attempting to invoke multiple level eager loading using nested .Include().ThenInclude() statements, the data context changes do not seem to immediately update the presentation layer elements despite implementing the standard change notification interfaces. The model schema is mapped down below. Why does the underlying collection binding experience this synchronization delay? using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; namespace WpfAppLogistics.Models { public class StorageZone { private int id; private string name; public StorageZone() { ProductItems = new ObservableCollection<ProductItem>(); } public int Id { get => id; set => id = value; }

Chronic AI Code Mutation & Context Drift in Autonomous Agent Workflows despite Git/CI Controls — Looking for Permanent Architectural Solutions

14 June 2026 @ 6:35 pm

For the past several months, I have been using state-of-the-art AI developer models (such as Google Codex and Anthropic Claude workflows) to manage, modify, and deploy our multi-brand codebase. While the speed of generation is incredible, we are facing a chronic, critical problem that is causing severe operational fatigue and delaying our product launches. The Core Problem: Even though we strictly follow standard industry guardrails, configure explicit context files, use rigorous version control (Git), and maintain distinct deployment branches, the AI sub-agents repeatedly suffer from what looks like "memory drift" or "regression anomalies." The Zombie Comeback: The AI continuously attempts to rewrite, bypass, or over-write pre-existing core logic (like fixed business pricing parameters or carrier routing rules) that was explicitly locked in past sessions. Context Ov

Cannot change orientation of triangle in ThreeJS

14 June 2026 @ 6:20 pm

I have an octahedron whose vertices coordinates came from a computation. I build the object using a BufferGeometry and a MeshStandardMaterial (see the code below). The resulting object has 4 facets with, apparently, the normals pointing to the inside of the object. I identified these triangles by computing the dot product between the vector from the center of the object to the center of the triangle and the normal vector of the triangle. I tried three strategies to change the orientation of these triangles, but they change nothing: always three darker triangles in the bottom half and one in the top half. Where is my fault? const material = new MeshStandardMaterial({ side: DoubleSide, roughness: 0.5, metalness: 0.6, color: "#00FF00" }); const geometry = new BufferGeometry(); geometry.setAttribute("position", new Float32BufferAttribute(vertices, 3)); // First strategy: compute the v

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.