8,769 questions
0
votes
0
answers
65
views
how to align Text and IconButton composables in a grid
Using Jetpack Compose on Android, I am trying to layout a lot of IconButton in a grid with Text headers on the columns and rows. I'm using Modifier.weight. As you can see from this example, Text and ...
0
votes
1
answer
109
views
Flexbox: align-self depending on row
I've got some short flexbox items and some long/tall items in a multi row (flex-wrap) container with flex-direction: row.
Depending on which row they appear in, I'd like to align the short items ...
1
vote
1
answer
163
views
Cause of AlignmentMismatch error while using bytemuck?
I'm facing an AlignmentMismatch error while trying to cast a Vec<u8> to Vec<T>, where T is a struct that uses repr(C) and Pod + Zeroable.
I've also tried the slice road &[u8] -> &...
6
votes
2
answers
270
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:
/...
0
votes
1
answer
83
views
Seeding alignment algorithms
I am creating a one step look ahead alignment algorithm in a protein alignment context.
I am now implementing a seeded option, seeds are also provided to the function, in which the gaps are stripped ...
2
votes
2
answers
193
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 ...
3
votes
3
answers
195
views
Creating a possibly unaligned pointer, but the location of the undefined behavior is not clear
In the C norm, the following rule:
C23 6.3.2.3 § 7
A pointer to an object type may be converted to a pointer to a different object type. If the resulting pointer is not correctly aligned for the ...
1
vote
0
answers
167
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 ...
2
votes
1
answer
126
views
how to create a dynamically sized array of object of possibly over-aligned not default-constructible type?
It's basically what std::vector::reserve does but I'd appreciate an explanation about how it's done, as I didn't manage to unravel an actual implementation.
For a type T missing a default constructor, ...
-1
votes
1
answer
93
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 ...
0
votes
1
answer
110
views
What are conditions for the WinAPI's FILE_FLAG_NO_BUFFERING alignment requirement to be enforced?
Various functions in the Windows API (e.g., CreateFile and subsequently, ReadFile/WriteFile) support the FILE_FLAG_NO_BUFFERING flag, compare CreateFileA function (fileapi.h) and most importantly File ...
1
vote
0
answers
46
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
2
answers
99
views
CCS Multiple Column Table Alignment
I am very new to CSS but trying to format alignment in a HTML Table that contains (3) columns (each column with a header). I want the first column aligned center, the 2nd left and the third right.
...
0
votes
1
answer
89
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'...
0
votes
1
answer
81
views
Aligning <p> tags to the right of the div? [duplicate]
I've done like 30 minutes of constant searching to no avail, I need to align 3 p tags to the right while still keeping them vertical. Here's the code I have so far that imitates a text message (which ...
-4
votes
1
answer
132
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 ...
2
votes
1
answer
55
views
Latex alignment [closed]
I have a text in Latex that I would like to align centrally, but some of the rows have a checkmark at the end that I would like to exclude from the alignment, i.e. I would like to achieve something ...
0
votes
1
answer
115
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
vote
1
answer
147
views
How can I right align each column in the Flutter DataTable?
How can I right align each DataCell in the Flutter DataTable?
For example, in this case, how can I have all the numbers aligned to the right?
Widget build(BuildContext context) {
return DataTable(
...
-1
votes
1
answer
75
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 ...
0
votes
1
answer
70
views
How to alignment element of page.overlay[] list?
I have an flet.Container() object, that appending to page.overlay. Then I want to show it, by page.update(). But it align by default: start, start(top-left corner). It should align bottom-center as I ...
1
vote
2
answers
134
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 ...
1
vote
2
answers
69
views
Flutter - How do I center the CustomPaint inside my InteractiveViewer?
I have this issue where the CustomPaint is always aligned left with InteractiveViewer and when panning while zoomed in I can't pan the whole image. I tried wrapping the InteractiveViewer in a SizedBox ...
6
votes
2
answers
79
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
52
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
1
answer
95
views
Unable to right-align DevExpress Grid View Columns after assigning values from data table
As stated in the title, I was unable to right-align my devexpress grid view columns after I assigned values to the rows, especially the columns with value 0 assigned to it. (Shown below)
Where I ...
0
votes
2
answers
65
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
146
views
Ag-Grid Angular row alignment issue
When grouping rows, I have 3 levels of data and 2 grouping sets. As I expand the first level grouping the data aligns correctly under the appropriate column headers that it belongs to. However, when I ...
1
vote
1
answer
86
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) % ...
0
votes
1
answer
47
views
Align text in button
I've tried the following CSS and doesn't work. Just the text doesn't stay in one line, and has enough space on sides.
#loquiero {
padding: 10px 70px 10px 70px;
}
#loquiero {
text-align: center !...
4
votes
1
answer
151
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)
...
-1
votes
2
answers
104
views
How to align p under h3 while keeping number and h3 in the same row using Tailwind?
I'm working on a project where I need to position three elements:
A number inside a red circle.
An <h3> header aligned on the same row as the number.
A <p> element starting directly below ...
0
votes
0
answers
175
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
713
views
Console output becomes misaligned
Description
Once in a while I'll be working on things and suddenly my console's alignment gets completely messed up. I think it's usually after a command fails or crashes (though I haven't been able ...
0
votes
1
answer
53
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
0
answers
140
views
Respecting alignment in a char buffer allocated with malloc that contains objects of different types, sizes and alignments
Say I have a raw chunk of memory of 1000 bytes like this:
#include <stdlib.h>
char* buffer = (char*)malloc(1000);
Other than the returned pointer, there should be no other objects yet, because ...
0
votes
1
answer
36
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 ...
0
votes
2
answers
972
views
How to Align Section Header with List Items in SwiftUI on iOS 18.2?
I am trying to align the section header with the start of the list item rows in SwiftUI (tested on iOS 18.2). However, the header does not align properly with the list items.
Here is my code:
List ...
2
votes
1
answer
117
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 {
...
0
votes
0
answers
104
views
how to right-align a table cell using ODF::lpOD?
I'm using the Perl module ODF::lpOD to add content to a template ODF document that I created using LibreOffice. The template contains, among other things, a table:
In the template, I enabled right-...
1
vote
0
answers
88
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
1
answer
70
views
How to control the position of r shiny plotOutput as it is expanded?
I'm building an app in which users can upload data and see a correlation plot of the numeric fields.
As users can upload datasets of different sizes, I've made a slider so they can vary the size of ...
1
vote
1
answer
66
views
Setting the vertical alignment of grid cells
Is there a way to align the top of the cell entries in a grid row when the cells contain text that spans more than one line?
Example:
Test
'F'⎕WC'Form'
'F.G'⎕WC'Grid'('Values'(1 2⍴('foo',[0.5]'bar')'...
1
vote
1
answer
49
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
1
answer
96
views
how to handle keyboard positions in composables
okay, so I have a composable function, a straightforward one, username and password are input fields, and a sign-in button below them. When I press on username input, the keyboard opens and aligns to ...
0
votes
3
answers
689
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
0
answers
129
views
How to overlay a 3D model on a physical object using pose estimation and tracking (AR application)?
I’m building an AR application where I need to estimate the pose of a physical object and overlay a 3D model of the same object on top of it, with tracking.
I’m considering using SIFT (Scale-Invariant ...
0
votes
1
answer
58
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 ...
-2
votes
2
answers
163
views
How to space out varying width text in HStack so centre of the text is positioned correctly?
I have created a slider that has 5 "steps". The user can slide between "0" to "Step 1" and "Step 2" etc. Each step is evenly spaced out based on the width of ...
1
vote
0
answers
63
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 ...