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.

Getting Input without Blocking Mode in C

7 December 2025 @ 6:34 pm

I was assigned a homework 3 weeks ago, and I presented it two weeks ago.The homeworks was that making an embedded project working linux environment by abstracting some functions, like: int uartRead(void *char, int len) { int result = write(1, data, size); return result; } int uartRead(void *data, ssize_t size) { int result = read(0, data, size); return result; } The project gets some prompts from user, and making operations according to the input, like configuring sensor, turning-on/off sensors, etc. In my project, since I am using read function like below: while (1) { // something uartRead(prompt, 15); // something } my project is working in blocking mode. I was asked, however, how to do that even print out sensor measurements periodically even if user doesnt prompt any input. I proposed thread-way, one thread expecting input while the other handles outputting. I am however wond

How to make a video post with Facebook Graph API

7 December 2025 @ 6:32 pm

I am finding the documentations super confusing and all the paths lead to various errors. What I've tried, Path 1: Upload video using the ${page_id}/videos edge and pass the received Id to POST:${page_id}/feed This results in an auth error. And after some research I came to understand that /feed dosen't accept video files Path 2: Resumable API: Upload using https://developers.facebook.com/docs/video-api/guides/publishing#resumable-upload. This ends with an error in video_status. But this same file can be posted to FB directly, and to IG as reels (file has mimetype video/mp4) { "status": { "video_status": "error", "uploading_phase": { "status": "complete", "bytes

set PUPPETEER_SKIP_DOWNLOAD env variable but still

7 December 2025 @ 6:31 pm

try to install a node project in a mac, but keep getting a puppteer installation error. I don't know why the installation fails, simply I just want to skip the installation node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/puppeteer: Running postinstall script, failed in 1.1s .../node_modules/puppeteer postinstall$ node install.mjs │ Error: ERROR: Failed to set up chrome-headless-shell v127.0.6533.88! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download. │ at file:///Users/cc/Downloads/cua/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/puppeteer/lib/esm/puppeteer/node/install.js:84:27 │ at process.processTicksAndRejections (node:internal/process/task_queues:105:5) │ at async Promise.all (index 1) │ at async downloadBrowser (file:///Users/cc/Downloads/cua/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/puppeteer/lib/esm/p

Troubleshooting: A single regular expression matching nested braces usable for java and perl

7 December 2025 @ 6:24 pm

I have a regular expression in an extension of java by florian ingerl to parse a latex command, \\\\DocumentMetadata(?<docMetadata>\\{(?:[^{}]|(?'docMetadata'))*\\}) but the important thing is that it allows nested braces. The concrete string to be matched is \DocumentMetadata{pdfversion=1,7,pdfstandard={a-3b,UA-1}} but earlier or later time comes where deeper nesting is required. To that end, I use the extension com.florianingerl.util.regex.MatchResult of the builtin java regular expressions. Now I want to use latexmk for latex which is in Perl and need to adapt .latemkrc which is just Perl code. So i need the same regular expression or at least something similar i can automatically transform. Up to now each expression worked in both worlds. But this one does not match in Perl. Maybe there is some extension whi

Why am I seeing a performance hit in a kind k8s cluster with port forwarding to a simple web worker?

7 December 2025 @ 6:22 pm

I'm trying to determine why there is a performance difference between an application serving requests from within a kind k8s cluster versus the application just running on the local host. When I run a load test of the application on the local host, I see exactly the type of result I expect. But when I run the same application in the cluster I consistently see dropped requests. Why am I seeing a performance hit in a kind k8s cluster with port forwarding to a simple web worker? And as a bonus, what could I do to improve the situation? Setup Commands I use to provision the kind cluster and deployment: $ kind create cluster --config kind-multi-node.yaml $ kind load docker-image myapp:v0.0.1 $ kubectl create deployment myapp --image=myapp:v0.0.1 $ kubectl expose deployment myapp --type=LoadBalancer --port=8000 $ cat kind-multi-node.yaml kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - role: worker - role: worker

How to play a pitched sound n times?

7 December 2025 @ 6:10 pm

I'm making a game and am using WebAudio API for audio. I want to play a given sound exactly n times, with a different pitch than normal. As long as I don't change the pitch, i.e. keep playbackRate = 1.0, everything is working fine. However, with a different pitch, be it lower/slower (<1) or higher/faster (>1), I'm facing a different behavior between browser, Firefox against all others. With Firefox, it works like I want. Regardless of the pitch, the sound is always played exactly as many times as wanted. With other browsers (Chrome/Safari/Edge), the sound is cut in the middle, and isn't played the wanted number of times. If the pitch is higher, it is played more times than desired, and with lower pitch, it's played less times. The problem is the interpretation of the third parameter of AudioBufferSource.start(), the duration the source has to be played. Firefox takes the playbackRate into account and adjust the real duration according

How to answer to an SMB DeviceIOControl request?

7 December 2025 @ 6:09 pm

I am implementing an SMB server in c# using https://github.com/TalAloni/SMBLibrary Now when I try to open the share using Samba client, it tries to negotiate the protocol details. Problem is, the DeviceIOControl function is extremely generic and it's hard to find the specific data format for your actual problem. Samba client sends: DeviceIOControl(handle=(null), ctlCode=0x140204(devicetype=14, accessmode=0, function=81),inputLength=28, maxOutputLength=24) StructSize=0, DialectCount=0, ClientSecMode=0xBE4D, ClientCaps=0x48F4C728, ClientGuid=..., Dialects=[] this ctlCode is probably called FSCTL_VALIDATE_NEGOTIATE_INFO What does this data actually mean and how do I answer to it? The AI gave me this structure for output, but it's bigger than what samba client provided for return, so it breaks. 0 2 StructureSize 2

nswag generates 200 instead of 201

7 December 2025 @ 6:04 pm

I have a .NET 10 API, part of this API looks like this: "/api/Users": { "post": { "tags": [ "Users" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CreateUserDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CreateUserDto" } } }, "required": true }, "responses": { "201": {

Web form repeatedly resubmits itself after submission by Apple users

7 December 2025 @ 5:41 pm

I have a .php file on the web which contains an html form. That form (in case it's relevant) calls the original .php file when a user presses "Submit". That is, the file is called newform.php and the form within that file looks like this: <form method=POST action="newform.php" id="trythis"> ... <input type="submit" value="Submit"></p> </form> Mostly, this works fine. Occasionally, though, a user will leave the browser window open after submitting the form, which then re-submits itself anywhere from a few times a day to a few times a week until that window gets closed (so I get several duplicate submissions from the same user). I have enough data to be sure of these things: This is not caused by users repeatedly hitting the submit button. It is also not caused by users refreshing the page. In many cases, the users are not

Understanding error handling with Promise and async functions

7 December 2025 @ 5:38 pm

The code below has a bug I can't understand. I have 2 implementations of consumer. The first one (consumer) works fine when the callback Promise is rejected, and the error is caught by the outer main catch. On the other hand consumer2 throw an unhandled exception UNLESS the following catch is added in the for each loop p.catch(err=>'this catch is needed with consumer2 to avoid unhandled error propagating to main thread') What's the difference between consumer and consumer2 here? I thought I could remove the Promise wrapper because async automatically returns a Promise and rejects it when an error is thrown. Plus I thought that the promise in the promises array fetched by consumer gets handled in try catch statement. async function mapAsync(iterable, concurrency, cb) { let promisees = [] let consumers = [] let results = Array(iterable.length) if (concurrency > iterable.length) concurrency = iterable.length asy

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

ThemeForest.net

VN:F [1.9.22_1171]
Rating: 7.0/10 (2 votes cast)

WordPress Themes, HTML Templates.

Interface.eyecon.ro

VN:F [1.9.22_1171]
Rating: 6.0/10 (1 vote cast)

Interface elements for jQuery
Interface.eyecon.ro

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.