why the ref after defgroup doesn't show in doxygen - doxygen

Just like the following example:
// ...
#defgroup group_1 test_group_1
#{
#### title 1 #####
#}
#ref group_1
// ...
I used Doxygen GUI frontend to generate the html page, but it didn't show correctly, just is empty!
I show the another example that has the same problem:
#ref group_1
#defgroup group_1 test_group_1
#{
#### title 1 #####
#}
#ref group_2
#defgroup group_2 test_group_2
#{
#### title 2 #####
#}
And it's no doubt that in my case it only show group_1 reference!
But when I put all the group after the ref,it correctly shows all refs, like the following:
#ref group_1
#ref group_2
#defgroup group_1 test_group_1
#{
#### title 1 #####
#}
#defgroup group_2 test_group_2
#{
#### title 2 #####
#}
I want to put each group together with the corresponding ref just the second example shows, but I don't know why and how to solve!
thanks in advance!

Related

how to use wp_update_post with multiple posts ids

please i have this code which set the date for the post id 144600, but please need to add 2 id's to be in the code these ids 456 and 874 , please how to add them to the code
$id = 144600;
$date_time = "2022-10-31 23:59:59";//[Y-m-d H:i:s]
wp_update_post(
array (
'ID' => $id,
'post_date' => $date_time,
'post_date_gmt' => get_gmt_from_date( $date_time )
)
);
please i have this code which set the date for the post id 144600, but please need to add 2 id's to be in the code these ids 456 and 874 , please how to add them to the code

SPARQL: slow processing of result of subquery

I'm currently learning SPARQL, and I can't wrap my head around why what seems to me like a very straightforward query takes a large amount to time. I'm trying to count the number of articles per author in a journal, using the OpenCitations project (SPARQL endpoint https://opencitations.net/sparql, I also downloaded a dump of an earlier version).
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX pro: <http://purl.org/spar/pro/>
PREFIX frbr: <http://purl.org/vocab/frbr/core#>
PREFIX fabio: <http://purl.org/spar/fabio/>
SELECT $author (COUNT($author) as $cnt) WHERE {
# narrowing down journal down to articles (over issues and volumes)
$jnl a fabio:Journal;
dcterms:title "Nature" .
$volm frbr:partOf $jnl .
$issue frbr:partOf $volm .
$artcl frbr:partOf $issue .
# selecting author
?artcl pro:isDocumentContextFor ?artcl_atrbts .
?artcl_atrbts pro:isHeldBy ?author.
# making sure that author is a person
$author foaf:familyName $y .
}
GROUP BY $author
ORDER BY DESC($cnt)
LIMIT 10
This works as expected, and takes around 3 seconds on the dump, and maybe 5 on the OpenCitations endpoint.
However now I also want to get the actual names of the authors, so my idea was to use the previous query as a subquery:
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX pro: <http://purl.org/spar/pro/>
PREFIX frbr: <http://purl.org/vocab/frbr/core#>
PREFIX fabio: <http://purl.org/spar/fabio/>
SELECT $author $last_name $cnt WHERE {
$author foaf:familyName $last_name.
{
SELECT $author (COUNT($author) as $cnt) WHERE {
$jnl a fabio:Journal;
dcterms:title "Nature" .
$volm frbr:partOf $jnl .
$issue frbr:partOf $volm .
$artcl frbr:partOf $issue .
?artcl pro:isDocumentContextFor ?artcl_trbts .
?artcl_trbts pro:isHeldBy ?author.
$author foaf:familyName $y .
}
GROUP BY $author
ORDER BY DESC($cnt)
LIMIT 10
}
}
ORDER BY DESC($cnt)
This now takes around 15 seconds on the dump, (more than a minute on the online endpoint), even though it seems to me all it is doing is looking up the 10 values of the givenName for the authors. If I include the first name (foaf:givenName) as well, the query can take even longer. Furthermore, when I select names without grouping by author, it executes within a split second:
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX pro: <http://purl.org/spar/pro/>
PREFIX frbr: <http://purl.org/vocab/frbr/core#>
PREFIX fabio: <http://purl.org/spar/fabio/>
SELECT $author $first_name $last_name WHERE {
$jnl a fabio:Journal;
dcterms:title "Nature" .
$volm frbr:partOf $jnl .
$issue frbr:partOf $volm .
$artcl frbr:partOf $issue .
?artcl pro:isDocumentContextFor ?artcl_trbts .
?artcl_trbts pro:isHeldBy ?author.
$author foaf:familyName $last_name .
$author foaf:givenName $first_name .
}
LIMIT 10
Can somebody tell me what am I doing wrong here? Thanks in advance!

Reason Type field in domcfg

