java – Arraylist overwriting previously entered values

Hi, I'm trying to create multiple client records and assign them to an arraylist so I can search for them later, but when I call the register creation method and assign them to an arraylist, I will create another register. and I ask to display the arraylist it displays the two entries created previously with the same values, thanks if you can help me!

Below the courses:

Store (main class):

public class Loja {
    public static void main(String() args) {
        Pedido pedidoInvocado = new Pedido();
        pedidoInvocado.inserirCliente();
        pedidoInvocado.listarCliente();
        pedidoInvocado.alterarCliente();
        pedidoInvocado.deletarCliente();
    }
}

Request (Where methods are created / invoked):

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Pedido {
    // Definindo atributos da classe Pedido
        private int pedidoId;
        private String dataEmissao;
        private float valorTotal;

    // Invocando Objetos
        Cliente clienteInvocado = new Cliente();
        itemPedido itemPedidoInvocado = new itemPedido();

    // Criando ArrayList
        List listaDeClientes = new ArrayList();

    // Get and Setters
        // pedidoId
            public int getPedidoId() {
                return pedidoId;
            }

            public void setPedidoId(int pedidoId) {
                this.pedidoId = pedidoId;
            }
        // dataEmissao
            public String getDataEmissao() {
                return dataEmissao;
            }

            public void setDataEmissao(String dataEmissao) {
                this.dataEmissao = dataEmissao;
            }
        // valorTotal
            public float getValorTotal() {
                return valorTotal;
            }

            public void setValorTotal(float valorTotal) {
                this.valorTotal = valorTotal;
            }

    // Metodos

        // Metodo para inserir clientes (INSERT)
            public void inserirCliente(){
                System.out.println("BEM VINDO A CRIAÇÃO DE USUARIOS, INSIRA OS DADOS REQUISITADOS LOGO A BAIXO!n");
                // Criação do Scanner
                    Scanner inputInt = new Scanner(System.in);
                // Criação da variavel Do While
                    int Escolha = 0;
                do {
                    // Invocando o metodo de ler os dados do cliente
                    clienteInvocado.atribuirCliente();
                    // Inserindo clientes e tratando erros
                    try{
                        Cliente cliente = new Cliente();
                        listaDeClientes.add(cliente);
                        System.out.println(" ");
                        System.out.println("CLIENTE CADASTRADO COM SUCESSO!n");
                        System.out.print("1 - CADASTRAR NOVAMENTE | 2 - TERMINAR CADASTROnRESPOSTA: ");
                            Escolha = inputInt.nextInt();
                    } catch (Exception err){
                        System.out.println(" ");
                        System.out.println("ERRO AO CADASTRAR CLIENTE: " + err);
                    }
                } while (Escolha != 2);
            }

        // Metodo para listar clientes (READ)
            public void listarCliente(){
                for (Cliente cliente : listaDeClientes){
                    System.out.println("ID: " + clienteInvocado.getClienteId() + " | NOME: " + clienteInvocado.getNome() + " | EMAIL: " + clienteInvocado.getEmail());
                }
            }

        // Metodo para deletar clientes por ID (DELETE)
            public void deletarCliente(){
                // Criação do scanner
                    Scanner inputInt = new Scanner(System.in);
                // Criação e atribuição das variaveis
                    System.out.print("DIGITE O ID QUE DESEJA DELETAR: ");
                        int ID = inputInt.nextInt();
                // Deletando do ArrayList
                    for (Cliente cliente : listaDeClientes){
                        if (clienteInvocado.getClienteId() == ID){
                            listaDeClientes.remove(cliente);
                        // Lista todos os clientes cadastrados novamente apos à exclusão
                            listarCliente();
                        }
                    }

            }

        // Metodo para alterar clientes por ID (UPDATE)
            public void alterarCliente(){
                // Criação do scanner
                    Scanner inputInt = new Scanner(System.in);
                // Criação e atribuição das variaveis
                    System.out.print("DIGITE O ID QUE DESEJA MODIFICAR: ");
                        int ID = inputInt.nextInt();
                // Deletando do ArrayList
                    for (Cliente cliente : listaDeClientes){
                        if (clienteInvocado.getClienteId() == ID){
                            listaDeClientes.set(ID, cliente);
                        // Lista todos os clientes cadastrados novamente apos à exclusão
                            listarCliente();
                        }
                    }
            }
}

Customer (method to obtain user inputs)

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Cliente {
    // Definindo atributos da classe Cliente
        private int clienteId;
        private String Nome;
        private String Email;

    // Get and Setters
        // clienteId
            public int getClienteId() {
                return clienteId;
            }

            public void setClienteId(int clienteId) {
                this.clienteId = clienteId;
            }
        // Nome
            public String getNome() {
                return Nome;
            }

            public void setNome(String nome) {
                Nome = nome;
            }
        // Email
            public String getEmail() {
                return Email;
            }

            public void setEmail(String email) {
                Email = email;
            }

    // Metodos
        // Metodo para o usuario definir o id, nome e email
            public void atribuirCliente(){
                // Criação do scanner
                    Scanner inputInt = new Scanner(System.in);
                    Scanner inputString = new Scanner(System.in);
                // Criação e atribuição das variaveiS
                        System.out.print("DIGITE O SEU ID: ");
                            int clienteId = inputInt.nextInt();
                        System.out.print("DIGITE O SEU NOME: ");
                            String Nome = inputString.nextLine();
                        System.out.print("DIGITE O SEU EMAIL: ");
                            String Email = inputString.nextLine();
                // Setters com os valores das variaaveis anteriores
                    this.setClienteId(clienteId);
                    this.setNome(Nome);
                    this.setEmail(Email);
            }
        }

