Question
· Mar 8, 2018
Parallel execution in COS

Hello community,

I need to perform some processing-heavy operations on a set of input objects and I would like to utilize more than a single processor core to do the heavy lifting.

Is there any way to call methods in parallel and wait for the results in a blocking way?

Basically, I am looking for an equivalent of the pythonese

with Pool(n) as p:
results = p.map(function, data)

Thanks

Jiri

EDIT: Correct English :)

1 5
0 456

This series of articles aims to address the following topics:

  • Creation of a web application based on REST pages;
  • Overview of some tools for tracing (debugging) HTTP requests;
  • Switching from hyperevents to... hyperevents;
  • Integration with jQuery File Upload;
  • Conversion of JSON from the {id:1,parentId:1} format to the {id:1,children:[{}]} format for tree visualization;
  • Integration with jQuery EasyUI (using datagrid and tree as examples);
  • Other topics.

5 1
1 929

Hi Guys,

Can you please advise on the below queries.

Query 1:

Example 1:

 S a="345",b="arun",c="kumar",d="hi",e="yello",f="orange"

Example 2:

S a="345"

S b="arun"

S c="kumar"

S d="hi"

S e="yello"

S f="orange"

Can you please advise me, which one is performance wise is better.

Query 2:

Example 1:

S:a=1 R="Arun"

Example 2:

I a=2 R="Arun"

Please advise me, which one is giving better performance in this.

0 11
0 949
Set httprequest=##class(%Net.HttpRequest).%New()
	Set httprequest.Server="www.intersystems.com"
	Do httprequest.Get("/")
	Do httprequest.HttpResponse.OutputToDevice()
	Do httprequest.Get("/cache/")
	Do httprequest.HttpResponse.OutputToDevice()

The above is the code which i found in this link http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...

0 5
0 3.2K
Article
· Feb 16, 2018 2m read
Adopted Bitmap

The base class Bmap.Person defines persons within an organization distributed
by various countries. All records are indexed by (Country, PersonalId).
this structure doesn't allow use of bitmaps.

So a wrapper class Bmap.PersonQ around the data eliminates the top level of
the index (Country) and isolates the PersonalId (%Integer, MINVAL=1).
We are ready to use a Bitmap index.

A few performance figures on 300010 generated records.
You see that Relative Cost are sometimes quite misleading.

base

14 0
1 823
Question
· Feb 9, 2018
SQL prepare error

I'm trying to learn how To use SQL in CACHE, so I hope I don't bore you with "Dumb" questions....

I'm getting "ERROR #6022: Gateway failed" message following this line of code.

s sc=gc.Prepare(hstmt,pQuery) 

This line of code comes from an example I found in the documentation. pQuery is the "Select" statement setting up the variables and tables I'm trying to pull information from.

What does that error indicate?

Thank you.

0 5
0 1.1K

Hi Guys,

I would to know, I have a drop down list items in my applications. While, am clicking on the drop down bx, there are few numbers of listed items, while am doing mouse over action, I should display the entire text of selected item from that drop down list box, even am not selecting that item. I would like to know about the what is exact text it contains in Zen framework.

If any lead would be appreciated.

Thank you in advance.

0 13
0 1.1K

I am trying to determine the write-access to a windows-directory, using the method %File.Writeable(). But, this method always returns the boolean "true", even when I have revoked the write-access of Healthshare-user in this directory.

Note:
1) When the same ensemble-service tries to write a file in this directory (which it says is "writeable"), it fails.
2) The method %File.Writeable(...) works perfectly in the case of files.

Any help is appreciated.
Thanks in advance... :-)

1 17
0 856

Hi,

My doubt is about the SQL Query in Caché:

I don't want to take all results from the table and orgainze them manually, for example: I have a table with 50 records, but I only want to select 10 records, being from tenth until the twentieth and this without knowing their IDs.

So, how can I do this, without losing performance, there is any way?

1 8
1 3.1K

What happens if you don't declare a Persistent value when you call ExecuteQuery()? What does Ensemble set as the key value for your query? I have a query that I've executed on SQL Server, and I get 15 rows, but because this is my second time querying the data Ensemble thinks it exists.

The Method in question is SelectProviderClarityAudit. If I call this query multiple times it is not returning the same number of results each time in Ensemble.

0 3
0 433

This is probably a very naive question but :
Is it possible to create a Windows executable file from a Cache MUMPS (COS) routine, such that the routine can be run directly from Windows ?
If so, could some kind soul direct me to a source of information that describes the process.
I am using the free Intersystems Cache installation (CachePCkit V2017.1) on Windows 10 for my own use & personal development.

Thanks

0 13
0 1.3K

Hi All,

I am new to webservice and UPS. I have tried the sample URL's that UPS have given for testing in PHP codes and it works just perfect for me.

But when i try to hit the same URL's in Ensemble. it gives some errors from UPS.

If anyone of you guys here has any knowledge about UPS integration or the webservice please help me. it will be much appreciated and helpful.

The ensemble code that i am trying with is,

0 5
0 1.2K

Hi Everyone,

I am trying to reference a field, however, in our production environment, it can be found in the first second or third iteration. My code was only qualifying on the first iteration. I have been attempting to include all iterations, but I have come up short...below is a snippet of what I am attempting to use. My original code simply had GetValueAt("PID:13.4") but this only referenced the first iteration. Thanks for any thoughts!

0 1
0 244

What is difference between using a command $classmethod rather than just invoking them straight away?

For example if i need to call a class and its method i can just use like

do ##class(circle).radius()

rather than using

do $classmethod("circle",radius)

(I suppose both of them doing the same function i am not aware of it)

Please help me understand what is different and is there any specific usage.

Correct me if i have made mistake.

0 7
0 385

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

Has anyone tried adding syntax highlighting to GitHub for Caché CLS files?

Looking at the list of supported languages and extensions...

https://github.com/github/linguist/blob/master/lib/linguist/languages.yml

It looks like Mumps is supported, and there is also an existing language with a .cls extension, which would account for why I see some very odd highlighting going on with some of my code.

There is a page on contributing a new language here...

1 6
0 408
First-class functionwiki

In computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions (function literals) as well. In languages with first-class functions, the names of functions do not have any special status; they are treated like ordinary variables with a function type.

This post continues the article “Declarative development in Caché”.

[2, 3, 5, 7, 11, 13, 17].forEach(function(i) {
  console.log(i);
});

How to do something like this in Caché using COS?

Below are some exercises on this topic.

2 0
0 396