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 to reliably calculate rolling metrics when the dataset contains missing values in Python?

2 December 2025 @ 3:04 am

I’m working on a data analytics project where I need to calculate rolling averages and rolling sums on a dataset that has missing values in some numeric columns. Example: date,value 2024-01-01,10 2024-01-02, 2024-01-03,15 2024-01-04,20 2024-01-05, My current code: import pandas as pd df = pd.read_csv("data.csv", parse_dates=["date"]) df = df.sort_values("date") df["rolling_avg"] = df["value"].rolling(window=3).mean() df["rolling_sum"] = df["value"].rolling(window=3).sum() The issue is that the results include NaN whenever there are missing values, and I’m not sure what the best practice is: My questions: Should missing values be filled, ignored, or interpolated before calculating rolling metrics? Is there a recommended method for time-series analytics where missing values are common? Does pandas provide a built-i

Why big data log cause the java progress memory high?

2 December 2025 @ 3:03 am

problem--why the big log data cause the jvm memory go high? memory problem top res problem: the java process is using more and more memory over time. jvm argument:java -Xmx5120M -Xms5120M -XX:NewRatio=1 -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/log -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Xloggc:/data/log/gc-%t.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20m -XX:ErrorFile=/data/log/hs_err_%p.log -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCMSInitiatingOccupancyOnly -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:NativeM

Data Ownership and Transaction Managment in SOA

2 December 2025 @ 3:02 am

I'm trying to learn more about Service Oriented Architecture as to me, it seems like a good middle ground between monolithic and micro service applications. Please correct me if I'm wrong but the primary goal is to segment domains (business logic) into separated independent services that are still wrapped by an overarching build orchestrator. From my perspective, even though the domains are separated and independent, that doesn't necessarily mean that each domain should control an independent persistent layer, instead they should share a persistent layer to share referential integrity and maintain easy querying. This leads me to my primary questions: If there are multiple independent services that are all making transactions to the db, how do you ensure that if there is a failure in a downstream process, how do you properly manage the rollback of the previous transactions? Do you just literally chain try catches from the start all

Trigger Function to check record uniqueness

2 December 2025 @ 2:54 am

I have a trigger in Postgresql 13 like this to prevent duplicate entry on one of the coloumn : This trigger is used in Arcgis Field Map apps. CREATE OR REPLACE FUNCTION xxx_check_unique() RETURNS TRIGGER AS $$ BEGIN IF (SELECT EXISTS(SELECT FROM schema1.chamber where id = new.id)) = 'false' THEN //check RETURN new; //if no duplicate exist, enter this value else RAISE INFO '% DUP', new.id; return null; //if there is duplicate, do nothing end if; END; $$ LANGUAGE plpgsql; CREATE OR REPLACE TRIGGER xx_check_unique BEFORE update of id ON schema1.chamber FOR EACH ROW EXECUTE PROCEDURE xxx_check_unique(); CREATE OR REPLACE TRIGGER xx_check_unique BEFORE insert ON schema1.chamber FOR EACH ROW EXECUTE PROCEDURE xxx_check_unique(); Question : Is the part "RETURN NULL" correct ? This part is causing the Field Map to return an error if a

Troubleshooting memory leak / retain cycle in Apple's camera app tutorial

2 December 2025 @ 2:48 am

I'm following along this camera tutorial from Apple: https://developer.apple.com/tutorials/sample-apps/capturingphotos-camerapreview I have a DataModel: final class DataModel: ObservableObject { let camera = Camera() @Published var frame: Image? var isPhotosLoaded = false init() { print("DataModel init") Task { await handleCameraPreviews() } } deinit { print("DataModel deinit") } func handleCameraPreviews() async { let imageStream = camera.previewStream .map { $0.image } for await image in imageStream { Task { @MainActor in // CIFilters to come... frame = image } } } } And the Camera: class Cam

Calculate how many hours are available based on multiple approvals with varying start and end dates and hours spent

2 December 2025 @ 2:47 am