usability – The View option is both mandatory and used previously in the drop-down list

I realize that this is probably not the best way to deal with the problem, but I need to advance in a solution to an existing model – and a drop-down list has been used.

In this situation, the user must add multiple fields to a table. Some are mandatory fields, others are not … each can only be used once.

The request consists of indicating the required elements in the drop-down list and indicating if they have already been added.

What is the best option for this?

My first thought is to use a red asterisk next to the required item and replace it with a checkmark when adding the previous one as such:

--------------
| dropdown ▼ |
|------------|
| * option 1 |
| * option 2 |
| ✓ option 3 |
|   option 4 |
| ✓ option 5 |
| * option 6 |
--------------

usability – The View option is both required and previously selected in the drop-down list

I realize that this is probably not the best way to deal with the problem, but I need to move forward in a solution to an existing design.

In this situation, the user must add multiple fields from a drop-down list. Some are needed, others not … each can only be used once.

The request consists of indicating the required elements in the drop-down list and indicating if they have already been added.

What is the best option for this?

My first thought is to use a red asterisk next to the required item and replace it with a checkmark when adding the previous one as such:

--------------
| dropdown ▼ |
|------------|
| * option 1 |
| * option 2 |
| ✓ option 3 |
|   option 4 |
| ✓ option 5 |
| * option 6 |
--------------

Is there a way to retrieve a log with history of all applications currently or previously installed on an iPad?

Is it possible to extract a log containing information about installing / updating applications already installed / already installed on an ipad?

cordially
Brian

php – Can I disable the automatic incrementing of the WordPress message database to use previously deleted records?

When I delete a record field from the WordPress message database, such as Post, Image, Page, and so on, and add a new item, a new record field will be added. added due to the auto increment feature.

But first I would like to use the deleted records, then enter new data in the new record field.

Is it possible to disable automatic incrementing from this database table?

I would like to insert in a table variables previously defined in PHP, then export in json format

$toJson = array();
$arr = array_push($toJson, array(
    'numero_casas' => $n,
    'token' => $myToken,
    'cifrado' => $criptografada,
    'decifrado' => $desCriptografada,
    'resumo_criptografico' => $rc
));

echo $toJson;

$exitJson = json_encode($toJson);

echo $exitJson;

$file = fopen("answer.json","w+");

fwrite($file, $exitJson);

Explore a previously unknown area with a drone algorithm

I work on a drone platform to map the indoor environment according to the depth and processing of the image.
I am looking for an algorithm to explore a previously unknown area, a bit like a house of a few rooms (assuming a floor at the moment). Robot cleaning exploring the style.

To begin, I preferred to use a software package / SDK, open source / open source, but the payment for a good SDK is also considerable.

It can be very naïve and un-optimized, and can assume a 2D problem if it is easier.

I have viewed it on Google, I have read a lot of scientific articles, but I need something more convenient to start with.

Any suggestion?
Thank you!

4.4 kitkat – The previously proposed update is no longer available

I have a Huawei Honor 4C Android KitKat (4.4.2). For a while (more than a year at least), it had posed a problem for me to update the operating system (and Huawei's EMUI) to a more up-to-date version. recent (Lollipop). I ignored him.

A few days ago, I decided to finally do it. To my surprise, when I click on the "check for updates" button in the Updater application, it indicates that the most recent version is in progress. I get the same result with the HiSuite desktop application.

Is there a way around this? I know quite well the advanced procedures and I would not like to do it manually, if only I could know where to get the update. I do not want to root my phone or get an unofficial ROM.

TinyMCE function: Delete the style (previously) added to the editor

This is a simple code to create a function in the TinyMCE (Advanced) editor. It creates an icon in the toolbar and once you click it, DIV tags will be added to the editor. It works fine .. But how can I cancel this style (div) of the item.

This will be added to the editor, once you have clicked on the icon:

(TEXT)

I want to create a function to remove div elements from text (selected). The best way would be, when you click on the "remove_kader" DIV. See below (the blue arrow).

enter the description of the image here

tinymce.create('tinymce.plugins.wpse723953_plugin', {
    init : function(ed, url) {
        ed.addCommand('wpse72395_insert_shortcode', function() {
            selected = tinyMCE.activeEditor.selection.getContent();
            if( selected ){
                content =  '

'+selected+'

'; }else{ content = '

'; } tinymce.execCommand('mceInsertContent', false, content); }); ed.addButton('mm_kader', {title : 'Kader aanmaken', cmd : 'wpse72395_insert_shortcode', image: url + '/icon.png' }); } }); tinymce.PluginManager.add('mm_kader', tinymce.plugins.wpse723953_plugin);