AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / coding / Perguntas / 77587891
Accepted
Ronin
Ronin
Asked: 2023-12-02 04:21:22 +0800 CST2023-12-02 04:21:22 +0800 CST 2023-12-02 04:21:22 +0800 CST

Redefinindo/Limpar/Desmarcar Choicebox javaFX

  • 772

imagem embutida

Tenho tentado desmarcar ou limpar o valor da caixa de escolha, a partir de quando um usuário seleciona outra opção na mesma caixa. Quando seleciono uma marca de carro e depois seleciono outra todas as opções são exibidas, se eu selecionar a mesma as imagens apenas duplicam e a primeira das imagens fica em branco e apenas os botões permanecem... Eu tentei/setValue null/isVisible /setVisible/ mas o espaço dos botões ainda está lá.... até tentei fazer getchildren remove... estou perdido..



public class HelloController implements Initializable {
    private Stage stage;
    private Scene scene;
    private Parent root;

    @FXML private Label lbMake;
    @FXML private Label lbBody;
    @FXML private Label lbColor;
    @FXML private Label lbEngine;
    @FXML private Label lbPerformance;
    @FXML private Label lbPrice;

    @FXML private TilePane tilePaneMain;

    @FXML private ChoiceBox<String> cbMake;
    @FXML private ChoiceBox<String> cbColor;
    @FXML private ChoiceBox<String> cbPerformance;

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        displayGallery();

        cbMake.getItems().addAll("Clear Choice","Aston Martin","BMW","Ferrari","Genesis","Hummer","Lamborghini","Lincoln","Lucid","Maserati","Maybach","McLaren","Rolls-Royce","Tesla");
        cbMake.setOnAction(this::getMake);

        cbColor.getItems().addAll("Clear Choice","black","blue","green","orange","red","white","yellow","gold");
        cbColor.setOnAction(this::getColor);

