photoshop – Why does the histogram of an image depends on the software that opened it?

It’s all to do with the profile applied to the raw files and guesses other software makes as to what that profile ought to be…

RAW is not an ‘absolute’ format in terms of the image displayed, it’s raw data to which an ‘opinion’ of what the image ought to look like can be manipulated from. It will already contain several view options added by the camera, based on the photographer’s pre-determined settings, but these can be changed later, in software.

Adobe RAW in Photoshop will make a guess at what it thinks the Nikon default profile ought to be and what adjustments the photographer may have made to their settings, but frankly it usually makes a horrible mess of it, because it isn’t the same as Nikon actually use, it’s an attempt to reverse-engineer how Nikon does it. Photoshop interprets the profile as being Adobe RGB(1998).

By the look of it, Paintshop Pro has even less of a clue as to what it really ought to look like. I don’t have Paintshop to be able to examine what its guess was.

The only app that can actually guess correctly is Nikon’s own software suite, including ViewNX-i. ViewNX-i knows exactly what the camera’s settings were, including that the photographer was using the Vivid enter image description here colour profile addition, for extra colour-punch…

enter image description here

To get that data into Photoshop or Paintshop correctly, the best way to do it is to export as a TIFF… then it will open looking something like it was intended, without having to make any guesses. The correct Profile is now showing as Nikon sRGB 4.0.0.3002 when imported to Photoshop.

On the other hand, the jpgs have been saved, imo (see below) directly from the camera, with the internet standard sRGB profile. This, allowing for variance in actual monitor calibration, is the closest you get to the artist’s actual intent, without having Nikon software to interpret for you.

NEF interpreted by PhotoRAW

enter image description here

TIF after export from ViewNX-i with no adjustments

enter image description here

JPG, for comparison

enter image description here

As you can see, the TIF has more in common with the JPG, though the JPG is slightly darker in the greens.

I cant really post a picture of what the image actually looks like in ViewNX-i because the screen layout won’t let me drop the size down and conveniently place the histogram over it like I can in Photoshop, but in fact the jpg is the closest of the three to what it looks like in ViewNX-i, so the camera has done a pretty decent job of conveying in a more ‘portable’ format (sRGB JPG) what the photographer’s intent was according to his camera settings.

Clean Architecture Gateway layer depends on outer layer

Looking at the clean architecture layers and flow diagrams, and implemented it my self in my applications, I’ve always wondered which layer is supposed to contain the DB, or any 3rd Party service or SDK.

Looking at both of these images raises the question if there isn’t violation in the outer layers.

enter image description here

enter image description here

I’ve imagined the layers division like this:

enter image description here

But this means that there is a violation of the dependancy rule. Since the gateway always knows about both the external service, and the application it self, the entities.

Is there a correct way to draw these layers? I’ve read a couple of resources asking this question, but didn’t really get a full answers to what I need. For example: https://groups.google.com/g/clean-code-discussion/c/oUrgGi2r3Fk?pli=1, Doesn’t repository pattern in clean architecture violate Dependency inversion principle?

I get it that the meaning of clean architecture is kept, and the inner layers, the entities and the use case, aren’t affected by a change in the DB and the gateway, but was just wondering if maybe this is more accurate:

enter image description here

edit:

From the book:

Recall that we do not allow SQL in the use cases layer; instead, we use gateway interfaces that have appropriate methods. Those gateways are implemented by classes in the database layer.

So I guess this means that the data access is really in the most outer layer:

enter image description here

Maybe for this specific example, there is no real use for the interface adapters layer?

But also from the book about interface adapters layer:

Similarly, data is converted, in this layer, from the form most convenient for entities and use cases, to the form most convenient for whatever persistence framework is being used (i.e., the database). No code inward of this circle should know anything at all about the database. If the database is a SQL database, then all SQL should be restricted to this layer—and in particular to the parts of this layer that have to do with the database.

Also in this layer is any other adapter necessary to convert data from
some external form, such as an external service, to the internal form
used by the use cases and entities.

So it kinda contradicts that the data access is in the database layer, since this is what it does, converts from the DB, for example SQL rows, into the application’s entities. Are these layers not really separated? I’m confused.

