Trying to use
TRANS(SPEC.ORDR,#ID:"*":#RECORD<27,#CNT>,27,'X')
Universe is returning an error message on #CNT, assuming not used in our Universe flavour, anyone know what the actual trans code would be?
I just realized that the CATS is base so this should work for you. A similarly built I-Descriptor on my system certainly does the concatenation correctly, but I don't have an easy to find example to test the TRANS on top. It does bring back the expected number of blanks based the on the 'X'.
TRANS(SPEC.ORDR,SUBR('-CATS',REUSE(#ID:'*'),#RECORD<27>),27,'X')
Good luck
Related
I am trying edit the calculation field and pull in filenames that contain the string 'NDA.' However, filenames that contain 'STANDARD' also get pulled in error. Is there a way to do this in Tableau? I have tried the follow but it becomes too restrictive and the majority of files I'd expect to pull don't get pulled no more.
IF REGEXP_MATCH(UPPER([Name]),'_NDA|NDA_|_NDA_|NDA<>STANDARD')THEN "Nondisclosure Agreement"
You can try creating it as a separate IF statement:
IF REGEXP_MATCH(UPPER([Name]),'STANDARD') THEN "Whatever you want here"
ELSE IF REGEXP_MATCH(UPPER([Name]),'_NDA|NDA_|_NDA_')THEN "Nondisclosure Agreement"
On an unrelated note, you should think about using Contains instead of Regexp_match, since its usally better from a performance point of view.
I'm using this x-editable plugin (https://vitalets.github.io/x-editable/demo-bs3.html) and specifically the "Custom input, several fields" located towards the bottom of the demo.
First, everything is working just fine on the implementation but I'm struggling with how to save the submitted data (see screen shot below further down). I don't know how to reference value[address1] in my sql statement without Lucee thinking its a structure (I hope that makes sense in what I'm trying to say here). When I try to reference the variable reports via writeDump(form.value[address1]), Lucee provides me the following error:
key [value] doesn't exist
How do I reference form fields in the image? Should I change how the data is being submitted perhaps using jQuery's serialize() method?
It was much easier than I thought. I didn't even know you could do this!
local.address1 = form['value[address1]'];
Thanks to the comment made by #Matt-Busche in the SO question, ColdFusion Variable Name with brackets.
I am wondering to know why pre-trained 'fasttext model' with wiki(Korean) seems not to work well! :(
model = fasttext.load_model("./fasttext/wiki.ko.bin")
model.cosine_similarity("테스트 테스트 이건 테스트 문장", "지금 아무 관계 없는 글 정말로 정말로")
(in english)
model.cosine_similarity("test test this is test sentence", "now not all relative docs really really ")
0.99....??
Those sentence is not at all relative as meaning. Therefore I think that cosine-similarity must be lower. However It was 0.997383...
Is it impossive to compare lone sentents with fasttext?
So Is it only way to use doc2vec?
Which 'fasttext' code package are you using?
Are you sure its cosine_similarity() is designed to take such raw strings, and automatically tokenize/combine the words of each example to give sentence-level similarities? (Is that capability implied by its documentation or illustrative examples? Or perhaps does it expected pre-tokenized lists of words?)
Would anyone know of a way to dynamically increment an integer for item titles? This is mainly to avoid having to change every step number in the event that a new step would need to be added/removed somewhere in the middle of a ton of steps. Below is a small three-step procedure to give you a rough idea of the template structure:
=step_wash 1. Wash
<p>Add washing steps here</p>
=cut
# Throw some perl code here to wash stuff
=step_dry 2. Dry
<p>Add drying steps here</p>
=cut
# Throw some perl code here to dry things
=step_fold 3. Fold
<p>Add folding steps here</p>
=cut
# Fold all of the things Perl!
Disregarding the item names and structure of this, the goal is to try and eliminate the use of statically numbering the title of each item. I am wondering if there is a possible way to generate an integer that increments; pretty much like replacing 1, 2, 3, etc with something like { print $i++ } instead.. but in POD.
POD is pretty Plain and doesn't do that sort of thing.
An extension of POD called PseudoPod in theory does (see https://metacpan.org/pod/distribution/Pod-PseudoPod/lib/Pod/PseudoPod/Tutorial.pod#Lists) but when I tried it it gave an error.
There is nothing built into POD that allows doing automatic numbering.
I see that you are using custom POD regions which encompass HTML markup, your POD also doesn't look like normal documentation. If you are trying to do Literate Programming, there should exist systems that don't require you to write POD. If this is just normal documentation, you should probably remove the HTML, as docs are often viewed via perldoc – on the command line.
Sometimes it isn't neccessary to use numbering at all. Bullet points • are pretty as well.
i'm developing a site that must be as accessible as possible. While assigning the accesskeys to my form fields with
widget=FieldWidget(attrs={'accesskey':'A'})
i found out that the w3c validator won't validate an xhtml strict page with an accesskey in a select tag. Anyway i couldn't find a way to assign an accesskey to the label related to the select field (the right way to make the select accessible). Is there a way to do so?
Thanks
Interesting question. HTML 4.01 also prohibits accesskey in a select.
I believe the Short Answer is: Not in standard Django.
Much longer answer: I looked at the code in django/forms/fields.py and .../widgets.py and the label is handled strictly as a string (forced to smart_unicode()). Four possible solutions come to mind, the first three are not pretty:
Ignore the validation failure. I hate doing this, but sometimes it's a necessary kludge. Most browsers are much looser than the DTDs in what they allow. If you can get the accesskey to work even when it's technically in the wrong place, that might be the simplest way to go.
Catch the output of the template and do some sort of ugly search-and-replace. (Blech!)
Add new functionality to the widgets/forms code by MonkeyPatching it. MonkeyPatch django.forms.fields.Field to catch and save a new arg (label_attrs?). MonkeyPatch the label_tag() method of forms.forms.BoundField to deal with the new widget.label_attrs value.
I'm deliberately not going to give more details on this. If you understand the code well enough to MonkeyPatch it, then you are smart enough to know the dangers inherent in doing this.
Make the same functional changes as #3, but do it as a submitted patch to the Django code base. This is the best long-term answer for everyone, but it's also the most work for you.
Update: Yoni Samlan's link to a custom filter (http://www.djangosnippets.org/snippets/693/) works if you are generating the <label> tag yourself. My answers are directed toward still using the full power of Forms but trying to tweak the resultant <label>.