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.

Laravel 11 add custom attribute of age in model

8 February 2026 @ 10:12 pm

In Laravel 11, I want to add a custom attribute named age in a Citizen model. It should calculate the age of a citizen from the birthdate. public function getAgeAttribute() { return $this->birthdate->diffInYears(\Carbon\Carbon::now()); } I have tried the code above but it does not work, Any ideas?

Plot objects it vispy on top of an image

8 February 2026 @ 10:09 pm

Afternoon, I'm trying to plot some objects on top of an image in Vispy, but somehow, they always get plotted behind it. For what i've read, the order in which everything is added in vispy should determine the layer position, but it seems my image always gets on top of everything. First i add the image to the canvas with: Image = scene.visuals.create_visual_node(visuals.ImageVisual) I = Image(parent=sc, interpolation="nearest",method='subdivide') I.set_data(img) Where img is the image path and sc is the canvas view, then, any object added, for ex, a line: Line = scene.visuals.create_visual_node(visuals.LineVisual) L = Line(parent=sc) L.set_data(line, color=color,width=width, connect=connect) And it gets plotted behind the image Is there anyway, any arg or similar, to set an object to be placed in front of the previous ones, or to keep the image always on "backgr

OpenCv's cv.VideoWriter output is BGR, even though I convert each frame to RGB before writing them

8 February 2026 @ 9:54 pm

My code records some video, but in the video blue and red seem to be switched. import cv2 as cv import numpy as np import asyncio #video assemble async def makeVideo(frames, w, h): output = 'output_video.mp4' fourcc = cv.VideoWriter_fourcc(*'mp4v') videowr = cv.VideoWriter(output, fourcc, 30, (w, h)) for frame in frames: videowr.write(cv.cvtColor(frame, cv.COLOR_BGR2RGB)) videowr.release() return output #video analysis async def analyse_vid(): #frames list frames = [] protection_mode_active = True cap = cv.VideoCapture(0) backSub = cv.createBackgroundSubtractorMOG2() if not cap.isOpened(): print("Cannot open camera") return width = int(cap.get(cv.CAP_PROP_FRAME_WIDTH)) height = int(cap.get(cv.CAP_PROP_FRAME_HEIGHT)) print(f'Width: {width} Height: {height}') last_warning_time = asyncio.get_event_loop().time() # Track th

Self hosted feed generator invalid feed generator service details

8 February 2026 @ 9:53 pm

