how to set min-height of row of blocktable in rml - height

How to set min-height of row of blocktable in rml? I read the rml-reference and can't find any related content. I only found the attr: rowHeights, But it seems that it just set a fixed height, the content will flow out. I wanna set a base height,and when the content increases the height of row increases too.
Thanks in advance!

I don't think that's possible for v7 or lower (v8/trunk no idea).
As you've stated right, rowHeights sets fixed heights for rows and without that attribute you will have auto-sized heights.

Related

Determine when a cell is blank

At work, I needed that if the value of a cell is equal to the cell next to it, then the background color changes to red, but it is doing it for blank cells, so it may be confusing for others.
Is there a way to avoid blank cells?
I have this formula:
=IF($D2=$C2,TRUE)
then background color changes to red (not sure if the correct formula, but it worked at the beginning, I am doing this in the Conditional Format Rules in Google Sheets).
I used this:
=IF($D1=$C1,IF(ISBLANK($D1),FALSE,TRUE))
I set the range to be C1:D1000. Your formula was putting the formatted color on the row above the data being checked. This formula checks if they are equal. Then if so it checks if one is blank. You don't have to check if they are both blank, the formula already knows that they are equal. So then if they are equal, return false, otherwise return true.
Clear formatting from C2 to wherever in ColumnD suits and with that selected then Format - Conditional formatting..., Custom formula is and:
=($C2=$D2)*($C2<>"")
Then select formatting of choice and Done.

Caffe: Multi-Label Images with Varying Number of Labels

I have a dataset where the images have VARYING number of labels. The number of labels is between 1 and 5. There are 100 classes.
After googling, it seems like HDF5 db with slice layer can deal with multiple labels, as in the following URL.
The only problem is that it supposes a fixed number of labels. Following this, I would have to create a 1x100 matrix, where entry value is 1 for the labeled classes, and 0 for non-label classes, as in the following definition:
layers {
name: "slice0"
type: SLICE
bottom: "label"
top: "label_matrix"
slice_param {
slice_dim: 1
slice_point: 100
}
}
where each image contains a a label looking like (1,0,0,...1,...0,....,0,1) where the vector size is 100 dimension.
Now, I apologize that my question becomes somehow vague, but is this a feasible idea? I.e., is there a better approach to this problem?
I get that you have 5 types of labels that are not always present for each data point. 1 of the 5 labels is for 100-way classification. Correct so far?
I would suggest always writing all 5 labels into your HDF5 and use a special value for when the label is missing. You can then use the missing_value option to skip computing the loss for that layer for that iteration. Using it requires add loss_param{ ignore_label = Y } to the loss layer in your network prototxt definition where Y is a scalar.
The backpropagated error will only be a function of labels that are present. If input X does not have a valid value for a label, the network will still produce an estimate for that label. But it will not be penalized for it. The output is produced without any effect on how the weights are updated in that iteration. Only outputs for non-missing labels contribute to the error signal and the weight gradients.
It seems that only the Accuracy and SoftmaxWithLossLayer layers support missing_values.
Each label is a 1x5 matrix. The first entry can be for the 100-way classification (e.g. [0-99]) and entries 2:5 have scalars that reflect the values that the other labels can take. The order of the columns is the same for all entries in your dataset. A missing label is marked by a special value of your choosing. This special value has to lie outside the set of valid label values. This will depend on what those labels represent. If a label value of -1 never occurs you can use this to flag a missing label.

Pyplot rotated labels offset by one

Just getting into matplot lib and running into odd problem - I'm trying to plot 10 items, and use their names on the x-axis. I followed this suggestion and it worked great, except that my label names are long and they were all scrunched up. So I found that you can rotate labels, and got the following:
plt.plot([x for x in range(len(df.columns))], df[df.columns[0]], 'ro',)
plt.xticks(range(10), df.columns, rotation=45)
The labels all seem to be off by a tick ("Arthrobacter" should be aligned with 0). So I thought my indexing was wrong, and tried a bunch of other crap to fix it, but it turns out it's just odd (at least to me) behavior of the rotation. If I do rotation='vertical', I get what I want:
I see now that the center of the labels are clearly aligned with the ticks, but I expected that they'd terminate on the ticks. Like this (done in photoshop):
Is there a way to get this done automatically?
The labels are not "off", labels are actually placed via their "center". In your second image, the corresponding tick is above the center of the label, not above its endpoint. You can change that by adding ha='right' which modifies the horizontal alignement of the label.
plt.plot([x for x in range(len(df.columns))], df[df.columns[0]], 'ro',)
plt.xticks(range(10), df.columns, rotation=45, ha='right')
See the comparison below :
1)
plt.plot(np.arange(4), np.arange(4))
plt.xticks(np.arange(4), ['veryverylongname']*4, rotation=45)
plt.tight_layout()
2)
plt.plot(np.arange(4), np.arange(4))
plt.xticks(np.arange(4), ['veryverylongname']*4, rotation=45, ha='right')
plt.tight_layout()

section covering 100% height of the viewport

I made a lot of research on this site (and others) but I can't solve my problem…
On this website : http://vintagebike.fr/t%C3%A9t%C3%A9/
I want that each sections covers 100% of the height of the viewport…
I set up at min-height : 100% for eachs…
I set up html, body at height : 100%
some code :
html{ overflow-y:scroll; font-size:100%; font-family:Arial,Helvetica,sans-serif; line-height:1.5; background:url(...) repeat top left; font-color:#353232; height:100%;}
body{ height:100%; background:#fff; float:left; width:100%; font-size:.8125em; color:#353232;}
#about{background-color: #cde2f3;position:relative;min-height:100%;}
#elements{background-color: #fbe2e4;position:relative;min-height:100%;}
#pourqui{background-color: #ffedc1;position:relative;min-height:100%;}
#contact{background-color: #ddeee4;position:relative;min-height:100%;}
If I set the height in pixels it's working…
I really don't understand…
Thanks in advance.
(sorry for my english)
Read the specification of percentage height. It has nothing to do with the viewport. Since you have body {height:100%}, as BODY grows, it becomes the element used to represent 100%, not the viewport.
You need to set the section height using JavaScript based on the browser's viewport size.
Bonne chance.
Specifies a percentage height. The percentage is calculated with
respect to the height of the generated box's containing block. If the
height of the containing block is not specified explicitly (i.e., it
depends on content height), and this element is not absolutely
positioned, the value computes to 'auto'. A percentage height on the
root element is relative to the initial containing block. Note: For
absolutely positioned elements whose containing block is based on a
block-level element, the percentage is calculated with respect to the
height of the padding box of that element. This is a change from CSS1,
where the percentage was always calculated with respect to the content
box of the parent element.

Google Visualization: Keep data points visible

I'm wondering if there is a way to keep the dots visible for each data point on a line chart. The default behavior is that a dot only appears on a data point (along with a tootip) when you hover over it. I'd like the data point dots to be visible by default. Is there a way I can go about doing this?
The pointSize attribute is responsible for the dot size. So something like chart.draw(data, {pointSize: 1}) should make the points visible by default. (The default setting is size 0.)
Hope that helps!
You can use pointSize options. By default its set to 0, that hides the data points. Set it to a value according to the size of the dot that you want. Something like pointSize: 4 is a good choice.