DDD accessing reference values in Domain layer without repositories

So I have built a domain model and some logic into that. I have created two repositories for two aggregate roots.

My question is how to access to the reference data from these layers?. For example, say we have the following types Elder and Young.

Our application entry points expect Elder or Young as inputs. But, to validate and save this in the database (which has a foreign key to another table PERSON_TYPE which has these 2 values), I need to convert these IDs to store aggregate roots.

Could I create a PersonTypeRepository (in the domain layer) and use it when I persist my aggregate roots? Should this conversion happen in domain layer or should it happen in the application layer? For example, from a service

How to setup squid-deb-proxy and squid-deb-proxy-client to be more autonomous (to work without internet)?

I have server with installed squid-deb-proxy. Let’s say that its IP is 10.13.3.7.
I have installed squid-deb-proxy-client on other machines (let’s name them clients). Server and clients are in the same network and run Ubuntu 16.04.6 LTS.

Yesterday night I have downloaded all updates from one of the clients. So I expect that Squid Deb cache is filled with headers and packages.

On today morning there is no internet because of WAN (ISP) maintenance. I can’t ping anything outside the LAN. I can ping 10.13.3.7 from clients.

Thus when I run sudo apt update on clients I see the following messages:

0% [Working]
0% [Waiting for headers]
Err:N http://archive.ubuntu.com/ubuntu release InRelease
Connection failed [IP: 10.13.3.7 8000]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/release/InRelease Connection failed [IP: 10.13.3.7 8000]
… W: Some index files failed to download. They have been ignored, or old ones used instead.

and same for sudo apt upgrade or sudo apt install ...:

0% [Waiting for headers]
Err:N http://archive.ubuntu.com/ubuntu xenial/pocket arch name arch version
Connection failed [IP: 10.13.3.7 8000]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/….deb Connection failed [IP: 10.13.3.7 8000]
E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

Is it possible to work without internet and get packages from local squid-deb-proxy cache?

How to get Data of the product without using submit_url in adminhtml. Magento2

I’m want to get data from the grid specific of the specific product when I click on the Accept Button (name of accept button is save) it goes to submit_url and get the data of the product while when I click on the Reject Offer (name of the reject button is save_and_continue) I want to go to another class but it goes to the same class as Accept Button goes mean goes to submit_url now to solve this I tried in RejectButton.php below code

class RejectButton extends GenericButton implements ButtonProviderInterface {     /**      * @return array      */     public function getButtonData()     {         return [             'label' => __('Reject Offer'),             'class' => 'reject',             'on_click' => sprintf("location.href = '%s';", $  this->getUrl('xyz/index/rejectoffer')),             'sort_order' => 70         ];     } } 

after that the reject button goes perfectly to my desired class but now issue is I cannot get the data of the product how can I solve my this problem? my ui_component code is

<?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">makeanoffer_edit.makeanoffer_data_source</item>             <item name="deps" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>         </item>         <item name="label" xsi:type="string" translate="true">Make An Offer</item>          <item name="config" xsi:type="array">             <item name="dataScope" xsi:type="string">data</item>             <item name="namespace" xsi:type="string">makeanoffer_edit</item>         </item>         <item name="template" xsi:type="string">templates/form/collapsible</item>          <item name="buttons" xsi:type="array">             <item name="back" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\BackButton</item>             <!-- <item name="delete" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\DeleteButton</item> -->             <item name="reset" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\ResetButton</item>             <!-- <item name="save_and_continue" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\RejectButton</item> -->             <item name="reject" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\RejectButton</item>             <item name="save" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\AcceptButton</item>             <!-- <item name="accept" xsi:type="string">PME\MakeAnOffer\Block\Adminhtml\MakeAnOffer\Edit\AcceptButton</item> -->          </item>             </argument>     <dataSource name="makeanoffer_data_source">         <argument name="dataProvider" xsi:type="configurableObject">             <argument name="class" xsi:type="string">PME\MakeAnOffer\Model\MakeAnOffer\DataProvider</argument>             <argument name="name" xsi:type="string">makeanoffer_data_source</argument>             <argument name="primaryFieldName" xsi:type="string">makeanoffer_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="makeanoffer/index/acceptoffer"/>                 </item>             </argument>             <!--  <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>                 </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="general">         <argument name="data" xsi:type="array">             <item name="config" xsi:type="array">                 <item name="label" xsi:type="string"/>             </item>         </argument>         <field name="makeanoffer_id">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="visible" xsi:type="boolean">false</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="product_name">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Product Name:</item>                     <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">makeanoffer</item>                 </item>             </argument>         </field>         <field name="name">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="label" xsi:type="string">Customer Name:</item>                       <item name="visible" xsi:type="boolean">true</item>                     <item name="dataType" xsi:type="string">text</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="disabled" xsi:type="boolean">true</item>                     <item name="source" xsi:type="string">makeanoffer</item>                     <item name="validation" xsi:type="array">                         <item name="required-entry" xsi:type="boolean">false</item>                     </item>                 </item>             </argument>         </field> 

