Random snippets of all sorts of code, mixed with a selection of help and advice.
Why are statements from a stored proc not showing up in sys.dm_exec_query_stats in SQL Server?
4 June 2026 @ 4:50 pm
I've been using this query for years to measure performance of stored procedures...
select top 100
object_name( txt.objectid, txt.[dbid] ) as ObjectName, t1.Execution_Count,
(t1.Total_Physical_Reads / t1.Execution_Count) as AvgPhysReads, (t1.Total_Logical_Reads / t1.Execution_Count) as AvgLogReads,
(t1.Total_Logical_Writes / t1.Execution_Count) as AvgWrites, (t1.Total_Spills / t1.Execution_Count) as AvgSpills,
(t1.Total_Worker_Time / (t1.Execution_Count * 1000.0)) as AvgCPU, (t1.Total_Elapsed_Time / (t1.Execution_Count * 1000.0)) as AvgDuration,
replace( replace( substring( txt.[text], (t1.statement_start_offset / 2) + 1, 250 ), char (13), ' ' ), char (10), ' ' ) as SQL_Statement
from sys.dm_exec_query_stats as t1
cross apply sys.dm_exec_sql_text( t1.[sql_handle] ) as txt
where (object_name( txt.objectid, txt.[dbid] ) = '[stored proc name]')
order by ObjectName asc, t1.statement_start_offset asc;
In the past, I've learned to not expect (th
How to bypass Snowflake "Unsupported subquery type" error in SQL UDTF called via LATERAL JOIN?
4 June 2026 @ 4:39 pm
I am facing a challenging SQL compilation error: Unsupported subquery type cannot be evaluated error inside a Snowflake SQL User-Defined Table Function (UDTF).
The Context & Use Cases
I have a core calculation UDTF that handles complex insurance math. It must support two distinct business use cases:
Power BI / Single Pass: End users pass a static group number and date range (only 3 parameters). Optional metrics parameters default to NULL or fallback values inside the function. This works perfectly.
Ad-hoc / Batch Processing: Users need to pass a dataset of distinct group numbers (e.g., from a driver table or VALUES clause) and run the function separately for each group using a LATERAL join. This is where it fails.
The Blocker
When calling the function dynamically across a
Is there and will there be a demand for a fullstack nextjs based dev in the current job market? or i should learn dedicated backend framaeworks?
4 June 2026 @ 4:35 pm
With AI tools becoming increasingly capable, they can already:
Generate large parts of a Next.js app
Suggest architecture improvements
Recommend industry best practices
Help with debugging and implementation
Answer many technical questions instantly
So I have two questions:
Are companies genuinely hiring developers whose primary stack is Next.js full-stack (App Router, Server Actions, Route Handlers, Auth, DB integration, etc.)? If yes, what kinds of companies and roles are hiring them, and what skills beyond building CRUD SaaS apps are they expected to have?
What are the key areas where AI still falls short, and where a strong Next.js/full-stack developer provides significant value? In other words, what capabilities should an aspiring developer focus on building that AI currently cannot reliably replace but can instead be used to amplify?
What is the correct syntax to call this method?
4 June 2026 @ 4:11 pm
I am trying to use Prism (DryIoc) for dependency injection.
Given the following class:
internal class MainWindowViewModel : BindableBase
{
private readonly ITestingService _testingService;
public MainWindowViewModel(ITestingService testingService, string someValue)
{
_testingService = testingService;
}
}
I have registered an implementation for "ITestingService", but I want to pass "someValue" at the time of resolution.
As far as I can see, the "Resolve" method I need to call has this signature:
public static T Resolve<T>(this IContainerProvider provider, params (Type Type, object Instance)[] parameters)
But I cannot work out how to pass the String required for the MainWindowViewModel using the "params" parameter.
var mainViewModel = Container.Resolve<MainWindowViewModel>(?????);
"Expand" file system path in an Excel cell - write subfolders to the cells below
4 June 2026 @ 4:11 pm
I'm working on a folder tree restructuring for our team's file share. Before actually changing anything, I want to list the planned moves/renames/deletes etc. in Excel.
For this, I want to have a representation of the folder tree in an Excel sheet. Using VBA, it is obviously possible to iterate over the file system and write the entries to the sheet. However, rather than reading the folder tree once up front, I'd rather like the tree to be interactive, allowing me to expand paths like in a file explorer.
Example: When I have
C:
C:\Users
C:\Program Files
C:\Windows
in the Excel sheet, select C:\Users and start a VBA macro, I want to have
C:
C:\Users
C:\Users\Default
C:\Users\MyUserId
C:\Users\Public
C:\Program Files
C:\Windows
I'm sure, someone alreay has a handy little VBA script for this at hand...
FAT32: External drive (MP3 player) is deleting edited directory entries? [closed]
4 June 2026 @ 3:59 pm
I've been trying to create a system where the same data can be pointed to by several directory entries. I have an original file, original.mp3, then create several pointers like so: original (1) (P).mp3, original (2) (P).mp3, original (3) (P).mp3. I go into a hex editor, find the directory entry for original.mp3, copy the bytes at offsets 20 and 21 (high bits of the cluster where the file's data is at), 26 and 27 (low bits), then 28, 29, 30, and 31 (file size) to the same offsets in the pointers' directory entries to make the pointers refer to the same data as the original. This works perfectly on a disk partition on Windows 10, but when I do this to the mp3 player and start it, it deletes all the pointers while loading. This doesn't happen if I simply copy and paste original.mp3 to another folder. Is this avoidable? The player is a Philips SA1110, and I don't have another one to verify that it's just Philips that does this.
How to dump libyoyo.so
4 June 2026 @ 3:06 pm
This is a library for Android game and used with Game Maker. I've tried dumping it with radare2 and readelf, but I couldn't identify the strings clearly and it lacked the functionality of the older version of the library. I think it's either in the logic of another function or has been renamed. So I'd like to ask how to dump it more clearly, or if there's another way to dump it?
Please help me with machine learning pipeline
4 June 2026 @ 2:02 pm
My teacher gave us a task that requires training and improving a machine learning model to achieve the best possible prediction results. He even organized an in-class competition, so if my model performs poorly, I will fail the course. I've tried my best, but no matter how much I train it, my RMSE score only reaches 0.58519.
Here is the complete assignment description and the project dataset:
Everything about project
DESCRIPTION
Wine Quality
Source:
Paulo Cortez, University of Minho, Guimarães, Portugal, http://www3.dsi.uminho.pt/pcortez A. Cerdeira, F. Almeida, T. Matos and J. Reis, Viticulture Commission of the Vinho Verde Region(CVRVV), Porto, Portugal @2009
Acknowledgement
We thank P. Cortez, A. Cerdeira, F. Almeida, T.
Can one make checkboxes and buttons trigger OnKeyListener.onKey()?
4 June 2026 @ 10:50 am
I am developing an application that has misc. forms containing multiple fields (i.e. checkboxes, buttons and editable text-fields). To allow the user to be able to also navigate through these forms using the left and right keys of a keyboard (i.e. react to KeyEvent.KEYCODE_DPAD_LEFT -> "go to previous field" or KeyEvent.KEYCODE_DPAD_RIGHT -> "go to next field", resp.) I assigned a corresponding OnKeyListener to all widgets.
This works fine with EditText-fields but not with CheckBox and Button. The latter don't trigger the OnKeyListener (even though one is assigned!).
Is it somehow possible to also trigger the OnKeyListener.onKey(...)-method for these widgets? Some flag or setting that I am missing?
JavaFX Clipboard.getImage() returns a fully transparent image when copying from Firefox on Windows 10
4 June 2026 @ 9:08 am
I'm reading images from the system clipboard using JavaFX:
Clipboard clipboard = Clipboard.getSystemClipboard();
if (clipboard.hasImage()) {
Image image = clipboard.getImage();
System.out.println( "Width = " + image.getWidth());
System.out.println( "Height = " + image.getHeight());
System.out.println( "Error = " + image.isError());
PixelReader pr = image.getPixelReader();
System.out.println( "PixelReader = " + pr);
System.out.printf( "ARGB(0,0) = %08X%n", pr.getArgb(0, 0));
img.setImage(image);
}
The strange thing is that:
clipboard.hasImage() returns true
clipboard.getImage() returns a non-null Image
image.isError() returns false
Width and height are correct
The image has a valid PixelReader