doxygen error state 21 with fortran code - fortran

I was searching the web for help and didn't find any. Thats why I thought it might be a good idea to document my problem here.
I had the following problem while documenting a really old (15-20 years) FORTRAN-Code with doxygen. I have a file with the same filename as the subroutine in it. And some of these files gave me an error:
********************************************************************
Error in file FILENAME line: XX, state: 21
********************************************************************
I didn't figure out, what the error state 21 is. After some digging into the code I did find the problem. I have a WRITE-command like
WRITE(*,'('' THIS IS SOME TEXT ''
+ '' THIS IS SOME MORE TEXT : '',I6,
+ /'' AND EVEN MORE TEXT ! '')')
+ VARIABLE
The problem here is the exclamation mark (!) in the code line. Doxygen seems to interpret the end of the line after the exclamation mark as doxygen syntax and not FORTRAN code. I changed the line into
WRITE(*,'('' THIS IS SOME TEXT ''
+ '' THIS IS SOME MORE TEXT : '',I6,
+ /'' AND EVEN MORE TEXT ! ''
+ )')VARIABLE
and now everything works fine!

Related

pandoc error: [WARNING] Could not parse YAML metadata: Unexpected 'd'

I am not sure why I get the following error message while converting markdown to PDF with a template:
[WARNING] Could not parse YAML metadata at line 10 column 1: Unexpected 'd'
Here is the command I use to build the document:
pandoc --template eisvogel -o output.pdf input.md
Here is the markdown file:
---
titlepage: true
title: Some title
author: [Author]
date: "2022-11-25"
colorlinks: true
disable-header-and-footer: true
---
# Quick Introduction
A famous guy once said:
The error occurs when I add the disable-header-and-footer: true. If this line is not here, then the Pandoc processes the document.
The space after the colon in the offending line is not a normal (ASCII) space but the Unicode character U+202F, "Narrow Non-Break Space". The YAML parser doesn't see a key-value pair but a single word because of that. Replace it with an ASCII space and everything should work.

Ansible replace seems to throw a parsing error?

I'm trying to use the Ansible replace module to change some text in a file on a Windows Server 2019 Standard target. I'm using Ansible 2.8.3 running on Python 2.7
- name: REPLACE | Replace baseline.local with FQDN in InternetSettings.xml
replace:
path: '/path/to/settings.xml'
regexp: 'baseline\.local'
replace: '{{ FQDN }}'
I don't think the issue is the path, although one of the directories on the path to the file has brackets '{}' in its name. Could that be it?
I've tried to do the same thing with win_lineinfile, and it didn't throw an error with the same path, but it'd be difficult in this case to replicate the functionality of replace, which is really what I need.
EDIT 2: It works when I copy the file over to my local machine and delegate to 127.0.0.1. I'm running ansible from a Windows Subsystem for Linux (WSL) installation. It also works when I copy the file to a remote linux system and run replace there, so it seems to be a Windows problem.?
EDIT: The stack trace of the error I'm getting:
"Exception calling "Create" with "1" argument(s): "At line:4 char:21
+ def _ansiballz_main():
+ ~
An expression was expected after '('.
At line:13 char:27
+ except (AttributeError, OSError):
+ ~
Missing argument in parameter list.
At line:15 char:7
+ if scriptdir is not None:
+ ~
Missing '(' after 'if' in if statement.
At line:22 char:7
+ if sys.version_info < (3,):
+ ~
Missing '(' after 'if' in if statement.
At line:22 char:30
+ if sys.version_info < (3,):
+ ~
Missing expression after ','.
At line:22 char:25
+ if sys.version_info < (3,):
+ ~
The '<' operator is reserved for future use.
At line:24 char:32
+
My teammates and I suspect that this issue is the result of attempting to use an ansible module not built for windows on a windows target - more particularly, a target that doesn't have python installed. We suspect that some part of the compiling of python on the ansible controller or subsequent execution of the python binary on the windows target is what's really causing the problem here. We've decided on the workaround of just using win_shell with powershell's 'replace' to do what we need to do.
Try changing your regexp string to double quotes:
regexp: "baseline.local"

How can I make file association in Qt installer(1.5.0)?