Depends: libgcc-s1 (>=3.0) but it is not installable (Bitcoind wallet dependency problem on Debian)

On Debian I successfully compiled .bitcoind without a wallet, but now I need the wallet.

./configure tells me I need Berkeley CXX headers. Searching for how to do this on Debian brings up a bunch of Ubuntu answers saying to do either

sudo apt-get install libdb4.8-dev libdb4.8++ libdb4.8++-dev

after having added a PPA, or

wget http://download.oracle.com/berkeley-db/db-4.8.30.zip
unzip db-4.8.30.zip
cd db-4.8.30
cd build_unix/
../dist/configure --prefix=/usr/local --enable-cxx
make
make install

Both solutions throw errors. I’m focusing on the 1st solution.

The first solution throws this error:

The following packages have unmet dependencies:
 libdb4.8++ : Depends: libgcc-s1 (>= 3.0) but it is not installable

I’m not sure, but I assume this may be an Ubuntu vs. Debian issue? How can I bypass it?

design patterns – Multiple external API calls and only one valid response depends on the parameters value

In my microservice I need to call several external API. The problem is that I do not know which of them to call to get a proper response, but I am sure that one of them return a successful response. I need a clean solution to be able to add new external API’s easily without breaking the rest ones.
In Node.js I did something like this (sketch of the solution):

class CommandsRegister {
   constructor(){
      this.commands = (new CallFirstApiCommand(), new CallSecondApiCommand(), new CallThirdApiCommand());
   }

   async executeCommands(data) {
      return this.commands.map(command => command.execute(data));
   }
}

/**
* Example of command class. The rest has the same interface.
*/
class CallFirstApiCommand {
    async execute(data) {
       let response = await callExternalAPI();
       if(isErrorResponse(response)) {
          throw new Error();
       }
       return response;
    }
}

class MainClient {
   constructor(){
      this.register = new CommandsRegister();
   }

   async run(data) {
      const commands = this.register.executeCommands(data);
      return await this.raceSuccess(commands);
   }

   /**
   * Get first successful promise and forget the rest
   **/
   async raceSuccess(promises) {
    return Promise.all(promises.map(p => {
      return p.then(
        val => Promise.reject(val),
        err => Promise.resolve(err)
      );
    })).then(
      errors => Promise.reject(errors),
      val => Promise.resolve(val)
    );
  }
}

Is there any better solution or design patterns to compose it in better and cleaner way?

