xposed framework – How to determine the boot order of auto-starting apps?

Some apps boot and run in the background when an Android phone boots. WeChat is one example. It starts automatically so that the user can receive messages in real time. My question is how to view and change the boot order of all auto-starting apps. Or else is it random?

The motivation for asking is that I installed Xposed and wanted to change some information of my phone. But unfortunately WeChat sometimes boots before Xposed and thus bypasses the Xposed hooks. I tried very hard to solve this, but to no avail. So any suggestions?

Failing to install .NET Framework 4.8 from winetricks

I want to run an .exe app to my PC but it requires NET Framework 4.8 to be installed. I have installed in the past wine. Now as I have read from others I opened the terminal and Ι wrote this command:

$ winetricks

After that I followed this path:

  1. enter image description here

  2. enter image description here

  3. enter image description here

    Some warnings???

  4. enter image description here

  5. enter image description here

    Set up of NET Framework:

  6. enter image description here

  7. enter image description here

  8. enter image description here

I cannot understand what went wrong. Before doing that it successfully installed dotnet 40.
Do you have any suggestions what went wrong and what should I do to fix this problem?

Thank you

.net – As versões mais recentes (depois da versão 5.0.0 ) do entity framework core estão apresentando falha ao instalar no meu projeto. Este é um erro geral?

Ao tentar instalar a versão mais recente do Entity Framework Core em um projeto, usando o Visual Studio 2019, via comando Install-Package Microsoft.EntityFrameworkCore, me deparo com a seguinte resposta via console.

Tentando coletar informações de dependências do pacote
‘Microsoft.EntityFrameworkCore.5.0.3’ em relação ao projeto
‘ControleGeralFarmácia’, visando ‘.NETFramework,Version=v4.7.2’ A
coleta de informações de dependência levou 0,2 ms Tentando resolver
dependências do pacote ‘Microsoft.EntityFrameworkCore.5.0.3’ com
DependencyBehavior ‘Lowest’ Resolver as informações de dependência
levou 0 ms Resolvendo ações para instalar o pacote
‘Microsoft.EntityFrameworkCore.5.0.3’ Ações resolvidas para instalar o
pacote ‘Microsoft.EntityFrameworkCore.5.0.3’ Recuperando o pacote
‘Microsoft.EntityFrameworkCore 5.0.3’ de ‘Nuget’. Falha na instalação.
Revertendo… O pacote ‘Microsoft.EntityFrameworkCore.5.0.3’ não
existe no projeto ‘ControleGeralFarmácia’ O pacote
‘Microsoft.EntityFrameworkCore.5.0.3’ não existe na pasta
‘C:UsersaswsourcereposControleGeralFarmáciapackages’ Executar
ações do nuget levou 541 ms Install-Package : Não foi possível
instalar o pacote ‘Microsoft.EntityFrameworkCore 5.0.3’. Você está
tentando instalar este pacote em um projeto que se destina a
‘.NETFramework,Version=v4.7.2’, mas o pacote não contém nenhuma
referência de assembly ou arquivo de conteúdo que seja compatível com
essa estrutura. Para obter mais informações, entre em contato com o
autor do pacote. No linha:1 caractere:1

  • Install-Package Microsoft.EntityFrameworkCore
  •   + CategoryInfo          : NotSpecified: (:) (Install-Package), Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    

No entando quando tento instalar especificando qualquer versão igual o abaixo da 3.1.12, o pacote se instala sem mais problemas.

applications – how to implement 3d framework in my android studio cube app

welcome,
i made a cube solver app using logic,now i need to make a graphics like if i wan’t to make the cube move U’ the graphics cube will move
i have not tried as i don’t know what to try
is there a frame work i could implement or a .jar file or dependency

youtube video 1

link 2

link 3

how to use these

Why does my Web Api PUT using Entity Framework 6 keep writing new duplicate records rather than updating them?

I created my database in Entity Framework, and I also created a Web Api that uses Entity Framework. When I perform a GET or a POST (ADD) everything works great, but When I do a PUT (Update) my record is not updated, it is added as if I performed a Post. I think that the following does not recognize that the Entity has been modified:

db.Entry(contact).State = EntityState.Modified;

So, here is my entire Entity Contact.cs created by Entity Framework:

  public partial class Contact
    {
        public int Contact_ID { get; set; }
        public int Dataset_ID { get; set; }
        public string Booth_UCID { get; set; }
        public string First_Name { get; set; }
        public string Last_Name { get; set; }
        public string Title_Role { get; set; }
        public int Contact_Type_ID { get; set; }
        public string Email { get; set; }
        public string Phone_Number { get; set; }
        public string Email_2 { get; set; }
        public string Phone_Number_2 { get; set; }
    
        public virtual Contact_Type Contact_Type { get; set; }
        public virtual Dataset Dataset { get; set; }
    }