I am implementing a self hosted feed generator for bluesky. I ran the script to register it with no errors, but when I go it in bsky.com, I get the following: Hmm, the feed server appears to be misconfigured. Please let the feed owner know about this issue. Message from server: invalid feed generator service details in did document: did:web:usa-congress-wind-34f9235d0865.herokuapp.com My /xrpc/app.bsky.feed.describeFeedGenerator URI returns the following: { "did":"did:web:usa-congress-wind-34f9235d0865.herokuapp.com", "feeds":[ { "uri":"at://did:web:https:usa-congress-wind-34f9235d0865.herokuapp.com/xrpc/app.bsky.feed.getFeedSkeleton" }]} My /xrpc/app.bsky.feed.getFeedSkeleton URI does return data. { "cursor":"feed:535,t:2026-02-06T00:37:38.307000Z,post:25803105", "posts":[ "at

WebDAV server that respects user file permissions

8 February 2026 @ 9:47 pm

I am looking for a WebDAV server on Linux that takes user permissions into account, meaning that users should log in with their credentials (Linux username and password) and that they should only be able to read and write file they have access to (via Linux permissions or ACLs), like IIS does on Windows. From what I understand the only way to enforce filesystem permissions correctly (access, ownership, etc) is to have the web server process run as the logged in user. My best bet was to use Apache httpd, with WebDAV enabled, Basic Auth, with PAM for authentication, and the mod-ruid2 module that can dynamically switch the user of the httpd process to the user returned by PAM. But it turns out that mod-ruid2 is no longer maintained and that no replacement exists. What other options exist?

jOOQ: Is it ok to create DSLContext per HTTP request?

8 February 2026 @ 9:45 pm

From a performance perspective, does it make sense to create a new dslContext per HTTP/API request? I need to set some request specific session variables (like user_id), for dslContext but I'm worried doing this will put too much pressure on the DB or Connection pool.

Graph API 401 Unauthorized for Guest Users on Shared Files (Works in Lab, Fails in Prod)

8 February 2026 @ 9:43 pm

I have a web application (SPA) that accesses SharePoint Online files on behalf of a logged-in user (Delegated permissions). The application does not use a Service Principal for file access; it relies entirely on the user's context. The User: An external Guest user (B2B) invited to the tenant. The Action: The user logs in, and the app attempts to resolve a specific SharePoint sharing link (sent via "Specific People" sharing) using the Microsoft Graph API. The Issue: The API call returns 401 Unauthorized (Code: accessDenied) in the Production tenant. The Mystery: The exact same code, configuration, and user setup works perfectly in my Lab tenant. When opening the link directly - not through my web app, it works! I first have to confirm my email, click on 'Next', but then all is good,

How to use async function in the router?

8 February 2026 @ 9:37 pm

I have a simple code thet works fine: // app.js app.get("/welcome", userController.welcome); // controller.js exports.welcome = (req, res) => { res.json({ "users": 'users' }); } However i need to use DB-requests in the controller. So i rewrote my code like this: // app.js app.get("/welcome", userController.welcome); // controller.js exports.welcome = async (req, res) => { try { const users = await User.find({}); res.json({ "users": users }); } catch(error) { res.status(404).send(); } } After this my code stopped working. This is reflected in the fact that the browser always started showing an 404error. Please help my get users list in the browser instead of 404error.

Selecting particular elements from a list of lists [duplicate]

8 February 2026 @ 6:42 pm

I have this tibble head(dd,2) # A tibble: 10 × 4 .model yemo GPRT .mean <chr> <mth> <dist> <dbl> 1 ARIMA(GPRT) 2024 Dec N(136, 854) 136. 2 ARIMA(GPRT) 2025 Jan N(136, 1225) 136. str(dd) fbl_ts [10 × 4] (S3: fbl_ts/tbl_ts/tbl_df/tbl/data.frame) $ .model: chr [1:10] "ARIMA(GPRT)" "ARIMA(GPRT)" "ARIMA(GPRT)" "ARIMA(GPRT)" ... $ yemo : mth [1:10] 2024 Dec, 2025 Jan, 2025 Feb, 2025 Mar, 2025 Apr, 2025 May, 2025 Jun, 2025 Jul, 2025 Aug, 2025 Sep $ GPRT : dist [1:10] ..$ :List of 2 .. ..$ mu : num 136 .. ..$ sigma: num 29.2 .. ..- attr(*, "class")= chr [1:2] "dist_normal" "dist_default" ..$ :List of 2 .. ..$ mu : num 136 .. ..$ sigma: num 35 .. ..- attr(*, "class")= chr [1:2] "dist_normal" "dist_default" ..$ :List of 2 .. ..$ mu : num 136 .. ..$ s

Type erasure Problem with Java Method references

8 February 2026 @ 3:53 pm

I am using Flink with java where I am facing a type erasure problem. I have an interface called TransformationService, which has multiple implementations, only one of which is used by a single flink job. This is decided at runtime as shown in the code below. Following is the signature of my Transformation Service - public interface TransformationService<EVENT extends Event, KEY extends Key> { KEY keyBy(EVENT ev); } This is how it is being used in the calling code of the pipeline - TransformationService<Event, Key> service = getImplementation(pipelineType); DataStreamSource<Event> source = ...; source .uid("source") .rebalance() ... ... .keyBy(service::keyBy) ... ... env.execute(job); Each implementation of TransformationService uses concrete key and event types that extend Key and Event classes, respectively. An example implementation of Transf

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

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

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

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.