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.

Having problem when using parameter as conditional

31 May 2026 @ 10:59 am

I am having problem with a parameter being used as a conditional. It gives me a bit width mismatch, regardless of the DW value being used in the calling routine (either 16'hxxx or 32'hxxx). I thought DW is a read-only parameter and will be processed at elaborate time. I am not sure what I am missing. I know generate is an alternative, but this example is taken from a rather lengthy code (>1,000 lines of Verilog). I am using: Test #(DW) Test ( .Clock (Clock), .Reset (Reset), .Data (Data) ); module Test #(parameter DW = 1) ( input wire Clock, input wire Reset, output reg [DW-1: 0] Data ); always @(posedge Clock) begin if (DW == 16) Data = 16'h0

SUBDIRS and dependencies in makefiles

31 May 2026 @ 8:59 am

I've got a project with directories theme-d-intr, theme-d-intr/base, and theme-d-intr/dbus. File theme-d-intr/Makefile.am consists only of line SUBDIRS = base dbus. Some files in dbus depend on the files generated to base during the build. If I make a parallel build of the code is it possible that the files in dbus are built before the necessary files in base are built? ChatGPT claimed that this is so and suggested the following fixes: Add the following lines to base/Makefile.am: BASE_OUTPUTS = \ $(nodist_gintrlib_DATA) \ $(nodist_linkedlib_DATA) base.stamp: $(BASE_OUTPUTS) @touch $@ and the following line to dbus/Makefile.am: dbus_DEPENDENCIES = ../base/base.stamp Variables nodist_gintrlib_DATA and nodist_linkedlib_DATA in base/Mak

Error sending HTML form data with JavaScript front end through Flask backend to MySQL database

31 May 2026 @ 5:50 am

I get the error "400 (BAD REQUEST)" in the browser (dev tools) console when trying to send HTML form data with JS frontend to MySQL database through a flask back end. HTML form: <form id="form" method="POST"> <label> Date ID </label> <input type="text" id="dateID" name="dateID"> <br> <label> Day of the Week </label> <input type="text" id="week_day" name="week_day"> <br> <label> Day </label> <input type="date" id="day" name="day"> <br> <label> Rate </label> <input type="text" id="rate" name="rate"> <br> <input type="submit"> </form>

How can I avoid using LLMs as a software developer?

29 May 2026 @ 9:39 pm

Introduction I've been developing software very successfully for many years. The reason I have chosen this profession is multifold: I'm a creative person and I need to create things I have an insatiable drive to think Financial compensation one may expect for doing this I can do my thing without constantly socializing with superficial small-talk The drive to solve real-world problems and to be a force for the better To work from home It has been a great ride to do this and I achieved quite a lot of things. Yet, the industry gradually deteriorated. I do know that sometimes libraries and APIs are needed, but I witnessed too many times the drive to use some library only to solve some problem we could have otherwise easily solved, which to me meant that the specific decision was "going with the vibes" rather than a rational choice. Sure thing, there

Can I use the LLVM linker (or related tool) to embed the data from a file into an object file?

29 May 2026 @ 7:09 pm

Using the GNU linker, it is possible to embed the contents of a file into an object file (and eventually, an executable). For example, suppose my input is foo.bin and I want an object file named bar.o; I would write: ld --format binary --relocatable -o bar.o foo.bin (discussed in more detail in this question). Is it possible to do this with the LLVM linker? Or a related LLVM tool? If so, how? And if not - is that a real deficiency, or is it just that GNU ld is very "flexible" in what it's willing to do for you? Note: I'm mainly concerned with GNU/Linux systems, where the executable format is ELF.

Return Json in a web api application

28 May 2026 @ 8:50 pm

