Rechercher

Question
· Avr 2, 2020

Ensemble integration with Dynamics

Is it possible to integrate Microsoft Dynamics with Ensemble?

1 Comment
Discussion (1)0
Connectez-vous ou inscrivez-vous pour continuer
Article
· Mars 29, 2020 4m de lecture

[isc-utils] Weather, Exchange Rate, Temperature, Length in a snap

Hi developers!

When @Evgeny Shvarov announced the first InterSystems IRIS Programming Contest, I started looking for new ideas.  

I put together a few ideas, and that's what isc-utils is about.

  •  Conversions
    • Temperature
    • Length
  • Exchange Rate
  • Weather

 

Temperature Scale Conversion

IRISAPP>write ##class(diashenrique.Utils.Temperature).CelsiusToFahrenheit(28)
82.4

IRISAPP>write ##class(diashenrique.Utils.Temperature).CelsiusToKelvin(28)
301.15

IRISAPP>write ##class(diashenrique.Utils.Temperature).FahrenheitToCelsius(82.4)
28

IRISAPP>write ##class(diashenrique.Utils.Temperature).FahrenheitToKelvin(82.4)
301.15

IRISAPP>write ##class(diashenrique.Utils.Temperature).KelvinToCelsius(301.15)
28

IRISAPP>write ##class(diashenrique.Utils.Temperature).KelvinToFahrenheit(301.15)
82.37

Length Scale Conversion

IRISAPP>write ##class(diashenrique.Utils.Length).KmToMiles(120)
74.58

IRISAPP>write ##class(diashenrique.Utils.Length).MilesToKm(74.58)
120

Exchange Rate

IRISAPP>do ##class(diashenrique.Utils.ExchangeRate).Latest(1,"USD","ALL")
Date: 2020-03-18
Conversion of 1 USD

GBP Pound sterling            0.843
HKD Hong Kong dollar          7.766
IDR Indonesian rupiah     15449.552
ILS Israeli shekel            3.810
DKK Danish krone              6.835
INR Indian rupee             74.205
CHF Swiss franc               0.965
MXN Mexican peso             23.963
CZK Czech koruna             24.834
SGD Singapore dollar          1.441
THB Thai baht                32.420
HRK Croatian kuna             6.945
EUR Euro                      0.915
MYR Malaysian ringgit         4.371
NOK Norwegian krone          10.701
CNY Chinese yuan renminbi     7.035
BGN Bulgarian lev             1.789
PHP Philippine peso          51.620
PLN Polish zloty              4.117
ZAR South African rand       16.977
CAD Canadian dollar           1.440
ISK Icelandic krona         139.656
BRL Brazilian real            5.134
RON Romanian leu              4.431
NZD New Zealand dollar        1.713
TRY Turkish lira              6.447
JPY Japanese yen            107.719
RUB Russian rouble           79.656
KRW South Korean won       1260.106
USD US dollar                 1.000
AUD Australian dollar         1.698
HUF Hungarian forint        321.365
SEK Swedish krona            10.081

Parameters:

  • Amount
  • Base Currency Eg. JPY
  • Exchange rates
    • ALL - for all currencies available in the API
    • Request specific exchange rates. Eg.: "BRL,AUD,CAD,RUB"

ByDate

IRISAPP>do ##class(diashenrique.Utils.ExchangeRate).ByDate("2020-01-01",1,"USD","BRL,JPY,AUD,CAD")
Date: 2020-01-01
Conversion of 1 USD

JPY Japanese yen            108.545
AUD Australian dollar         1.424
CAD Canadian dollar           1.299
BRL Brazilian real            4.020

Parameters:

  • Date = YYYY-MM-DD
  • Amount
  • Base Currency Eg. BRL
  • Exchange rates
    • ALL - for all currencies available in the API
    • Request specific exchange rates, Eg. "BRL,AUD,CAD,RUB"

There is a global ^defaultCurrency, that'll keep your preferred base currency.

So, you can call the ClassMethod Latest, without any parameter:

IRISAPP>do ##class(diashenrique.Utils.ExchangeRate).Latest()
Default Base Currency: 

Just inform your preferred base currency:

IRISAPP>do ##class(diashenrique.Utils.ExchangeRate).Latest()
Default Base Currency: USD

Date: 2020-03-18
Conversion of 1 USD

