Bing Image Search API autocorrect feature...? - iphone

I am trying to use BING's image search api, but the problem is when I miss-spell something it automatically corrects the and doesn't tell me that "Hey we have auto-corrected your query!" , I want to know if my query has been auto corrected and what's the replacement word they have used.. Has anyone done this before...?
This is the query I am using.. note "Aemrica" has been mis-spelled deliberately but it still it gives me results for "America"
https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/Image?Query=%27Aemrica%27&$top=50&$format=JSON
but does not tell anything that the word has been replaced. Is there any way around it..?
i am using the response for iPhone.

No there is no way around this. Even the SearchResponse.Query.SearchTerms response parameter appears to still be the incorrectly spelt version.
I would suggest contacting Microsoft if this is a big issue for you.
EDIT: If you upgrade to the new Bing Search API based on the Azure marketplace, you can now get this data by first making a call to the SpellingSuggestions endpoint.

Related

How to get highlighted text from active terminal in VSCode Extension API

I am trying to build an extension using the VSCode API in which I need to get user's selected text wherever it is either in the activeTextEditor or activeTerminal. I see the way of getting the text from the selection for activeTextEditor. However, I am not able to find a way to get the highlighted text from activeTerminal. Appreciate any help on this.
vscode.window.activeTerminal
It seems there is no API available for that. You have the activeTerminal, but not the content the user selected.
The closer API request I found what this one (https://github.com/microsoft/vscode/issues/47615), which was in fact connected with the activeTerminal API.
So, if you really need this feature, you should open a feature request in VS Code repo (https://github.com/microsoft/vscode/issues/new/choose) asking for this new API.
Hope this helps

show diff on word documents

I'm designing a web application that will enable users to upload docx documents and will the show the diff between each revision.
I don't know how to approach the problem. Is it a bitmap, how do I decode the doc to show changes. Do Microsoft has an API I can use to simply send 2 word docs, and it will return the changes between the two?
I also have the same question on google docs. I think with google drive it's simpler. Saw this API
If anyone has done something similar or has an example to some similar app, I would be grateful.
Have you looked at Word's Compare tool? See under Review|Compare. Word's API also support the compare tool's automation (e.g. via VBA).
To use Word's API, you'll need to automate Word. For the details of the method, see: https://msdn.microsoft.com/en-us/library/office/hh128820(v=office.14).aspx
See also: https://code.msdn.microsoft.com/windowsdesktop/Compare-Two-Word-Documents-043b2e1d

Rest Console for Chrome won't let me input any info

I installed the Rest Console extension onto Chrome. I can't use this Rest Console for anything, because the only fields that accept text are 'Request URL' and 'Request Method'.
I ask here as there is no resources or community accessible for even simple instructions on how this extension works, and there are likely members of this community who have used this extension.
Use the Postman - REST Client it works perfectly!
your_url_to_post: Fill the URL
your_json_param: The name of the param that you'll pass you json
your_json_data: The json content
Don't forget to select x-www-form-urlencoded if you'll do a post
http://i.stack.imgur.com/TISW1.png
You should be able to enter text in the other field if you tick the checkbox associated to the field first.
I started having a similar issue myself (Forms wouldnt let me input data I could click them but thats as far as it went) across a lot of web pages to include my own php game and I know the form code hasnt changed at all before this issue started. I came across a article of someone else having a similar issue themselves that I was having and someone said that they needed position: relative on their forms that are not given specific instructions on positioning when dealing with google chrome. I have since made this change myself at www.immoralattack.com and the issue has stopped on that site but still continues on many others so its pretty safe to say that is the issue.
Its only happening on the dev build of chrome for me atleast and I hope this isnt something they plan on implementing on live or this will mess up alot of websites.
Also try turning off auto fill from chrome if its on, while I was looking for this bug I found alot of similar bugs but they delt with auto fill being on.

Is it possible to pass data needed for driving directions to the Bing Maps website?

I have an application that currently links to Google Maps passing it the required URL parameters needed to show driving directions for a set of points (typically 3+). This approach has worked and has allowed us to not use their API, which worked fine.
With Google, they made it pretty easy and clear by using parameters like "saddr" for the starting address, "to" for way points, and "daddr" for the destination. I could even pass in "pw" if I wanted to put the map into print mode. Simple, easy, works great!
I'm trying to determine if Bing Maps supports the same thing. I have been unable thus far to find any examples showing how this can be done, nor have I been able to easily decode the URL after creating my own driving directions using Bing Maps.
Again, I'd like to avoid using the API and am find with sending users to Bing's site when clicking my link.
It this possible? If yes, how can it be done?
Yes it is possible.
And I just wrote a little blog post to demonstrate how: http://alastaira.wordpress.com/2012/06/19/url-parameters-for-the-bing-maps-website/
Alastair's answer has full details if you follow the link through to the blog post.
But if you want the quick answer (again, thanks Alastair) use this root:
http://www.bing.com/maps/default.aspx?where1=
and stick your search destination in at the end. Eg. this gets you to Atwood Rd in London using its postcode:
http://www.bing.com/maps/default.aspx?where1=W6%200HX

How to use google place api in iphone to query supermarkets around my place

I am new in Google places API and don't know how to use in our application...Can any one explain me how to get the list of Supermarkets around my places..
Currently I am using this link but not able to get that things which I want.
Please help me to solve the problem...
The URL should be:
https://maps.googleapis.com/maps/api/place/search/json?location=lat,long&radius=500&types=grocery_or_supermarket&sensor=false&key=yourkey