Looking to find text columnar position verification tool. Does one exist? - validation

I am working on creating text based data feed files that have fixed column widths. Example: Position 1-5 is record layout ID, position 6-35 is part number, position 36-70 is description, etc.
I wish there were a tool I could provide these data input widths, then paste in the raw text to visually see where it lines up. Conceptually, this would seem to be a pretty simple tool.
Do you know of any solutions or creative ideas?
Thanks!

Use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr
Layout Id would be str.substr(1, 5)
Part number would be str.substr(6, 35)
etc.

Related

Find the number of displayed lines, with folding in Ace

Within an Ace editor, it is easy to find the number of lines in the edited document with the following:
myEditor.session.getLength();
But languages like JSON or XML can be "folded." That is, children properties or elements can be collapsed so only one single line is displayed for the parent.
Is there a way to get the number of lines actually displayed? Something like the following:
myEditor.session.getVisibleLength();
Note: the ultimate goal is to have an editor that adapts its height on the page to the content it displays (if lines are collapsed, then it should shrink, and if collapsed lines are expanded again, it should increase its height.)
UPDATE: After a user's response, I use the following. This is not the answer to the specific question I asked above, but rather the perfect answer to what I was trying to achieve overall:
const myEditor = ace.edit(elem, {minLines: 5, maxLines: 50});
To automatically change the height of the editor use maxLines option, but don't set it to a very large value as performance depends on the number of displayed lines.

Separator line between columns in MS-Access report

I have successfully built a two column report in MS-Access (2013, if that matters). What I can't seem to find out, is how to get a separator line between the columns.
I have tried to draw a vertical line in the details area, but this is not working when some fields in the detail area can grow. The line does not grow, and there doesn't seem to be a "grow" option for lines.
What am I missing? If MS-Access does not offer this, is there a way to do this programmatically?
I think your easiest solution is to create an image - about the size of your page - with a vertical line in the middle, then use that image as a page background for your report.
From my experience, the best quality/wheight you can get is when your image is in the EMF (enhanced Meta file) format, a Microsoft vector format.
This is not supported by many tools. I use Inkscape (free) when I need that. And from my limited experience, (free) Inkscape gives better results than (expensive) Illustrator for that use case.
Alternatively, you can create such background image as a Word document, save to PDF, then find an online PDF to EMF converter.

How to make two rows of words as big as one word in InDesign?

Im not sure how to express it so I posted a picture in link below.
It should look like this
Just enter the text on 3 lines like so:
MORE
AT
THE HALL
Then adjust the point sizes, leading, kearning, etc. to create the aesthetic you want.
In this case line 1 and 3 could have full justification.
You can use scaling of the text(as shown in the character panel in attached snapshot) because changing font size also moves the baseline and causes the text to shift downward.
These attributes are also exposed via scripting.

Fixed row position under expandable row group

I am trying to display text on an SSRS report in a fixed position, regardless of the content above it. The problem is the content above may be one to three lines. As the above content fluctuates, so does the beginning of the next row of content. This happens in two places on the report.
In other words, I need two static starting points for dynamic content. I am printing text onto a pre-designed invoice that doesn't contain any customer data. The invoice is just a template (or shell if you will) and I am to position the data to print into spaces provided on that invoice.
Please see attachments. The attachment with two rows in each field is lining up correctly. I have done this intentionally as a basis. As you can see on the other two attachments, with either one or three rows, the content isn't lining up where it should be due to more or less content than my basis.
I have toyed around with cangrow & canshrink but couldn't get the results as desired.
Appreciate the help!
I think you're going to need to re-work your table to get working the way you want.
The way I would do it would be to have one table that groups each page data. Use this table to format your data - putting Rectangles in the area for your lines of data. Rectangles can have a set height so they fill your area when there isn't enough data.
Then you'll have to add another tables inside each of the rectangles to display each sections data.
See my example below - the RED represents where the Rectangles would go and the BLUE for tables.
I would keep the old table intact and copy and paste it in each rectangle. Then remove all the parts that that section doesn't need and set your rectangle to the correct size.

d3.js calendar view - colours + custom date

I have a few questions regarding his calendar view of mine
http://bl.ocks.org/mhska/5333055
data ranges from 1 to 4317 so the colours are not very "evenly" distributed. is there any way to improve it? (i mean basically everything below 100 is just one red colour)
is there a way to change the date format when you hover over the field from yyy-mm-dd to dd-mm-yyyy?
how could one change the colour of fields with no data? (generally this means weekends)
at the moment the fileds with no data and with most data (over 1000) are of the same colour.
thanks a bunch.
You can change the date format that is displayed by adapting the line
date = d3.time.format("%Y-%m-%d")
More information on the specifiers can be found in the documentation.
For changing the colour, you need to provide a different function for mapping values to colours. It looks like you're currently mapping your input values to only 40 output colours.
.range(d3.range([40]))
Increasing this number might be a good starting point. Note that you can provide an arbitrary function, in particular you could handle missing values separately in it.

Resources