How to specify options to Custom Formatter in Accumulo - accumulo

I am planning to use same formatter for different accumulo tables with one configurable option.
Is it possible to provide options to Custom Formatter in accumulo? I tried using OptionDescriber but it seems that OptionDescriber gets invoked only during setiterator command.
Or at least is there any way to get current table properties (on which table the custom fomatter is set). I mean if the formatter was set on TABLE_A, then formatter code should be able to load all the table properties during initialization. So that I can set the required properties to table using "config" and the custom formatter can access them.

There is currently no way to set options directly on the formatter in the shell. If your custom formatter needs to accept options, you'll have to write your formatter so that it accepts options outside of Accumulo, for example by reading java system properties you set in the environment, or by reading a configuration file stored locally on your system.

Related

Typo3 9 RTE CK_Editor 4 data-attribute in span removed after saving

I tried to save data-attribute inside a span tag. After saving it`s removed.
I tried the following configurations in my custom yaml file.
processing.allowAttributes:
-'span[data]'
processing.allowTags:
-span
editor.config.extraAllowedContent: "*(*)[data-*]"
Nothing helped.
Where is the problem?
To allow saving data attributes to db from RTE fields, you need to ensure that:
1) RTE (CKEditor) will not strip the attributes. This is configurable using extraAllowedContent. Below is an example how to allow id attributes additionally to the default rule which allows data attributes and classes.
editor:
config:
extraAllowedContent:
- "*(*)[data-*]"
- "*[id]"
If you only need to add data attributes, you don't need the configuration above and can relay on default configuration (from rte_ckeditor/Configuration/RTE/Editor/Base.yaml), as data attributes are allowed by default there.
2) then you need to configure PHP side of things - data transformation which happens before data is saved to db. See manual chapter: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Rte/Transformations/Process.html#transformations-process
Below is an example (taken from RTE yaml preset) of allowing data-abc attribute in transformation (in addition to attributes which are allowed by default).
processing:
allowAttributes: [class, id, title, dir, lang, xml:lang, itemscope, itemtype, itemprop, data-abc]
So in your case you were missing proper allowAttributes configuration.

how do i correctly set up a parameterized information link in spotfire?

Also posted on super users:
I'm a spotfire novice trying to create a parameterized info link. Ultimate goal is to create a default template that may be customized to return specific rows in a very large table. I've not been able to cobble together enough information from online searches to get me from point A to Z.
Spotfire version is 7.11 on an Oracle 11.2 SE DB.
Currently I've got a date/time prompt in the info link that will be global to all users. What I need is to be able to further filter to 1 of 2 columns (one is real, the other a string) in order to minimize loading times. There are 17 other on-demand tables that are related to the main one. Limiting the initial query will greatly speed up performance.
In information designer for the information link, if I edit the SQL in the WHERE and explicitly define the value or string for the column, I get the rows I want. When I try to define it using an input parameter (?ParamName), I either get nothing when I reload or get asked to input a parameter "for testing".
Q1: In the document properties for the analysis, I've been adding in properties that I assume is supposed to get picked up by the query.
- What part do scripts play in passing this variable to the SQL?
- Do I just need to define a value for a property name or include a IronPython script? - If script is required, can I just define the parameter to pass?
Q2: In the info link SQL, what is the correct syntax for defining the parameter variable depending on the type (real v string)? If I use a string, I need to include LIKE in order to pick up the desired rows. If I use a real, is it possible to define it as a list of values?
Thanks in advance.
Though not exactly clear from your description, I think you should be able to accomplish your goals using the "Load on demand" dialog that is accessed either when you add your data table to your analysis, or subsequently using the Data Table Properties>Type of Data>Settings dialog.
Spotfire uses this dialog to dynamically modify your SQL. Thus, you do not need to explicitly include the LIKE statement in your SQL. Spotfire will add it in based on what you define in the On-Demand settings. For example, you could have an Input Field where you type a constraint that will be stored as a Document Property and then refer to that Document Property in your On-Demand settings to control the table loading.

Can custom settings be "passed into" a Contentful UI extension assignment?

Is it possible to pass data into UI extensions assignments (meaning UI Extension X assigned to Field Y), in order to alter their functionality slightly for different situations, without having to reimplement the entire extension?
For example, CodeMirror is a really neat embedded editor, but it has a bunch of "modes," depending on what language you're working with. If we could even pass in a string to represent the desired mode when the extension is assigned to a field, that would remove the need to do a different extension just to use different syntax highlighting.
With this, there could now be a generic "CodeMirror Editor" UI extension which is then just configured a runtime.
On the other end of the extreme, we could specify entire JSON objects when the extension is assigned to a field, to further specify configuration options.
This would make UI extensions so much more...useful. Does this functionality exist now, or is there some way to reasonably make it work? Is there some place on the field specification where I can "park" a JSON string, then access it from inside the extension?
Contentful has launched something called "Configuration parameters" for UI extensions that could be used to solve this issue.
They have two types of parameters, installation and instance parameters. Installation parameters are set when installing the UI extension, and instance parameters are set when configuring a field on a content type to use the extension. The latter would be perfect for your use case.
To use this feature you need to:
Create a parameter definition for the UI extension in the extension.json file. E.g. a new instance parameter called "codeMirrorSettings" of type Symbol with name "CodeMirror Settings".
Within the extension, fetch the current parameters using extensionsApi.parameters.instance.codeMirrorSettings.
Documentation for configuration parameters can be found in Contentful's docs:
https://www.contentful.com/developers/docs/references/content-management-api/#/reference/ui-extensions/configuration-parameters
https://github.com/contentful/ui-extensions-sdk/blob/master/docs/ui-extensions-sdk-frontend.md#extensionparameters
What you could do is just read this setting from another field, be that a string or a json object.
For example the slug generator automatically generates its value from the title field.
You could perhaps do something like this:
const cfExt = window.contentfulExtension || window.contentfulWidget
cfExt.init(api => {
var langField = api.entry.fields.mirrorLang || 'default'
//Rest of implementation
})
Well, I wrote something for this, specific to my situation, but generalizable to others. This is an example if a UI extension that retrieves settings from another entry in the space, and uses it to dynamically configure itself.
https://github.com/deanebarker/contentful-code-editor

Coded ui- How to update properties of object in UImap.uitest file which has changed in application?

Coded ui- How to update properties of object in UImap.uitest file which has changed in application? for example a window which has version of software changes with every build. The issue is if I try to record anything on new version of software it creates new objects in UImap and the whole object tree again. This makes UImap too huge adding duplicates of objects with slightly different property.
You don't want to update the properties to latest, but make the property values dynamic. Just updating the properties will mean more work the next time your code changes.
Also, try to only use properties to search on that do not change between application runs/versions. Example, a class property will likely remain static between runs, while the title of your parent window may change based on the version number. Check out this article to see how to modify the recording's search properties to fit your needs, specifically the section on modifying UI action properties.
Another method to look into would be to create the objects and methods yourself using C#. By adding controls yourself to the uimap.cs partial class of the .uitest, you have can specify at design time what properties and values that Coded UI uses to execute your tests.

JsConfig.BeginScope and custom type serializer

JsConfig.BeginScope allows me to customize serialization for specific operation without affecting global config. However, how do I provide custom SerializeFn for specific type for the duration of the scope? It seems JsConfig< T > is always static and ignores the scope completely?
Configuration on JsConfig<T> is only configurable statically and is not an available option on JsConfigScope.

Resources