macbook pro – third party hdmi to vga adapter does not work

I recently bought an HDMI to VGA adapter and a VGA cable, and when I plug it in it doesn’t work properly. I was having problems so I read that the HDMI port on mac does not work, and that you need to use the mini DisplayPort/thunderbolt ports on your mac and that the adapter has to made by apple for it to work properly, is the last statement true? and if it is do apple sell mini DisplayPort to DisplayPort cables or adapters?

java – E/RecyclerView: No adapter attached; skipping layout

mi problema esque en mi lista aperece en blanco y tengo este error: es el siguiente tengo un RecyclerView para trae el formato Json de la web el que intento pasarle los parametros del adaptador ymostrar una lista de productos asignados El tema esta en que no me muestra la lista solo se queda en blanco ,el siguiente error E/RecyclerView: No adapter attached; skipping layout
al ver el error en el terminal me sale clase protected void Oncreate()
….


MainActivity();

package proyecto_ventas.activities;

import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModel;
import androidx.loader.content.AsyncTaskLoader;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;


import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

import idat.edu.pe.proyecto_ventas.R;
import idat.edu.pe.proyecto_ventas.adapters.ProductosAdapter;
import idat.edu.pe.proyecto_ventas.api.Api;
import idat.edu.pe.proyecto_ventas.api.RequestHandler;
import idat.edu.pe.proyecto_ventas.models.Productos;



public class MainActivity extends   AppCompatActivity  {

    private RecyclerView mRecyclerView;
    private RecyclerView.Adapter mAdapter;
    private RecyclerView.LayoutManager mLayoutManager;
        List<Productos> productosList;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mRecyclerView = findViewById(R.id.recyclerViewProductos);
        productosList = new ArrayList<>();

        readProductos();

    }

            private void readProductos(){
                PerfomNetWordRequest request = new PerfomNetWordRequest(Api.URL_READ_PRODUCTOS,null,Api.CODE_GET_REQUEST);
                request.execute();
            }


            private void  refreshContenidoList(JSONArray contenido) throws  JSONException{
            //limpiamos los productos anteriores
                productosList.clear();


                //recibimos la respuesta del json
                for(int i=0; i < contenido.length(); i++){
                    //obtenemos los json de nuestros productos
                    JSONObject obj = contenido.getJSONObject(i);
                    productosList.add(new Productos(
                            obj.getLong("id"),
                            obj.getString("titulo"),
                            obj.getString("descripcion"),
                            obj.getString("contenido"),
                            obj.getString("imagen"),
                            new BigDecimal(obj.getString("precio")),
                            obj.getDouble("calificacion"),
                            obj.getInt("categoria")

                    ));
                }
                // creamos el adaptador para configurar en la vista del front json
                mLayoutManager = new LinearLayoutManager(this);
                mAdapter = new ProductosAdapter(productosList, R.layout.card_view_productos, new ProductosAdapter.OnclickListener() {
                    @Override
                    public void onItemClick(Productos productos, int position) {

                    }
                }, new ProductosAdapter.OnLongClickListener() {
                    @Override
                    public void onItemClick(Productos productos, int position) {

                    }
                });

                mRecyclerView.setHasFixedSize(true);
                mRecyclerView.setItemAnimator(new DefaultItemAnimator());

                mRecyclerView.setLayoutManager(mLayoutManager);
                mRecyclerView.setAdapter(mAdapter);

            }


        private class PerfomNetWordRequest extends AsyncTask<Void,Void,String> {

            String url;
            HashMap<String, String> params;

            int requestCode;

            PerfomNetWordRequest(String url, HashMap<String, String> params, int requestCode) {
                this.url = url;
                this.params=params;
                this.requestCode = requestCode;
            }
            //la operacion de red realizara en segundo plano
            @Override
            protected String doInBackground (Void...voids){

                RequestHandler requestHandler = new RequestHandler();
                if(requestCode == Api.CODE_POST_REQUEST)
                    return  requestHandler.sendPostRequest(url,params);
                if ((requestCode== Api.CODE_GET_REQUEST))
                    return requestHandler.sendGetRequest(url);
                return null;
            }

            @Override
            protected void onPostExecute(String s) {
                super.onPostExecute(s);
                try {
                    JSONObject object = new JSONObject(s);
                    if (!object.getBoolean("error")){
                        //refrescamos la lista despues de cada operacion.
                        //para tener una lista actualizada
                        refreshContenidoList(object.getJSONArray("contenido"));
                    }
                }catch (JSONException e){
                    e.printStackTrace();
                }
            }



        }
    }

