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.

3517 questions
1
vote
2 answers

Image displaying wrong

I want to create some neat circular buttons for a user interface, but I can't use divs because the links won't work then. I've got a rounded image with the border-radius property, which is 50 pixels wide and tall. The dimensions of the image inside…
Wickon
  • 13
  • 2
1
vote
0 answers

Why is there a '1' in the padding of SHA-2

I'm looking at the SHA-256 algorithm. The padding consists of a single '1', followed by as many 0's as needed to made the size of the block congruent to 448 mod(512), and then the size of the message (excluding the 1 and the padding) as a 64 bit…
Rafa
  • 1,081
  • 8
  • 16
1
vote
1 answer

How to set a text padding in a TextField?

I need to set a left-padding of the text inside a TextField. There is a method setAlign(Align.TOP | BOTTOM | CENTER) but I need to hardcode a value so it looks nice. Here's my current code: TextField loginField = new TextField("", skin); …
user6367252
1
vote
2 answers

How to make padding full width without any white space on both side of the screen?

I see that most of the websites share a common thing which is the colour bar that extend to full screen across the screen. So I just supposed that this could be padding and if I making this padding width 100% it would make the width be REALLY full…
1
vote
1 answer

Margins around the System.Windows.Forms.Button

How can "solid" margins be made around System.Windows.Forms.Button control? var button = new System.Windows.Forms.Button(); button.Dock = DockStyle.Fill; button.Margin = new Padding(20); var panel = new…
dnk.nitro
  • 468
  • 6
  • 12
1
vote
2 answers

Pad right multi-line string

After finding this code snippet from here '{0: <16}'.format('Hi') I was able to right pad strings - which is what I'm after. I've written a function to deal with multi-line strings, but I a feeling there's a quicker, more Pythonic method: The…
Mr Mystery Guest
  • 1,308
  • 12
  • 42
1
vote
2 answers

How to encode a text with rsa/ecb/pkcs1 padding mode with a given public key in java?

I want to encode a string with rsa/ecb/pkcs1 padding mode with a given public key (the public key is a string) in java. I also want to present the results in UTF-8 Format how to do it?
Marzo
  • 43
  • 1
  • 9
1
vote
3 answers

Structure alignment padding, largest size of padding, and order of struct members

I've been learning about structure data padding since I found out my sizeof() operator wasn't returning what I expected. According to the pattern that I've observed, it aligns structure members with the largest data type. So for example... struct…
Zebrafish
  • 9,170
  • 2
  • 28
  • 78
1
vote
0 answers

Android custom view's padding when scroll

I wrote a custom text view(it doesn't matter what kind of view actually) that extends from View. I added padding to this view in my XML document and read these padding and pass it to super to apply these padding. And in my onDraw and onMeasure I…
gone
  • 813
  • 7
  • 19
1
vote
0 answers

How can I do the RSA/ECB/PKCS1 Padding mode in Linux?

I am programming with Linux to encrypt a .txt file. I should encrypt a s2 chaine with a given PKI encryption key using RSA in RSA/ECB/PKCS1Padding mode. I have excecuted the following commands: openssl rsautl -encrypt -pkcs -inkey Key.pem -pubin…
Marzo
  • 43
  • 1
  • 9
1
vote
1 answer

How to make cell array same length after padding zeros

This is data matrix having 2*159 cells In the data matrix so many columns ( 2 vectors) having different length . I want to pad zeros which have the minimum length. Number of zeros should be [max(length(Vector 1))-min(length(Vector 2))] Now I want…
1
vote
0 answers

opencv copyMakeBorder exception at memory

I'm working with opencv for adding border in my image but I get an runtime error: cv::Exception at memory location 0x0017F1DC Here is the my code: cv::Mat img2(img.rows + (nr - M),img.cols + (nc-N),img.depth()); int top = (int)ceil((nr - M) /…
1
vote
1 answer

How to pad an image in java?

in order to padding an image, I am trying to pad a small 3*3 array. I could mirror original array's last column and last row to get a 4*4 array (my first code). But when I am trying this code for an 3*4 array I get ArrayIndexOutOfBound error (my…
Nazi
  • 61
  • 9
1
vote
1 answer

Block auto padding-top divi theme

I have problem with "auto" padding-top on my site, I want to get rid of the space between menu and video (like on the second print-screen - I have edited padding-top via Chrome browser to 0px). Moving up element with CSS margin-top: -80px is not…
1
vote
1 answer

python encode hex pad every character with 00

I need to pad every character with 00 for a string that I am converting to hex. Is there any way to do this in python 2.5.2? e.g. hextext = "H:\myfilepath.myfileending" encodedhex = str(hextext.encode('hex')) print encodedhex It currently…
Ke.
  • 2,224
  • 5
  • 32
  • 70