Quantcast
Channel: User spraff - Stack Overflow
Browsing latest articles
Browse All 57 View Live

Comment by spraff on "commands out of sync; you can't run this command now"...

It prints when the Commands out of sync passes through it, and not before. So this error is happening before the with block exits.

View Article


Comment by spraff on How should mysql.connector be shared correctly with...

How would I ensure that the thread pool is big enough?

View Article


Comment by spraff on "Column X cannot be null" happening when that column is...

@ErgestBasha it was a trigger issue, thank you. Would you like to make that a formal answer?

View Article

Comment by spraff on Why does jshint warn of calling functions from a...

The foo example is constructed to trigger the error. I'm not actually trying to do anything with x.

View Article

Comment by spraff on Why does jshint warn of calling functions from a...

I see why the warning would be valid for the second example, but not for the first.

View Article


How does this tag prevent its contents from being downloaded?

Taking this video as an example, here is the html tag which seems to be the critical piece of content:<video id="dmp_Video" style="display: block; width: 350px; height: 197.436px; top: 0px; left:...

View Article

onclick not firing on td when outside element has focus

I have a <input> which performs a search in Javascript when onchange, onkeydown etc fires. This builds a <table> of results which is displayed below the <input> using position:...

View Article

unexpected 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 Article


How should mysql.connector be shared correctly with threads in Django...

This concerns a potential solution to my earlier question in which I was getting commands out of sync; you can't run this command now after wrapping mysql cursors in __enter__ and __exit__.I have read...

View Article


When 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 Article

Answer by spraff for "Column X cannot be null" happening when that column is...

This was caused by a trigger, which needed an IFNULL(...,0) to prevent it inserting a NULL when data was missing.

View Article

Why isn't my Qt eventFilter picking up mouse events on a QTreeWidget?

I have basically this code to intercept certain QTreeWidget events.MyWidget :: MyWidget (){ m_tree = new QTreeWidget (); // ... m_tree -> installEventFilter (this);}bool MyWidget :: eventFilter...

View Article

OpenSSL as a CA without touching the certs/crl/index/etc environment

I think I have the right OpenSSL command to sign a certificate but I've gotten stuck and the tutorials I've found use a different argument format (I'm using OpenSSL 0.9.8o 01 Jun 2010).openssl ca -cert...

View Article


Javascript backtrace

How to I get a backtrace in Javascript?Ideal features:entry function name, or some meaningful identifier for anonymous functions,argument list at each level,line numbers.Can this be done in standard...

View Article

Can I enter password once for multiple mysql command line invocations, where...

You can avoid re-entering mysql command line password by putting the queries into a file.In my case, the later queries are not determined until after the first queries have finished.This happens in a...

View Article


Comment by spraff on How to render svg to pdf at a given physical...

I'm really looking for a command like svg_to_pdf -i foo.svg -o foo.pdf --width=15cm --height=15cm --margin-left=2cm --margin-top=2cm and note that the particular svg in the question is just an example

View Article

Comment by spraff on Why is text not showing along this svg textPath?

The intent is for the renderer to select a size suitable for making the text fit into whatever path I give it without me giving the font size explicitly. Is this possible?

View Article


Image may be NSFW.
Clik here to view.

Why is this svg filter producing content outside of the polygon which uses it?

This svg<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 2 2" width="100" height="100"><filter id='water' x='0%' y='0%' width='100%'...

View Article

Why is text not showing along this svg textPath?

Similarly to this I am trying to render svg text such that it fits into a given space (auto sized, I do not give font size explicitly).Here is my test image<?xml version="1.0"...

View Article

Image may be NSFW.
Clik here to view.

Why is the image in my svg pattern not tiling?

Here's my test svg<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="-1 -1 2 2" width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="img1"...

View Article

Image may be NSFW.
Clik here to view.

td not shrinking to fit contents, even though cell below it has height:100%

I am using a <table> to lay out some stuff.table { /** width: 4.0cm; height: 6.472cm; **/ width: 3cm; height: 4.85cm; border: 1mm solid black; font-style: serif; font-size: 8.5pt;...

View Article


Comment by spraff on td not shrinking to fit contents, even though cell below...

Thanks for your help, but your solution doesn't render as desired -- the img should shrink vertically to the max height, and the #Description should expand, like this

View Article


why does TemporaryDirectory change type within a "with" block?

In python3 console>>> x1=tempfile.TemporaryDirectory()>>> print(type(x1))<class 'tempfile.TemporaryDirectory'>>>> with tempfile.TemporaryDirectory() as x2:......

View Article

Why does my QWidget stylesheet not recognise objectName rules?

Here I have a subclass of QComboBox which is going to change the colour of its text according to the validity of its contents.namespace{ const QString GOOD = "good"; const QString BAD =...

View Article

How can I move the keyboard cursor/focus to a QLineEdit?

I am opening a QDialog which contains a QLineEdit. I want the QLineEdit to have keyboard focus initially, with the blinking cursor as a visual cue. Simple, right?Calling line_edit->setFocus() has no...

View Article


How can I intentionally discard a [[nodiscard]] return value?

Say I have[[nodiscard]] int foo (){ return 0;}int main (){ foo ();}thenerror: ignoring return value of ‘int foo()’, declared with attribute nodiscard [-Werror=unused-result]but ifint x = foo...

View Article

GL_NO_ERROR when glVertexAttribPointer has no bound buffer

I have called glVertexAttribPointer without binding GL_ARRAY_BUFFERfirst:If pointer is not NULL, a non-zero named buffer object must be bound to the GL_ARRAY_BUFFER target (see glBindBuffer), otherwise...

View Article

spring-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

MySQL "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 Article



Clear 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 Article

Is 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 Article

Trying 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 Article

Can {{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 Article


Image may be NSFW.
Clik here to view.

Why 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 Article
Browsing latest articles
Browse All 57 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>