Questions tagged [padding]

Extra space inserted into memory structures to achieve address alignment -or- extra space between the frame and the content of an HTML element -or- extra spaces or zeros when printing out values using formatting print commands like, in C, the printf*-family of functions.

Padding in memory structures is the insertion of additional bytes of unused space to make the internal fields of a structure align to desirable address boundaries.

Padding in HTML layout is extra space inserted between the content of the element and its border or frame. Padding is space added to the interior of the element; margin is space around the exterior of the element.

In arrays, padding is addition of extra 0's (zeros) in one or more dimension of the array in a symmetric, circular or replicating manner. This is important for signal and image processing, in the context of and convolution.

3939 questions
1
vote
2 answers

numpy pad with zeros creates 2d array instead of desired 1d

I am trying to pad a 1d numpy array with zeros. Here is my code v = np.random.rand(100, 1) pad_size = 100 v = np.pad(v, (pad_size, 0), 'constant') result is 200x101 array, whose last column is [0,0,0,... ], (leading 100 zeros), and all 1st…
Gulzar
  • 23,452
  • 27
  • 113
  • 201
1
vote
0 answers

LZString compressed data between PHP and Java

An Android app that I am writing acquires data compressed using LZString and sent out as base 64. I am using this implementation for LZString in Java along with this one in PHP. Both of these implementations are the top recomendations listed here…
DroidOS
  • 8,530
  • 16
  • 99
  • 171
1
vote
1 answer

Padding at bottom of modal messes up fixed header when scrolled to the bottom

I would like my modal to have a padding on the bottom of it, so that when you reach the bottom of the content when scrolling it looks like this: instead of this: The problem I'm having, and you can see it in these two pictures, is that when I try…
JR3652
  • 435
  • 1
  • 4
  • 13
1
vote
1 answer

Why is there a pixel space around my table?

I have a table that I would like to start on exact left and top of screen, but it looks like there is a 1 pixel space to the left and top of it. Not sure why. I've tried margins, borders, etc all to 0, but can't get rid of the pixels.
E.D.
  • 215
  • 3
  • 16
1
vote
0 answers

Aligning a C# class with a C++ class using padding

I am trying to align a C# class with C++ class so I can RPM the structure in C#. The C++ class contains a pad of 0x10 but I can't seem to align my C# class with my C++ class. C++ Class: class Value { public: char pad_0x0000[0x10]; //0x0000 …
Cow Nation
  • 71
  • 9
1
vote
2 answers

c# Pad at the leading octets

i have exponent whats 3 bytes long. Now i need it to be 4 bytes. I found somewhere that i could pad at the leading octets.. but i have no idea to do that.. So can anybody help me out? Example Input: exponent what i have right now is 65537, int bytes…
hs2d
  • 6,027
  • 24
  • 64
  • 103
1
vote
1 answer

What is the rule of structure padding

I have looked through a post of structure padding in geeksforgeeks, https://www.geeksforgeeks.org/is-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member/ But I don't know why in this case: int main() { struct C { //…
fuyao
  • 33
  • 1
  • 3
1
vote
0 answers

RSA routines:OPENSSL_internal:DATA_LEN_NOT_EQUAL_TO_MOD_LEN

I kind of got stuck with this exception: java.security.cert.CertificateException: java.lang.RuntimeException: error:04000070:RSA routines:OPENSSL_internal:DATA_LEN_NOT_EQUAL_TO_MOD_LEN at…
oh oh
  • 11
  • 3
1
vote
1 answer

Xamarin Android - How to get rid of inexplicable Margin/Padding around a WebView?

I have a LinearLayout which contains a WebView inside of it. This WebView loads a static HTML file. I want the WebView's size (width and height) to match that of the LinearLayout, but for some inexplicable reason there is this mysterious margin or…
1
vote
3 answers

struct padding influence in C struct serialization ( saving to file )

I have the following structs in C: typedef struct sUser { char name[nameSize]; char nickname[nicknameSize]; char mail[mailSize]; char address[addressSize]; char password[passwordSize]; int totalPoints; PlacesHistory…
jmacedo
  • 773
  • 1
  • 13
  • 24
1
vote
2 answers

Add a Padding inside Children in Flutter

I've a gridview that contains some images. but you know, it's so close each other and I want give them a space one of other. but I still cant make them . I've try to make some experiments. but it still give me nothing. the problem is the padding is…
Roman Traversine
  • 868
  • 4
  • 12
  • 22
1
vote
2 answers

How can I make my CSS grid even with the background color?

I have been trying to make an even 3x2 grid. Some of the blocks are longer and the others and I want them all to be the same length. What would be the best CSS practice to accomplish that? The pictures is what I've accomplished so far. HTML
Michael Stokes
  • 401
  • 1
  • 10
  • 24
1
vote
0 answers

Difference between lastBaselineToBottomHeight and paddingBottom

For an EditText, what is difference between: android:lastBaselineToBottomHeight and android:padddingBottom Layout preview shows that android:lastBaselineToBottomHeight adds gap between text and line of EditText whereas in this website, it is…
Malwinder Singh
  • 6,644
  • 14
  • 65
  • 103
1
vote
0 answers

CUDA: Why does padding the shared memory array by one column decrease the speed of the kernel by 250%?

__global__ void setRowReadColPad(int *out) { // static shared memory __shared__ int tile[32][33]; // mapping from thread index to global memory offset unsigned int idx = threadIdx.y * blockDim.x + threadIdx.x; //…
1
vote
2 answers

Add paddings in csv file to make data frame readable for pandas

I have several data in csv files (similar data structure but not the same), with different sizes of rows and columns for certain lines. For example, the first three lines of each csv file has varying number of columns, ie: ---------------- Table |…
Vinci
  • 365
  • 1
  • 6
  • 16
1 2 3
99
100