How to force djCurrencyTextBox to show currency symbol in read mode? - dojo

It is shown when the document is in edit mode. Setting constraints symbol="$" doesn't help.
<xe:djCurrencyTextBox id="budget" value="#{document1.budget}" defaultValue="0">
<xe:this.constraints>
<xe:djNumberConstraints
currency="USD" type="currency" fractional="false">
</xe:djNumberConstraints>
</xe:this.constraints>
<xp:this.converter>
<xp:convertNumber></xp:convertNumber>
</xp:this.converter>
</xe:djCurrencyTextBox>

Add parameter showReadonlyAsDisabled="true" to your djCurrencyTextBox control:
<xe:djCurrencyTextBox
id="budget"
value="#{document1.budget}"
defaultValue="0"
showReadonlyAsDisabled="true">
It will show your currency value with "$" symbol in read mode.

Related

SetAPStringValue fails to set AP value for annotation

I'm using pdfium library to implement a UWP pdf viewer to view & annotate pdf documents.
I'm trying to set the AP of an annotation using SetAPStringValue method. But it always returns false, I can't figure out what's wrong there, Could someone help me on this please?
It is possible to set the AP to a null value always.
This is the AP I'm trying to set, Is there anything wrong with this value?
0 0.666672 0.800003 RG\r\n8 w\r\n1 J\r\n212.968 508.014 m\r\n212.968 504.9358 214.6739 502.1574 214.668 499.017 c\r\n214.6547 491.9495 212.5402 484.6869 211.076 477.821 c\r\n210.0284 472.9084 208.7786 468.0123 208.137 463.024 c\r\n208.0518 462.3612 207.356 459.7253 208.964 459.875 c\r\n213.5747 460.3044 219.8137 467.0719 223.299 469.701 c\r\n237.2607 480.2329 250.7885 491.2484 264.405 502.218 c\r\n268.4264 505.4576 272.3506 508.8012 276.312 512.112 c\r\n276.7569 512.4838 278.6922 514.3737 279.692 514.422 c\r\n282.4142 514.5536 281.4551 503.5199 281.455 502.658 c\r\n281.454 490.1216 281.1169 477.5842 281.018 465.048 c\r\n281.0128 464.3856 280.2306 456.1341 281.317 455.688 c\r\n282.5744 455.1717 285.308 456.9032 285.826 457.248 c\r\n290.2267 460.177 293.8474 464.3806 297.173 468.424 c\r\n306.4158 479.6619 314.0752 492.1592 323.835 502.989 c\r\n328.4252 508.0824 335.0986 516.2838 341.875 518.736 c\r\n345.0803 519.8959 342.9341 507.3706 342.716 505.824 c\r\n342.3412 503.1659 342.5182 504.5981 342.22 502.051 c\r\n342.1545 501.4919 341.7112 499.8896 341.991 500.378 c\r\n346.9278 508.9975 351.6264 517.5739 357.18 525.9 c\r\n358.8962 528.473 362.074 534.9524 365.907 535.166 c\r\n369.1411 535.3463 370.1482 527.8484 370.606 525.934 c\r\n372.8778 516.4341 376.1095 505.7724 384.086 499.386 c\r\n395.6985 490.0885 415.9169 503.0661 426.441 508.202 c\r\nS\r\n
Are there any constraints which I should be aware of on this process?
Thanks

Typo3 GP variables in TSSETUP

I use typo3 7.6.10
I learn how get a url variable and store it in other variable for fluid in TSSETUP:
lib.pippomio = TEXT
lib.pippomio.data = GP:cat
example url: index.php?id=10&cat=pino
I print the variable in my template:
<f:cObject typoscriptObjectPath="lib.pippomio" />
Ok it works.
Now i need to print the variable in input by Search Indexed Engine:
<input class="tx-indexedsearch-searchbox-sword" id="tx-indexedsearch-searchbox-sword" type="text" name="tx_indexedsearch_pi2[search][sword]" value="progetto">
How can i store in lib.pippomio the POST Variable "tx_indexedsearch_pi2[search][sword]" ???
I tried
lib.pippomio.data = GP:tx_indexedsearch_pi2[search][sword]
But it doesn't works.
I want to print the word searched in an other place.
You can use a pipe "|" to get it
lib.pippomio.data = GP:tx_indexedsearch_pi2|search|sword
TYPOSCRIPT Reference => getText

