2 person 2-factor authentication? – Information Security Stack Exchange

I’m trying to build a system as follows:

  • User 1 is a low permission user. They will be using their phone and at some point will need to do a secure action.
  • User 2 is an admin user and will be in the same room as user 1.
  • User 2 will generate a temporary code on their own device (could be a phone or desktop), and then verbally give the code to user 1.
  • User 1 will then enter the code given to them to complete the secure action.

Ideally, neither user 1 nor user 2 will reveal their account usernames to each other. The only thing that will be exchanged is the code.

The backend system I am using to build the basic user authentication is in ASP.NET Core MVC & Asp.net Identity, and this will include an API to validate and generate the codes.

Anyone have any ideas about how to implement the code generation and validation?
Potentially the codes will need to be long enough to identify which admin user requested the code (and thus approved the action), but hopefully not too long to become unwieldy (maybe 6-8 characters?)

(I posted this to stack overflow: https://stackoverflow.com/questions/64073338/2-person-2-factor-authentication
but was recommended to post on this site. )

Disabling Chrome tab groups – Android Enthusiasts Stack Exchange

My phone (Samsung S7 running Android 8.0.0) recently updated to Chrome version 85, and with it came tab groups.

I am sure this is a welcome thing for many, but I rarely have more than 8 tabs open at any time. Thus the ability to group tabs makes little sense for me.

Unfortunately, I can’t seem to avoid it. When holding on a link, “Open in new tab” has become “Open in new tab in group”, and there is no option to open it just as a separate tab.

This makes my regular tab cleaning a lot more cumbersome, as now I suddenly have two or three groups where I want to remove one or two tabs each, rather than just four tabs I want to close.

Is there a way to remove tab grouping, or at least a way to hide it away so that I don’t have to bother with it during casual internet browsing? At the very least, I can’t find anything even remotely relevant in the settings, and a rudimentary internet search has only provided news of the feature, not any details on removing it.

java – Testing Spring Router function on servlet stack without Spring Boot

I am writing a library that is generating a RouterFunction based on some input. Now I try to test the function but I only find tutorials on how to test the function with the WebTestClient which only works with the RouterFunction from the reactive stack. Other approaches that are using MockMVC are using Spring Boot. But I don’t want Spring Boot as a dependency since this project is only a library.

So, what are the configuration steps I have to do to test a router function with MockMVC and without Spring Boot?

In case it is helpful, here are my dependencies:

plugins {
    id 'java-library'
    id 'java'
    id 'war'
}

dependencies {
    compile group: 'org.springframework', name: 'spring-webmvc'
    compile project(':lib:generator-core')
    providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'

    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api'
    testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine'
}

test {
    useJUnitPlatform()
}

Bootstrap – d-flex between – Stack Overflow em Português

Olá, estou tendo dificuldades de usar uma propriedade do botstrap, que serve para alinhar itens dentro de um container. A propriedade é a d-flex / justify-content-between, meu layout não está ficando como o esperado. Logo abaixo deixarei o código para analise. Obrigado pela atenção desde ja.

        <div class="row">
            <div class="col-sm">
                <div class="card" style="width: 18rem;">
                    <img class="card-img-top" src=".../100px180/" alt="Imagem de capa do card">
                    <div class="card-body">
                      <h5 class="card-title">Título do card</h5>
                      <p class="card-text">Um exemplo de texto rápido para construir o título do card e fazer preencher o conteúdo do card.</p>
                      <a href="#" class="btn btn-primary">Visitar</a>
                    </div>
                  </div>
            </div>

            <div class="col-sm">
                <div class="card" style="width: 18rem;">
                    <img class="card-img-top" src=".../100px180/" alt="Imagem de capa do card">
                    <div class="card-body">
                      <h5 class="card-title">Título do card</h5>
                      <p class="card-text">Um exemplo de texto rápido para construir o título do card e fazer preencher o conteúdo do card.</p>
                      <a href="#" class="btn btn-primary">Visitar</a>
                    </div>
                  </div>
            </div>

            <div class="col-sm">
                <div class="card" style="width: 18rem;">
                    <img class="card-img-top" src=".../100px180/" alt="Imagem de capa do card">
                    <div class="card-body">
                      <h5 class="card-title">Título do card</h5>
                      <p class="card-text">Um exemplo de texto rápido para construir o título do card e fazer preencher o conteúdo do card.</p>
                      <a href="#" class="btn btn-primary">Visitar</a>
                    </div>
                  </div>
                </div>
            </div>

        </div>
    </div>

seo plugin active error – WordPress Development Stack Exchange

I’m experiencing an error in my website

