How to get nifty and sensex data using Alpha Vantage api key - alpha-vantage

Is possible to get nifty 50 data using Alpha Vantage?
Also the current price of gold?

As of now, Alpha Vantage only has 100% support for US ETFs, so to get NIFTY data you can download the 50 tickers, you can download the list here, and then make a call to each ticker.
Yes, use the CURRENCY_EXCHANGE_RATE function, and "from_currency=XAU" parameter. XAU is the symbol for gold.
Example:
https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=XAU&to_currency=USD&apikey=KEY_HERE

Related

SphinxSearch round value

need to round value from same example:
SELECT INTEGER(100-INTEGER(15692)*100/INTEGER(19590));
How can I do it on SphinxSearch
Is there any way to round value in spinxSearch (instead of adding 0.5 and flooring)
P.S for that moment find only creating custom functions
So, there is no ROUND function in Sphinx.
My solution was to change app code, and do this thing on code side, instead of Sphinx.
Also, my variant with FLOOR(x+0.5) was approved in comments, use it if you need

Movesense, setting the system time

I am trying to set the system time in Movesense. I couldn't find an example of that, but based on the documentation I think that this should do:
asyncPut(WB_RES::LOCAL::TIME(),
AsyncRequestOptions::Empty,
(int64_t)0);
In this case, I'm just trying to reset the epoch to zero but onPutResults gives me
HTTP_CODE_BAD_REQUEST
So what is the right way?
Minimum timestamp seems to be 1483228800000000 us which corresponds to 1.1.2017. So you can't set the time to 70's as zero would set it to.
This should be documented in the yaml api but currently is not. We will add that to the list of tasks to make sure it's documented in the next release of device-lib.

ADHoc Information Retrieval

I want to extract the total bill from image receipts. I could extract the entire data present in the image but now I am struck with the problem of extracting only the information that I need.
This is the image that I have.
I am pasting the extracted information from the image
m cm lnnk 3mm: :33; no 1 z m
x Visut all! ms“; (or nulnunn mfn an an: nan.
Sub Iota] 19.56
TOTAL 19.56
VISA 1956
Fun 19.56
D!!! You Know 0
For ureat-tastlru dessens under 200
cahries, try our Triple Berry Frozen
Yogurt Sunda: a dish of Frozen Yogurt.
or a Vanma rozen Vugurt Done.
From this data I just want to extract the total bill. To get this I found out that I could use Ad Hoc Normalization (Adhoc retrieval). Can someone provide any insights on Adhoc retrieval. If there are any other option to extract the data from the image please let me do so. I am using tesseract to extract this information. Sometimes it is no giving the proper output. I could use some help in improvising the output given by the tesseract.
Why do you need ad hoc retrieval in this case? Since you are getting the OCR result from the receipt, you can simply perform a regular text search for the item appearing next to "TOTAL".
There are algorithms for image text search, but this seems like overkill for such a straightforward application unless there is a good reason to do so.

SAPUI5: set Timepicker configuration for 15 min interval

Is is possible to configure the sap.m.TimePicker to display only 15 minute intervals?
At the moment the user can enter any time they like.
It's possible now with version 1.40.+
There was incorrect information in the API documentation and it wasn't possible even on version 1.38
Change it to a DropDownBox with a value range of 00:00, 00:15, 00:30, ... 23:30, 23:45? This makes the limitation to specific intervals clear at a glance, is easy to implement and avoids entry of undesired values altogether.
While #vwegert 's answer is function I think there is a better way where you you still get the look and feel of the TimePicker.
In the source of the control there is a property minutesStep. If you can set this in the xml or js definition I think you could be onto a winner.
In fact there is a setter (yay) setMinutesStep.
oTimer.setMinutesStep(15); should be a winner for you.
Hope that helps,
Nigel

Remove Matlab r2014b Plot Browser limit

Among many distressing graphics changes to r2014b, the Plot Browser now only displays a certain number of lines per plot (looks like the limit is 50). Any number of plots above this limit are not displayed in the Plot Browser - it just says "and 78 more..."
Is there anyway to remove the limit? I want to see all my lines in the plot browser.
Unfortunately the answer is currenty:
No you cannot remove this limit
This was already reported to mathworks a while ago, and here is the reply:
I am writing in reference to your Technical Support Case #01143663
regarding 'plot browser with "and xxxx more...." indication'.
Really interesting question (and even a bit surprising). Basically
this limitation has been introduced with MATLAB 2014b!
Our developers are aware of that, and they are working to solve it. An
enhancement/bug request has been already submitted, and I am going to
add this case to the list. However, I cannot guarantee you a release
date.
If you think this limitation is crucial for your work, I would
strongly suggest you to contact your account manager, which will have
a bit more influence on the developers than a simple engineer :).
Of course, if there is anything else I can do for you, please let me
know
So it seems that you will have to deal with this limitation if you keep using 2014b.
This was also an issue for me; in particular I wanted to see the DisplayName property of the graphics object in the list. I used a workaround where I created a callback function, so that when clicking on a data point, the DisplayName would be shown. This can be helpful if you have a plot of many lines and want to see the DisplayName of a particular one. You would first need to set the DisplayName property of the graphics objects for this to work, as it's empty by default. You could also use this to show other properties, such as Color or LineStyle, that are shown in the plot browser:
%Based on
%http://www.mathworks.com/help/matlab/ref/datacursormode.html
%'fig_h' is the figure handle
dcm_obj = datacursormode(fig_h);
set(dcm_obj,'UpdateFcn',#myupdatefcn)
And then include this function as a separate file on the Matlab path, or paste into the function you're currently writing, and include an extra 'end' at the end of that function:
function name = myupdatefcn(empt,event_obj)
% Customizes text of data tips
tar = get(event_obj,'Target');
name = get(tar,'DisplayName');
end