can't find .u variables when setting up ticker plant - kdb

I tried to follow what is on github for tick.q and u.q and sym.q.(https://github.com/KxSystems/kdb-tick/tree/master/), but unfortunately I get complaints on the variables below: .u.w, .u.i, .u.L, .u.d .u.tick, etc
where/how can I include these .u variable?

Related

How underscored directories are filtered in Jekyll/Webrick?

Update: Check my answer below.
I just realized that in Jekyll Webrick server, directories starting with underscores(_includes, _layouts etc.) can't be accessed and are not listed when jekyll serve --show-dir-listing option is turned on. I wonder how Jekyll does that, as Webricks shows underscored directories on default. I did a quick search in the source code, I checked lib/jekyll/commands/serve.rb and similar files, but could not find the exact reason. It might be something related to fancy_listing?
Example:
It is there!:
Update: I found the relevant code in jekyll/reader.rb, which has a filter function and it is defined in jekyll/entry_filter.rb! :) Here is the code:
First a regex is defined:
SPECIAL_LEADING_CHAR_REGEX = %r!\A#{Regexp.union([".", "_", "#", "~"])}!o.freeze
Then special?function is defined:
def special?(entry)
SPECIAL_LEADING_CHAR_REGEX.match?(entry) ||
SPECIAL_LEADING_CHAR_REGEX.match?(File.basename(entry))
end
And special?function is used in the filter function to detect and filter those files matching the regex.
And the Readerclass is using this filtering function in various places.
To be honest, I still did not get how jekyll bring those things together but I think I'll try to figure them out myself.

Sparx Enterprise Architect DocumentGenerator does not honour TaggedValues on Stereotype or values from SetProjectConstants and ReplaceField

