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 589

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 601
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 322

I need to pass an equivalent of .Net Dictionary<string, int> instance from .Net to Caché. In the application, the Caché .Net provider has been used so far, so we came up with passing it as an instance of array of data types. However, the only way to fill the array we are aware of is to use its Add() method which invokes a call to the server instance method of the array for every key-value pair inserted.

0 1
0 674
Question
· Jun 9, 2016
Beginning Again

I've been in IT since 1986.

I started with Pr1me INFORMATION and Primos on Pr1me hardware.

In the 90s and 00s, I used D3.

I'm giving Caché a try, but I'm kinda having some difficulty getting started.

I've installed Caché on a 64-bit Windows 7 workstation. It was installed under an administrator's account. From a standard users account, I'm trying to access the Management Portal at:

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

0 5
0 357
Question
· Jun 9, 2016
REST Services Cataloging

I've been building up a REST services API, consisting of a dozen or so classes referenced from a Dispatch class, which has route mappings for the first piece of the URI. I'd like to have the Dispatch class be able to output all of the available Services, with some documentation. Is there something like a %Library resource that I could use to pull this information from each of the classes?

Thanks

Chris

0 7
0 800
Article
· Jun 6, 2016 7m read
Language Extensions

This is a posting about a particular feature of Caché which I find useful but is probably not well known or used. I am referring to the feature of Language Extensions.

This feature allows you to extend the commands, special variables and functions available in Caché Object Script with commands, special variables and functions of your own. This functionality also applies to other languages the Caché supports at the server, including Caché Basic and Multivalue Basic.


Why would I need or want to add new commands ?

14 5
4 1.3K

Let's say I open a stream/file.

If it's not in UTF8 i need to call $ZCVT, and if it's already in UTF8, then I don't need to call $ZCVT.

Is there any way to determine character encoding for input stream/file?

0 4
0 2K

Hello

During some consultant activity I did at a client's I have discovered something very interesting. It seems like the current processing cycle as written in ObjectScript has trouble utilizing an SSD-based storage machine with five-digit IOPS.

2 6
0 2.4K

NewBie's Corner Session 6 If and Kill commands

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 the commands.

As in other computer programming languages, the If command is the primary decision makes.

If command with numeric operands

0 0
0 418

I have a ZEN page with buttons, text boxes and a tab group. The tab group contains a single tab which I use to display an image(src). When the user, uses the browser zoom capabilities to reduce or enlarge the image, the other controls are reduced or enlarged as well. How can I reduce or enlarge the tab src alone? Thank you for any and all input.

0 1
0 377
Question
· Jun 1, 2016
Activating an index

I have a production system that has a large dataset of about 2 million rows. I need to create an index on a property but don't want it available to queries until the index is fully populated. Is there a way I can create the indexed, fire off the build, then "activate" the index so queries can use it.

0 3
0 406

I would like to write some code to parse a set of HTML pages from the internet in order to gather information from each web page.

All of the web pages are generated using a template, so the format of each of the web-pages is consistent with one-another and the information that I want to gather is always located in the same logical place within the page.

What is the best way to parse an html page in order to gather information at a specific place?

Can XML XPATH be used here? Does anyone have any examples of parsing HTML content?

2 6
0 1.4K

I need to pass a parameter string that contains slashes to a REST call.

I tried URL encoding, or making URL map to accept query parameter instead of path parameter but apparently we only allow for path parameters.

I can come with several workarounds, but these involve some transformation at client and then on server, but I'd prefer a direct support.

Q1: is there any Cache specific trick to pass slashes in path parameters

Q2: are we going to support query parameters in REST?

something like this would help:

0 18
0 43.7K

Introduction

The field test of Caché 2016.2 has been available for quite some time and I would like to focus on one of the substantial features that is new in this version: the document data model. This model is a natural addition to the multiple ways we support for handling data including Objects, Tables and Multidimensional arrays. It makes the platform more flexible and suitable for even more use cases.

13 12
0 2.6K

Recently I was asked by a customer with this question. In MS SQL Server, there is a function called host_name() that will return the work station name.

Here is how I would do it in Caché :

With default SQL schema name, in my case SQLUser in SQL (which is equivalent as User in Caché class definition), I have a class called User.dummy, I added a classmethod called hostname and expose it as SQL function host_name:

0 4
0 1.3K