Caché

Syndicate content 124 

Mark All as Read

Some may think it's a strange / daft idea, but just today the Raspberry Pi folks have announced that they've now sold more than 10 million of them..and counting.  That's a huge potential marketplace, and a great platform for getting people to hear about Cache and try it out.  Given its focus on the education sector, another great way of getting heard about.

 

Last answer 20 October 2016 Last comment 3 October 2016
+ 5   0 5
1399

views

+ 5

rating

I have a Cache classes with %TimeStamp (e.g. 2016-04-18 12:29:11) and %Date (eg. 64027) properties. And I have a javascript client app, which needs full CRUD over this properties.

But in javascript date/time are defined by ISO8601 (e.g. timestamp 2016-04-18T12:29:11Z, date 2016-04-18).

Last answer 20 April 2016
+ 5   0 3
0

comments

1089

views

+ 5

rating

Let's have a round of CodeGolf!

As usual the goal is to write the shortest solution for a specified problem.

Today we have one of the classics: FizzBuzz.

Write a program that prints the numbers from 1 to 100.

But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.

For numbers which are multiples of both three and five print “FizzBuzz”

Last answer 31 July 2019 Last comment 2 August 2019
+ 4   1 7
237

views

+ 4

rating

After enabling archiving log functions, Oracle can get real-time change data through CDC.

Can Cache database realize such functions?

My requirement is to take incremental data from the cache database regularly every day and synchronize it to other relational databases.

Incremental data can be text files.

Last answer 20 September 2018
+ 3   0 6
387

views

+ 3

rating

Hi Community!

Sometimes I meet a method which accepts 10+ parameters.

And often I need only the 8th parameter  to  pass. And I call the method something like:

do ##class(Some.Feature).Method(,,,,,,,"flag")

And I don't like this method when I call it like this cause, you know, often I just miss the number of commas and raise some other flag I wanted.

How do you avoid this situations? 

If you meet such a code, how do you call it and sure that you didn't miss the number of ","?

What is a good number of parameters in a method and f you need to pass more parameters in a method what do you do?

Last answer 5 May 2019 Last comment 27 August 2019
+ 3   1 12
517

views

+ 3

rating

Hello everyone!

Does anyone know of a library that can be used to create Mock objects for Objectscript classes?

Right now, my team has been building mock objects by hand to help circumvent dependencies when writing and executing unit tests, but I always wondered if someone had ever created a Mock library like Mockito to help quicken the process. 

Thanks!

Last answer 10 October 2017 Last comment 26 August 2019
+ 3   0 4
372

views

+ 3

rating

Hi all!

I'm developing a mini-framework to implement annotations in Cache. I want to support two kind of annotations: metadata and method decorators. I've got stuck trying to implement the second one.

Metadata

With metadata annotations I can add metadata to any kind of target. A target can be a method/classmethod, parameter, property and class.

For example:

Last answer 25 January 2017 Last comment 26 January 2017
+ 3   0 2
468

views

+ 3

rating

I'm finding that in a mobile app setting, that Cache is causing the worst User Experience that I have ever seen in a mobile app - I'm just saying this hoping that someone will be able to help me out, my intent is not to criticise Intersystems.

We have a Xamarin Forms mobile app that consumes web pages that are created by Cache. The app compiles into iPhone, iPad, Android Phone, Android Tablet, UWP (Windows 10, all of phone, tablet, and desktop), as well as MacOS.

Last answer 23 January 2019 Last comment 24 January 2019
0   0 5
207

views

0

rating

It is my understanding that when a routine accesses a global it is temporarily stored in global memory. While the global is within global memory, any other routine would be able to readily access the global from memory and not from disk so long as the same node is being utilized.

Last answer 12 July 2017 Last comment 17 July 2017
+ 2   0 1
204

views

+ 2

rating

Has anyone called any outside Javascript code from inside their class files? I asked a long time ago if there was a way to manipulate an image within Cache Object Script, and since Cache doesn't have any image libraries its not really possible. However I have found Javascript to resize an image and wonder how hard it would be to mesh the two together.

Can anyone share any examples?

Thanks

Scott

Last answer 22 December 2018 Last comment 4 January 2019
+ 2   1 3
553

views

+ 2

rating

Hi, 

Can we create a new class in the studio using any command rather then using the Menu Item Option from Menu Bar in Studio . 

Requirement : Create/Draft a new class and able to extends the other classes using  a command in Cache Class .

In other words , I want to Dig in the Menu Item class from which Menu bar is created in studio and option are provided  Like New..., Open..., etc 

Thanks, 

Ravi 

Last answer 10 October 2018
+ 1   0 1
0

comments

109

views

+ 1

rating

Hi.

It is easy to receive JSON representation or dynamic Array from %ListOfDataTypes:

set l=##class(%ListOfDataTypes).%New()
do l.Insert("a")
do l.Insert("b")
do l.Insert("c")

set arrStr=l.$toJSON()
zwrite arrStr
set arr=l.$compose([])
zwrite arr

How to make backward conversion? How to receive %ListOfDataTypes from dynamic Array an JSON string?

I've tried

Last answer 30 June 2017 Last comment 8 February 2016
+ 2   0 2
782

views

+ 2

rating

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

Last answer 16 October 2017 Last comment 31 October 2017
+ 2   0 1
1005

views

+ 2

rating

Hello everyone,

I have discussed extensively with Andrew Cheshire, the author of the Atelier parser (which I'll be able to hack on and reuse for CachéQuality -- yay!), and while we were at it, we also discussed code coverage.

We ended up talking about the ZBREAK command and its /TRACE option.

Last answer 14 April 2016 Last comment 14 April 2016
+ 2   0 2
251

views

+ 2

rating

This question came on the Ensemble in Healthcare email list. It's a great question. I'm working on an answer, but am posting it here to get any other input. I'll also address the option of using %CSP.REST.

Hello everyone,

 

Last answer 10 May 2016 Last comment 25 March 2016
+ 2   0 2
6912

views

+ 2

rating

I want to override the Get and Set methods of a class property.  The class maps to a pre-existing global. The property is defined like so:

Property Invalid As %Library.Boolean;

with the property mapping to a node like ^GLOBAL(Code,"INVALID")=1
Code is a property in the same class.

The value can be 0 or 1 or the node might not exist. When it doesn't exist I want the value of the SQL field to come out as 0 (false).

Last answer 22 July 2016 Last comment 28 July 2016
+ 2   0 2
840

views

+ 2

rating

I know that Cache files can be stored as XML and UDL based files. Is there any way to determine in which format the file(class, routine, dfi and so on) is stored? Because you can easily name your XML based file as class.cls and it will be perfectly valid. 

I know that one way to check whether this file is in XML format is just try to parse it like 

Set st = ##class(%XML.TextReader).ParseStream(contentStream)

if $$$ISERR(st) return $$$NO

else return $$$YES

However, is there a better way? 

Last answer 30 August 2016 Last comment 30 August 2016
+ 2   0 1
189

views

+ 2

rating