is there any way to set the "stop if true" flag on conditional formatting rules with apache poi ?
I didnt find anything about that.
Related
I started to use IdeaVim but I am missing the feature to proper toggle comments over multiple lines. On my vim config I am using nerdcommenter for this:
vmap ++ <plug>NERDCommenterToggle
nmap ++ <plug>NERDCommenterToggle
and my iTerm sends ++ to the terminal when I press CTRL + /
This works perfect and I can set a count before I toggle to comment out multiple lines.
I would like to have the same setup for my IdeaVim but I can not get it to work.
I tried to use commentary but when it seems that the gcc action ignores any number before it and always comments out the single line.
I'm trying to check some config, which should contain combination: "^UseBridges".
And i know, that file can be changed after somewhat editing via admin UI, but UI doesn't support feature i need.
So i'm trying to write monit check for it, so it will check config, and if confeg resetted, it will add some needed strings to the end of config.
I've tried next rules:
check file torrc with path "/root/t" if content != '^UseBridges' then alert
and
check file torrc with path "/root/t" if not match '^UseBridges' then alert
Both syntaxes looks correct, but doesn't work the way i expect.
If i remove "!" or "not" - it works as expected. It finds string and execute action.
But if i want to check that removal of string - nothing happens.
What is wrong?
Or monit doesn't support that?
The Monit does not support that.
But if i want to check that removal of string - nothing happens.
What is wrong? Or monit doesn't support that?
Monit read the content of the file and keep the position of the last line in mind. With the next cycle additional lines are read etc.. If the file size became smaller, Monit start reading from the beginning.
Monit can not find deleted lines, because Monit does not compare file, Monit check the occurrence of a string only.
can i use the statement both "$msg contains" and "$fromhost-ip startswith" in rsyslog config?
when i use the follow for rsyslog config, it work!
if $msg contains 'src_port=6699' then -?DynFileA
& ~
if $fromhost-ip startswith '10.10.10.1' then -?DynFileB
& ~
but when i combine both of them, it was fail!
if $fromhost-ip startswith '10.10.10.1' and $msg !contains 'src_port=6699' then -?DynFileA
& ~
i search many article from internet, especially rsyslog office document,but didn't find any useful suggestion!
can any one tell me how to do this?
Hmm... are you sure about your substitution ? At first sight, if your host IP is 10.10.10.1, you'll apply -?DynFileA instead of -?DynFileB. And your first example held two distincts operations... (don't know what it is btw)
regards,
I would just go full rsyslog Reiner script now, your first example was a or, not an and with two different dynamic file templates, if that is what you wanted just replace the and below with an or
if ($fromhost-ip startswith '10.10.10.1') and ($msg !contains 'src_port=6699') then {
-?DynFileA
stop
}
Seems unlikely, but is there any way to generate a set of unit tests for the following rewrite rule:
RewriteRule ^/(user|group|country)/([a-z]+)/(photos|videos)$ http:/whatever?type=$1&entity=$2&resource=$3
From this I'd like to generate a set of urls of the form:
/user/foo/photos
/user/bar/photos
/group/baz/videos
/country/bar/photos
etc...
The reason I don't want to just do this once by hand is that I'd like the bounded alternation groups (e.g. (user|group|country)) to be able to grow and maintain coverage without having the update the tests by hand.
Is there a rewrite rule or regex parser that might be able to do this, or am I doing it by hand?
If you don't mind hacking a few lines of Perl then there's a package, Regexp::Genex that you can use to generate something close to what you require e.g.
# perl -MRegexp::Genex=:all -le 'print for strings(qr/\/(user|group|country)\/([a-z]+)\//)'
/user/dxb/
/user/dx/
/user/d/
/group/xd/
/group/x/
# perl -MRegexp::Genex=:all -le 'my $re=qr/\/(user|group|country)\/([a-z]+)\/(phone|videos)/;$Regexp::Genex::DEFAULT_LEN = length $re;print for strings($re)'
/user/mgcgmccdmgdmmzccgmczgmzzdcmmd/phone
/user/mgcgmccdmgdmmzccgmczgmzzdcmm/phone
/user/mgcgmccdmgdmmzccgmczgmzzdcm/phone
/user/mgcgmccdmgdmmzccgmczgmzzdc/phone
...
/group/gg/videos
/group/g/phone
/group/g/videos
/country/jvmmm/phone
/country/jvmmm/videos
/country/jvmm/phone
/country/jvmm/videos
/country/jvm/phone
/country/jvm/videos
/country/jv/phone
/country/jv/videos
/country/j/phone
/country/j/videos
#
Note:
1) You'll need to write a wrapper to parse the source file, tokenise (extract) the source patterns, escape certain characters in the rule e.g. "/", and possibly split your rules into more manageable parts, before expanding, via Genex, and then outputting the results, in the desired format.
2) To install the module type: cpan Regexp::Genex
After having upgraded to PHP 5.3, my application was inundated with
"Declaration of ... should be compatible with that of ..."
style errors. I understand the nature of these errors, but I wish to disable them.
The error_reporting setting in php.ini is "E_ALL & ~(E_NOTICE | E_DEPRECATED)", but this error continues to show up. I assumed it was included in E_STRICT, but am I wrong?
It's an E_STRICT error. Change your php.ini setting to E_ALL & ~(E_NOTICE | E_DEPRECATED | E_STRICT)...
But it should be turned off by default (it's not included in E_ALL). So if you're getting them, that means it's being turned on somewhere. The question is, where? Do declare error_reporting(...) anywhere in your files? If so, check them. If not, then be sure you're editing the right php.ini file (check phpinfo())... You could always do a grep for E_STRICT to try to find where it's being turned on...
Let me tell you a good settings.
You can change php.ini, in this file, you can search a sentence as ignore_repeated_errors = Off, you should change off state to on state.
If you also meet the same type of error, you should set Error Level Constants.