Install without Bootstrap CDN

I have the theme Bootstrap CDN 3.3.6 installed on my site and I use the appearance “Journal”. How not to use the CDN maintaining the appearance “Journal” ? Thank you

enter image description here

  • I download on Bootstrap http://getbootstrap.com/getting-started/#download and I copy the folder in my sub-theme, as you can see on the screenshot.
  • I copy the file overrides-journal.min.css to bootstrap theme of css file my subtheme.
  • I added a few lines in my file bootstrap_subtheme_front_office.info, see the catch.
  • I disabled CDN in subtheme /admin/appearance/settings/bootstrap_subtheme_front_office
  • I deleted the cache.

If I erases the line stylesheets[all][] = css/overrides-journal.min.css the theme works correctly but I want to show the appearance of the theme “Journal”.

If I add the line stylesheets[all][] = css/overrides-journal.min.css the theme “Journal” is not applied.

enter image description here

Leaving an Inn without paying for room

What are the laws in California if someone runs up a bill to the tune of $ 600.12 at a 4star Luxury Inn. Staff notified guests that their credit card was declining and needed them to come down to the lobby asap…but instead the guests took everything from the minibar in their room and snuck out. Now they refuse to answer any phone calls or emails the staff has made since this incident.

Best tools and equipment to digitise film negatives with DSLR, without breaking the bank

I am considering buying Lomography DigitaLIZA film masks for both 35mm and 120mm film to use within my digitisation process, however I am unsure of the best methods around the other areas of my process.

I struggle for back-lighting of the negatives mainly. I have an iPad in which I initially used, showing a blank white screen with my film negative on top and a glass/perspex sheet on top to flatten out. However, I found that upon inspecting the photos of my negatives, I could actually see the pixels of the Retina display in the whiter areas. I have gotten better results with no pixels in the background when lifting the negatives up, away from the screen and resting the setup on top of say a cardboard box, however this can sometimes lead into another problem… Making sure everything is level.

I have seen people use copy stands and film viewing light panels, but from what the products I have viewed this can start to incur great cost.

Does anybody have similar experience with digitising film negatives and a way to do it without breaking the bank?

Proving Big Omega of a polynomial without limits

Here is the definition of $ \Omega$ :

$ f(n) = Ω(g(n))$ iff there exist positive constants $ c$ and $ n_0$ such that $ f(n) \ge cg(n)$ for all $ n\ge n_0$ .

Here is one theorem:

If $ f(n) = a_m n^m + \cdots + a_1 n + a_0$ and $ a_m > 0$ , then $ f(n) = \Omega(n^m)$ .

I want to prove this, without using limits. Despite many hours of searching across the internet, all I could find is proofs using limits. Is there any other way?

File recovery on bootloader unlocked Pixel without flashing

I have a first generation Google Pixel the bootloader of which is unlocked and is running stock Pie. I need to recover deleted files on it because a move operation got effed up by ES File Explorer with confusing dialogs. Performing file recovery requires root, but I don’t want to install a custom ROM. Is there instead a way I can run one in RAM that is delivered to the device over USB?

Disable Office 365 2FA before period of leave without phone?

On enablement of 2FA in Office 365 Admin center, the only offered 2FA methods are

  • Text message
  • Call
  • Notification in Authenticator app
  • Passcode in Authenticator app

Obviously, all of them require me to have my mobile phone with me. But I want to be prepared for period of leave without the phone. Since there is no e-mail 2FA (to another e-mail account) method available, is my only option to temporarily disable the 2FA for my user?

For example for cases where I will get access to a computer to check my e-mails in browser.

my library is showing without pressing the command key, and random mac os files show up

after granting my library access to a mac cleaner, my library suddenly appears in the “go” section. besides that, random files appear in my mac, but the icon is slightly darker. when i open that, it shows that the file is required for mac os and cannot be opened. i’ve changed multiple icons for folders, when i open it, there is a file named “Icon?”. it can’t be opened and when i move it to the trash, my folder icon suddenly disappears. it is bugging me as there are random files that can’t be opened all over my computer. wish there is a way to solve this. thank you![the Icon? picture]1

the library folder appears when i don't press the command key