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.

WebView2 and document.write

14 November 2025 @ 10:35 pm

I am responsible for both a desktop and web version of an application where we are embedding a service that injects an iframe with a document via a hosted js script. The script is supposed to put that iframe and its contained document into a designated div element. After writing into the div it makes a call to a callback function I have provided in order to give me some status regarding the delivered content. It works fine with absolutely zero issues in my Angular SPA. But when I implement essentially the same html in a WebView2 in the desktop version, I can see console violation warnings regarding the use of document.write(). The content writes itself, as I can see it refresh every 30 seconds, but after reporting the violation, it does not call into my callback function. I may have to work with the service to have them inject their content in another fashion, or to see if they have a workaround, but figured I would ask if anyone knows a way to get the WebView2 to not be offended by

PyInstaller - It does'nt generate an .exe file

14 November 2025 @ 10:20 pm

I'm using pyinstaller main.spec command. The main.spec file is the next: # -*- mode: python ; coding: utf-8 -*- a = Analysis( ['main.py', 'flujo.py', 'flujo_if.py', 'descarga_manual.py', 'descarga_manual_if.py', 'subida_lectura_manual.py', 'subida_lectura_manual_if.py', 'lectura_manual.py', 'lectura_manual_if.py'], pathex=[], binaries=[], datas=[ ('./common', 'common'), ('./Scripts', 'Scripts'), ('./APIS', 'APIS'), ('./PrcsINTRCRP', 'PrcsINTRCRP'), ('./SQL', 'SQL') ], hiddenimports=['cryptography.hazmat.primitives.kdf.pbkdf2'], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], noarchive=False, ) pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, a.binaries, a.datas, [], icon='./logo.ico', name='APRORE', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir

Download smaller version of large image over network

14 November 2025 @ 10:15 pm

Our organization has HD images that are over 20 MB in size on a network drive. When trying to preview them, is it possible to have python download a smaller version of them (to reduce bandwidth) with Pillow or some other library? For example, is there a way to download every 5th pixel and cut the image down to 1/5th the original size? The user will be given the option to download the full HD image later. This will allow for faster previewing so that python is not downloading the entire image every time the user wants to preview one.

What is the best pattern for SwiftUI Document Application?

14 November 2025 @ 10:03 pm

I am trying to create a full SwiftUI Document app (using swift 6, as it matters). Apple doc says that the Document init(configuration:)and fileWrapper(configuration:)are called on a background thread - and I checked they are. However, the Document holds a model which is @ObservableObjecttherefore bound to @MainActor. To write to a file, because fileWrapper(configuration:)is called directly without any chance to serialise the modelin the MainActorI used a function that goes back to the main actor, serialises the data, and then comes back to the background thread for saving. Clearly cumbersome, not ideal, but works fine. Here is the code of that function: nonisolated public func runOnMainAndWait<T: Sendable>(_ operation: @escaping @Sendable @MainActor () -> T) -> T { // We are in the caller execution

Is Mongoid 9 compatible with MongoDB 8.2?

14 November 2025 @ 10:00 pm

Looking at the compatibility page, MongoDB 8.2 isn't listed as compatible. In practice, I suspect this page is updated less often than it should be, so I wonder if Mongoid is actually fully compatible with MongoDB 8.2. The only mention of MongoDB 8.2 in Jira as far as I can tell is this feature request for adding vector search support. Obviously I could just try it and see if things are obviously broken, but I worry about deploying to production when the database version isn't marked as supported in the compatibility page.

Compare fingerprints with a set of 10*10^6 other audio fingerprints in postgres

14 November 2025 @ 9:54 pm

So I have a function that I used to compare audio fingerprints with a few thousand audio fingerprints stored in a postgresql. What I did basically was: def my_function(cur: Cursor, threshold: float = 0.8) -> tuple: if not 0.0 <= threshold <= 1.0: raise ValueError("threshold must be between 0.0 and 1.0") # Get fingerprint and duration duration, fprint = fingerprint_file(self.file_path, maxlength=AUDIO_MAX_LENGTH) cur.execute("SELECT duration, fprint FROM fingerprints") # Loop through db fingerprints and compare for similarity for db_duration, db_fprint in cur: # `similarity_score` is between 0.0 and 1.0 similarity_score = compare_fingerprints( (duration, fprint), (db_duration, db_fprint), ) if similarity_score >= threshold: return 0, 0, 0 return 1, duration, fprint

Symbol not found error with complex generics and lambda arrangement

14 November 2025 @ 9:52 pm

The following test renders fine in my IDE (Eclipse), but fails to compile when building via Maven. The compiler error is shown in the comment line in the code block below. It looks like the compiler is unable to determine the type of the 'o' input to the lambda. And if I cast o to the MyObj class, then it compiles fine. I realize that this is a somewhat convoluted situation (we really do need this complexiy, though). And there really should be enough type info here for the compiler to determine the type (and the built-in compiler in Eclipse does so). Am I doing something wrong with the generics declarations? JDK is 21.0.5 public class AnotherTestClass { public static class MyObj{ private final String arg1; public MyObj(String arg1) { this.arg1 = arg1; } public String getArg1() { return arg1; } } public static class MyFunctionHolder<T, R>{

vba macro to check if Map Chart drawn successfully or not

14 November 2025 @ 9:51 pm

1) The following code is able to draw a Map Chart successfully. Public Sub Macro1() For i = ActiveSheet.Shapes.Count To 1 Step -1 ActiveSheet.Shapes(i).Delete Next i ActiveSheet.Range("A1").Value = "Region" ActiveSheet.Range("A2").Value = "Germany" ActiveSheet.Range("B1").Value = "Header" ActiveSheet.Range("B2").Value = "99" ActiveSheet.Range("A1:B2").Select ActiveSheet.Shapes.AddChart2(497, xlRegionMap, 111, 222, 600, 300, False).Select End Sub 2) The following code is NOT able to draw a Map Chart successfully because there is no country named like Xermany. Public Sub Macro2() For i = ActiveSheet.Shapes.Count To 1 Step -1 ActiveSheet.Shapes(i).Delete Next i A

powershell compress-archive verbose output to text file

14 November 2025 @ 9:09 pm

I have a powershell command that I want to execute and direct the verbose output to a text file. Compress-Archive -Path $currentLogDir_TempPathString -DestinationPath $currentLogDir_ArchiveFileName -Verbose 4>$logVerboseString Add-Content -Path $ActivityLogPathFileName -Value $logVerboseString I am expecting.... Preparing to compress... Performing the operation "Compress-Archive" on target "... But I get nothing output when I execute. Am I not understanding how this feature works?

Windows 11 powershell run executable with parameter switches when IF statement false

14 November 2025 @ 8:47 pm

Windows 11 Power shell I'm trying to run the following IF statement in power shell - basically to check if a file exists on encrypted drive P, if it doesn't then create the encrypted drive. I get an error "/v is an invalid switch" which suggests PowerShell associates this switch with the start command not the veracrypt.exe command. Ideas how to get this to run??? P is the encrypted drive. If I run the command between the {} brackets on a separate line it runs ok, just get the error when its combined into the IF statement. $path = "P:\check.txt" if(-not(Test-Path -path $path)) {cmd /c start /WAIT "" "C:\Program Files\VeraCrypt\Veracrypt.exe" /v "C:\Location_of_Veracrypt_Container" /l P: /p Password /q /hash SHA-512 /nowaitdlg}

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.