Suggestions on how to format a number as currency in IBM Watson Assistant - watson-assistant

I am not able to figure out how to format amounts (integer, decimal, etc..) as currency in IBM Watson Assistant.
Thank you!

There are additional details here - https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax
T(String).format('%,.2f',$number)

Related

using Azure Billing REST API for Pre-consumption cost analysis

I am looking for Azure REST API that will help me calculate the cost of creating azure resources in advance.
I got Azure Billing REST API.
It certainly helps in getting the price of already created azure resources on monthly basis. But, I need it for
Pre-consumption cost analysis.
Kindly help me how to use the same to achieve the cost estimation without creating the resources.
Input: n number of VMs
output: the latest cost of the VM(with specific criteria)*n.
Thanks in advance.
Actually, the Azure Billing API provides all that information as well with its Resource RateCard call:
https://msdn.microsoft.com/en-us/library/azure/mt219005.aspx
Just make sure you provide the appropriate OfferDurableId as prices for resources depend on which plan you fall under.
Also, when sending your request, you might want to escape the apostrophes to %27 or the call might fail for you.

Webservice for past weather data for JAPAN

I want a web-service that provide weather information for japan.
somewhere i have found this, but here i can get data only for US.
Reference i have found yet
You can find the web service on http://worldweatheronline.com/ but they are providing data to premium customer only and premium membership is free for 2 month after that you have to pay 5$ per month or 54$ per year.
Please let me know if u want code.

Sage Pay "Server Integration" For BigCommerce To Accept European Payment Types Such As Giropay and Sofort

I have been asked by BigCommerce Support team to fill out a question to here for some help regarding Sage Pay integrations for BigCommerce.
Currently, BigCommerce offer "Sage Pay/Protx VSP Direct" & "Sage Pay/Protx VSP Form (Hosted)" payment options.
For us to be able to accept European payment types such as Giropay, Sofort, EPS & iDeal - We need to have the "Sage Pay Server Integration" payment option available.
Information on these can be found on the following links:
http://www.sagepay.co.uk/support/12/38/protocolv3
The page above lists the 3 options available. BigCommerce currently have 2 of these set up, however we require the third option.
Please see this link for that option in detail:
http://www.sagepay.co.uk/support/find-an-integration-document/server-integration-documents
On this page there is also a link to PDF guide that we have been sent by Sage Pay to explain this option.
"Local European payments
Accept giropay and sofort payments for customers based in Germany, Austria and The Netherlands.
PDF document - Local European payments instructions"
Is it possible to add the third Sage Pay integration to the BigCommerce platform for us to be able to accept European payment types such as Giropay, Sofort, EPS & iDeal?
Thank you in advance for any help and assistance you may be able to offer!
You can use the European payment types with the Form integration (undocumented feature), which I believe BigCommerce supports.
eg: (this will probably expire, but you get the idea)
https://test.sagepay.com/gateway/service/vspform-register.vsp?VPSProtocol=3.00&TxType=PAYMENT&Vendor=thewinningteam&Crypt=#6f6d4015eac483c75b20975c58ae2d25dd095f2c1c794e7e3f905de696211476f4a1a463e3c9cf94dd1ccec3e029f33d8325413484846baeb70e869c49c70c41ea0d9b5b9f44f077e3b52b8472e3ddc6178b016663c6c5349e9566a8668db0644137722522f584bef4e54d4d2f4a0640289e4def75d8b441c96bef6e1cd1f7d257630949597e68a6be9087992a9f2ac18e3230825b1e193a89246e6a437ba02c67929d79f94a9266f63116f4764ba41d184e64511305e19f7d75068dd57f2d7c28f5250985323ef5a6761257398ef9d80fcb200d930ca6b3e3968de276e1689ddf54ac8424697b5b1b58d8fc8b2d5e260eee514f77567cd8056e8f28be4f32cd15f7fe9ebb19b3f0f6d20ac837f77bcb10fb6ef2c5103bba1400f95153c9af654e1825ebc50a9105b26fecda00fc87844cd03569d9c0273d409f76b67466204a1de7c66cc80bb3f75bead210b503f99209fb1c3c5ac22b40bce0097c1816250d1f89fbee65c29a0a1449bd66b5d59ed095559e7e48c32b96615b98b496c4e342fba270451c428c4388197ce8a68c87b59b3a1f8a136197ba2f335b756d29260bf951ae81a12c6dab5f3d14e0dab8e1070ae50a0401e1bcb1dd9b9a5c86d1074f222547b1318096c7ddf1a532bddf6209615317bd228975a8888bb56ff14b3ab6790adb23ae696bc695c2512ac0278cf2

How do I tell if a product is prime eligible in the Amazon Product Advertising API?

Been using the API for about a week now and I can't seem to figure out how to access this data in ItemSearch.
The attribute IsEligibleForPrime tells you whether the Article is for Amazon Prime or not. It is delivered with the Response Group OfferListings
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/CHAP_response_elements.html#IsEligibleForPrime
If you perform an ItemSearch the ResponseGroup will contain IsEligibleForSuperSaverShipping which will tell you if it is Prime eligible.

free form date field

I was reading this archive on joel on sw http://www.joelonsoftware.com/articles/TwoStories.html
here he mentions he wanted to make a date field free format. Then I thought how would someone do that? ofcourse search in gmail does it.
has anyone implemented this before? and how?
You could check out any of the following date parsing implementations
Google's parsedatetime on google code (http://code.google.com/p/parsedatetime/)
python-dateutil (http://labix.org/python-dateutil)
javascript lib (http://www.datejs.com/)
perl (http://metacpan.org/pod/DateTime::Format::Flexible)
PHP's strtotime() is a very nice implementation of this.
If you have users both side of the Atlantic you'll need to prevent 09/10/11 style dates explicitly as much confusion will happen - either require the month in letters or use a drop-down for it and abandon free-form.
Remember 09/11 is the ninth of November in Europe. Using an IP address's location to disambiguate fails because Europeans and Americans can cross the Atlantic!