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
1
vote
1 answer

Pad String with zero in matlab

I have a log file with a date, ie: LOG_20120509_100000.log (year) (month) (day) _ (hour) (minute) (second) But imagine that i want to perform the same thing on a set of hourly log files. I want to be able to do this: for i in 0:23 perform on…
Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
1
vote
1 answer

Padding column values?

In R 2.14.2 I have a matrix: mat1=matrix(c('A','','','B')) and I want to fill in the empty values so it becomes like this: mat2=matrix(c('A','','','B','A','A','A','B'),2,4,byrow=T) In other words, how do I pad the empty values? [In Excel I would…
Henk
  • 3,634
  • 5
  • 28
  • 54
0
votes
1 answer

PHP Date range (not using MySql calendar table)

I have a data range that I need to pull results from a database. Usual problem, not every day has records, and its skewing my charts. I need to pad the results with 0s and have a question on the best way. I have a php routine that populates an…
richedav
  • 5
  • 1
0
votes
1 answer

rename strings / rename files in python

I have a bunch of files like below: _1 blank file_ _10 - blank file_ _11 - blank file_ _2 blank file_ _3 blank file_ I would like to print out the name with the numbers padded (2 characters) I have : PATH = "/Users/seth/python/test" # # for (path,…
Simply Seth
  • 3,246
  • 17
  • 51
  • 77
0
votes
1 answer

Pad string with characters

I have $data_dec = 7; $data_bin = sprintf("%08b",data_dec); and $data_bin is 00000111 How do I pad with "X" instead of zeros while maintaining 8-bits? Expected data: XXXXX111
ak1234
  • 15
  • 3
0
votes
1 answer

request for member ' ' in ' ' which is of non class type Arduino

ARDUINO PAD BLUETOOTH Hi, I´m trying to do a PAD controll by Bluetooth, the conexion with be between my smartphone (Android) and the Esp32 but i have some issues The error
0
votes
1 answer

Use Python to trim and pad wav file using sox without saving wav file each time

I found that the best way to trim and pad wav files is to use sox. However, instead of saving the transformed file each time, how to go about just generating a variable for the transformed wav file? That is, do not save the transformed wav file…
Joe
  • 357
  • 2
  • 10
  • 32
0
votes
2 answers

How can I pad a series of hyphen-separated numbers each to two digits?

I am fairly new to PowerShell programming, so need help with set of strings I have as described below: "14-2-1-1" "14-2-1-1-1" "14-2-1-1-10" I want to pad zero to each number in between - if that number is between 1 and 9. So the result should look…
Mandeep
  • 3
  • 4
0
votes
1 answer

Signature Pad works everywhere except on Safari

Good morning, everyone. I'm trying to get my client's signature through a canvas. The script I'm using is: https://cdn.jsdelivr.net/npm/signature_pad@4.0.0/dist/signature_pad.umd.min.js It works completely fine on Chrome Browser and Android phones,…
0
votes
0 answers

Regex in a window-slide esq possible?

I am wondering if it is possible to use regex to split/replace a string and pad the matches with following n characters? For example, my use case would be to parse strings in window-slide esque way: with n = 3 "abcdef".split("..") becomes ["abc",…
0
votes
1 answer

JS signature pad from https://github.com/thread-pond/signature-pad is unable to work on larger touch screens laptops and desktops

I am using the 'jquery.signaturepad.js' library as it appears in the link https://github.com/thread-pond/signature-pad . This library has a signature pad (canvas) for mouse/touch screen signature purpose. The touch screen signature works when when…
mox-du
  • 107
  • 9
0
votes
1 answer

How to integrate Signature pad in a web application

I want to integrate a signature pad in my web application (.net or java). I have a form and my idea is to capture the signature and display it as soon as it is typed on the pad, and upon a submit sign a pdf(not a concern). My general questions are…
jakijunior
  • 39
  • 6
0
votes
0 answers

Padding images of size less than 5 by 5 pixels for CNN

I have dataset of multispectral images of land areas where the most of images are less than 5 by 5 pixels in size. I read that usual way to deal with small images is to upscale it to fixed size lets say 32x32 pixels and then feed the cnn by them.…
0
votes
2 answers

Python: Unable to convert integer to string JSON's value

In python, trying to convert the key-value pair from integer to string. Input: data = [ {'code': 123456, 'value': 32}, {'code': 987654, 'value': 12} ] Expected Output data = [ {'code': '123456', 'value': 32}, {'code': '987654',…
Rubyist
  • 6,486
  • 10
  • 51
  • 86
0
votes
1 answer

Enforce OpenSSL to pad/unpad data in stream mode encryption/decryption(like AES-CFG, AES-OFB, etc)

I'm currently writing a C++ software which have to be compatible with a legacy network service. The encryption/decryption which is used by that service is AES-128-OFB-PKCS#7(yes, it pads the data in OFB mode). Because OFB mode does not require…
The Storm
  • 71
  • 8
1 2 3
8 9