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.

about private copy/move ctors, operators, etc

14 February 2026 @ 1:29 pm

I've recently been backporting some Qt software to build against Qt 5.9, which (among other things) meant finding a solution for the fact that Q_DISABLE_MOVE(class) and the combined anti-copy+move macro were introduced in Qt 5.13 only. I understand the benefits of these mechanisms in helping prevent coding errors, but those are largely moot when you're backporting by adding #ifdef/#else constructions to support earlier versions of, in this case, Qt. The project in question has a lot of headerfiles that use QDISABLE_COPY_MOVE so the easiest and quickest way to get them to compile is via a conditional compiler argument: -DQ_DISABLE_COPY_MOVE=Q_DISABLE_COPY . With that, the code builds and runs. My question is if there are other benefits to disabling the move ctor and related operators, in terms of performance, memory usage or binary file size? The missing macros are easy and small enough to add, it just requires

How to set first record as active from a query result in php

14 February 2026 @ 1:21 pm

I'm building a carousel for testimonials fetching records from a mysql database with php and showing them in a bootstrap carousel. The bootstrap carousel requires that the first record (testimonial) is set as 'active' <div class="carousel-item active"> Here is the code I am using to get the records from the database. <?php include_once("site/config/config.php"); include_once("site/config/functions.php"); $connection = mysqli_connect($host,$usr,$pwd,$db); //Output any connection error if ($connection->connect_error) { die('Error : ('. $connection->connect_errno .') '. $connection->connect_error); } //MySqli Select Query $results = $connection->query("SELECT id, sender_name, submission_date,comments,source FROM testimonials WHERE is_live='checked' order by RAND() DESC LIMIT 8"); if($results->num_rows > 0) { while($row = $results->fetch_assoc()) { $sender_na

Expected: unqualified id before if [closed]

14 February 2026 @ 1:17 pm

In this code I'm facing a challenge of error: expected unqualified -id before "if" error: expected unqualified-id before else //Lab_01: Task_01: iCircle: #include<iostream> #include<math.h> using namespace std; int main(){ cout<<"\t\tC++ program to calculate the area of a circle"; //Define the variables float R, Area, Circumference; cout<<"Please enter the radius of the circle"; cin>>R; } //if condition applied if(R>0){ Area = 3.14*R*R; //Area of the circle. Circumference = 2*3.14*R; //Circumference of the circle. cout<<"Area of the circle"<<Area<<endl; //Print the area of the circle. cout<<"Perimeter of the circle"<<Perimeter<<endl; //Print the perimeter of the circle. } else{ cout<<"negative numbers cannot be applied"<<endl; system("pause");

Exoplayer related Composable makes an app not responsive

14 February 2026 @ 10:09 am

I have a custom PlayerComponent based ExoPlayer. It makes the whole application not responsive when it is playing. I thought that the issue is about too frequent position state updates, but when I made update period longer (1 sec) pretty much nothing changed. I guess the issue might be due to too many events handled in pointerInput lambda. Also I was suggested to substitute Canvas with a Slider, but that doesn't suite my case because I nee to draw more complex timebar in the future. Can you help me out? What has the most sugnificant impact on performance? @Composable internal fun PlayerControls( modifier: Modifier = Modifier, isPlaying: Boolean, position: Long, duration: Long, onPlay: () -> Unit, onPause: () -> Unit, onSeek: (Long) -> Unit, onSeekBack: () -> Unit, onSeekForward: () -> Unit, isFull

SpringBoot modular application dynamic scan new packages

14 February 2026 @ 9:36 am

I just cannot get this corerct: I have a class with @SpringBootApplication(scanBasePackages = "hu.xyz.spring") @Command(group = "DeToX base commands") @ShellComponent Typical code to start: SpringApplication application = new SpringApplication(any); context = application.run(args); Later private static void addPackage(String pkg) { ConfigurableApplicationContext cac = (ConfigurableApplicationContext) Main.ctx(); BeanDefinitionRegistry registry = (BeanDefinitionRegistry) cac.getBeanFactory(); ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(registry); scanner.scan(pkg); } In the pkg there is a bean called "xy" and that needs beans that are defined in the same package in a @Configuration If I add the scanBasePackages to include the pkg, then it all works The

