Quantcast
Channel: User spraff - Stack Overflow
Browsing all 66 articles
Browse latest View live

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


Django serve static files e.g. favicon.ico without `{% load static %}`

I have successfully followed the popular solution for serving static files in Django:I have /myproject/myapp/static/favicon.icoI use <link rel="icon" href="{%static 'favicon.ico' %}" /> in my...

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 to notify multiple separate cached Django read-only instances when a view...

I am considering a Django stack for a site with high-frequency read (GET) events and low-frequency write (POST) events.Suppose there are a large number of read-only instances which are all serving GET...

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


Django settings.py can't import my local module

My Django tree looks like thisgit/src├── myproject│  ├── settings.py│  ├── mysharedlib.py│  └── urls.py└── www├── myotherlib.py├── urls.py└── views.pyIt works except that in settings.py I haveimport...

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


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

Image may be NSFW.
Clik here to view.

How 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

Image may be NSFW.
Clik here to view.

How 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 Article
Browsing all 66 articles
Browse latest View live