Here is the Contact model from my application that is being sent to the Web Api:

public class Contact
    {
        public int Contact_ID { get; set; }
        public int Dataset_ID { get; set; }
        public string Booth_UCID { get; set; }
        public string First_Name { get; set; }
        public string Last_Name { get; set; }
        public string Title_Role { get; set; }
        public int Contact_Type_ID { get; set; }
        public string Email { get; set; }
        public string Phone_Number { get; set; }
        public string Email_2 { get; set; }
        public string Phone_Number_2 { get; set; }
    }

And here is my MVC Application to Edit Contact

 (HttpPost)
        public ActionResult EditContact(Contact contact)
        {
            using (var client = new HttpClient())
            {

                client.BaseAddress = new Uri("http://localhost:4251/");

                //HTTP POST
                // var postTask = client.PostAsJsonAsync<Dataset>("api/datasets/1", dataset);
                var postTask = client.PostAsJsonAsync("api/contacts/2", contact);
                postTask.Wait();

                var result = postTask.Result;
                if (result.IsSuccessStatusCode)
                {
                    return RedirectToAction("Index");
                }
            }

            ModelState.AddModelError(string.Empty, "Server Error. Please contact administrator.");

            return View(contact);
        }

and lastly, here is my Web Api with the Entity Framework scafolding: this is straight out of the box, when I created my Web Api

 // PUT: api/Contacts/5
        (ResponseType(typeof(void)))
        public async Task<IHttpActionResult> PutContact(int id, Contact contact)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != contact.Contact_ID)
            {
                return BadRequest();
            }

             
            

            db.Entry(contact).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ContactExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }

I am at a loss as to what I could possible do. I feel like I should just abandon the Web Api with Entity Framework and just go ahead build an Empty Web Api where I control the update. And if so, how will this be different?

plugin development – Upload An Image File Using Codeception Framework For Acceptance Testing on WordPress

How can I use codeception framework(acceptance testing), to upload an image by using the ‘File Uploader’ Field? Documentations are provided, but not specific to my question. My scenario is, I am testing a plugin. Now the plugin has an ‘image upload’ field. I am able to click it using the framework. But unfortunately, as the local machine file interface pops up, I am unable to take any actions with my local machine, because there are not enough methods that will make these actions, with the codeception framework. Kindly a workaround solution would be very helpful from the experts.

programming practices – Looking for help with basic architecture for MVC, Entity Framework application

I’ve begun a new MVC/EF application and I’d like to start this one off on the right foot. I’ve used a generic repository pattern before but in trying to find answers to problems, I’ve seen loads of people saying that this isn’t necessary with EF as it is a level of abstraction too far.

What would the ideal setup be? Should you be querying directly in the controller? Do functions also go in the controller, or should they be in the model? I liked the generic repository pattern because i didn’t have to keep writing similar queries for each db table, is there a better way of doing that to achieve the same goal?

Has anyone come across a really good example of an ideal MVC/EF setup on Github or similar that I could take a look at?

Securing the REST APIs – Security Framework (Technology) V/S Custom

There are many ways to secure the REST APIs, from authentication and authorization view point. Below are the two which I know so far:

  1. Using existing token based IAM solutions like Okta, KeyCloak, Auth0, etc.

    • Pros: Already proven solution, feature rich, easy to start and run
    • Cons: Difficult to customize as per needs as the application grows, application becomes dependent on these third party solutions
  2. Building custom solution using filters, interceptors, and JWT (or opaque tokens)

    • Pros: Easy to customize as per needs as we have full control
    • Cons: Chances of error/leaks increases, amount of code to write and manage increases

Above are the points as per my understanding of securing the REST APIs, using token based authentication and authorization. I want to know –

  1. Which of these (or any other) are widely accepted and used in production environments?
  2. Which from these are best suited for small to mid scale projects?
  3. Is there any other way/solution (token based or anything else) to secure the REST APIs?

entity framework – C# Winforms App ,EF6, DB First with Auto Mapper Generic Repository and UOW context is not updated automatically when database is changed externally

I’ve started to work on a single user c# winforms application, with EF6 db first approach, AutoMapper, Generic Repository and UnitOfWork. They have been previously implemented by others former colleagues . I’m not very experienced with those concepts but I have read a lot of links.
The main issue is now that the single user c# app needs to be updated for multiuser environment. Using the current implementation , the external changes(like update operations) performed on database are not visible inside de controller.

