command line – multiverse repository update warning message

for installing MS-core-fonts i just added following repository to ubuntu 21.04:

sudo add-apt-repository multiverse

now, everytime i run apt update command i get following warning message several times:

W: Skipping acquire of configured file 'multiverse/binary-amd64/Packages' as repository 'http://archive.canonical.com/ubuntu hirsute InRelease' doesn't have the component 'multiverse' (component misspelt in sources.list?)

i noticed multiverse repository was active in ubuntu software even before adding that repository but there was not such an error before.

So, what is the problem now with multiverse repository?

Getting “fatal: repository not found” when “git clone” a URL

This must be something basic but I can’t figure it out. I have a github URL that has the form “https://…/tree/main”. How do I download the contents? In response to

git clone https://.../tree/main

I get

fatal: repository 'https://.../tree/main/' not found

When I do

git clone https://.../

I get the contents of the root folder but not the subfolder that I want.

What am I doing wrong?

architecture – Some thoughts on the Repository pattern

Until this moment, I have seen a lot of variations and combinations of the Repository pattern, implementations that simply queried the required information, some used something like a mapper, some used something called Units of Work, and some used something called CQRS that separated the reads from the writes, updates and deletes.

A common thing was that the interface of the repository was defined in the domain/entity layer of the application and implemented in the persistence layer, BUT…
There are some things I couldn’t get my head around, because almost if not all of these tutorials / articles I’ve read on this topic, involved the using of a framework or something that I wasn’t familiar with.

I’m aware that the example is stupid simple and in a real life scenario it will be an overkill to use this, or perhaps any pattern, but I’ll try to keep this short not to waste anyone’s time with complex examples that could lead to ambiguity and interpretation. I’m also aware of the fact that the answer depends on the complexity of the domain problem; we are talking general here. Another thing is that we are doing a DDD-style implementation, so you should make some assumptions about the architecture of this application based on DDD.

So with that said let’s imagine a simple application with an layered-architecture, perhaps an simple API that lists the products inside an warehouse for example, let’s say we have an Item entity with its corresponding Value Objects (like ID, Name, Description), the point of this API is that it lists the items along with the attributes in maybe a JSON format and it provides a way to select specific data depending on some filters/conditions.

With that out of the way the questions:
Imagine we have an “ IItemRepo ” interface implemented by the Persistence mechanism.

Where this object will be instantiated?

Who will have knowledge of this object?

How the information that it provides will end up be used by the
Domain/Application layer? Factories, but how exactly?

Will this object be passed around from layer to layer? Aren’t DTO’s
the only objects allowed this kind of behavior?

There may be also other questions based on your answers.

ubuntu – Cannot install boost-win32.yml as updating apt-get repository fails

ubuntu – Cannot install boost-win32.yml as updating apt-get repository fails – Server Fault

postgresql – Installing Postgres 14 on debian buster from postgres apt repository

I’m trying to install the recently released Postgres 14 beta into a debian buster based docker image from postgres’ apt repository. I’m using the following docker file:

FROM node:15.4-buster AS build
RUN apt-get install curl ca-certificates gnupg
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN apt-get update
RUN apt install -y --no-install-recommends -t buster-pgdg postgresql

Postgres 14 seems to be present in the repository, but I can’t figure out what I need to do to set debian up to install it.

Is it better to try to install this from the debian experimental repository?

web api – Repository Pattern to support Bounded Context

I am building a REST Api from scratch so i am overthinking and revisiting various approaches and best practices.

I have a Materials repository that serve all the sub-domains of our logic.

Also i have a Sales and Inventory sub domains that both relate to the Materials.

I found this question that evolves exactly around what i am doing and after going and now another question arises for me in regards to Repository pattern.

Let’s consider the following REST Api routes:

  1. /masterdata/materials. Provide a list of materials and their master data.
  2. /sales/materials. Provide Sales per material in different granularoty.

Where the methods that satisfy /sales/materials have to be implemented?

In the Repository of Materials or in the Sales repository?

php – Should my class “data” dependency be a repository, adapter or another pattern?