https://www.example.com/wp-json/wp/v2/users/1

My hosting customer representative said that it has to do with an SEO plugin, but this error message is a bit outside of his scope of knowledge.

Please help me fix this

algorithms – Potential function for a dynamic stack

Consider a dynamic stack stored in an array of size m with n elements (initially n=0) and only a push operation. If upon a push n=m then expand the array such that m = 3n (That is, triple the size of the array).

Define a potential function based on the number n of elements in the array and the total number m of slots in the array, and show that the push operation has a constant amortized time.


My attempt:
Let the potential function be ϕ(n)= 3n – m.

Consider T*(push) = T(push) + ϕ(n) + ϕ(n-1)

If n < m then T(push) = 1 (since there is space in the array so you only need to add the new element) and so T*(Push) = 1 + 3n – m – (3(n-1)-m) = 4

If n=m then T(push) = n+1 (since there is not enough space so you need to copy all the elements plus the new one to the new array).

ϕ(n) = 3n-m, but m = 3n since the array is full it must be expanded for the push so ϕ(n) = 3n – 3n = 0

ϕ(n-1) = 3(n-1)-m, but prior to the push the array is full so m=n and thus ϕ(n-1) = 3(n-1)-n = 2n-3

Thus, T*(push) = n+1 + 0 – (2n-3) = -n + 4, which is not constant.

If anyone could help show me where I went wrong that would be great!

Reescalar imagen en android – Stack Overflow en español

*Buenas, tengo una duda con respecto al tema de cargar una imagen desde JSOUP a un ImageView en Android Studio. La cosa es que consigo cargar la imagen, pero se ve muy chiquita y me gustaría que ocupe todo el ancho de la pantalla.

Adjunto imagen descriptiva:

introducir la descripción de la imagen aquí

Este es el layout donde se encuentra el imageView:

<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    style="@style/CardView.Light"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/ivPaginas"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
</androidx.cardview.widget.CardView>

Este es el layout de la actividad:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".Activities.TMO.TMOLector">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:layout_below="@+id/arriba"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recyclerView"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </LinearLayout>
    </LinearLayout>
</RelativeLayout>

El adaptador:

public class TMOLectorAdapter extends RecyclerView.Adapter<TMOLectorAdapter.ViewHolder> {
    private ArrayList<TMOLectorClase> tmoLectorClases;
    private Context context;

    public TMOLectorAdapter(ArrayList<TMOLectorClase> tmoItems, Context context) {
        this.tmoLectorClases = tmoItems;
        this.context = context;
    }

    @NonNull
    @Override
    public TMOLectorAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.adaptador_lectortmo, parent, false);
        return new TMOLectorAdapter.ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull TMOLectorAdapter.ViewHolder holder, int position) {
        TMOLectorClase tmoLectorClase = this.tmoLectorClases.get(position);
        Picasso.get().load(tmoLectorClase.getImg()).into(holder.iv);
    }

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

    public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
        ImageView iv;

        public ViewHolder(@NonNull View view) {
            super(view);
            iv = view.findViewById(R.id.ivPaginas);
            view.setOnClickListener(this);
        }

        @Override
        public void onClick(View view) {
            //context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(tmoItems.get(itemPosition).getUrlCapitulo())));
        }
    }

    public void setFilter(ArrayList<TMOLectorClase> newList) {
        tmoLectorClases = new ArrayList<>();
        tmoLectorClases.addAll(newList);
        notifyDataSetChanged();
    }

    public void updateData(ArrayList<TMOLectorClase> items) {
        this.tmoLectorClases = items;
    }
}

Ya probé usando android:scaleType="centerCrop" pero no me sive ya que me corta las imágenes

autonomous differential equation. – Mathematics Stack Exchange

Thanks for contributing an answer to Mathematics Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

A Compact-Closed Topology – Mathematics Stack Exchange

Given a set $X$, Is there any topology $tau$ on $X$ such that given any $Y subseteq X$ it satisfies the following property

$$ Ytext{ is closed if and only if }Ytext{ is compact }$$

I am confused with this because I am supposed to find a topology with some restrictions. I was able to conclude that $tau_f subset tau$ where $tau_f$ denotes the co-finite topology on X.

SQL Server Setup Failure – Database Administrators Stack Exchange

Unable to upgrade the enterprise edition of SQL Server 2014 SP1 (12.1.4100.1) to SP3 version. I checked the registry key “ConfigurationState” and it’s already 1 but still got the below error

“SQL server setup has encountered the following error:

NT services SQLAgents$instancename could not be started.

Error code 0x84B20001″

Any help is appreciated