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.

Purpose of default template arguments on constructors [duplicate]

12 May 2026 @ 12:53 pm

std::optional<T> has a ctor. like this: template <class U = T> constexpr optional(U&& v); Source: C++23 latest draft, cppreference.com, see ctor. #8. What is the purpose of the default value for U? The template parameters of ctors. are always deduced, they cannot be provided explicitly at the call site.

Is putting new items in C++ `std::map` during a `std::for_each` that traverses that same map a potential segfault (if realocation happens)?

12 May 2026 @ 12:52 pm

So, in my AEC-to-WebAssembly compiler, written in C++11, I have this piece of code: if (!staticPropertiesInitialized) { // https://atheistforums.org/thread-63150-post-2055509.html#pid2055509 basicDataTypeSizes["Integer32"] = 4; basicDataTypeSizes["Character"] = 1; basicDataTypeSizes["Decimal32"] = 4; basicDataTypeSizes["Integer64"] = 8; basicDataTypeSizes["Decimal64"] = 8; basicDataTypeSizes["Integer16"] = 2; std::for_each(basicDataTypeSizes.begin(), basicDataTypeSizes.end(), [&](std::pair<std::string, int> type) { if (not(isPointerType(type.first))) basicDataTypeSizes[type.first + "Pointer&

Detect simulated location [Cordova]

12 May 2026 @ 12:40 pm

I want to detect simulated location, I’ve tried on iOS to use isSimulatedBySoftware flag from CLLocationSourceInformation, but It didn’t gave me a stable result while using apps like: PoKeep iMyFone AnyTo I’m really looking for a solution for this so any help will be appreciated, also to keep you know, “iMyFone AnyTo” require developer mode on iPhone to be on to be able to use it, so also if any one know how to detect and close developer mode [And it’s ok in App Store to release the app] please let me know

How to convert non-ascii hex to char in c

12 May 2026 @ 12:36 pm

I want to convert any given hex value to a char and then print the actual char string. The length of the given hex value "0xHHHHHHHH" may vary from 1 to 8. The following code uses two hex values for testing, "0x41" and "0x1EB": int main(int argc, char **argv) { long long_value = strtol("0x41", NULL, 16); int int_value = (int)long_value; char char_value = (char)int_value; printf("long_value: %ld, int_value: %d, char_value: '%c'\n", long_value, int_value, char_value); long long_value2 = strtol("0x1EB", NULL, 16); int int_value2 = (int)long_value2; char char_value2 = (char)int_value2; printf("long_value2: %ld, int_value2: %d, char_value2: '%c'\n", long_value2, int_value2, char_value2); printf("hex_41: '%c'\n", 0x41); printf("hex_1EB: '%c'\n", 0x1EB); re

Interleaved output of promise chained thenables, why?

12 May 2026 @ 12:27 pm

Using nodejs, I was expecting the chain to exhaust first and then follow. Is the following running while the resolve( chain ) is being unwrapped? I realize that the first follow then gets enqueued and then the first chain.then gets enqueued. Is the following execution order correct? I was under the impression that the resolve(chain) is getting unwrapped until it ends and then the follower chain runs. var chain = new Promise( function(resolve,reject){ resolve( '1' ); } ); var follow = new Promise( function(resolve,reject){ resolve( chain ); }); follow.then((a) => { console.log('follow 1', a); return 1; }).then((a) => { console.log('follow 2', a); return 2; }).then((a) => { console.log('follow 3', a); return 3; }); chain.then((a) => { console.log(' chain 1', a); return 2; }).then((a) => { console.log(' chain 2', a); retu

How do I export a file from a webpage that the user can Save rather than dropping straight into Downloads?

12 May 2026 @ 12:16 pm

Right now I'm using this code to allow the user to save an export of the data from my interactive webpage: const blob = new Blob([JSON.stringify(state, null, 2)], {type: 'application/json'}); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `filedump_${state.meta.name || 'export'}.json`; a.click(); This is 99% of what I want. But when I trigger this code (by clicking an Export button on the page), Firefox pops up a "File Downloaded" window, and the .json file sits in my Downloads directory. I would rather have it show up a "Save As" prompt, allowing me to save it to the local directory of my choosing. Is this possible? I am happy with making changes either server-side or client-side. I found an option in the Settings for Firefox which is a checkbox for "Always ask you where to save files", but this is overkill - I don't want this to change the behavior

How do I create a stacked bar chart with a complex dataset in R Studio with ggplot2?

12 May 2026 @ 12:08 pm

My dataset, very roughly, looks like this: Variable 1 Group 1a) Group 1b) Group 2a) ...(up to 9) yes 0 ... ... ... no 1 yes 1 no 0 ... ... I would like to create a stacked bar chart with the groups on the x-Axis, Variable one being stacked (yes/no) and the count on the y-Axis. It is to illustrate the relationship between working, being supported by ones parents and having time for leisure activities. Example Group 1a stands for "Yes, I have time for leisure and my parents support me financially" while Group 1b) stands for "Yes, I have time for leisure and my parents don't support me financially" and on it goes. There are 9 groups in total. Variable 1 are the answers to the question "Do you work?&qu

Could you guys kindly recommend powerful front end tools for a Laravel backend?

12 May 2026 @ 12:01 pm

I'm looking to build a website. I already know Laravel and ReactJS with Tailwind for CSS. I was wondering if ReactJS will be good enough for everything or if there will be a better option. I'm open to all suggestions. Thank you so much for your help. Cheer!

Using one Jenklinsfile accross multiple branch

12 May 2026 @ 11:49 am

**Is it a good practice to centralize Jenkinsfiles in a separate repository?** Hi everyone, I'm currently using a **Multibranch Pipeline** in Jenkins. My project repository contains a `Jenkinsfile` at its root, so every time I create a new branch, Jenkins automatically detects it and runs the pipeline which works fine. However, I'm questioning whether this is the right approach. Every branch ends up with its own copy of the `Jenkinsfile`, and keeping them all in sync can become painful as the project grows. I'm considering an alternative: having a **separate, dedicated repository** that contains only the `Jenkinsfile`, which would clone the project repository and checkout the target branch passed as a parameter. My questions are: - Is this a recognized good practice? - What are the trade-offs between both approaches (co-located vs. centralized Jenkinsfile)? - Are there Jenkins-native features (Shared Libraries, etc.) that addre

Trouble calculating HTML line wrapping positions

12 May 2026 @ 11:23 am

I’m trying to calculate where an HTML line breaks automatically. The result should be an array of character positions where the line breaks. I came up with the following formula, which works fine. I found one off-by-one issue in this minimal example, but that’s not the issue. The problem however, is that this breaks at specific zoom levels. This can be browser zoom or operating level zoom. At a browser zoom level of 175% for example, I see that the <span> element containing the word “need” is ~0.57px below the top level of the line element. In reality this is dynamic content. Font sizes may vary. This element is rendered invisibly and is only used to calculate line wrapping. Is there a way to get around this issue? Possible solutions I see are: Increasing the threshold, but having a threshold at all is not ideal. But then what would be an acceptable threshold? What if the font size becomes very small? This is user

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

Tolerating Inaccessibility

30 April 2026 @ 5:50 pm

The latest WebAIM Million report shows that detectable homepage accessibility errors increased over the past year. This article considers what those results may reveal about the organizational and societal forces that continue to deprioritize accessibility, and challenges us to imagine a world where inaccessibility is no longer tolerated.

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

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.