I have a class called CheckUserUltraSecretInformation that is kind of a Use Case in “clean architecture terms”, this class has a dependency that is responsible for retrieving a couple of information from a cache “provider”, such as Redis, this is a crucial business rule for this use case, in order for the user to retrieve its “ultra-secret information” the cached information must exist.

since “retrieving the data from the cache” it’s a data layer, my first thought was to use the repository pattern, but that implicates that I also have an Entity or a “Domain Model” for this repository, the thing is: although I can picture a “CachedUserInformation” object and its properties I cannot see the CachedUserInformation as an entity, because it’s not a “core” object of my application.

I feel like this is more of a rule of the use case than an entity, but I cannot just return an array of data from this “repository”.

should I just call it CachedUserDataAdapter and return the CachedUserInformation object?

what are some good approaches for this scenario?

my code:

interface CachedUserDataRepository {
    function findByDocument(string $document): CachedUserInformation;
}

class CheckUserUltraSecretInformation {

    public function __construct(
        private CachedUserDataRepository $cachedDataRepository
    )
    {
    }

    public function Check(string $document)
    {
        $cachedUserData = $this->cachedDataRepository->findByDocument($document);

        if(empty($cachedUserData)) {
            throw new Exception('User Cached information not found, cannot proceed');
        }
    }
}

class CachedUserInformation {
    private string $id;
    private string $secretInformation;
}

How can I remove a previously public but now private GitHub repository from showing up on Google Search?

My GitHub repository named “mywebsite-io” (not the actual name) was a public repository for a few months and was indexed to Google Search before I converted it to private.

When searching “mywebsite.io” or “mywebsite-io”, the Github URL to the repository bearing my username and full name still shows up on the Google search results, though clicking the link will return a 404 since the repository is already private.

Is there a way to “unindex” the Google search entry so that searching the project name won’t lead to someone knowing that the website was made by me (i.e. my username and/or full name)?

Thank you.

c# – How to handle validation errors from API response when using repository pattern

I’ve got the following:

Clientside C# application. Contains forms for CRUD operations. It uses an API for all data operations.
Input is validated on the client, and obviously also on the server (API).

I use the repository pattern for calling my API. That’s because I want to communicate with data layers via interfaces, and want to be able to have multiple data sources for one repository interface. Like:

ICustomerRepository 
  - bool CreateCustomer(Customer customer);
  - Customer GetCustomer(int id);
  - bool UpdateCustomer(Customer customer);
  - bool DeleteCustomer(int id);

APICustomerRepository : ICustomerRepository 

DatabaseCustomerRepository : ICustomerRepository

So far the context of the question.

When the API is called by the client, and a validation error would occur (or maybe some server error that is put in the response data), the errors have to be handled on the client.
API responses are JSON, and when it’s an error response, it’s a JSON structure like {name: "Name is required"}.
The point is: what is the best approach to give those errors back to the code that uses my repository classes.

As you can see, I return boolean values from repository methods which indicate success/failure.
I would like to not just return a success/fail bool, but the actual errors that came via the API response.
So, I could change the design and modify the method signatures to return a collection of errors. But the problem is, that ‘read’ operations like GetCustomer(int id) already need their return value to return the actual data on success. The return value of the method cannot be used for error handling anymore.

Solutions I can think of:

  1. Throw exceptions for everything. But this seems ugly. Because in my understanding there’s a distinction between exceptional errors (like no internet connection while calling API, or API server is down), and non exceptional errors (like just wrong input that somehow slipped through the clientside input validation). Although the non-exceptional errors I mention are rare, and would theoretically never occur on the serverside validation.

  2. Wrapping the data (return value) of repository methods in a wrapper object, that can also contain a collection of error messages.

  3. After API response that indicates failure (and thus contains the error messages), save the messages in a class property of the repository class, and the code thet uses the repository has to check explicitly if there are errors stored in that class. (Seems to be ugly too).

What’s the best or most common approach?

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheapest USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Proxyti.com Buy Quality Private Proxies