How can I get parens in a URL using the Doxia APT format? - doxia

I am using the APT format to create documentation on a maven project. I am trying to link to a JavaDoc method description, which URL contains a parentheses.
For example, the url
http://myjavadoc/methodname(java.lang.string)
Becomes
http://myjavadoc/methodnamejava.lang.string
Trying to use URL-encoding produces a similar result in that the percent symbol is stripped out.
http://myjavadoc/methodname28java.lang.string29
In both cases, escaping the character with a backslash has no effect.
Does anyone know how to get parens (or percents) to be interpreted through apt correctly?

You should mention your doxia version.
Anyway both methods worked for me with doxia 1.6
Link to {{{http://myjavadoc/methodname(java.lang.string)}http://myjavadoc/methodname(java.lang.string)}}.
Link to {{http://myjavadoc/methodname(java.lang.string)}}.

Related

Are backslashes supported in Groovy comments?

I experienced a weird Jenkins error while trying to run a groovy-scripted pipeline that contained backslashes inside comments.
Here is the offending code:
// The script below depends on:
// * The presence of a recent nuget.exe in c:\tools (v5.7)
// * The presence of the xxx plugin installed for user foo\username
I'm aware the backslash is used in many languages to start an escape sequence, but I had never before experienced backslashes being an issue inside comments.
I wonder if this backslash in comments behavior is due to Groovy itself or rather a bug in the way Jenkins interprets it...
Edit: I solved my issue by replacing the offending \ with \\ but then noticed I had forgotten to double the backslash in c:\tools, and still Jenkins did not complain. It seems Jenkins (or Groovy) tried to interpret the \u in foo\username as introducing an hex character code... but was okay with \t for it probably was interpreted as a tab!

Revit Ironpython Shell - Parsing a list of filenames with a number after a backslash in the path

I want to read in a list of files (inc path) from either a spreadsheet or a text file for some downstream processing. The list has been generated as a log from another process and the path includes a 2 digit year folder followed by a project number folder as follows:
\\servername\projects\19\1901001\project files\filetobeprocessed.abc
The problem is as soon as the above string is read in, it is interpreted as
\\servername\\projects\x019\x01901001\\project files\x0ciletobeprocessed.abc
Which then means that I cannot use the path to access the file.
Assigning the path string to a variable, I have tried:
thePath = repr(pathreadfromfile)
After assigning the path string I have tried fixing the string using
thePath.replace('\x0','\\')
thePath.replace('\\x0','\\')
thePath.replace(r'\x0','\\')
Nothing seems to fix the path so that it can be used to open the file.
I can't find anything in either python or Ironpython that suggests a fix for this programatically. I know that you can fix this is the path is known within the code by using r'' to use raw text to create the path.
Any help appreciated
Obviously, the backslash \ is interpreted as an escape character.
For a really simple solution, hopefully the simplest, I would suggest using forward slash / for all your path separators instead of backslash.
If you really need the backslash somewhere further down the road, you can replace them back again.

How to include a colon in a Visual Studio extension DisplayName

I'd like to use a colon (:) as part of my extension's DisplayName. I've modified my .vsixmanifest file as such:
<DisplayName>Foo:Bar & Baz</DisplayName>
But, at build time I get an error:
Error trying to read the VSIX manifest file "obj\x86\Debug\extension.vsixmanifest".
The given path's format is not supported.
The docs say nothing about any character limitation, only that DisplayName must be less than 50 characters.
I've even tried encoding the colon, but I get the same error message (above).
<DisplayName>Foo:Bar & Baz</DisplayName>
Is there anyway around this?
How to include a colon in a Visual Studio extension DisplayName
I am afraid that you cannot get what you want.
Colon is an illegal character in the vsixmanifest file and therefore cannot be used in it.
Suggestion
We suggest you could use _ rather than :.
In addition, if you still want this feature, you could suggest this feature on our User Voice Forum.

Xamarin ios - import library

I need help importing a library to Xamarin. I included the library and inserted it into a new folder named BarcodeScanner, and the name of the library is libBarcodeScanner.a.
gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a”
But it shows an error:
Error: Could not parse additional mtouch arguments: No matching quote found.
What should i do ?
Do i need to create a binding project to use a library like BarcodeScanner ?
Error: Could not parse additional mtouch arguments: No matching quote found.
That does not look like a Xamarin.iOS (mtouch) error message. Those start with a MT prefix followed by 4 numbers, e.g. MT2001. Could it be Xamarin Studio giving you this error ?
What should i do ?
Review the flags: are they identical to what's pasted above ?
No matching quote found. makes is sound there's an extra quote in there. Maybe one of the " is wrong (e.g. a autocorrection giving you a smart quote) ?
Or maybe your project directory (replaced from ${ProjectDir} contains a quote character ?
Also can you edit your question to add which version of Xamarin Studio you're using ?
Do i need to create a binding project to use a library like BarcodeScanner ?
No, but it's the preferred ways to link static libraries. Using a binding project removed the need to add Additional mtouch arguments inside every projects and every build configuration (e.g. Debug, Release...) of your applications.
I will answer my own question, maybe it will help someone. I declared in my MainController that i needed:
using MonoTouch.CoreVideo;
using MonoTouch.CoreMedia;
using MonoTouch.CoreGraphics;
using MonoTouch.CoreFoundation;
And after that i referenced only the static library with:
-gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a"
#poupou's "maybe" was spot on, but I'll be pedantic and explain exactly.
Look closely at this line I just quoted from your original question. I've marked it down using code (four spaces prefix per line), and broke it into two lines. Nothing else has been changed. Hopefully the error should be obvious now:
- gcc_flags "-L${ProjectDir} -lBarcodeScanner
-force_load ${ProjectDir}/libBarcodeScanner.a”
Essentially, you used different types of double quotes. The first double-quote character above is Unicode 0x0022, which is the regular Quotation Mark. The second double-quote character above is Unicode 0x8221, or Right Double Quotation Mark. It might be that you had copied & pasted all or part of the line above from a web page, rather than typing it in.
For command-line processing, mixing your styles of double quotes simply won't work. You'll need to use balanced regular quotation marks, as you wrote in your own answer just now (but might not have specifically noticed?) FWIW, the right- and left- variants of the quotation mark are usually used for word processing, web pages, etc. where the style aesthetic matters.
Since you didn't use code-markup when quoting that line originally (while I noticed you did, in your recently posted answer) it looks like Stack Overflow "helpfully" tried to render the quotes as similar in style, fooling us into looking elsewhere for the problem, when it was right in front of us.
Anyway, next time you get an error about mismatched quotes, I suggest you carefully check their type. If they look the least bit different, they may not be the right kind of quotes.

How do you escape a reserved word in Delphi?

I need to Escape a reserved word to use it as an identifier in Delphi. I thought that was accomplished by using the ampersand "&", but that doesn't seem to be working right. Any other suggestions?
I found the doc page (search for Extended Syntax) on it, and it should be ampersand.
Figured out the problem. The ampersand works for compiling and error insight, but not code completion. Good to know. I had to add an _ suffix to get code completion to work, then change it back afterwords. I should check QC for a bug report.

Resources