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 do I import torch without receiving erors?

31 May 2026 @ 11:30 pm

I receive the error below when importing torch. I'm not sure how to install torch. Do I install it into my command prompt or how can I install it directly in jupyter notebook? I am not sure how to use pip, but everytime I try to install torch using pip I receive the same error below. Please explain how I can install torch in a very specific and simple way since I am not an extremely experiences programmer. Thanks import torch import torch.nn as nn import torch.nn.functional as F import math text = "hello world! transformers are fun." # Training text chars = sorted(list(set(text))) vocab_size = len(chars) char_to_idx = {ch: i for i, ch in enumerate(chars)} idx_to_char = {i: ch for i, ch in enumerate(chars)} data = [char_to_idx[ch] for ch in text] X = torch.tensor(data[:-1]) Y = torch.tensor(data[1:]) class PositionalEncoding(nn.Module): def __init__(self, d_model, max_len=100): super().__init__() pe = torch.zeros(max_len, d_model)

Consistent gets during pipelined function

31 May 2026 @ 10:47 pm

I have a very simple split function in Oracle 26 (os: oel9). My test case is: -- test, run that 2-3 time to avoid h-parsing exec dbms_monitor.session_trace_enable(); select split_to_array('Hello, Wor ld!!! sdfgsdsd sdfsd sdf sdfsdfdsfsd sdfsdfsdf', ' ') from dual; exec dbms_monitor.session_trace_disable(); Everything works fine, but I see this in the trace file: select split_to_array('Hellow, Wor ld!!! sdfgsdsd sdfsd sdf sdfsdfdsfsd sdfsdfsdf', ' ') from dual call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 0 0 0 Execute 1 0.00 0.00 0 0 0 0 Fetch 2 0.00 0.00 0 6 0 1 ------- ------ -------- ---------- ---------- -----

Unexpected behavior in protocol inheritance

31 May 2026 @ 10:40 pm

I use main actor by default in project settings, and use Swift 6 mode. Here's the code: public protocol Main {} nonisolated public protocol NonIso {} // Foo is on main // As proven by the compilation failure in `testNonIso()` public protocol Foo: NonIso, Main { func foo() } nonisolated func testNonIso() { let f: Foo! = nil // Call to main actor-isolated instance method 'foo()' in a synchronous nonisolated context f.foo() } As verified by my testNonIso() function, the Foo protocol is isolated to main. Then I mark Foo as nonisolated, and the error is gone: public protocol Main {} nonisolated public protocol NonIso {} // Foo is on nonisolated // As proven by no compilation error in `testNonIso()` nonisolated public protocol Foo: NonIso, Main { func foo() } nonisolated func testNonIso() { let f: Foo! = nil // this compiles fine, since Foo is non-isolated f.foo() }

struggling to get libcurl to return only a specific amout of html from a site

31 May 2026 @ 9:20 pm

I don't want all the html from a specific site so i tried to alter CURL_MAX_WRITE_SIZE (not sure if I did this right, I'm new to C). Unfortunately it still returns way more than 650,000 characters and gives me the entire site. #include <stdio.h> #include <curl/curl.h> #ifdef CURL_MAX_WRITE_SIZE #undef CURL_MAX_WRITE_SIZE #define CURL_MAX_WRITE_SIZE 650000 #endif //for now this just prints the code for debugging purposes int processCode(char html[]){ printf("%s", html); return 0; } int main(){ CURL *curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "https://amazon.com"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 650000L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, processCode); curl_easy_perform(curl); curl_easy_cleanup(curl); return 0; }

How to mass edit XML?

31 May 2026 @ 7:11 pm

I have a bunch of xml files which needs some correction. <body> <text> <text> second level text before </text> main text <text> second level text after </text> </text> </body> I need to convert all text tags which are "second level" to comment. So that final xml would become <body> <text> <comment> second level text before </comment> main text <comment> second level text after </comment> </text> </body> Is there a tool which can help with this?

React native firebase notifications quick action

31 May 2026 @ 5:34 pm

We have a chat application built with React Native, and we are using React Native Firebase Cloud Messaging (FCM) for notifications. We have a requirement to support quick actions in notifications, similar to WhatsApp, where users can reply to a message directly from the notification bar without opening the app. Currently, messages are sent through a socket connection, although we can also use an API for sending messages if needed. My requirements are: 1. Always show notifications with a reply action/input field. 2. Ensure that messages sent from the notification reply action are delivered reliably and never lost. I looked into using silent notifications to trigger a local notification with a reply action. However, I'm concerned about reliability. If the user has force-quit the app, can a local notification still be shown reliably? I need a solution similar to WhatsApp's implementation. Could you advise on the recommended approach for