magento2 – How do I create form component field custom depends on another field value?

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">addon_new_offers_form.new_offers_form_data_source</item>
            <item name="deps" xsi:type="string">addon_new_offers_form.new_offers_form_data_source</item>
            <item name="namespace" xsi:type="string">addon_new_offers_form</item>
        </item>
        <item name="buttons" xsi:type="array">
            <item name="save" xsi:type="string">AddonWarehouseBlockAdminhtmlButtonOffersButton</item>
        </item>
        <item name="template" xsi:type="string">templates/form/collapsible</item>
        <item name="config" xsi:type="array">
            <item name="ajaxSaveType" xsi:type="string">simple</item>
        </item>
    </argument>
    <dataSource name="new_offers_form_data_source">
        <argument name="dataProvider" xsi:type="configurableObject">
            <argument name="class" xsi:type="string">AddonWarehouseUiDataProviderOffersFormDataProvider</argument>
            <argument name="name" xsi:type="string">new_offers_form_data_source</argument>
            <argument name="primaryFieldName" xsi:type="string">id</argument>
            <argument name="requestFieldName" xsi:type="string">id</argument>
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="submit_url" xsi:type="url" path="addon/manage/offerssave"/>
                </item>
            </argument>
        </argument>
        <argument name="data" xsi:type="array">
            <item name="js_config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
            </item>
        </argument>
    </dataSource>
    <fieldset name="data">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string"/>
                <item name="collapsible" xsi:type="boolean">false</item>
            </item>
        </argument>
        <container name="messages">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string"/>
                    <item name="component" xsi:type="string">Magento_Catalog/js/components/messages</item>
                </item>
            </argument>
        </container>
        <field name="data.name_of_deal">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Name of Offer</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="dataScope" xsi:type="string">data.name_of_deal</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="sortOrder" xsi:type="number">10</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.warehouse_id" formElement="hidden">
            <settings>
                <dataType>text</dataType>
            </settings>
        </field>
        <!--        <field name="data.warehouse_name">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Warehouse</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="dataScope" xsi:type="string">data.warehouse_name</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="sortOrder" xsi:type="number">20</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="disabled" xsi:type="boolean">true</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>-->
        <field name="data.product_id" formElement="hidden">
            <settings>
                <dataType>text</dataType>
            </settings>
        </field>
        
        <button name="custom_product_listing_modal_button" component="Magento_Ui/js/form/components/button">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="buttonClasses" xsi:type="string">open-insert-form-example-modal-button</item>
                    <item name="actions" xsi:type="array">
                        <item name="0" xsi:type="array">
                            <item name="targetName" xsi:type="string">${ $.parentName}.custom_product_listing_modal.custom_product_listing_loader</item>
                            <item name="actionName" xsi:type="string">destroyInserted</item>
                        </item>
                        <item name="1" xsi:type="array">
                            <item name="targetName" xsi:type="string">${ $.parentName}.custom_product_listing_modal</item>
                            <item name="actionName" xsi:type="string">openModal</item>
                        </item>
                        <item name="2" xsi:type="array">
                            <item name="targetName" xsi:type="string">${ $.parentName}.custom_product_listing_modal.custom_product_listing_loader</item>
                            <item name="actionName" xsi:type="string">render</item>
                        </item>
                    </item>
                </item>
            </argument>
            <settings>
                <title translate="true">Click for product selection</title>
            </settings>
        </button>
        <modal name="custom_product_listing_modal">
            <settings>
                <options>
                    <option name="title" xsi:type="string">Select Deal For Offer</option>
                </options>
            </settings>
            
            <insertForm name="custom_product_listing_loader">
                <settings>
                    <formSubmitType>ajax</formSubmitType>
                    <renderUrl path="mui/index/render">
                        <param name="handle">custom_product_listing</param>
                        <param name="buttons">1</param>
                    </renderUrl>
                    <loading>false</loading>
                    <toolbarContainer>${ $.parentName }</toolbarContainer>
                    <ns>custom_product_listing</ns>
                </settings>
            </insertForm>
        </modal>        
        <field name="data.product_name">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Product Name</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="dataScope" xsi:type="string">data.product_name</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="sortOrder" xsi:type="number">30</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="disabled" xsi:type="boolean">true</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.price">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Price</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="dataScope" xsi:type="string">data.price</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="sortOrder" xsi:type="number">40</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                        <item name="validate-number" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.from_date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">Timepicker</item>
                    <item name="label" xsi:type="string" translate="true">Offer Start On</item>
                    <item name="formElement" xsi:type="string">date</item>
                    <item name="source" xsi:type="string">data.from_date</item>
                    <item name="sortOrder" xsi:type="number">50</item>
                    <item name="dataScope" xsi:type="string">data.from_date</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                    <item name="options" xsi:type="array">
                        <item name="dateFormat" xsi:type="string">yyyy-mm-dd</item>                        
                        <item name="showsTime" xsi:type="boolean">false</item>
                        <item name="minDate" xsi:type="string">new Date()+ 1</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.to_date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">Timepicker</item>
                    <item name="label" xsi:type="string" translate="true">Offer Ends On</item>
                    <item name="formElement" xsi:type="string">date</item>
                    <item name="source" xsi:type="string">data.to_date</item>
                    <item name="sortOrder" xsi:type="number">60</item>
                    <item name="dataScope" xsi:type="string">data.to_date</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                    <item name="options" xsi:type="array">
                        <item name="dateFormat" xsi:type="string">yyyy-mm-dd</item>                        
                        <item name="showsTime" xsi:type="boolean">false</item>
                        <item name="minDate" xsi:type="string">new Date()+ 1</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.single_unit_amount">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Single Unit Amount</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="dataScope" xsi:type="string">data.single_unit_amount</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="sortOrder" xsi:type="number">70</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                        <item name="validate-number" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.single_unit">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Single Unit</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="dataScope" xsi:type="string">data.single_unit</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="sortOrder" xsi:type="number">80</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                        <item name="validate-number" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.single_unit_package_type">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Single Unit Package Type</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="dataScope" xsi:type="string">data.single_unit_package_type</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="sortOrder" xsi:type="number">90</item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>
        <field name="data.manage_qty_flag" formElement="select">
            <settings>
                <dataType>text</dataType>
                <dataScope>data.manage_qty_flag</dataScope>
                <label translate="true">Manage Qty</label>
                <switcherConfig>
                    <rules>
                        <rule name="1">
                            <value>1</value>
                            <actions>
                                <action name="1">
                                    <target>addon_new_offers_form.addon_new_offers_form.data.qty</target>
                                    <callback>enable</callback>
                                </action>
                            </actions>
                        </rule>
                        <rule name="0">
                            <value>0</value>
                            <actions>
                                <action name="0">
                                    <target>addon_new_offers_form.addon_new_offers_form.data.qty</target>
                                    <callback>disable</callback>
                                </action>
                            </actions>
                        </rule>
                    </rules>
                    <enabled>true</enabled>
                </switcherConfig>
                <item name="sortOrder" xsi:type="number">100</item>
            </settings>
            <formElements>
                <select>
                    <settings>
                        <options class="MagentoConfigModelConfigSourceYesno"/>
                    </settings>
                </select>
            </formElements>
        </field>
        <field name="data.qty" formElement="input">
            <settings>
                <dataType>string</dataType>
                <dataScope>data.qty</dataScope>
                <label translate="true">Qty</label>
            </settings>
        </field>
        <field name="data.status">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">AddonWarehouseModelSourceOffersStatus</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" translate="true" xsi:type="string">Status</item>
                    <item name="formElement" xsi:type="string">select</item>
                    <item name="source" xsi:type="string">Filters</item>
                    <item name="sortOrder" xsi:type="number">120</item>
                    <item name="dataScope" xsi:type="string">data.status</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">false</item>
                    </item>
                </item>
            </argument>
        </field>
    </fieldset>
    