I'm using ASP.NET Core Web API which is returning an object including a list. From Postman's results, the list does not get returned. Here is my code: [HttpGet] public IActionResult GetNested() { var rv = new RuleViewDTO { Id = 3, Pth = "", Ttl = "ere", Lvl = 1, Sev = "", ErrMsg = "", Formulas = {new ViewParam //this list is missing from Postman. { RId = 3, Opd = "", Opr = "", Idx =1, RRId = 2 } } }; var aq = new JsonResult(rv); // debug sees RuleViewDTO in full, including Formulas -- one item // return Ok(rv); return aq; // same here.breakpoint sees RuleViewDTO and Formulas with one list item } Here are the classes: public class RuleViewDTO {

How do I do microcontroller programming nicely?

27 February 2026 @ 5:36 am

One person asked me to help with a program for their hobby device on ATTiny2313 which interfaces with PS2 keyboard. A device has been designed around specific microcontroller, Arduino won't fit. I have been programming on C# for more than 5 years but I have education in IT, and C feels plain simple. That person uses Gromov programmer scheme which feels outdated and unsafe in 2026. Should I purchase special board for programming and debugging ATTiny2313? I have explored programmer boards available on internet - they have USB on one side and some black connector on other side. Should I somehow solder wires to contacts of ATTiny2313 and attach them to that connector? Is there some safe plug-like connector so I won't have to solder wires to contacts of microcontroller, but instead put microcontroller in that connector and solder wires to that connector? I have downloaded Microchip Studio for that purpose. Do I use gcc compiler or other option?

Adding a inverse relationship to already existing One-To-Many

26 September 2024 @ 10:36 am

My problem is: I already have a One-To-Many relationship. I just didn't implement the reverse property in the Many part, bc I didn't need it at the time. Now I do and here comes the problems. Those are my two schemas and the respecting models in it (The names are placeholder bc I can't share the real entity names and so on): actor SchemaV1_0_0: VersionedSchema { static let versionIdentifier = Schema.Version(1, 1, 0) static var models: [any PersistentModel.Type] { [EntityA.self, EntityB.self, SubEntityC.self, User.self] } } actor SchemaV1_1_0: VersionedSchema { static let versionIdentifier = Schema.Version(1, 1, 0) static var models: [any PersistentModel.Type] { [EntityA.self, EntityB.self, SubEntityC.self, User.self] } } extension SchemaV1_0_0 { @Model class EntityA: Hashable { let uuid: UUID = UUID() var start: EntityB? var end: EntityB? @Relation

Firebase and Stripe integration - Stripe doesn't show my metadata on invoice.paid()

1 August 2024 @ 4:20 pm

I am trying to integrate stripe on my SaaS. I have been stuck for the last 3 days trying to send unique userID metadata to stripe. my UUID doesn't show on invoice.paid() hence i can't tell which unique user has made the payment. const db = admin.firestore(); module.exports = async (req, res) => { if (req.method === 'POST') { const { userId, priceId } = req.body; try { console.log('Creating session for Firebase UID:', userId); // Fetch the user from Firestore const userDoc = await db.collection('users').doc(userId).get(); if (!userDoc.exists) { return res.status(404).json({ error: 'User not found' }); } const userData = { uid: userDoc.id, ...userDoc.data() }; // Create a checkout session const session = await stripe.checkout.sessions.create({ payment_method_types: ['card'], line_items: [{ price: priceId, quantity: 1 }], mode: 'subscription', success_url: `${req.hea

Building a tree structure from a flat array

7 June 2024 @ 7:46 pm

I have an array of objects. Each contains a "lv" property, which is an integer >= 0. [ {lv: 0, name: "A"}, {lv: 1, name: "B"}, {lv: 1, name: "C"}, {lv: 2, name: "D"}, {lv: 3, name: "E"}, {lv: 1, name: "F"}, {lv: 0, name: "G"}, ] This is exported from an old software and represents a tree structure: "lv" represents how deep the node is, and its place in the tree is always relative to the previous node in the array. So the first object (A) is level 0 (root); B is level 1, and therefore a child of the previous level 0 entry (A); C is also level 1, and therefore a sibling of B (and also a child of A); and so on. The resulting structure looks like this: ├ A │ ├ B │ ├ C │ │ └ D │ │ └ E │ └ F └ G I want to write a function to transform this flat array into a structure that would more closely

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.