how to set multiple lines in a doxygen paragraph? - doxygen

The following doyxygen comments:
/// #par title
/// content1
/// content2
///
will merge "content1" and "content2" into a single line as follows:
**title**
content1 content2
But how to set multiple lines in a doxygen paragraph, i.e.
**title**
content1
content2

Assuming you don't want to start a new paragraph then the simplest route is to use HTML: You can use <br> to break a line.
/// #par title
/// content1 <br>
/// content2
///
If you want a new paragraph, then just insert a blank line between content1 and content2.
However, it looks a bit like you are starting a list of items. In that case then consider using a bulleted list:
/// #par title
/// * content1
/// * content2
///
More on bulleted lists in the Doxygen manual.

Put a blank line between paragraphs
/// #par title
/// content1
///
/// content2
///
I do believe a <BR> or even a \n will work too
/// #par title
/// content1<BR>
/// content2<BR>
///

Related

TYPO3 10.4.12 optionSplit in IMAGE srcset

In my TypoScript object the optionSplit failed. Always a comma is added in srcset and W3C validator said: Bad value for attribute srcset on element img: Ends with empty image-candidate string.
This TypoScript snippet
layoutKey = srcset
layout {
srcset {
element = <img src="###SRC###" srcset="###SOURCECOLLECTION###" ###PARAMS### ###ALTPARAMS### ###SELFCLOSINGTAGSLASH###>
source = ###SRC### ###SRCSETCANDIDATE###,|*|###SRC### ###SRCSETCANDIDATE###,|*|###SRC### ###SRCSETCANDIDATE###
}
}
results in
<img src="/storage/shared/hochschule/labels/swissuniversities-logo.png"
srcset="
/storage/_processed_/5/6/csm_swissuniversities-logo_685d915ef8.png 687w,
/storage/_processed_/5/6/csm_swissuniversities-logo_57966614b3.png 436w,
/storage/_processed_/5/6/csm_swissuniversities-logo_74d43a23bf.png 255w,"
class="image-embed-item img-fluid"
sizes="(max-width: 767px) 687px, (min-width: 768px) and (max-width: 991px) 436px, (min-width: 992px) 255px" alt="">
Is this a bug?
Optionsplit only has three values (per level). the separation on main level is done by |*|, the second level separation is ||. As the default wrap-separation is | you could get a confusion if you miss some spaces. Especially if one side of the wrap is empty.
as you can remove values, you can work with only one separator, but you can't include more values. you also can ommit the |*| separators at all and only use second level separators ||
The first (before the first separator) or only 'normal' wrapping is the beginning, then following the middle part. And after a second separator the ending part.
more confusion can be generated if you use optionSplit with the wrapping .noTrimWrap where there also are | separators around the whole wrap. So be careful with your separators and spaces.

Remove default column separator in sap.ui.table.table

I would like to remove the default column separator in sap.ui.table.Table
anyone please help !
I did it like this: I added the class noColumBorder to the table where I wanted to be no separator to be visible. The class name can be different, of course.
In CSS I added this:
.noColumnBorder .sapUiTableTr>td {
border-right: 0 !important;
}

Asp.net MVC Kendo ui render multiple pie charts