</form>

enter image description here

Dependency fields not working. I created a separate form and it’s working on that but on in above xml?

check – Speller CS50 Valgrind Conditional jump or move depends on uninitialised value

I m having the valgrind error and it says it is in the line where i write “while temp!=NULL”. i tried many different approaches, could not get rid of this error message. please help

bool check(const char *word)
{
int hash_word_index=hash(word);

if(table(hash_word_index)==NULL)
{
    return false;
}
else if(table(hash_word_index)!=NULL)
{
    node *temp=table(hash_word_index);
    while(temp!=NULL)
    {
        if(strcasecmp(temp->word,word)==0)
        {
            return true;
        }
        else
        {
            temp=temp->next;
        }
    }

}
return false;

}

KALI LINUX BROKEN DEPENDS – Super User

i am in big trouble! i cannot install any package or script or whatever on my linux.
i got some problem with depends and cannot fix it. the error is this :

root@hizzly:/home/noroot/Downloads# dpkg -i libcogl-pango-dev_1.22.0-2_amd64.deb
(Reading database … 516907 files and directories currently installed.)
Preparing to unpack libcogl-pango-dev_1.22.0-2_amd64.deb …
Unpacking libcogl-pango-dev (1.22.0-2) over (1.22.0-2) …
dpkg: dependency problems prevent configuration of libcogl-pango-dev:
libcogl-pango-dev depends on libcogl-pango20 (= 1.22.0-2); however:
Version of libcogl-pango20:amd64 on system is 1.22.6-1.
libcogl-pango-dev depends on gir1.2-coglpango-1.0 (= 1.22.0-2); however:
Version of gir1.2-coglpango-1.0:amd64 on system is 1.22.6-1.
libcogl-pango-dev depends on libcogl-dev (= 1.22.0-2); however:
Package libcogl-dev is not installed.
libcogl-pango-dev depends on libglib2.0-dev (>= 2.28.0); however:
Package libglib2.0-dev is not installed.
libcogl-pango-dev depends on libcairo2-dev (>= 1.10); however:
Package libcairo2-dev is not installed.
libcogl-pango-dev depends on libdrm-dev; however:
Package libdrm-dev is not installed.
libcogl-pango-dev depends on libgdk-pixbuf2.0-dev (>= 2.0); however:
Package libgdk-pixbuf2.0-dev is not installed.
libcogl-pango-dev depends on libpango1.0-dev (>= 1.20); however:
Package libpango1.0-dev is not installed.
libcogl-pango-dev depends on libxcomposite-dev; however:
Package libxcomposite-dev is not installed.
libcogl-pango-dev depends on libxext-dev; however:
Package libxext-dev is not installed.
libcogl-pango-dev depends on libxfixes-dev; however:
Package libxfixes-dev is not installed.
libcogl-pango-dev depends on libxdamage-dev; however:
Package libxdamage-dev is not installed.

