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.

LightGBM regression on rank-transformed target: “No further splits with positive gain” and nearly-constant predictions

26 January 2026 @ 12:29 pm

I’m training a LightGBM model where the evaluation metric is Spearman correlation (rank-based). To better align training with the metric, I transform the continuous target y into ranks scaled to [0,1]: y_rank = pd.Series(y).rank(method="average") y_rank = (y_rank - 1) / (len(y_rank) - 1) I then train LGBMRegressor on y_rank (features are all numeric, no categorical). Dataset is ~7,500 rows and ~18 numeric features. However, during training I often see: \[LightGBM\] \[Warning\] No further splits with positive gain, best gain: -inf and the model ends up producing nearly constant predictions (almost no variance), which makes the Spearman score poor. Questions: What are the most common causes of best gain: -inf / “no positive gain” in this setup (rank targ

How to start learning NestJS [closed]

26 January 2026 @ 12:26 pm

I am an experienced Laravel developer and now I want to start learning NestJS. I am looking for the I want advice based on real-world experience, not AI-generated tutorials. Recommended project setups, learning paths, or common pitfalls for someone coming from Laravel are especially helpful. Thank you in advance for sharing your insights!

Window force close on fedora [closed]

26 January 2026 @ 12:22 pm

I just switched my Lenovo laptop to fedora a day ago and it was really good (though the boot take more time than window on my laptop). But i faced a problem whenever I open zoom meeting app (installed from fedora software installer) and try to connect my device to a bluetooth earphone. The screen suddenly becomes black and it goes back to the lock screen. All of the process that are running got stopped and this notif shows up like the images below. It only happen on zoom so far Anyone has ever experienced this? enter image description hereenter image description here

What is the reason Maven is downloading whole range of POM files instead of the latest one?

26 January 2026 @ 12:16 pm

I'm trying to import mapdb 3.1.0 which has an open version range for Guava: <guava.version>[15.0,)</guava.version> ... <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${guava.version}</version> </dependency> I know it is generally discouraged to use version ranges, but no more than that. What I would expect happen in this case: Maven will download maven-metadata.xml for this artifact, sort versions using version sorting rules, pick the last one (observing bounds). Then download and use it. It is not what happens (Maven 3.9): Instead, it seems to download every version in the range, 200 of these, POM and parent-POM. In the middle of the list there is a problematic version for whose parent-POM does not exist, which causes the whole build to fail without

facebook Graph API App Review Catch-22: Webhooks only fire in Live mode but messaging blocked without approval

26 January 2026 @ 12:11 pm

I’m implementing an Instagram Auto-DM system using Meta Graph API and hit a serious App Review deadlock. What works ✅ In Live Mode: Webhooks fire correctly Payload reaches server BUT sending messages fails with: (#3) Application does not have the capability to make this API call What doesn’t work ❌ In Development Mode: Admin + IG Tester account IG Professional account Page subscribed to app Webhook verified /subscribed_apps confirms subscription ➡️ Webhook never fires Why this is a problem Meta App Review requires a video showing: Trigger Webhook reception Message send Message delivered in Instagram app But: Live Mode → webhook works, API blocked Dev Mode → API allowed, webhook dead Questions Is this expected Meta behavior? Are Instagram webhooks disabled in Dev mode? How are devs

emcc: compiling with fsanitize=address and async function raises compile error

26 January 2026 @ 12:02 pm

I have an emscripten project which relies on the -sASYNCIFY features. Trying to compile it with fsanitize=address as additional argument to reveal problems fails because the functions wrapped with the EM_ASYNC_JS macro are then not seen by the compiler anymore. I have a function EM_ASYNC_JS(void,addPersistentDirsInt,(),{ and the compiler raises error: undefined symbol: addPersistentDirsInt (referenced by root reference (e.g. compiled C/C++ code)) warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0` warning: _addPersistentDirsInt may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library Error: Aborting compilation due to previous errors at finalCombiner (file:///Users/leo/w/github/emsdk/upstream/emscripten/src/jsifier.mjs:889:13) at Module.runJSify (file:///Users/leo/w/github/emsdk/upstream/emscripten/src/jsifier.mjs:925:5)

Laravel View Composers with Layouts

26 January 2026 @ 11:59 am

Description I have recently updated my code to put layouts in resources/views/layouts instead of resources/views/components/layouts. This means I have also updated all pages that use these components to use Blade's layout namespace. Example Rendering a layout in resources/views/layouts/app/sidebar.blade.php used to be done by... <x-layouts.app.sidebar> ... </x-layouts.app.sidebar> Now after the migration... <x-layouts::app.sidebar> ... </x-layouts::app.sidebar> The Problem I have a View composer setup for my sidebar to populate the sidebar with data. Before the migration the composer was called in AppServiceProvider like so... Facades\View::composer('components.layouts.app.sideba

Combining to tables for all possible options

26 January 2026 @ 11:56 am

I have 2 tables which I need to combine in 1 table. Table 1 contains working units. (e.g. A, B, C) Table 2 contains working roles. (e.g. 1, 2, 3) I want to combine these 2 in a new table where every working unit is combined with all the working roles, 1 row for each unique combination: A1 A2 A3 B1 B2 B3 etc. I how I can achieve this result with vba?

what is use of javascript ? where we actually use it in web development?

26 January 2026 @ 11:13 am

I am starting javascript from scratch. To learn javascript as single language i need better context and background. I want to create story out of it. I want to learn it very deeply so asking very simple qustion or may be my question can be in how many parts we can learn javascript

Excel Locking folder prevents deletion

26 January 2026 @ 9:29 am

I have a VBA project to assist Sage users by making upload files. As part of this the finished workbook is saved to a temp folder. Once the onward work is completed. I want to delete the file and the folder. I can delete the file, but deleting the folder is locked as in use (by Excel and my workbook containing my project) I proved this by closing Excel, then re-opening and the deletion works fine. However, in use by the end user restarting Excel is not acceptable. I've tried two methods, both without success. How do I unlock the folder? Sub DirDel() 'Method 1 Dim MyPath As String 'Checks if Dir exists deletes it. MyPath = "C:\Sage Test" If Not (Len(Dir(MyPath, vbDirectory)) = 0) Then MsgBox Len(Dir(MyPath, vbDirectory)) & "dir" 'Kill MyPath &"\*.*" Currently disabled as no file present. RmDir MyPath MsgBox "Deleted" Else MsgB