Google Custom Search: Issues retrieving promotions using file type exclusion in query - file-type

I'm having issues retrieving promotions when using file type exclusion in the query. I have tested with no file type exclusions in the query, and then I get my promotions in addition to a lot of results that I do not want.
Is there a workaround for this? Is it possible to set the file exclusion in the custom search engine console?
You can see how I have used the file type exclusion here
EDIT: Using param as_eq
I've also tried the param as_eq, e.g. &as_eq=filetype%3Apdf
Still same result!?

Related

Log4j2 property file support for custom filters

I am trying to use a custom filter using log4j2 in two ways below. Unfortunately I get invalid element or attribute 'filter' error. Is log4j2 xml needed for filters?
I tried with or without using package name in the filter none of which works
appender.custom.filter=com.test.util.CustomAppender
packages=com.test.util
appender.custom.filter=CustomAppender

Do not replace existing file when uploading file with same name Microsoft Graph API

How can I prevent replacing the existing file with a new file which has the same name, when I upload file to one drive?
I am using PUT /me/drive/items/{parent-id}:/{filename}:/content docs end point.
I instead need to keep indexing (test.jpg, test (1).jpg) or, just like google drive does, add two files with the same name.
You can control this behavior using Instance Attributes, specifically the #microsoft.graph.conflictBehavior query parameter. There are three supported conflict behaviors; fail, replace (the default), and rename.
The conflict resolution behavior for actions that create a new item. You can use the values fail, replace, or rename. The default for PUT is replace. An item will never be returned with this annotation. Write-only.
In order to have it automatically rename the file, you add #microsoft.graph.conflictBehavior=rename as a query parameter to your URI.
PUT /me/drive/items/{parent-id}:/{filename}:/content?#microsoft.graph.conflictBehavior=rename

Where to get log4j2 configuration properties complete list

I am looking for a complete list of properties supported by log4j2. The log4j2 documentation at following link gives only a subset of properties.
https://logging.apache.org/log4j/2.x/manual/configuration.html#Properties
For ex:
Delete files older than 30 days
appender.rolling.strategy.delete.ifLastModified.age = 30d
This is not listed in the manual. Any suggestions where I can find the list?
A full list of all log4j2 properties does not exist because configuration with properties is only one option among many (XML, JSON, YAML etc.).
Each log4j2 part is described with a list of configurable parameters it supports (e.g. https://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender). The URI you are linking describes the rules which property names you have to choose to configure the parameters.
So the way you have to go is:
Select which function you have to use (e.g. RollingFileAppender)
Read the chapter of this function and select the parameters you want to configure
Use your linked URI to create you property based configuration with the property names for the parameters you want to configure

Fetch Codes from SVN using properties file

I have a scenario, where using ANT Script I have to fetch codes from SVN using properties file.
The properties files has the property projectlib where the libraries used in a module are listed as comma separated values and their corresponding revision numbers are listed in a property projectlib.revision below.
I have to fetch projectlib with the respective revision number.
The properties file looks as below:
projectliblist=XXXXLib1,XXXXLib2
projectlibrevision=3195,3289
For Example, here I have to fetch XXXXLib1 from 3195 and XXXXLib2 from 3289.
I need the logic to match projectlib with respective revision number, not the complete script for this scenario.
I tried with For list, but I don't know how to index the param list.
The problem you will have with the pair of list properties you show is that (at least using ant-contrib:for) you don't have a way to cross-refer them.
This answer shows how you can readily cross refer properties using ant-contrib:for / macrodef and might be useful as an example.
For your case, I'd suggest you change the properties structure to be more consumable in Ant, for example:
projectliblist=XXXXLib1,XXXXLib2
projectlib.XXXXLib1.revision=3195
projectlib.XXXXLib2.revision=3289
which you could consume following the pattern in the answer I linked to above, or possibly:
projectliblist=XXXXLib1/3195,XXXXLib2/3289
which you could consume in a loop which splits each list element into two parts and passes to a macrodef with two attributes.

(JIRA) Copy "component watcher" entries into list of "Watchers"

I want to copy the list of users specified as Component Watchers (with the plugin of the same name) into the list of Watchers, at issue creation time. I'm trying to do this with a Script-Runner post-function, after creating a custom field of type Component Watchers.
The part that I'm missing is how to obtain the Component Watchers usernames as a list. Any idea?
Try the Behaviours plugin. There you can specify "behaviour"-s, that can be mapped to projects and issue types, and there you can specify Groovy Scripts to run during transitions.
It won't be easy, but it is versatile and does not eat too much resources.

Resources