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 do I troubleshoot the error: "__env__.fill is not a function" in ProcessingJS

1 January 2026 @ 1:04 am

I am stuck on this error when making a platformer 2 player: __env__.fill is not a function I simply added 1 after each instance of the word player. I was going to then duplicate them and add 2 at the end instead of 1. Then I was going to change player 2's color to red. Next, I was going to change the player 2 controls from šŸ‘†šŸæšŸ‘ˆšŸæšŸ‘‡šŸæšŸ‘‰šŸæ to wasd Then I was going to test it out. The following is the code: frameRate(34); var keys = {}; var rectRect = function(x1,y1,w1,h1,x2,y2,w2,h2){ return(x1 + w1 > x2 && y1 + h1 > y2 && x1 < x2 + w2 && y1 < y2 + h2); }; var Player = function(x,y){ this.x = x; this.y = y; this.w = 20; this.h = 20; this.xv = 35; this.yv = 0; this.grav = 0.6; this.canJump

PHP Variable Naming

1 January 2026 @ 12:32 am

If I have several variables that are only differentiated by a numerical value within the variable name, is there a way to make the numerical value a variable itself and then pass that value to another variable? Not the best explanation, so let me try with an example: <?php $_tbl = 2; $tbl_Fld_type = $tbl{$_tbl}Fld_type; // to make the updated variable $tbl2Fld_type $tbl_FormTypes = $tbl{$_tbl}FormTypes; // to make the updated variable $tbl2FormTypes If there is a way to do it, I can't think of it. I'm also not sure it can even be done. Something along the lines of a variable variable; at least that's my basis for wondering if it was possible.

C++ std::span overload resolution

31 December 2025 @ 11:10 pm

I want to pass a C-style array to a function taking a std::span, but overload resolution chooses to convert the array to bool instead. Is this behavior required by the standard, or is it a compiler issue? (I tried several compilers, and they all do the same thing. https://godbolt.org/z/8rxTWPd3K) When TEST is defined as 0, so the second overload is not defined, the array is converted to std::span as I expected, so clearly that is a good match. If the conversion to std::span isn't better than the conversion to bool, I would have expected it to be ambiguous, rather than choosing the wrong one. It is easy to change the call to workaround the problem, but since there is no warning, it isn't obvious to the person writing the call what the problem is, or how to fix it. Is there a way to change the function definition, or

Do compatible types have the same representation?

31 December 2025 @ 9:56 pm

Furthermore, is the sizeof guaranteed to be the same on compatible types? I expect the answer to both of these questions is likely "yes" in practice, but I don't see anything in the standard (in particular, the C17 standard) that definitively establishes this. The following snippets from the C17 standard seems to support this interpretation, but not definitively: 6.2.7/2: All declarations that refer to the same object or function shall have compatible type [...] 6.5.3.4/2: The sizeof operator yields the size (in bytes) of its operand [...] The size is determined from the type of the operand. It is not clear to me however that two declarations of the same object couldn't have two different (but compatible) types and therefore different sizes. Edit: To be clear, I'm talking about complete types. For incomplete types, I don't believe it is se

How to do a http request for user details everytime the userID signal value changes?

31 December 2025 @ 9:00 pm

I'm just getting used to performing http requests with signals in Angular 20. I'd like a http get request to be executed everytime the profileUserID signal value (which I have defined in a user service) is changed. I've started by converting the observable returned from the http request to a signal with toSignal as follows: userByID = toSignal(this.http.get<User>(`myapi/user/${this.profileUserID()`}), { initialValue: {} }); This does successfully do the http request with the initial value for the profileUserID signal (which is 1) however I would like it to execute the API call with the new profileUserID when its value changes. Note: The profileUserID signal value is set in the profile component every time there is a change in the userID parameter within the route. user service import { Injectable, inject

R Code to recognize speaker turns in verbatim records with inconsistent formatting

31 December 2025 @ 6:36 pm

I am trying to perform text analysis on large character strings that include multiple different speakers. I need to create a dataframe of 2 columns, speaker and turn, which have the person speaking and the text spoken. I have very long character strings like the below. I chopped up a longer string down by around 50,000 characters, but tried to preserve the diversity of the text: wha_1949_long <- "VERBATIM RECORDS OF THE PLENARY MEETINGS FIRST PLENARY MEETING Monday, 13 June 1949, at 11 a.m. Acting President: Dr. Andrija STAMPAR (Yugoslavia) 1. Opening of Session by the President of the First World Health Assembly The ACTING PRESIDENT : It iS my privilege, as President of the first session of the World Health Assembly, to open its second session. My first thoughts are of gratitude to the Italian Government for having offered to our Assembly the hospitality of this ancient city, which has been not only of great importance in the history

How to avoid implicit conversion in C++ concepts?

31 December 2025 @ 5:05 pm

Is there a way to prevent implicit conversions happening in concepts? For example, this example compiles with GCC and clang when I actually want it to give an error that the char constructor is missing: template<typename T> concept specific_constructors = requires { T(int{}, char{}); T(int{}); T(char{}); }; struct test { test(int a_, char b_): a{a_}, b{b_} {} explicit test(int a_): a{a_}, b{} {} //explicit test(char b_): a{}, b{b_} {} private: int a; char b; }; auto main() -> int { specific_constructors auto const v1 {test{1,'a'}}; } Currently, the things that I've thought of are just wrapping the char in a struct, or using a strong type, but I am looking for any other options available. EDIT: Just for some clarity, the question is how do I write the concept specific_constructors

How to identify correct Spring Cloud Gateway dependencies for a Spring Boot MVC project?

31 December 2025 @ 3:50 pm

I have a Spring Boot MVC project, where I now wish to proxy another webapp running on the same server. I'm fronting with Spring for security and URL consistency reasons. Existing pom.xml was configured with <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.4.2</version> </parent> Config I've added is: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway-mvc</artifactId> </dependency> With AI suggesting I add this to dependencyManagement <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId>

Python packages installation - pandas & nympy

30 December 2025 @ 9:09 pm

I have read close to all posts about this topic now but I can get it working, so sorry if you find this similar to other questions, but I can't just solve it based on existing posts. I find it very hard to install Python with its packages, and remember struggling on my PC a couple of years ago also. I have a macbook. I have installed python. Using PyCharm. I have tried to install a couple of packages, not sure they got installed in the right or wrong folder. So far I have tried (and in some cases been successful) installing requests, torch, wheel, pandas, numpy. All by using pip. I have tried uninstall and install again. Also tried upgrading. Line 8 in the response below is "import pandas as pd" The code in PyCharm gives the following response during execution: File "/Users/name/PycharmProjects/ABCProject/file.py", line 8, in import pandas as pd File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/pandas

BeautifulSoup - Extracting content blocks after specific subheadings within a larger section, ignoring document introduction

29 November 2025 @ 2:53 pm

I am scraping the Dead by Daylight Fandom wiki (specifically TOME pages, e.g., https://deadbydaylight.fandom.com/wiki/Tome_1_-_Awakening) to extract memory logs. The goal is to extract the Memory Title (mw-headline <span>) and its corresponding Memory Body (text contained in subsequent elements like <td>, <p>, etc.) as separate records, while strictly ignoring the main TOME introductory text at the top of the page. The Problem My current script successfully identifies all memory titles, but the function designed to extract the body content often incorrectly includes the general TOME introductory text (the large overview paragraph at the very top of the article) into the body of the first memory log extracted. This results in duplicate, incorrect body text for many subsequent memory records. The core issue is scoping the content extraction cor

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.