dpkg: error processing package libcogl-pango-dev (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
libcogl-pango-dev

licensing – Can AGPL code depends on closed source code

I have a closed source module (A) in odoo that it working fine without depending on anything.

Now I would like to add an AGPL module(B) and integrate it with module (A).

So, I am planning to create another module(C) that does the integration between A and B.

I know that the module (C) should have an AGPL license. However what about module (A).

Can an AGPL code depend on closed source code giving that it doesn’t work without it?

In my case, do I have to distribute the source code of module A giving that module C doesn’t work without it.

Thank you in advance.

java – List with object and index filtering out the object depends upon the index present at list

I have a following list which indicates the indexes.

 List<Integer> integerList = Arrays.asList(1, 3, 5, 6); // index

I have the following collection of objects.

Collection<Test> testCollection = new ArrayList<>();

Test test01 = new Test(0, "A"); // 0
Test test02 = new Test(1, "B"); // 1
Test test03 = new Test(2, "C"); // 2
Test test04 = new Test(3, "D"); // 3
Test test05 = new Test(4, "E"); // 4
Test test06 = new Test(5, "F"); // 5

testCollection.add(test01);
testCollection.add(test02);
testCollection.add(test03);
testCollection.add(test04);
testCollection.add(test05);
testCollection.add(test06);

The integerList has indexes which are present on testCollection. I want to filter out the testCollection which will have object consisting the index 1, 3, 5. Index 6 is not present on object collection.

I wrote the code as below example. Is there any better as like Java 8 way?

List<Test> testList = new ArrayList<>(testCollection);
List<Test> newTestList = new ArrayList<>();

for (Integer integer : integerList) {

  for (int j = 0; j < testList.size(); j++) {

    if (integer == j) {
      newTestList.add(testList.get(j));
    }
  }
}
System.out.println(newTestList);

It will have the following output as result:

(Test{id=1, name='B'}, Test{id=3, name='D'}, Test{id=5, name='F'})

The class Test has following information.

class Test {
  private int id;
  private String name;
}

Finding a function of $Pois(lambda_1)$ and $Pois(lambda_2)$ such that the distribution depends on $frac{lambda_1}{lambda_1+lambda_2}$ only.

Suppose that $Xsim Pois(lambda_1)$ and $Ysim Pois(lambda_2)$ are two independent Poisson random variables. Can we find a function $f(X,Y)$ of $X$ and $Y$, where $f(X,Y)$ does not involve $lambda_1$ and $lambda_2$, such that the distribution of $Zequiv f(X,Y)$ depends on the parameter $frac{lambda_1}{lambda_1+lambda_2}$ only?

I know there is a result that $X|X+Y=n$ follows a binomial distribution with parameters $n$ and $frac{lambda_1}{lambda_1+lambda_2}$. But can we find a statistic $Z= f(X,Y)$ without conditioning such that $Z$ depends on the parameter $frac{lambda_1}{lambda_1+lambda_2}$ only?

I tried some naive functions such as $f(X,Y)=frac{X}{X+Y+1}$ and $f(X,Y)=frac{X}{X^2+Y^2+1}$, but it turns out that those functions do not work.