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.

Two arrays, map or filter and return indexes in a new array

6 January 2026 @ 10:30 pm

I am currently using the following code to return a new array with the map_of_indexes = []; pupils =[1000,1001,1002,1005,1003,1004,1020,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]; subjects = [1000,1001,1002,1015,1004,1005,1011,1014,1005,1003,1008,1020]; for(n=0; n<subjects.length; n++){ new_indexes.push(pupils.indexOf(subjects[n])); }; // Should return 0,1,2,16,5,3,12,15,3,4,9,6; console.log(new_indexes); I am happy this works on a small amount of data but not sure how to best go about it, should I use map or filter? Here is a link to a fiddle of above code

python requests XHR - get response 405

6 January 2026 @ 10:27 pm

Code written in Python on Mac. Url retrived from inspect in google chrome. Trying to fetch information from an XHR but does not succeed. The print at the end gives the response <Response [405]>. I have not added any params now since I am not sure which to add. Need support with understanding how I know which params to include? Can this be read in the inspect+header tab in the browser, and which part is it then I shall look at? Or how can I else find this? Need to understand what I need to do in order to make the code work? import requests url = 'https://web.jmapi.io/residence/search_object' sess = requests.Session() sess.headers.update({'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', "Accept": "application/json, text/plain, /", "Referer": "https://www.jm.se/", 'X-Requested-With': 'XMLHttpRequest', }) res

Vuejs & ts, app-wide settings: as const with satisfies VS abstract class with static readonly properties

6 January 2026 @ 10:18 pm

While I found quite a lot on the topic "enum VS as const", I could not find a satisfying clue to my current design decision: I need a solution for a typed app settings object/class in a Vuejs & ts app, basically to be able to have my IDE auto-complete the available settings options and to avoid literal strings hardcoded in dozens of places. I also want to be able to use env vars from import.meta.env in there. I gathered as much as: ts enums seem to have fallen out of favour because of runtime bloat. So, leaving them aside, which one of the following two solutions would you prefer, considering ease of use / IDE sugar, resilience and process resources (which I don't know a lot about, tbh): export default abstract class AppSetting { static readonly UI_API_HOST: string = import.meta.env.VITE_UI_API_HOST } OR

BFS Method Error when Parsing Through a Flattened Hierarchal Structure in Python

6 January 2026 @ 10:15 pm

So i posted this question earlier but did not match my code to my sample dataset. Below is a sample data structure, but the current data structure is about 18k ids and I will have to send the Ids to a REST API using a POST Command { "1": { "name": "Item 1", "ownedElement": [{"@id": "2"}, {"@id": "3"}] }, "2": { "name": "Item 2", "ownedElement": [] }, "3": { "name": "Item 3", "ownedElement": [{"@id": "4"}, {"@id": "5"}, {"@id": "6"}] },

Godot 4.5: Godotx-Firebase fails to detect google-services.json

6 January 2026 @ 10:15 pm

I'm developing a game in Godot4.5, and need to implement Firebase push notifications using the Godotx-Firebase plugin. However, I'm running into an issue where the plugin fails to read my google-services.json file. I've already configured the file path in Project > Export to both res:// and res://android/build/, but it still won't work. Does anyone know how to properly link this file or fix this initialization error? I am following this steps: https://github.com/godot-x/firebase #FirebaseService.gd extends Node var firebase_core var messaging func _ready() -> void: print("Init firebase service...") # Get all singletons if Engine.has_singleton("GodotxFirebaseCore"): print("Found GodotxFirebaseCore") firebase_core = Engine.get_singleton("GodotxFirebaseCore") firebase_core.core_initialized.connect(_on_core_initi

How do I get a unique ID for a W5500 Pi Pico using Arduino IDE?

6 January 2026 @ 10:09 pm

I have many picos controlling sensors on my network. I want to generate unique MAC addresses for them (using the unique ID) so I can keep them organized in my Postgres database which is controlled by django. Right now everything is built through Arduino IDE. I am trying to generate a HTTP POST with the MAC address and firmware version, but I can't figure out how to properly generate a MAC address without switching up my entire toolchain. I am using Ubuntu 24.04 LTS

What is the chance of losing a redis pub/sub message?

6 January 2026 @ 10:07 pm

I understand that message loss in Redis Pub/Sub is possible and is considered normal behavior. The probability is low, but not zero. What I’m trying to understand is how often this can realistically happen in practice. For example, I have two servers: server A publishes a message instructing server B to refresh data from the database. Under typical production conditions, what is the practical likelihood that such a Pub/Sub message will be lost? Which factors most strongly influence this probability (network issues, client disconnects, Redis restart, slow subscribers, etc.)? Thank You!

Is there a way to have a global variable in elixir

6 January 2026 @ 10:02 pm

I have this way to compare user accounts, to help prevent duplicates. When I do the compare I pass in the two accounts, and the function returns 0 -> 1.0 where 1.0 is a perfect match. There is however an edge case where even if the data isn't a perfect match, a "global_id" exists on both new and old account, that is identical. This subverts the compare, and just tells me the data is identical. What I would do in c/c++ is create a const, and have the compare return that. GLOBAL_ID_MATCH, in ruby I'd have a class value. @GLOBAL_ID_MATCH, and then test against that in the consuming code.. I know you can create a module global, but how do you access the value outside that module? @global_id_match 10000 But there doesn't seem to be a way to use that variable/const outside the module.

How to get approver email addresses for Power Automate approval reminders?

6 January 2026 @ 9:59 pm

I am building a Power Automate flow creates an approval when a SharePoint form is submitted. I would like to implement a reminder email that gets sent out to any approvers who have yet to respond after an interval. Flow I added an action to create an approval, then created a parallel branch which: 1.) Waits for a set interval (Delay action) 2.) Gets the row from the Approvals table with the Approval ID from the previously-made approval. Approvals 3.) A Condition checks the Approvals table to see if the approval's Stage is not equal to 'Completed'. Condition 4.) If the approval is not completed, then another action gets rows from the Approval Requests table that have the Approval ID of the previously-made ap

Cannot find Syn3tasks when running hello world in Syn3

6 January 2026 @ 9:57 pm

my code: import Syn3tasks as s s.PRINT("Hello, World!") Error: Syn3Runner:out: (V): Syn3Runner™ All Rights Reserved. (V): Running... ERR "Cannot find "Syn3tasks, Is it not imported or not defined?"

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.