Hi, folks!
Consider I need to perform some logic which should fire because values of object properties has been changed.
Is there ANY reason for using class callbacks %OnBeforeSave or %OnAfterSave instead of Trigger?
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hi, folks!
Consider I need to perform some logic which should fire because values of object properties has been changed.
Is there ANY reason for using class callbacks %OnBeforeSave or %OnAfterSave instead of Trigger?
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
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).
You need to generate keys by taking the MD5 of a pre-arranged salt (your puzzle input), and an increasing integer index starting with 0.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
Today, you have to find a path through a maze. To know if a coordinate is a wall or an open space, you will have to do a calculation like this :
x*x + 3*x + 2*x*y + y + y*y Add the office designer's favorite number (your puzzle input). Find the binary representation of that sum; count the number of bits that are 1. - If the number of bits that are 1 is even, it's an open space.
I am trying to make Caché perform certain actions depending on whether a particular property of the object was changed using triggers.
For example, say I have this class:
Class Dummy.Class Extends %Persistent {
Property Name As %String;
Property Visible As %Boolean;
Trigger OnUpdate [ Event = UPDATE/DELETE, Time = BEFORE ] {
if ({Published*O} = 0) && ({Published*N} = 1) {
do .CertainAction({ID})
}
}
ClassMethod %OnBeforeSave(insert As %Boolean) As %Status [ Private, ServerOnly = 1 ] {
// .This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
Today, you need to make a compiler for the language assembunny.
Luckily, this language has only 4 instructions :
cpy x y copies x (either an integer or the value of a register) into register y. inc x increases the value of register x by one. dec x decreases the value of register x by one.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
The challenge today is about microchips and generators. A microchip belongs to one particular generator, and the two can be on the same floor, or in the same elevator. But if a microchip is with another generator on the same floor or elevator, it will get toasted, except if his own generator is also on the same floor/elevator.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
In today's challenge, you have to execute instructions that control how bots are handling microchips.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
Today's challenge is about decompressing input that is compressed in an experimental format.
In the format, markers indicate how much time a number of characters need to be repeated.
For example :
A(1x5)BC repeats only the B a total of 5 times, becoming ABBBBBC for a decompressed length of 7. (3x3)XYZ becomes XYZXYZXYZ for a decompressed length of 9.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : goto to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
The input in today's challenge consists of an encrypted name, a dash, a sectorID, a dash and a checksum between brackets.
A name is real if the checksum is equal to the five most common letters in the encypted name.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : goto to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
The challenge of day 5 is to calculate a password of 8 characters by finding the MD5 hash of the input and an increasing integer index.
The password is constructed by taking the 6th character of the first 8 hashes that start with 5 zeroes (in hex representation).
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : goto to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
In today's challenge, you have to repair the communication with Santa : messages are coming in, but jammed.
By using repetition code (see also https://en.wikipedia.org/wiki/Repetition_code), you can find out what's in the message : by sending the same message a number of times, you can calculate which characters are most frequent on each position and find the most likely message.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
The challenge of today has nothing to do with real two-factor authentication ! (sorry if you came to this article by searching the real thing)
For the complete explanation of the challenge, go to http://adventofcode.com/2016/day/8.
Your input (http://adventofcode.com/2016/day/8/input) consists of a series of three basic instructions to control the display of a screen.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : goto to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
Today's challenge on http://adventofcode.com/2016/day/7 is about checking for valid IPv7 addresses with TLS support. (No, it has nothing to do with real ip addresses which are at most ipV6 or real TLS, but just a way to keep you busy coding & hacking!)
The imaginary ipV7 addresses support TLS if they contain an ABBA sequence outside square brackets and no ABBA sequence inside brackets.
I am trying to replace one of our SQL Integration Service jobs with Ensemble and I am running into an issue executing a query against a MS SQL database using JDBC drivers.
My SQL Outbound code looks like this.
Method SelectPaceartCharges(pRequest As osuwmc.Paceart.DataStructures.SelectPaceartBillingExtract, Output pResponse As EnsLib.SQL.
This is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : goto to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t… or look at the http://adventofcode.com/ website.
In today's challenge, you have to find out how many 'valid' triangles you find on the walls of the Easter Bunny HQ.
(you can find the input on the adventofcode website : http://adventofcode.
Advent of Code is a series of programming challenges for beginners and experienced Caché programmers.
For an introduction : look at article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
In this challenge, you need to find a password using instructions to move on a keypad.
Instructions can be U(p), D(own), L(eft) and R(ight).
You start at button 5 on a keypad like
1 2 3
4 5 6
7 8 9
each line of instructions lead to one digit of the password.
Full description can be found at http://adventofcode.
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.)
Advent of Code is created by Eric Wastl, you can find all info on https://adventofcode.com/.
To help you get trained for this year's challenges which start at December 1st, we* will try to solve and comment the puzzles from 2016.
Hi,
I know you're doing a big effort to build a new IDE in Eclipse ecosystem but Visual Studio Code is a new an even better and faster tool for coding... did you have any plans to release any COS extension for it in the near future? There you can already find extensions for all current more common progrmaming languages and it would be great to have COS as one of them.
Thanks
I'm extracting text from HTML (more on how - here), and after I extract text it has two problems:
Here's an example of the text extracted from HTML page:
set text = " "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_" Word1"_$c(10)_" "_$c(10)_" "_$c(10)_" "_$c(10)_"
Example :
set property.Name = element.LocalName
set property.Type = "%Library.String"
set property.Parameters = ???
I have a class. In class there is an index. This index is for quick search on name property.
Class User
{
.....
Property Name as %String;
Index NameInd On Name;
.....
}This class is mapped to some global ^GL(userId) = "Name*other data....****"
And there is also index global ^GLNameIndex(Name, userId) = ""
When I add new User entry through class, f. i.
S user = ##class(User).%New() S user.Name = "Some name" D user.%Save()
calling method %Save() adding new entry to index automatically.
And this way index ^GLNameIndex is
I am trying to read a csv file and transfer it to a XML file without storing the objects to a database I have this code here doing the reading and have another method transferring the object read to a file but the reading one reads fine when it comes to the converting one I run to problems nothing happens any help appreciated
ClassMethod Write(obj, directory As %String = "C:\40_Test\") As %Status
{
set writer=##class(%XML.Writer).%New()
set writer.Indent=1
// set the file
Set filename=directory_"Generatedfile"_".xml"
set status=writer.Hello again and welcome to the next tutorial on this series: Part 4 - Sharing data across router methods. Here we are going to learn how to share a object containing data that is available for read across every router methods.
You're required to complete at least the Part 1 before entering this one. Still, this is supposed to be a really short tutorial, since there isn't much to be said about data sharing.
Hi, Community!
Please welcome a new session recording from Global Summit 2017:
A Mocking Framework: Laugh at Unit Tests
Recently, we scheduled two tasks (1008 and 1009) within Task Manager. Task ID 1008 is set to run after Purge Tasks (%SYS-ID:3), and Task 1009 is set to run at 7:00:00 each day.
In attempt to provide as much detail as possible, each of the tasks are as follows:
WHILE (($p($h,",",2) < $ZTH("10:00 PM")) && ($P($g(^Task.1008(+$h,$j)),"^",1) = +$h)) { J ^ROUTINE, ^ROUTINE2 D SUB^ROUTINE3 H 5 }WHILE (($p($h,",",2) < $ZTH("10:00 PM")) && ($P($g(^Task.Hello again and welcome to the Part 3 - Using the SQL API!
If you have been wondering about how to use SQL along with Frontier, you came to the right place. That's because since Frontier wraps the common Caché SQL API within it's own, you need to use the API provided from it. But you don't need to worry about its learning curve, because the Frontier SQL API is really simple.
If you arrived here without checking the Part 1, I'd recommend you doing so, because Part 1 covers the essential for getting started with Frontier routers.
I have a tablepane which uses Sql to get his data:
As you look at the ''Business" column i have to type a number (key Value) to get the [Fashion Retail] value.
How do I have to modify the Built WHERE clause in order to filter on name /description of the Join Fields instead of the key value? I would like to filter on name/description rather than a key value. Some sample code is appreciated! Thanks in advance.

(Photo by Jeremy Thomas on Unsplash)
Dear Developer Community!
My name is Maks.
I developed DeclarativeCOS framework for declarative programming on COS.
Today I want to ask you about New Programming Language.
I have an idea to create new programming language which could be translated to COS classes / routines or even to int-files.
So, lets suppose it is happened. What do you want to see in such language?
Please feel free to say your minds. It is open discussion.
Currently, we are utilizing batch jobs at the OS level to kick off routines that watch for files. We are trying to convert these processes to be performed by the Task Manager.
The routines have while loops and perform while loops so long as the time parameters are being met.
What's the best way to ensure Task Manager kicks them off after the completion of the shutdown/backup/start process is performed, which we do nightly? I want to ensure that it starts it regardless of the time that we've set.
Hoping someone can help.
I need to convert a timestamp from the following format (YYYYMMDDhhmmss e.g. 20160105125915) to UTC time in the same format.
I presume I need to convert it to the system format ( like $HOROLOG ) and then use something like ConvertTimeStampToHorolog or perhaps LocalWithZTIMEZONEtoUTC but not sure of the syntax.
Thanks,
Conor