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.

How can I tell where large copies are happening in Lean 4?

10 December 2025 @ 10:30 pm

In Lean 4, values are reference-counted and logically immutable. Operations such as Array.set logically return a new array, but the implementation instead modifies the value in place if its reference count is 1. (See the Lean Language Reference, "Arrays"; or "Functional but in-place." in section 3 of this paper.) I gather this is a key feature of the language. Users are supposed to know about it and rely on it. I have doubts about my ability to predict when a value's refcount will be 1. The performance stakes are high—the difference between a single memory write and copying an O(n) data structure. Suppose my program is slow. How can I tell where large copies are happening?

How to pass tmpfs mount options (e.g., exec/noexec) using Docker SDK for Python?

10 December 2025 @ 10:23 pm

I'm using the Docker SDK for Python: https://docker-py.readthedocs.io/en/6.0.1/api.html?highlight=mount#docker.types.Mount, and I'm trying to create a tmpfs mount with custom mount options. With the Mount class: class Mount(target, source, type='volume', read_only=False, consistency=None, propagation=None, no_copy=False, labels=None, driver_config=None, tmpfs_size=None, tmpfs_mode=None) I can set tmpfs_size and tmpfs_mode, but I don't see any way to set other tmpfs mount flags such as exec or noexec. My understanding is that Docker mounts tmpfs as noexec by default, which prevents running executables from that directory. Question: Is it really not possible to pass additional tmpfs options (l

what's wrong whith my script? youtube_transcript_api

10 December 2025 @ 10:22 pm

what's wrong whith my script? I installed the following on my Windows 10 system in Powershell... a virtual Python environment (venv) then upgraded Python then installed youtube-transcript-api created a urls.txt file with the YT URLs created the script “download_transcripts.py” Run in venv. It seems nothing is being loaded. # download_transcripts.py from youtube_transcript_api import YouTubeTranscriptApi from youtube_transcript_api.transcript import TranscriptList import re import os # --- Konfiguration --- URLS_FILE = "urls.txt" OUTPUT_DIR = "transcripts" # --------------------- def extract_video_id(url): """Extrahiert Video-ID aus YouTube-URL""" # Muster für verschiedene URL-Formate (watch?v=, youtu.be/, embed/, etc.) pattern = r"(?:v=|\/)([0-9A-Za-z_-]{11}).*" match =

Google maps, AdvancedMarkerElement not working

10 December 2025 @ 10:05 pm

Pretty simple code. I have a new google cloud key. I load the JavaScript asynchronously and wait for it, but when I try to create a single marker, I get "This page can't load Google Maps Correctly. HTML <html> <head> <title>Add junk Map</title> <link rel="stylesheet" href="app.css" type="text/css" /> </head> <body> <!--The div element for the map --> <div id="map_canvas"></div> <script> (g => { var h, a, k, p = "The Google Maps JavaScript API", c = "google", l = "importLibrary", q = "__ib__", m = document, b = window; b = b[c] || (b[c] = {}); var d = b.maps || (b.maps = {}), r = new Set, e = new URLSearchParams, u = () => h || (h = new Promise(async (f, n) => { await (a = m.createElement("script")); e.set("libraries", [...r] + ""); for (k in g

Exercise in parallel programming using BackgroundWorker [closed]

10 December 2025 @ 10:02 pm

The task is to numerically determine the integral value for the given functions: y=2x2+7x y=2x2 y=2x-3 The user should select the appropriate function after starting the application, and the calculations should be performed for three x ranges: 1: from 0 to 10, 2: from 3 to 12, 3: from 5 to 14 Calculations should be made using trapezoids as approximating elements. Calculations for each range should be performed simultaneously but in separate threads using the BackgroundWorker class. The application should inform the user about the progress of calculations in 10% steps and should allow interruption of the operation (stopping calculations). Finally, the application should display a final information on the screen for each interval separately. Use the interface implementation ;and the DoWork method can be passed using the RunWorkerAsync method of the BackgroundWorker class that takes a parameter. Therefore, i need help breaking this down for a beginner in parallel programming and coding

React useEffect with div reference dependency updated on first setState in component

10 December 2025 @ 10:01 pm

Here is minimal component code. I can't figure out why Container ref effect is being called twice. First when div is actually created, second time when increment button is pressed for the first time. Subsequent increments do not update div. Also, second time effect is called, div is the same. React: 19.2.0 let stored: HTMLDivElement | null = null; function RefUpdated() { const containerRef = useRef<HTMLDivElement | null>(null); const [counter, setCounter] = useState(0); useEffect(() => { console.log("App mounted"); return () => { console.log("App unmounted"); } }, []); useEffect(() => { console.log("Container ref", stored === containerRef.current, containerRef.current); stored = containerRef.current; }, [containerRef.current]); return ( <div id="container" ref={containerRef}> <p>Counter: {counter}</p> <p> &l

Passing a temporary into a coroutine by const reference

10 December 2025 @ 9:04 pm

Assume that we have a potentially dangerous code that passes a const reference to a coroutine: #include <boost/asio.hpp> #include <iostream> namespace asio = boost::asio; using asio::awaitable; using asio::use_awaitable; class Param { public: Param(int val) : m_val(val) { std::cout << "Param constructor " << m_val << std::endl; } void func() const { std::cout << "Param func " << m_val << std::endl; } ~Param() { std::cout << "Param destructor" << m_val << std::endl; } int m_val; }; awaitable<void> func(const Param& param) { param.func(); co_return; } awaitable<void> caller_func() { co_await func(15); } int ma

How to find corrupted date entry when date column type is (object) [closed]

10 December 2025 @ 4:32 pm

I am trying to convert a column of time stamps that are currently of type object to proper datetime. When using pd.to_datetime() on the column I got this error OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 2821-11-10, at position 1818 I just want to find that value and correct it ie. should be 2021-11-10. But I can't find a way to search for that entry. The column is too large to physically look at every entry. Any tips?

How to generate a link inside a footnote with Apache POI?

10 December 2025 @ 3:22 pm

I am able to create footnotes, and I'm able to make links, but when I try to make a link inside a footnote Word refuses to open the resulting document. Here's a minimal example that reproduces the problem: import java.io.File; import java.io.FileOutputStream; import org.apache.poi.xwpf.usermodel.XWPFAbstractFootnoteEndnote; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFHyperlinkRun; import org.apache.poi.xwpf.usermodel.XWPFParagraph; import org.apache.poi.xwpf.usermodel.XWPFRelation; import org.apache.poi.xwpf.usermodel.XWPFRun; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHyperlink; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR; public class Test { public static void main(String[] argv) throws Exception { XWPFDocument document = new XWPFDocument(); XWPFParagraph para = document.createParagraph(); XWPFRun tmpRun = para.createRun(); tmpRun.setText("LALA

React native timer not resetting once the timer has completed counting down

10 December 2025 @ 1:01 pm

I'm building a React Native App to run a pomodoro style focus timer based on a training course. All the other behaviours that are expected when the timer has completed are running, but the timer continues to show "00:00" and when you press start, the timer immediately completes. The default timing set to 6 seconds which is what I want the timer to revert to. The following is my App.js code (Note: The example code given also has a blank in th "onTimerEnd" prop import React, { useState } from 'react'; import { StyleSheet, Text, View, Platform } from 'react-native'; import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import { Focus } from './src/features/Focus.js'; import { Timer } from './src/features/Timer.js'; import { colors } from './src/utils/colors'; export default function App() { const [currentSubject, setCurrentSubject] = useState('test'); return (

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.