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.

Advice on how to approach small-scale restaurant reservation system

3 March 2026 @ 10:06 pm

First Year CS Student here I work for a small seafood restaurant business while learning CS on the side and I was thinking about developing a reservation system for them instead of getting them to subscribe to one (plus makes a good side project) I was thinking about developing a full stack project, however the computer that has the POS system installed cannot access the internet (it does have Chrome installed tho) so I am trying to figure out the best way to deploy this locally One option I’m considering is building the app as a simple HTML/JavaScript page and running it locally in Chrome. I could move the file between computers using a USB drive store the reservation data using localStorage. Would this approach make sense, or is there a better way to handle this? Would appreciate the advice, just looking for some guidance :)

Unable to call private method for System.Security.Cryptography.X509Certificates.SubjectAlternativeNameBuilder

3 March 2026 @ 9:51 pm

SubjectAlternativeNameBuilder doesn't provide a method to add Registered Id attribute so, I'm trying to use reflection to achieve my goal: var assembly = typeof(SubjectAlternativeNameBuilder).Assembly; var generalNameAsnType = assembly.GetType("System.Security.Cryptography.Asn1.GeneralNameAsn"); var generalNameAsn = Activator.CreateInstance(generalNameAsnType); generalNameAsnType.GetField("RegisteredId", BindingFlags.Instance | BindingFlags.NonPublic) .SetValue(generalNameAsn, "1.3.6.1.4.1.311.20.2.3"); var methodInfo = typeof(SubjectAlternativeNameBuilder).GetMethod("AddGeneralName"); var san = new SubjectAlternativeNameBuilder(); methodInfo.Invoke(san, \[generalNameAsn\]); But I'm getting NullReferenceException at the last line. And for some reason I can't debug into methodInfo.Invoke. If I try I see the following

How can i make my telegram bot get into Groups

3 March 2026 @ 9:48 pm

I'm building a Telegram bot using python-telegram-bot (v20+) that needs to: Join or be added to multiple Telegram groups focused on cybersecurity (threat intel, hacking tutorials, CVE discussions, etc. Monitor all incoming messages in those groups and detect: URLs / links Video files or media attachments Plain message text containing cybersecurity-related keywords Save all detected content to a database or structured file (preferably SQLite or a CSV log) for later review

Java.awt and itext.FontFactory font refactoring: What's the best way to refactor a large code base to a new font?

3 March 2026 @ 9:25 pm

I am working with a large legacy application. Throughout the application, there are calls to generate PDFs with iText, or to generate text headers for charts etc. which utilize java.awt.Font to load the proper font. Previously this was always run on Windows servers, but now we're putting the application on Linux servers, and ideally it would look the same regardless of the operating system. I've selected a series of replacement fonts that we can use on both operating systems, but I'm a bit stumped on the best way to implement this "refactoring". For iText, I'm fine just manually updating them by hand, since there are fewer places it's used. Unfortunately the java.awt.Font issue is messier to resolve because it's all over the place. My plan originally, was that I was hoping I could add the fonts to the java.awt at runtime (which I have done successfully already), and then reassociate the old font family names to the new

Trying to stop code that calls getUi() on a mobile device [duplicate]

3 March 2026 @ 9:24 pm

I'm trying to prevent code that calls SpreadsheetApp.getUi() when my spreadsheet is accessed on a mobile device. I'm getting timeout errors, as I think getUi() is still being called and the following .alert() is likely causing the timeout error. Did I make a mistake, or is no error being raised on a mobile device when getUi() is called? Variable message has already been declared with var message earlier in the code . try { if (editedCell == 'F2') { ss.uncheck(); message = SpreadsheetApp.getUi(); message.alert('Enter the number of players in cell D2, up to 8.\nThen enter the player names starting in cell B1, then C1, up to I1.\nMake sure that at least one player cell background is cyan, \nThis colour is meant to be a visual reminder of whose deal it is.\nEnter the score of each player below each player name, starting in row 4.\nThe total of each player will appear in the yell

pattern recognition with times series

3 March 2026 @ 9:00 pm

I am working on a time series analysis project based on 5 years of electricity consumption data from a company (millions of rows stored in CSV files). My goal is to detect the most recurrent consumption pattern (motif) in this dataset. However, I am facing several challenges: The subsequences may have variable lengths (the pattern duration is not fixed). I need to automatically identify the start and end timestamps of each detected subsequence. The dataset is very large (millions of data points), so scalability is important. What would be the best approach or algorithm to: Detect the most frequent or representative motif? Handle variable-length subsequences? Efficiently determine the start and end indices of each motif occurrence? I am considering similarity-based methods (e.g., DTW) but I am unsure how to efficiently apply them at s

How to use ASLR linker settings when calling third party DLLs?

3 March 2026 @ 6:55 pm

Just spent a couple of frustrating days trying to trace down a problem with my apps, which have worked perfectly for years, but then starting having problems when compiled on a new machine with the latest Delphi compiler. The problem finally was isolated to the linker ASLR settings, which are enabled by default on the new machine, but were turned off on the old machine. The symptoms are random access violations and return errors from functions called in third party DLLs, specifically the National Instruments and FTDI instrument drivers, but others as well. What function are these settings trying to address, and why are they enabled by default if they are incompatible with external DLL calls? I guess they are a security measure, am I using them incorrectly?

How to change vertical alignment of individual items in SwiftUI HStack?

3 March 2026 @ 6:07 pm

I have the following code. struct ContentView: View { @State var textInput: String = "Testing" private let inputCornerRadius: CGFloat = 24 var body: some View { HStack(alignment: .bottom, spacing: 8) { TextField("Chat", text: $textInput, axis: .vertical) .lineLimit(1...9) .textFieldStyle(.plain) Button(action: send) { Image(systemName: "paperplane.fill") .foregroundStyle(.background) .imageScale(.medium) .padding(10) .background( Circle() .fill(Color(.label)) ) } } .padding(.vertical, 8) .padding(.leading, 10) .padding(.trailing, 6) .background( RoundedRectangle(cornerRadius: inputCornerRad

SwiftUI: how to handle side effects when a view's property is updated?

3 March 2026 @ 5:47 pm

I know this piece of code works: let name: String //let's say a view has a property name var body: some View { TextField("Name", text: $name) .onReceive(Just(name)) { value in //use onreceive with Just to get an callback event whenever the name is changed. print(value) } } But I want to know if Apple has a session discussing how to handle this specific scenario. In their Data Essentials with SwiftUI, they only mentioned using @State and @ObservableObject and such. So I don't know if what I am doing is somehow sketchy. Theoretically the view's body is computed every time the name property is updated, and maybe that means the onReceive get recomputed, but since onReceive is not a View, but an extension function on the View itself, I am not sure if the logic applies. If theres a session where Apple discusses t

How to switch over a large number of cases with an extremely skewed distribution in an efficient way?

3 March 2026 @ 5:23 pm

We have a service that when sending messages to us, includes a uint8_t error code. With several hundred possible codes. In our application, we translate this into about 8 categories of errors in an enum class, i.e. enum class error_type { A, B, C, ...}. This is very straightforward to do, some variant of: error_type translate_error_type(uint8_t error_code) { switch(error_code) { case 0: return error_type::A; case 1: return error_type::D; // ... hundreds of more cases to deal with. Unforturnely not a good translation between error_codes and our internal classes over ranges of error_code values to make optimization easy. } } In real data though, about 5 cases almost completely dominate. How would you write this function so a compiler (gcc11 in this specific case) would generate better code than a single huge jump table to optimize for latency i

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

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

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

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.