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.

Create DSN for SQL Server with Username and Password

14 June 2026 @ 3:09 pm

How to automatically create DSN for connection to MS SQL server with supplied username and password? I have searched online and cant find anything that works. The following code I have used worked if I am not supplying username and password, but I need the one that works with supplied username and password: 'Constant Declaration Private Const ODBC_ADD_DSN = 1 ' Add data source Private Const ODBC_CONFIG_DSN = 2 ' Configure (edit) data source Private Const ODBC_REMOVE_DSN = 3 ' Remove data source Private Const vbAPINull As Long = 0 ' NULL Pointer 'Function Declare #If Win32 Then Private Declare Function SQLConfigDataSource Lib "odbccp32.dll" _ (ByVal hwndParent As Long, ByVal fRequest As Long, _ ByVal lpszDriver As String, ByVal lpszAttributes As String) _ As Long #Else Private Declare Function SQLConfigDataSource Lib "ODBCINST.DLL" _ (ByVal hwndParent As Integer, B

Is HTTP error 500 appropriate when I raise a ValueError?

14 June 2026 @ 3:07 pm

I raise the ValueError exception if I find a user in data base try: db.session.query(User).filter_by(id=user.id).one() raise ValueError("The user already exists in data base") except NoResultFound as e: # Ajouter à la session db.session.add(user) db.session.commit() And the error status is 500. Is that correct? Normally error 500 is the consequence of a server error and should not be the status if I raise a ValueError.

Unsafe call of a type that could not be resolved

14 June 2026 @ 2:34 pm

I want to define a static list of integers, then check to see if some random variable's value exists in the list of integers. In the example below, the list contains 0 and 1 and I want to check to see if the value 1 exists in the list (for simplicity). Later, this 1 will be a variable. How do I do this? FunctionIDs.model.ts: export const FunctionIDs: number[] = [ 0 //some value , 1 //some other value ] as const; OtherFile.ts: import { FunctionIDs } from './models/FunctionIDs.model' if (FunctionIDs.includes(1)) { //2 ERRORS HERE POINTING TO THE LAST PARENTHESES //do something } The 2 errors: Unsafe call of a type that could not be resolved Unsafe member access .includes on a type that cannot be resolved

In C++ atomic operations, are the generated values allowed to circularly depend on their own computations?

14 June 2026 @ 2:17 pm

As described in https://cppreference.com/cpp/atomic/memory_order : Even with relaxed memory model, out-of-thin-air values are not allowed to circularly depend on their own computations, for example, with x and y initially zero, // Thread 1: r1 = y.load(std::memory_order_relaxed); if (r1 == 42) x.store(r1, std::memory_order_relaxed); // Thread 2: r2 = x.load(std::memory_order_relaxed); if (r2 == 42) y.store(42, std::memory_order_relaxed); is not allowed to produce r1 == r2 && r2 == 42 since the store of 42 to y is only possible if the store to x stores 42, which circularly depends on the store to y storing 42. But what about this:

How to parse razor templates with Abstract Syntax Trees from C# code outside of ASP.NET context? [closed]

14 June 2026 @ 1:56 pm

I need to write a tool that processes given Razor templates. It cannot parse them as if they were pure HTML. It must access the AST of the document in order to analyze its HTML markup elements as well as embedded C# code. I could not find any mature and maintained library to parse Razor. My current implementation uses Microsoft.AspNetCore.Razor.Language, but most of its API methods are internal and I am forced to create reflection based wrappers for the functionality I need as I go, which is extremely awkward. Nothing like working with Roslyn, for example, to process C# source code. If you have faced the same challenge, how have you resolved it? Maybe I am missing some library that does what I need?

Fitting an image inside CtkLabel

14 June 2026 @ 1:40 pm

I have a CTkFrame and inside it I have a CTkLabel defined as follows: self.info_frame = ctk.CTkFrame(self, corner_radius=12) self.info_frame.grid( row=1, column=0, padx=20, pady=(0, 10), sticky="ew") self.info_frame.grid_columnconfigure(0, weight=0) self.info_frame.grid_columnconfigure(1, weight=1) self.lbl_thumbnail = ctk.CTkLabel( self.info_frame, text="[Thumbnail]", corner_radius=12, width=272, height=153, fg_color="gray20") self.lbl_thumbnail.grid(row=0, column=0, padx=10, pady=10, sticky="nsew") Later on in the program, an image is written to self.lbl_thumbnail and the text changes to "" so the only visible thing will be the image. Here is how it is done: def _build_thumbnail_image(self, image_data): image = image_data.convert("RGBA") image = ImageOps.fit( image, (272, 153),

Using C++26 <simd> library [closed]

14 June 2026 @ 12:48 pm

My C++ compiler (g++ 16) have changed the <simd> library implementation under the hood forcing me to learn the new version of the library. I have got 2 problems: I don't know how to set the ABI template parameter to std::simd::basic_vec. I can't use default ABI, because I need a vector with a specific size (like a 4-element float for example), I don't know how to set values of the vector. I tried passing values through constructor parameters (there is no constructor that accepts values this way) and using operator[] (there is only read-only version of the operator) I searched the Internet, but I'm finding only information about the old way of working with <experimental/simd> library. Also cppreference.com is unusable, because most of the page for simd is in red links (unfortunately with key ele

Movie recommendation database problem in SQL Server [duplicate]

14 June 2026 @ 12:24 pm

create table Movies ( movie varchar(100), genre varchar(100) ) create table Actors ( actorName varchar(100), movie varchar(100) ) create table Users ( userName varchar(100), movieName Varchar(100), rating int ) How would one get the top movies by genre?

Can a transformation pattern be inferred from example input/output pairs?

14 June 2026 @ 8:38 am

I'm experimenting with a small tool that receives: an input string A an expected output string B Example: Input: {'name':'John','email':'john@email'} Output: insert into users (name,email) values ('John','john@email'); The idea is to automatically infer a reusable transformation rule from such examples. A very naive implementation could generate something like: \{'name':'(.*)','email':'(.*)'\} with a replacement: insert into users (name,email) values ('$1','$2'); I'm not interested in this specific JSON→SQL example (there are obviously simpler solutions). My actual question is: Given multiple example pairs (input → output), are there known algorithms, libraries, or research areas that try to infer a generalized transformation pattern automatically? I'm looking for ter

Reference vs Pointers

14 June 2026 @ 6:28 am

There is a significant difference between a reference and a pointer. But I want to ask at the low level how are they different. Some people say that references are just pointers under the hood but and compiler is responsible to differentiate between a pointer and a reference. Is it true that references are basically pointers under the hood with restricted control (for safety and easy of use)? If this is false then jump to my second question. Is it correct to say that references point to a variable/object and pointer point directly to a memory location? as the fact that pointers support pointer arithmetic whereas references do not? I am a pre-final year computer science student and has been coding in C for the past one year, but some questions still remain inside me and I ask them here. This question is general and not constraint to C language.

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

An Extension is Not an Excuse

28 May 2026 @ 9:20 pm

The Department of Health and Human Services recently announced a one-year extension of the compliance dates for web content and mobile app accessibility requirements under Section 504 of the Rehabilitation Act. The requirements themselves are not new in substance: covered recipients of HHS federal financial assistance must make covered web content and mobile apps conform […]

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

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.