I am trying to render multiple kendo ui pie charts contained within a foreach loop. When rendered, all the tracking items (in Model.TrackingItems) are displayed correctly(which are between the span), however, only the first chart is rendered. There are three items in the Tracking Items in the list, three pie charts should be rendered. Any ideas what could be the problem?
Thanks in advance.
#foreach (var item in Model.TrackingItems)
{
#* THIS PART IS RENDERED FOR EACH ITEM *#
<span>Not Done - </span>#Html.Encode(item.NotDone)<br />
<span>Not Required - </span>#Html.Encode(item.NotRequired)<br />
<span>Completed - </span>#Html.Encode(item.Completed)<br />
<span>Cancelled - </span>#Html.Encode(item.Cancelled)<br />
#* ONLY THE FIRST PIE CHART IS RENDERED *#
<div id="#Html.Encode(item.Id)" class="chart-wrapper">
#(Html.Kendo().Chart()
.Name("chart")
.Title(title => title
.Text("Tracking Info")
.Position(ChartTitlePosition.Top))
.Legend(legend => legend
.Visible(false)
)
.Series(series =>
{
series.Pie(new dynamic[] {
new {category="Not Done",value=#item.NotDone,color="#9de219"},
new {category="Not Required",value=#item.NotRequired,color="#90cc38"},
new {category="Completed",value=#item.Completed,color="#068c35"},
new {category="Cancelled",value=#item.Cancelled,color="#006634"},
})
.Labels(labels => labels
.Template("#= category #: \n #= value#%")
.Background("transparent")
.Visible(true)
)
.StartAngle(150);
})
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}%")
))
</div>
}
It turned out the .Name attribute needs to be unique not the div id.
Changed
.Name("chart")
To
.Name(#Html.Encode(item.Id))

TinyMCE - applying a style over bullets and multiple paragraphs applies the style to each bullet & para - how do I avoid?

I'm trying to use the theme_advanced_styles command within TinyMCE to add classes to selections of text within the TinyMCE editor. The problem is that if the paragraph contains bullets, then the style is applied throughout them (as well as to each individual paragraph).
What I want is just for the entire selection I made to have the style class added to the start of it. Ie if my style class is 'expandCollapse' I want:
<p class="expandCollapse">some content... some content... some content... some content... som content... some content... some content...
<ul>
<li>asdsadsadsadsasda</li>
<li>asdsadsa</li>
<li>sada</li>
</ul>
asome content... some content... some content... some content... some content... some content... some content... some content... </p>
But what I get is:
<p class="expandCollapse">some content... some content... some content... some content... some content... some content... some content...
<ul>
<li class="expandCollapse">asdsadsadsadsasda</li>
<li class="expandCollapse">asdsadsa</li>
<li class="expandCollapse">sada</li>
</ul>
</p>
<p class="expandCollapse">asome content... some content... some content... some content... some content... some content... some content... some content... </p>
Any ideas anyone?!
So I had to answer my own question as I needed an answer very quickly. It appears the behaviour I was experiencing is intentional? and certainly not something that has been removed in the very latest versions of TinyMCE (both 3.x and 4.x after testing).
With this in mind I ended up having to make a plugin to do what I wanted.
I borrowed a huge amount of code by Peter Wilson, from a post he made here: http://www.tinymce.com/forum/viewtopic.php?id=20319 So thanks very much for this Peter!
I ended up slightly changing the rules from my original question in that my solution adds an outer wrapping div around all the content I want to select. This method also allowed me to reliably then grab the required areas of html with jQuery in my front-end site.
My version of Peter's code is just very slightly modified from the original in order to add a class to the DIV, rename it, use a different button etc.
The plugin works perfectly and allows for a div to be created wrapping any amount of content within TinyMCE. The divs inserted have the class name I need also applied to it.
Add 'customDiv' to your plugin AND button bar for it to appear.
(function() {
tinymce.create("tinymce.plugins.Div", {
init : function(editor, url) {
editor.addCommand("mceWrapDiv", function() {
var ed = this, s = ed.selection, dom = ed.dom, sb, eb, n, div, bm, r, i;
// Get start/end block
sb = dom.getParent(s.getStart(), dom.isBlock);
eb = dom.getParent(s.getEnd(), dom.isBlock);
// If the document is empty then there can't be anything to wrap.
if (!sb && !eb) {
return;
}
// If empty paragraph node then do not use bookmark
if (sb != eb || sb.childNodes.length > 1 || (sb.childNodes.length == 1 && sb.firstChild.nodeName != 'BR'))
bm = s.getBookmark();
// Move selected block elements into a new DIV - positioned before the first block
tinymce.each(s.getSelectedBlocks(s.getStart(), s.getEnd()), function(e) {
// If this is the first node then we need to create the DIV along with the following dummy paragraph.
if (!div) {
div = dom.create('div',{'class' : 'expandCollapse'});
e.parentNode.insertBefore(div, e);
// Insert an empty dummy paragraph to prevent people getting stuck in a nested block. The dummy has a '-'
// in it to prevent it being removed as an empty paragraph.
var dummy = dom.create('p');
e.parentNode.insertBefore(dummy, e);
//dummy.innerHTML = '-';
}
// Move this node to the new DIV
if (div!=null)
div.appendChild(dom.remove(e));
});
if (!bm) {
// Move caret inside empty block element
if (!tinymce.isIE) {
r = ed.getDoc().createRange();
r.setStart(sb, 0);
r.setEnd(sb, 0);
s.setRng(r);
} else {
s.select(sb);
s.collapse(1);
}
} else
s.moveToBookmark(bm);
});
editor.addButton("customDiv", {
//title: "<div>",
image: url + '/customdiv.gif',
cmd: "mceWrapDiv",
title : 'Wrap content in expand/collapse element'
});
}
});
tinymce.PluginManager.add("customDiv", tinymce.plugins.Div);
})();

How to set ActionLink as an image

I have a little question. How to set ActionLink as an image for something like this:
<%= Html.ActionLink("English", "ChangeCulture", "Account",
new {lang = "en", returnUrl = this.Request.RawUrl }, null)%>
For other ActionLink i did something like this:
Html.ActionLink(" ", "About", "Home", new
{style = "background: url('../../Content/images/img03.jpg')no-repeat center
right;display:block; height:24px; width:24px;"})
But for this example it doesn't work. I want to add localization to my site in the form of images of flags. Thanks in advance.
I see a few issues here...
Firstly, you are setting the routeValues paramater of ActionLink with your Html style. Add a null object between them:
Html.ActionLink(" ", "About", "Home", null, new
{style = "background: url('../../Content/images/img03.jpg')no-repeat center
right;display:block; height:24px; width:24px;"})
Secondly, you will want to check the url of the image is correct as you are using a relative path. Try using Url.Content to get the correct path instead.
Thirdly, the lack of a space between the url and the no-repeat flag might be affecting your browser output.
I have solved this using html helper
tho i would recomend using TagBuilder for this.
/// <summary>
/// Create image representation of boolean in form of
/// </summary>
/// <param name="html">The HTML.</param>
/// <param name="boolValue">if set to <c>true</c> [bool value].</param>
/// <param name="path">The path.</param>
/// <param name="alt">The alt.</param>
/// <returns>
/// html img tag
/// </returns>
public static string ImageForBool(this HtmlHelper html, bool boolValue, string path,ImageAlt alt)
{
string trueVal = "tick";
string falseVal = "x";
string img = "<img src=\"{0}\" {1}/>";
string altTag = string.Empty;
path += "Content/Actions/";
if (boolValue)
{
altTag = (alt == null) ? "" : "alt=\"" + alt.trueOption + "\"";
return string.Format(img, Path.Combine(path, trueVal) + ".png", altTag);
}
else
{
altTag = (alt == null) ? "" : "alt=\"" + alt.falseOption + "\"";
return string.Format(img, Path.Combine(path, falseVal) + ".png", altTag);
}
}
this option is possibly the best for you
Alternative way
use html action link and use string.replace
using your code:
string tag = Html.ActionLink("[toReplaceWithImage]", "ChangeCulture", "Account",
new {lang = "en", returnUrl = this.Request.RawUrl }, null).ToString()
tag.Replace("[toReplaceWithImage]", "<img src=\"path\">");