How to enable the experimental functions of NebulaGraph? - nebula-graph

I noticed that TOSS in Nebula Graph is an experimental function, how to enable the experimental functions of NebulaGraph?

To use the experimental configs in Nebula Graph, you need to set enable_experimental_feature to true in the nebula-graphd.conf file.
Can I ask why you want to use the TOSS feature? It is not recommended that you turn the toss feature on because it is being closed soon.
See this GitHub pull request https://github.com/vesoft-inc/nebula/pull/5119

I remember seeing a parameter in their docs. You can set the enable_experimental_feature parameter to true to enable experimental functions of the NebulaGraph database. Doc link: https://docs.nebula-graph.io/3.3.0/5.configurations-and-logs/1.configurations/3.graph-config/#experimental_configurations

Related

Optimising network connections of firebase cloud function

Firebase documentation recommends including code snippet given at (https://firebase.google.com/docs/functions/networking#https_requests) to optimize the networking, but few details are missing. Like
How exactly does this help?
Are we supposed to call the function defined as per of recommendation
or include this snippet deploy?
Any documentation around this would be of great help.
this is an example showing you how you would make this request, the key part in this example is the agent field which by nature isn't normally managed within your app. By injecting a reference to it manually, you are able to micro-manage it and it's events directly.
As for the second question, it really depends on your cloud function needs - some users set it in a global object that they manage with all cloud functions but it's on a by-use case basis. but ultimately isn't required.
You can read more about HTTP.Agent's and their usage below:
https://nodejs.org/api/http.html
https://www.tabnine.com/code/javascript/functions/http/Agent
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent

gremlin shortestPath() with step

where is the document about gremlin with step?
https://tinkerpop.apache.org/docs/current/reference/#with-step
https://tinkerpop.apache.org/javadocs/current/full/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPath.html
there is no example I can use.
I want to know all with-step option(like ShortestPath.edges-Direction.OUT) for shortestPath().
I found below
g.withComputer().V(xxx).shortestPath().with(ShortestPath.edges, Direction.OUT).with(ShortestPath.distance, 'cost').with(ShortestPath.target, hasId(bbb))
I want to know all option I can use
The with()-step is not really a "step". It is a step modulator. Its context is bound to the step that it is modifying and therefore you won't find "all the with() configurations" in one place. You can only find them in the documentation related to the steps that they modulate. Using shortestPath() as an example, note that if you look at the shortestPath() step documentation all of the options are present.
You may also need to consult the documentation of your graph provider as they may provide their own configuration keys for certain steps which can help optimize or otherwise modify traversal operations.

Remove components after setup in OpenMDAO

I would like remove (or redefine) a component after setup. Is this possible with the reconfigurable model execution?
that is technically possible with reconfigurability. However, as of openmdao 2.2.1 that is not a fully supported feature. You'll need to experiment a bit on your own.
There are some tests that can show you how to get started.

How to create multiple USE statements in sniff

I'm working on a sniff for PHP_CodeSniffer 3.x. For example, the class declaration class NoInlineFullyQualifiedClassNameUnitTestInc extends \PSR2R\Base\AbstractBase should be split into a uses and class AbstractBase. The sniff detects similar issues for method signatures.
I believe the problem is that I'm generating and inserting multiple use statements at the same line (i.e., same token), but doing so in separate fixer->beginChangeset() ... fixer->endChangeset() sequences. The fixer treats multiple sets of changes to the same token as a conflict, and things get messy (and wrong).
The GitHub issue is here: https://github.com/php-fig-rectified/psr2r-sniffer/issues/9
Has anyone figured out how to do this writing custom sniffs for the latest 3.x CodeSniffer?
You can also use SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff
It turns this
Into this
How to use it?
The best is to use it with EasyCodingStandard like this:
# easy-coding-standard.neon
checkers:
- SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff
Install it:
composer require --dev symplify\easy-coding-standard
Run it:
vendor/bin/ecs check src
Fix it:
vendor/bin/ecs check src --fix
Enjoy and let me know how it works for you.
If any troubles come up, just create an issue here. I'm happy to improve this tool as much as possible.
The problem is multiple Sniffer (fixer) changesets editing the same token. I was able to get the Sniff to work by collecting a list of USE statements and inserting them at the end of the Sniff's processing.
I identified the end of processing by searching backwards from the last token to find the first token of the list of registered tokens.
Edit: Here is the sniff: https://github.com/php-fig-rectified/psr2r-sniffer/blob/master/PSR2R/Sniffs/Namespaces/NoInlineFullyQualifiedClassNameSniff.php

How to properly debug OCaml code?

Can I know how an experienced OCaml developer debugs his code?
What I am doing is just using Printf.printf. It is too troublesome as I have to comment them all out when I need a clean output.
How should I better control this debugging process? special annotation to switch those logging on or off?
thanks
You can use bolt for this purpose. It's a syntax extension.
Btw. Ocaml has a real debugger.
There is a feature of the OCaml debugger that you may not be aware of which is not commonly found with stateful programming and is called time travel. See section 16.4.4. Basically since all of the information from step to step is kept on the stack, by keeping the changes associated with each step saved during processing, one can move through the changes in time to see the values during that step. Think of it as running the program once logging all of the values at each step into a data store then indexing into that data store based on a step number to see the values at that step.
You can also use ocp-ppx-debug which will add a printf with the good location instead of adding them manually.
https://github.com/OCamlPro-Couderc/ocp-ppx-debug

Resources