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.

How should i reduce the memory usage on the web page while redering streaming data through websockets

6 April 2026 @ 5:43 am

i am using fastapi as backend and react for frontend currently , i'm renderind data which is a stream coming from websockets . and then i'm using visualization in frontend to render certain no.of records to display that data in a table format. if i sroll down or up, the data will be renderd in viewport height in the table. But the problem is , after some point of time(rendering 1GB of data) , i am getting high memory usage in the webpage.But i have render 8GB of data. so can you please help me ,how should i achieve less memory usage, while maintaing my above functionality !? except indexed db and gzip methods! are there any other recomended ways !?

Best practice for validating form error messages across different browsers and environments in automation tests

6 April 2026 @ 5:42 am

I’m working on automating UI tests for form validations, and I’ve noticed that validation messages can differ across browsers (Chrome, Firefox, Safari), as well as between headed and headless modes, and even across environments. For example, native browser validation messages (like required field errors) are not always consistent in wording or format depending on the browser or execution mode. This raises a question about the best approach for automation: Should we strictly verify the exact validation message text? Or is it better to validate the behaviour (e.g., field is marked invalid, submission is blocked, error state is shown)? How do teams usually handle cross-browser inconsistencies in such cases? Is it recommended to avoid native browser validation altogether and rely on custom validation messages? Context: UI automation using tools like Pl

OpenHTMLToPDF custom TTF fonts not applied (NotoSansArabic). It falls back to default font

6 April 2026 @ 5:26 am

I'm generating a PDF using OpenHTMLToPDF (PdfRendererBuilder) in a Spring Boot app, and my custom fonts (ttf) are not being applied. What am I missing for OpenHTMLToPDF to properly apply custom TTF fonts registered via useFont()? I've been struggling a few days on this I'm trying to use NotoSansArabic (Regular + Bold), but the PDF still renders with a fallback font Font files (in resources): assets/fonts/NotoSansArabic-Regular.ttf assets/fonts/NotoSansArabic-Bold.ttf // From the builder class (rest was omitted) val builder = PdfRendererBuilder() .useFastMode() .withHtmlContent(html, null) .toStream(outputStream) builder.useFont( { ClassPathResource("assets/fonts/NotoSansArabic-Regular.ttf").inputStream }, "Noto Sans Arabic", 400, com.openhtmltopdf.outputdevice.helper.BaseRendererBuilder.FontStyle.NORMAL, true ) builder.useFont( { ClassPathResource("assets/fonts/NotoSansArabi

How to safely remap (resize) mmap in Python while other threads are reading?

6 April 2026 @ 5:25 am

I am building segment-based log storage system in python using mmap module in python. I want to prioritize: Zero copy as much as possible Concurrent readers dynamic growth of underlying file Current Approach: class Entry: """ Owned by SegmentMemory class, provides read and write guarantees. """ def __init__(self, meta:SegmentMeta, init_segment_size, segment_size_inc) -> None: self.__mmap: mmap.mmap | None = None self.__file_obj: _io.BufferedRandom | None = None self.__capacity: int|None = None self.__filepath = meta.get_filepath() self.__mutable:bool = meta.is_mutable() self._refcount:AtomicInt = AtomicInt(0) self._lock: threading.Lock = threading.Lock() self.init_segment_size = init_segment_size self.segment_size_inc = segment_size_inc def load(self)

Ai-Assisted automation anomaly detection

6 April 2026 @ 5:22 am

I'm building an ML-based anomaly detection system that compares failed test execution logs against passed test execution logs to automatically find where and why a test failed. The goal is to reduce a 20K+ token log down to a few key anomalies, then pass those to an LLM for root-cause explanation. The problem: model doesn’t understand order and context, so it gets confused and flags normal data as abnormal Data Structure:- STEP START Set device config STEP START Load the configuration file STEP END Load the configuration file STEP START Set the device configuration (API call) ----------- API Request ----------- URL : https://example.com/createopaquedata Method : POST Body : rotuuid=000a...&value=%7B%22info%22%3A+%7B%22version%22... (2000+ chars) ----------------------------------- ----------- API Response ---------- Status : 200 Body : {"result":"OK","uui

Failing to check

6 April 2026 @ 5:13 am