How can I make file association in Qt installer framework(1.5.0) on Windows? I want to do this:
For example, when I double click myFile.x then my qt desktop application(Windows) will launch and open this file.
I want to correct this in installscript.qs :
component.addOperation("CreateShortcut", "#TargetDir#/A.exe", "#StartMenuDir#/A.lnk");
component.addOperation("RegisterFileType",
"fl",
"#TargetDir#\\A.exe" + "'%1'",
"myFiles",
"text/plain",
"#TargetDir#/A_icon.ico",
"ProgId=A.fl");
component.addOperation("CreateShortcut", "#TargetDir#/uninstall.exe", "#StartMenuDir#/Uninstall.lnk");
When I write this string, it gives parse error.
Output is :
Caught exception: Exception while loading component script: 'D:/Workspace/A/A_installer/A/packages/com.ge.mss/meta/installscript.qs
SyntaxError: Parse error
Backtrace:
()#D:/Workspace/A/A_installer/A/packages/com.ge.mss/meta/installscript.qs:102'
If you are using windows just follow this:
component.addOperation("RegisterFileType",
"bob",
"#TargetDir#\\BobiSoft.exe \" %1\"",
"BobiSoft Files",
"application/x-binary",
"#TargetDir#/bobi_file_icon.ico",
"ProgId=BobiSoft.bob");
I also had this problem, the trick was to replace the ' %1' as many examples say, with \" %1\".

Program argument with space characters is broken by Eclipse when running the debugger

I have a program which needs seven arguments.
The problem is that the fifth argument has empty (space) characters.
So I put it in the double quotes and the program runs.
The problem:
When I try to use the debugger inside the Eclipse the system put \” instead of “ . The result is the fifth argument is broken and I cannot use the debugger...
Here is what I have in the argument list
168815 blabla/ product_group_and_eshop_global_id blaee/test/test "<unique_string>products in the</unique_string><TotalNumberUniquestring>2</TotalNumberUniquestring><currentNumberUniquestring>1</currentNumberUniquestring><div_OR_table_navigatin_instructions><divORTableForward_skip>1</divORTableForward_skip> <divForward_in>1</divForward_in></div_OR_table_navigatin_instructions><type_of_product_substring>SEARCH</type_of_product_substring><where_to_search_the_name>title</where_to_search_the_name><currency>$</currency><price_extraction_start_Key>$</price_extraction_start_Key><price_extraction_end_Key>&lt</price_extraction_end_Key>" filename_mode
/src/cpp/test-pages/FrontLoad.html
And here's what the Eclipse print in the console
/bin/bash: -c: line 0: syntax error near unexpected token `<'
/bin/bash: -c: line 0: `exec /media/Debug/gcom_au 168815 blabla/ product_group_and_eshop_global_id blaee/test/test \"<unique_string>products in the</unique_string><TotalNumberUniquestring>2</TotalNumberUniquestring><currentNumberUniquestring>1</currentNumberUniquestring><div_OR_table_navigatin_instructions><divORTableForward_skip>1</divORTableForward_skip> <divForward_in>1</divForward_in></div_OR_table_navigatin_instructions><type_of_product_substring>SEARCH</type_of_product_substring><where_to_search_the_name>title</where_to_search_the_name><currency>$</currency><price_extraction_start_Key>$</price_extraction_start_Key><price_extraction_end_Key>&lt</price_extraction_end_Key>\" filename_mode
/src/cpp/test-pages/FrontLoad.html'
I found the solution : I change the “ to '
So. the
168815 blabla/ product_group_and_eshop_global_id blaee/test/test "<unique_string>products in the</unique_string><TotalNumberUniquestring>2</TotalNumberUniquestring><currentNumberUniquestring>1</currentNumberUniquestring><div_OR_table_navigatin_instructions><divORTableForward_skip>1</divORTableForward_skip> <divForward_in>1</divForward_in></div_OR_table_navigatin_instructions><type_of_product_substring>SEARCH</type_of_product_substring><where_to_search_the_name>title</where_to_search_the_name><currency>$</currency><price_extraction_start_Key>$</price_extraction_start_Key><price_extraction_end_Key>&lt</price_extraction_end_Key>" filename_mode /src/cpp/test-pages/FrontLoad.html
becomes
168815 blabla/ product_group_and_eshop_global_id blaee/test/test '<unique_string>products in the</unique_string><TotalNumberUniquestring>2</TotalNumberUniquestring><currentNumberUniquestring>1</currentNumberUniquestring><div_OR_table_navigatin_instructions><divORTableForward_skip>1</divORTableForward_skip> <divForward_in>1</divForward_in></div_OR_table_navigatin_instructions><type_of_product_substring>SEARCH</type_of_product_substring><where_to_search_the_name>title</where_to_search_the_name><currency>$</currency><price_extraction_start_Key>$</price_extraction_start_Key><price_extraction_end_Key>&lt</price_extraction_end_Key>' filename_mode /src/cpp/test-pages/FrontLoad.html

