neo4j spatial findGeometriesWithinDistance REST - rest

Using neo4j 1.9 and neo4j spatial for 1.9.
Trying to get findGeometriesWithinDistance REST call working.
I can confirm that the install has worked and that the function exists BUT, using the http console I get a "Node 0 does not exist" error. The REST request I make is exactly as in the docs but instead of returning nodes I get this error.
What is going on that requires node 0 to exist and hence causes the error?
For info, the REST findGeometriesInBBox works fine.
On Further Investigation...
Using py2neo to interact with the DB. In particular, we make use of the GregorianCalendar functionality (see here). When removed from our logic the process of findGeometriesWithinDistance works fine.
Looking into it further, there are comments in the py2neo code that say #retain a handle to the root node (see the first code example here).
Does this "handle" do something with the node of index 0 so we can't use it?

Did you accidentally clean out your database?
I.e. remove node 0, which was the reference node that neo4j-spatial connected its root elements to (in 1.9)?

Related

SerialSearch with Cursors

I am trying to use SerialSearch to identify about 800 titles with a single keyword. When I run:
serialSearch = SerialSearch(query={"title": "myKeyword"})
it gives me the first 200. I would like to get the remaining 600. I saw there is a start parameter that appears to be deprecated in favor of a cursor but I can't find any details on how to implement it. Is there a reference example for this?
With the current development version you can pass start=200 to the class, to get entries ranging from 200 to 399.
Install via
pip install git+https://github.com/pybliometrics-dev/pybliometrics
Then use
serialSearch = SerialSearch(query={"subject": "ECON"}, start=200, refresh=True)
The refresh=True bit is important, otherwise pybliometrics will use the old information.
Eventually Scopus implements pagination with cursors akin to the Scopus Search API, which would solve this problem.

Query builder API is giving 0 results in publish, But the /libs/cq/search/content/querydebug.html console is giving proper result

I am using Query builder API in java code to get pages with a particluar tag, In all environments its is giving a proper result, But in one of the environment it is giving 0 results in publish,We cross verified the permissions also. Not sure why this is happening.
But the /libs/cq/search/content/querydebug.html console is giving proper result.
We have found the solution for it,
I tried Running the Querydebug.html, it gave me proper result.
We fixed it by giving permission to etc node(root node) and specific child nodes.
Earlier we missed giving permission to etc(root node) node(but gave read permission to child nodes).

Get Status of Driver Inside Visual Basic

I'm currently trying to detect which drivers appear as "not working" in visual basic.
This unknown device is a good example of what I'm trying to grab (notice how it has the flag DN_HAS_PROBLEM).
I've tried using searches such as:
Dim searcher As New ManagementObjectSearcher( "root\CIMV2", "SELECT * FROM Win32_SystemDriver")
And running a loop in the searcher.Get() through this documentation
However, none of these seem to return what I am looking for.
Would anyone happen to know how I can get the DN_ statuses within Visual Basic?
Thanks!
The Win32_SystemDriver class documentation lists these Status properties:
OK
Error
Degraded
Unknown
Pred Fail
Starting
Stopping
Service
Stressed
NonRecover
No Contact
Lost Comm
...whereas DN_HAS_PROBLEM comes from the CM_Get_DevNode_Status function, or perhaps also from other system calls.
There may not be a way to get that specific code from the API you're using, but perhaps the existing Status properties will suffice for your needs if you don't need to know more specific failure reasons.
If you do need to know that specific status, you'll have to call other APIs, like the one I called out.

Confluence pocketquery macro fetching unwanted word along with result from PostgreSQL

Hi I'm using a Confluence macro called 'PockketQuery'(PQ). I have connected to a server located at my client's base through PostgreSQL. I run PQ to fetch results from the db into my confluence page. However, it's fecthing an extra unwanted word "Hallo" along with every result. I m unable to figure out where this string maybe coming from and getting attached to my results like this. Please help me get rid of it.
For example I run a PQ on the db which is supposed to fetch me result "Jack London", so the result that I see is "hallo Jack London".
Note: I use VPN to connect to my client's server and Confluence.
Are you using the latest version from the Marketplace 1.14.6? This issue shouldn't exist in the latest version.
I got an upgrade to version 1.14.6 of Confluence's PocketQuery macro. The issue that I had is resolved, the unwanted string in the result is there no more. The bad part is they don't mention it anywhere on the macro's bug fixes. There are no release notes attached to this fix.Thank you Felix for your help.

Chef API: Adding runlists to a node

I am trying to figure out how to use the Chef API to add a runlist to a node, such that, when I go to the https://mychefserver/nodes/myapp01 node, I see the runlist under the Run List section.
But the Chef API doesn't appear to allow this. Am I wrong, if so, what's the endpoint and how do I call it?
Run lists aren't their own object, it is just part of the data in the Node object so you would use the normal GET /nodes/foo and PUT /nodes/foo. The run list is under the key run_list and should be an array of strings.