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.

FastAPI BackgroundTasks vs Celery: how to reliably run work after the response is returned?

6 February 2026 @ 1:23 am

I’m building a small API with FastAPI. When a request comes in, I want to trigger a heavy/long-running task (e.g., file processing, sending emails, calling an external API, DB post-processing) without blocking the response. I started with BackgroundTasks, like this: from fastapi import FastAPI, BackgroundTasks app = FastAPI() def do_heavy_job(user_id: int): # time-consuming work (e.g., send email, process file, call external API) ... @app.post("/start") def start_job(user_id: int, background_tasks: BackgroundTasks): background_tasks.add_task(do_heavy_job, user_id) return {"status": "accepted"} But I’m worried about reliability in production (missed tasks, restarts, multiple workers, etc.). My questions: Is BackgroundTasks reliable when running behind Uvicorn/Gunicorn with multiple workers?

if statement ignoring it's condition in C?

6 February 2026 @ 12:55 am

Trying to do a complex programming exercise in C (it includes lots of auxiliary functions, and it's a bit intimidating), I ran into a problem like this: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> typedef struct{ char matricula[TAM_MATRICULA]; char marca[TEXTO_CURTO]; char modelo[TEXTO_CURTO]; int anoRegisto; int tipo; int totalKms; } tipoVeiculo; void listarVeiculosMarca(tipoVeiculo vetorVeiculos[MAX_VEICULOS], int quantVeiculos) { int i; char check[TEXTO_CURTO]; printf("Insire a marca a procurar:"); lerString(check, TEXTO_CURTO); converteMaiuscula(check); if (quantVeiculos > 0) { printf("\n\n*********** LISTAGEM dos VEICULOS da MARCA: ***********\n\n"); for (i=0; i < quantVeiculos; i++) { if(procurarVeiculoMarca(vetorVeiculos, quantVeiculos, check) != -1){ escreverVeiculo(vetorVei

Does Chrome (or any other browser) upload INPUT TYPE="FILE" multiple files in parallel with HTTP 2

6 February 2026 @ 12:50 am

According to a comment in response to List is null for large files. Reproducible at will : - Yes... the actual spec: datatracker.ietf.org/doc/html/rfc7578 - when a request is using multipart/form-data it's a serialization-by-concatenation, i.e. everything arrives in-sequence. There's no interleaving, chunking, or overlapping of the data here - nor are there any concurrent requests. Now, ASP.NET Core's FormFile binder will buffer-to-memory/disk each file as it comes in, but IIRC there's no guarantee that your Controller Action will be entered-into after all uploaded files have been buffered-away. – Dai CommentedDec 12, 2025 at 7:23 But since HTTP2, opinions coalesce around "modern browsers like Chrome, Firefox, and Edge can upload multiple files using INPUT TYPE="FILE" with the multiple attribute in parallel wit

TypeORMError: Entity metadata for p#writer was not found (NextJS 16)

6 February 2026 @ 12:38 am

I am trying to use TypeORM with nextjs and postgress, everything works fine on dev server but then when I deploy to vercel or run pnpm build && pnpm dev, get errors like this below TypeORMError: Entity metadata for p#writer was not found. Check if you specified a correct entity object and if it's connected in the connection options. at ignore-listed frames EntityMetadataNotFoundError: No metadata for "p" was found. at d (.next/server/chunks/[root-of-the-server]__f4088f86._.js:1:12146) at async c (.next/server/chunks/[root-of-the-server]__f4088f86._.js:1:16462) at async p (.next/server/chunks/[root-of-the-server]__f4088f86._.js:1:17503) This is where I connect to the DB, all entities are exported in the index.ts of the entities directory import "reflect-metadata"; import { DataSource } from "typeorm"; import { Series, Story, User, Earning, Paym

Clasp login says "You are logged in as an unknown user"

6 February 2026 @ 12:20 am

When I log in using clasp login --use-project-scopes --creds creds_file.json, I get brought to the Google sign-in screen. I select my account and successfully log in. But then I get the message "You are logged in as an unknown user". When I try clasp push I get "Insufficient Permission" This was working last week. But now it doesn't work on two different computers. I'm not sure what changed. I'm an admin in the Google Workspace.

Why is callback reference not observed in useEffect

6 February 2026 @ 12:19 am

How do I render a div in a component conditionally based on a component property and the get a reference to that div when it's available? In this simplified example, the message displayed in the div varies depending on which button is pressed first. I understand why I see div.current is truthy when pressing the second button first. I don't understand why useEffect doesn't observe the change of the div loading upon the change of showHere. const Message = ({ showHere }) => { const divRef = useRef(null); useEffect(() => { if (divRef.current) { divRef.current.innerHTML = "div.current is truthy"; } }, [divRef, divRef.current]); return <>{showHere ? <div ref={divRef}>no message</div> : ""}</>; }; export default function App() { const [showInsideApp, setShowInsideApp] = useState(false); const [showInsideComponent, setSh

How to sum a total number of items sorted by different categories in Google Sheets?

6 February 2026 @ 12:12 am

Having trouble coming up with a correct formula in Google Sheets. I would like to calculate the total number of items in each category without having to manually input the specific cells to count up. For example, the total number of apples would be 13. How can I do this? Name Alice Bob Cheryl David Favorite Fruit Banana Cherry Apple Apple Number of Fruits Owned 19 33 6 7 Total Fruits Apple Banana Cherry

Using marginaleffects package to obtain marginal effects on multinomial model from nnet's multinom() function

5 February 2026 @ 11:29 pm

I have a multinomial model and am trying to estimate marginal effects for my model predictors, i.e., "how does the probability of choosing option C over A change when X increases 1 unit, or when Z is either group 1 or 2." My question is first, if there's a best way to do this using the marginaleffects package on a multinom() object, and is it perhaps just with the avg_slopes() function? I'm wondering this because the case example on the marginaleffects website doesn't use avg_slopes() which I thought would have been easiest. That makes me hesitant to trust my avg_slopes() blindly hence my question. It also uses mlogit() which I don't use so maybe that's why? I'm also a bit new to the marginaleffects package so maybe I'm probably missing something key. Another layer of confusion though is that, I saw from

Using advisory locks to coordinate database activity

5 February 2026 @ 10:06 pm

I have several different jobs that can run throughout the day to read data from various sources and update my database. I want to ensure that two jobs are not trying to update the database at once. To achieve that end, I am using Postgres session-level advisory locks. When a job starts up it creates a session and tries to acquire a session-level lock. If it cannot acquire the lock (because another job is holding that lock), it exits. That code looks roughly like this: with sessionmaker(engine)() as session: result = session.execute( select(func.pg_try_advisory_lock("SOME_KEY")) ) success = next(result)[0] if not success: sys.exit(1) # at this point we have acquired the lock # do the work In the process of testing and development, I discovered that once the lock is acquired, calling session.commit() will also release the advisory lock, which I don't want. To get a

How do I write an accessible description for a chart with data fed by a database?

5 February 2026 @ 8:43 pm

I am trying to make a website that uses lots of charts and graphs accessible. I read that each chart or graph needs to have a description that describes the data it shows. My problem is this... how? When the data comes from a database, I can't very well write a description that says something like "A line chart of revenue that shows instore sales trending up while online sales are decreasing" because I won't know if that is what it will show or not and it will obviously depend on whatever parameters were used to generate the chart. What do I really need to do to comply with accessibility standards when it comes to chart and graph descriptions?

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

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

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

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.