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.

Best practice using search params as state

2 March 2026 @ 5:30 pm

I noticed when deriving state using Route.useSearch(), and updating state using Route.useNavigate, there is a delay when updating state. Is there guidance on how to do this optimally? So far I'm keeping state in a useState, and syncing state using a useEffect function useOptimisticTab() { const { tab } = Route.useSearch(); const navigate = Route.useNavigate(); const [optimisticTab, setOptimisticTab] = useState(tab); useEffect(() => { setOptimisticTab(tab); }, [tab]); const handleSetOptimisticTab = (value: TabOptions) => { setOptimisticTab(value); navigate({ search: (prev) => ({ ...prev, tab: value, }), }); }; return [optimisticTab, handleSetOptimisticTab] as const; }

Gitlab Docker Image - Private Project

2 March 2026 @ 5:25 pm

How to create private project in Gitlab gitlab/gitlab-ee:18.9.0-ee.0 (Docker) ? Force git clone command to use a token or username:password . Thx, Rick

How to set up documentation with MkDocs?

2 March 2026 @ 5:21 pm

I tried to set up MkDocs for a small local project using ChatGPT, but it failed. Here is what I have as folder structure: - mymodule/ | - __init__.py | - tester.py - docs/ | - docs/ | - mkdocs.yaml and that mkdocs.yml contains: site_name: Test Documentation theme: name: mkdocs plugins: - search - mkdocstrings: handlers: python: setup_commands: - "import sys, os; sys.path.insert(0, os.path.abspath('../mymodule'))" But it is not working when running mkdocs serve. How can this be fixed? I just want documentation of several files in that one folder mymodule.

class hierarchy hibernate mapping

2 March 2026 @ 5:18 pm

I'm creating the domain class mapping for the following SQL tables: CREATE TABLE org ( id UUID PRIMARY KEY DEFAULT uuidv7(), name VARCHAR(50) NOT NULL ); CREATE TABLE org_entity ( id UUID PRIMARY KEY DEFAULT uuidv7(), name VARCHAR(50) NOT NULL, org_id UUID NOT NULL REFERENCES org(id) ); CREATE UNIQUE INDEX ui_org_entity ON org_entity (org_id, id); CREATE TABLE entity_field ( id UUID PRIMARY KEY DEFAULT uuidv7(), name VARCHAR(50) NOT NULL, org_id UUID NOT NULL, entity_id UUID NOT NULL, FOREIGN KEY (org_id, entity_id) REFERENCES org_entity(org_id, id) ); I try more. This is the last EntityField class with errors: @Entity @Table(name = "entity_field") @Getter @Setter @NoArgsConstructor @ToString(callSuper = true) public class EntityField extends BaseOrg { @ManyToOne(optional = false, fetch = FetchType.LAZY

Why are these random numbers printing in the terminal? Everything else seems to be working fine

2 March 2026 @ 5:16 pm

The code below checks if a give string is a palindrome or not. I am getting the intended output in the terminal but there is also an integer printing in between every line of output. I have played with setting the return type of the is_palindrome to different things like std::string but I can't seem to get the terminal to print the correct output without the numbers. Also, every time I run the code the numbers are different. Source Code: #include <iostream> #include <algorithm> // Define is_palindrome() here: bool is_palindrome(std::string text){ std::string rev = text; std::reverse(rev.begin(), rev.end()); if(text == rev){ std::cout << text << " is a palindrome!\n"; } else { std::cout << text << " is not a palindrome.\n"; } } int main() { std::cout << is_palindrome("madam") << "\n"; std::cout << is_palindrome("ada") << &quo

What does .NET DateTime Ticks represent when Kind is Unspecified?

2 March 2026 @ 4:57 pm

Take the following C# code: DateTime.TryParse("2025-05-03T02:10:36", out DateTime dateTime); Console.WriteLine(dateTime.Kind); Console.WriteLine(dateTime.Ticks); The value of Ticks is here 638818350360000000 and the value of Kind is "Unspecified". I get why Kind is not specified but I don't get how the system can determine a value for Ticks in this case. The docs say If the DateTime object has its Kind property set to Unspecified, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the unknown time zone. I have not idea what that means. How can you specify the number of ticks since a certain point in time without knowing the

Animation bug on list when entering edit mode with swipe to delete disabled

2 March 2026 @ 1:59 pm

I'm trying to have an edit button on a list to be able to delete multiple items at the same time without the red delete controls at the start of each row. To remove the delete controls I use this .deleteDisabled(editMode?.wrappedValue.isEditing == true). But when I add this line the animation is strange when entering edit mode, it's like the list bounces. You can find an example code here: import SwiftUI struct ContentView: View { @State private var items = ["Item 1", "Item 2", "Item 3", "Item 4", "Item 5"] @State private var selection: Set<String> = [] var body: some View { NavigationStack { List(selection: $selection) { ItemsList(items: $items) } .toolbar { ToolbarItem(placement: .topBarLeading) { EditButton() }

Using matplotlib to build report of survey responses, what is the most efficient way to tally likert scores?

2 March 2026 @ 3:18 am

I am building out functionality in an existing app for a user to upload an excel file to plot out responses for survey questions. There are 4 likert questions with 2 comment response question. The relevant data is organized as such: Q1 Q2 Q3 Q4 Q5 Q6 0 Occasionally  Agree  Agree comment comment Very Well 1 Frequently Agree  Agree NaN NaN Moderately 2 Frequently Agree  Agree NaN NaN Well 3 Frequently Agree  Neither Agree nor Disagree comment comment Moderately Currently, I do the following to build a list of all the questions, their listed responses, the 'type' of likert scale it is, and the amount each response is recorded per question. def read_responses(xl): responses = [] action = False data = pd.read_excel(xl) for name, values

Win32 C++ Generic function to set Cursor from either UI or any worker threads (SetCursor does not work from external threads)

2 March 2026 @ 12:38 am

I need to switch between Normal and Loading cursors. I see in my application that if I do // Start Waiting Cursor SetCursor(LoadCursor(NULL, IDC_WAIT)); // ... App Logic ... // Resume Normal Cursor when done SetCursor(LoadCursor(NULL, IDC_ARROW)); this works properly in direct UI-thread code, but does not work from the code of separate worker threads. To determine the Waiting cursor during certain conditions in worker threads I currently handle WM_SETCURSOR which checks global variables. case WM_SETCURSOR: if (LOWORD(lParam) == HTCLIENT /* Client area only*/ && threadCondition1 || threadCondition2 || threadCondition3) { SetCursor(LoadCursor(NULL, IDC_WAIT)); } else { // Default Arrow Cursor return DefWindowProc(hWnd, message, wParam, lParam); } Per Google this is because SetCursor in Win32 API ofte

How do I reduce the remaining health here to zero?

1 March 2026 @ 11:28 am

I haven't been able to figure out how to solve this problem. const healths = [{ 1: 100 }, { 2: 100 }, { 3: 100 }, { 4: 100 }, { 5: 100 }, { 6: 100 }]; healths.forEach((curr, i) => { // console.log(`${curr[i + 1]}`) const damage = Math.trunc(Math.random() * (12 - 4 + 1)) + 4; let remainingHealth = curr[i + 1] - damage; if (i < healths.length - 1) { console.log(`${i + 1}. player made a move, ${i + 2} knight's remaining health is ${remainingHealth}`) } else if (i === healths.length - 1) { console.log(`${i + 1}. player made a move, ${i - (healths.length - 2)} knight's remaining health is ${remainingHealth}`) } })

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

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

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

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.