set default imageorient for TCEFORM - typo3

I want to set the default imageorient of a TCEFORM.
Standard value is 17 but I want to use 18.
So I tried like mentioned here https://forge.typo3.org/issues/16676
this two methods in my PageTsConfig.ts:
TCEFORM.tt_content.imageorient.default = 18
TCAdefaults.tt_content.imageorient = 18
and
mod.wizards.newContentElement.wizardItems.common.elements.image.tt_content_defValues.imageorient = 18
mod.wizards.newContentElement.wizardItems.common.elements.textpic.tt_content_defValues.imageorient = 18
but neither the one nor the other is working.
Any hints how I can achieve this?

In my cas it was
mod.wizards.newContentElement.wizardItems.common.elements.textmedia.tt_content_defValues.imageorient = 18
instaed of
mod.wizards.newContentElement.wizardItems.common.elements.textpic.tt_content_defValues.imageorient = 18

Related

How to get the difference between two columns using Talend

I Have two excel sheets that i want to compare using talend job
First excel named Compare_Me_1
PN
STT
Designation
AY73101000
20
RC0402FR-0743K2L
AY73101000
22
RK73H1ETTP4322F
AY73101000
22
ERJ-2RKF4322X
Ac2566
70
CRCW040243K2FKED
Second excel named Compare_Me_2
PN
STT
Designation
AY73101000
20
RC0402FR-0743K2L
AY73101000
22
RK73H1ETTP4322F
AY73101000
21
ERJ-2RKF4322X
Ac2566
70
CRCW040243K2FKED
what i want to achieve is this output
PN1
STT1
STT2
STT_OK_Ko
Designation1
Designation2
Designation_Ok_Ko
AY73101000
20
20
ok
RC0402FR-0743K2L
RC0402FR-0743K2L
ok
AY73101000
22
22
ok
RK73H1ETTP4322F
RK73H1ETTP4322F
ok
AY73101000
22
21
ko
ERJ-2RKF4322X
ERJ-2RKF4322X
ok
Ac2566
70
70
ok
CRCW040243K2FKED
CRCW040243K2FKED
ok
So to achieve this i developed a talend job that looks like below :
In My tMap i linked PN with a leftouterjoin and All Matches correspandance .
And to get for example STT_Ok_KO i used bellow code to compare my two input :
(!Relational.ISNULL(row14.STT) && !Relational.ISNULL(row13.STT) &&
row14.STT.equals(row13.STT) ) ||
(Relational.ISNULL(row14.STT) && Relational.ISNULL(row13.STT))
?"ok":"ko"
Is this the correct way to achieve my ouput ? If not , recommand me to use an other method
Any suggest is welcome .
You probably need to follow the long steps below :

Telegraf inputs.tail with zimbra.log