pig REPLACE gives error

Let's assume that my file is named 'data' and looks like this:
2343234 {23.8375,-2.339921102} {(343.34333,-2.0000022)} 5-23-2013-11-am
I need to convert the 2nd field to a pair of coordinate numbers. So I wrote the follwoing code and called it basic.pig:
A = LOAD 'data' AS (f1:int, f2:chararray, f3:chararray. f4:chararray);
B = foreach A generate STRSPLIT(f2,',').$0 as f5, STRSPLIT(f2,',').$1 as f6;
C = foreach B generate REPLACE(f5,'{',' ') as f7, REPLACE(f6,'}',' ') as f8;
and then used (float) to convert the string to a float. But, the command 'REPLACE' fails to work and I get the following error:
-bash-3.2$ pig -x local basic.pig
2013-06-24 16:38:45,030 [main] INFO org.apache.pig.Main - Apache Pig version 0.11.1 (r1459641) compiled
Mar 22 2013, 02:13:53 2013-06-24 16:38:45,031 [main] INFO org.apache.pig.Main - Logging error messages to: /home/--/p/--test/pig_1372117125028.log
2013-06-24 16:38:45,321 [main] INFO org.apache.pig.impl.util.Utils - Default bootup file /home/isl/pmahboubi/.pigbootup not found
2013-06-24 16:38:45,425 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
2013-06-24 16:38:46,069 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Lexical error at line 7, column 0. Encountered: <EOF> after : ""
Details at logfile: /home/--/p/--test/pig_1372117125028.log
And this is the details of the pig_137..log
Pig Stack Trace
---------------
ERROR 1000: Error during parsing. Lexical error at line 7, column 0. Encountered: <EOF> after : ""
org.apache.pig.tools.pigscript.parser.TokenMgrError: Lexical error at line 7, column 0. Encountered: <EOF> after : ""
at org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager.getNextToken(PigScriptParserTokenManager.java:3266)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.jj_ntk(PigScriptParser.java:1134)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:104)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
at org.apache.pig.Main.run(Main.java:604)
at org.apache.pig.Main.main(Main.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
================================================================================
I've got data like this:
2724 1919 2012-11-18T23:57:56.000Z {(33.80981975),(-118.105289)}
2703 6401 2012-11-18T23:57:56.000Z {(55.83525609),(-4.07733138)}
1200 4015 2012-11-18T23:57:56.000Z {(41.49609152),(13.8411998)}
7104 9227 2012-11-18T23:57:56.000Z {(-24.95351118),(-53.46538723)}
and I can do this:
A = LOAD 'my_tsv_data' USING PigStorage('\t') AS (id1:int, id2:int, date:chararray, loc:chararray);
B = FOREACH A GENERATE REPLACE(loc,'\\{|\\}|\\(|\\)','');
C = LIMIT B 10;
DUMP C;
This error
ERROR 1000: Error during parsing. Lexical error at line 7, column 0. Encountered: <EOF> after : ""
came to me because I had used different types of quotation marks. I started with ' and ended with ´ or `, and it took quite a while to find what went wrong. So it had nothing to do with line 7 (my script was not so long, and I shortened data to four lines which naturally did not help), nothing to do with column 0, nothing to do with EOF of data, and hardly anything to do with " marks which I didn't use. So quite misleading error message.
I found the cause by using grunt - pig command shell.