GBP Pound sterling            0.843
HKD Hong Kong dollar          7.766
IDR Indonesian rupiah     15449.552
ILS Israeli shekel            3.810
DKK Danish krone              6.835
INR Indian rupee             74.205
CHF Swiss franc               0.965
MXN Mexican peso             23.963
CZK Czech koruna             24.834
SGD Singapore dollar          1.441
THB Thai baht                32.420
HRK Croatian kuna             6.945
EUR Euro                      0.915
MYR Malaysian ringgit         4.371
NOK Norwegian krone          10.701
CNY Chinese yuan renminbi     7.035
BGN Bulgarian lev             1.789
PHP Philippine peso          51.620
PLN Polish zloty              4.117
ZAR South African rand       16.977
CAD Canadian dollar           1.440
ISK Icelandic krona         139.656
BRL Brazilian real            5.134
RON Romanian leu              4.431
NZD New Zealand dollar        1.713
TRY Turkish lira              6.447
JPY Japanese yen            107.719
RUB Russian rouble           79.656
KRW South Korean won       1260.106
USD US dollar                 1.000
AUD Australian dollar         1.698
HUF Hungarian forint        321.365
SEK Swedish krona            10.081

Weather

IRISAPP>do ##class(diashenrique.Utils.Weather).GetWeather()
Default City: 
Default Country: 
Default Termo Scale(C,F,K): 

The ClassMethod GetWeather, also has preferred options. For Default possibilities we have:

  • City
  • Country
  • Thermal Scale (Celsius, Fahrenheit or Kelvin)
IRISAPP>do ##class(diashenrique.Utils.Weather).GetWeather()
Default City: Boston
Default Country: USA
Default Termo Scale(C,F,K): F

City: Boston | Country: USA

Temperature: 53.46 °F
Real Feel: 46.02 °F
Condition: Clear

But, you can consult any other city sending the parameters:

IRISAPP>do ##class(diashenrique.Utils.Weather).GetWeather("Sao Paulo","Brazil","C")
City: Sao Paulo | Country: Brazil

Temperature: 27.55 °C
Real Feel: 28.4 °C
Condition: Rain

After defining the default parameters, they become optional:

IRISAPP>do ##class(diashenrique.Utils.Weather).GetWeather("Sao Paulo","Brazil")
City: Sao Paulo | Country: Brazil

Temperature: 82.17 °F
Real Feel: 83.95 °F
Condition: Rain

 

PS: I'm little late for the application announcement, but better late than never laugh

If you like it, you can vote for isc-utils on the InterSystems IRIS Contest
 

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Article
· Mars 24, 2020 2m de lecture

BlocksExplorer map generator

I hope you already know one of my projects Cache Blocks Explorer. I've recently renamed it to Blocks Explorer.

For the recent contest, I've added a new feature, the ability to generate a static picture of any Cache or IRIS database. Like below. Where unique globals have a unique color. This is how looks like inside 9.5GB database. Where 1 pixel represents one block. By link on image you will get even bigger image, with more detalization.


The easiest way to generate a picture like this is to use docker.

docker run -it --rm \
       -v /opt/some/database/for/test:/db \
       -v `pwd`/out:/out \
       daimor/blocksexplorer:iris generate 1 0 0

For Caché Database use daimor/blocksexplorer:cache instead of daimor/blocksexplorer:iris

Instead of /opt/some/database/for/test you should pass the path to your database.

generate is a command and it's arguments

  1. Cell size - used to set size for cell which represents database's block. By default 1
  2. Cell space - space between cells. By default 0
  3. Fill - flag to display how much block fill, make sense to set if size of the cell is 10 or more. By default 0

Arguments can be omitted. If no command passed, it will start the server as is, with original UI.

If you like this project, please vote here.

Please be aware, at the moment it uses BMP format to generate a picture, so, for too big databases this picture will be very very big. With default settings 1 pixel per block, it will generate a picture with size at least 3*numberOfBlocks bytes.

6 Comments
Discussion (6)0
Connectez-vous ou inscrivez-vous pour continuer
Question
· Mars 3, 2020

Server side pagination with Iris?

Hi,

Do you have any experience in server side pagination with IRIS using Angular on the client side?
Any idea on a typical SQL request on the server side?

Thanks!
Blaise

6 Comments
Discussion (6)0
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Fév 21, 2020

ICYMI: A Discussion with Jenny Ames about InterSystems IRIS

I wanted to share each of the first three episodes of our new Data Points podcast with the community here — we previously posted announcements for episodes on IntegratedML and Kubernetes — so here is our episode on InterSystems IRIS as a whole! It was great talking with @Jenny Ames about what sets IRIS apart, some of the best use cases she's seen in her years as a trainer in the field and then as an online content developer, and more. Check it out, and make sure to subscribe at the link above — Episode 4 will be released next week!

Discussion (0)2
Connectez-vous ou inscrivez-vous pour continuer