Hi!

Here is the question in Russian Forum regarding roots extracting.

In Caché ObjectScript we use exponentiation operator (**) to raise an exponent to power. F.e. let's raise 3 to power of 3:

USER> write 3**3 

27

And we use the same operator to extract the root.

USER> write 27**(1/3) 

2.999999999999999963

And 2.999999999999999963 is not 3, obviously.

How to extract roots properly in Caché ObjectScript?

0 5
0 381

NewBie's Corner Session: 9 Documentation and books

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

To access your documentation:

Assuming you have installed Caché, (see NewBie's Corner, Session:1),

Click on the InterSystems cube in the Windows system tray, then choose Documentation.

Or – another method you can use to access your documentation:

Assuming you have installed Caché, (see NewBie's Corner, Session:1),

0 4
0 470

In this article I'll describe how to set up web services and/or REST services using EWD 3.

Since EWD 3 is designed to be modular, you can construct the environment that exactly meets your needs, but for much of the time you'll probably find that the pre-built EWD 3 ewd-xpress super-module does most of what you need because it hooks together all the core EWD 3 and other building-blocks you'll need:

4 1
1 1.3K

A customer is using Caché online backups and needs to automatically purge the cbk files with a scheduled task.

This is a wheel has been reinvented uncountable times already and I know somebody out there has a well written, extremely robust version that has already stood the test of time.

Does anyone have a nice routine/class/task for purging old Caché backup files?

0 10
1 1.5K

Hi -

I'm trying to rewind a cursor back to the first row after looping part of the way through the implied result set, but I'm not finding a way to make this happen, is there some such iterator variable or directive that I can leverage to accomplish this?

I could code around it by pulling identifiers and/or values into a local array, and then hand code up an iterator over my local results copy, but this feels like a "redesigning of a wheel" approach, and I thought I would check before I start down this path.

Thanks

0 2
0 448

Customer is using an ancient MSM based client Workstation for their application and they made a small change to their server code. They introduced property of %Double() and discovered an issue. The MSM workstation is not able to retrieve any property of an object instance that holds value of $double(0). see images illustrating the issue.

I'm posting this to DC intentionally before I eventually send it to WRC so others can comment.

Dan

Image 1 - data

image 2 - UI

0 1
0 488
Article
· Jun 21, 2016 1m read
Simple Cache systemd Unit

Hello

I have noticed that Cache (2016.1 at the time of writing) doesn't come with a systemd startup script for RHEL7.

Here is a small example script I have built.

[Unit]
Description=Intersystems Cache

[Service]
Type=forking
ExecStart=/bin/bash -c '/usr/cachesys/cstart 2>&1 | logger -t cache_start'
ExecStop=/bin/bash -c '/usr/cachesys/cstop quietly 2>&1 | logger -t cache_stop'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

The file should be placed as /usr/lib/systemd/system/cache.service

6 8
0 2.1K

Customer is experimenting with %vid variable for selecting row numbering for sql queries. Basically he's trying to implement paging functionality.

He is confused that select %vid from (select ...) returns dummy number whilst select *,%vid from (select...) returns correct data.

1 4
2 1.7K
Article
· Jun 20, 2016 4m read
NewBie's Corner Session 8 Not

NewBie's Corner Session 8 Not

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out these commands.

NOT operator ('), single quote or apostrophe

The "NOT" operator reverses the truth-value and is intended for numeric operands, however it can be used on alphanumeric operands.

0 9
0 445

Myself and the other Technology Architects often have to explain to customers and vendors Caché IO requirements and the way that Caché applications will use storage systems. The following tables are useful when explaining typical Caché IO profile and requirements for a transactional database application with customers and vendors. The original tables were created by Mark Bolinsky.

In future posts I will be discussing more about storage IO so am also posting these tables now as a reference for those articles.

9 7
2 2.7K

Setting the TZ Environment Variable on Linux

The Update Checklist for v2015.1 recommends setting the TZ environment variable on Linux platforms and points to the manpage for tzset. This is recommended to improve the performance of Cache’s time-related functions. You can find out more about this here:

https://community.intersystems.com/post/linux-tz-environment-variable-not-being-set-and-impact-caché

4 0
0 130.4K

Hello,

I have a question about how to set the value of a radioSet. Yes, I know -- the documentation says that setValue can be used "client side", but gives no example. Plus, I'm trying to set the value of a radioSet in %onAfterCreatePage, which is a Zen method? Server side method? I'm not sure.

In my Zen page I create a radioSet like this:

0 4
0 595
Question
· Jun 15, 2016
Cluster deployment recipes?

Let assume you have a infinitely scaling algorithm implemented in your application, using replication, ECP, or any other means of horizontal scaling, and let assume you know how to run your system under any volume of requests, the trick is to deploy required number of computing nodes in the cluster. If we are talking about cluster of 2-4 nodes your administrator (or as they call it today "devops engineer") will install anything manually. Probably he will easily handle 5 nodes configuration in the cluster.

2 8
0 613
Question
· Jun 15, 2016
Oauth 1.0 library

I am in need of a routine or class method to generate an Oauth 1.0 signature. I was about to code this myself, but thought to check first to see if anyone has already done this and is willing to share.

Thanks in advance for any help.

[UPDATE 06/28/2016]

1 3
0 521
Article
· Jun 15, 2016 1m read
MQTT Client in COS

Hi All,

I've created a sample implementation of the MQTT protocol, which is now available on GitHub.

The project demonstrates MQTT client capabilities and it's written in Caché Object Script.

Any comments, bug reports are welcome! Some more enhancements (like SSL / TLS support) are planned for the near future.

4 0
0 588

Hello WRC.

Is possible to obtain a node-cache modul for the nodeJS ver.4.4.4. and actual Caché 2015... ?

And what is the expected outlook of this.

A note about this new portal: If I put into "search box" some text with dot like .js or .css ( for example: test.js ) , I obtaint error page. Try it.

Of course, this "Developer Community" is nice, the right way.

Nice day for all, Jan Krestyn

0 3
0 462
Question
· Jun 14, 2016
Get variables list

Hello!

In Caché there is a way to print all current variables using write command without arguments:

USER>set Einstein = 1879
USER>set Mozart = 1756
USER>write
Einstein=1879
Mozart=1756

But is there a way to get a list of this variables? I am looking for something that would return value like $LB("Einstein", "Mozart") for this case.

Thanks!

2 16
0 1.5K
Article
· Jun 13, 2016 1m read
Debug: using locks for breakpoints

Hi, Community!

Want to share with you one debugging approach from the Russian forum.

Suppose I want to debug the application and I want it to stop the execution on a particular line.

I add in code this line:

l +d,-d

When I want to start debugging in this line I block d in terminal

USER> l +d

And execute the app.

The app stops on this line and lets me connect to it with Studio debugger.

0 8
1 600
Article
· Jun 11, 2016 2m read
NewBie's Corner Session 7 True and False

NewBie's Corner Session 7 True and False

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out these commands.

In COS, a 0 is false and any other number (positive or negative) is true.

0 0
0 319