To ensure more security to my XPages web application, I put a captcha in the custom login form in domcfg.nsf.
I followed the link to build my captcha :
http://www.notesmail.com/home.nsf/tip20100506
The problem is when log in, if the captcha is misunderstood , I can not update the value of the field to reasontype it makes me appear the message "Wrong captcha code."
I added this action to check if the text entered is equal to captcha :
#If ( #UpperCase ( MyCaptchaField ) = TheRealValueOfMyCaptcha ; FIELD reasontype: = "6" ; "")
and I added a condition that shows me an error in the calculated field error messages if the value of reasontype is equal to "6" .
This does not work and I can access my XPage even if the captcha is not written.
I feel that the reasontype field depends only 5 predefined conditions.
Is there a solution to add other conditions in log on form?
You've got a space between the colon and equal characters. That means the characters are treated as two operators - a list concatenation operator and an equality operator.
Instead of this
#If ( #UpperCase ( MyCaptchaField ) = TheRealValueOfMyCaptcha ; FIELD reasontype: = "6" ; "")
You need this:
#If ( #UpperCase ( MyCaptchaField ) = TheRealValueOfMyCaptcha ; FIELD reasontype := "6" ; "")
However, the classic style for this would be:
FIELD reasontype := #If ( #UpperCase ( MyCaptchaField ) = TheRealValueOfMyCaptcha ; "6" ; "");
You have syntax error there...This is corrected code:
#If ( #UpperCase ( MyCaptchaField ) = TheRealValueOfMyCaptcha ; FIELD reasontype := "6" ; "")
That code is for an old-style Domino web form, not XPages. An alternative would be using an XPages-specific implementation and using an AJAX login post. Here are a couple of OpenNTF I found:
https://www.openntf.org/main.nsf/project.xsp?r=project/Xpages%20Captcha%20Custom%20Control
https://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=Recaptcha%20Custom%20Control
Here is a blog post which points to another OpenNTF project by Declan Lynch with an AJAX login Custom login forms in xpages?
Here is also an XSnippet for a login custom control (doLogin is the SSJS method to log in) https://openntf.org/XSnippets.nsf/snippet.xsp?id=dojo-login-dialog-custom-control
I tried this code. But the problem is that it automatically connects to my application and ignore the validation of the captcha.
I found a solution with a redirect to the logout page in the "onsubmit" action if the captcha is wrong and it works and a web alert to avoid the reasontype field.
Thanks for your help.

Have user select file name from commandline option menu

I want a script that asks the user to select from a list option, like:
Please select a kind of report
1.HeadOffice
2.All offices
3.Office1
4.Office2
5.Office3
Code:
$headoffice = headoffice.csv
$Alloffices = alloffices.csv
$Office1 = office1.csv
$Office2 = office2.csv
$Office3 = office3.csv
$csv = "selected one"
Foreach($target in $csv){
# Do custom scan AND rainbows.
}
Is this possible?
First, you should create a hashtable where the file names are numbered like so:
$table = #{
'1' = 'headoffice.csv'
'2' = 'alloffices.csv'
'3' = 'office1.csv'
'4' = 'office2.csv'
'5' = 'office3.csv'
}
Next, you can ask the user to select an option using Read-Host and a here-string:
$choice = Read-Host #'
Please select a kind of report
1.HeadOffice
2.All offices
3.Office1
4.Office2
5.Office3
'#
Finally, you can index the hashtable with that value and thereby access the appropriate file name:
$filename = $table[$choice]
Note that if you are working with CSV files, you might also want to read up on Import-Csv.

Update in Perl DBI not working, why? (full source posting, including DDL to create database in MySQL)

Why is the UPDATE in "Example 2" not working?
# MySQL DDL to create database used by code
#
# CREATE DATABASE sampledb;
#
# USE sampledb;
#
# CREATE TABLE `dbtable` (
# `id` int(11) NOT NULL AUTO_INCREMENT,
# `demo` longtext,
# PRIMARY KEY (`id`)
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# PERL MODULES WE WILL BE USING
use strict;
use warnings;
use DBI;
# CONFIG VARIABLES
my $platform = "mysql";
my $database = "sampledb";
my $host = "localhost";
my $port = "3306";
my $username = "root";
my $password = "password";
# DATA SOURCE NAME
my $dsn = "dbi:$platform:$database:$host:$port";
# PERL DBI CONNECT
my $connect = DBI->connect($dsn, $username, $password);
# VARS for Examples
my $query;
my $query_handle;
my $id;
my $demo;
# Example 1 using prepare() and execute() INSERT
# SAMPLE VARIABLE AND VALUES TO PASS INTO SQL STATEMENT
$id = 1;
$demo = "test";
# prepare() and execute() INSERT
$query = "INSERT INTO dbtable (id, demo) VALUES ('$id', '$demo')";
$query_handle = $connect->prepare($query);
# EXECUTE THE INSERT
$query_handle->execute();
print STDERR "ERROR: $DBI::errstr";
print STDERR "INFO: $query_handle rows updated";
undef $query;
# Example 2 using do() UPDATE
# SAMPLE VARIABLE AND VALUES TO PASS INTO SQL STATEMENT
$id = 2;
$demo = "test 2";
# do() THE UPDATE
$query = "UPDATE dbtable SET demo = '$demo' WHERE id = $id;";
$query_handle = $connect->prepare($query);
# EXECUTE THE UPDATE
$query_handle = $connect->do($query);
print STDERR "ERROR: $DBI::errstr";
print STDERR "INFO: $query_handle rows updated";
undef $query;
You're trying to update a record with id=2, which doesn't seem to exist.
Are you getting an error in $DBI::errstr? Aside from any output DBI might be giving you, the initial potential problem I see is that you insert a row with id=1, but your update is trying to update rows with id=2. There won't be any rows where id=2 to update.
A couple of other things you may also want to be aware of. Interpolating your variables right into your queries like that is bad practice and is what leads to SQL injection attacks. You should look at the DBI documentation on using placeholders for this. Placeholders also let you make the most effective use of prepare() when you need to do the same query on different values in a loop. If you just did that because it's just a quick test and you wouldn't do that in "real" code, then sorry for harassing you about it.
You also don't need to call prepare() before do(). do() handles the call to prepare() itself.