4,159 questions
0
votes
1
answer
94
views
Padding is not applied, as well as hidden class in tailwind css [closed]
I really need help with padding not applied for modal top up as well as hidden. The problem is in the end of the code. This pop up div is not in the centre. It is also very small, the padding is not ...
3
votes
1
answer
100
views
Rasterio : ValueError('Input shapes do not overlap raster.') but input shape clearly overlaps raster
I encounter a very strange case when extracting value of a single point from a raster with rasterio:
from rasterio import open as rs_open
from rasterio.mask import mask as rs_mask
from shapely....
0
votes
1
answer
550
views
Edge to Edge Android 16 API 36 BottomSheetDialogFragment Problems Solutions
I have a question. I would like to disable the edge-to-edge padding in BottomSheetDialogFragment().
I’ve currently done it like this. I should mention that we have to handle onConfigurationChange for ...
3
votes
1
answer
164
views
Problem about MediaQuery.of(context).viewInsets in Flutter for Redmi 7
I'm having a set of code like follows in a Flutter app:
Padding(
padding: EdgeInsets.only(
left: AppSize.s8,
right: AppSize.s8,
bottom: MediaQuery.of(context).viewInsets.bottom > 0
...
1
vote
1
answer
71
views
Why must sched_class structures be tightly aligned in memory in the Linux kernel?
Each scheduling policy (like SCHED_NORMAL, SCHED_FIFO etc..) is implemented as a struct sched_class, and instances like fair_sched_class, rt_sched_class, dl_sched_class, etc., are defined using the ...
1
vote
0
answers
67
views
Reproducing a libc++ optimisation that uses tail padding to store field members with no additional space [duplicate]
I've been reading the implementation of std::expected in libc++, and it describes an interesting optimisation where it stores a bool discriminator in the tail padding of the value/error types, when ...
0
votes
0
answers
13
views
CSS override issue: .abnormal class not overriding .plan-box div padding [duplicate]
I'm working on a pricing section where each plan is inside a `.plan-box`. All direct `<div>` elements inside `.plan-box` have a general style:
```css
.plan-box div {
padding: 15px;
...
3
votes
1
answer
140
views
Understanding sizeof for C Structures with bit-fields: alignment and packing
I am trying to understand how the sizeof operator works for C structures with bit-fields, particularly regarding packing and alignment. Below is a C program I wrote:
#include <stdio.h>
typedef ...
1
vote
1
answer
144
views
LazyColumn + TextField (not in bottomBar) with imePadding: extra padding when soft keyboard is opened
I am struggling around with this extra padding and provided here a small sample code.
What is causing the extra padding added between the text field and the software keyboard (when opened)?
Expected ...
0
votes
2
answers
92
views
Using CSS, how can I gradually reduce horizontal padding on very narrow screens?
I'm using the following CSS to restrict the content area width of a website to between 320px and 720px:
body {
min-width: 368px;
max-width: 768px;
padding-left: 24px;
padding-right: ...
1
vote
1
answer
146
views
Uses of pointer arithmetic within an object
Excerpt from the book "C++ memory management" by Patrice Roy
For example, the following code is correct, albeit not something one should seek to do (it makes no
sense, and it does things in ...
1
vote
1
answer
50
views
Child element inherits percentage instead of computed value
I'm stumped by the following:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-...
2
votes
4
answers
330
views
Swift UI - Custom distance between keyboard and textfield
I have created a scroll view with multiple textfield in vertical stack.Scrolling is working perfect. After clicking on textfield it autoscrolled above keyboard, but I need more space between keyboard ...
0
votes
1
answer
87
views
How does cudaMallocPitch help avoid bank conflict?
I learned CUDA function cudaMallocPitch creates padded memory that helps avoid bank conflict from this nice SO answer.
I can understand well how does the padding help alignment, as it very much ...
1
vote
1
answer
120
views
Negative padding lifts button in SwiftUI but not tappable area so button is not recognizing tap
I have a close or dismiss view button on an iOS app that I am trying to place in the upper left hand of a SwiftUI View. The button has an image within it and it action is to dismiss the view.
To the ...
-1
votes
1
answer
59
views
How to efficiently pad odd-length strings with leading zeros?
Does DolphinDB have a built-in function equivalent to Python's str.ljust() for string left-justification?
I have a DolphinDB table tmpCode with a string column Code containing values of varying ...
1
vote
1
answer
66
views
Flutter PageView start from the left
I have following code:
class _MyPagerState extends State<MyPager> {
late PageController _horizontalController;
final double itemWidth = 100.0;
final double viewportFraction = 0.7;
@...
1
vote
2
answers
264
views
How to add padding or increase size of indicator in flutter NavigationRail?
I have this simple code of NavigationRail
NavigationRail(
destinations: [
NavigationRailDestination(
icon: FaIcon(FontAwesomeIcons.list),
...
1
vote
0
answers
59
views
Flutter : CupertinoSwitch padding
The Cupertino switch has built in 4px padding on each side and default size of 51X31 (59X39 with padding).
Code from CupertinoSwitch()
const double _kTrackHeight = 31.0;
const double _kTrackWidth = 51....
0
votes
0
answers
30
views
Why does this padding "eats up" the border of the span elements in Firefox (v134.0.2) and in Chrome (v133.0.6943.142)?
The code snippets don't reproduce this issue for some reason, but I'll show you a screenshot of how it looks in my browser (Firefox v134.0.2):
UPDATE
Looks like when Chrome's window is resized to a ...
2
votes
1
answer
68
views
Mysterious Vertical Spacing
Where is the vertical space coming from when I have a single character inside a span with no margin or padding, and a line-height of 1?
Shouldn't the "X" character here be touching the ...
1
vote
1
answer
27
views
Padding file names with zeroes recursively in Cygwin
I have a main directory LT which contains other directories at different levels e.g.
Folder1
Folder2
Folder3
Folder4
Folder5
Folder6
etc.
The names of the folders are not relevant (they change all the ...
0
votes
1
answer
80
views
Flutter NestedScrollView with SliverAppBar Leaves Extra Space Underneath
Title:
Flutter NestedScrollView with SliverAppBar Leaves Extra Space Underneath
Body:
I'm using a NestedScrollView with a SliverAppBar that has a search bar as its title. The app bar collapses ...
-1
votes
1
answer
131
views
How can I make the image centered while padding in python
I am working on image processing. Since the input images have different sizes, I will crop them to a fixed size of 700x700. However, some images are slightly smaller than 700x700, so I want to apply ...
-1
votes
2
answers
130
views
Java AES encryption - How to fix IllegalBlockSizeException
I have two Java methods, one for encryption an another one for decryption. I would like to encrypt/decrypt a password with a master password. But when I try to decrypt the encrypted password i get ...
0
votes
2
answers
59
views
transform and padding do not works together
I have drop-down menu, I do not want to change it width min-width: 200px;. But I want to add padding from the right.
Also I can't understand how to make it's opening not to right, but to left, but ...
12
votes
1
answer
324
views
What would the downsides be of using [[no_unique_address]] all over the place?
[[no_unique_address]] allows structs to be more efficiently laid out, by sometimes putting members into tail padding of preceding members. We all like to save RAM and have more cache-efficient structs....
0
votes
1
answer
68
views
How make this text consistently line up? [duplicate]
I'm trying to display a row of data, I want to display the data neatly. I used \t, but using tab is inconsistent:
Current output (roughly):
Location City Price ...
2
votes
1
answer
193
views
What allows trivially copyable types to have padding bits?
Looking at many discussions about low level manipulations of objects in C++ (creation from array of chars, std::memcpy,...), I was wondering how it could work for classes with padding bits:
#include &...
0
votes
1
answer
217
views
Iced add padding to only one side of a widget
I'm trying to work out how to add padding to only one side of a widget in iced it's fairly easy to add padding to either all sides or just the left/right or top/bottom e.g. the widget shown below has ...
1
vote
0
answers
287
views
Is there anyway to use padding_mode='circular' in nn.ConvTranspose2d?
I'm a beginner of DCGAN with Pytorch. I found that nn.ConvTranspose2d did not support padding_mode='circular' even in 2024. However, nn.Conv2d supports circular padding mode and works well.
nn....
0
votes
1
answer
69
views
Varying embedding dim due to changing padding in batch size
I want to train a simple neural network, which has embedding_dim as a parameter:
class BoolQNN(nn.Module):
def __init__(self, embedding_dim):
super(BoolQNN, self).__init__()
self....
0
votes
0
answers
302
views
Transformers - ValueError: Asking to pad but the tokenizer does not have a padding token
Im running a RAG pipeline using Haystack (haystack-ai==2.6.0) and HF model & the transformers library (transformers==4.39.3).
This is how my code looks:
tokenizer = AutoTokenizer.from_pretrained(...
0
votes
1
answer
70
views
Are `elf.h` structures packed?
Quoting the man page:
All data structures that the file format defines follow the
"natural" size and alignment guidelines for the relevant class.
If necessary, data structures contain ...
0
votes
2
answers
199
views
FormBuilderDropdown items style
I am trying to remove the vertical padding inside the dropdown and to change the border radius of the highlight of the selected item. I am using the flutter_form_builder package.
Here's my current ...
0
votes
1
answer
93
views
Z-index for dropdown menu using ReactTS and TailwindCSS not working
I have a problem with z-index. I have a navigation bar and when I hover over a text, a dropdown menu appears. Menu and everything works as expected. The problem is when the menu is created, it won't ...
4
votes
2
answers
157
views
In C struct, why packed,aligned seems to do padding?
In C struct, why packed,aligned seems to do padding?
I have to read a bunch of MSB/LSB bytes from a remote device using i2c. As all device data are bytes, I use uint8_t which represent exactly 8 bits ...
1
vote
1
answer
122
views
How do I remove the margin at the topmost of showMenu?
I'm trying to make a topbar using showMenu. I tried to style the first PopupMenuItem in showMenu to look like one. I tried to change the color for that single Item, only to find out there are some ...
1
vote
1
answer
73
views
Dynamically change padding in Vue js 3
Hello I want to change padding based on my selected locale, since div width is changing.
<div
class="input-group modal-check-show show-modal"
:style="paddingLeft"
&...
0
votes
2
answers
600
views
How do I add padding around a PyQtGraph PlotWidget?
I am trying to add padding around a PlotWidget as the default settings are extremely tight. However, the strategies I am trying to take are not working. The default padding is seen below.
default ...
0
votes
3
answers
544
views
Trim with padding in imagemagick
How can I trim whitespace from an image but keep some padding with imagemagick?
I tried the -trim option but imagemagick crops down to the very edge of the content without leaving any padding.
Note, I ...
0
votes
1
answer
113
views
Zero Bytes After Modbus Function 0x0B, 0x0C Requests
I'm analyzing pcap file with Modbus traffic and noticed something unexpected. In the requests for Modbus functions 0x0B (Get Comm Event Log) and 0x0C (Get Comm Event Counter), there are 4 null bytes ...
1
vote
1
answer
52
views
Need to remove this mystery padding in between background and border
Need help removing this mystery padding in between a border and its background. In the preview it looks fine, but it exports with that weird padding inside the frame.
Here's the code:
<div ...
-1
votes
2
answers
121
views
A padding issue when creating a navigation bar
I have just started HTML and CSS, and I want to make a navigation bar. I ran into a problem where each of my links has this weird padding under it when I hover over the links, as shown in pictures. ...
0
votes
2
answers
311
views
Getting Inconsistent padding in tailwind css (on react+vite)
I am getting this type of padding /border . Click the link below to view.
[Inconsistent padding in tailwind]
Want like this
(https://i.sstatic.net/2RsqliM6.png)
I was trying to get border with ...
2
votes
2
answers
109
views
Textarea right padding when using a horizontal scrollbar?
When creating a textarea with a horizontal scrollbar, how to enable a padding on the right side?
CSS padding works for the top right corner, but not for the right side:
textarea {
white-space: ...
1
vote
2
answers
56
views
Why can't halfword-size data be placed on address 4x+1?
I've read several articles about data alignment and padding, and all of them tell me that the aim of alignment & padding is facilitating data access from memory(or cache).
Like an integer, which ...
2
votes
0
answers
293
views
How to remove top padding in SwiftUI List Section header?
I've tried a myriad of parameters suggested in different forums, and none of them seems to reduce the HUGE gap there is above my section header:
List {
Section {
// Section Content
} ...
0
votes
0
answers
45
views
Calculation of content-size of a flex-item that has padding [duplicate]
In this article on making equal columns with flexbox, the author mentions 2 cases where things get ruined if some flex-items have padding. So he has a container with a width of 600px, and 3 flex-items ...
0
votes
2
answers
69
views
WPF - cannot remove padding/margin around DataGrid cells
I try to modify that white margin around my datagrid cells
(I hide the cell H/V headers, also , sorry for hiding the text in the cells, it is company property related stuffs)
Here is how I define the ...