maybe someone can help me on this. I am trying to generate a document via the DocumentGenerator interface. All in all this works well, except that the DocumentGenerator does not replace the Report Constants with actual values (which are defined on the report package stereotype.
This is the general flow of the document creation code (which generally works):
var gen = Repository.CreateDocumentGenerator();
gen.SetProjectConstant("ReportName", "My Project");
gen.NewDocument(string.Empty);
gen.ReplaceField("ReportName", "My Project");
gen.InsertCoverPageDocument(tags[REPORT_COVERPAGE]);
gen.InsertBreak(DocumentBreak.breakPage);
gen.InsertTOCDocument(tags[REPORT_TOC]);
gen.InsertBreak(DocumentBreak.breakPage);
gen.DocumentPackage((int)nativeId, 0, template);
gen.SaveDocument(fileName, DocumentType.dtDOCX);
I tried ReplaceField and SetProjectConstant both and one at a time before and after calls to NewDocument/InsertCoverPageDocument:
Strangely there is one constant that is being replaced: ReportSummary.
When I run the document generator via "F8" all constants are being replaced correctly.
Other project constants are being replaced correctly.
I can reproduce the behaviour on EA v14.1.1429 and v12.0.1215.
Does someone have a hint for further troubleshooting? Thanks in advance!
========== UPDATE ==========
When I use ReplaceField at the end (before the actual call to SaveDocument the following Report Constants get replaced: {ReportTitle} and {ReportName}
I discovered some workaround: when I manually remove the predefined {Report~} constants from the template and re-add them as Project Constants, their values get replaced correctly.
I will examine this further and give an update as
I did some further investigation on this and came to the following conclusion and workaround (as I have received no comments or answers on this):
I deleted all references to ReportConstants in my EA templates and replaced them by ProjectConstants with the same name.
In my code where I want to generate the documentation I (re)set all ProjectConstants with the actual values via SetProjectConstant and additionally added a call to ReplaceField to replace the constants with the actual values.
The previous mentioned calls are inserted directly before the call to SaveDocument document.
tags.ForEach(t =>
{
if (string.IsNullOrWhiteSpace(t.Key)) return;
generator.SetProjectConstant(t.Key, t.Value);
generator.ReplaceField(t.Key, t.Value);
});
generator.SaveDocument(fileName, DocumentType.dtDOCX);
If someone comes up with a better resonse or explanation for the behaviour I am happy to accept this as answer.
I have also found that when you call ReplaceField on these project constants in a CoverPage template, the formatting defined in the template is overwritten. It seems that some of the SetProjectConstant calls actually set the values as you would expect, and the rest do not.. hence the need to call both sets of APIs.

Snippet with configurable text

I want to make a code snippet where a part of the snippet text is substituted with a value that can be configured by the user.
Following this page I tried using an environment variable like
"${env:MYVALUE}"
and a configuration variable like
"${config:my.value}"
Both the environment variable and the user defined settings exist but they are not substituted. Are these variables not supported in snippets and if not is there some other way?
The variables from documentation mentioned in the question are only used in configuration files. Snippets have their own set of supported variables. Taken from the source these are:
CURRENT_YEAR
CURRENT_YEAR_SHORT
CURRENT_MONTH
CURRENT_DATE
CURRENT_HOUR
CURRENT_MINUTE
CURRENT_SECOND
CURRENT_DAY_NAME
CURRENT_DAY_NAME_SHORT
CURRENT_MONTH_NAME
CURRENT_MONTH_NAME_SHORT
SELECTION
CLIPBOARD
TM_SELECTED_TEXT
TM_CURRENT_LINE
TM_CURRENT_WORD
TM_LINE_INDEX
TM_LINE_NUMBER
TM_FILENAME
TM_FILENAME_BASE
TM_DIRECTORY
TM_FILEPATH
BLOCK_COMMENT_START
BLOCK_COMMENT_END
LINE_COMMENT
WORKSPACE_NAME
Details can be found here.

VSTS: Built in variable for organization name?

In many of the calls described in the Azure DevOps REST API documentation, I need to supply the name of the organization, e.g.:
https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=5.0-preview.8
The project I can get from System.TeamProject. I would have expected something similar for organization name, something like:
System.TeamFoundationCollectionName
This does not seem to be available. I've even printed out all of my environment variables on the agent and don't see anything that fits the need exactly. Sure, I can parse it out of one of the other values, but this seems fragile since MS seems to like to change the format of URLs.
I also can't hard code the organization name because this release definition will live in multiple organizations and we don't want to have to manually update it for each. How are others solving this problem?
Try using System.TeamFoundationServerUri and System.TeamFoundationCollectionUri to build your API requests. They have the organization included in them.
https://learn.microsoft.com/en-us/azure/devops/pipelines/release/variables?view=vsts&tabs=batch
edit: SYSTEM_TEAMFOUNDATIONSERVERURI/BUILD_PROJECTNAME/_apis/release/releases?api-version=5.0-preview.8
It looks like currently there is no such variable for the organization, also, the variables return the old URL (xxx.visualstudio.com) and not the new URL (dev.azure.com/xxx) so if you use the System.TeamFoundationCollectionName the API should work without the {organization}:
https://System.TeamFoundationCollectionName/{project}/_apis/release/releases?api-version=5.0-preview.8.
In Powershell, do this:
# Where SYSTEM_TEAMFOUNDATIONCOLLECTIONURI=https://some_org_name.visualstudio.com/
([System.Uri]$Env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI).Host.split('.')[-3] # returns 'some_org_name'
Now, just assign that to a variable and use it anywhere you like. "SYSTEM_TEAMPROJECT" is the Project Name, so no need to do any parsing there. It is already available.

Jenkins Multi-Configuration Build - How do I specify the value of a multi-configuration axis in Email-Ext (Editable Email Notification)?

I've searched and have not found what content token that I would use to note the value of an axis that is used on a multi-configuration build for the email?
This shows up in the normal email but is a blocker for us getting to the better email notifications?
I will accept that this is in an ENV variable somewhere, but have been unable to locate it yet.
For reference
We'd typically add an axis of a label, slaves or user-defined (image below):
Then we would add values:
Those values show up in the normal email notification (note the >> to signify all axes of the multi-configuration build that passed or failed:
I can not seem to get to them in email. I've tried looking for environment specific values and I've tried ${ruby} as a content token, but have been unable to find any information on this thus far.
This was due to not selecting Trigger for each configuration in the Trigger for matrix jobs. When defining an axis like ruby, one would get ahold of it by ${ruby} or possibly ${ENV,"ruby"}.
Have you tried ${axis}?
Also, looks like env vars for axis config are exposed like this:
https://github.com/jenkinsci/jenkins/pull/701