Marklogic - Adding a default rule set through admin console - sparql

I have defined a default ruleset through admin console. I have given the location of the ruleset as "C:/isParentOf.rules". However, it is not able to find this file. While running a query, it is complaining that
" The ruleset file cannot be found: C:/isParentOf.rules"
I have tried giving a relative path but it does not seem to work.
Can someone suggest what is the right way to specify the location of the ruleset and where ideally should it be kept (along with existing .rules files)
Thanks

Custom rulesets can be placed inside the MarkLogic installation dir under Config/, but I'd recommend uploading it to the schemas database. See also:
http://docs.marklogic.com/guide/semantics/inferencing#id_pgfId-924845
HTH!

Related

How do I fix Directus error code 3 when downloading stored files

I can store files to the specified storage location via the GUI. I can see the files are in the storage location.
When I try to download them using the GUI, I get this every time.
{"error":{"code":3,"message":"Unauthorized request","class":"Directus\\Exception\\UnauthorizedException","file":"\/var\/www\/directus\/src\/helpers\/app.php","line":287}}
When I try the links from the File library, I get the same error.
I found some old topics concerning a "_" project. I do not see any "_" entries in my project.php configuration.
Everyone has read permissions for the storage directory.
The rest of the system appears to run without error.
check the folder in the server and what is been set, the default should be, like
So then if you want to access the 300x300 the URL should be like:
domain.com/public/uploads/Directus/generated/w300,h300,fcrop,q80/file-name.jpg

How to use an environment variable in the odoo.conf

I am trying to use an environment variable in the odoo.conf
file to specify the path where the logs are stored.
So far I have tried:
logfile = ${test.rueda}/odoo.log
But it does not work.
Is there any way to achieve this?
The Odoo configuration files do not support access to environment variables.
I can think of 2 possible approaches:
Use relative paths. The file names in the configuration are relative to the working directory of the Odoo server process. Start the Odoo server in different directories, one for every purpose, and keep the same structure relative to that.
Use environment variables in the command line. When starting the Odoo server, any configuration option can be passed using -- (2 dash signs) as a prefix. In the start script, you can then use environment variables as in any other shell script.
See https://www.odoo.com/documentation/11.0/reference/cmdline.html for details.
For referencing files or path:
When i work without external disk (where i can find my datadir):
i use in odoo config file data_dir = my_absolute_path_in_my_local_disk.
This path have a symbolic redirection to where is my local physical location of my local data directory
When my external disk come back, i change the symbolic link:
my_absolute_path_in_my_local_disk -> my_external_disk_..._data

Getting jQuery Error on using ezzeelfinder

Hi I am trying to use ezzeelfinder as file manager
I am getting the following error:
TypeError: jQuery(selector).elfinder is not a function
Query(selector).elfinder().elfinder("instance");
I am using the exact code from the Yii extension website. I do not know what is going wrong, I am using windows 7 with Apache (XAMPP)?
Continuing our discussion from previous ElFinder question let me try to explain more.
Can you look at what is inside elfinder.min.js file included from assets directory (you can use Firebug: Net tab > expand request of /assets/abcdef/elfinder.min.js > Response tab)? It wasn't a script (but some HTML with error) when I've reproduced a problem with such error. So if this JavaScript file is not included then there is no elfinder method extending jQuery and the error message you receive is fair.
Seems to me that this one is a permission issue. elfinder.min.js file cannot be published to assets directory for some reasons. Make sure that all permissions to elfinder.min.js file WITHIN extension's directory are granted. After granting the permissions to this file clean up assets directory and try again. At last, check whether the script has been really published to assets directory and has granted permissions there.
I don't know whether it will be helpful for you but I have an archive with demo files that can demonstrate extension's basic usage (made under Ubuntu though): http://ezze.org/yii/ezzeelfinderdemo.zip
Extract the contents of this archive to the root folder of Yii basic application created from command line using yiic script.

How to get RavenDB to recognize a plugin?

I'm trying setup the Versioning bundle in RavenDB: http://ravendb.net/bundles/versioning
The installation instructions are pretty straight forward:
Simply place the Raven.Bundles.Versioning.dll in the Plugins
directory.
I've tried this do this by creating a "Plugins" directory under the Server directory (the Server directory contains the Raven.Server.exe), and dropping Raven.Client.Versioning.dll into that Plugins directory.
However, when I run RavenDB after that (either from the command line or as a service), it doesn't give me any indication that it has recognized the plugin, and when I save/edit new documents no versioning is being applied.
I've tried running with the default plugin directory settings (which supposedly automatically looks in the Plugins directory), and I've tried manually adding the PluginsDirectory setting to Raven.Server.exe.config, to no avail.
Has anyone been able to get plugins working, specifically the versioning bundle? Do you hae to do anything special?
Mike,
It is supposed to just work. Take a look at the statistics, you should see the versioning trigger registered there.
It is important to ensure that:
You are using the same version of the dlls
You restarts RavenDB after copying the directory
You don't reference another Raven/PluginsDirectory in the configuration
It is probably better to follow this up in the mailing list.
For Raven v2, you'll also add the bundle name to the the Raven/ActiveBundles property on a database document. The names should be semicolon-delimited.
For example, I have a database called MidwestAnimalRescue. To enable the Periodic Backup bundle and the Versioning bundle, my document will look like this:

Intellij Idea problem with text file impossible to read

I have a problem using Intellij Idea.
I am absolutely unable to load text file as InputStream - it doesnt matter where do I put the file (main/java, main/resources...) it just can't find the file - in Eclipse everything works just fine.
I tried setings->compiler->resource patterns and added ?*.txt but that doesn't seem to work either.
Any help is appreciated.
If you load it as a File, make sure that Working Directory is properly set in IDEA Run/Debug Configuration, since it's the default directory where Java will look for a file when you try to access it like new File("file.txt"). Working directory should be set to the directory of your project containing .txt files.
If you load files as a classpath resource, then they should reside somewhere under Source root and will be copied to the classpath according to Settings | Compiler | Resource Patterns.
If you can't get it working, upload your project somewhere including IDEA project files so that we can point to your mistake.
Look at the image, notice that the txt files are in the project root, and not the source folders (in blue).
If you open the Project Structure dialog, and click on Modules and select your module - are the correct folders marked as Source Folders on the sources tab?
Link for how to get to Project Structure dialog
Also, if you print out the absolute path of that file you are trying to read, is that anywhere near where you expect it to be?
An easy way to figure out the same would be to try creating a file in the same fashion and see where it gets created in your project. You can put your input file at the same location and it should work just fine (if it doesn't, you should check your resource pattern which might be causing the file to be not copied over in the build output).
This method actually gives you the working directory of your intellij settings which is pointed out in the accepted answer. Just sharing as I had similar trouble and I figured out this way. :)