The "apptools-admin" project is not only a set of tools for the administrator, but a platform for the rapid creation of a prototype of any solution.
For example, Photo Album, Music Player, and Personal Library all come together in a user-friendly treasure chest design.
When you have more than ten thousand users in your database, it becomes time-consuming and inconvenient to assign group access rights through the standard IRIS interface. In this artilce I want to introduce you an application to automate this process.
I’ll show you how to assign and change the role lists for the users, selecting them by context, and I will also show you how to expand this application’s functionality. you know how to apply your work as an administrator and developer to the new features of the well-proven apptools software complex. With the addition of an adminLTE template, you can now quickly and easily create interface interactions for any entity and many functional modules.
The goal while developing this toolkit is to write as little JavaScript as possible as well as transfer and implement all the dynamics as much as possible in the ObjectScript.
This code snippet uses %ZEN.Auxiliary.jsonSQLProvider. The namespace and string of SQL can be edited for different situations. The class method "test" runs the code:
Class eduardlebedyuk.passQuestionParams
{
classmethod test(pValue = 50) {
s ns = $Namespace
zn "samples"
s tSQL = "SELECT ID, Name FROM Sample.Person WHERE Id > ?"
s tPR = ##class(%ZEN.Auxiliary.jsonSQLProvider).%New()
s tPR.sql = tSQL
s tPR.%Format = "tw"
s tPR.maxRows = 100
s tParam = ##class(%ZEN.Auxiliary.parameter).%New()
s tParam.value = pValue
d tPR.parameters.SetAt(tParam,1)
d tPR.%DrawJSON()
//d ##class(%ZEN.Auxiliary.jsonSQLProvider).%WriteJSONFromSQL(,,,,,tPR) //same thing
zn ns
}
}
(Originally posted to Intersystems CODE by @Eduard Lebedyuk, 5/13/15)
Tip dvacátý šestý: objekty a concurrency 2 - swizzling
Když tento seriál před několika lety začínal, byl jeho první díl věnován zajištění izolace instance objektů pro exkluzivní přístup a popisu příslušných API funkcí. Nedávno se mi ale stalo, že mě tento díl dostihl. Jeden ze zákazníků začal mít problémy v aplikaci, přestože důsledně používal exkluzivní zámky pro editování instancí svých objektů.
The challenge today is about some basic cryptography : you will have to generate data for a one-time pad (OTP) (see https://en.wikipedia.org/wiki/One-time_pad for more info).
This code snippet contains the class method "test" which sends an HTML email. Change the literal strings in the method to customize the email's from address, to address, subject, and body:
Class objectscript.sendEmail Extends %RegisteredObject
{
classmethod test() {
set m=##class(%Net.MailMessage).%New()
set m.From="user@company.com"
set m.IsHTML=1
do m.To.Insert("user@company.com")
set m.Subject="Sent by IRIS mail"
set m.Charset="iso-8859-1"
do m.TextData.Write("<HTML><HEAD><TITLE></TITLE>"_$char(13,10))
do m.TextData.Write("<META http-equiv=Content-Type content=""text/html; charset=iso-8859-2""></HEAD>"_$char(13,10))
do m.TextData.Write("<BODY><FONT face=Arial size=2>Test <B>Test</B></FONT></BODY></HTML>")
set s=##class(%Net.SMTP).%New()
set s.smtpserver="mail.company.com"
set status=s.Send(m)
}
}
In this article, I'll show you how to run code at compile time with ObjectScript macros.
Here's a use case that recently led me to use this feature:
As part of a medical application developed for more than 20 years, we have a large number of parameters. Although we have procedures for documenting these settings, it can be helpful to have a quick view of which settings are actually used by the application code.
The attached zip file contains a bunch of examples of Cache SQL Storage mappings that I have done over the years.
If you have existing globals and want to expose them via Objects or SQL you need to setup Cache SQL Storage mapping. If you do not see an example that helps with your case send me an example and I can help you out.
The challenge of day 16 is about generating random data using a modified version of a dragon curve (you can find more info on fractal curves like Dragon here : https://en.wikipedia.org/wiki/Dragon_curve).
Advent of Code is a series of 25 small programming challenges, it's an ideal way for beginners to start learning a computer language, and for advanced people to sharpen their programming skills.
There are small and bigger puzzles, which you can solve typically in half an hour to a few hours. (Looking at the leaderboard, the top aces can do them in less than 10 minutes.)