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.

Does the NPU on the Snapdragon 8 Gen 3 support frequency adjustment?

26 November 2025 @ 10:07 am

I have a rooted Android phone equipped with the Snapdragon 8 Gen 3 chip. I want to adjust the NPU frequency in a similar way to how I adjust CPU or GPU frequencies via sysfs, but I can't find any relevant tutorials. Can the frequency of the Qualcomm NPU be adjusted? If yes, what methods can be used to adjust it?

React Router v7 SPA mode: How to use strict CSP without unsafe-inline when <Scripts /> injects inline module scripts?

26 November 2025 @ 10:05 am

I'm migrating an app from React Router v6 + Webpack to React Router v7 (SPA mode) + Vite and I'm having issues with setting a strict Content Security Policy. In RR6 I had a normal index.html and loaded my bundle externally: <script src="/js/admin-panel-bundle.js"></script> This allowed me to use the following CSP without problems: <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline';"> Problem in React Router v7 In RR7 SPA mode, the app must use a root Layout component that generates the entire HTML document. React Router injects its client entry through an inline <script type="module">, via: export const Layout = ({ children }: { children: React.React

Error undefined variable when defining in included files

26 November 2025 @ 10:04 am

The following is my directory tree: ├── ansible.cfg ├── censored_inventory.ini ├── group_vars │   ├── censored-dir │   │   └── secret_info.yml │   └── tmp_var.yml ├── host_vars │   └── tmp_var.yml ├── main.yml ├── tmp_var.yml ├── vars │   └── tmp_var.yml └── vault_pass At first I tried to put sensitive variables in secret_info.yml and encrypt with ansible-vault, then use it in playbook (main.yml) by setting vars_files path in ansible.cfg. However I kept getting error messages with command ansible-playbook main.yml -vvvv: fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'try_var' is undefined. 'try_va

Is it possible to set stdin of a process to a pipe and the rest to a TTY device?

26 November 2025 @ 10:03 am

I am trying to spawn a process such that I'll be able to do the following: Send text to its standard input and specify EOF (by closing the stdin pipe) Connect the process' stdout and stderr to a TTY device such that its behavior is identical when its run inside a TTY Initially, I'd launched the process in a pty using creack/pty (Go), but soon after I realized that there's no way to 'send' EOF. I know that EOF is neither a signal nor a character so it can't be sent. Previously I was able to launch the process with all 3 standard pathaways (stdin, stdout, and stderr) connected to pipes. This worked, but I couldn't get the program to behave as if it had been run inside a TTY. Take for example, the highlighting behavior of grep.

SAML 2.0 exegesis: Does the spec regulate the handling of IdP sessions?

26 November 2025 @ 9:54 am

The SAML Profiles specification for the Web Browser SSO Profile, line 477ff. says: The ForceAuthn<AuthnRequest> attribute, if present with a value of true, obligates the identity provider to freshly establish this identity, rather than relying on an existing session it may have with the principal. But how the identity provider handles "existing sessions" (when it starts or ends one) is not said. More generally, line 391f. says: It is assumed that the user is using a standard commercial browser and can authenticate to the identity provider by some means outside the scope of SAML. An indication that such a session might end at all is given by the SessionNotOnOrAfter<AuthnStatement> attribute in the

Why argparse treats unknown arg as a known arg in case unknown arg name is part of a known arg name? [duplicate]

26 November 2025 @ 9:53 am

I have a Python project that uses argparse. I noticed an unwanted behavior of argparse when parsing some unknown arguments. I use both known and unknown arguments. I have a parameter --list-installed. Now, if I pass the --list parameter, it is treated as known, while it should be unknown. See this code: import argparse parser = argparse.ArgumentParser(add_help=False) parser.add_argument("--list-installed", action="store_true") def parse_options(options: list[str]) -> None: args, unknown_args = parser.parse_known_args(options) print("input options:", options) print(" args:", args) print(" unknown_args:", unknown_args) print() parse_options(["kcalc"]) """ input options: ['kcalc'] args: Namespace(list_installed=False) unknown_args: ['kcalc'] """ parse_options(["kcalc&q

Is it possible that the assertion can fail with memory_order::relaxed to transfer pointers?

26 November 2025 @ 9:51 am

Consider this example: #include <iostream> #include <atomic> #include <thread> #include <cassert> int main(){ std::atomic<int> val = 1; std::atomic<std::atomic<int>*> ptr; auto t1 = std::thread([&](){ auto v = val.load(std::memory_order::relaxed); while(true){ if(v==-1){ v = val.load(std::memory_order::relaxed); continue; } if(val.compare_exchange_strong(v,v+1,std::memory_order::acquire,std::memory_order::relaxed)==true){ break; } } ptr.store(&val,std::memory_order::relaxed); // #1 }); auto t2 = std::thread([&ptr](){ std::atomic<int>* val_ptr = ptr.load(std::memory_order::relaxed); // #2 while(val_ptr==nullptr){ val_ptr = ptr.load(std::memory_order::relaxed); // #3 }

Handling YYYY-MM-DD as UTC

26 November 2025 @ 9:39 am

I use this package and my function is this: const formatDate = ( date: string | Date, dateFormat: string = 'PP p', timezone?: string, ) => { const zoneDate = toZonedTime(date, timezone ?? 'UTC') console.log(zoneDate) return format(zoneDate, dateFormat, { locale: getDateLocale() }) date is coming from the database and in the database we store everything in UTC. However, for a birthday, we just store: 2025-11-21. Now, when the timezone in toZonedTime is UTC, this happens: Thu Nov 20 2025 23:00:00 GMT+0100 (CET) The AI said that, without the time/zimezone information on '2025-11-21', toZonedTime treats the 2025-11-21 as being local timezone and then shifts the timezone to UTC, re

How do I make a matplotlib bar graph scale with the amount of items?

26 November 2025 @ 9:17 am

I am working on a small project and it is my first time using matplotlib, and I am struggling with how to make my bar graph look better with more inputs. The whole idea of the program is to read text documents and show the characters from most used to least used. It's a tool I decided to make for myself to help me with designing my split keyboard layout. The problem is the bigger the text document, the worse the bar graph looks. It always seems to be created at the exact same size so everything gets smushed. I have some screenshots of a few of my tests. best case scenario bad case worst case and this is the code that actually makes the graph names = list(sorted_count.keys()) values = list(sorted_count.values())

How to skip debounce on the first keystroke only?

26 November 2025 @ 9:14 am

I have a simple debounce implementation using `useEffect` and `setTimeout` that delays updating a `value` state by 1 seconds after the user stops typing in an input: import { useEffect, useState } from "react"; const useDebounceInput = (input: string): string => { const [value, setvalue] = useState<string>(input); useEffect(() => { const timer = setTimeout(() => { setvalue(input); }, 1000); return () => { clearTimeout(timer); }; }, [input]); return value; }; export default useDebounceInput; This works fine for debouncing, but I want to change the behavior so that: On the very first keystroke (when the input goes from empty → non-empty), setValue(input) should happen immediately (no 1000 ms delay). All subsequent changes should still be debounced by 1 seconds as before.

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

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

Decoding WCAG: “Change of Context” and “Change of Content” 

31 July 2024 @ 4:54 pm

Introduction As was mentioned in an earlier blog post on “Alternative for Time-based Media” and “Media Alternative for Text,” understanding the differences between terms in the Web Content Accessibility Guidelines (WCAG) is essential to understanding the guidelines as a whole. In this post, we will explore two more WCAG terms that are easily confused—change of […]

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.