freebase

Can jQuery.getJSON put a domain's cookies in the header of the request it makes?

戏子无情 提交于 2019-12-31 01:54:20
问题 (Note: See also the related question Can browsers react to Set-Cookie specified in headers in an XSS jquery.getJSON() request?) I can't seem to set a cookie (whose name is mwLastWriteTime) in the request header of a JSON operation. The request itself is a simple one from the Freebase MQL tutorials, and it is working fine otherwise: // Invoke mqlread and call the function below when it is done. // Adding callback=? to the URL makes jQuery do JSONP instead of XHR. jQuery.getJSON("http://api

Freebase Error Code: 403 - User Rate Limit Exceeded. Please sign up

有些话、适合烂在心里 提交于 2019-12-25 04:25:06
问题 I keep on getting the below error when fired from the code even though I have signed up and attach key to the url :- Freebase Error Code: 403 - User Rate Limit Exceeded. Please sign up When I try to fire the same url from the browser then the result set is displayed which shouldnt be the case as the error says I have crossed some limit or something. My Query :- [{ "id": null, "mid": "/m/07kw5b", "name": null, "/sports/sports_league/teams": [{ "mid": null, "team": null, "/sports/sports_league

Youtube API v3, topicId recovery

六月ゝ 毕业季﹏ 提交于 2019-12-24 05:36:08
问题 Youtube API v3 enables developers to retrieve specific information regarding a particular video, among the returned data a part called topicDetails can be requested as per the following example: Request: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&part=snippet,topicDetails Response: { "kind": "youtube#videoListResponse", "etag": "\"r3ahjFekUqNiL0By9B5wQ2uTZHM/i4Bt9XfY8YZ1ctSlg8BWcLD8HFQ\"", "items": [ { "id": "7lCDEYXw3mM", "kind": "youtube#video", "etag": "\

How to validate datetime object in SPARQL? (Virtuoso 22007 Error DT006)

荒凉一梦 提交于 2019-12-23 12:36:28
问题 I get the following error. Virtuoso 22007 Error DT006: Cannot convert -0359 to datetime : Incorrect month field length SPARQL query: define sql:big-data-const 0 #output-format:text/html define sql:signal-void-variables 1 select ?item bif:year(xsd:dateTime( str(?dob))) as ?m{ ?item <h://f.cm/ns/common/topic/notable_types> <h://f.cm/ns/people/person> . ?item <h://f.cm/ns/people/person/date_of_birth> ?dob } limit 675 If I change the limit to 674 , it works. What I suspected was that some

How to get aliases from Freebase?

佐手、 提交于 2019-12-23 03:54:11
问题 I just want to get from Freebase the different aliases a person can have. My PHP query is : $query = array( array( 'id' => NULL, 'alias' => NULL, 'name' => "Barack Obama", 'type' => "/people/person" ) ); The result is: Array ( [code] => /api/status/error [messages] => Array ( [0] => Array ( [code] => /api/status/error/mql/type [info] => Array ( [expected_type] => /people/person [property] => alias ) [message] => Type /people/person does not have property alias [path] => [query] => Array ( [0]

JSONP Freebase for autocomplete jquery plugin

我的未来我决定 提交于 2019-12-23 03:22:18
问题 This comes from Parse JSON Freebase results in PHP But since its possible to do it in Javascript using JSONP , I would liek to know how. So, I'm using this jquery Autocomplete plugin: http://devthought.com/wp-content/projects/jquery/textboxlist/Demo/ This is the code for using the plugin on an input: $(function() { var t = new $.TextboxList('#form_topick_tags', {unique: true, plugins: {autocomplete: { minLength: 2, queryRemote: true, remote: {url: 'autocomplete2.php'} }}}); I would like to

Getting Wikipedia IDs in MQL

假装没事ソ 提交于 2019-12-23 01:58:40
问题 Freebase WEX dumps contain a wpid column corresponding to the page_id from the source MediaWiki database in the freebase_wpid table. This table provides a mapping between Wikipedia numeric article/redirect IDs and Freebase GUIDs (Global Unique IDs). guid use as foreign keys is deprecated by mid for lots of good reasons, but that doesn't change the fact that guids are still used at a system level so I'm going to call mid an accessor from here on. Using the mid accessor is flexible in MQL. One

List all Freebase Domains with MQL query or API call

☆樱花仙子☆ 提交于 2019-12-22 08:39:03
问题 I would like to develop a Freebase java application that lets you browse Freebase. I thought a good starting point would be to mimic the Freebase Schema Explorer and allow the user of my app to "drill down" through Domains, Types in a Domain, then Instances in a Type. Can someone please assist in how you retrieve a List of domains? Then a list in that domain? etc... The user can then select a domain and i would like to preset a list of types within that domain and so on until they have found

Pass a JSON object to an url with requests

蹲街弑〆低调 提交于 2019-12-22 05:28:19
问题 So, I want to use Kenneth' excellent requests module. Stumbled up this problem while trying to use the Freebase API. Basically, their API looks like that: https://www.googleapis.com/freebase/v1/mqlread?query=... as a query, they expect a JSON object, here's one that will return a list of wines with their country and percentage of alcohol: [{ "country": null, "name": null, "percentage_alcohol": null, "percentage_alcohol>": 0, "type": "/food/wine" }]​ Of course, we'll have to escape the hell

Freebase python

大城市里の小女人 提交于 2019-12-22 01:32:18
问题 I tried this python example from freebase and run it in my windows and ubuntu machine. http://mql.freebaseapps.com/ch04.html import sys # Command-line arguments, etc. import simplejson # JSON encoding. import urllib # URI encoding. import urllib2 # High-level URL content fetching. # These are some constants we'll use. SERVER = 'api.freebase.com' # Metaweb server SERVICE = '/api/service/mqlread' # Metaweb service # Compose our MQL query as a Python data structure. # The query is an array in