Random snippets of all sorts of code, mixed with a selection of help and advice.
How Claude can get access to GitLab/Github issues?
27 April 2026 @ 11:08 pm
How Claude Code can get access to GitLab issues?
I think the result should be those issues cashes locally as .md
So Claude can read.
Maybe there is something done for GitHub, soo
How Claude Code can get access to GitHub issues?
or maybe there is even universal approach for GitLab+GitHub
How to launch WinUI3 app from command line
27 April 2026 @ 10:59 pm
I want to start the app without Visual Studio, because I am trying to use git worktrees
>x64\Debug\App1\App1.exe gives error_class_not_registered
Surely people launch their apps from the command line? How?
Python SQLAlchemy dynamically build select statements
27 April 2026 @ 10:38 pm
I am currently trying to write a function that takes arguments, if the arguments are not false then it builds the select statement with them in it. I am unable to get it to work unless I am too build the select statement as an object all in one line. Separating the select statement causes it to ignore and not even include it. Is there way to build select statements dynamically?
def search_land(
session: Session,
longitude: float | bool = False,
latitude: float | bool = False,
entity: str | bool = False,
address: str | bool = False,
county: str | bool = False,
count: int = 1,
parcel_id str | bool = False,
offset: int = 0,
):
stmt = select(Land).offset(offset).limit(count)
if longitude is not False:
stmt.where(Land.longitude.is_(longitude))
if latitude is not False:
stmt.where(Land.latitude.is_(latitude))
if entity is not False:
stmt.where(Land.address.is_(ad
can I 'git clone' gitlab issues? How to get all issues (of 1 specific project) locally preserving all markdown formatting
27 April 2026 @ 10:04 pm
can I 'git clone' gitlab issues as markdown?
By that I mean getting every issue (of 1 specific project) as separate markdown file locally, that is exactly the same markdown that is seen, when editing an issue. What GitLab currently support or recommends.
I am not interested in issue status, or comments. Or any produced report.
All I need as issue description as perfect markdown file,
as it is (in our case).
I have looked at GitLab CLI `glab`, but it gets issue as JSON.
GitLab API is more like
https://docs.gitlab.com/api/issues/#list-all-issues
Thanks to SO, suggesting Get all Gitlab Issues
But it is not what I need, as cli and API are already considered.
I do not need quick answer from those who have no idea,
but I hope somebody is solving o
How to add an assumption (about commutativity) to sympy's expression algebra?
27 April 2026 @ 6:13 pm
Suppose I define sympy.Symbols as follows
import sympy as sy
A = sy.Symbol('A',commutative=False)
B = sy.Symbol('B',commutative=False)
and combine them as
sy.simplify(AB-BA)
sympy correctly does not reduce this to zero, since A and B were defined to be non-commutative. So far so good.
But now I want to state that the particular symbols
U = sy.Symbol('U',commutative=False)
V = sy.Symbol('V',commutative=False)
whilst non-commutative with any other symbol commute, i.e. that UV-VU = 0. How can I tell `sympy` that in any simplification, it may/should assume this?
how Spring creates an object using the reflection if the class has only one arg constructor
27 April 2026 @ 5:36 pm
I am new with Spring still learning it and I see a post that when I use @Autowired in a class but this post not specified where the annotation is Spring use reflection to create the bean and then inject dependencies and I am wondering what I understand may I am not aware of it completely but I know that it call the no-arg constructor to create this bean then inject
but what will happen if
@Component
public class A {
}
@Component
public class B{
private A a;
@Autowired
public B( A a){
this.a = a;
}
}
how does reflection create this bean of class B if this is the only available constructor
constexpr always good ? in C++
27 April 2026 @ 12:37 pm
Are there better methods than `constexpr` in C++? Does constexpr actually provide optimization for cpu or gpu, or does it just increase reliability?
For example,
int maxVolumeCapacity = 10000; // global
int height = 10; // global
constexpr int volume (int x) {
int volume = height * x * x * x;
if(volume> maxVolumeCapacity ) {
height *= 5;
maxVolumeCapacity *= 100;
}
return volume;
}
is this code true or not and does it make sense to use constexpr in this situation?
Why does Python not call the function descriptor inside this other descriptor?
26 April 2026 @ 10:42 am
I have the following code:
class Identity:
def __init__(self, value):
self.value = value
def __get__(self, obj, objtype=None):
return self.value
def __set__(self, obj, value):
self.value = value
class Example:
@Identity
def non_method():
pass
Now, I’m surprised that when I call
>>> example = Example()
>>> example.non_method
<function Example.non_method at 0x72b74d4cb5e0>
I get a function, not a bound method.
To me, it seems like return self.value in Identity.__get__ should trigger the descriptor behaviour of the original non_method function stored in self.value and return a method bound do the Identity object, so return self.value should run (approximately) return getattr_sta
Sheets Found in Workbook But Code Stops Running
23 April 2026 @ 9:37 pm
My code creates several formula checks, starting on a tab named NL20.
Dim ws As Worksheet
Set ws = wb.Worksheets("NL20")
'my code running here, creating formula checks
At the end of the formula checks done against sheet NL20, I'd like it to check if sheet NL21 and or sheet US12 exist and create similar formulas on each of those tabs. If sheets NL21 and or US12 does not exist the code should stop running. Below is the check I have after tab NL20 is done. It correctly finds each tab name, but after executing the Function for both, it jumps out of the code. Instead of ending, if it finds tab NL21, I'd like to run my formula checks against it and so on for tab US12.
If Not (SheetExists("NL21") Or SheetExists("US12")) Then
MsgBox "NL21 or US12 missing. Code stopped.", vbExclamation
Exit Sub
End If
'my code here
End Sub
Function SheetExists(SheetName As String)
PDOs parameter binding is avoiding indexes and tanking performance
23 April 2026 @ 2:57 pm
I have been building a Laravel app and this weeks launch has shown that my database does NOT like how queries are being executed.
When launching my app, our database becomes very slow. Simple queries are taking way longer than they should, and the databases CPU is being maxed out. The cause seems to be how Laravel/PDO creates prepared statements, and these prepared statements are not utilizing indexes.
Take a simple query:
SELECT *
FROM Subjects
WHERE KeyA = 'X' AND KeyB = 'Y'
In Laravel, I would build it using the query builder:
$query = DB::table('Subjects')
$query->select('*');
$query->where('KeyA', $KeyA);
$query->where('KeyB', $KeyB);
And here's what is actaully being sent to my database:
(@P1 nvarchar(4000), @P2 nvarchar(4000))
SELECT *
FROM Subjects
WHERE KeyA = @P1 AND KeyB = @P2
For reference, my keys are varchar(50)
These parameters, wha