New post

Find

Discussion (0)1
Log in or sign up to continue
Announcement
· Mar 31

Time to vote in the InterSystems AI Programming Contest

Hi Community,

It's voting time! Cast your votes for the best applications in our AI Programming Contest:

🔥 VOTE FOR THE BEST APPS 🔥

How to vote? Details below.

Experts nomination:

An experienced jury from InterSystems will choose the best apps to nominate for the prizes in the Experts Nomination.

Community nomination:

All active members of the Developer Community with a “trusted” status in their profile are eligible to vote in the Community nomination.

Blind vote!

The number of votes for each app will be hidden from everyone. We will publish the leaderboard in the comments to this post once a day. 

The order of projects on the contest page will be as follows: the earlier an application was submitted to the competition, the higher it will be on the list.

P.S. Don't forget to subscribe to this post (click on the bell icon) to be notified of new comments.

To take part in the voting, you need:

  1. Sign in to Open Exchange – DC credentials will work.
  2. Make any valid contribution to the Developer Community – answer or ask questions, write an article, contribute applications on Open Exchange – and you'll be able to vote. Check this post on the options to make helpful contributions to the Developer Community.

If you change your mind, cancel the choice and give your vote to another application!

Support the application you like!


Note: contest participants are allowed to fix the bugs and make improvements to their applications during the voting week, so don't miss and subscribe to application releases!

3 Comments
Discussion (3)4
Log in or sign up to continue
Question
· Mar 31

Working with multiple git repositories

I'd like to ask you for recommendations on how to properly use repository dependencies when using VSCode and Client-side editing.
Suppose I have projects A, B and C, with A being independent, B depending on A, and C depending on A and B.
I am currently working with the main project C, and I want to be able to contribute to all the other projects in a single VSCode window (instead of opening three instances). How do you solve this problem? Git submodules? ZPM? Something else?

1 Comment
Discussion (1)2
Log in or sign up to continue
Article
· Mar 31 2m read

小数桁数を指定して切り上げ・切り捨ての処理を行う方法

これは、InterSystems FAQ サイトの記事です。
 

小数点桁数を指定しない単純な整数への切り上げ・切り捨ては、それぞれ、以下の関数で実行できます。

(SQL関数)

切り上げ:CEILING
切り捨て:FLOOR

(ObjectScript関数)

切り上げ: $system.SQL.Functions.CEILING()
切り捨て: $system.SQL.Functions.FLOOR()

USER>write $system.SQL.Functions.CEILING(168.5)
169
USER>write $system.SQL.Functions.FLOOR(168.5)
168

※バージョン2021.1以前は以下のメソッドを使用します。

 切り上げ: $system.SQL.CEILING()
 切り捨て: $system.SQL.FLOOR()


小数桁数を指定して切り上げ・切り捨てを行いたい場合は、2つの関数を組み合わせ、以下のようなメソッドを作成して対応します。

Class Sample.Utility Extends %RegisteredObject
{

ClassMethod Floor(val As %Numeric, scale As %Integer) As %Numeric [ Language = objectscript ]
{
	Set multi=$select(scale>0:scale-1,1:scale) 
	Set tmpval=$system.SQL.Functions.FLOOR(val*(10**multi)) 
	Quit tmpval*(10**-multi)
}

ClassMethod Ceiling(val As %Numeric, scale As %Integer) As %Numeric [ Language = objectscript ]
{
	Set multi=$select(scale>0:scale-1,1:scale) 
	Set tmpval=$system.SQL.Functions.CEILING(val*(10**multi)) 
	Quit tmpval*(10**-multi)
}

}


【実行例】

0.122 を小数点第3位で切り上げる

USER>write ##class(Sample.Utility).Ceiling(0.122,3)
.13


0.122 を小数点第3位で切り捨てる

 USER>write ##class(Sample.Utility).Floor(0.122,3)
.12
Discussion (0)1
Log in or sign up to continue