Questions tagged [pad]

This tag is currently a synonym for [padding]. For other purposes, please consider [gamepad] or [ipad] or [pad-xml] instead.

Padding is the process of fitting a given data type (usually a number, image, array, or string) to a particular size by adding data to it without changing its overall meaning.

132 questions
0
votes
1 answer

PostgreSQL - Left pad value on COPY

I'm bringing in data from Excel into a PostgreSQL Db. There's a lot wrong with this data, but one thing that seems to connect several tables is a customer_id. However, in the customer table I've a unique char(8) that always has a leading zero. Yes,…
Neil Gaetano Lindberg
  • 2,488
  • 26
  • 23
0
votes
1 answer

Appending pandas series to the left of index zero

I'm trying to select portions of a pandas data series yf according to left limit a0 and right limit b0 . If the left limit is negative, I want to pad the difference with zeros so the resulting series would have the desired length, like this: if…
lmm_5000
  • 139
  • 8
0
votes
2 answers

Fix array with rows of different lengths by filling the empty elements with zeros in Javascript

I have seen this question and from what I have worked on it contained the answer but unfortunately it used Python instead of Javascript. So I would like to ask an similar question. I have an Javascript array which follows this…
0
votes
1 answer

FFmpeg pad filter calculating wrong width

I'm using ffmpeg.exe -i in.jpg -filter_complex "[0:v]pad=iw:ih+10:0:0" out.jpg to add a padding of 10px at the bottom of images and videos. In most cases it works as expected but with some the width is off by 1px resulting in failure with…
Abdullah Saleem
  • 3,701
  • 1
  • 19
  • 30
0
votes
2 answers

Linux Ncurses Pad Smearing ( Text Scrolling Attempt )

I am experimenting with the code below in an attempt to learn how to use and control a scrolling pad. when the Z key is pressed the pad scrolls up which is good. The problem is that it "smears" as it does so. As it scrolls up the bottom line…
Hakachukai
  • 90
  • 6
0
votes
2 answers

Having issues using Pad function to fill in date with time gaps

I am having issues using the Pad function (Padr) to fill in gaps within a time series. I have some code that downloads hourly data from a server, one day at a time for a specific time period. After each day of data has been downloaded the aim is to…
adamR
  • 25
  • 4
0
votes
1 answer

SAS padded spaces

I have a data set that I have created and it needs to be formatted to have trailing/padded spaces to the specified number of characters. Below are the field names from the STG data set. 'Social Security Number (SSN)'n 'Date of Birth'n 'Last Name'n…
Mark
  • 327
  • 1
  • 7
  • 14
0
votes
2 answers

Does AS3 have a similar class to Java's NumberFormat

I have always used the NumberFormat class in Java to do simple number padding ie. turn 1, 2, 3... into 0001, 0002, 0003.... Is there a similar utility in ActionScript to do my padding, or will I have to write a custom function?
adam
  • 22,404
  • 20
  • 87
  • 119
0
votes
1 answer

Position in ncurses a pad below a window in c++

I create 3 windows on top of the standard screen, with screen-width columns and one row height with: WINDOW* pWindow = newwin(0, COLS - 1, windowNr, 0); // windowNr 0 - 2 Which renders normally as consequitive windows: ----------------------------0…
ManuelTS
  • 316
  • 4
  • 14
0
votes
1 answer

In a list of data frames, pad one variable with leading zeros (ideally w/ stringr)

I'm working with a list of data frames. In each data frame, I would like to pad a single ID variable with leading zeros. The ID variables are character vectors and are always the first variable in the data frame. In each data frame, however, the ID…
itskj
  • 15
  • 4
0
votes
1 answer

Signature pad Storing the signature in Database

I have develop a signature using Html and java script where user can perform a signature,. help will be appreciated :) Thanks.
A.Bond
  • 43
  • 1
  • 6
0
votes
1 answer

how to convert padarray post to python pad function

im having a problem to convert post in matlab padarray to pad function in python, i want to do the same in python pad function : padded=np.pad(MAT,(1,1),'post'); this is not working because there is no post function in python this is an example in…
shlezz
  • 91
  • 11
0
votes
1 answer

Crop large images, but pad small ones

I want to display a 1920px by 335px version of user provided images on a web site, using ImageResizer v4. I would like to use cropping in case the image is larger than the given dimensions, but padding if it is smaller, and in between I would like…
Oliver
  • 9,239
  • 9
  • 69
  • 100
0
votes
1 answer

padding char array to a specific size matlab

if I have char array,ex: A='hello' of size 5 chars and I want to pad it with another character or set of characters to make its size =16 how can I pad this array in matlab ? and what should I use for padding can I use zero or I must use another…
0
votes
1 answer

Padding variable size array to fixed size in simulink

I am relatively familiar with MATLAB but new to Simulink. I am trying to build a model where I need to (seem to need to) use variable-sized array whose dimensions vary with each time step. Consider the following problem: Assume that my…
Andrew Chey
  • 21
  • 1
  • 6
1 2 3
8 9