Random snippets of all sorts of code, mixed with a selection of help and advice.
which index is useful on like clause? (rdbms)
9 December 2025 @ 10:14 pm
SELECT o FROM Order o WHERE o.customerEmail LIKE %:emailPart%
are there any RDBMS (postgres) index type which can improve performance of the query above? (i.e. which index can help on like clause?)
Getting value of a cell based on value of another cell, but not exact
9 December 2025 @ 10:12 pm
So I'm trying to track some things. Let's say I have Sheet 3 which is the only editable sheet. It has a column under C which gets incrementing values input by a user each day.
Sheet 1 contains a list of "Levels" and "XP Required" (First row is headers)
Sheet 2 is going to display information based on both these sheets. I have 4 things to display:
Current XP
Current Level
XP Till Next Level
Next Level Name
The current XP is simple, I've just done =MAX(Sheet3!C2:C) which works perfectly. However I'm struggling to work out how to get the other 3 sections to display what I want it to display.
Why does my Angular server table data pulled from an Observable from MongoDB database display only every other edit to the HTML file?
9 December 2025 @ 10:11 pm
I am working on a MEAN stack web application but I am having issues with getting the administrator single page application to consistently show the table data in a *ngFor loop. On first load up the table is empty after the row of headers, but making any change to the html file triggers a component update in the ng serve PowerShell window, which then toggles between the table data being displayed or not. The animal-Listing.html is this:
<div class="logo">
<img src="assets/images/Grazioso-Salvare-Logo.jpg"
alt="Grazioso Salvare Logo">
</div>
<div>
<button (click)="addDog()" class="btn btn-info">Add Dog</button>
<button (click)="addMonkey()" class="btn btn-info">Add Monkey</button>
</div>
<div class="row">
<div class="animalTable">
<table&g
How to print a Hollow cude
9 December 2025 @ 10:10 pm
I want to print a hollow Cube in python any one who know how to do that please tell me
i already try this but it print the side lines wrong'
rows = 5
cols = 10
for r in range(rows):
if r == 0 or r == rows - 1:
print("*" * cols)
else:
print("*" + " " * (cols - 2) + "*")
How to use SOCKS5 proxy with auth in python playwright
9 December 2025 @ 10:05 pm
I know what playwright browser don't support socks5 proxy with auth. But maybe exists some way to use it? except socks->http tunnel. Maybe some libs?
Visual Studio Code Cannot retrieve the dynamic parameters for the cmdlet
9 December 2025 @ 10:01 pm
I am brand new to Azure and currently taking Alan Rodrigues course on it. I am trying to follow the Bicep chapter but keep running into the below message. I have been trying to figure it out for over an hour but am stuck. It should be a simple fix, but since I have no knowledge on this I am stuck. Any help is appreciated!
New-AzResourceGroupDeployment: Cannot retrieve the dynamic parameters for the cmdlet. Cannot find path 'C:\Users\jm.diedrich\Favorites\main.bicep' because it does not exist.
Trying to train a Lora
9 December 2025 @ 10:00 pm
I have a new laptop with the rtx 5090. I've been trying different options to train a Lora including using nodes on ComfyUI, installing AI Toolkit, Fluxgym, they have all been a headache either giving me error after error when trying to install or when I do get it running, nothing happens. For example, I managed to get Fluxgym running, but when I train it says training is complete but the safetensors file is not in the Outputs file at all. Is there just an easier way to train locally? Thanks!
Conditionnal IF use not working with PD.NOTNA
9 December 2025 @ 9:49 pm
Amateur programmer here, trying to make my working life bette.
I am building a billing program, using selenium webdriver, to facilitate people entering their information into the more complex web-based "official" billing system. The user imports a .csv file containing the pertinent information, that is then used to feed the proper fields in the billing system.
One column in the .csv file is used to determine which path the remainder of the billing needs to be done in ([path_decider]). The goal is that, if left empty, the "regular" path will be taken, but if not, it would go elsewhere. When empty, it is interpreted as "nan" by pandas.
The program iterates through the dataframe, line by line, to bill every line. To check wether this column is empty in the specific row, I wrote this IF statement :
if self.working_df['visit_code'][i] in ctn.acceptedOptions :
# ... first special path, where the [path_decider] is not n
XCUITest in simulator clone doesn't send to request to server and seems to cache network responses
9 December 2025 @ 9:35 pm
I'm doing some UI Tests for my iOS app using the XCTest framework. I have a test that launches my app, taps a button, fills in the login info, and taps Login. The app then sends a request to a server I have running on 192.168.1.193:8080 which accepts the login info and responds with that user's data. I do that so that I can have some data in my app to do tests with.
When I run this test in a serial fashion in a simulator that is open and I can see, it runs perfectly.
When I run this test in a parallel fashion with a sim clone in the background, however... the app never hits my server running on 192.168.1.193:8080. However, the app shows a UIAlertController with an error message (that it would normally do if there was a problem logging in) and the error message it provides is a string that does not exist in the app. The error string only exists in my server code.
Now, first things first, there shouldn't be any error found. It should login just fine. But putting t
How do I stack my website logo on top of the navigation bar list
9 December 2025 @ 9:30 pm
Thank you in advance for any help you can provide me, i'm a total noob trying to figure out flexbox for the first time. I have a logo and a series of four nav bar unlisted items. I want to put the logo above them, centered and have the four nav bar items also be centered underneath the logo.
Copied below is my Html (first) and my css (second). Thank you!!!
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body { /* To ensure the background is black across all browsers and scenarios, you can target both html and body and also remove default margins/paddings.*/
margin:
Copied below is my Html (first) and my css (second). Thank you!!!
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body { /* To ensure the background is black across all browsers and scenarios, you can target both html and body and also remove default margins/paddings.*/
margin: