8,773 questions
6
votes
2
answers
181
views
If misaligned loads are supported on my platform then why does address sanitizer complain of undefined behaviour?
I'm using the Stringzilla string library, which is supposed to be close to how std::string operates. It has a flag called SZ_USE_MISALIGNED_LOADS. By default it sets it to on, and it looks like this:
/...
2
votes
2
answers
167
views
How to make by buttons all be uniform size and centred?
I'm currently making a website and I want to include these buttons, as I have them in my design:
Screenshot of website design
They are all of the same size, equally spaced out and centred across the ...
1
vote
0
answers
118
views
Header alignment with sort/filter icons in PrimeReact DataTable
I have a PrimeReact DataTable with multiple columns.
Each column has a text header, optionally with sort and filter options.
Alignment of the columns can differ, and I would like the alignment of the ...
-1
votes
1
answer
64
views
How to align label and input text inside MUI textarea?
I need a textarea field containing label inside the textarea field. The input text will start from the end of the label. If the label is so long, it will go to the second line. According to device ...
1
vote
0
answers
37
views
How do i align the window to a certain coordinate on the screen
So, I am making an App in Go using Go bindings for gtk3 by gotk3 and want that this window should be opened at a certain coordinate on the screen (as an example, take 500,500). I have tried using win....
0
votes
1
answer
86
views
Create a parent div with child divs, that are vertically aligned to parent's bottom when no heights are defined
There is a parent div with two child divs inside. Each of them contents some text. We know min-height of inner elements, also min-height of parent is known.
We don't know parent's height, also we don'...
-4
votes
1
answer
101
views
How to make a table used for alignment "flush left" relative to surrounding context?
Similar to Remove all padding and margin table HTML and CSS, but not the same:
I'm using a table to align labels with input elements.
Also that table is used within another element, and whatever I ...
0
votes
1
answer
93
views
Is C++17 aligned_alloc followed by GCC __builtin_assume_aligned useful?
int8_t *const a = static_cast<int8_t*>(__builtin_assume_aligned(aligned_alloc(64, (sizeof(int8_t) * n + 63) / 64 * 64), 64));
Let's say I need to use the pointer in the same scope (not passed ...
-1
votes
1
answer
74
views
Align pasted data by columns
I'm having difficulty with aligning data in excel while using a macro.
The data in wb1 is for example like this:
Thomas 10
Jason 11
(blank) (blank)
Clara 14
The data in wb2 is for ...
1
vote
2
answers
98
views
How can I place the icon after the text of a QPushButton in PyQt5
How can I place the icon after the text of a QPushButton in PyQt5?
The icon should not come before the text - it should come after or below the text.
Currently it's looking like this:
but it should ...
6
votes
2
answers
75
views
Fill text from last line to first line, bottom to top, right to left
div {
display: inline-block;
background: gray;
text-align: justify;
word-break: break-all;
}
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incidunt ut ...
0
votes
1
answer
41
views
Janus Winforms GridEX remove upper padding in GroupHeader
I am currently editing a probably 20 year old GridEX in my company's code base, but I encountered the following issue: When I want to group my rows, the group itself seems to have some kind of padding ...
0
votes
2
answers
64
views
HTML div alignments
I am creating a one-page application that has a few elements. In general, the top left part of the page should show an image, and to its right should be a table (along with another item called "...
1
vote
1
answer
75
views
Strict aliasing violation in C [duplicate]
Does the following violate strict aliasing rule in C?
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int ialignment_of(double *p)
{
return (int)(((uintptr_t) p) % ...
4
votes
1
answer
138
views
Why does `std::format` require its arguments are aligned?
Consider the following code (godbolt link):
#include <format>
#include <iostream>
#pragma pack(push)
#pragma pack(1)
struct A {
long l;
int n;
char c;
};
#pragma pack(pop)
...
0
votes
0
answers
138
views
CSS Radio Button: Inner Circle Misaligned During Zoom/Dezoom
I am developing a custom Angular component for a radio button with specific design requirements:
Outer circle size: Fixed at 16px x 16px.
Inner circle size (checked state): Fixed at 8px x 8px.
The ...
0
votes
1
answer
50
views
How can I align a single vertical card in Flutter so that it has the same height as the other four cards?
How can I align a single vertical card in Flutter so that it has the same height as the other four cards? Additionally, the four other cards should have equal heights among themselves. By "same ...
0
votes
1
answer
35
views
Dimple.js: How to set the X-Axis ticks to the mid of each interval?
Having a dimple.js line plot to compare time series for several years, my plot uses a TimeAxis on x, with one tick per month.
var x = myLinePlot.addTimeAxis("x", "month_day");
I ...
2
votes
1
answer
95
views
Is there any difference between stating the "alignas" keyword in struct definition VS array of struct definition?
Say I have a struct named Particle and I would like it to be aligned by 32bits, should I use the alignas keyword when I specify the struct definition, like code below:
struct alignas(32) Particle {
...
1
vote
0
answers
84
views
How the binary code space alignment influence the runtime efficiency?
I was optimizing some C language codes and realized a weird thing.
I noticed a piece of useless code (not being used by any parts) and deleted it. But the performance went down by around 4%, which is ...
0
votes
0
answers
48
views
Python positioning widgets on a grid
Sory for my poor english i'm speeking french.
I'm starting dev on python and i try to use Tkinter for programming my GUI then, i've some troubles with the alignement of some colums in my python app ...
1
vote
1
answer
45
views
How to perserve layout of figure with aspec("equal") after change of axis lims?
I have 2x2 grid of axes in one figure that I want to be aligned with zero offset to ideal rectangle. Unfortunatelly I also need to use ax.set_aspect("equal") which seem to cause a lot of ...
0
votes
3
answers
536
views
How to align a MAUI image with aspect-fill, within its display area?
Is there a way to align/position an <Image/> within its display area using Aspect="AspectFill" in .NET MAUI 8, or is there a workaround that produces the same visual result?
I'm trying ...
0
votes
1
answer
53
views
How do I put a button to the bottom of a box?
I have recently started using html in order to create a website for my project. I have planned on making this website that contains the intro page, that has a button, revealing further contents.
This ...
1
vote
0
answers
54
views
jsPDF Center Text Alignment Doesn't Work with setCharSpace
I am using jsPDF in a project and mostly have things working as expected. If, however, I decide to change the default character spacing to any non-zero value, centering gets thrown off by the ...