Unexpected <qualifier name> - berkeley-db-xml

I am running the following command which is running perfectly in other XQuery processors
for $title in doc("dbxml:/auction/auction")/site/regions/*
for $tit in $title for $it in $tit/item
let $country:=$it/location
group by $country
return <result><loc>{ $country }</loc><num>{count($title)}</num></result>
However, in Berkeley I am getting an inexplicable error:
Please help.
P.S. Will provide more details if necessary

Because Berkeley XML DB doesn't support group by of XQuery 3.0

Related

Does ArangoDB java driver provides API for GEO_INTERSECTS

For library arangodb-spring-data, version 3.2.3, is there any possibility to query for GEO_INTERSECTS functionality using the java api provided by the driver?
Currently I am using an AQL query in my code:
LET areaLiteral = GEO_POLYGON(...)
FOR doc IN MyDocuments
FILTER GEO_INTERSECTS(areaLiteral, doc.geometry)
LIMIT 5 RETURN doc
So far in the official documentation couldn't find anything related to GEO_INTERSECTS, also in this example: https://github.com/arangodb/spring-data-demo#geospatial-queries
I have checked the source code of the driver, but didn't find anything related to keyword "INTERSECTS" which would construct this query behind the scenes.
It is not yet supported, the only supported geospatial queries are Near and Within:
https://www.arangodb.com/docs/3.6/drivers/spring-data-reference-repositories-queries-derived-queries.html#geospatial-queries

ModX Revo Insert to Database

I am a newbie in ModX, trying to insert to database but always failed. This is my insert script :
<?php
define('MODX_CORE_PATH', '/aocore/');
define('MODX_CONFIG_KEY','config');
require_once MODX_CORE_PATH . 'model/modx/modx.class.php';
$host = 'localhost';
$username = 'asdsadsada';
$password = 'dsadsadsada';
$dbname = 'sadsadsadsadas';
$port = 3306;
$charset = 'utf8';
$dsn = "mysql:host=$host;dbname=$dbname;port=$port;charset=$charset";
$xpdo = new xPDO($dsn, $username, $password);
echo $o = ($xpdo->connect()) ? 'Connected' : 'Not Connected';
$results = $xpdo->query("insert into table_name (name,email) VALUES ('".$_POST['name'].",".$_POST['email']."')");
$stmt = $modx->prepare($results);
$stmt->execute();
?>
Please help, totally stuck here.
Thanks
Without seeing much of your database structure let alone any error log info it's very hard to debug/test your code because we can't reproduce anything.
By the looks of it you are not using objects. You may want to concider using your own schema and inserting the given records as objects in the DB. Have a look at this guide for more information on creating custom database tables in MODX.
Please make sure you're sanitizing the input that is being saved into the database with functions such as strip_tags() and htmlspecialchars() in order to prevent XSS and other injection attacks. Also make sure you are using prepared statements.
By looking at the code however i can see that you are executing the query() function which is meant for querying the database (retreiving database records). If you want to execute SQL statements such as "INSERT" you will need to use the exec() function.
Example:
$xpdo->exec("INSERT INTO `table_name` (`name`,`email`) VALUES ('".htmlspecialchars(strip_tags($_POST['name'])).",".htmlspecialchars(strip_tags($_POST['email']))."')");
If you are not going to be using MODX objects you may find it easier to use PHP's PDO interface with prepared statements.
Well, if it is not too late. You didn't share the exact problem but I see something strange in your code:
...VALUES ('".$_POST['name'].",".$_POST['email']."')");
If the values from POST array get into the string, you have
...VALUES ('John,mail#mail.com')");
John,mail#mail.com' is a single value where as there should be two values for name and email. So, try to put ' inside your query like
...VALUES ('".$_POST['name']."','".$_POST['email']."')");

Docusign API PHP adding listitem to document causes error

I am sure I am not the first to encounter this, but I was unable to find a solution while Googling.
I am trying to add a drop-down list to my document. At the top of my model I am adding these namespaces:
use \DocuSign\eSign\Model\List;
use \DocuSign\eSign\Model\ListItem;
When doing so I get this error because "List" is a reserved word in PHP.
A PHP Error was encountered
Severity: Parsing Error
Message: syntax error, unexpected List (T_LIST), expecting identifier (T_STRING)
Filename: models/Docusign_model.php
Line Number: 19
I tried changing the name of the class from List to Elist but then I got errors from ObjectSerializer that it could not find Elist:swaggerType.
What am I missing on how to add a list to my document?
Thom
#thom I think this is really a "PHP" parsing question as is answered here for you Parse error: syntax error, unexpected (T_STRING), expecting variable (T_VARIABLE)
So I think the $ missing is your real issue as discussed in the referenced article above and below from PHP Manual.
http://www.php.net/manual/en/language.oop5.basic.php
Recommend you look at GIT example from SDK using CustomFieldList at https://github.com/docusign/docusign-php-client/blob/ccc86ac37334f34728361d73b2f8c4592225b8d2/src/Model/CustomFieldsEnvelope.php
excerpt
protected static $swaggerTypes = [
'list_custom_fields' => '\DocuSign\eSign\Model\ListCustomField[]',
'text_custom_fields' => '\DocuSign\eSign\Model\TextCustomField[]'
];
http://www.php.net/manual/en/language.oop5.basic.php
Also, maybe the first place to validate if you even need a specific "use" is by reviewing this PHP sample code from a good friend Ergin https://gist.github.com/Ergin008/d4a8b9210fbea41414b0
As I see it with most of the DocuSign SDK's, you have the client and specific services you want to use per excerpt below:
// Download PHP client: https://github.com/docusign/DocuSign-PHP-Client
require_once './DocuSign-PHP-Client/src/DocuSign_Client.php';
require_once './DocuSign-PHP-Client/src/service/DocuSign_RequestSignatureService.php';
require_once './DocuSign-PHP-Client/src/service/DocuSign_ViewsService.php';
Regardless if I am right or wrong, let us know if this helped you go in the right direction :-)

DB2 runstats throws exception " The utility could not generate statistics. Error "-911" was returned.. SQLCODE=-2310, SQLSTATE= , DRIVER=3.53.71"

Getting the below error when i run the following command :
call admin_cmd('runstats on TABLE schema.table with distribution and detailed indexes all')
DB2 runstats throws exception " The utility could not generate statistics. Error "-911" was returned.. SQLCODE=-2310, SQLSTATE= , DRIVER=3.53.71"
DB2 version - 9070900, table has 477125 rows. Marked as non-volatile.
Any help would be very much appreciated.
Still waiting on the feedback regarding diagnostics, but from the error it seems like this is related to the table or an index being blocked due to other locks (deadlock or contention).
The db2diag.log should hold information on which other process has been involved. In addition db2pd could be used to look into the lock situation. Most likely runstats will run without any error when repeated some time later (reason for no feedback to my diagnostics question?).

Using AMI+BiDir with jacorb

Does it possible to use simultaneously AMI and BiDir features with jacorb?
Both work for me, but would not work together.
Examples, coming with jacorb demonstrates either BiDir or AMI.
The error that I see is following:
SEVERE: Unexpected error during receiveMessages. Lost a message!
java.lang.NullPointerException
at rg.jacorb.orb.giop.BiDirConnectionClientInterceptor.send_request(BiDirConnectionClientInterceptor.java:125)
at org.jacorb.orb.portableInterceptor.ClientInterceptorIterator.invoke(ClientInterceptorIterator.java:129)
at org.jacorb.orb.portableInterceptor.AbstractInterceptorIterator.iterate(AbstractInterceptorIterator.java:66)
at org.jacorb.orb.portableInterceptor.ClientInterceptorIterator.iterate(ClientInterceptorIterator.java:87)
at org.jacorb.orb.DefaultClientInterceptorHandler.invokeInterceptors(DefaultClientInterceptorHandler.java:328)
at org.jacorb.orb.DefaultClientInterceptorHandler.handle_send_request(DefaultClientInterceptorHandler.java:132)
at org.jacorb.orb.Delegate.servant_preinvoke(Delegate.java:2505)
at org.jacorb.orb.ReplyReceiver.performCallback(ReplyReceiver.java:240)
at org.jacorb.orb.ReplyReceiver.replyReceived(ReplyReceiver.java:183)
at org.jacorb.orb.giop.ClientConnection.replyReceived(ClientConnection.java:355)
at org.jacorb.orb.giop.GIOPConnection.receiveMessagesLoop(GIOPConnection.java:820)
at org.jacorb.orb.giop.GIOPConnection.receiveMessages(GIOPConnection.java:527)
at org.jacorb.orb.giop.MessageReceptor.doWork(MessageReceptor.java:69)
at org.jacorb.util.threadpool.ConsumerTie.run(ConsumerTie.java:60)
at java.lang.Thread.run(Thread.java:724)
please, advise.
UPD: I modified AMI example from jacorb's demo, added BiDir functionality (copied from BiDir example) and now synchronious calls work but ansync (AMI) do not.
They should work together. This does look like a possible issue. Are you using local calls? Can you please provide your test case and submit a ticket on http://www.jacorb.org/bugzilla/
(Please note the official JacORB mailing lists are here : http://www.jacorb.org/contact.html )

Resources