I’ve tried using _unitOfWork.Context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, _tableRepository.FindAllInContext()); to refresh the context but I think this is not a good option, because if I try to update a table column value after refresh, the action will not be saved in database.

 public interface IDbEntity
    {
        int Id { get; set; }
        bool IsDeleted { get; set; }
    }
 
 public interface IRepository<T, T1>
        where T : class, IDbEntity
        where T1 : class, IDbEntity
    {
        int Add(T1 newEntityViewModel);
        void AddRange(List<T1> newEntities);
        void Remove(int id);
        void RemoveFromDb(int id);
        List<T1> Find(Expression<Func<T1, bool>> predicate);
        T1 FindById(int id);
        List<T1> FindAll();
        T FindByIdInContext(int id);
        int GetNextId();
        List<T> FindAllInContext();
    }
    
    internal class DbRepository<T, T1> : IRepository<T, T1>
        where T : class, IDbEntity
        where T1 : class, IDbEntity
    {
        protected ObjectSet<T> _objectSet;
        protected List<T1> _internalList;
        protected ObjectContext _context;

        public DbRepository(ObjectContext context)
        {
            try
            {
                
                _internalList = new List<T1>();
                _objectSet = context.CreateObjectSet<T>();
                _context = context;
            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
                throw;
            }
        }



        public int Add(T1 newEntityViewModel)
        {
            try
            {
                var entityDto = AutoMapperConfiguration.GetMapperConfiguration().Map<T1, T>(newEntityViewModel);
                _objectSet.AddObject(entityDto);

                _context.SaveChanges();
                
                //check id 
                return entityDto.Id;
            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
                throw;
            }
        }


        public List<T1> Find(Expression<Func<T1, bool>> predicate)
        {
            try
            {
                var listT1 = AutoMapperConfiguration.GetMapperConfiguration().Map<List<T1>>(_objectSet.Where(q => !q.IsDeleted));
                var result = listT1.Where(predicate.Compile()).ToList();

                return result;
            }
            catch (Exception ex)
            {
               log.Error(ex.Message);
                throw;
            }
        }

        public List<T1> FindAll()
        {
            try
            {
                var listT1 = AutoMapperConfiguration.GetMapperConfiguration().Map<List<T1>>(_objectSet.Where(q => !q.IsDeleted));
                return listT1;
            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
                throw;
            }
        }

    }
    
    
    public interface IUnitOfWork
    {
        IRepository<User, User_ViewModel> Users { get; }
        IRepository<Type, Type_ViewModel> Types { get; }
        
        /// and a lot more repositories

        ObjectContext Context { get; }
        void Commit();
    }
    
    
    internal class DbUnitOfWork : IUnitOfWork
    {
        private DbRepository<User, User_ViewModel> _users = null;
        private DbRepository<Type, Type_ViewModel> _types = null;
       
       
       
        private readonly ObjectContext _context;
        private readonly EntityConnection _connectionString;

   
        public ObjectContext Context { get { return _context; } }

        public DbUnitOfWork(EntityConnection connectionString)
        {
            try
            {
                _connectionString = connectionString;
                _context = new ObjectContext(connectionString, true);
                _context.ContextOptions.LazyLoadingEnabled = true;
            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
                throw;
            }
        }

        public IRepository<User, User_ViewModel> Users
        {
            get
            {
                return _users ?? (_users = new DbRepository<User, User_ViewModel>(_context));
            }
        }


        public IRepository<Type, Type_ViewModel> Types
        {
            get
            {
                return _types ?? (_types = new DbRepository<Type, Type_ViewModel>(_context));
            }
        }



        public void Commit()
        {
            try
            {
               _context.SaveChanges();

            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
                throw;
            }
        }

    }
    
    DbController.cs
    public partial class DbController
    {
        protected readonly IUnitOfWork _unitOfWork;
        
        protected readonly IRepository<User, User_ViewModel> _userRepository;
        protected readonly IRepository<Type, Type_ViewModel> _typeRepository;
        
        
        public SafeIOController(IUnitOfWork unitOfWork)
        {
           

            _unitOfWork = unitOfWork;
            
            _userRepository = _unitOfWork.Users;
            _typeRepository = _unitOfWork.Types;
            
        }

        public void Save()
        {
            _unitOfWork.Commit();
        }
    }
    Controller_User.cs
    public partial class DbController
    {
       

        public List<User_ViewModel> GetAllUsers()
        {
            try
            {
                
                return _userRepository.FindAll();

            }
            catch (Exception ex)
            {
                _exHandler.LogErrorMessage(Constants_Exception.DB_EXCEPTION_MSG, ex, _exHandler.GetCurrentMethod());
                throw;
            }
        }


        
    }
    
    and then in winforms app 
    
            _unitOfWork = new DbUnitOfWork(connectionString);
            _controller = new DbController(_unitOfWork);

How can I properly implement unitOfWork in order to have the latest information from db inside my context?