Random snippets of all sorts of code, mixed with a selection of help and advice.
Image not displaying when running Java Servlet project on server (but works when opened directly in browser)
17 November 2025 @ 4:02 am
<img src="images/logo.png">
I created a web project using HTML and Servlets (no JSP).
When I open the HTML file directly using “Open in Browser,” the image displays correctly.
But when I run the project on the server (Tomcat), the image does not load on localhost.
My structure:
webapp/
asset/
images/
headerlogo.png
index.html
Trying the direct link:
http://localhost:8080/MyApp/asset/images/headerlogo.png
returns 404.
What is the correct way to reference images in a servlet-based project?
I cant save changes when i try to add administator or any other option for scope options under the bot scope nor perms in the bot tab
17 November 2025 @ 3:56 am
when i try to do this it doesn't show the save changes option and when i go to a new tab and go back it disappears is it supposed to do that or is it a glitch? I have tried using a different search engine adding all the files and everything else to a new application entirely and switching off all the options and turning on only the requirement.
Configure Visual Studio to decompile obfuscated code like Rider?
17 November 2025 @ 3:55 am
When navigating to the definition of something (e.g. with f12) of an obfuscated library in Rider, it will do its best to decompile the library. However, if I navigate to the same thing in Visual Studio, it shows me no implementation details, just the skeleton, a bit like a header file. How can I configure Visual Studio to decompile the obfuscated code like Rider does?
How to Automate Extraction and Standardization of Multilingual Name/Username Data Without Modifying the Original Database?
17 November 2025 @ 3:46 am
We’re working with a user table populated from multiple SSO sources, and the data has inconsistencies that hinder generating standardized names. I need a persistent, automated way to extract and process this data without altering the original database:
Context & Problem Details
The core issues we’re facing with the data:
Name fields (firstname/lastname):
Mixed Chinese/English text in the same field.
Unstandardized non-local names (e.g., "Tanaka Yuki" vs. "Yuki Tanaka" for Japanese names; inconsistent formatting for Latin-script names like "T??n Mahir Md A???F").
Embedded titles ("Mr./Ms./Mrs."), special characters (brackets, quotes), and encoding garble (e.g., "é™³å®¶æ‚ ???").
Preferred names are mixed into firstname/lastname (no dedicated field), causing redunda
Cannot generate GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT report for AU marketplace
17 November 2025 @ 3:42 am
I’m trying to generate a daily GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT in Selling Partner APIs, but the report status in the AU marketplace keeps returning as FATAL almost immediately.
Request:
{
"marketplaceIds": [
"A39IBJ37TRP1C6"
],
"reportType": "GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT",
"reportOptions": {
"reportPeriod": "DAY"
},
"dataStartTime": "2025-10-10",
"dataEndTime": "2025-10-10"
}
And report document response:
{
"errorDetails" : "A client error occurred. Please double check that your parameters are valid and fulfill the requirements of the report type."
}
This issue has been happening since October 1st and only affects the AU marketpla
React Native android keyboard avoiding not working when using <Stack.Screen> with headerShown = true
17 November 2025 @ 3:40 am
I'm using the latest RN version + expo development build.
I have noticed an issue on Android that only happens when I'm using the Stack.Screen headers.
Here's an example snippet -
<>
<Stack.Screen
options={{
headerShown: true,
title: "Create Announcement",
}}
/>
{Platform.OS === "android" && (
<KeyboardAvoidingView behavior={"padding"} style={{ flex: 1 }}>
<ScrollView className="flex-1" contentContainerStyle={{ flex: 1 }}>
<View className="border border-border m-2 flex-1 rounded-lg">
<Textarea
autoFocus
multiline
scrollEnabled
style={{
flex: 1,
padding: 16,
textAlignVertical: "top",
}}
className="border-0 rounded-none shadow-none"
placeholder="Type here..."
How to Animate using Canvas in Angular
17 November 2025 @ 3:40 am
I am trying to code an animated progress wheel in Angular 20. My animation works in a vanilla javascript environment, but when ported to Angular, I keep getting the following in the console:
ERROR TypeError: Cannot read properties of undefined (reading 'maxIterations')
at animate
I think this has something to do with whatever this context the animate function has. I tried to use this.animate.bind(this,arg1,arg2,...) , which fixed the above error but nothing drew on the canvas.
Here is my component. I tried to make a Stackblitz, but it keeps giving me 'such and such might be null' errors and I don't know how to fix all of those either.
Component:
import {
Component,
computed,
input,
signal,
OnInit,
Signal,
} from '@angular/core';
@Component({
selector: 'app-progress-wheel',
template: `<canvas #myCanvas id="canvas" width="150" height="150
Supabase server refusing to start locally because of migrations mismatch
17 November 2025 @ 3:27 am
I am new to supabase I need help starting my supabase server locally
I'm working on a project that was initially started with Lovable AI and uses Supabase as it's backend. I recently joined the team and I'm trying to make backed changes with Supabase locally. after cloning the repo, installing Supabase and linking the project, I ran supabase Start however, the sever stopped because one of the migrations in my migrations folder caused an issue. I tried running supabase db pull --linked to get the updated version of the migrations folder, yet that is failing too, I'm getting an error The remote database's migration history does not match local files in supabase\migrations directory. I did some ChatGPT digging, the issue seems happen because Lovable updates the database directly without notifying to supabase remote that the migrations are getting applied therefore when I try to run supabase db pull --linked supabase cannot find
Is there a difference between the C# Volatile.ReadBarrier vs Volatile.Read?
16 November 2025 @ 3:33 pm
In the released .NET 10 there is a new method added to the Volatile class with the name ReadBarrier().
And I dont know whether from the compilers perspective there is a difference if I do a read with the Volatile.Read() or instead i use the Volatile.ReadBarrier() before a read.
What I'm thinking about is if the compiler knows exactly what values have to be fresh (Read method), then it could choose to keep the rest of the variables in the CPU registers which would be impossible for the compiler in case of the Volatile.ReadBarrier() method.
Is there such optimization or both cases would be the exact same thing?
For example here is a method that i want to implement using the two different API:
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void ConcurrentRead(uint ID, ref object value)
{
uint version;
do
{
Volatile.ReadBarrier();
version = _newMap._arra
How to dynamically change window title in iced.rs?
16 November 2025 @ 11:16 am
I'm building simple image viewer and i'd wanted to show image name in window title
Changing image working via message
pub fn update(&mut self, message: Message) {
match message {
Message::ReqForImgChange => {
if let Some(p) = rfd::FileDialog::new().pick_file() {
self.image_path = Some(p.to_str().unwrap().to_string());
<here probably should be some window.title or smth>
}
}
...
}
The only place where window title is changeable is probably on app startup, where i can pass it: iced::application("title", updater, view)
Unfortunately, i didn't manage to find anything useful in docs, everything leads to application startup
iced = "0.13.1"
For some reason stackoverflow thinks that this post is duplicate of my own post that is deleted, i love this site