I have a client who issues approvals (as a letter) to spend time on specific projects in specific codes. Like: Approval No: R124-18 Project: A Date: 2/12/2024 Start: 2/12/2024 End: 2/03/2025 Code: alpha 124: 12 hours alpha 592: 8 hours alpha 593: 6 hours We capture this in an "Approvals" table like this (one project only shown for clarity): Date Start End Project Approval No Code Hours 2/12/2024 2/12/2024 2/03/2025 A R124-18 alpha 124 12 2/12/2024 2/12/2024 2/03/2025 A R124-18 alpha 592 8 2/12/2024 2/12/2024 2/03/2025 A R124-18 alpha 593 6 19/02/2025

Reverse an Array by recursion using swap in python

2 December 2025 @ 2:46 am

so I was trying to reverse an array by recursion so the code logic is we are swaping right most end value to the left most end. I have implemented logic but the thing is My recursion function retuns None when I explicity wants to return the reversed array. so I wanna know why it is returning None when I was trying to return an array. I have given a code below so please someone can explain me why it is happening and thank you in advance def reverse_array(left,right,array): if left > right: return array swap = 0 swap = array[left] array[left] = array[right] array[right]=swap reverse_array(left+1,right-1,array) array = [1,2,3,4,5] print(reverse_array(0,4,array))

MySQL 8 query always returns the full list instead of missing records when comparing against existing table

2 December 2025 @ 2:45 am

I’m working with MySQL 8.0.35 on DBeaver app and trying to compare a list of books in Spanish (title + author) against my table libros, which has two columns: titulo and autor. My goal is to return only the books that do NOT already exist in the libros table. I'm not fully acquainted with SQL queries and asked ChatGPT to generate a large inline table using SELECT ... UNION ALL ...: SELECT t.titulo, t.autor FROM ( SELECT 'Cuentos Del Hambre' AS titulo, '' AS autor UNION ALL SELECT 'Limites Existenciales', 'A.A.Genie' UNION ALL SELECT 'En Casa De Ana Los Arboles No Tienen La Culpa', 'Andira Watson' -- (over +100 more rows) ) AS t LEFT JOIN libros c ON LOWER(c.titulo) = LOWER(t.titulo) AND LOWER(c.autor) = LOWER(t.autor) WHERE c.titulo IS NULL; However, it's failed to return the list of books not already present on the table 'libros'.

Why can std::string only create a constexpr object if it's a static variable?

2 December 2025 @ 2:37 am

I'm wondering why std::string can't be constexpr if it's a stack variable: #include <string> #include <iostream> #include <cstring> constexpr std::string str15 {"123456789012345"}; // THIS COMPILES struct Foo { constexpr Foo() : a(6) { for (int i = 0; i < 8; ++i) buff[i] = 0; } int a; char buff[8]; }; constexpr void func() { constexpr Foo f{}; // THIS COMPILES constexpr std::string str15 {"123456789012345"}; // THIS DOESN'T COMPILE } int main() { func(); return 0; } error: 'std::string{std::__cxx11::basic_string<char>::_Alloc_hider{((char*)(& str15.std::__cxx11::basic_string<char>::<anonymous>.std::__cxx11::basic_string<char>::<unnamed union>::_M_local_buf))}, 15, std::__cxx11::basic_string<char>::<unnamed union>{char [16]{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', 0}}}' is not

NumPy generate a 2d linear array using multiple values

2 December 2025 @ 2:37 am

So I'm trying to generate a map for a personal project using opensimplex noise, multiple layers etc. My problem is that I want to recreate the equator to combine with a temperature map to obviously make it colder at the poles and warmer in the middle, the issue is that I'm new to NumPy so I don't know how to do this. This is what I want the dataset to look like when it's returned [[-1, -1, -1, -1, -1, -1], [ -0.9, -0.9, -0.9, -0.9, -0.9], [ -0.8, -0.8, -0.8, -0.8, -0.8], ... ] So, each nested array would be filled with the same value, the reason I need this to recur like this is since I need to combine it with a noise map to make the middle warmer and the top and bottom colder. There is also the second issue that I'm not aware on how to solve of creating multiple "keypoints" of sorts, where the range would be, for example: -1, 1, -1, not just the range being from -1 to 1

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.