Productos adapter

ProductosAdarpter();

package idat.edu.pe.proyecto_ventas.adapters;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;


import com.squareup.picasso.Picasso;

import java.util.List;

import idat.edu.pe.proyecto_ventas.R;
import idat.edu.pe.proyecto_ventas.api.Api;
import idat.edu.pe.proyecto_ventas.models.Productos;

public class ProductosAdapter extends RecyclerView.Adapter<ProductosAdapter.ViewHolder> {

    private List<Productos>  Lproductos ;
    private int layout;
    private OnclickListener listener;
    private OnLongClickListener listenerLong;

    private Context context;

    //CONSTRUCTOR
    public ProductosAdapter(List<Productos> productos,int layout,OnclickListener listener,OnLongClickListener listenerLong){
        this.Lproductos = productos;
        this.layout = layout;
        this.listener = listener;
        this.listenerLong = listenerLong;
    }


    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        View v = LayoutInflater.from(parent.getContext()).inflate(layout,parent,false);
        ViewHolder  vh = new ViewHolder(v);
        context = parent.getContext();
        return vh;
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
    holder.bind(Lproductos.get(position),listener,listenerLong);
    }


    @Override
    public int getItemCount() {
        return  Lproductos.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder{

        private TextView titulo;
        private TextView descripcion;
        private TextView precio;
        private ImageView imagen;

        //CASTEAMOS LAS INSTANCIAS DEL DESIGN
        public ViewHolder(View v){
            super(v);
            titulo = (TextView)itemView.findViewById(R.id.txtViewTitulo);
            descripcion = (TextView)itemView.findViewById(R.id.txtViewDescripcion);
            precio = (TextView)itemView.findViewById(R.id.txtViewPrecio);
            imagen = (ImageView)itemView.findViewById(R.id.imagenViewProducto);
        }
        //PASAMOS LOS ATRIBUTOS
        public void bind(final Productos productos,final OnclickListener listener,final OnLongClickListener listenerLong){

            titulo.setText(productos.getTitulo());
            descripcion.setText(productos.getDescripcion());
            //convertimos en string el BigDecimal
            String precioConvercion = String.valueOf(productos.getPrecio());
            //Mostramos imagen con el picasso que venga por la api web
            Picasso.get().load(Api.GALERIA + productos.getImagen()).fit().into(imagen);

            itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                  listener.onItemClick(productos,getAdapterPosition());
                }
            });

            itemView.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View view) {

                    listenerLong.onItemClick(productos,getAdapterPosition());
                    return true;
                }
            });

        }
    }
    //CREAMOS CLASES ANONIMAS
    public interface OnclickListener{
        void onItemClick(Productos productos, int position);
    }

    //CREAMOS CLASES ANONIMAS
    public interface OnLongClickListener{
        void onItemClick(Productos productos, int position);
    }

}

drivers – Can’t get RTL8153 Gigabit Ethernet Adapter USB 3.0 working on Ubuntu 20.04

I am striving to get a RTL8153 working.
I can see it as a USB:

~$ lsusb
Bus 002 Device 005: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 002 Device 004: ID 2109:0817 VIA Labs, Inc. USB3.0 Hub             
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 006: ID 13d3:56a2 IMC Networks USB2.0 HD UVC WebCam
Bus 001 Device 004: ID 13fe:6300 Kingston Technology Company Inc. Silicon-Power16G
Bus 001 Device 007: ID 05ac:0250 Apple, Inc. Aluminium Keyboard (ISO)
Bus 001 Device 005: ID 046d:c542 Logitech, Inc. 
Bus 001 Device 003: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 001 Device 010: ID 2109:2817 VIA Labs, Inc. USB2.0 Hub             
Bus 001 Device 009: ID 8087:0026 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I can see the module is loaded, but not used:

