Random snippets of all sorts of code, mixed with a selection of help and advice.
I need some help from UI people on how to improve the look of a legacy app
19 June 2026 @ 9:39 pm
I am working on a legacy app so I am not looking to make major changes. For the first time we are stacking rows of tabs as shown below.
The tabs are generated server side and I do have access to the code to tweak the look. The server puts a fixed number of tabs on each row. The chosen tab is highlighted and the text associated with the tab is shown below all of the tabs. I think there might be a way to improve how we set off the chosen tag. I think the solid gold bar below the tab rows doesn't do a great job of setting off the text because the text always uses a solid gold background for the title. Lastly I think we might be able to improve how it looks between the tabs and where we have empty space below the tabs. I don't need help on how to make the changes (AI can do that) but I would appreciate any suggestions on what changes would make the app look better.
The tabs are generated server side and I do have access to the code to tweak the look. The server puts a fixed number of tabs on each row. The chosen tab is highlighted and the text associated with the tab is shown below all of the tabs. I think there might be a way to improve how we set off the chosen tag. I think the solid gold bar below the tab rows doesn't do a great job of setting off the text because the text always uses a solid gold background for the title. Lastly I think we might be able to improve how it looks between the tabs and where we have empty space below the tabs. I don't need help on how to make the changes (AI can do that) but I would appreciate any suggestions on what changes would make the app look better.LaTex interpreter in Octave fails a 'run-time test' (again!)
19 June 2026 @ 9:32 pm
When I try to run the Octave script:
#!/usr/bin/octave
ans1 = getenv("OCTAVE_LATEX_BINARY");
ans2 = getenv("OCTAVE_DVISVG_BINARY");
ans3 = getenv("OCTAVE_DVIPNG_BINARY");
fig = figure();
X = [1:1000];
plot(X);
xlabel('$x$', 'interpreter', 'latex');
I get the warnings:
warning: latex_renderer: a run-time test failed and the 'latex' interpreter has been disabled.
warning: called from
__axis_label__ at line 38 column 6
xlabel at line 59 column 3
test1 at line 9 column 1
I have a local TexLive installation, and I checked the Octave docs which say that the executables "latex", "dvipng" and "dvisvgm" should be available in the Path. To make sure I didn't miss something, I added the environment variables OCTAVE_{LATEX,DVIPNG,DVISVG}_BINARY to my .bashenv .
When I run
i want to integrate ai into my food delivery logistics platform, how do i start
19 June 2026 @ 9:14 pm
I am building a logistics website for running errands for customers, and I would like to use AI for customer service. However, I have never integrated AI into a website or system before.
I would like to understand where to start, how AI customer support works, and the steps involved in integrating it into my website. I am also looking for learning resources, tutorials, or courses that can guide me through the entire process, from the basics to implementation.
Since I am a beginner in AI integration, I would appreciate a clear roadmap on what technologies to learn, the tools required, and the best practices for building an AI-powered customer support system for a logistics business.
Optimized a Spring Boot Application to Handle 1M Requests/Second. Really?
19 June 2026 @ 8:40 pm
How is performance calculated in this test?
Results Measurement: Proof
Maximum Throughput: 1,200,000 requests per second
Average Response Time: 85 ms (previously 350 ms)
95th Percentile Response Time: 120 ms (previously 850 ms)
My simple calculation: 1,200,000 requests / 1000 ms = 1200 requests/ms
But the article says 85 ms/request.
That's 1000ms/85ms = 11.7 request/second
What are we looking at?
Clicking Cancel closes all dialogs instead of returning to previous dialog
19 June 2026 @ 7:30 pm
My PyQt5 app has a data entry feature that asks the user to connect to a database and enter the information to upload. Here is a simplification of my code:
import pandas as pd
from PyQt5.QtWidgets import (QDialog, QDialogButtonBox, QApplication,
QVBoxLayout, QTableWidget, QTableWidgetItem,
QComboBox)
from PyQt5.QtCore import Qt, pyqtSlot
import sys
#%%
class EnvSelect(QDialog):
def __init__(self, lnew, parent=None):
super().__init__(parent)
self.setWindowTitle("Environment Select")
self.resize(800, 600)
self.lnew = lnew
self.result = None
layout = QVBoxLayout()
self.cbe = QComboBox()
self.cbe.addItems(["Production", "Development"])
layout.addWidget(self.cbe)
QBtn = QDialogButtonBox.Ok | QDialogButtonBox.Cancel
self.buttonBox = QDialogButtonBox(Q
How can I bind this particular Visual Studio Code "New Terminal" option to a keyboard shortcut?
19 June 2026 @ 3:48 pm
I would like to bind the following "New Terminal" option to a keyboard shortcut (e.g., CtrlK CtrlT), but I can't find the corresponding the keybinding (or lack thereof) in the VS Code Keyboard Shortcuts menu. This option can be seen by right-clicking one's mouse on a empty group.
As can be seen in the above screenshot, I have successfully bound closing an empty group to CtrlK CtrlG. Given the presence of this "close" option in the same menu as the "New Terminal" option, I presume there is a way to create the binding, but I can't find it.
If you know where to find the keybinding for this option, I would greatly appreciate knowing it.
As can be seen in the above screenshot, I have successfully bound closing an empty group to CtrlK CtrlG. Given the presence of this "close" option in the same menu as the "New Terminal" option, I presume there is a way to create the binding, but I can't find it.
If you know where to find the keybinding for this option, I would greatly appreciate knowing it.php and c application data exchange .so lib linkage problem [closed]
19 June 2026 @ 2:06 pm
I have .so files for my distributed c/cpp project
/home/j/OSL/build/lib/libOSL.so
I'm making web interface for my engine and learning how to exchange data.
My current technology stack: html,php,apache,sqlite,c.
I use below command to interfere with my C application
<?php
function sendRequestC() {
exec('/opt/lampp/htdocs/app/EXN/build/EXN 1 2 3, $output, $retval);
}
?>
If I dont link any .so libs its works as designed
I usually face LD_EXPORT problem using distrubuted .so libs for my c/cpp apps.
But currently I tested it to be visible with my ld environment:
echo $LD_LIBRARY_PATH=/home/j/OSL/build/lib
Also it is visible through regular c application call
/opt/lampp/htdocs/app/EXN/build/EXN
return value: 1
When I call php script it returns nothing.
Usually if session is fine, I get array returned fro
How to initialize DI-registered interdependent asynchronous services?
18 June 2026 @ 8:59 pm
To eagerly initialize service in ASP.NET Core, I do:
public sealed class ServiceA // interfaces omitted
{
// makes service usable
public async Task EnsureIndexesAsync(CancellationToken cancellationToken) {...}
// should be called after EnsureIndexesAsync
public void use() {...}
}
public sealed class ServiceB
{
// dependency without clear timing requrements, will call a.use() eventually
public ServiceB(ServiceA a) {...}
public async Task InitializeAsync(CancellationToken cancellationToken) {...}
}
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton<ServiceA>();
builder.Services.AddSingleton<ServiceB>();
var app = builder.Build();
var a = app.Services.GetRequiredService<ServiceA>();
var b = app.Services.GetRequiredService<ServiceB>();
// brittle! Pray the order is correct.
await a.EnsureIndexesAsync(startupCancellation);
await b.InitializeAsync(star
Wireshark key Mechanism for BLE
18 June 2026 @ 4:37 pm
Can Wireshark/TShark accept a newly added BLE key and use it for packets that arrive later in the same live capture?
I want to decrypt a BLE LESC bonding session and decrypt it with LTK.
Since the LTK is generated in bonding I can't load it before the capture starts.I want to try to enter it during the session (before the encryption starts).
I can increase the time interval between the generation of LTK and encryption starts, but I just want to confirm if Wireshark can accept a key during a session?
Visual Studio Forms Designer UI Looks Like WIN7?
18 June 2026 @ 1:24 am
I'm using Win11 and Visual Studio 2022. When designing a windows desktop form in the IDE it shows windows UI elements from windows 7. When running my app it shows windows 11 UI elements and does not show the window at the same resolution as in the IDE. Anyone know why this is?
Running App
IDE Form Designer
I'm not looking to have it in the WIN7 looking UI. I'm more interested in why VS still shows WIN7 and why the difference in resolution / sizing. I did have to re-arrange some of the elements to keep them from being cut off in the running app.
Running App
IDE Form Designer
I'm not looking to have it in the WIN7 looking UI. I'm more interested in why VS still shows WIN7 and why the difference in resolution / sizing. I did have to re-arrange some of the elements to keep them from being cut off in the running app.