Basically, im trying to make a whitelist where only certain roles can use this command, and it logs a role as being "theirs", I have tried debugging by printing roles and stuff and now It is not even going through the check, like it will print the admin table, but then dosent move onto the check where it adds to the db/sends a message, it does nothing. cogs/roles.py import discord from discord.ext import commands from utils.databases import roles_db from utils.variables import admin class Roles(commands.Cog): def __init__(self, bot): self.bot = bot @commands.hybrid_group() async def custom(self, ctx: commands.Context): return @custom.command(name="register", description="Registers a custom role to a user") async def register(self, ctx: commands.Context, role: discord.Role, member: discord.Member): print(admin) if any(r.id in admin for r in c

I made a kernel module that hooks systemcall but it can't be compiled

6 April 2026 @ 5:03 am

What's the problem? It's not compiling. The content of the code is to replace the function in the systemcall array with the function I created, print out "Hooked! Opening file" in the kernel, and return the original real_open function. *cpu is arm (using raspberry pie). #include <linux/module.h> #include <linux/kernel.h> #include <linux/syscalls.h> #include <linux/kallsyms.h> #include <linux/kprobes.h> asmlinkage long (*real_open)(const char __user *, int, umode_t); asmlinkage long my_open(const char __user *filename, int flags, umode_t mode){ char buf[256]; copy_from_user(buf, filename, 255); printk(KERN_INFO "Hooked! Opening file:%s\n", buf); return real_open(filename, flags, mode); } typedef int (*set_memory_func)(unsigned long addr, int numpages); int enable_write(unsigned long addr, int numpages){ set_memory_func set_rw; struct kprobe kp = {

Key counter in C, how to pause and resume for key logging

6 April 2026 @ 5:03 am

Hi I have written a code for key counting but I don't know how to pause it and resume it, can someone help to modify my code? example like I press F1 then to pause the key counting, then if I press again F1 to resume to key counting how to do it? please help if anyone good in c programming #include <stdio.h> #include <windows.h> #include <winuser.h> HHOOK hook; LPMSG msg; int counter = 0; void Stealth() { HWND Stealth; AllocConsole(); Stealth = FindWindowA("ConsoleWindowClass", NULL); ShowWindow(Stealth,SW_SHOWNORMAL); } LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam){ if (wParam == WM_KEYDOWN) { counter++; printf("Current count: %d\n", counter); } return 0; } int main() { Stealth(); hook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardProc, NULL, 0); if (hook != NULL) puts("All is good") ;

Recommended architecture for ASP.NET backend with JWT auth and Next.js SSR frontend (future mobile/desktop clients)?

6 April 2026 @ 4:36 am

I’m building a system with an ASP.NET backend that uses JWT-based authentication and a Next.js frontend with server-side rendering (SSR). Currently: Backend: ASP.NET (JWT auth) Frontend: Next.js (SSR) In the future, I plan to add: Mobile clients (e.g., React Native or native apps) Desktop clients I’m trying to choose a scalable and maintainable architecture that works well across all these clients. Some specific questions: Is using a Backend-for-Frontend (BFF) pattern recommended in this scenario? How should authentication be handled across SSR (Next.js) and other clients (mobile/desktop)? Should the Next.js app communicate directly with the ASP.NET API, or go through an intermediate layer (BFF)? What are the trade-offs between a single API vs. multiple BFFs for different clients?

Samsung Gallery edit/save leaves video in MediaStore.IS_PENDING=1 state

6 April 2026 @ 3:35 am

I’m encountering an issue where videos edited in Samsung Gallery become permanently inaccessible to third-party apps. Problem After editing a video in Samsung Gallery and tapping “Save” (overwrite): • The video does not appear in the “Videos” tab of any media picker • The video appears in Gallery under “Collections > Camera” • External apps cannot open the file • MediaStore shows IS_PENDING=1 and it never resets Reproduction steps 1. Open Samsung Gallery 2. Select a video from camera roll 3. Edit the video 4. Tap “Save” (overwrite) 5. Open a third-party app and try to access the video Result: • Video missing from “Videos” tab • Visible in Gallery, but cannot be opened externally val projection = arrayOf(MediaStore.Video.Media.IS_PENDING) val cursor = contentResolver.query( MediaStore.Video.Media.EXTERNAL_CONTENT_URI, pr

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

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

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

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.