~$ lsmod | grep r8152
r8152                  77824  0
mii                    20480  1 r8152

I can see the hardware listed:

~$ lshw -class network
  *-network
       description: Ethernet interface
       physical id: 3
       bus info: usb@2:3.3
       logical name: enx4ce173421ae9
       serial: 4c:e1:73:42:1a:e9
       size: 10Mbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8152 driverversion=v1.11.11 duplex=half firmware=rtl8153b-2 v1 10/23/19 link=no multicast=yes port=MII speed=10Mbit/s

I can see the interface configuration:

~$ ifconfig
enx4ce173421ae9: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 4c:e1:73:42:1a:e9  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I can’t bring the interface up:

~$ sudo ip link set enx4ce173421ae9 up
menks@vivo:~$ ip -br -c link show
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
wlo1             UP             bc:17:b8:14:53:bb <BROADCAST,MULTICAST,UP,LOWER_UP> 
enx4ce173421ae9  DOWN           4c:e1:73:42:1a:e9 <NO-CARRIER,BROADCAST,MULTICAST,UP>

I can see that it is missconfigured:

$ resolvectl status
Link 4 (enx4ce173421ae9)
      Current Scopes: none
DefaultRoute setting: no  
       LLMNR setting: yes 
MulticastDNS setting: no  
  DNSOverTLS setting: no  
      DNSSEC setting: no  
    DNSSEC supported: no  

Any clue about how to configure it?

networking – USB Wifi adapter not working on Ubuntu 20.04 though working on Windows

I got a bluetooth + wifi adapter, when plugged into Ubuntu 20.04, the bluetooth works but wifi adapter is not found. Any ideas on how to resolve this?

The adapter I got is https://www.amazon.co.uk/gp/product/B08GSBYX66/ref=ewc_pr_img_1?smid=A23LZ1Z0HGM689&psc=1

Also I’m using windows + ubuntu dual boot.

If you need extra information please ask me!

DisplayPort to DVI adapter – Super User

DisplayPort to DVI adapter – Super User

networking – How can I install drivers for my USB wifi adapter if I have no internet?

On Ubuntu, no wifi adapters are found. The reason I’m making this post and not just following the 2 million other threads with the same problem is because everyone on them has a built in wifi adapter. On my device, I have some random USB adapter that isn’t showing up in Linux. I’m not sure if that changes anything, but I want to check. My main issue is that I can’t get the drivers for it without the internet. I’m writing this on a separate device. I don’t even know if drivers would change anything so please assist me. Thank you!

clean architecture – Catch “foreign” exception in adapter and convert them in own business exception is a good practice?

I am currently thinking about some design choices regarding exception handling.
My current architecture looks a little like this:

enter image description here

You can see that I have a UI where a try-catch middleware is cathing exceptions like this:

Pseudocode:

catch(CoreUserNotFoundException e)
{
   return 'You provided an invalid user id'
}
catch(CoreToLongException e)
{
   return 'The name is too long'
}
catch(Exception e)
{
   logger.log(e)
   return 'Something went wrong'
}

So only some messages will be returned to the user. All other exceptions are just logged.

Lets say someone wants to add an entity with a user id that has to be validated.
But how do I know weather the user exists or not?
This is done with my business logic. It provides an interface “IUserService” to retrieve a user. The business logic does not care how the app is doing this.
It could get the user via Graph API of Microsoft, or via Auth0 or via Facebook or whatever.
My business logic should work with all kinds of user services.

So in my picture I have a MicrosoftGraph Adapter, that implements the IUserService. This adapter is using my own Graph SDK – this SDK uses the original SDK of Microsoft, but I like my own wrapper and use it in many apps.

In my current design the “MS Graph SDK” throws an Exception if a user does not exist for an id.
This exception is bubbling through my own Graph SDK and caught in the Graph Adapter of my app.

The Graph adapter then transforms this Exception in a CoreUserNotFoundException – the one I am showing to the user:

