I have made view (spraql view) called Person with fields: name, street adress, organization.., e-mail usign some foaf and schema ontology. But I cant find out how to specify sparql query. I need to get only people with specific adress for exmaple: person where adress is "road 1". Is there possibility to set up this?
... many thanks for your answers (and tutorials also)..
If you are looking to learn SPARQL then Leigh Feigenbaum's SPARQL by Example is a great place to start
I would like to recommend you reading Bob DuCharme's "Learning SPARQL" book.
Related
So I started using the Google Books API for an application that I am building and I am fairly happy with the results.
But I have noticed a strange behaviour sometimes. Some ISBNs do not return any book details even though the book exists in the database.
For example, if I give: https://www.googleapis.com/books/v1/volumes?q=isbn:0262527359,I get the following response:
{
"kind": "books#volumes",
"totalItems": 0
}
I digged around the internet regarding this problem and found this link:
https://productforums.google.com/forum/#!topic/books-api/R5DvlRh-EKo
They suggest a workaround by not mentioning isbn: in the search query. So, the query becomes: https://www.googleapis.com/books/v1/volumes?q=0262527359
This method is not perfect but it's the only workaround I found.
That's when I noticed another problem. There is a mismatch between the description given on the webpage and the one in the response to the API call.
Can someone explain these strange behaviours to me? Are there any better solutions?
So i did some digging around and found out about this strange behaviour, when your query is of the form ...?q=isbn:0262527359, the results you get are the books that have this same isbn only and when you use the query of the form ...?q=0262527359, the results you get are the books that have any instance of this number in the record fields of any book. It can be either in editions isbn array or any other, this query will search all fields for matching results whereas the former query will only search isbn for matching results
I've looked through numerous answers (most were slightly outdated), and I was wondering if Apple had some sort of way to identify the type of business it queried?
From the reference guide, MKMapItem has 5 variables, none of which tell me a place is a "Thai Restaurant" or something like that.
placemark
isCurrentLocation
name
phoneNumber
url
I think its interesting how when you do a MKMapkit query on "thai", it'll give you a list of thai restaurants but thats a one way street and no where later can I take a result from the query on "thai" to verify that it is indeed a "thai" restaurant. More importantly, what I am particularly interested in is if a business is a "Thai" restaurant and a "Bar" as well, I want to be able to do a MKMapKit query on "Bar" OR "Thai" and be able to get both of those tags
I can see a solution of getting the coordinates of a business then using Google Maps API or even Yelp API and doing a search on there to get the "type of business" but that seems extremely cumbersome and inefficient.
Thanks for any advice! One of my first questions so please so easy on me =)
First, take a look with this link : http://www.raywenderlich.com/13160/using-the-google-places-api-with-mapkit
The google API will send back the name, type, location of business location near you.
It's also send icons(via image link) of business location, so you can display it on the map, which can help you which is market, which is coffeeshop...
But the "Thai Restaurant" maybe too detail so google doesn't want to show it.
Sorry about my bad english.
Hope it help.
For that you should use google near by place search or place search api. you can pass thailand as place name and restaurant to type and it will return you all the restaurant in thailand.
I have a content type called Author which is referred in another two content types called Novel and Book via Node Reference Module.So we can add author entity to both Book and Novel content types.
Both Novel and Book contain another field called Release Date.
Now I want to show a block which will display the name of book and name of novel in chronological order based upon the release date when user come to that corresponding Author Page.
Ex. Suppose A is an author who is author of BookA(Release Yr-2006), NovelB(Release Yr-2004),BookC(Release Year-2009). When user come to Author A page then he will be shown a block which will show the Books/Albums in chronological order like this:-
NovelB--BookA--BookC
Please suggest as how to achieve in Drupal 7.
You want to display the following field title (I assume the book name is the node title)
For the sorting you can use the sort option in views, it is pretty self-explaining. Choose the name of your release date field.
For the connection between author and books you will have to use a contextual filter (advanced).
Add the author-reference-field from your book/novel (the field you use to refer to the author). Then choose to use a default value (2nd option) and choose content id from url. Now your block will find all nodes that refer to the page with the current page-id. Since we chose to display the title fields, you should see a list.
Note that live preview does not work here, so you will have to go to the actual page to see the result.
UPDATE:
This works when you have re-used the same field for both content types. If you have uses more then one field you will have to use an OR operator to make the contextual filter work. Thanks to d34dman the following page was given to do just that.
Although for new implementations I would recommend using the same field (eg. reference_to_author) for all references from all content types.
Yah..I am able to solve this problem by adding custom code. I have used hook_views_query_alter method and then added join relationship and where clause as per requirement. Please refer to following article for more clarity..
http://www.midwesternmac.com/blogs/jeff-geerling/filtersearch-multiple-fields
Thanks for posting the reply and keeping my hope alive.
I've added several Subjects under the Admin section of Dynamics CRM. I'd really like to add one of these "Subjects" to the Regarding field within an Activity. E.g. someone called, and it was related to "ProductX".
Strangely, the entity type "Subject" does not appear when trying to select an item for the field. A range of other entity types such as "Contacts" and "Accounts" appear.
Does anyone know why Subjects can't be selected here? I would have expected this was OOB functionality.
That because it doesn’t really make sense to have activities regarding a subject.
An activity only really makes sense in the context of something else, and that something else is generally a real thing in the world or a piece of work. The Regarding field really says: "This Activity involves working on this thing".
For example, if John Smith rings your company, it makes sense to create a new Phone Call activity that Regards the Contact record of John Smith. With this approach you can see the entire activity history against a Contact. By making the Phone Call regard the Contact you are saying this piece of work is about the Contact.
If the Phone Call was Regarding a Subject, it would be saying, "This Phone Call involves working on the Subject", which isn’t true, its work about the Contact. Also you lose the ability to track correspondence with the contact.
So my suggestion would be, use the Regarding field to link to people and things, and add a relationship between your activities and subject if you want to classify your phone calls.
As a side, there is a product entity in CRM (it can’t be Regarding however), so perhaps you should create a relationship to that.
If I want to create a entity in Core Data that has attributes with values that should be localizable I'm wondering how the most efficient way would look like?
As a example let's assume the following structure:
Book
name (localizable)
description (localizable)
author
An localized book entry would look like this:
name: "A great novel" (en/international),
"Ein großartiger Roman" (de),
"Un grand roman" (fr)
description:
"Great!" (en/international),
"Großartig!" (de),
"Grand!" (fr)
author: "John Smith"
In a SQL/SQLite implementation I would use two tables. A books table containing the book information (author, the english/international name and description) and the localizationBooks table that is related using the primary key of the corresponding book. This second table contains the localized name and description values as well as the languageCode. This would allow to have a scalable number of localizations.
For fetching the data I would use a
SELECT COALESCE(localizationBooks.name, books.name)
to get the actual values for the given language code. This allows to use the international english value as fallback for unsupported languages.
Would this require a separate entity in Core Data (e.g. BookLocalization) that has a relation to the Book or is there another recommended way of doing this?
The strategy you mention is usually the best. As you suggest, this requires an extra entity for the localized properties.
You can then write a helper method on your Books entity to get the appropriate localization object for a given language and use it like this:
[book bookLocalizationForLanguage:#"de"].name
You could even take it a step further and just add properties like localizedName, localizedDescription on the Books entity which will fetch the appropriate localized value.
Well, despite that this topic is 3 years old... I just stumbled upon it, asking my self the very same as the original poster. I found another thread with an answer.
I'll just repeat it in here in case somebody else hits this thread (Answer from Gordon Hughes):
Good practices for multiple language data in Core Data
To summarize:
Let's say you have Entity Books. Then you will have to make an additional one, called Localizedbook for example. In Books you have the attribute "title" and in LocalizedBook you have "localizedTitle" and "locale" for international strings like "en_US".
You now have to set the relationship between title -> localizedTitle (one to many, as one original title can have multiple translations).
So, every time you fetch "title" you will get the "localizedTitle" given to a specific locale, if the relations are set correctly.