Change Title with Octave imshow() [duplicate] - octave

This question already has answers here:
How to change the window title of a MATLAB plotting figure?
(4 answers)
Closed 3 years ago.
Octave imshow() will display the image but the title of the image as "Figure 1", How can I change the title.

You can add your own title to a figure window's title bar by setting the Name property to the desired title and you can turn off the figure number by setting the NumberTitle property to 'off' as follows:
title ("imshow with random 100x100 matrix");
see document for more

Related

how to display specific number of letters of paragraph in HTML [duplicate]

This question already has answers here:
How can I set a character limit for paragraph?
(2 answers)
Closed 16 days ago.
I'm looking for solution to shortening paragraph in HTML
Let's say I have a paragraph
<p>This is some text</p>
Now what I want to know is how can I make this paragraph show less lines. For example instead of showing full paragraph it shows only first 4 characters which results in
<p>This</p>
I think you're looking for something like this: https://jedfoster.com/Readmore.js/
If you wanted to do it manually just store the text in globably js variable like:
var pText = "Some really long text that you want to shorten or lengthen on a click";
$(".showMore").toggle(function() {
//full text case
$(".myParagraphElement").html(pText);
// collapsed case, replace 50 with the number of characters you want
$(".myParagraphElement").html(pText.substring(50));
});

Colouring a TD based on its value [duplicate]

This question already has answers here:
How can I find elements by text content with jQuery?
(8 answers)
Is there a CSS selector for elements containing certain text?
(20 answers)
Closed 4 months ago.
I have a table and I am trying to give the cells a background colour based on its value. The only issue is that if there is the same part of the word in the td they become the same colour. i.e. - Intensive and Lion Intensive become the same colour. Is there any way to make this distinct to the word?
$('td:contains("M/S Select Farm")').css('background','yellow');
$('td:contains("Lion Free Range")').css('background','Blue');
$('td:contains("Barn")').css('background','Orange');
$('td:contains("Free Range")').css('background','green');
$('td:contains("Lion Intensive")').css('background','Red');
$('td:contains("Intensive")').css('background','White');

How can I make spaces after numbers stay in place in HTML? [duplicate]

This question already has answers here:
How to put spaces between text in html?
(6 answers)
Closed 2 years ago.
I am having an issue with double spaces after dotted numbers as follows.
Suppose I put the following text in HTML, I get a space issue.
1. Box 1
The output should be:
Box 1
However, I get the following:
Box 1
Even when using margins, I get the same problem.
An actual example is below.
In Word:Permanent deletion:
Click on the drop-down menu that displays, ‘Keep in Inbox’.
Click on, ‘Discard’, on the menu.
In HTML:
Permanent deletion:
Click on the drop-down menu that displays, ‘Keep in Inbox’.
Click on, ‘Discard’, on the menu.
Same text but in HTML.
How can I retain the second space after the number for each instance?
If you want more than one space in html, you need to use the non-breaking space character entity

Table rows inside a card body are not sized correctly in Bootstrap 4 [duplicate]

This question already has answers here:
Table column sizing
(7 answers)
Closed 4 years ago.
I have a card in which under card body, I am displaying a table. One of the td contains a progress bar. However, this specific column containing the progress bar is not appearing of desired width (col-xs-8). I tried to set this on table headers and on specific data columns in tbody but this was of no avail. Any suggestions?
Working code snippet : https://www.codeply.com/go/2CGGezuq6j
As of bootstrap 4, you can't use xs, replace col-xs-8 with just col-8
https://getbootstrap.com/docs/4.0/layout/grid/
Edit:
And remember to enclose your columns with the row class

Surrounding specific HTML text with specific color [duplicate]

This question already has answers here:
Is there a CSS selector for elements containing certain text?
(20 answers)
Closed 5 years ago.
I have the a Status parameter for my HTML table which could take values such as :
SUCCESS
FAILURE
IN PROGRESS
I want to surround the text with a specific color depending on the value it takes. I am working with Angular 4 (HTML and TypeScript).
Any pointers to solve this problem?
Try this, I did not test this but hope this helps:
[ngStyle]="{'background-color':status === 'SUCCESS' ? 'green' : status === 'FAILURE' ? 'red' : 'blue'}