Pseudocode:

   try {
      user = _userService.getUserById(userId);
   } catch(GraphUserNotFoundException e)
      throw new CoreUserNotFoundException("You provided a bad user id", e);
   }

Of course there are alternative ways:
I could also define an Exception in my Own Graph SDK and re-use this exception through all my projects.
But to show the user a nice message, my UI needed to have a dependency on “Own Graph SDK” because I want to do:

catch(MyOwnGraphSDKUserNotFoundException e)
{
   return 'You provided an invalid user id'
}
catch(Exception e)
{
   logger.log(e)
   return 'Something went wrong'
}

What is probably a bad practice?
In this case I would have to change the UI-code if the Adapter changes, so I am not doing it.

My questions to you:

Was my design choice correct? Or does it seem unprofessional to you?
I am still learning about clean architectures, hexagonal architectures etc., but didnt read too much about Exception handling in this topic.

linux – ixgbe eth0: initiating reset due to tx timeout and ixgbe eth0: Reset adapter

Server interfaces are flapping sometimes. It happens randomly. We are getting below logs in dmesg and similar logs are being captured in syslog as well.

OS:

OS-Debian GNU/Linux 9 (stretch)
4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux

Details:

driver: ixgbe
version: 4.4.0-k
firmware-version: 0x80001112
expansion-rom-version:
bus-info: 0000:41:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

Logs:

ixgbe 0000:41:00.0 eth0: initiating reset due to tx timeout
ixgbe 0000:41:00.0 eth0: Reset adapter
ixgbe 0000:41:00.1 eth1: initiating reset due to tx timeout
ixgbe 0000:41:00.1 eth1: Reset adapter
ixgbe 0000:41:00.0 eth0: speed changed to 0 for port eth0
ixgbe 0000:41:00.1 eth1: speed changed to 0 for port eth1
bond0: link status definitely down for interface eth0, disabling it
bond0: now running without any active interface!
bond0: link status definitely down for interface eth1, disabling it
ixgbe 0000:41:00.0 eth0: NIC Link is Up 10 Gbps, Flow Control: RX/TX
bond0: link status definitely up for interface eth0, 10000 Mbps full duplex
bond0: first active interface up!
ixgbe 0000:41:00.1 eth1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
bond0: link status definitely up for interface eth1, 10000 Mbps full duplex
ixgbe 0000:41:00.1 eth1: initiating reset due to tx timeout
ixgbe 0000:41:00.1 eth1: Reset adapter
ixgbe 0000:41:00.1 eth1: speed changed to 0 for port eth1
bond0: link status definitely down for interface eth1, disabling it
ixgbe 0000:41:00.1 eth1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
bond0: link status definitely up for interface eth1, 10000 Mbps full duplex
ixgbe 0000:41:00.1 eth1: initiating reset due to tx timeout
ixgbe 0000:41:00.1 eth1: Reset adapter
ixgbe 0000:41:00.1 eth1: speed changed to 0 for port eth1
bond0: link status definitely down for interface eth1, disabling it
ixgbe 0000:41:00.1 eth1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
bond0: link status definitely up for interface eth1, 10000 Mbps full duplex
ixgbe 0000:41:00.1 eth1: initiating reset due to tx timeout
ixgbe 0000:41:00.1 eth1: Reset adapter
sched: RT throttling activated

Please help me to solve this issue.

networking – How to fix no internet when using a USB network adapter

I’m very new to Linux, so please point anything out if I get it wrong. About 1 year ago, I built a PC and ran only windows on it. I purchased a USB Wi-fi adapter which supported Windows and apparently Ubuntu. But recently I tried to get into Linux, only for the Wi-Fi adapter to not work with Linux. If anyone wants to know, lsusb labels it as “Realtek Semiconductor Corp. 802.11ac WLAN Adapter” and the model name is “Edup EP-AC1687” Any help would be greatly appreciated. Edit: whenever I try to run the driver installer, it says “bash: make: command not found”

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;
}

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 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 Proxies-free.com New Proxy Lists Every Day Proxies123