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.

System.Net.WebException: The remote server returned an error: (426) Connection closed

21 December 2025 @ 4:20 am

Can anyone help please? Trying to write a c# desktop app which will access an FTP server and pull down a file(s). For developemnt I have one remote FTP server and one on my LAN. I can access both using Filezilla (client) just fine. The C# produces a 426 error when connecting to both servers. I have written the app using both System.Net and FluentFTP interfaces. Identical results. Windows 10 firewall is turned off, but if it were blocking surely it would block my code and Filezilla (client). What else is there that I could be over looking please? Full error is: System.Net.WebException: The remote server returned an error: (426) Connection closed; transfer aborted. atSystem.Net.FtpWebRequest.SyncRequestCallback(Object obj) atSystem.Net.FtpWebRequest.RequestCallback(Object obj) atSystem.Net.CommandStream.Dispose(Boolean disposing) atSystem.IO.Stream.

What to do for context with multiple families of strategy pattern

21 December 2025 @ 3:52 am

most examples show a single context with a single family of strategy, but what is the correct design for a context with multiple separate families of strategy e.g. setValidationStrategy(IValidationStrategy vs); setExportStrategy(IExportStrategy es); setSyncStrategy(ISyncStrategy st); }``` I am not finding an example as above. It even appears a little abstract factory-ey, but I am looking to use a strategy pattern.

How to use types correctly and avoid errors in PDDL

21 December 2025 @ 3:41 am

In my PDDL domain, as soon as I add "type" to each of variables, there is an error as follows, but it has no error if I remove these elements. Anyone knows the reason? Thanks! ...... ->Parsing 1. group of typed list Expected item to be a variable Got: -element translate exit code: 31 ......... type define in the domain file: (:types element -ele door - dor location - loc room - rm )

Finding Folder to use in Macro

21 December 2025 @ 3:16 am

Very new to VBA and Macros. I have only been learning for a few days so far. I am trying to make a code that will allow a user to select a folder that is used in the same macro so anyone who places the workbook needed can simply select the folder where it is at to run the remainder of the script. Below is what I have but I know the Function is not working with the Sub following it. THe Sub routine at bottom is working, the issue is wanting to be able to select the folder rather than hard code shown in the Set src below. My issue is how to tie the two together. Function ChooseFolder() As String Dim fldr As FileDialog Dim sItem As String Set fldr = Application.FileDialog(msoFileDialogFolderPicker) With fldr .Title = "Select a Folder" .AllowMultiSelect = False .InitialFileName = strPath If .Show <> -1 Then GoTo NextCode sItem = .SelectedItems(1) End With NextCode: Cho

How does multiple enumeration of an IEnumerable in LINQ affect performance with deferred execution in C#?

21 December 2025 @ 2:59 am

LINQ uses deferred execution, which means an IEnumerable can be re-evaluated each time it is iterated. In a real-world C# application, how does multiple enumeration of the same LINQ query affect performance, especially when the source involves database calls or other expensive operations? What are practical ways to detect multiple enumeration issues, and which patterns are recommended, such as ToList() or caching results, to prevent them without introducing unnecessary memory usage?

Broadcasting DataFrames across NumPy array dimensions

21 December 2025 @ 1:45 am

I'm working with a large Pandas DataFrame and a multi-dimensional NumPy array. My goal is to efficiently "broadcast" a specific column of the DataFrame across one or more dimensions of the NumPy array, performing an element-wise operation. Let's say I have a DataFrame df like this: import pandas as pd import numpy as np data = {'id': range(100), 'value': np.random.rand(100)} df = pd.DataFrame(data) And a NumPy array arr with shape (10, 5, 100, 20): arr = np.random.rand(10, 5, 100, 20) I want to multiply df['value'] by arr such that df['value'][i] is multiplied by arr[:, :, i, :] for all i. In essence, df['value'] should align with the 3rd dimension of arr. A solution might involve iterating or using np.apply_along_axis

cout vs. fprintf vs. fputs

21 December 2025 @ 12:05 am

I design my utility function not to throw an exception, as I don't want to deal with exception and to be able to use this function in a while loop. I also try to follow all the best practices I've learnt. namespace auxiliary { static bool str_to_double(const std::string &line, double &res) noexcept { char *end = nullptr; errno = 0; double value = strtod(line.c_str(), &end); if (line.empty()) { std::fputs("line is empty!\n", stderr); } else if (end == line.c_str()) { std::fputs("No characters consumed. Couldn't parse event the first character!\n", stderr); } else if (*end != '\0') { std::fputs("trailing nonnumerical character(s) detected\n", stderr); } else if (errno == ERANGE) { std::fputs("Overflow or underflow for double\n", stderr); } else { // everything's alright res = value

Segmentation faults on MPI_Info_create and MPI_Finalize

20 December 2025 @ 11:48 pm

For the source code as follows: #include <iostream> #include <cstdlib> #include <mpi.h> using namespace std; int main(int argc, char **argv){ int allocresult, infocreateresult; int tabsize = atoi(*(argv + 1)); int *myrank = new int(0); int *ranks = new int(0); MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, myrank); MPI_Comm_size(MPI_COMM_WORLD, ranks); MPI_Info *info1; infocreateresult = MPI_Info_create(info1); double **tab1init; double *tab1; MPI_Aint size1; if(!*myrank){ // initialization block size1 = tabsize * sizeof(double); } else { int workchunk = tabsize; workchunk /= (*ranks - 1); if(*myrank == *ranks - 1){ workchunk += tabsize % (*ranks - 1); } size1 = workchunk * sizeof(double); } allocresult = MPI_Alloc_mem(size1, *info1, tab1init); tab1 = *tab1init; // final block M

decrypting oddspot data through response interception

20 December 2025 @ 3:06 pm

import asyncio from datetime import datetime, UTC from playwright.async_api import async_playwright captured = [] async def run(): async with async_playwright() as p: browser = await p.chromium.launch(headless=True) page = await browser.new_page() async def handle_response(response): url = response.url.lower() if any(k in url for k in ("feed", "ajax", "match", "odds")): try: content_type = response.headers.get("content-type", "") if content_type.startswith("application/json"): data = await response.json() captured.append({ "url": response.url, "data": data, "captured_at": datetime.now(UTC).isoformat(), })

How to use method inside another method? [duplicate]

20 December 2025 @ 2:16 pm

I'm trying to learn Rust be rewriting a few of my small projects in C++ to Rust, but borrow checker seems to apply unreasonable rules caused by its limitations. The code in question is: pub struct ParticleEngine { system: Vec<ParticleArhetype>, width: u16, height: u16, buffer: Vec<u8>, fps: u8 } impl ParticleEngine { pub fn tick(&mut self) { let mut rng = rand::rng(); for archetype in &mut self.system { for particle in &mut archetype.particles { self.buffer[self.coordinates_to_buffer_index(particle.x, particle.y)] = b' '; particle.y.wrapping_add_signed(archetype.speed); particle.x = rng.random::<u16>(); particle.y = rng.random::<u16>(); self.buffer[self.coordinates_to_buffer_index(particle.x, particle.y)] = archetype.character; } } } fn coordinates_to_buffer_inde

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.