Which Ubuntu Repository Image Viewer Supports EXIF-based Automatic Image Rotation?

I've used Fastone Image Viewer on MS Windows for a long time.

One of his great features was the automatic rotation of images based on the EXIF ​​attributes.

Which viewer should I use on Ubuntu to get this feature?

git – Synchronize completely the github forked repository?

When I fork a github repository, I have a repository that contains all the branches and tags of the original repository.

Is there a simple way (without writing custom scripts) to resynchronize my fork with the original repository?

The steps in How can I sync my fork without adding a remote? or How to update a forked GitHub repository? synchronize only the main branch …

web development – How to use a git repository to control the version of an entire website, including databases created with phpmyadmin?

In the past, I did not use git and had just created my local web projects on my computer with XAMPP. Thanks to this, I could create databases via phpmyadmin and simply save my website files in the htdocs folder (F: xampp htdocs). After that, I just saw the result in my browser using localhost.

Now I want to control my version of my new web project with git (I've already learned the basics). But the problem is that I do not know how to control the version of the whole site, including my databases, which are stored in a completely different folder (F: xampp mysql data).

Do I need to control the version of the entire xampp folder? Or is it even possible to control database versions?

information architecture – Content system templates repository

Is there a template library for content systems?

I think content systems for group interaction such as wikis, forums (Reddit style or traditional), message feeds, discussions (Slack), blogs, link directories (Yahoo / DMOZ) and Q & A (like StackExchange) are not fundamentally different from each other.

They can be modeled as composed of shared "classes" of objects (publication, comments, likes, etc.) with different relationships connecting them.

design – Where would you handle the exceptions, the controller, the service, the repository?

I've had this dilemma every now and then whenever I have to design or start a new project from scratch.

I particularly like the way Spring Framework is organized in terms of traditional software models, such as services, repositories, and so on. By reading and browsing community projects written in Spring and, for example, Nodejs (two absolutely different environments), the design APIs differ in several ways, but the one this article focuses on is exception handling.

Imagine that we reach a specific resource through an HTTP request. It will go first to the controller, assuming no middleware is in place, service, repository if any, then return to the controller. But what if the service should generate an error or if the custom implementation of the repository should generate an error?

I've seen implementations of both types:

  1. Inside the service / repository, returning the actual HTTP error wrapped in a try capture statement like: new BadRequestException (statusCode, message)
  2. Let the exception or error go up until a global middleware catches it and sends it back to the client.

I personally believe that mixing the logical layer (service) and the data layer (repository) with the transport layer (HTTP controller) is an error or a bad choice because you are mixing conceptually different things. And on this last point, relying on a global middleware will require you to specify the status code or to instantiate a class that internally uses the necessary status code and message, again, without any points.

In frameworks or environments that differ from Spring and Nodejs, I've seen both implementations, especially on Nodejs. Nestjs, uses more like a Spring approach and expresses more like the second.

The last question is: what would you prefer to do or what is your preferred way of managing this exception handling?

Better,
Javi.

Keep the engines in the github repository.

Is it a good idea? I believe him. Extraction queries, problems and version history are a great thing.

c # – Using the repository template

First, I hope that adding Bal (Business Access Layer) and Dal (Data Access Layer) on behalf of classes are just examples. Because it's really a bad naming convention I think. Your layer name is enough to understand it.

And for your question, exactly what you need to do is create UserTypeRepositoryDal and UserTypeBal. As you think, if you do not do it, you can not directly get the list of types of users, otherwise you would add another class, which would be contrary to the principle of sole responsibility (SRP). In addition, each development on Type of user will not be placed on the appropriate class.

Beyond, you can add public UserType UserType {get; together; } sure User entity same there is FK_UserType. This is a good way to handle 1-1 or 1-n relationships. It looks like :

Public class User
{
public int Id {get; together; }
public string Name {get; together; }
public int FK_UserType {get; together; }
public UserType UserType {get; together; }
}

You can charge Type of user in User object using FK_UserType. If you use ORM as an Entity Framework, it can do it for you.

This method is suitable for handling 1-1 and / or 1-n relationships. If you have an n-n relationship, you need the relationship table and its Bal and Dal classes.

In addition, the design of your repository and your feature class should not depend on whether you use store procedures.

And, to avoid creating too many repository classes, I strongly recommend Generic repository template.

Use Jenkins to update the Git repository on a Web server

I have a web development server with different web directories configured as virtual hosts. My plan was to allow developers to validate their changes on Gitlab, then use Jenkins to clone the branch on the web server to serve the sites.

Is this a good practice? What is the best way / other way to do it?

Run shell:
ssh in the server
Git Clone

c # – Repository Template with ADO.NET Work Unit

Iam implements concrete access to MySQL data (ADO.NET) for a simple abstract data layer. I have so simple "Template" and repository interface "IModelRepository". Now, I am creating a concrete implementation of the repository for the MySQL database.

The problem is that I want to use the transactions. Thus, each repository method opens the connection to the database only for this operation and closes it immediately afterwards. And also, I want to be able to call the method to use an existing connection with an existing transaction in order to validate or cancel its modifications later.

public class model
{
public long id {get; together; }
}

public interface IModelRepository
{
GetById template (long identifier);
}

So I have this DbSession class which is IDisposable and contains IDbConnection and UnitOfWork

Public class DbSession: IDisposable
{
private readonly IDbConnection _connection;
read-only private UnitOfWork _unitOfWork;

Public DbSession (IDbConnection connection)
{
_connection = connection;
_connection.Open ();
_unitOfWork = new UnitOfWork (connection);
}

public UnitOfWork UnitOfWork => _unitOfWork;

public void Dispose ()
{
_unitOfWork.Dispose ();
_connection.Dispose ();
}
}

public interface IUnitOfWork: IDisposable
{
IDbConnection Connection {get; }
IDbTransaction Transaction {get; }
empty Begin ();
void Commit ();
cancel the restore ();
}

Public sealed class UnitOfWork: IUnitOfWork
{
IDbConnection _connection private;
IDbTransaction private _transaction;

Internal UnitOfWork (IDbConnection connection)
{
_connection = connection;
}

public IDbConnection Connection => _connection;
public IDbTransaction Transaction => _transaction;

null public Begin ()
{
_transaction = _connection.BeginTransaction ();
}

public void Commit ()
{
_transaction.Commit ();
Dispose ();
}

public cancellation canceled ()
{
_transaction.Rollback ();
Dispose ();
}

public void Dispose ()
{
_transaction? .Dispose ();
_transaction = null;
}
}

For a concrete connection to the database, I have DbAccessor that creates DbSession:

public interface IDbAccessor
{
DbSession CreateSession ();
}

Public class DbAccessor: IDbAccessor
{
private readonly string _connectionString;

public DbAccessor (credentials DbCredentials, IConnectionStringBuilder customConnectionStringBuilder = null)
{
if (credentials.ConnectionString! = string.Empty)
this._connectionString = credentials.ConnectionString;
other
this._connectionString = customConnectionStringBuilder! = null?
customConnectionStringBuilder.BuildConnectionString (credentials):
new ConnectionStringBuilder (). BuildConnectionString (identification information);
}

public DbSession CreateSession ()
{
var connection = new Devart.Data.MySql.MySqlConnection (_connectionString);
return new DbSession (connection);
}
}

Now, the repository implementation takes something that I've called IConnectionContextProvider, which is responsible for creating IConnectionContext.

IConnectionContext is then responsible for providing a unit of work to the repository methods and is available. So there is a distinction between the fact that my connection context must be a connection without using only transactions or keeping that connection with transactions for more methods. Like that:

public interface IConnectionContextProvider
{
IConnectionContext Get ();
}

public interface IConnectionContext: IDisposable
{
IUnitOfWork GetUnitOfWork ();
}

I have a simple connection context and its provider:

Public class SimpleConnectionContext: IConnectionContext
{
private read-only IDbAccessor _dbAccessor;
private DbSession _dbSession;

public SimpleConnectionContext (IDbAccessor dbAccessor)
{
_dbAccessor = dbAccessor;
}

IUnitOfWork public GetUnitOfWork ()
{
_dbSession = _dbAccessor.CreateSession ();
return _dbSession.UnitOfWork;
}

public void Dispose ()
{
_dbSession? .Dispose ();
}
}

Public class SimpleConnectionContextProvider: IConnectionContextProvider
{
private read-only IDbAccessor _dbAccessor;

public SimpleConnectionContextProvider (IDbAccessor dbAccessor)
{
_dbAccessor = dbAccessor;
}

public IConnectionContext Get ()
{
return new SimpleConnectionContext (_dbAccessor);
}
}

And I have a connection context of the work unit and its provider:

Public class UnitOfWorkConnectionContext: IConnectionContext
{
read-only private IUnitOfWork _unitOfWork;

public UnitOfWorkConnectionContext (IUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork;
}

IUnitOfWork public GetUnitOfWork ()
{
return _unitOfWork;
}

public void Dispose ()
{
}
}

Public class UnitOfWorkConnectionContextProvider: IConnectionContextProvider
{
read-only private IUnitOfWork _unitOfWork;

public UnitOfWorkConnectionContextProvider (IUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork;
}

public IConnectionContext Get ()
{
returns the new UnitOfWorkConnectionContext (_unitOfWork);
}
}

And finally, there is the repository:

Public class ModelRepository: IModelRepository
{
readonly private IConnectionContextProvider _connectionContextProvider;

public ModelRepository (IConnectionContextProvider connectionContextProvider)
{
_connectionContextProvider = connectionContextProvider;
}

public model GetById (long id)
{
using (var connectionContext = _connectionContextProvider.Get ())
{
var unitOfWork = connectionContext.GetUnitOfWork ();

// NOT STILL IMPLEMENTED

throws new NotImplementedException ();
}
}
}

Now, with that, I can create more templates, more repositories and some custom services, where I could perform some operations on these repositories while having a work unit transaction. And I can also directly use domain logic repositories by initializing them only at the beginning.
Example what I mean:

Creating a repository for use during the entire application being run:

var accessor = new DbAccessor (identification information);
IConnectionContextProvider connectionContextProvider = new SimpleConnectionContextProvider (accessor);
IModelRepository repository = new ModelRepository (connectionContextProvider);

And also using this repository method for multiple database editions with a transaction:

var accessor = new DbAccessor (identification information);
using (var session = accessor.CreateSession ())
{
var unitOfWork = session.UnitOfWork;
unitOfWork.Begin ();

IConnectionContextProvider contextProvider = new UnitOfWorkConnectionContextProvider (unitOfWork);
SecaproDataModel.Repositories.IFirmyRepository repository = new Repositories.FirmyRepository (contextProvider);

try
{
// repository.DoStuff ();
// otherRepository.DoStuff ();
unitOfWork.Commit ();
}
capture
{
unitOfWork.Rollback ();
throw;
}
}

I want to excuse myself for my explanation, English is not my first language. I would like to know if I did not get lost while programming and there is a more elegant way to get the same functionality. Thank you.

Daily sending of the validation (even in a dirty state) to the remote git repository without polluting it with many validations of work in progress

We have a team of an active developer and two casuals. We set up a new project and after reading https://nvie.com/posts/a-successful-git-branching-model, I was seduced by the idea of ​​keeping only the master and develop branches in the remote git repository. – * branches locally to keep a clean remote.

The manager wants developers to send daily commits in the remote control so as not to lose code, even if its condition is dirty or in progress. This seems incompatible with the previous link flow.

Pushing commits every day in the remote will certainly pollute it with meaningless commits. After a few days, we will have several commits with more or less the same title, which will only be a kind of code backup.

I've thought of a way to edit commits remotely to keep only one remote job being validated, but that does not seem possible or advisable.
I've also thought to forcefully push the option of the branch to be able to modify locally and push my branch towards the remote control. I'm not sure it's advisable.

Is there an appropriate way to transmit the code to the remote control daily without creating multiple commits and potentially polluting the remote repository?