Using Hermit Reasoner to check if an Ontology is Consistant - reasoning

does anyone know how to use Hermit reasoner to check if the Ontology is inconsistent/consistent ?
i want to use it from command line and would be better if I can save the result in result.txt like Konclude.

Related

Terminal of unix can be without square brackets

Can i make look like root#arch$.
Instead if [root#arch~],
I don't like square braces.
Help me if you know i want to remove square[] bracess.
The prompt you're talking about is named PS1, and you can customise its appearance in your .bashrc file.
So edit that file and add something like the following:
PS1="\\u#\\h:\\w"
The next time you log in you should have your new appearance.
PS1="\[\e[1;31m\]\u\[\e[0;15m\]#\\h \\w "
Insert the above code in '~/.bashrc' file, whenever you open a terminal '~/.bashrc' file will be executed hence you get custom prompt.
Tinker with numbers above to get desired colors.

Read variable name from file and use as locator variable

I have a file with locators which I import in my test suite. The file has lines like these:
LOCATOR_ABC='id=abc'
LOCATOR_XYX='id=xyz'
I have another file which contains locator variable names and expected values, so something like this:
LOCATOR_ABC¤hello world
LOCATOR_XYZ¤goodbye world
Now I want to loop through the latter file and do something like this for each line:
${locator}= Fetch From Left ${line} ¤
${value}= Fetch From Right ${line} ¤
${ui_value}= Get Text ${${locator}}
... compare value and ui_value and expect them to match ....
The problem is I get the error:
Variable '${?LOCATOR_ABC}' not found. Did you mean:
${LOCATOR_ABC}
I know the part with ${${locator}} is probably not nice/correct, but changing my setup so the locator¤value file has lines like this:
${LOCATOR_ABC}¤hello world
${LOCATOR_XYZ}¤goodbye world
And then use this in my test instead:
${ui_value}= Get Text ${locator}
The error message is:
ValueError: Element locator '?${LOCATOR_ABC}' did not match any elements.
So I guess my question is if anyone can shed some light on the ? part of the error message? What am I doing wrong? And or is there another/better way to do this?
Problem with file encoding. Changing to ascii encoding solved the problem.

How do i map one shortcut key to a sequence of tags (tasks) in lighttable?

Say, for example, I want to bind a key "ctrl+d" to duplicate current line in LightTable. For that, to emulate duplication of the current line, I want to run a series of actions like [:editor.select-line :editor.copy :editor.selection.clear :editor.new-line-indent :editor.line-start :editor.paste]
How do I achieve this?
Note: I am aware of the :editor.sublime.duplicateLine tag which duplicates the line, but this is just the example. In general, I want to map a shortcut to a sequence of tags/tasks.
http://lighttable.com/
Are you trying to bind the key? You seem to have most of it set. Just open up user.keymap (ctrl-space "user keymap") and add this:
[:editor "ctrl+d" :editor.select-line
:editor.copy
:editor.selection.clear
:editor.new-line-indent
:editor.line-start
:editor.paste]
There is no requirement that you put it on separate lines like that of course.
Or are you asking for something more complicated?

How to grep value from a line in Unix

Suppose I have a lines as follows:
<Instance name="cd" id="sa1">
<work id="23" permission="r">
I want to get the id value printed, where the id field is not constant.
It hard to give a hint without doing it for you. But assuming your real needs are more involved than you describe, then perhaps some learning can happen while applying this answer.
Grep isn't really powerful enough to do the job you describe, although it may be useful in a pipline to select data at a larger "grain". If your file has one-tag-per-line like your example shows, you can use grep to filter just the Instance or work tags.
grep Instance | program to extract id val
or
grep work| program to extract id val
To extract the value you need something more powerful than grep. Assuming the value is enclosed in double-quotes and contains no embedded quotes; and that there are no similarly named attributes that could confuse the expression, this sed magic should do the trick.
sed 's/.*id="\([^"]*\)".*/\1/'
If any one the above asumptions are not true, the expression will have to be more complicated.

Autosys Job depends regular expression

I am using the Jobdepends command to get a list of jobs stating with tax_check_d_%
I need files like tax_check_d_job
but it returns
tax_check_djob
tax_check_d_job
tax_check_djob_job
how can i select only tax_check_d_job?
When used in a job filter, the _ (underscore) character is a wildcard that matches exactly one character. This explains why you are seeing the unwanted results coming back -tax_check_d_job_% is essentially the same as tax_check_d_job%.
Unfortunately I don't think there's a way around this - according to the Autosys 4.0 reference guide, the SQL ESCAPE option is not supported for wildcards.
I would suggest adding one more character onto your search criteria to filter out the unwanted results, running the command multiple times if necessary. E.g. run it with tax_check_d_job_a%, tax_check_d_job_b%, ... as necessary.
You could also use some custom code to strip out the results you don't want to see. Depending on your needs, this could be a simple as
job_depends -d -J tax_check_d_job_% | grep "tax_check_d_job_.*"

Resources