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.

C++ vector push_back not working correctly inside loop

3 May 2026 @ 11:34 am

Title: C++ vector push_back not working correctly inside loop Body: I am trying to insert elements into a std::vector using push_back() inside a loop, but the vector is not storing values as expected. Problem I expect the vector to store all values added inside the loop, but it either stores incorrect values or appears empty when accessed later. Code #include <iostream> #include <vector> using namespace std; int main() { vector<int> v; for(int i = 0; i < 5; i++) { v.push_back(i); } for(int i = 0; i < v.size(); i++) { cout << v[i] << " "; } return 0; } Expected Output 0 1 2 3 4 Actual Output (Output is not as expected or vector appears empty)

React 19 use() hook with Suspense boundaries: unexpected re-renders on cached promises

3 May 2026 @ 11:28 am

I've been migrating a mid-sized app to React 19 and started using the new use() hook to read promises directly in components. The issue I'm running into is that even with a stable promise reference (memoized with useMemo), the component inside the Suspense boundary seems to re-render more than expected when a parent state changes. Here's a minimal reproduction: function DataComponent({ promise }) { const data = use(promise); console.log("rendered"); // fires more than expected return <div>{data.name}</div>; } function Parent() { const [count, setCount] = useState(0); const promise = useMemo(() => fetchUser(1), []); // stable reference return ( <> <button onClick={() => setCount(c => c + 1)}>increment {count}</button> <Suspense fallback={<p>Loading...</p>}> <DataComponent promise={promise} /> </Suspense> </&g

KDTree 2d index searching based on pivot_table vector error

3 May 2026 @ 11:19 am

i want find 2d index(from PCA). based on pivot_table vector at my custom metric. fastly. that's why im using KDTree. but because it, these error is occur: ValueError Traceback (most recent call last) /tmp/ipykernel_9428/753399497.py in <cell line: 0>() 50 return 10.0 51 ---> 52 matriks_jarak = metrics(Matrix.values, Matrix.values, 5) 53 54 model = knn(n_neighbors=6, metric="precomputed") /tmp/ipykernel_9428/753399497.py in metrics(x, x2, n_tetangga) 31 def metrics(x, x2, n_tetangga): 32 global ind, jarak, ind0_nya, rigth_arr, sudah_print ---> 33 ind_x = pohon.query(x.reshape(1, -1), k=1, return_distance=False)[0][0] 34 ind_x2 = pohon.query(x2.reshape(1, -1), k=1, return_distance=False)[0][0] 35 jarak_final = jarak.tolist()[0] sklearn/neighbors/_binary_tree.pxi in sklearn.neighbors._kd_tree.BinaryTree64.query() ValueError: query data dimension must match trai

setPointerCapture prevents pointerup/mouseup from firing in JUCE's WKWebView (macOS)

3 May 2026 @ 11:14 am

I'm building a drag-to-reorder interaction for horizontal card layout inside a JUCE plugin's WebBrowserComponent (backed by WKWebView on macOS). The card moves correctly during drag but the release event (pointerup, mouseup) never fires. What works: Knob drag: canvas.setPointerCapture(id) + canvas.addEventListener('pointermove', ...) + canvas.addEventListener('pointerup', ...) → fully functional Slider drag: same pattern on a <div> → fully functional What doesn't work: Node card horizontal drag: identical pattern on a card <div> inside an overflow-x: auto scroll container → pointermove fires (card translates), but pointerup and mouseup never fire on either the element OR document

C, structs and pointers - why does this work?

3 May 2026 @ 11:09 am

I wanted to try using pointers within structs to create dynamic arrays (don't know if that makes sense, I'm relatively new to C.) I started using calloc() to allocate memory, but I noticed that the program would still work even without using calloc(). I can't understand why this works. Is this something you can do? #include <stdlib.h> #include <stdio.h> struct foo { int *age; }; struct bar { int *year; }; struct comb { struct foo f; struct bar b; }; int main() { struct comb c; c.f.age[0] = 23; c.f.age[1] = 67; c.f.age[2] = 14; c.f.age[3] = 1; c.f.age[4] = 3; c.b.year[0] = 1972; c.b.year[1] = 1982; c.b.year[2] = 1988; c.b.year[3] = 1997; c.b.year[4] = 2002; int i = 0; while (i < 5) { printf("%d %d\n", c.f.age[i], c.b.year[i]); i++; } return 0; } Output:

