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

tensorflow tf.pad shape of output

I have this function: def resize_image(input_layer, counter ,width): shape = input_layer.get_shape().as_list() H = tf.cast((width * shape[2] / shape[1]), tf.int32) print (H) resized_images = tf.image.resize_images(input_layer,…
Maystro
  • 2,907
  • 8
  • 36
  • 71
0
votes
2 answers

Merge continuous 15-min time series dataset with discontinuous 15-min time series dataset

Pretty new to R, I appreciate any help you can give me on this issue. I have two 15-min time series datasets that I would like to merge. I would like to then plot a combination of variables from this merged dataset on a common x-axis. Here’s the…
SMATT
  • 1
  • 1
0
votes
0 answers

sql pad zeros left and right at the same time?

I have a bunch of dollar amounts in a varchar field which should be 8 characters long every time, to the format of 00000.00 For example, I have 3495 12.7 -.38 -324.81 which needs to be 03495.00 00012.70 -0000.38 -0324.81 Can this be done in a…
lefeal
  • 53
  • 5
0
votes
2 answers

Add zeros to the left of binary string - Java

Can you please help me find a way to add zero's to the left of a binary string, here's what I thought would work but it just prints the binary without 0's. package flipping_bits; import java.io.*; import java.util.*; public class Solution { public…
0
votes
1 answer

Getting current android gamepad axis position

I receive axes position from my bluetooth gamepad controller in dispatchGenericMotionEvent(android.view. MotionEvent) method. My method: @Override public boolean dispatchGenericMotionEvent(final MotionEvent event) { if( mPadListener==null…
0
votes
1 answer

cut a pice from an array and pad it with zeros

I need to cut a part of given size , and given location, from an N-dim array. If the part is to large, I need to pad it with zeros to achieve the given size. The examples are in 2D for simplicity. The given matrix: [[1 8 3 3 8] [5 8 6 7 6] [8 3 5…
Naomi Fridman
  • 2,095
  • 2
  • 25
  • 36
0
votes
3 answers

Pad an array with 0's swift

I am attempting to pad an an array with zeros but cannot find a succinct way to do this in swift. If I have array x = [1,2,3 ; 4,5,6 ; 7,8,9] in matlab I could use the command y = [zeros(1,3+2);zeros(3,1),x,zeros(3,1);zeros(1,3+2)] giving the…
Andrew
  • 85
  • 2
  • 8
0
votes
2 answers

Fill static text into cell every X amount of rows

I have code that fills in a blank row every X amount of records. What I want to do is have some code that will then plug into a cell in those empty rows some static text. Here is what I have for the adding of blank rows... code not all mine I nabbed…
0
votes
1 answer

how to check whether a sink pad of an element is receiving data or not?

I would like to know how to check whether a sink pad of an element in gstreamer is getting data or not. When ever if it is not getting the data i would like to reset or restart the pipeline. And can anybody tell me how to reset or restart the…
0
votes
1 answer

FFmpeg Slideshow + Audio + Watermark + Maintain Aspect Ratio

I'm trying to make a slideshow from some pictures along with an existing mp3 (copied). Picture dimensions differ, but I want the video output to be 16:9 aspect ratio and 3840x2160. I also want a watermark. It is important that pictures are not…
Pamela
  • 507
  • 6
  • 23
0
votes
1 answer

How padding 2 variable on c#?

function zeroPad(num, places){ var zero = places - num.toString().length + 1; return Array(+(zero > 0 && zero)).join("0") + num; } Please tell me the means of code above, and how to use it on C#
0
votes
1 answer

String padding based on length in Java

So, I have two Strings (line and objectCode) I want to print line first, and then print a number of spaces based on the length of line and then print objectCode. (So that all of the objectCodes are lined up. I tried, but got output like: 0000 …
Backwardsman
  • 142
  • 1
  • 9
0
votes
1 answer

How do I make my divs line up, despite different text lengths?

EDITED Here's my updated question: I've included a link to my site which shows the exact problem here The first box has a title that is short, and therefore doesn't push the the two divs beneath it (location and price) down very far. The second…
Nova
  • 423
  • 1
  • 10
  • 36
0
votes
1 answer

How to pad hyphen at left side : Oracle

I have existing records in the database the field description is aa_desc NOT NULL VARCHAR2(8) i have existing record for this field and now i have to add - (hyphen) with the existing record. since it is restricted to eight characters i have to…
Joe
  • 4,460
  • 19
  • 60
  • 106
0
votes
2 answers

java left pad zeros in a string with spaces in the middle

I'm looking for a performance solution in multi threading processes in JSE 1.7.0.52 for this problem: I have a String for example: " 12697 26 " I need to have a string as "00012697 26 " This means that I can't use String.formatter method…
SkyBlackHawk
  • 95
  • 10
1 2 3
8
9