Problems with multiline extension in nxlog

I have following logformat:
-- New Entry -------------------------
08:03:10 01.04.15 ncjhdnbchjbdc
08:03:10 jnkjsdncksjdnc
xd1: ndkjewnckjdwcndw
xd2: jncxkjdsnkjcndsqckjnc c cw djkcdnc cnd kj nc
08:03:10 dscsdcdsc
-- New Entry -------------------------
08:03:10 01.04.15 ncjhdnbchjbdc
08:03:10 jnkjsdncksjdnc
xd1: ndkjewnckjdwcndw
xd2: jncxkjdsnkjcndsqckjnc c cw djkcdnc cnd kj nc
08:03:10 dscsdcdsc
I want the complete entry in one line so i use the multiline extension:
<Extension multiline>
Module xm_multiline
HeaderLine /^--/
EndLine " "
</Extension>
<Input in>
Module im_file
File "input.txt"
SavePos TRUE
ReadFromLast TRUE
InputType multiline
Exec if $raw_event !~ /^--/ drop();
Exec $raw_event = replace($raw_event, "\r\n", ";");
</Input>
<Output out>
Module om_file
File "output.txt"
</Output>
<Route 1>
Path in => out
</Route>
The multiline extension works as expected for existing entries in the inputfile after start of nxlog. New entries are not correctly written in the output. Only the header will be written in the output.
Has someone an idea of what iam doing wrong?
UPDATE:
The PollInterval of the im_file seems to be the problem. I red following in the documentation of nxlog (section xm_multiline):
Note Until there is a new header read, the previous message is stored in the buffers because the module does not know where the
message ends. The im_file module will forcibly flush this buffer after
the configured PollInterval timeout. If this behaviour is
unacceptable, consider using some kind of an encapsulation method
(JSON, XML, RFC5425, etc) or use an end marker with EndLine if
possible.
So, i use an end marker but it doesn't work. I tried different values for EndLine (regex: /^\s*$/ String: " ")
This line needs to be fixed.
Exec if $raw_event !~ /^--/ drop()
Should be
Exec if $raw_event =~ /^--/ drop()

Yii and PHP Gettext

I want to make my yii app multilanguage. To do this I want to use gettext (because its much simpler than yii messages).
To this I used this yii extension, I configured the PO files, I made the translations, etc.
The big problem: nothing happened. Nothing was translated.
I can advice you this awesome multilanguage extension!
http://www.yiiframework.com/extension/tstranslation/
To use gettext without any extension follow those steps. In config/main.php set yout target language like this:
'language' = 'ru',
Set messages component to use CGettextMessageSource:
'messages' => array(
'class' => 'CGettextMessageSource',
),
Create messages.po file in protected/messages/ru folder (note: folder name is same as language code). If poedit is used messages.po file must have appropriate headers. Example:
msgid ""
msgstr ""
"Project-Id-Version: FOO BAR 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-11-11 11:11+0300\n"
"PO-Revision-Date: \n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-KeywordsList: _ngettext:1,2;t:1c,2\n"
"X-Poedit-SearchPath-0: ../..\n"
Note t:1c,2. This means, that first parameter from function Yii::app() will be used as context (see msgctx) and second as actual string to translate. Without this your i18n will not work!
Now just open messages.po in poedit → Update → do translations → Save.
And messages.mo file will be created and used by Yii.
For you language plurals string see gettext help.

maxscript slider, read value

I have two sliders and I need use his value in Rendering...
Definition:
slider maximum "xxxx" orient:#horizontal type:#integer range:[0,10,10]
slider minimum "xxxx" orient:#horizontal type:#integer range:[0,10,0]
Use:
myanim = render camera:$Camera001 fromframe:minimum.val*30 toframe:maximum.val*30 outputfile:myoutput
I need use values from sliders... I try .val, .value but compilers say"its undefined".
Thanks for answers
I solved it, its:
myanim = render camera:$Camera001 fromframe:(minimum.value*30) toframe:(maximum.value*30) outputfile:myoutput