XAML simplify row definitions in Grid - xaml

I have a lot of (actually all) <RowDefinition Height="*"/> in my XAML for a single grid. Is there a way to simplify this to declare a grid whose rows have * as height?
EDIT: Originally ask as Auto instead of * but the spirit of the question is the same: to simplify repetitive row definitions.

There's a good blog post by Toni Petrina about shorter way of writing Grid row and column definitions.
It comes down to writing it like this:
<Grid a:GridEx.RowCol="*,*|*,*">
Read more here: Shorter way of writing Grid row and column definitions

Grid doesn't support control templates (info taken from here.).

Related

The mechanism of auto inserting in Pandas Dataframe when selecting rows by index

I noticed a mechanism of auto inserting when selecting rows by index. To illustrate, I use the following code:
Then my questions are 2 (may be they are the same):
Any document about this mechanism? (I have tried but cannot find it in the long long official documents)
How to avoid the auto inserting? For example, I want the last line of code returns the only 'a' row.
Thank you very much in advance!
I have not seen any documentation. It looks like an unintended artifact. I can think of some clever things to do with it but I wouldn't trust it.
Work around
df1.loc[pd.Index([1, 'a']).intersection(df1.index), :]

Efficiently access long text from a column in a SQL Server database

Newbie question: I'm using SQL Server on a remote server where I cannot use UDFs of any type. I am using a database where one column is a text column containing several paragraphs of text per entry. As I test my code, I would like to have a way to efficiently access these columns a few at a time.
Currently, the only way I can find to do this is using eg:
SELECT TOP 25 ReportText
FROM MyDb.Table1
...which, of course, gives the output in the Results window, as a single string of characters that I have to keep dragging the column width wider and wider and wider in order to try to see.
What am I missing? I don't need it to look pretty, I just need to be able to see it efficiently....
As #JohnSpecko pointed out in a comment, results to text is exactly what I needed. It is turned on by hitting (ctrl+t) before running your query. Thanks!

Looking for ways to use "ASCII/Unicode art" to generate simple chart within the SQL resultset using a basic SQL client

I often have to pour through data to look for some pattern. It would be nice if I can see a quick chart inline or even across lines.
I can think of several ways to do it. For example:
In one column print a character say '*' n number of times where n is
proportional to the number you want to visualize. This will
generate a vertical bar graph.
Use special unicode characters that look like bars of different heights and use the appropriate character corresponding to the value you want to plot. Print multiple such characters side by side. This will generate an inline bar graph or sparkline.
While I can go ahead and implement something crude myself, I thought I might as well ask. Perhaps something like this already exists.
I am using PostgreSQL but the problem is fairly generic.

KeywordFilter field to filter from database values

How can i implement a KeywordFilter field to filter data from the database table as soon as text is fed into the field.
Most of the samples I have come across demonstrates filtering from predefined arrays.What i am looking out for is filtering from database.
Please guide how to go about it.Thanks
I have tried out this example of BB docs which shows in arrays
A straightforward approach would be to load the data from the database into a ReadableList and pass that to the KeywordFilterField.
The method used to set the values is
setSourceList(ReadableList list, KeywordProvider helper)
ReadableList is an interface which has a few implementations. The example code you are looking at uses the SortedReadableList but a BasicFilteredList would work nicely too.

WCAG 2.0 Using tables for layout

Does WCAG 2.0 allow tables for layout, I can't see anything in the guidelines saying you can't but this suprises me.
http://www.w3.org/TR/WCAG20-TECHS/H73.html
Although WCAG 2 does not prohibit the
use of layout tables, CSS-based
layouts are recommended in order to
retain the defined semantic meaning of
the HTML table elements and to conform
to the coding practice of separating
presentation from content
I'd add to #jordan answer that imbricated tables are inaccessible.
A layout table must avoid using any element used in data tables, that is:
no caption, thead, tfoot and th elements (only table, tr, td and optionally tbody)
summary attribute (it can be empty), headers, scope (only rowspan and colspan. And id obviously)
strange things like axis or col element
It must also be linearizable, that is, must make sense when cells are read from top to bottom and left to right.
Relevant WCAG 2.0 Failure Techniques are:
F46: Failure (...) due to using th elements, caption elements, or non-empty summary attributes in layout tables
F49: Failure (...) due to using an HTML layout table that does not make sense when linearized
Note: if you're using tables only for design constraints, then FYI you can use display: table; (and table-row and table-cell) on every browser except IE6 and IE7.