What is inappropriate about CultureInfo.CurrentUICulture?

31 May 2026 @ 1:27 pm

I just enabled Code Analysis rule CA1305 in my code base, and I get lots of the following warning: Warning CA1305: The behavior of 'string.Format(string, object)' could vary based on the current user's locale settings. Replace this call in 'some-function' with a call to 'string.Format(IFormatProvider, string, params object[])' This is fine, that's why I enabled CA1305 for. However, on one occasion where I have a construct like this: text.SomeParsingMethodWithFormatProvider(CultureInfo.CurrentUICulture) I get the following warning: Warning CA1305: 'some-function' passes 'CultureInfo.CurrentUICulture' as the 'IFormatProvider' parameter to 'SomeParsingMethodWithFormatProvider'. This property returns a culture that is inappropriate for formatting methods Huh? So in exactly what way is CultureInfo.CurrentUICulture inappropriate for formatting methods?

Grouping text rows in equal-sized groups

31 May 2026 @ 10:30 am

I have a table containing a lot of typed/named items and I want to create a (materialized?) view to group them together so that a UI can later make it easier for users to select. Description The goal is: If there are N elements of the same type, make sqrt(N) groups each of size sqrt(N). Instead of having e.g. 10k elements to scroll through, the UI would show 100 lines (the groups), each of which can be expanded into 100 lines (the items inside each group). 1 more click to make but a lot less scrolling. The UI will display group names as the range containing the named elements inside it. For instance, if a group contains all the items whose names start with A and B (but not C and beyond), then the group should be named A-B. If a group contains all the elements starting with C until e.g. EG, but elements starting with EH are the the next group, the group should be name C-EG. The idea is: Instead of c

Should I write long signed int or just long if I want a signed int of 32 bits?

31 May 2026 @ 10:26 am

So I just wondered if it would be better to be explicit with types e.g. using long signed int for a signed 32 bit int. Or if it would be better to just not waste your time and just write long from a best practice perspective in C. Can some compilers on some platforms misinterpret long as long float or long unsigned int?

Modulus of Very large Number

31 May 2026 @ 7:48 am

You are given a very large number N (which goes upto 1e10000) and a 64 bit integer P. How do i find N % P? for example: N= 8290826691135830692772803 , P = 95972011 modulus (N % P) = 60316167 obviously we cannot store N as a number and BigInteger does not exist in the C programming language (gmp is out of the question) How else can this be solved

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

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.

WebAIM.org

VN:F [1.9.22_1171]
Rating: 4.0/10 (1 vote cast)

Web Accessibility In Mind

An Extension is Not an Excuse

28 May 2026 @ 9:20 pm

The Department of Health and Human Services recently announced a one-year extension of the compliance dates for web content and mobile app accessibility requirements under Section 504 of the Rehabilitation Act. The requirements themselves are not new in substance: covered recipients of HHS federal financial assistance must make covered web content and mobile apps conform […]

Tolerating Inaccessibility

30 April 2026 @ 5:50 pm

The latest WebAIM Million report shows that detectable homepage accessibility errors increased over the past year. This article considers what those results may reveal about the organizational and societal forces that continue to deprioritize accessibility, and challenges us to imagine a world where inaccessibility is no longer tolerated.

Ask AIMee: An accessible accessibility-focused AI chatbot

31 March 2026 @ 4:49 pm

We’re happy to introduce AIMee – an easy-to-use, AI-powered conversational chatbot focused on accessibility. AIMee has been designed to be highly accessible to users with disabilities. Ask her accessibility questions to get quick answers and guidance. The name “AIMee” plays off of the “AIM” (Accessibility In Mind) from “WebAIM” and also “AI”. Here are some […]

A New Path for Digital Accessibility?

27 February 2026 @ 7:02 pm

Please note This post will explore how an adaptive, intelligent system could empower users with disabilities to optimize their experience in digital environments. Even were such a system available tomorrow, developers of digital content, services, and products would still be responsible for providing equal access to ALL users. Consider a few of the many exciting […]

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