CS background-image produces Moiré effect
I created a 2x2 chequerboard PNG image, shown here magnified in GimpAnd filled a blank web page with it<style>html{background-image:url("/tmp/x.png");}</style>The result was an unexpected...
View ArticleQSslServer only fires `newConnection` on second incoming request, then fails...
I generate a self-signed certificate for testing purposes with localhost in subjectAltNameopenssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -sha256 -nodes \ -keyout "$KEY_FILE" -out...
View ArticleComment by spraff on QSslServer only fires `newConnection` on second incoming...
Thank you, but when I run your code I still get incomingConnection with no new_connection the first time a request is sent. Also, when I send a second request to your code, I get cannot start handshake...
View ArticleWhen can I expect multiple "choices" in an OpenAI response?
For a simple OpenAI api call in pythonresponse = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": instructions}, {"role": "user", "content": my_input} ])I get...
View ArticleQGraphicsPathItem ignoring PenCapStyle
I have two QGraphicsPathItem which share a QPainterPath, one is a thick background and the othe is a thin foreground.They each have a QPen with Qt.FlatCapa square line end that does not cover the end...
View ArticleAnswer by spraff for QGraphicsScene.items() only returning items whose pos()...
The issue is that the boundingRect is not updated when children are updated, and the application must manage this explicitly.
View ArticleQGraphicsScene.items() only returning items whose pos() exactly matches a...
A QGraphicsScene contains a number of MyItem items.A MyItem is a QGraphicsItemGroup which contains, among other child items, a QGraphicsEllipseItem centred at the local origin.A number of MyItem items...
View Articlectrl-C to terminate a pyqt application with a QOpenGLWidget
My main file for a pyqt application looks like this:#!/usr/bin/env python3from PyQt5.QtWidgets import QApplicationimport signalimport sysfrom main_window import MainWindowif __name__ == "__main__":...
View Articleunexpected implicit "DEFAULT NULL" on non-null columns when `INSERT IGNORE`...
I just ran this on MySql 8 using InnoDBCREATE TABLE TuneName( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, tune_id BIGINT NOT NULL, name VARCHAR (100) NOT NULL, norm VARCHAR (100) NOT NULL,...
View ArticleHow to debug GNU make's variable assignment
My Makefile contains something likeBASE_VAR=$(cat path/to/value.txt)DERIVED_VAR=$(if $(BASE_VAR),foo,bar)This does not produce the results I expected. make --debug=a produces detailed trace but...
View ArticleHow can I arbitarily rotate, rearrange etc pdf pages in Python?
I have an input.pdf which is "normal" (a number of pages all the same orientation and direction) and I want to create a new pdf which can arbitrarily rearrange the input pagesFor example:I only need...
View ArticleHow can I make PyCharm explain this coloured underlining?
PyCharm has various colours of underlining, for exampleHow can I find out what these mean? If I hover the mouse over I don't get a tooltip or any other UI reaction. Right-clicking doesn't offer any...
View Article.vim/syntax/sql.vim: Error detected while processing BufRead Autocommands for...
I tried saving this vim syntax file for sql but when I open a sql file in vim I get lots and lots of stuff like this:Error detected while processing BufRead Autocommands for "*.sql"..function...
View ArticleWhy does this OpenGL square render outside of its window? [closed]
I have a PyQt OpenGL widget which renders a square which fills the widget. The subclasses define the fragment shader.The Vertex Shader is#version 330in vec2 v_position;out vec2 f_position;void main() {...
View ArticleCan {{topic}} filter on "A and B and (X or Y)"
I am using the tags plugin in dokuwiki.I want to use something like {{topic>A AND B AND (X OR Y)}}but the documentation suggests this is not exactly expressible{{topic>tag1 +tag2}}– Lists all...
View ArticleTrying to create a consistent ?-mark-inside-circle in CSS
I'm trying to create a question-mark-inside-a-circle glyph using CSS. It should look like © basically.a::before { content: '?'; font-size: 60%; font-family: sans-serif; vertical-align: middle;...
View ArticleIs there a standard algorithm for removing redundant statements of ordering?
Supposing I have an ordering relation and some predicates:A < BA < CB < CThe predicate A<C is redundant since it is implied by the other two.Is there a standard algorithm for reducing all...
View ArticleClear all/some breakpoints with gdb commands
I get into situations in gdb/ddd where there are too many breakpoints.Sometimes I want to disable or remove all of them at once. Sometimes I want to disable or remove all except for one. I find the ddd...
View ArticleMySQL "commands out of sync" appears when migrating to stored procedures
I have some working php/mysql which I am now migrating to stored procedures.As soon as any stored procedure is called, subsequent CALLs and SELECTs fail with "Commands out of sync; you can't run this...
View Articlespring-boot-devtools Automatic Restart not working
I have a working Spring Boot 2.25 application built with mvn. As per this documentation I...
View Article