SPARQL Query tab in Protege doesn't show anything - sparql

I open the SPARQL Query tab in Protege but the result is this:
How can I write my query?

It happens in version 2.0.1 of Protégé SPARQL Plugin, bundled with
Protege 5.2, after any ontology is loaded.
 
Update the the "OWLAPI RDF Library" and "Protege SPARQL Plugin" to the latest version with the auto-update mechanism (which appears when starting up Protege or can be activated through the File > Check for plugins… menu):
 
Source: https://github.com/protegeproject/sparql-query-plugin/issues/10.

For Protege 5.5.0, you may also need to add query view from menu:
Window--> View-> Query View-> SPARQL Query
And drop it into the SPARQL Query tab.

try to enlarge the heap size for Protégé.
I have had the same problem for SPARQL Query and others. Plugin update never worked for me and each time I just delete the new plugins and Protégé works as If nothing happens.
So the solution I have found till now is to not update plugins but to enlarge heap size.
How to do it?
There is a wiki for Protégé 3 and 4 here: https://protegewiki.stanford.edu/wiki/Setting_Heap_Size but not for Protégé 5 so I was supposed to figure it myself.
Well, you should just open the Protege.l4j.ini file and change the heap size limits from {200,500} to {2000,5000} (I am not sure If your computer will stand that, you must read the wiki above to know more about it).
It should be like this:
-Xms2000M
-Xmx5000M
-Xss16M
Hope this can help someone there.
Best regards,
AmelieSpark.

Another way around is downloading the "Snap SPARQL Query" plugin and adding the view on the SPARQL tab.

Related

How to be compatible with like syntax after upgrading Hibernate Search 6.x version

I recently upgraded hibernate search from version 5.x to version 6.x, and encountered some problems. Most grammars can be processed by referring to the document, but there is a like grammar that cannot be processed directly. The official document also gives a description, However, the content of the document is not detailed enough and cannot be completed.
This is my syntax for 5.x version queryBuilder.moreLikeThis().comparingFields("name").toEntity(product).createQuery()
But I want to use the 6.x version and I don't know how to transform it for the time being
Hope someone who knows can answer, thanks!
As explained in the migration guide, the moreLikeThis predicate doesn't exist anymore in Hibernate Search 6.
But if it's just about a single field, you didn't really need the moreLikeThis predicate to begin with.
This should return the same results as your current code:
SearchSession session = Search.session(entityManager);
List<Product> hits = session.search(Product.class)
.where(f -> f.match().field("name").matching(product.getName()))
.fetchHits(20);

Adding nested triple to blank nodes in OntoRefine not possible?

I'm using the latest version of OntoRefine and want to add a nested triple to a blank node. I'm following the exact instructions on Ontotext website. In the interface there is supposed to appear an arrow next to the object (in the picture on the right side, just under the waste bucket). But it does not appear when the object is a blank node.
It does appear when I create an IRI, but in my case a blank node would be the way to go. When I import the files that are in the tutorial on the Ontotext website, I still do not see the nested triples that are in the example. However...... when you export as RDF, the correct triples - including the ones with the blank nodes as subject - are created.
So it seems that the functionality works, but the interface does not support it. I was also able to manually change the JSON file for my own data and got the correct RDF triples.
Question is: am I the only one that has a problem with the interface? Am I doing something wrong or is this a bug? Curious to know what your experiences are.
in what version of GraphDB are you facing this issue, as problems with blank nodes in the OntoRefine's RDF Mapper have been addressed in GraphDB version 9.5.
This bug has reappeared, but will be fixed in OntoRefine 1.1.1 to be released next week.

Protege unexpected close results in 'owl:' prefix when the ontology is reopened

I am working on an ontology. Suddenly, Protege closes unexpectedly. When I reopen it and open the last ontology I notice that all my classes, individuals and properties are now renamed with the prefix 'owl:'. With this my SPARQL queries no longer work. So far I've worked around it by opening an older version of the same ontology but it's a pain to manually update the old one to the new one because I simply can't find how to remove this prefix. Please help!
I resolved this issue by saving the file as RDF/XML. I was using Turtle format when the issue occurred.

Accessing model attribute from css/less file with Rails 3

The project I'm working on requires me to adapt the size of the elements on screen according to per-user setting. We're using Twitter bootstrap, so my first idea was to toy with the #basefont value, and it seems to do the trick.
However, I don't know how to access the user setting from the .less file. I tried using erb with .less.erb, but it looks like I don't have access to any code in my application.
Is there a way to get the value I'm looking for from the .less file, or - even better - a proper way to do this ?
Thanks for your time.
EDIT
Since I need to get the value at runtime, the way I tried won't work anyway, though I'm still interested on an answer. The only way I see to do what I want is to add a class according to the user setting. Again, I'd be glad to have alternatives.
I opted for css3 transform (and vendors implementation) property. It does the job, but seems to hit the GPU quite a lot. So still open to other answers. :)

How do I just SAVE a jsFiddle and not get a new version

In the documentation:
Buttons Save or Fork are always present in the UI. First one appears if no fiddle was loaded, the latter is used to create a new fiddle from the existing one.
I ONLY see SAVE when the fiddle is brand new, then RUN/update/fork. In Fx4 and Safari 5 on MAC (and Fx 4 on pc)
UPDATE: New BASE functionality does exactly what I wanted.
From the SO FAQ
Stack Overflow is for professional and
enthusiast programmers, people who
write code because they love it. We
feel the best Stack Overflow questions
have a bit of source code in them, but
if your question generally covers …
a specific programming problem
a software algorithm
software tools commonly used by programmers
matters that are unique to the programming profession
… then you’re in the right place to ask your question!
When you log into JsFiddle, you'll get a Set as Base button, which will make the revision you're working on the base version - think of it as an alias for john/7hd62/12/ -> john/7hd62/.
I ran into an issue where set as base would not save my work. The solution was to:
make a change.
Update to get a new version.
Set as Base.
Hope that helps
I always use Update to save and create a new revision.
I haven't seen the button Save... maybe it is so that we can't Save to a version, but always need to Update to a new version, so everybody can look at the same code at a certain version.
Have a look on Issue #225 in JSFiddle GitHub Repository - URL for the latest version of a fiddle such as /xxxxx/latest/:
#zalun: Please read http://doc.jsfiddle.net/basic/introduction.html#setting-base-version
Sharing a latest fiddle is not always what you wanted. Because anyone is able to save "latest" fiddle, someone would be able to change it to the content you wouldn't like to share. With setting a base version you are the person who chooses which version is shared under default "no version" URL.