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.9/10 (12 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Tablet mode: keyboard/touchpad not responsive after folding back to laptop position

19 November 2025 @ 10:13 pm

I have an HP Elitebook X360, which can be folded to tablet mode. I am running XFCE4 under GDM3 with Debian trixie. Occasionally when I have used tablet mode, the keyboard and touchpad remain disabled when changing the position of the screen back to laptop. This is catastrophic when I haven't an external keyboard plugged in, as the only option is to press long enough the power button to halt the computer forcefully. It seems that it is only the DM or WM that do not heed the change from tablet to laptop, since: The keyboard backlighting gets reactivated on pressing a key (it is deactivated when the computer is folded into a tablet), If an external keyboard is plugged in, and I use e.g the Alt-Ctrl-F4 combination to reach a text console, there the built-in keyboard functions normally. However, switching back to X11 does not restore function either in my graphic session. How can I monitor what is g

Segmentation fault when inserting row using GridDB Node.js client (griddb-node-api)

19 November 2025 @ 10:06 pm

I’m using GridDB 5.7 with Node.js 16 on WSL2 Ubuntu 22.04. I can successfully connect to the GridDB node, but when I create a container and try to insert a row, I get a segmentation fault: My code test.js: const griddb = require('griddb-node-api'); async function main() { try { const factory = griddb.StoreFactory.getInstance(); const store = factory.getStore({ host: '127.0.0.1', port: 10001, clusterName: 'defaultCluster', username: 'admin', password: 'admin' }); console.log('Connected to GridDB node!'); const containerInfo = { name: 'sample_container', columnInfoList: [ { name: 'id', type: griddb.Type.INTEGER }, { name: 'name', type: griddb.Type.STRING } ], rowKey: true }; let container = await store.putCont

Clustering without all pairwise distances

19 November 2025 @ 10:02 pm

I have a set of binarized images containing forms, each image follows one of N layouts. There are a few outliers which do not follow a layout and contain random text and images. The distance between two images can be calculated, as the number of intersecting black pixels. High overlap means the images are more likely to depict the same form. Are there any algorithms that can cluster the images without computing all pairwise distances, i.e. iteratively or online? I would like to cluster the images by the forms used in each image. Outliers should be detected and not end up within any cluster. Ideally in Python, using scipy.

Proc producing .PNG everywhere

19 November 2025 @ 9:56 pm

When I run SAS stat procedures (logistic, mixed, etc.) it saves a .PNG in one of the last folders I was in. I get many of these files saved all over the place in my folders. I want them to stop saving everywhere, but they seem to be like gremlins, taking over my computer.

Mikro-ORM migrations work locally but no tables in Docker container database

19 November 2025 @ 9:49 pm

I have a NestJS app using Mikro-ORM and PostgreSQL. I’m new to Dockerizing database migrations and Mikro-ORM in NestJS. Locally, when I run: npx mikro-orm migration:create npx mikro-orm migration:up npm run start:dev all entity tables are created and I can see them in the database. But when I run the app in Docker Compose: The app builds and starts without errors. Only the mikro_orm_migrations table exists in the database; none of my entity tables appear. My current setup: docker-compose.yml snippet: services: postgres: image: postgres:15 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: app_db ports: - '5432:5432' volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 3s timeout: 5s retries: 5 app:

How do I fix a "TypeError: bad number of pixels" in a healpy.fitsfunc.write_map call?

19 November 2025 @ 9:46 pm

I have downloaded the HEALPix5 DECaPS 3D dust extinction map (from arXiv:2503.02657) and imported it as a numpy array 'meanmap'. The array gives an expected result (51415400, 1, 120) to the meanmap.shape function. But when I try to export the file in regular FITS format via healpy.fitsfunc.write_map("decaps_mean.fits", meanmap) I just get the fairly useless error, and have no idea what else to try (I am a python noob). It makes no difference if I add "fits_IDL=False, coord='G'" to the call. Somebody please help! Thanks, Peter

Connecting SQL Server to Cypress

19 November 2025 @ 9:44 pm

I am trying to connect the DB for testing web elements that have dependencies on data, and in general to add some reliable BE testing. Currently I have cypress.config.js: // cypress.config.js const { defineConfig } = require("cypress"); const sql = require('mssql'); const dbConfig = require("./db_config"); const TEST_CREDENTIALS = require("./cypress.env.json"); module.exports = defineConfig({ projectId: "iu4xc2", e2e: { baseUrl: "", viewportWidth: 1400, viewportHeight: 900, setupNodeEvents(on, config) { on('task', { async testDbConnection() { let connectionStatus = false; try { console.log('Attempting to connect to the database...'); await sql.connect(dbConfig) connectionStatus = true; console.log('✅ Database connection successful!'); re

Why is the getOrElse() function of arrow-kt returning Any?

19 November 2025 @ 9:32 pm

I am trying to understand the getOrElse() function of arrow-kt. I want to create a simple function that takes a list of strings, filters them, and returns the first matching value as an Option< String >. I created the following trivial example: fun filterStrings(incoming:List<String>):Option<String> { val result = incoming.filter { it.contains('e') }.firstOrNone().getOrElse { incoming.filter { it.contains('b') }.firstOrNone() } return result } @Test fun `test filter strings`() { val values = listOf("aad", "aba", "cdc", "bbb") val result = filterStrings(values) assertThat(result.isSome()).isTrue() assertThat(result.getOrBlank()).isEqualTo("aba") } In this example, the code will fail to compile since 'result' is being smartcast to Any. Why is the result variable being smartcast to Any instead of Options < String &g

How to help the compiler deduce the arguments of a variadic function?

19 November 2025 @ 9:31 pm

I have been working on trying to convert some legacy software to use variadic templates. However, I have been really struggling on overhauling one of the classes, which provides logging, and keeping the changes super minimal. For example: #define ThisFile __FILE__ << ":" << __LINE__ #include "Log.hpp" auto main() -> int { auto Logger = Log{}; const auto a = int{0}; const auto b = int{1}; Logger.print("%s:%d %d %d", ThisFile, a, b); } I have been trying really hard to keep that syntax identical, since this logger is used in hundreds of files and in hundreds of lines of code. I have been able to get std::source_location and the variadic templates to play nicely with each other using deduction guides. #pragma once #include <print> #include <format> #include <string_view> #

Unable to get the correct year for a UTC timestamp

19 November 2025 @ 9:25 pm

I am trying to get a year, and time in UTC format for a particular time I am able to get the time correctly but it is always printing wrong year I am trying to get the UTC time stamp at a particular time instant from the start value which is start_value: 2024-06-05 10:50:42 Target value: 300,150 seconds from the start_value It is able to print the time stamp correctly but the year is shown as incorrect Actual value: 1970-01-04 13:22:30 Expected value: 2024-06-05 13:22:30 Below is what I tried: from datetime import datetime start_time=[300150] dt_time = datetime.datetime.fromtimestamp(300150).strftime('%Y-%m-%d %H:%M:%S') print(dt_time) How would it know where it needs to take the year information from?

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

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.