        cbPerformance.getItems().addAll("Clear Choice","2.3","2.5","2.7","3.0","3.6","3.8","4.2");
        cbPerformance.setOnAction(this::getPerformance);

    }


    // This is the constructors for the data.
    Cars car0 = new Cars("Aston Martin", "220000.00", "black", "8", "3.6", new ImageView(new Image(getClass().getResourceAsStream("/car0.jpg"))),"yes");
    Cars car1 = new Cars("Aston Martin", "220000", "blue", "8", "3.6", new ImageView(new Image(getClass().getResourceAsStream("/car1.jpg"))),"no");
    Cars car2 = new Cars("Aston Martin", "220000", "green", "8", "3.6", new ImageView(new Image(getClass().getResourceAsStream("/car2.jpg"))),"no");
    Cars car3 = new Cars("Aston Martin", "220000", "red", "8", "3.6", new ImageView(new Image(getClass().getResourceAsStream("/car3.jpg"))),"yes");
    Cars car4 = new Cars("Cadillac", "110000", "blue", "0", "4.8", new ImageView(new Image(getClass().getResourceAsStream("/car4.jpg"))),"no");
    Cars car5 = new Cars("Cadillac", "110000", "red", "0", "4.8", new ImageView(new Image(getClass().getResourceAsStream("/car5.jpg"))),"no");
    Cars car6 = new Cars("Maserati", "200000", "black", "8", "3.8", new ImageView(new Image(getClass().getResourceAsStream("/car6.jpg"))),"no");
    Cars car7 = new Cars("Maserati", "200000", "blue", "8", "3.8", new ImageView(new Image(getClass().getResourceAsStream("/car7.jpg"))),"no");
    Cars car8 = new Cars("Maserati", "200000", "red", "8", "3.8", new ImageView(new Image(getClass().getResourceAsStream("/car8.jpg"))),"no");
    Cars car9 = new Cars("Maserati", "200000", "white", "8", "3.8", new ImageView(new Image(getClass().getResourceAsStream("/car9.jpg"))),"yes");
    Cars car10 = new Cars("Lamborghini", "400000", "black", "10", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car10.jpg"))),"no");
    Cars car11 = new Cars("Lamborghini", "400000", "black", "10", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car11.jpg"))),"yes");
    Cars car12 = new Cars("Lamborghini", "400000", "blue", "10", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car12.jpg"))),"yes");
    Cars car13 = new Cars("Lamborghini", "400000", "green", "10", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car13.jpg"))),"no");
    Cars car14 = new Cars("Lamborghini", "400000", "white", "10", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car14.jpg"))),"no");
    Cars car15 = new Cars("Lamborghini", "400000", "yellow", "10", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car15.jpg"))),"no");
    Cars car16 = new Cars("McLaren", "365000", "yellow", "8", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car16.jpg"))),"no");
    Cars car17 = new Cars("McLaren", "365000", "blue", "8", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car17.jpg"))),"no");
    Cars car18 = new Cars("McLaren", "365000", "green", "8", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car18.jpg"))),"no");
    Cars car19 = new Cars("McLaren", "365000", "black", "8", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car19.jpg"))),"no");
    Cars car20 = new Cars("McLaren", "365000", "red", "8", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car20.jpg"))),"no");
    Cars car21 = new Cars("McLaren", "400000", "orange", "10", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car21.jpg"))),"yes");
    Cars car22 = new Cars("Ferrari", "400000", "black", "12", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car22.jpg"))),"yes");
    Cars car23 = new Cars("Ferrari", "400000", "blue", "12", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car23.jpg"))),"yes");
    Cars car24 = new Cars("Ferrari", "400000", "red", "8", "2.7", new ImageView(new Image(getClass().getResourceAsStream("/car24.jpg"))),"no");
    Cars car25 = new Cars("Ferrari", "400000", "white", "12", "2.5", new ImageView(new Image(getClass().getResourceAsStream("/car25.jpg"))),"yes");
    Cars car26 = new Cars("Ferrari", "400000", "white", "8", "2.7", new ImageView(new Image(getClass().getResourceAsStream("/car26.jpg"))),"no");
    Cars car27 = new Cars("Ferrari", "400000", "yellow", "8", "2.7", new ImageView(new Image(getClass().getResourceAsStream("/car27.jpg"))),"no");
    Cars car28 = new Cars("Lincoln", "365000", "black", "12", "4.2", new ImageView(new Image(getClass().getResourceAsStream("/car28.jpg"))),"no");
    Cars car29 = new Cars("Lincoln", "365000", "gray", "12", "4.2", new ImageView(new Image(getClass().getResourceAsStream("/car29.jpg"))),"no");
    Cars car30 = new Cars("Hummer", "180000", "blue", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car30.jpg"))),"no");
    Cars car31 = new Cars("Hummer", "180000", "orange", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car31.jpg"))),"no");
    Cars car32 = new Cars("Hummer", "180000", "white", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car32.jpg"))),"no");
    Cars car33 = new Cars("Hummer", "180000", "gray", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car33.jpg"))),"no");
    Cars car34 = new Cars("Hummer", "180000", "white", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car34.jpg"))),"no");
    Cars car35 = new Cars("Lucid", "150000", "blue", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car35.jpg"))),"no");
    Cars car36 = new Cars("Lucid", "150000", "red", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car36.jpg"))),"no");
    Cars car37 = new Cars("Lucid", "150000", "white", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car37.jpg"))),"no");
    Cars car38 = new Cars("Rivian", "100000", "red", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car38.jpg"))),"no");
    Cars car39 = new Cars("Rivian", "100000", "blue", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car39.jpg"))),"no");
    Cars car40 = new Cars("Maybach", "400000", "red", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car40.jpg"))),"no");
    Cars car41 = new Cars("BMW", "250000", "gold", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car41.jpg"))),"no");
    Cars car42 = new Cars("Rolls-Royce", "500000", "gold", "0", "3.0", new ImageView(new Image(getClass().getResourceAsStream("/car42.jpg"))),"no");
    Cars car43 = new Cars("Genesis", "300000", "white", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car43.jpg"))),"yes");
    Cars car44 = new Cars("Tesla", "50000", "gray", "0", "2.3", new ImageView(new Image(getClass().getResourceAsStream("/car44.jpg"))),"no");

    // This is adding the constructor to an Array
    public ArrayList<Cars> getList() {
        ArrayList<Cars> carList = new ArrayList<>();
        return carList;
    }


    // This display the gallery to the opening scene.
    public void displayGallery() {
            int i =0;
        for (i = 0; i < getList().size(); i++) {
            ImageView imageView = new ImageView(new Image(getClass().getResourceAsStream("/car" + i + ".jpg")));
            imageView.setFitWidth(200);
            imageView.setFitHeight(155);
            Button btnGallery = new Button(Integer.toString(i),imageView);
            int finalI = i;
            btnGallery.setOnMouseEntered(event->{
                //btnGallery.setTextFill(Color.PURPLE);
                lbMake.setText(getList().get(finalI).getMake());
                lbColor.setText(getList().get(finalI).getColor());
                lbPerformance.setText(getList().get(finalI).getPerformance());
                lbPrice.setText(getList().get(finalI).getPrice());
                lbEngine.setText(getList().get(finalI).getCylinder());
                lbBody.setText(getList().get(finalI).getIsConvertable());

            });
            btnGallery.setOnMouseExited(event->{
                //btnGallery.setTextFill(Color.BLACK);
                lbMake.setText("");
                lbColor.setText("");
                lbPerformance.setText("");
                lbPrice.setText("");
                lbEngine.setText("");
                lbBody.setText("");


            });
            btnGallery.setOnAction(ae-> {
                    try {
                        String btnText = btnGallery.getText();
                        ArrayList<Cars> passList = getList();
                        FXMLLoader loader = new FXMLLoader(getClass().getResource("payment-view.fxml"));
                        root = loader.load();
                        PaymentController paymentController = loader.getController();
                        paymentController.displayName(btnText);
                        paymentController.getArrayList(passList);
                        stage = (Stage) ((Node) ae.getSource()).getScene().getWindow();
                        scene = new Scene(root);
                        stage.setScene(scene);
                        stage.show();

                    } catch (IOException ex) {
                        throw new RuntimeException(ex);
                    }
            });
            //tilePaneMain.getChildren().add(btnGallery);
        }
    }
// Display results but doesn't remove previous selection once another is made, if another enter //image description herechoice box selction is made,if images duplicate then empty buttons //remain.
    private void getMake(ActionEvent actionEvent) {
        for (int index = 0; index < getList().size();index++){
            if ((getList().get(index).getMake().contains(cbMake.getValue()))){
                getList().get(index).getImage().setFitWidth(175);
                getList().get(index).getImage().setFitHeight(150);
                Button btnMake = new Button();
                btnMake.setGraphic(getList().get(index).getImage());
                tilePaneMain.getChildren().add(btnMake);
            }
        }
    }
    private void getColor(ActionEvent actionEvent) {
        for (int index = 0; index < getList().size();index++){
            if ((getList().get(index).getColor().contains(cbColor.getValue()))){
                getList().get(index).getImage().setFitWidth(175);
                getList().get(index).getImage().setFitHeight(150);
                Button btnMake = new Button();
                btnMake.setGraphic(getList().get(index).getImage());
                tilePaneMain.getChildren().add(btnMake);
            }
        }
    }
    private void getPerformance(ActionEvent actionEvent) {
        for (int index = 0; index < getList().size();index++){
            if ((getList().get(index).getPerformance().contains(cbPerformance.getValue()))){
                getList().get(index).getImage().setFitWidth(175);
                getList().get(index).getImage().setFitHeight(150);
                Button btnMake = new Button();
                btnMake.setGraphic(getList().get(index).getImage());
                tilePaneMain.getChildren().add(btnMake);
            }
        }
    }
}
image
  • 1 1 respostas
  • 34 Views

1 respostas

  • Voted
  1. Best Answer
    jewelsea
    2023-12-02T08:40:45+08:002023-12-02T08:40:45+08:00

    O que você está tentando fazer é implementar um conjunto de filtros que podem ser aplicados à lista de itens a serem exibidos.

    Problemas com sua abordagem atual

    Os principais problemas em seu código atual (provavelmente existem outros) são estes:

    • Nos seus manipuladores de ação para a seleção da caixa de escolha, você precisa limpar sua galeria antes de criar novos itens. Por exemplo: tilePaneMain.getChildren().clear(). Caso contrário, o que você está fazendo é manter a exibição da galeria para a seleção anterior.
    • Uma questão auxiliar é que a exibição da galeria é baseada em nós (ImageViews), que você adiciona à cena diversas vezes. Um único nó só pode aparecer no gráfico de cena uma vez; caso contrário, será removido silenciosamente de sua posição original.
    • No seu initializemétodo você chama displayGallerypara fazer todo esse trabalho de criar botões com ações customizadas, então você nunca os utiliza pois esta linha está comentada: //tilePaneMain.getChildren().add(btnGallery);.

    Solução proposta: use um ControlsFX GridView apoiado por uma lista filtrada

    Eu consideraria um ControlsFX GridView para isso. Isso é apoiado por um ObservableListque pode ser um FilteredListonde o filtro é aplicado dinamicamente com base nas alterações nas sugestões de pesquisa, de forma semelhante à forma como a filtragem funciona em um ListView .

    É melhor usar uma lista filtrada e atualizar os filtros da lista para aplicá-los, mesmo que você não use o ControlsFX GridView.

    Solução de exemplo: lista filtrada sem controle virtualizado

    Neste exemplo, demonstrarei a criação e aplicação de filtros para mostrar itens em uma galeria filtrada. Não usarei um ControlsFX GridView(embora seja preferível), pois não quero adicionar aqui uma dependência de software de terceiros. A ListViewpoderia ser usado no lugar de a GridView, mas isso pode estar menos próximo do comportamento que você deseja, então não demonstrarei isso aqui.

    Em vez disso, o que farei é pegar TilePanee filtrar o conteúdo mostrado lá. A filtragem e a implementação fornecidas são menos eficientes do que usar um controle virtualizado com células como a ListViewou GridView, mas é adequado para um pequeno exemplo como este. A TilePanesolução baseada também está mais próxima da sua implementação original do que a solução de estilo de controle virtualizado.

    Também não usarei arquivos FXML ou CSS externos para manter as coisas mais independentes.

    Você precisa modelar uma concessionária de automóveis e fornecer uma IU para ela.

    Para isso você precisa de um tipo de carro:

    record Car(int vin, String make, NamedColor namedColor) {}
    

    Uma forma de representar as cores dos carros:

    import javafx.scene.paint.Color;
    
    record NamedColor(String name, Color color) implements Comparable<NamedColor> {
        private static final Color INDIA_INK = Color.web("#3c3f4a");
    
        public static final NamedColor BLACK = new NamedColor("black", INDIA_INK);
        public static final NamedColor BLUE = new NamedColor("blue", Color.BLUE);
        public static final NamedColor GREEN = new NamedColor("green", Color.GREEN);
        public static final NamedColor RED = new NamedColor("red", Color.RED);
    
        @Override
        public int compareTo(NamedColor o) {
            return name.compareTo(o.name);
        }
    
        @Override
        public String toString() {
            return name;
        }
    }
    

    Uma concessionária com carros e algumas informações sobre eles:

    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    
    import java.util.List;
    
    class Dealership {
        private final ObservableList<Car> cars = FXCollections.observableArrayList(
                new Car(1, "Aston Martin", NamedColor.BLACK),
                new Car(2, "Aston Martin", NamedColor.BLUE),
                new Car(3, "Aston Martin", NamedColor.GREEN),
                new Car(4, "Aston Martin", NamedColor.RED),
                new Car(5, "Cadillac", NamedColor.BLUE),
                new Car(6, "Cadillac", NamedColor.RED),
                new Car(7, "Maserati", NamedColor.BLACK),
                new Car(8, "Maserati", NamedColor.BLUE)
        );
    
        ObservableList<Car> getCars() {
            return cars;
        }
    
        List<NamedColor> getColors() {
            return cars.stream()
                    .map(Car::namedColor)
                    .distinct()
                    .sorted()
                    .toList();
        }
    
        List<String> getMakes() {
            return cars.stream()
                    .map(Car::make)
                    .distinct()
                    .sorted()
                    .toList();
        }
    }
    

    Uma maneira de exibir um carro individual:

    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.control.Label;
    import javafx.scene.layout.Background;
    import javafx.scene.layout.StackPane;
    
    class CarPanel extends StackPane {
        private static final String CSS_DATA_URL = "data:text/css,";
        private static final String CSS = CSS_DATA_URL + // language=CSS
                """
                .car-info .text {
                     -fx-font-size: 30px;
                     -fx-fill: cornsilk;
                }
                """;
    
        CarPanel(Car car) {
            getStylesheets().add(CSS);
            getStyleClass().add("car-info");
    
            setBackground(
                    Background.fill(
                            car.namedColor().color()
                    )
            );
            setPadding(new Insets(10));
    
            Label label = new Label(
                    """
                    Make: %s
                    Vin: %d
                    Color: %s
                    """.formatted(car.make(), car.vin(), car.namedColor().name())
            );
            StackPane.setAlignment(label, Pos.TOP_LEFT);
    
            getChildren().add(label);
        }
    }
    

    Showroom dos carros disponíveis na concessionária:

    import javafx.collections.ListChangeListener;
    import javafx.collections.ObservableList;
    import javafx.geometry.Insets;
    import javafx.scene.layout.TilePane;
    
    class Showroom extends TilePane {
        private final ObservableList<Car> cars;
    
        Showroom(ObservableList<Car> cars) {
            this.cars = cars;
            setHgap(10);
            setVgap(10);
            setPrefColumns(4);
            setPadding(new Insets(10));
    
            showCars();
            cars.addListener((ListChangeListener<Car>) c ->
                    showCars()
            );
        }
    
        private void showCars() {
            // for debug info if you need it . . .
            // System.out.println(cars);
    
            getChildren().clear();
            cars.stream().map(CarPanel::new).forEach(
                    carPane -> getChildren().add(carPane)
            );
        }
    }
    

    Alguns controles para filtrar os carros mostrados:

    import javafx.collections.transformation.FilteredList;
    import javafx.geometry.Insets;
    import javafx.scene.Parent;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.layout.HBox;
    
    class FilterControls {
        private final FilteredList<Car> filteredCars;
        private final ChoiceBox<String> makeChoice = new ChoiceBox<>();
        private final ChoiceBox<NamedColor> colorChoice = new ChoiceBox<>();
        private final HBox filterControls;
    
        FilterControls(Dealership dealership) {
            filteredCars = new FilteredList<>(dealership.getCars());
    
            makeChoice.getItems().add(null);
            makeChoice.getItems().addAll(dealership.getMakes());
            makeChoice.setOnAction(e -> updateFilter());
    
            colorChoice.getItems().add(null);
            colorChoice.getItems().addAll(dealership.getColors());
            colorChoice.setOnAction(e -> updateFilter());
    
            filterControls = new HBox(10, makeChoice, colorChoice);
            filterControls.setPadding(new Insets(10));
        }
    
        Parent getUI() {
            return filterControls;
        }
    
        private void updateFilter() {
            filteredCars.setPredicate(car ->
                isMakeMatch(car, makeChoice.getValue()) 
                    && isColorMatch(car, colorChoice.getValue())
            );
        }
    
        private boolean isMakeMatch(Car car, String make) {
            return make == null || make.equals(car.make());
        }
    
        private boolean isColorMatch(Car car, NamedColor color) {
            return color == null || color.equals(car.namedColor());
        }
    
        FilteredList<Car> getFilteredCars() {
            return filteredCars;
        }
    }
    

    E um aplicativo para unir tudo:

    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    
    public class CarDealershipApp extends Application {
        private final Dealership dealership = new Dealership();
    
        @Override
        public void start(Stage stage) throws Exception {
            FilterControls filterControls = new FilterControls(dealership);
    
            BorderPane layout = new BorderPane();
            layout.setTop(filterControls.getUI());
            layout.setCenter(
                    new Showroom(
                            filterControls.getFilteredCars()
                    )
            );
    
            stage.setScene(new Scene(layout));
            stage.show();
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    }
    

    Então você obtém algo assim:

    Todos os carros: todos os carros

    Todos os Aston Martins: Aston Martins

    Todos Aston Martins verdes: Aston Martins verdes

    • 1

relate perguntas

  • Imagine que as imagens da biblioteca tenham fundo preto, defina-o como branco

  • Golang gera um hash consistente para imagem JPEG sem gravar no disco

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    destaque o código em HTML usando <font color="#xxx">

    • 2 respostas
  • Marko Smith

    Por que a resolução de sobrecarga prefere std::nullptr_t a uma classe ao passar {}?

    • 1 respostas
  • Marko Smith

    Você pode usar uma lista de inicialização com chaves como argumento de modelo (padrão)?

    • 2 respostas
  • Marko Smith

    Por que as compreensões de lista criam uma função internamente?

    • 1 respostas
  • Marko Smith

    Estou tentando fazer o jogo pacman usando apenas o módulo Turtle Random e Math

    • 1 respostas
  • Marko Smith

    java.lang.NoSuchMethodError: 'void org.openqa.selenium.remote.http.ClientConfig.<init>(java.net.URI, java.time.Duration, java.time.Duratio

    • 3 respostas
  • Marko Smith

    Por que 'char -> int' é promoção, mas 'char -> short' é conversão (mas não promoção)?

    • 4 respostas
  • Marko Smith

    Por que o construtor de uma variável global não é chamado em uma biblioteca?

    • 1 respostas
  • Marko Smith

    Comportamento inconsistente de std::common_reference_with em tuplas. Qual é correto?

    • 1 respostas
  • Marko Smith

    Somente operações bit a bit para std::byte em C++ 17?

    • 1 respostas
  • Martin Hope
    fbrereto Por que a resolução de sobrecarga prefere std::nullptr_t a uma classe ao passar {}? 2023-12-21 00:31:04 +0800 CST
  • Martin Hope
    比尔盖子 Você pode usar uma lista de inicialização com chaves como argumento de modelo (padrão)? 2023-12-17 10:02:06 +0800 CST
  • Martin Hope
    Amir reza Riahi Por que as compreensões de lista criam uma função internamente? 2023-11-16 20:53:19 +0800 CST
  • Martin Hope
    Michael A formato fmt %H:%M:%S sem decimais 2023-11-11 01:13:05 +0800 CST
  • Martin Hope
    God I Hate Python std::views::filter do C++20 não filtrando a visualização corretamente 2023-08-27 18:40:35 +0800 CST
  • Martin Hope
    LiDa Cute Por que 'char -> int' é promoção, mas 'char -> short' é conversão (mas não promoção)? 2023-08-24 20:46:59 +0800 CST
  • Martin Hope
    jabaa Por que o construtor de uma variável global não é chamado em uma biblioteca? 2023-08-18 07:15:20 +0800 CST
  • Martin Hope
    Panagiotis Syskakis Comportamento inconsistente de std::common_reference_with em tuplas. Qual é correto? 2023-08-17 21:24:06 +0800 CST
  • Martin Hope
    Alex Guteniev Por que os compiladores perdem a vetorização aqui? 2023-08-17 18:58:07 +0800 CST
  • Martin Hope
    wimalopaan Somente operações bit a bit para std::byte em C++ 17? 2023-08-17 17:13:58 +0800 CST

Hot tag

python javascript c++ c# java typescript sql reactjs html

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve