#Caché

1 Follower · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Article Danny Wijnschenk · Nov 10, 2017 4m read

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.

The input contain instructions that can be something like this :

value 5 goes to bot 2
bot 2 gives low to bot 1 and high to bot 0
value 3 goes to bot 1
bot 1 gives low to output 1 and high to bot 0
bot 0 gives low to output 2 and high to output 0
value 2 goes to bot 2
1
0 423
Article Danny Wijnschenk · Nov 9, 2017 4m read

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 :

3
0 627
Question Romero Terrones Esteve · Nov 10, 2017

Hello All,

what is the best method for search a portion of text in a non-indexed global?

I need to implement an autocomplete kind of search, in a global of >1M registers (text type, not $lb)

Maybe the best way would be use a SQL mapped class, with 'Bitmap' indexes?

Thanks in advance!

4
0 528
Question Sébastien Demoustiez · Nov 10, 2017

Hello,

Sorry for my epic english :(

I have a strange issue.

I have generated an encryption key with the tool (UI.Portal.EncryptionCreate.zen).

Then  I activate my key for data encryption (UI.Portal.EncryptionManaged) and encryption work fine.

But when I reboot my server the key is removed from the data encryption key list (UI.Portal.EncryptionManaged) and I have to re-activate the key.

Perhaps somebody have an idee ?

Cache version : Cache for Windows (x86-64) 2016.2.2 (Build 853U)

Windows: Windows Server 2012 R2 Standard

Thanks

Sébastien

2
0 414
Question Laura Cavanaugh · Feb 8, 2017

Hi all, This is a bit embarrassing, and not that critical.  I have a local instance of Caché 2016 on my computer, for playing around with.  I was attempting to set up two-factor authentication on this instance, and I thought I simply disabled all users except for my own user and enabled two-factor for this user.  The next time I tried to login to the Management portal, I received a Server Availability Error:

http://localhost:57772/csp/sys/UtilHome.csp

Caché Server Pages Version 2016.1.1.107.0

Server Availability Error

Server is currently unavailable

9
0 2688
Article Danny Wijnschenk · Nov 4, 2017 6m read

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.


For example : 
aaaaa-bbb-z-y-x-123[abxyz] is a real name because the most common 5 leters are a,b,x,y,z (sorted by numer of occurences and alphabetically)

1
0 531
Article Danny Wijnschenk · Nov 5, 2017 4m read

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).

1
0 497
Article Danny Wijnschenk · Nov 6, 2017 3m read

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.

1
0 451
Question Soufiane Amroun · Nov 3, 2017

Hi, team

i configure my authorization server and client and i want define access rights  for different users , how can i do it?

knowing that  we have our own database with different users ID and access privilege ?

is there any one who can help us? thank's

1
0 310
Article Danny Wijnschenk · Nov 8, 2017 3m read

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.

1
0 311
Article Danny Wijnschenk · Nov 7, 2017 5m read

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!)

2
0 463
Edit
Question Pravin Barton · Nov 7, 2017

Hello,

I have some code that reads an %XML.DataSet object that gets returned from a web service. I'd like to unit test this code by importing an XML data set from a test file. How can I do this?

I created the test file by calling WriteXML on the data set, and copying the output into the file:

do result.WriteXML(,,,,,1)

I tried to import the file using the XML reader, but the resulting data set doesn't have any rows:

0
0 0
Question Teresa Toler · Nov 7, 2017

I am a newbie to Cache and we are using dBeaver product to query against Cache tables. I have the following query which does a GROUP BY to aggregate the columns:

SELECT PtNumber,cpt4_OVR,CollDateODBC, COUNT(*)
FROM site.MGBILL_View 
  WHERE cpt4_OVR IN ('36415', '36416')
     --AND ChargeFlags = '0'
       AND CollDateODBC > DATEADD(DAY,-45,CURRENT_DATE)
  GROUP BY PtNumber,cpt4_OVR, CollDateODBC
  HAVING count(*) > 2

-This returns a count of 3 for each patient (aggregated)

2
0 1150
Question Richard Housham · Apr 24, 2017

Hi I've created a word macro in order to convert doc to txt via the command line, this works fine via the command line by myself or another user but when I try as an the intersystems user which runs under  LocalSystem it doesn't work. 

So can I change the user, or set the $ZF to run as a different user?

Or do I have to try another way to convert doc to txt - it's looking like libreOffice?

I just wanted to stick with word because I could be guaranteed on the result being accurate.

Thanks

Regards

Richard

11
0 1385
Article Sean Connelly · Aug 21, 2017 3m read

If you want to dynamically serve images as a property of JSON then there is no perfect encoding solution. One method used frequently is to Base64 encode the image. Whilst there are some negatives to doing this, such as data inflation, there are some positives to working with Base64 images inside the browser.

Let's say you have an image placeholder on a web page...

<div id="image-container"><div>


And you fetch a JSON message from the Caché server containing the image as one of its properties...

var msg = JSON.parse(client.responseText);
4
1 1883
Question Alex Goncharov · Nov 6, 2017

Hello, evrybody, I'm writing one project using CSP("OnPreHTTP"), and also REST angular. At the beginning I wrote purely on csp, then I decided to use angular for the flexibility of the client part. Now I can not design logging, I created a table App.Log with properties

3
0 670
Question Victor Tamotsu · Nov 5, 2017

I work in a small development company that uses Caché as a database. In some support cases I have doubts about whether the client's infrastructure environment is not affecting Caché's response time. Reading a bit about comparing installations in different environments, both in production as testing and homologation environments , I understood that the TPC-E is a benchmarking method accepted in the market.I'm reading the specifications of the TPC-E and I wonder if anyone has implemented or seen something similar in Caché. Does it make sense to think about using this type of test to understand

4
0 426
Question Laura Cavanaugh · Nov 3, 2017

Hello; We are managing several Ensemble instances on several servers.  One server has 4 instances, and two other servers have one instance each (those are production servers).  We encrypt all instances using the Caché encryption in the management portal.

Currently we are using two different encryption keys: 1 key on the server with 4 instances, which is used for all 4 instances, and a second key on single-instance server. ( I'm installing the newest production server now.)

What I'd like to know is what are the best practices for managing encryption keys for separate servers. 

1
0 734
Question CJ H · Nov 5, 2017

I get two methods below: I would run both methods concurrently.

However, the "testRead" would always read the uncommitted results from "testInsert".

Anyway to avoid that? Thanks.

ClassMethod testInsert()
{
  &sql(START TRANSACTION ISOLATION LEVEL READ COMMITTED, READ WRITE)
  &sql(insert into Test.Table(AttrA,AttrB,AttrC,AttrD) values(1,2,3,4))
  hang 15
  &sql(ROLLBACK)
}

ClassMethod testRead()
{
  &sql(START TRANSACTION ISOLATION LEVEL READ COMMITTED)
  &sql(select count(*) into :ans from Test.Table)
  &sql(COMMIT)
  w !,ans
}
5
0 751
Question Gerry Connolly · Oct 31, 2017

Is it possible to make the cache terminal available over a mirrored vip address for a healthshare mirrored environment? So that connecting to a terminal for a mirrored environment will always connect to the Live Node?

I'm looking to write a Powershell script to run against the system and need to connect to the Live Node in a mirrored setup. Is this possible or am I going to have to log onto each node to establish which is Live.  Or does this even matter?

4
0 539
Article Danny Wijnschenk · Nov 3, 2017 4m read

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.com/2016/day/3/input)

A sample of the input looks like this :

3
0 667
Article Danny Wijnschenk · Nov 2, 2017 4m read

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.com/2016/day/2

0
0 397