How to Programmatically audit page score by category in TypeScript

3 May 2026 @ 11:09 am

I'm building a headless CMS where I want to automatically audit each page's SEO before it goes live. I need a solution that: Returns a 0–100 score broken down by category (meta tags, content, structure, performance) Flags issues with severity levels (error, warning, info) so I can prioritize fixes Works server-side in Node.js without making any external API calls Can block a CI/CD deployment if the score drops below a threshold What I've tried: I've been manually checking things like title length and meta description, but it's tedious and doesn't scale: // Manual checks — inconsistent and hard to maintain const titleLength = title.length; if (titleLength < 50 || titleLength > 60) { console.warn('Title length issue'); } const descLength = metaDescription.length; if (descLength <

VS Code Branch Switching (post worktree vscode update)

3 May 2026 @ 10:04 am

TLDR: Vscode Git: Checkout to... command used to allow selecting branches. Now it forces you to Choose a repository and only then the branch. Does anyone know how to make it offer Select a branch or tag to checkout as it used to? Or even better turn off the introduced worktree support altogether? Clicking directly on branch name (bottom left corner) still works as intended, but I cannot find a way of binding this exact functionality to a shortcut. Either I don´t understand how to use it or vscode worktree support is a complete mess. I had been using worktrees for years but since the support was introduced I had to constantly fight it to prevent clutter and noice it introduces to the UI. I started by rolling back vscode version util extension updates forced me to update my vscode version. Then I deactivated Git: Detect Worktrees and set Git: Detect Worktrees Limit to 0, this helped for so

Python re.compile and REGEX patterns to clean-up name variations

3 May 2026 @ 7:52 am

I am looking for help with a REGEX pattern that will help me clean-up names to just the first, last, and suffix. It needs to be able to handle the following variations. Drops any middle name Keeps last name if any Drops any nicknames Drops any maiden or dead names, standard format (name-) Keeps suffixes without punctuation. Always follows ,\s after last name. Does not keep titles of nobility. Always follows ,\s after last name. Sarah Michelle Gellar -> Sarah Gellar Leslie Marie DeGuzman Santorini -> Leslie Santorini Beyonce -> Beyonce Stefani "Lady Gaga" Germanotta -> Stefani Germanotta Lebron James, Jr. -> Lebron James Jr Hailey Bieber (Baldwin-) -> Hailey Bieber Shania (Irene-) Twain -> Shania Twain Charles "Chaz" Fluffy Wong, Duke of CatTown -> Charles Wong I atte

should i remove the return?

3 May 2026 @ 7:45 am

useEffect(() => { const handleScroll = () =>{ if(window.scrollY > 100) { setShowModal(true); window.removeEventListener("scroll", handleScroll); } }; window.addEventListener("scroll", handleScroll); return () => window.removeEventListener("scroll", handleScroll) }, []) should i remove this code? return () => window.removeEventListener("scroll", handleScroll) since at my ifStatement has already? i guess no need to return right? window.removeEventListener("scroll", handleScroll);

Pooling model estimates with MICE from competing risks crr survival models gives 1 degree of freedom and wide CI

3 May 2026 @ 6:45 am

I am imputing cause of death in a data of a clinical cohort. The imputation process is working without problems. However, when I try to estimate hazards ratio from using fine-grey model, I get one degree of freedom, which results in confidence intervals in the infinity !! This problem isn't appearing when I run a coxph model instead, which means the problem probably likes in how the crr models are pooled together. Here is an example using the trial data frame from tidycmprsk package to reproduce the problem. x <- tidycmprsk::trial set.seed(123) # Set seed for reproducibility # 1. Randomly select the indices to be turned into NA na_indices <- sample(which(x$death_cr %in% c("death from cancer", "death other causes")), 24) # 2. Create the new variable x$death_cr_new <- x$death_cr x$death_cr_new[na_indices] <- NA # 3. Verification check print(table(x$death_cr, useNA = "always")) print(tab

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

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

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

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.