Why does Combine.PassthroughSubject drop values sent synchronously in handleEvents(receiveSubscription:)?

14 February 2026 @ 12:41 am

I'm trying to understand Combine's subscription lifecycle and why PassthroughSubject drops values when they are sent synchronously inside handleEvents(receiveSubscription:). import Combine import XCTest class CombineSubscriptionTest: XCTestCase { var cancellable: AnyCancellable? func testSendingInReceiveSubscription() { let value = 1 let subject = PassthroughSubject<Int, Never>() let handler = subject.handleEvents(receiveSubscription: { _ in // Send value synchronously subject.send(value) subject.send(completion: .finished) }) let expectation = expectation(description: "test") var collectedValues = [Int]() cancellable = handler .sink { completion in expectation.fulfill() } receiveValue: { value in collectedValues.append(value)

MS Excel displays garbled characters for Azerbaijani text in CSV file exported with UTF-8 encoding

13 February 2026 @ 10:26 am

I'm generating a CSV file with Azerbaijani text using Java and UTF-8 encoding with BOM. The file opens correctly in WPS Office, but when opened in MS Excel, Azerbaijani characters appear as garbled symbols. Expected text: Riskli vergi ödəyicilərinin axtarışı What appears in Excel: Riskli vergi ödÉ™yicilÉ™rinin axtarışı My Code: public void writeCsvForInformationalServiceDetailed( List<InformationalServiceDetailedExcelItem> items, LocalDateTime periodStart, LocalDateTime periodEnd, HttpServletResponse response) { response.setContentType("text/csv; charset=UTF-8"); response.setHeader( "Content-Disposition", "attachment; filename=informational_service_detailed.csv" ); try (ServletOutputStream out = respons

Discord voice.play(source) doesn't do anything

7 February 2026 @ 3:13 am

When I try to play audio from a YouTube URL it doesn't play anything and outputs: [2026-02-06 22:11:21,663] {player.py:233} INFO - ffmpeg process 7252 successfully terminated with return code of 3436169992. into the server console. What is wrong with it? @commands.command() async def play(self, ctx, *, arg): FFMPEG_OPTIONS = { "before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5 -probesize 200M", "options": "-vn", } ydl_opts = { 'format': 'bestaudio/best', 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s', 'quiet': True, 'postprocessors': [{ 'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', 'preferredquality': '192', }], } # Searches for the video with yt_dlp.YoutubeDL(ydl_opts) as ydl: try:

Nmap running with very trivial script as argument not throwing expected string expected to be triggered depending on TCP port state (open/closed)

25 August 2025 @ 5:03 pm

I failed trying to get to work a very simple Lua script inside a testy2closed.nse (Nmap Script Engine). Tried on Mac and Linux, neither worked. Nor adding the script to the nmap scripts path (although running it from local folder there was no complain). The script looks to be parsed and executed by nmap with no errors, but the expected string/s for the test don't appear. The script should get internally the real state of a TCP port (open/closed [port number passed also as an argument for nmap]) and then show a string saying "This port is closed!" (if it is the case). Quite redundant, but is for a test. The script code (testy2closed.nse): -- HEAD -- description = [[ This is a simple script example that determines if a port is closed. ]] author = “Peter” -- RULE -- portrule = function(host, port) return port.protocol == &qu

Searching for exact album match using ytmusicapi

17 March 2025 @ 2:14 am

I'm looking for a way to reliably find an album given the artist name and album title using ytmusicapi. Per the documentation, I use a query string as '"<ARTIST_NAME>" "<ALBUM_TITLE>"' and this returns the correct value most of the time but there are cases where it returns items that don't match the query at all even though the same search finds it when executed from directly from the YT web page, e.g. a search for '"Adria Duch" "You Make Me Feel"' returns titles like 'The Phantom Of The Opera' by a completely different artist, regardless of the 'ignore_spelling' switch. I am using the following code for my search: yt = YTMusic() search_key = '"' + artist + '" "' + title + '"' search_results = yt.search(search_key, filter="albums", ignore_spelling=False) Any tips on how to get this to consistently return the album item would be much appreciated. TIA,

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

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

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

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.