why do you have only AlphaNumeric allowed in anchor name? - yaml-cpp

I am using yaml-cpp in my project, and find out that an anchor name is only allowed to consist of AlphaNumeric characters. I failed to find such restriction in the spec, only found this:
Anchor names must not contain the “[”,
“]”, “{”, “}” and “,” characters
Can you please indicate if this is yaml-cpp implementation specificity or there is information in the spec, which I missed?
Thanks!

You're absolutely right - and as of revision 429, anchor parsing is more relaxed. Thanks for the note!

Related

SSI to concatenate the echoed variable and/or strip whitespace?

The code below, yields the output of "apple banana cantaloupe" (spaces) .
<!--#set var="x" value="apple banana cantaloupe" -->
<!--#echo var="x" -->
Here's my example: http://4mo.st/my-question.shtml
Looking for a way to get "applebanadacantaloupe" (no spaces). Is there any native functionality within Apache SSI to accomplish this? An equivalent of something like concat or trim? I cannot find anything in the documentation but perhaps someone out there has solved a similar problem?
Unfortunately, there isn't anything in the include module which will provide this functionality.
From the summary of the module's documentation:
The processing is controlled by specially formatted SGML comments,
referred to as elements. These elements allow conditional text, the
inclusion of other files or programs, as well as the setting and
printing of environment variables.

How to strip single-line comments in obj-c properly

I know there are a lot of resources with regex for it. But I could not find the one I want.
My problem is:
I want to remove one line comments (//) from obj-c sources, but I don't want to break the code in it. For instance, with this regex: #"//.*" I can remove all comments, but it also corrupts string literal:
#"bsdv//sdfsdf"
I played with non-capturing parentheses (?:(\"*\")*+), but without success.
Also I found this expression for Python:
r'(\".*?\"|\'.*?\')|(/\*.*?\*/|//[^\r\n]*$)'
It should cover my case, but I've not figure out how to make it work with obj-c.
Please, help me to build proper regex.
UPDATE: Yeah, that's a tough one, I know there're a lot of caveats, other than the one I described. I would appreciate if someone post regex that only fix my issue. Anyway, I gonna post my solution, without regex soon, I hope it will be helpful for anyone who struggling with such problem too.
Try this regex:
(?:^|.*;(?!.*")|#(?:define|endif|ifn?def|import|undef|...).*)\s*(//[^\r\n]+$)
Demo
http://regex101.com/r/jT4xC8
Description
Discussion
Besides all the warnings expressed in the comments, I assume that a single line can appear in two distinct cases:
Case 1: Alone on its line preceded or not by blank chars
Case 2: Not Alone on its line preceded or not by blank chars, and other chars.
In the first case, we match the beginning of the line (^ with /m flag). Then we search zero or more blank chars (\s*) and finally the single line comment: //[$\r\n]+$.
In the second case, if there are other chars on the line, they form statements. Any statement is ended by a semicolon ;. So we search the last statement and its corresponding semicolon .*;(?!.*"). Then we search the single line comment. Those other chars can be also preprocessor statements. In this case, they are introduced by a sharp #.
One important keypoint is that I assume the code passed to the regex is a code that compiles.
There is more
Don't forget also to add some other pre-processor directives that may apply in your case. Check this SO answer: https://stackoverflow.com/a/18014883/363573

Rational Functional tester manual verification points title doesn't appear in the log

I'm using a manual verification point - it works well - but when it appears in the log its name -or title- appears empty, what should i do to make the manual VP's title appears in the log, thanks in advance
Abed.
The syntax is
vpManual("Your VP name here", expectedData, actualData).performTest();
The VP name should not contain spaces, dots or other "strange" characters, keep on letters, digits and underscore _
If you use a string variable for the name, check it is not null or empty.
Also note the name must be unique in the script. If you provide a little example of your problem I can try answering with more details.
Take a look at the RFT docs

Selenium: Part of text present

Is there a way to verify only part of text present?
If there is a text "Warning: A15P09 has not been activated." I need to verify the text is present. However, 'A15P09' is not always the same, so I cannot do something like
Selenium.IsTextPresent("Warning: A15P09 has not been activated.");
I might do something like:
Selenium.IsTextPresent("has not been activated.");
But is there another way to verify this in Selenium. Please let me know if there is.
Thanks!
You could use getText and then do any normal regex that your language supplies for examining that result.
Edit: And for some languages you can do isTextPresent on a pattern modified string. The documentation states:
Various Pattern syntaxes are available
for matching string values:
glob:pattern: Match a string against a
"glob" (aka "wildmat") pattern. "Glob"
is a kind of limited
regular-expression syntax typically
used in command-line shells. In a glob
pattern, "*" represents any sequence
of characters, and "?" represents any
single character. Glob patterns match
against the entire string.
regexp:regexp: Match a string using a
regular-expression. The full power of
JavaScript regular-expressions is
available.
exact:string: Match a
string exactly, verbatim, without any
of that fancy wildcard stuff.
If no
pattern prefix is specified, Selenium
assumes that it's a "glob" pattern.

Inserting special character in Redmine wiki page

I'm using Redmine and I'm trying to insert the special character | inside a table in a Redmine wiki page. I don't want this character to be parsed as a column separator.
I've achieved this by doing a <code>|</code> around this character, but I don't want to use the code tag, since this character will gain code attributes, namely the courier new font.
Is there a tag for displaying plain text and avoid the parsing from the Redmine wiki engine?
I'm reading the redmine wiki formatting documentation but it is very poor and points me to textile formatting which doesn't seem to include this special case.
I could not get the exclimation point to work, but this works for me.
<notextile>|</notextile>
The only way I found out to overcome this problem is to insert the HTML code for the character I want to isolate. For instance, instead of putting an underscore and make the wiki think I'm starting an italic word, I have to put the HTML code for it:
_
Example:
this is a _test - _text comment here_
Without the underscore code (_) redmine wiki engine will think that italic starts at test and this is the wrong result:
this is a test - text comment here
So, putting the ASCII code for the underscore corrects this problem. Unfortunately, this parsing is not very clever (yet I hope).
Here is a link for an ASCII code table with many symbols and characters:
http://www.ascii.cl/htmlcodes.htm