Questions tagged [fixed-width]

Fixed layouts are layouts that start with a specific size, determined by the Web designer. They remain that width, regardless of the size of the browser window viewing the page. Fixed width layouts allow a designer more direct control over how the page will look in most situations. They are often preferred by designers with a print background, as they allow the designer to make minute adjustments to the layout and have them remain consistent across browsers and computers.

source: http://webdesign.about.com/od/layout/g/bldeffixedlyot.htm

Fixed Width Text File Definition: Above all, a fixed width text file is a file that has a specific format which allows for the saving of textual information/data in an organized fashion. Fixed width text files are special cases of text files where the format is specified by column widths, pad character and left/right alignment. Column widths are in units of characters. So if you have data in a text file where the first column always has exactly 10 characters, and the second column has exactly 5, the third has exactly 12 (and so on), then you have a fixed width text file.

Each row (paragraph) contains one record of information; each record can contain multiple pieces of data (fields), each data field (column) has a precise number of characters. The data is padded with spaces (or any character you specify) if it does not completely use all the characters allotted to it. Further, each piece of data can be left or right justified, meaning the padding of characters can occur on either side.

source: http://www.softinterface.com/Convert-XLS%5CFeatures%5CFixed-Width-Text-File-Definition.htm

462 questions
5
votes
2 answers

How can I force fixed character width with CSS for ANY glyph, including arcane Unicode?

I suspect that this can't be done, but I'm asking just to be sure. I'd like to force a single character in a to have a specific width and height: 1em. Ideally the character would be stretched to 1em if it is not already fixed-width. This must…
o0'.
  • 11,739
  • 19
  • 60
  • 87
5
votes
2 answers

min-width for fluid column in fixed width table

I'm trying to create a table where a fluid column has a min width. All other columns have a fixed width, and should not grow wider or thinner. I can get the fluid column to grow and shrink correctly, so that it takes up the remaining space in…
Protagonist
  • 71
  • 2
  • 6
5
votes
1 answer

Marshaling C++ struct with fixed size array into C#

I have a C# struct declared like so: public struct AdvertisementData { public byte SomeId; [MarshalAs(UnmanagedType.LPArray , SizeConst = 12)] public byte[] AnArray; } And it's C++ counterpart: struct AdvertisementData { uint8_t…
SaldaVonSchwartz
  • 3,769
  • 2
  • 41
  • 78
5
votes
2 answers

Disable changing of width in html table

I'm trying to create a "fixed-width" table, but it somehow changes the column width whenever the data in column is bigger than rest of them. For example, following table changes the width on the last number, which is 10. …
Dawid Zbiński
  • 5,521
  • 8
  • 43
  • 70
5
votes
2 answers

Finding bogus data in a pandas dataframe read with read_fwf()

I'm trying to analyse the weather records for New York, using the daily data taken from here: http://cdiac.ornl.gov/epubs/ndp/ushcn/daily_doc.html I'm loading the data with: tf = pandas.read_fwf(io.open('state30_NY.txt'), widths=widths, names=names,…
Marcin
  • 48,559
  • 18
  • 128
  • 201
5
votes
1 answer

Fixed-width floating point number format

In Java, I have the following code: System.out.printf("%05.5f", myFloat); This works well for any numbers which are less than 10, but for any number 10 or greater, the decimal places are trimmed to 5, but that doesn't compensate for the fact that…
joshlf
  • 21,822
  • 11
  • 69
  • 96
5
votes
5 answers

What is the fastest way to get 1,000,000 lines of fixed width text into a SQL Server database?

I have a file with about 1,000,000 lines of fixed width data in it. I can read it, parse it, do all that. What I don't know is the best way to put it into a SQL Server database programmatically. I need to do it either via T-SQL or Delphi or C# (in…
Nick Hodges
  • 16,902
  • 11
  • 68
  • 130
5
votes
6 answers

How can I speed up Perl's processing of fixed-width data?

We've got a mature body of code that loads data from files into a database. There are several file formats; they are all fixed-width fields. Part of the code uses the Perl unpack() function to read fields from the input data into package…
martin clayton
  • 76,436
  • 32
  • 213
  • 198
5
votes
3 answers

Parsing variable length strings of fixed column widths C#

I am trying to parse a text report that is formatted into columns. Each column appears to be right justified with a fixed length. For each line, there are times that not all the columns are used. In that case it appears that spaces are used to…
Shawn
  • 85
  • 2
  • 6
5
votes
3 answers

Assigning CSS width to a position:fixed element

I'd like a fixed element's width to match that of the div placed immediately below it. Imagine a header and a main content div. A problem in matching their widths occurs when the header and content divs are nested inside an outer div. In this…
tim peterson
  • 23,653
  • 59
  • 177
  • 299
4
votes
4 answers

How to parse multiple line, fixed-width file in perl?

I have a file that I need to parse in the following format. (All delimiters are spaces): field name 1: Multiple word value. field name 2: Multiple word value along with multiple lines. field name 3: …
NeonD
  • 169
  • 1
  • 11
4
votes
1 answer

Measure field/column width in fixed width output - Finding delimiters?

In the context of the bash shell and command output: Is there a process/approach to help determine/measure the width of fields that appear to be fixed width? (apart from the mark one human eyeball and counting on the screen method....) If the…
Chris
  • 417
  • 3
  • 11
4
votes
2 answers

How to make a select in Blueprintjs use (or simulate) fill? Or even be fixed-width?

I have made a select control using the documentation as an example. However, the button changes its width depending on the width of the text for the selected item. This makes the control jump around and is not a good UI design. Is there a way to…
Mike Viens
  • 2,467
  • 3
  • 19
  • 23
4
votes
2 answers

Understanding numerical overflow in C++

I am trying to understand better how overflows behaves in C++. Consider the following MWE (must check for integer literals): #include #include #include int main() { uint64_t known = 6049417284; // Known…
Eduardo
  • 697
  • 8
  • 26
4
votes
3 answers

I don't want spaces after commas to be fixed width - best practise?

I'm creating a website where the main headings are displayed in a fixed width font (the designer's choice, not mine). But for headings containing a comma, this can look quite odd - there is a huge amount of space left after a comma. So I was…
8128
  • 969
  • 1
  • 8
  • 27