fixed-width

Fixed width, variable height in JPanel with flow

北城余情 提交于 2019-12-05 23:29:25
问题 I have an annoying problem with Java’s layout managers. I have the following situation: In a panel A are two other panels B with an absolute layout and C with a FlowLayout. B is highly customized and has a fixed size set via setPreferredSize . C should have the same fixed width as B but otherwise be of a variable height, depending on how many components are added in the flow. The resulting A should then have the fixed width and A.height + B.height as the height – at least that is what I want.

Susy 2: Fixed width sidebar with fluid main content area

百般思念 提交于 2019-12-05 12:12:44
Using Susy 2 (release candidate), I'm trying to figure out how to create a simple fluid layout with a fixed width sidebar - either left position or right - I'm happy using the first and last keywords. Can anyone give me any pointers on how to do this within Susy 2? Thank you! There are a few ways to mix fixed/fluid layouts, depending on your own specific case. Isolate the sidebar. Float isolation is a cool a way of keeping floats independent from each other. .side { @include span(3 static isolate); } .main { @include full; padding-left: span(3 static wide); } // or... .main { margin-left: span

How to keep <li> elements on single line in fixed width <ul>?

瘦欲@ 提交于 2019-12-05 11:15:46
I've a header div and a menu ul below it. I'd like to accomplish 2 things: 1) the ul should have the same width as the div (outer vertical borders exactly same x position 2) I'd like to keep the spacing between li elements roughly equal With some trial and error on the li 's margins and padding I roughly achieved the first point in Google Chrome (please see this jsfiddle ) but in Firefox the li 's don't fit in the ul so they don't stay on a single line. Also, the last li tends to 'spill over' to a second line when zooming in/out. I tried it with margin:5px auto and padding:5px auto on the li

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

一笑奈何 提交于 2019-12-05 08:41:33
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, na_values=['-9999']) Where: >>> widths [6, 4, 2, 4, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1

When should I use UINT32_C(), INT32_C(),… macros in C?

自作多情 提交于 2019-12-04 22:30:30
I switched to fixed-length integer types in my projects mainly because they help me think about integer sizes more clearly when using them. Including them via #include <inttypes.h> also includes a bunch of other macros like the printing macros PRIu32 , PRIu64 ,... To assign a constant value to a fixed length variable I can use macros like UINT32_C() and INT32_C() . I started using them whenever I assigned a constant value. This leads to code similar to this: uint64_t i; for (i = UINT64_C(0); i < UINT64_C(10); i++) { ... } Now I saw several examples which did not care about that. One is the

PHP library for creating/manipulating fixed-width text files

偶尔善良 提交于 2019-12-03 11:17:01
问题 We have a web application that does time-tracking, payroll, and HR. As a result, we have to write a lot of fixed-width data files for export into other systems (state tax filings, ACH files, etc). Does anyone know of a good library for this where you can define the record types/structures, and then act on them in an OOP paradigm? The idea would be a class that you hand specifications, and then work with an instance of said specification. IE: $icesa_file = new FixedWidthFile(); $icesa_file-

PHP library for creating/manipulating fixed-width text files

我怕爱的太早我们不能终老 提交于 2019-12-03 02:45:28
We have a web application that does time-tracking, payroll, and HR. As a result, we have to write a lot of fixed-width data files for export into other systems (state tax filings, ACH files, etc). Does anyone know of a good library for this where you can define the record types/structures, and then act on them in an OOP paradigm? The idea would be a class that you hand specifications, and then work with an instance of said specification. IE: $icesa_file = new FixedWidthFile(); $icesa_file->setSpecification('icesa.xml'); $icesa_file->addEmployer( $some_data_structure ); Where icesa.xml is a

Fixed width number formatting python 3

核能气质少年 提交于 2019-12-02 23:44:15
How do I get an integer to fill 0's to a fixed width in python 3.2 using the format attribute? Example: a = 1 print('{0:3}'.format(a)} gives ' 1' instead of '001' I want. In python 2.x, I know that this can be done using print "%03d" % number. I checked the python 3 string documentation but wasn't able to get this. http://docs.python.org/release/3.2/library/string.html#format-specification-mini-language Thanks. Prefix the width with a 0 : >>> '{0:03}'.format(1) '001' Also, you don't need the place-marker in recent versions of Python (not sure which, but at least 2.7 and 3.1): >>> '{:03}'

Windows Batch script * (star) read as text?

我的梦境 提交于 2019-12-02 20:04:38
问题 I'm writing a batch script to convert a fixed-width text file to .csv format. Here's what I've written so far: @echo off setlocal enabledelayedexpansion for /F "tokens=*" %%A in (HRV*.txt) do ( set var=%%A set mer=!var:~6,11! set cr=!var:~18,19! set dt=!var:~42,30! set aa=!var:~72,30! set ab=!var:~102,30! set ac=!var:~132,15! set ad=!var:~147,30! set ae=!var:~177,30! set af=!var:~283,36! set ag=!var:~318,3! set ah=!var:~329,7! set ai=!var:~337,17! set aj=!var:~442,2! set ak=!var:~460,15! set

Two columns, fixed fluid with 100% height

馋奶兔 提交于 2019-12-02 16:44:48
问题 How can I achieve the following effect without the use of a table? Example: http://enstar.nl/example.php (The example may not be visible at the moment, the nameservers should have been changed, but my hosting isn't that fast in updating them. Should be working later today. I apologize for the inconvenience) All methods require a header and/or a footer. I don't want that. What I want is the following: Pure CSS, no tables 2 columns, fixed fluid (in that order) if the content hasn't reach the