fixed-width

Fixed Width, Large Data Problem

I'm currently designing a web application which may be viewed by people in all kinds of resolutions 1024..1920 or even larger resolutions. I've opted for a fixed-width design (as many other popular websites are, e.g. StackOverflow, CNN, Mint, WSJ, BofA etc.) with the lowest common denominator fitting in, meaning 1024. Now a problem is...

Portable C++ 03 Exact Width Types

Background Unfortunately the current C++ standard lacks C99's exact-width types defined in the stdint header. The next best thing I could find (in terms of portability) was Boost's cstdint.hpp implementation from the Boost.Integer library. Concerns That said, I've got a few problems with it: Boost's implementation dumps all the ...

How can I extract columns from a fixed-width format in Perl?

I'm writing a Perl script to run through and grab various data elements such as: 1253592000 1253678400 86400 6183.000000 1253764800 86400 4486.000000 1253851200 36.000000 86400 10669.000000 1253937600 0.000000 86400 9126.000000 1...

Perl formatting (i.e.sprintf) not retained in html display

I have ran into a bit of problem. Originally, I have the following input of the format: 12345 apple 12 orange I saved the first column as $num and second column as $fruit. I want the output to look like this (see below). I would like for the output to align as if the $num are of all the same length. In reality, the $num will c...

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 variables. Business logic is then able to refer to these fields in a 'human-readable' way. The file...

What's the best way of parsing a fixed-width formatted file in Java?

I've got a file from a vendor that has 115 fixed-width fields per line. What's the best way of parsing that file into the 115 fields so I can use them in my code? My first thought is just to make constants for each field like NAME_START_POSITION and NAME_LENGTH and using substring. That just seems ugly so I'm curious if there's any othe...

Chrome and fixed width on a div (or other tags).

I have some html which looks like this: <div style="{ display:inline; width: 80px}">fig</div>vitamin c<br> <div style="{ display:inline; width: 80px}">apple</div>vitamin a<br> <div style="{ display:inline; width: 80px}">coconut</div>vitamin <br> in IE.8 this is shown as fig vitamin apple vitamin coconut vitamin and al...

Why is my menu DIV overflowing its parent?

The menu div is overflowing the parent. "Science is but a perversion of itself..." <div id="header"> <h1>TITLE</h1> </div> <div id="navwrap"> <ul class="nav"> <li><a id="homenav" href="index.html">Home</a></li> <li><a id="linksnav" href="#">Links</a></li> <li><a id="contactnav" href="#">Contact</a><...

Using bitmap fonts in Netbeans

Is it possible to use bitmap (.fon) fonts in Netbeans? I have a font I particularly like (Raize font) and I don't see it anywhere on the list when I try to set it as the editor font. I can use it in other editors (Notepad++, pspad, visual c++ express etc). I can't use it in jedit either. Is this issue java related? ...

Outputting long fixed-width records to a flat file using SSIS

Hi everyone, I have to build an SSIS package for work that takes the contents of a table, all columns, and outputs it to a flat file. The problem is, one of the columns is a varchar(5100) and that puts the total row size at about 5200 characters. It seems the flat file connection manager editor won't let me define a fixed-width row be...

one liquid div with one fixed size div

I am trying to build a layout which has a fixed width div and a liquid width div beside it : <div id="main" style="width:100%; height:500px; background-color: #ccc;"> <div id="right" style="float: right; width:100px; height:500px; background-color: red;"> </div> <div id="left" style="float: right; width: auto; height:500px; ...

How do I use awk to parse a fixed-width (NACHA) file format?

My company has a problem: we suspect that the NACHA files we are receiving from one of our application service providers that we use to draw money from our clients are incorrect. We have all of the ACH agreements and legal mumbo-jumbo in place, so it's not a problem with our use of the ACH network, and we're not receiving word from the...

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 entire file. Now the difficulty is that the file is gzipped. Is it possible to do this wi...

Honor Whitespace padding to display columns in fixed width <select>

I am trying to create the effect of columns in a dropdown by padding text with whitespace as in this example: <select style="font-family: courier;"> <option value="1">[Aux1+1] [*] [Aux1+1] [@Tn=PP] </option> <option value="2">[Main] [*] [Main Apples Oranges] [@Fu=$p] </option> <option value="3">[Main] [*] [Next NP] ...

CSS: Horizontal, comma-separated list with fixed <li> width

Hello, I would like to achieve the following structure: [gfhtfg..., kgjrfg..., asd, mrhgf, ] ^-------^ ^-------^ ^-------^ ^-------^ X X X X (X = a fixed length) I've got a <div> with a fixed length, and inside it an horizontal, comma-separated list (ul) of links. The <li> elements should h...

How to set a fixed width on buttons within a jQuery buttonset?

I have a button set, and would like to set the width of each button so they can be the same size (i.e. if I have 4 buttons of 25% each of the element) Basically the site has a table on the left, and within that table I have 4 options. The way it is right now is it's not using 100% of the left column, so it looks bad. I'm looking to make...

New facebook application width to be 520px only?

I'm about to make a facebook application and I'm confused about what width I can design for. It seems that at the moment you have 760px at your disposal, but a lot of sources say this will be reduced to 520px in the beginning of 2010. Being halfway through 2010 already, I'm wondering if this is really happening? 520px seems very little? ...

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 type. There are currently 5 types of records indicated by the first character position i...

Get Font Width within VB.net Without Measuring a Control?

I need to display a table in rich text within a form window. It is only a two column table, so tabbing works fine to line everything up (since RichTextBox does not support RTF tables). However, sometimes the tab stops are incorrect because of non-fixed width fonts. So, I need a way to measure the pixel width of a particular string with...

How to keep the width of the bars the same no matter the number of bars we compare in the figure?

Dear All, I want to keep the width of the bars the same no matter the number of bars compared is high or low. I am using Matplotlib stacked bar chart. the width of the bars is relative to the number of the bars. Here is my sample code. How can I make the width the same no matter the number of bars I compare from 1 to 10 import numpy ...