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
3
votes
2 answers

Split Pandas Column of type String using fixed width (similar to Excel text-to-columns functionality with fixed width)

I have a dataframe of CCYPair and corresponding spot values similar to the below: Current Dateframe: d = {'CCYPair': ['EURUSD', 'USDJPY'], 'Spot': [1.2, 109]} df = pd.DataFrame(data=d) I am looking to split the CCYPair column into CCY1 and CCY2.…
3
votes
2 answers

How to use Isotope or Masonry with a fixed width?

I have not been able to find a way to use Isotope (or Masonry) with a fixed width outer container. It always insists on re-sizing. I've looked through the options, code, google and here and haven't found the answer. Is it even possible?
Mary
  • 31
  • 1
  • 3
3
votes
0 answers

How to write fixed width text file in R?

I have a dataset that is stored into a variable called "new" and I am trying to write this to a txt file with fixed specified widths between each column. I have already tried library(gdata) write.fwf(new, file = "test.txt", width =…
jwalls91
  • 341
  • 1
  • 5
  • 14
3
votes
0 answers

Marshalling C struct with fixed size array into C#

Im trying to Marshall a C struct into C# like so [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Shader { public uint id; [MarshalAs(UnmanagedType.ByValArray, SizeConst = Raylib.MAX_SHADER_LOCATIONS)] public…
MysteriousSpace
  • 53
  • 1
  • 2
  • 6
3
votes
4 answers

Alternative to Fixed-Size Arrays in Java?

[Context: new to Java, 4 months tops; old hand at C++.] I'm working on a library that requires an array of a fixed size ("fixed string") in many places. I'm trying to use Dependency Injection (q.v.) for this particular problem, so I would like…
John Price
  • 556
  • 1
  • 6
  • 18
3
votes
1 answer

Transforming a Hlist[F[A]] into F[B] where case class B has aligned types with A

Note: I am learning shapeless, so please ask for clarification if I miss any details. Background: I am building an encoding/decoding solution for fixed-length format while practising Shapeless. The idea is that each case class would have its own…
Atais
  • 10,857
  • 6
  • 71
  • 111
3
votes
2 answers

(Fixed Width) vs (Variable Width) Website Design

I am learning how to design a website. One of the decision seems to be how to present the data to the user i.e. with the presence of different monitor sizes, whether to structure the data to occupy the entire screen (a.k.a GMail) or make it fixed…
Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264
3
votes
3 answers

Convert fixed width txt file to CSV / set-content or out-file -append?

Input file is a fixed-width txt file. My client normally opens it in Excel and manually specifies the column breaks. I'm hoping to replace certain blank spaces with a comma, so that I can parse as CSV and save as XLS or whatever. $columBreaks = 20,…
dahifi
  • 77
  • 1
  • 7
3
votes
3 answers

C#, reading in Fixed Width records, varying record types in one file

To start I would like to clarify that I'm not extremely well versed in C#. In that, a project I'm doing working in C# using .Net 3.5 has me building a class to read from and export files that contain multiple fixed width formats based on the record…
Mohgeroth
  • 1,617
  • 4
  • 32
  • 47
3
votes
5 answers

Powershell fixed width export

I am having a text file wich uses fixed width for separating columns. I'm loading the file and create a new column which concatinates the values of the first two columns. The problem I have that when exporting the data I need to define a fixed…
user2428207
  • 825
  • 4
  • 16
  • 29
3
votes
6 answers

searching within a compressed sorted fixed width file

Assume I have a regular fixed width file that is sorted on one of the fields. Given that I know the length of the records, I can use lseek to implement a binary search to find records with fields that match a given value without having to read the…
frankc
  • 11,290
  • 4
  • 32
  • 49
3
votes
1 answer

prevent blank output lines at end of file in XSLT 1.0

We have an xml file sent by an external provider every day that looks like this: ... data nodes ... data nodes …
Our Man in Bananas
  • 5,809
  • 21
  • 91
  • 148
3
votes
1 answer

Fixed digits number in floats

I read a lot of discussion about this on SE, but still can't find the right one. I want to plot some numbers, of various lengths, with the same number of digits. For example I have: 12.345678, 1.2345678. Now, since I have to plot them with their…
Py-ser
  • 1,860
  • 9
  • 32
  • 58
3
votes
1 answer

Error in read.fwf when header=TRUE

I have simulated data that looks like this: LastName Date email CreditCardNum AgeZip Amount Paul 21/02/14 Aliquam.fringilla@dolordapibus.co.uk 4241033422900360…
shadowtalker
  • 12,529
  • 3
  • 53
  • 96
3
votes
2 answers

PHPWord fixed cell width

I am trying to create a table with cells width a fixed width. Let's say I have this code: $table->addCell(300)->addText('first'); $table->addCell(300)->addText('text that is very looooooooong'); The first cell's 300 width is ignored and is crushed…
HansElsen
  • 1,639
  • 5
  • 27
  • 47