Random snippets of all sorts of code, mixed with a selection of help and advice.
How to fix cross compile link failure from warning: creating DT_TEXTREL in a PIE?
9 June 2026 @ 1:44 am
I'm trying to get the firmware to build on Gentoo as I'm building a Gentoo image for the PocketBeagle2 PB2. However, I'm running into the linker error shown below. I used crossdev to install the tool chain, aarch64-unknown-linux-gnu-. Was wondering if anyone might have thoughts on it.
Here's the line I'm using to compile the project, which is the same line used to compile this project on Debian in the official BeagleBone repos for this board:
$ make V=1 -j4 CROSS_COMPILE=aarch64-unknown-linux-gnu- CFLAGS= LDFLAGS=-Wl,-V ARCH=aarch64 PLAT=k3 SPD=opteed K3_USART=0x6 BL32_BASE=80080000 PRELOADED_BL33_BASE=0x82000000 TARGET_BOARD=lite all
And here's the results:
Including services/spd/opteed/opteed.mk
'aarch64-unknown-linux-gnu-gcc' -o /home/pepp/workspa
Form creation using html
9 June 2026 @ 1:38 am
I'm starting my full stack career and I have a task in which I have to make a form using only html. I'm not getting a clear idea like how I should frame my form and which tags I should use .
How to do that?
boost::asio crashes on close
9 June 2026 @ 1:21 am
I have a test program that crashes when closing several threads, and I cannot put my finger on why.
So here is an outline of the program and final problem (read to end). Sorry for the length of this.
The final data structure in the main GUI program is:
typedef std::map<int, std::vector<DADataRec>> DADataMap;
This is a collection of data acquisition channels. The DADataRec has two important elements:
float m_fRealVal, m_fTimeSec;
unsigned m_uADVal;
To collect these data, there are 4 levels of threading. The most basic is a routine to async_read from an boost::asio::tcp::socket.
class DataClient that connects to
boost::asio::io_context &io_context_;
tcp::socket socket_;
It polls the socket_ for incoming data, which happens in packets of 10 lines of text every 10 msec:
void s
Why is Java math not working as it should? [closed]
9 June 2026 @ 1:04 am
int Strength =0;
JLabel StrLabel = new JLabel("Str");
JLabel StrAmount = new JLabel(String.valueOf(Strength));
JButton StrMinusButton = new JButton("-");
JButton StrAddButton = new JButton("+");
int Dexterity =0;
JLabel DexLabel = new JLabel("Dex");
JLabel DexAmount = new JLabel(String.valueOf(Dexterity));
JButton DexMinusButton = new JButton("-");
JButton DexAddButton = new JButton("+");
double StrikeScaling=(6*(1.0+(Strength*0.02)+(Dexterity*0.01)));
double StrikeDamage=StrikeScaling;
I have a button in java frame (that I know works) and even though it properly updates it's own variable StrikeDamage remains at 6 no matter how much Strength, Dexterity, or both are increased.
What happens when JVM can't allocate native heap (e.g. malloc() fails)?
9 June 2026 @ 12:57 am
The most obvious reason the JVM needs to request heap memory from the OS is presumably to maintain the Java Heap data structure (where the Java objects live, such as when the Java program does a new Object()). But that's not what this question is about.
This question is about the other kind of scenario in which the JVM may presumably need to request native heap memory, namely to support its own internal operations (running the garbage collector, searching the class path for a JAR file, etc.). If the JVM is written in C, I guess this would be done via malloc() (the exact details probably aren't super important, so for purposes of discussion I'll just assume malloc()). And it seems at least conceivable (if not super likely) that such a call to malloc() could fail (such as actually running out of memory on a resource-constrained system like some IoT device or something).
So my question is what h
Excel - Multi-Table Lookup
9 June 2026 @ 12:11 am
Table 1
Part Number
11-May
18-May
25-May
1-Jun
8-Jun
~~15-Jun~~
PN1234
8
5
6
4
9
7
PN5678
3
5
1
6
2
~~4~~
PN2468
1
3
4
3
8
5
Table 2
Part Number
11-May
18-May
25-May
1-Jun
8-Jun
~~15-Jun~~
PN1234
20-Apr
27-Apr
4-May
11-May
18-May
25-May
PN5678
13-Apr
20-Apr
27-Apr
4-May
11
Error With SpecialCells() in VBA to Copy and Paste
8 June 2026 @ 10:07 pm
Essentially I have table in Excel that I want to filter and then copy into a new sheet. I am trying to do it with .SpecialCells(xlCellsTypeVisible) but I am getting an error: 1004Unable to get the SpecialCells property of the Range class.
I see the code working up to that point when I debug it. It filters on a certain column for a certain value. And then its supposed to select all visible cells to copy. Here is the code:
Public Function RangeToHTML_Export(strFeedRange As String) As String
On Error GoTo err_check
Dim rng As Range
Dim TempFile As String
Dim TempWB As Workbook
Dim fso As Object
Dim ts As Object
Dim ws As Worksheet
Dim lastCol As Long
Dim lastRow As Long
Dim approverCol As Long
Dim tempSheet As Worksheet
Dim exportLastRow As Long
Dim exportLastCol As Long
' Reference the named range
' Set rng = ThisWorkbook.Names("Export").RefersToRange
'
Very high uncertainty in a parameter using curve_fit() on exponential relation
8 June 2026 @ 9:52 pm
Plots of different graphs fitted using the same function
I tried fitting my plots, which are supposed to show a negative exponential using the same function, but predictions for L_infty are really poor. How do I improve my curve fit? When I plot the error bars for L_infty it turned out uncertainty in its prediction were excessively large, while other parameters were much better approximated.
Uncertainty in L_infty:
Code I used:
def twentyconc_model(x, k, Linfty):
return Linfty - Linfty*exp(-k*x)
popt20 = []
pcov20 = []
for i in range(0,5):
popt, pcov = curve_fit(twentyconc_model, twentyconc_data[i][:,0], twentyconc_data[i][:,1], p0=[0, mean(twentyconc_data[i][-10,1])], maxfev=10000)
popt20.append(popt)
pcov20.append(pcov)
print(popt20,"\n\n",
I tried fitting my plots, which are supposed to show a negative exponential using the same function, but predictions for L_infty are really poor. How do I improve my curve fit? When I plot the error bars for L_infty it turned out uncertainty in its prediction were excessively large, while other parameters were much better approximated.
Uncertainty in L_infty:
Code I used:
def twentyconc_model(x, k, Linfty):
return Linfty - Linfty*exp(-k*x)
popt20 = []
pcov20 = []
for i in range(0,5):
popt, pcov = curve_fit(twentyconc_model, twentyconc_data[i][:,0], twentyconc_data[i][:,1], p0=[0, mean(twentyconc_data[i][-10,1])], maxfev=10000)
popt20.append(popt)
pcov20.append(pcov)
print(popt20,"\n\n",How to block all VPN connections to Java server?
8 June 2026 @ 8:45 pm
How to block all VPN connections to a Java server using:
- only the standard Java JDK API;
- no third-party libraries;
- no external sources.
What programming tasks do you still prefer to do without AI?
8 June 2026 @ 8:30 pm
With AI coding assistants becoming increasingly common, many programming tasks that once required a lot of manual work can now be completed much more quickly.
However, some developers still prefer to perform certain tasks themselves, whether for learning, accuracy, trust, or simply personal preference.
In your experience, what programming tasks do you still prefer to do without AI, and why?
For example, do you avoid using AI for debugging, architecture design, learning new concepts, writing critical code, or something else? What factors influence your decision?