Hyperledger Composer "FROM" query language - hyperledger-composer

The documentation for Query language (https://hyperledger.github.io/composer/reference/query-language.html) mentions the keyword FROM.
Is there an example on how/when to use FROM?

The FROM keyword allows the query to reference resources stored in a custom registry. By default assets of a given type are stored in a registry named with the same name as the fully qualified type name. Using FROM allows the developer to override this default behaviour.
For example, an application developer could choose to store some car assets in a registry called ImportedCars, separate from other cars.

Related

Cognos session parameters usage

I have setup LDAP authentication and set up "custom properties" in cognos configuration to get a attribute i have defined in the LDAP entry.
For example this custom property is called ORG_NAME, how do i use this ORG_NAME in report studio as a parameter to filter on? I have seen online about mapping with Framework manager.. however the particular reports i am using access the database directly and DO NOT have a framework manager package associated with them, so i need to use the ORG_NAME without using FM....
You can use the same syntax you would use in FM. So, for example:
#sq($account.personalInfo.givenName)#
will return the first name, and so on.
If you feel some burning need to for user-written SQL, instead of using FM, you can include the macro as a query item in your "outer" query (that gets the results from your sql query, Query2 in the image below).

Output all language strings in Revel?

I'm developing an API Server in Go and the server (at the moment) handles all translations for clients. When an API client fetches particular data it also asks for the translations that are available for the given section.
Ideally I want to have the following folder structure:
/messages
/home.en
/home.fr
/home.sv
/news.en
/news.fr
/news.sv
Where news and home are distinct modules.
Now the question I have for Revel is is it possible to fetch ALL language strings for a given module and given locale? For example pull all home strings for en-US.
EDIT:
I would like the output (something I can return to the client) a key:value string of translations.
Any guidance would be appreciated.
It seems to me that revel uses messaged based translation (just like gettext does), so you need
the original string to get the translation. These strings are stored in Config objects,
which are themselves stored in messages of i18n.go, sorted by language.
As you can see, this mapping is not exported, so you can't access it. The best way
to fix this is to write a function for what you want (getting the config by supplying a language)
or exporting one of the existing functions and create a pull request for revel.
You may workaround this by copying the code of loadMessageFile or by forking your version
of revel and exporting loadMessageFile or parseMessagesFile. This also is a great opportunity
to create a pull request.
Note that the localizations are stored in a INI file format parsed by robfig/config,
so manually parsing is also an option (although not recommended).

get apex package prefix name?

is there a way to get the prefix name of a managed package in apex?
I have a SOSL query but the app is in a developer org and in a managed package, if I have a way to get the package name, it would be great, because I don't have to hard code it.
Thanks.
The only way to do this, AFAIK, is to use the Metadata API. You can call describeMetadata() and then evaluate the organizationNamespace (String) value returned in describeMetadataResult.
From within Apex you could do a less elegant try/catch approach with dynamic SOQL/DML, at least to determine if something you suspect is there is actually there. Though this won't tell you what namespace prefix actually IS there like the Metadata API will.
Lacey is correct that you don't need the prefix, though name ambiguity can become a problem. So for example, if you have a custom object Expense__c and have installed an accounting package which includes ACCT__Expense__c, you definitely want to explicitly include the ACCT__ prefix if intending to access the managed package object as opposed to your own.
The UserInfo.isCurrentUserLicensed('nsPrefix') will throw a TypeException if the namespace passed in is not a valid namespace of an installed package (or managed package you're developing). I think this is the closest you're going to get without the metadata API.

How can I dynamically specify default value for DocbaseAttribute in DocbaseAttributeList in EMC Documentum WDK web application?

I have docbaseattributelist on a page containing docbaseattributes. How can i dynamically (from inside of my web application) set default value for certain docbaseattribute of this list in EMC Documentum WDK application?
Depends,
if it is during import, then you can set a list of default values for the docbaseattribute controls via the Import component
in other cases you will need to extend the source docbaseattribute and when that value changes update the target docbaseattribute. Use an IVisitor to locate the target docbaseattribute, for example see how FindDirtyAttributeValue is used by the saving code

SPMetal: How to override it to use internal name instead of “Display Name”

So I am using SPmetal tool to generate data classes to use LINQ to SharePoint.
A feature of the tool is aliasing the site column by its Display name.
How can I override SPMetal setting to use Internal name or static name?
You can use parameters.xml for overridde column name.
http://msdn.microsoft.com/en-us/library/ee535056(v=office.14).aspx

Resources