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.

Qt - Scrolling area leaves a a lot of empty space

7 December 2025 @ 6:31 am

I am developing a chatbot using Qt in C++. When I ask a question, and the LLM returns a response, there is always a empty space left out between the last sentence and the input area as attached screenshot. I am currently deisgning the chat window using QScrollArea, I searched online and it mentions we can solve the issue by using stretch. However, I have tried it but still could not solve the issue. Is there any way to fix the empty space in a fixed height, e.g. 20px, from the input area? Or is this a limitation in Qt? Should I switch to other setups e.g. using different Qt libraries instead of QScrollArea to solve the issue? Below are the code snippets related to the setup: m_messagesLayout->setContentsMargins(64, 16, 64, 0); m_messagesLayout->setSpacing(8); m_messagesLayout->setAlignment(Qt::AlignTop); m_scrollArea->setWidget(m_messagesContainer); m_scrollArea = new QScrollArea(this); m_scrollArea->setWidgetResizable(true);

How to check if value is valid for a number input

7 December 2025 @ 6:04 am

When assigning a value to a number input via JS, is there a way to validate the value to meet the input's requirements - min, max and step - without doing it manually. For example, consider this input <input type="number" min="0" max="100" step="10"> If the value is to be set by js and by whatever logic it comes out to say 19, I need a way to know 19 is not valid for this input and even better if the function can return nearest valid value - in this case 20. JS does not throw any error for invalid inputs. input.value = 19; I know validation will be done when form is submitted and this input will throw an error but that error will have to be resolved by the user. I've tried searching for it online, but Google just returns results to check if value is a number. Again, I can do all the checks manually but need to know if ther

Why does my custom object's __bool__ affect conditional evaluation order in Python if statements?

7 December 2025 @ 5:59 am

I’m experimenting with custom truth values in Python by overriding __bool__ on a class. However, when using multiple conditions in an if statement, Python seems to stop evaluating earlier than I expect: class A: def __init__(self, v): self.v = v def __bool__(self): print("checking bool:", self.v) return self.v > 5 x = A(3) y = A(10) if x and y: print("ok") Questions: 1. Is this short-circuit behavior always guaranteed in Python, even with custom __bool__ or __len__ methods? 2. Does Python evaluate left-to-right for all logical operators (and, or) inside if statements? 3. Is there any situation where Python would evaluate both operands even if the first already determines the result?

update programmatically value of a field in wooCommerce checkout blocks

7 December 2025 @ 5:59 am

In WooCommerce Checkout Blocks, suppose I have added a custom text-input field using woocommerce_register_additional_checkout_field, and I want to update the value of that input via js. The update should occur in response to a user action (for example, when the user selects a pickup point from a popup that I generated with createElement inside ExperimentalOrderShippingPackages). From what I understand, this should be done with setExtensionData, but I do not fully understand how it is supposed to work. How can I correctly update the value of a custom checkout field when using Checkout Blocks?

Error message when doing Update-Database in Blazor using VIsual Studio [duplicate]

7 December 2025 @ 5:28 am

when I run Update-Database command after creating a new migration, I get the following error: Introducing FOREIGN KEY constraint 'FK_Booking_Employee_EmployeeId' on table 'Booking' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. Could not create constraint or index. See previous errors. However, I am not quite sure how to fix this. My Booking model: using System.ComponentModel.DataAnnotations.Schema; namespace SpaWebsite.Models { public class Booking { public int BookingId { get; set; } [ForeignKey("Service")] public int ServiceId { get; set; } public Service? Service { get; set; } [ForeignKey("Customer")] public int CustomerId { get; set; } public Customer? Customer { get; set; } [ForeignKey("Employee")] public int EmployeeId { g

Android WebView: mong muốn mở link Facebook bằng Intent nhưng bị giữ lại trong WebView

7 December 2025 @ 5:26 am

I make web next js, running on facebook web view, the deeplink function to open via app does not work when using intent, the case is as follows: if the app is not installed then fallback via play store, if the app is installed then open the app, but the fallback case does not work (only on facebook webview, browser works normally) intent example: intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;S.browser_fallback_url=http%3A%2F%2Fzxing.org;end, please help me

“Tailwind CSS v4: Why are larger text sizes (text-5xl, text-6xl, etc...) not being generated?”

7 December 2025 @ 5:23 am

I'm currently learning tailwind css, but i'm facing an issue. I have read the documentations; i could not find a good answer on how to make it work. I'm using tailwind css V4 to create some typography, but only the text-4xl works; the one above it does not work. Is there anyone who can help me with that? <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="../dist/output.css"> <title>Document</title> </head> <body> <!--FONT SIZE - text-XS--> <!--xs, sm, base, lg, xl, 2xl-9x1 --> <div class="text-xs"> Lorem ipsum dolor sit amet consectetur adipisicing elit. </div> <div class="text-sm"> Lorem ipsum dolor sit amet consectetur adipisici

Am I incorrectly using BetterAuth's useSession()?

7 December 2025 @ 5:17 am

Working on a new project with SolidStart and running into an issue. I'm currently importing the useSession() function from my client-side Better-Auth instance. According to documentation, I should just be able to use something like: const { data: session } = useSession() However, when I try this, I get a TypeScript error specifying: Property 'data' does not exist on type 'Accessor<{ data: ... The documentation for SolidJS also states that it's not a good idea to destructure reactive stuff because it is likely to lose reactivity. The alternative is the following: import { useSession } from '~/utils/auth-client' export default function QuickButtons() { const session = useSession() return ( <ul class="menu menu-horizontal border-r border-gray-500"> <li> <a>{session() ? `${session().data?.user.username}` : 'nothing!'}</a> <

Executed line confusion

7 December 2025 @ 4:36 am

In the Python program below: a = 3 if a > 10: print("gt10") elif a > 5: print("gt5 lt10") elif a > 2: print("bw25") else: # Line 9 pass when I run formal code coverage tool SlipCover, when a is 3, the line 9 is not listed as missing line, but when it makes the previous conditionals evaluate to true such as a = 10, line 9 is listed as unexecuted line this time. I am really confused about this behaviour, in any case the body of else statement is not executed. Could you explain me the reason why else is in one case not listed as unexecuted, but in the second case listed as unexecuted?

The Photo doesn't visible when I try to print in webpage

7 December 2025 @ 2:49 am

Every thing was right but when I try to print the photo which submitted by form it doesn't print but the URL of the image work properly when I print directly it will work. function add(Request $request) { if ($request->hasFile('file')) { $path = $request->file('file')->store('public'); $fileName = basename($path); // abc.jpg $imgUrl = asset('storage/' . $fileName); return view('random', ['img' => $imgUrl]); } else { return 'upload the file '; } } <div> {{$img}} <img src="{{$img}}"> </div>

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

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.