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.

Private class variables + abstract classes?

2 January 2026 @ 3:56 pm

How do I overwrite a variable of a base class inside its abstraction? Here I have a class: #pragma once namespace BBT { class ObjectFeature { private: const char * name = "OBJFTR_DEFAULT"; public: const char * getName(); }; } Then I have a class that does classname : BBT::ObjectFeature, how do I make that overwrite the name variable? I would also like a good general explanation on the : character in class names, and if it's even called an abstract class.

How to correctly call a php function when script terminates, even from an error?

2 January 2026 @ 3:53 pm

I've already read several possible SO duplicates such as this and particularly this where hipertrtacker says register_shutdown_function can catch fatal errors and Peter Mortensen showed code very similar to my own. Can somebody please help explain why the following stripped down code is not calling my shutdown() function when it terminates? Have I made an unintentional coding error somewhere? (Note: The actual shutdown() function in the real script logs debug_backtrace() and other stuff to find out where I got to when I get a server timeout error) I'm deliberately setting timeout to 1s, then looping until the script terminates due to a timeout error. <?php function shutdown() { error_log("\r\n" . '

How to consume messages routed from rabbitmq mqtt plugin through rabbitmq streams

2 January 2026 @ 3:46 pm

Goal: Implement fanout pattern for mqtt messages using rabbitmq. IoT data -> mqtt exchange -> RabbitMq stream -> multiple consumers RabbitMq fanout pattern - publisher would be mqtt RabbitMQ running locally like this (5552 is for stream, 1883 for mqtt): docker run -it --rm --name rabbitmq -p 5552:5552 -p 15672:15672 -p 5672:5672 -p 1883:1883 \ -e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS='-rabbitmq_stream advertised_host localhost' \ rabbitmq:4-management docker exec rabbitmq rabbitmq-plugins enable rabbitmq_stream rabbitmq_stream_management docker exec rabbitmq rabbitmq-plugins enable rabbitmq_mqtt I publish & verify I can consume mqtt data like this: # publish ❯ mosquitto_pub -h localhost -p 1883 -t test_mqtt -m "Hello, MQTT" -u guest -P guest # subscribe �

How do I ensure that we are only logging OpenTelemetry traces if there is a span with an error somewhere in the trace?

2 January 2026 @ 3:44 pm

I am in the process of trying to implement OpenTelemetry in a React web application. I am wondering if there is a way to export a trace to the collector only when there is an error somewhere in the stack. I am using XMLHttpRequestInstrumentation and UserInteractionInstrumentation but the user interaction instrumentation is way too noisy and I would like to collect it only when the trace's span collection includes at least one entry where span's status code is set to ERROR. Is there a way to filter the traces before they are sent to the collector? (I am using BatchSpanProcessor).

How to round very big float number into x numbers after decimal point in Scheme?

2 January 2026 @ 3:43 pm

I have a Scheme interpreter written in JavaScript called LIPS. And a recent version of Node changed the precision of the floating-point numbers by one digit (Node 24, because of V8 change). So (expt 0.5 -1/2) now returns 1.4142135623730951 instead of 1.414213562373095. But unit tests use the 1.414213562373095 constant to compare the output of the expression. I've resolved the issue by using rounding like this: (define (round-number x . rest) "(round-number x) Rounds float numbers to a given numbers of digits after decimal point. This fixes an aissue with V8 in Node 24 which increased precision." (let ((precision (if (null? rest) 10 (car rest)))) (if (number? x) (cond ((string=? x.__type__ "float") (round-fixed x precision)) ((and (strin

How to decrease memory use during vite/pnpm build?

2 January 2026 @ 3:41 pm

I am running a build for a large project using pnpm and Vite, but it keeps failing with out of memory errors. I have already tried increasing the Node memory limit significantly (to ~12GB), but it still crashes: NODE_OPTIONS="--max-old-space-size=12288" pnpm build I've also tried stripping my vite.config.js down to the bare minimum to rule out plugin issues. But FYI I cannot disable sourcemap generation (i.e. setting sourcemap: false is not an option as I need them for debugging). Are there other specific Vite configurations, Rollup options, or pnpm strategies I can use to decrease the memory footprint during the build?

SVG icon gets clipped from the top when used inside a circular container

2 January 2026 @ 3:38 pm

enter image description hereI am a beginner and currently working on a website clone. I am facing an issue where an SVG icon is getting clipped from the top when it is displayed inside a circular container. I tried multiple CSS approaches such as centering with flexbox, adjusting margins, and changing overflow settings, but the problem still persists. The icon is centered correctly, but a small portion of the SVG is still cut off from the top. Here is the relevant HTML and CSS: HTML <div class="sec-fi-facecard"> <div class="sec-fi-card"><a href="#">Financial</a></div> <div class="sec-fi-card-main"><p>Connect with customers proactively to deliver AI-powered, high-value experiences.</p></div> <div class="sec-fi-

I have 3 different account types in a Django project. Should I use 1 or 3 apps?

2 January 2026 @ 3:30 pm

I'm new to Django. I've been making a project with 3 types of accounts: Schools, professors and users. But I feel like some things would be too "repetitive" like some model fields and views the views. I thought that having 3 apps would be too much, so I decided to delete them and create a single app as "accounts" where I manage schools, professors and users as 3 separate classes in models.py. Is this a good option? I'm kind of not sure

C program gets stuck while executing

2 January 2026 @ 3:23 pm

I have a c program and I'm using meson+ninja to build it project('NESt', 'c') source_files=files('src/main.c', 'src/App.h', 'src/App.c', 'src/Emulator.h', 'src/Emulator.c', 'src/Mapper.h', 'src/Mapper.c', 'src/CPU.h', 'src/CPU.c', 'src/MMU.h', 'src/MMU.c' ) executable('NESt', source_files, dependencies: dependency('sdl2')) the problem start here, as soon as i add the MMU.h and .c to the project, it compiles normally but gets stuck as soon as I execute it with a single line on terminal: Failed to truncate cookie file: Invalid argument the terminal freezes and ctrl+c doesn't work, all i can do it close the terminal instance and open another one. I restarted the laptop as well but it was still there I'm on linux mint MMU.h #include<stdint.h> typedef struct { //either we can have 64kb virtual mem or in my case original 2kb memory uint8_t memory[2*1024]; } MMU; v

TinyPy Batch Script Change Save Location

2 January 2026 @ 2:31 pm

Working script, but I need to change the output location to a different folder, and I want to use the same filename that is being loaded like in this one, but without the ".edit.mp4" ext="mp4" inputFolder="c:\\tmp\\" # def convert(filein): if(0 == adm.loadVideo(filein)): ui.displayError("oops","cannot load "+filein) raise adm.videoCodec("Copy") adm.audioClearTracks() adm.setSourceTrackLanguage(0,"und") if adm.audioTotalTracksCount() <= 0: raise("Cannot add audio track 0, total tracks: " + str(adm.audioTotalTracksCount())) adm.audioAddTrack(0) adm.audioCodec(0, "Lame") adm.audioSetDrc(0, 1) adm.audioSetShift(0, 0, 0) adm.audioSetNormalize2(0, 2, 150, -30) adm.setContainer("MP4", "muxerType=0", "optimize=1", "forceAspectRatio=False", "aspectRatio=1", "d

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.