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.

String print format specifier does not work for numpy string array

3 December 2025 @ 3:28 am

I am trying to use numpy sort for numpy string array. But, when I try to print them element-wise with string print format specifier '{:s}' it is giving me the following error. print("{0:s} {1:2d}".format(lth_str[j],lth_arr[j])) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ TypeError: unsupported format string passed to numpy.ndarray.__format__ I don't understand this. Why is this happening and how can I work around this issue? Am I missing something? Data-type mismatch maybe? The following is the code. import numpy as np arr = np.array([ [0,19,20,39], [1,18,21,38], [2,17,22,37], [3,16,23,36], [9,15,24,35], [8,14,25,34], [7,13,26,33], [6,12,27,32], [5,11,28,31], [4,10,29,30], ]) starr = np.array(["a","b","c","d","e","f","g","h","i","j"]) for i in range(4): lth_idx = np.argsort(arr[:,i]) lth_arr

When to choose PolarDB for vector search vs. a dedicated vector database like Pinecone or Weaviate?

3 December 2025 @ 3:24 am

My team is building a new feature that requires vector similarity search. We already have a large, well-maintained PolarDB infrastructure, so using it for vector storage is very appealing as it would simplify our tech stack. We've proven that it's possible to do vector search in PolarDB, either with UDFs and full scans, or possibly with workarounds like quantization or clustering. However, we are debating the long-term viability of this approach versus adopting a dedicated vector database like Pinecone, Weaviate, Milvus, etc. What are the key technical trade-offs? I'm looking for specific scenarios or thresholds where PolarDB becomes a poor choice. For instance: At what dataset size (e.g., >10 million vectors) does the lack of native ANN indexing in PolarDB Community become a deal-breaker? How does the performance (latency and QPS) of a tuned PolarDB solution compare to a dedicated DB? Are we talking 2x slower or 100x slower? What features (e.g., real-

Error running Python script: 'utf-8' codec can't decode byte 0xed in position 79: invalid continuation byte

3 December 2025 @ 3:12 am