I have some questions, how I can set telegraf.conf file for collect logs from the "zimbra.conf" file?
Now I tried to use this config text, but it does not work :(((
I want to send this logs to grafana
One of the lines "zimbra.conf" for example:
Oct 1 10:20:46 webmail postfix/smtp[7677]: BD5BAE9999: to=user#mail.com, relay=mo94.cloud.mail.com[92.97.907.14]:25, delay=0.73, delays=0.09/0.01/0.58/0.19, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4C25fk2pjFz32N5)
And I do not understand exactly how works the "grok_patterns ="
[[inputs.tail]]
files = ["/var/log/zimbra.log"]
from_beginning = false
grok_patterns = ['%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST} %{DATA:program}(?:\[%{POSINT}\])?: %{GREEDYDATA:message}']
name_override = "zimbra_access_log"
grok_custom_pattern_files = []
grok_custom_patterns = '''
TS_UNIX %{MONTH}%{SPACE}%{MONTHDAY}%{SPACE}%{HOUR}:%{MINUTE}:%{SECOND}
TS_CUSTOM %{MONTH}%{SPACE}%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND}
'''
grok_timezone = "Local"
data_format = "grok"
I have copied your example line into a log file called Prueba.txt wich contains the following lines:
Oct 3 00:52:32 webmail postfix/smtp[7677]: BD5BAE9999: to=user#mail.com, relay=mo94.cloud.mail.com[92.97.907.14]:25, delay=0.73, delays=0.09/0.01/0.58/0.19, dsn=2.0.0, status=sent (250 2.0$
Oct 13 06:25:01 webmail systemd-logind[949]: New session 229478 of user zimbra.
Oct 13 06:25:02 webmail zmconfigd[27437]: Shutting down. Received signal 15
Oct 13 06:25:02 webmail systemd-logind[949]: Removed session c296.
Oct 13 06:25:03 webmail sshd[28005]: Failed password for invalid user julianne from 120.131.2.210 port 10570 ssh2
I have been able to parse the data with this configuration of the tail.input plugin:
[[inputs.tail]]
files = ["Prueba.txt"]
from_beginning = true
data_format = "grok"
grok_patterns = ['%{TIMESTAMP_ZIMBRA} %{GREEDYDATA:source} %{DATA:program}(?:\[%{POSINT}\])?: %{GREEDYDATA:message}']
grok_custom_patterns = '''
TIMESTAMP_ZIMBRA (\w{3} \d{1,2} \d{2}:\d{2}:\d{2})
'''
name_override = "log_frames"
You need to match the input string with regular expressions. For that there are some predefined patters such as GREEDYDATA = .* that you can use to match your input (another example will be NUMBER = (?:%{BASE10NUM}) BASE16NUM (?<![0-9A-Fa-f])(?:[+-]?(?:0x)?(?:[0-9A-Fa-f]+))) . You can also define your own patterns in grok_custom_patterns. Take a look at this website with some patters: https://streamsets.com/documentation/datacollector/latest/help/datacollector/UserGuide/Apx-GrokPatterns/GrokPatterns_title.html
In this case I defined a TIMESTAMP_ZIMBRA pattern for matching Oct 3 00:52:32 and Oct 03 00:52:33 alike inputs.
Here is the collected metric by Prometheus:
# HELP log_frames_delay Telegraf collected metric
# TYPE log_frames_delay untyped
log_frames_delay{delays="0.09/0.01/0.58/0.19",dsn="2.0.0",host="localhost.localdomain",message="BD5BAE9999:",path="Prueba.txt",program="postfix/smtp",relay="mo94.cloud.mail.com[92.97.907.14]:25",source="webmail",status="sent (250 2.0.0 Ok: queued as 4C25fk2pjFz32N5)",to="user#mail.com"} 0.73
P.D.: Ensure that telegraf has access to the log files.

How to add a new line after every integer

I am trying to figure out a way to make a new variable from another to output to a GUI. When I try to just display the variable through a lable it loses its line breaks.
I managed to figure out a solution when working with text but when it comes to numbers it does not work.
Here is what I have tried:
$ActiveUnits = #(Get-MsolAccountSku | Select-Object -ExpandProperty ActiveUnits)
$ActiveUnitsFix = "`n"
foreach ($Unit in $ActiveUnits) {
$ActiveUnitsFix += #($Unit + "`n")
}
The output that I am getting is this:
31425220100002521100001000000100000002137328420
When it should be something like this:
3
14
25
220
10000
25
21
10000
1000000
10000000
213
7
3
28
4
20
You could use the -join parameter for adding the new line if you receive an int array from (Get-MsolAccountSku).ActiveUnits.
[System.Int32[]]$ActiveUnits = (Get-MsolAccountSku).ActiveUnits
[System.String]$ActiveUnitsFix = $ActiveUnits -join [System.Environment]::NewLine
$ActiveUnitsFix

Change a setting on all the combo box objects on all the forms

tldr: How do I refer to each combo box, on each form, in turn?
I discovered quite late in the game that the default for combo boxes is "LimitToList = False." This is very bad, because I have lots of combo boxes and no one should ever be adding or editing anything by typing over them. My users keep doing that, and I need them to stop.
I already know how to, e.g., change all my forms so that the split form orientation is "datasheet on the bottom." That is, I've already solved the problem of "open all the forms, change a setting on each one, rinse, repeat." What I have works beautifully:
1 Public Sub MakeSplitFormsAllBottom()
2
3 Dim strForm As String, db As DAO.Database
4 Dim doc As DAO.Document
5 Set db = CurrentDb
6
7 For Each doc In db.Containers("Forms").Documents
8
9 strForm = doc.Name
10
11 DoCmd.OpenForm strForm, acDesign
12 Forms(strForm).SplitFormOrientation = 1
13
14 DoEvents
15 DoCmd.Close acForm, strForm, acSaveYes
16
17 Next doc
18
19 End Sub
The trouble is that I can't quite figure out how to change a setting on all of the combo boxes on each of those forms.
I Googled around quite a bit and didn't find any good examples, so I took a (bunch of) shots in the dark which generally look like this:
1 Public Sub MakeAllCombosLimited()
2
3 Dim strForm As String, db As DAO.Database, obj As AccessObject, strObj As String
4 Dim doc As DAO.Document
5 Set db = CurrentDb
6
7 For Each doc In db.Containers("Forms").Documents
8
9 strForm = doc.Name
10
11 DoCmd.OpenForm strForm, acDesign
12
13 For Each obj In strForm
14 Forms(strForm).Controls(obj).LimitToList = True
15 DoEvents
16 Next obj
17
18 DoEvents
19 DoCmd.Close acForm, strForm, acSaveYes
20
21 Next doc
22
23 End Sub
Nothing I have tried has worked. The one above gives me the error "For Each may only iterate over a collection object or an array." I also tried variations of:
7 For Each obj in db.Containers("Forms").Documents
To just refer to all the objects in the entire database, but that didn't work either - "Sub or Function not defined" is what I get, my guess that's because you need to say that the object belongs to a specific form.
I'm not sure what questions I should be asking, to be honest. It seems to me that the bottom line is I need to know at least one of the following:
How do I refer to/modify all the combo boxes in the entire database, or
How do I refer to/modify all the combo boxes in a given form?
But I know that I don't know the answer to either one. I feel like I'm making this harder than it needs to be.
Not sure if this will work in Access, but please try:
Dim ctrl as Control
For each ctrl in Form.Controls 'Revise to refer to your form object.
If TypeOf(ctrl) Is MSForms.ComboBox
'Do something with the ctrl, here:
'
'
End If
Next
Here is the set of code that actually did what I wanted it to do:
1 Public Sub MakeAllCombosLimited()
2
3 Dim db As DAO.Database, strForm As String
4 Dim doc As DAO.Document
5 Set db = CurrentDb
6
7 For Each doc In db.Containers("Forms").Documents
8 strForm = doc.Name
9 DoCmd.OpenForm strForm, acDesign
10
11 For Each ctl In Forms(strForm).Controls
12
13 If ctl.ControlType = acComboBox Then
14 ctl.LimitToList = True
15 End If
16
17 Next ctl
18
19 DoEvents
20 DoCmd.Close acForm, strForm, acSaveYes

Modifiers in Makefile rule's dependency list

The problem is fairly simple. I am trying to write a rule, that given the name of the required file will be able to tailor its dependencies.
Let's say I have two programs: calc_foo and calc_bar and they generate a file with output dependent on the parameter. My target would have a name 'target_*_*'; for example, 'target_foo_1' would be generated by running './calc_foo 1'.
The question is, how to write a makefile that would generate outputs of the two programs for a range of parameters?
If there are just a few programs, you can have a rule for each one:
target_foo_%:
./calc_foo $*
If you want to run a program with a list of parameters:
foo_parameter_list = 1 2 green Thursday 23 bismuth
foo_targets = $(addprefix target_foo_,$(foo_parameter_list))
all: $(foo_targets)
If you want a different set of parameters for each program, but with some in common, you can separate the common ones:
common_parameter_list = 1 2 green Thursday
foo_parameter_list = $(common_parameters) 23 bismuth
bar_parameter_list = $(common_parameters) 46 111
If it turns out you have more programs than you thought, but still want to use this method, you just want to automate it:
# add programs here
PROGRAMS = foo bar baz
# You still have to tailor the parameter lists by hand
foo_parameter_list = 1 2 green Thursday 23 bismuth
# everything from here on can be left alone
define PROGRAM_template
$(1)_targets = $(addprefix target_$(1)_,$($(1)_parameter_list))
target_$(1)_%:
./calc_$(1) $$*
all: $(1)_targets
endef
$(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
This seems to do more or less what you are requesting - assuming you are using GNU Make.
Makefile
BAR_out = target_bar_
BAR_list = 1 2 3 4 5 6 7 8 9
BAR_targets = $(addprefix ${BAR_out},${BAR_list})
FOO_out = target_foo_
FOO_list = 11 12 13 14 15 16 17 18 19
FOO_targets = $(addprefix ${FOO_out},${FOO_list})
all: ${BAR_targets} ${FOO_targets}
${BAR_targets}:
calc_bar $(subst ${BAR_out},,$#)
${FOO_targets}:
calc_foo $(subst ${FOO_out},,$#)
It can probably be cleaned up, but I tested it with the commands:
calc_bar
echo "BAR $#" | tee target_bar_$#
sleep $#
calc_foo
echo "FOO $#" | tee target_foo_$#
sleep $#
Clearly, if you want a different list, you can specify that on the command line:
make -j4 FOO_LIST="1 2 3 4 5 6 33"