C:\inetpub\wwwroot\proyecto_transporte>python conexion.py Unexpected error: 'utf-8' codec can't decode byte 0xed in position 79: invalid continuation byte I already tried saving the file as ANSI, verified that it is saved as UTF-8, and nothing seems to work. I don't know what else to try. If anyone has had a similar issue, I would really appreciate your help. Here is the content of my script: import psycopg2 def verificar_conexion(): try: conexion = psycopg2.connect( host="10.240.0.96", database="transporte_dev", user="postgres", password="***********", port="5432" ) print("Conexion exitosa a PostgreSQL") cursor = conexion.cursor() cursor.execute("SELECT version();") version = cursor.fetchone() print(f"Version de PostgreSQL: {version[0]}&q

RISC vs CISC for low-power autonomous drone processors: technical differences? [closed]

3 December 2025 @ 2:59 am

I am working on an autonomous drone project that requires real-time computer vision and sensor fusion while keeping power consumption very low. I’m comparing RISC-based processors (like ARM Cortex-M/A series) with CISC-based processors (like x86) for this application. Specifically, I want to understand: How the processor architecture affects power efficiency and performance for embedded systems. Any technical considerations for real-time tasks in drones (sensor fusion, image processing). Situations where RISC or CISC would have a measurable advantage.

AzureClientFactory BlobServiceClient Variables

3 December 2025 @ 2:54 am

I couldn't find a complete working example of uploading a file to Azure Blob with .NET Core, so I'm confused with the different snippets that I saw. This is what my code looks like: My Secrets: { "ConnectionStrings:DatabaseConnection": Server=tcp:xxx.database.windows.net;Authentication=Active Directory Default;Initial Catalog=xxxdatabase;", "StorageConnection:blobServiceUri": "https://xxxxxxxx.blob.core.windows.net/", "StorageConnection:queueServiceUri": "https://xxxxxxxx.queue.core.windows.net/", "StorageConnection:tableServiceUri": "https://xxxxxxxx.table.core.windows.net/" I have the standard AzureClientFactoryBuilderExtensions.cs that VS creates when you add Azure Storage to the connected services. I have the Azure Client Service in Program.cs: builder.Services.AddAzureClients(clientBuilder => { clientBuilder.Add

Python/VSCode: Recursive Function Skips elif & Runs else (Works Next Day)

3 December 2025 @ 2:40 am

I encountered an issue with a recursive Python function in VSCode + Python 3.13.1: The function has an if-elif-else structure with self-recursion. After fixing bugs, I passed an input_val that clearly meets the elif condition (e.g., 10 satisfies 5 < x < 15), but the code consistently skipped elif and executed else. I tried re-saving the file, restarting VSCode, clearing the cache, etc.—no luck. Strangely, running the exact same code the next day worked as expected. Code example: def my_function(input_val): if isinstance(input_val, str) and len(input_val) == 1: return input_val.upper() elif isinstance(input_val, int) and 5 < input_val < 15: # 10 should trigger this return my_function(input_val * 2) # Recursive call else: return my_function(input_val - 3) # Recursi

How to fix the error: multiple definition of 'GuiEnable'?

3 December 2025 @ 2:38 am

I am having some trouble configuring raygui.h with cmake using two targets, a library and a executable. There is a repository here with the exact files that causes errors of multiple definition of SomeFunction during the build. The errors are like below: /usr/bin/ld: libgame-lib.a(hello_world.cpp.o): in function `GuiEnable': hello_world.cpp:(.text+0x0): multiple definition of `GuiEnable'; CMakeFiles/exe.dir/src/main.cpp.o:main.cpp:(.text+0x0): first defined here It's like raygui.h declaration were all made twice. The problem does not occurs in the master branch, where only one target is linked directly with raygui.h. These are the files in the

DDD: Is missing entity a domain concern or an application concern?

3 December 2025 @ 2:12 am

I’m working on a DDD-based application and I’m unsure where “Entity Not Found” should be modeled. In many cases, the application layer loads an aggregate via a repository: const warehouse = repository.findById(id); Now there are two possibilities: The entity is not found because of a technical issue (e.g., database connection failure, SQL error, timeout). This is clearly an infrastructure exception. The entity is not found because it does not exist in the domain (e.g., the requested Warehouse should exist according to business rules). Some people model this as a domain exception, e.g. WarehouseNotFoundException. Others treat it as an application exception instead. I’ve seen conflicting guidance: Some argue that “not found” is a domain error because the doma

Get image paths from tfds food101

3 December 2025 @ 2:04 am

I'm working on food101 tensorflow dataset and want to know the most wrong predictions of my efficientnet model, for that purpose I'd need to get image paths of test data, but I don't know how I can get the paths as the dataset is from tfds, not my own data (or downloaded in my computer).. Can anyone tell how can I get image paths from food101 test data.. This is what I've done so far: train_data, test_data), ds_info = tfds.load(name="food101", split=["train", "validation"], shuffle_files=False, as_supervised=True, with_info=True) builder = tfds.builder("food101") data_dir = builder.data_dir_root

Function sequence error with 2 statement handles

3 December 2025 @ 12:18 am

I tried the following (error handling omitted for clarity): query1 = "SELECT a,b,c FROM foo;"; query2 = "INSERT INTO bar VALUES( ?, ?, ? );"; SQLAllocHandle( SQL_HANDLE_STMT, m_hdbx, &stmt1 ); SQLAllocHandle( SQL_HANDLE_STMT, m_hdbc, &stmt2 ); SQLTables( stmt1, dBName, SQL_NTS, "%", SQL_NTS, "%", SQL_NTS, "%", SQL_NTS ); SQLExecDirect( stmt2, "BEGIN TRANSACTION", SQL_NTS ); SQL Prepare( stmt2, query2, SQL_NTS ); for( ret = SQLFetch( stmt1 ); ( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO ) && ret != SQL_NO_DATA; ret = SQLFetch( stmt1 ) ) { SQLBindParameter( stmt2, 1, .. ); SQLBindParameter( stmt2, 2, .. ); SQLBindParameter( stmt2, 3, .. ); SQLExecute( stmt2 ); } I thought since I'm running 2 different statement handles everything will be good, bit I got Function sequence error on the SQLExecute. Is there any workaround or

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.