What are the mask options for traveling during the COVID pandemic?

The COVID-19 pandemic is far from over however tourism has officially reopened in many cities around the world. For example, Dubai is reopening starting from July 7th and Cancun reopened in the middle of June.

Presuming one were to travel during these precarious times, what are the mask options for protecting yourself from viral infection?

screen – How to set minimum width under developer options only for specific apps?

My device is a Samsung Galaxy A40 running Android 10 (but it probably doesn’t matter that much in this case)

I want an app to think that my screen is the size of a tablet, because in that app it might be beneficial to have larger screen size. I went to developer settings, and under “Minimum width” , I changed the default value which was 360 dp, to 800 dp. Now the app thinks my display is larger, and it gives me a slightly better interface. However, the only problem is that now the rest of the OS also thinks that this is my screen size.

Is there any way to set the “minimum width” only for that app, and not the rest of the Android interface?

java – Hotel booking with multiple options. Improvement through subclasses?

The code below runs perfectly fine as I want it to. I’d like to create more subclasses to get a better overview over the whole code. Can I place the setter and getter as well as the methods into the extended classes? I’d like to create subclasses as in single room, double room etc. extends room. Would it improve my code? My prof wants to see more classes.
Thanks in advance
(btw. the code comments are in German, so if there are any questions, I’m happy help)

To simplify my question, the option pet is just available for penthouse. Does it sence to creat a subclass for penthouse to move to setter and getter to the subclass?

import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.util.Scanner;

public class Booking {
    private static boolean CustomerInterface = true;//Hauptprogramm boolean

    public static void main(String() args) throws IOException {
        Scanner input = new Scanner(System.in);

        Room() hotel = new Room(8);//Array für Zimmer

        hotel(0) = new Room(40, true, 1);//Single room
        hotel(1) = new Room(40, true, 2);//Single room
        hotel(2) = new Room(70, true, 3);//Double room
        hotel(3) = new Room(70, true, 4);//Double room
        hotel(4) = new Room(100, true, 5);//Triple room
        hotel(5) = new Room(100, true, 6);//Triple room
        hotel(6) = new Penthouse(200, true, 7, false);//Penthouse
        hotel(7) = new Penthouse(200, true, 8, false);//Penthouse

        System.out.println("Willkommen im Hotel AppDev1");//Begrüßung

        while (CustomerInterface) {//Abfrage des Boolean zum Start des Hauptprogramms
            System.out.println("Bitte wählen sie eine der folgenden Auswahlmöglichkeiten:");
            System.out.println("********************************************************");
            System.out.println("1: Buchen sie einen Raumn2: List der verfügbaren Zimmer anzeigen" +
                    "n3: Liste aller Zimmer anzeigenn4: Kunde auscheckenn5: Gäste Anzeigenn6: Program ende");
            System.out.println("********************************************************");

            String Selection = input.next();
            switch (Selection) {
                case "1":
                    Booking(hotel);//Methode zum Buchen
                    break;
                case "2":
                    ShowEmpty(hotel);//Freie Zimmer anzeigen
                    break;
                case "3":
                    ShowAll(hotel);//Alle Zimmer anzeigen
                    break;
                case "4":
                    DeleteCustomer(hotel);//Kundendaten je Zimmernummer löschen
                    break;
                case "5":
                    Gastdaten(hotel);//Gästedaten:Name, Preise, Buchungsoptionen anzeigen
                    break;
                case "6":
                    ShutDown();//Programm beenden
                    break;
                default:
                    WrongInput();//Flasche Eingabe getätigt
                    CustomerInterface = true;//Hauptprogramm neu starten
            }
        }
    }

    private static void PreisKategorie(Room ()hotel, int roomNr) {//Auswahl der Zimmerkategorie von Standart bis Luxus
        System.out.println("Welche Preiskategorie möchten sie?n1 = Standardn2 = Premium (10% Zuschlag)n 3 = Luxus (20% Zuschlag)");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch(userInput) {
            case "1":
                System.out.println("Sie haben Standard gewählt. ");
                hotel(roomNr).setPriceLevel(1.0);//Standartpreis
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() * hotel(roomNr).getPriceLevel());
                break;
            case "2":
                System.out.println("Sie haben Premium gewählt. ");
                hotel(roomNr).setPriceLevel(1.1);//10% Premiumzuschlag
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() * hotel(roomNr).getPriceLevel());
                break;
            case "3":
                System.out.println("Sie haben Luxus gewählt. ");
                hotel(roomNr).setPriceLevel(1.2);//20% Luxuszuschlag
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() * hotel(roomNr).getPriceLevel());
                break;
            default:
                WrongInput();//Falsche Eingabe
                PreisKategorie(hotel, roomNr);//Zurück zum Beginn der Kategorieauswahl
        }

    }

    private static void ShutDown() {//Programm beenden
        System.out.println("Danke, auf wiedersehen.");
        System.exit(0);
    }

    private static void Booking(Room() hotel) {//Zimmer buchen
        
                String userInput;
                Scanner input = new Scanner(System.in);
                System.out.println("Bitte geben sie eine der folgenden Zimmernummern ein:n1-2 Einzelzimmer, Preis für eine" +
                        " Übernachtung = " + " " + "n3-4 Doppelzimmer" +
                        "n5-6 Drreibettzimmern7-8 Ferienwohnugn9 Programm beenden");
                userInput = input.next();

                switch (userInput) {
                    case "1":
                        if (hotel(0).getAvailable(hotel(0).available)) {
                            System.out.println(hotel(0).getPricePerNight());
                            int roomNr = 0;
                            PreisKategorie(hotel, roomNr);
                            Breakfast(hotel, roomNr);
                            System.out.println(hotel(0).getPricePerNight());
                            Balcony(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);
                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "2":
                        if (hotel(1).getAvailable(hotel(1).available)) {
                            int roomNr = 1;
                            PreisKategorie(hotel, roomNr);
                            Breakfast(hotel, roomNr);
                            Balcony(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);

                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "3":
                        if (hotel(2).getAvailable(hotel(2).available)) {
                            int roomNr = 2;
                            PreisKategorie(hotel, roomNr);
                            Breakfast(hotel, roomNr);
                            Balcony(hotel, roomNr);
                            SinglePerson(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);
                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "4":
                        if (hotel(3).getAvailable(hotel(3).available)) {
                            int roomNr = 3;
                            PreisKategorie(hotel, roomNr);
                            Breakfast(hotel, roomNr);
                            Balcony(hotel, roomNr);
                            SinglePerson(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);
                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "5":
                        if (hotel(4).getAvailable(hotel(4).available)) {
                            int roomNr = 4;
                            PreisKategorie(hotel, roomNr);
                            Breakfast(hotel, roomNr);
                            SecondToilet(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);
                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "6":
                        if (hotel(5).getAvailable(hotel(5).available)) {
                            int roomNr = 5;
                            PreisKategorie(hotel, roomNr);
                            Breakfast(hotel, roomNr);
                            SecondToilet(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);
                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "7":
                        if (hotel(6).getAvailable(hotel(6).available)) {
                            int roomNr = 6;
                            PreisKategorie(hotel, roomNr);
                            CountGuests(hotel, roomNr);
                            Pet(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            RoomService(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);
                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "8":
                        if (hotel(7).getAvailable(hotel(7).available)) {
                            int roomNr = 7;
                            PreisKategorie(hotel, roomNr);
                            CountGuests(hotel, roomNr);
                            Pet(hotel, roomNr);
                            BookingPeriode(hotel, roomNr);
                            RoomService(hotel, roomNr);
                            FinalizeBooking(hotel, roomNr);
                        } else {
                            AldreadyBooked(hotel);
                        }
                        break;
                    case "9":
                        ShutDown();
                        break;
                    default:
                        WrongInput();
                        Booking(hotel);
                }

                //int roomNr;
                //roomNr = Integer.valueOf(userInput) - 1;//wandelt die eingabe in int um und -1 damit Zimmer 1 = room(0)
                //FinalizeBooking(hotel, roomNr);



    }

    private static void FinalizeBooking(Room @NotNull () hotel, int roomNr) {
        String userInput;
        Scanner input = new Scanner(System.in);
        String rName;
        System.out.println("Bitte geben sie ihren Namen ein : ");
        rName = input.next();//Kundenname für die Buchung
        //rName = String.valueOf(roomNr);//wandelt rName in int um es der arry zuzuodrnen
        //Option 1 mit boolean
        hotel(roomNr).setAvailable(false);
        //Option 2 mit equals
        hotel(roomNr).setName(rName);//hinterlegt in der arry den Namen des Gastes
        Receipt(hotel, roomNr);

    }

    private static void Receipt(Room @NotNull () hotel, int roomNr) {
        System.out.println("Danke für ihre Buchung, das Zimmer" + " " + (roomNr + 1) + " " +
                "ist für sie reserviertnDie Gesamtsumme beträgt: " + (hotel(roomNr).getPricePerNight() * 1.19) + "€" +
                "n Die enthaltende Mehrwertsteuer beträgt: " +(hotel(roomNr).getPricePerNight() * 0.19));
        if ((hotel(roomNr).getFrühstück()==true) || (hotel(roomNr).getBalkon()==true) || (hotel(roomNr).getSinglePerson()==true) || (hotel(roomNr).getGästetoilette()==true) || (hotel(roomNr).getPet()==true) || (hotel(roomNr).getRoomService()==true)) {
            System.out.println("Sie haben die folgenden optionen mit gebucht:");
            if (hotel(roomNr).getFrühstück() == true) {
                System.out.println("Frühstück: " + hotel(roomNr).getBreaky() * hotel(roomNr).getBookingPeriode() + "€");
            }

            if (hotel(roomNr).getBalkon() == true) {
                System.out.println("Balkon: " + hotel(roomNr).getBalcony() * hotel(roomNr).getBookingPeriode() + "€");
            }

            if (hotel(roomNr).getSinglePerson() == true) {
                System.out.println("Einzelpersonrabatt: " + hotel(roomNr).getEinzelPerson() * hotel(roomNr).getBookingPeriode() + "€");
            }

            if (hotel(roomNr).getGästetoilette() == true) {
                System.out.println("Gäste Toilette: " + hotel(roomNr).getSecondToilet() * hotel(roomNr).getBookingPeriode() + "€");
            }

            if (hotel(roomNr).getPet() == true) {
                System.out.println("Haustierzuschlag: " + hotel(roomNr).getHaustier() * hotel(roomNr).getBookingPeriode() + "€");
            }
            if (hotel(roomNr).getRoomService() == true) {
                System.out.println("Zimmerservie: " + hotel(roomNr).getZimmerservice() * hotel(roomNr).getBookingPeriode() + "€");
            }
        } else {
            System.out.println("Sie haben keine Zusatzoptionen gebucht");
        }
    }

    private static void RoomService(Room() hotel, int roomNr) {
        System.out.println("Möchten sie Zimmerservice dazubuchen? n" +" 1 = ja 2= Nein");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch (userInput){
            case "1":
                System.out.println("Sie haben inklusive Zimmerservice gebucht");
                hotel(roomNr).setRoomService(true);
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() + Room.getZimmerservice());
                break;
            case "2":
                System.out.println("Sie haben ohne Zimmerservice gebucht");
                hotel(roomNr).setRoomService(false);
                break;
            default: WrongInput();
            RoomService(hotel, roomNr);
        }
    }

    private static void AldreadyBooked(Room() hotel) {
        System.out.println("Dieses Zimmer ist leider schon belegtn Bitte wählen sie ein anders Zimmer.");
        //CustomerInterface = true;
        Booking(hotel);
    }

    private static void WrongInput() {
        System.out.println("********************************************************");
        System.out.println("Ihre eingabe war leider nicht Korrekt.nBitte versuchen sie es erneut.");
        System.out.println("********************************************************");
    }

    private static void Pet(Room() hotel, int roomNr) {
        System.out.println("Kommen Sie mit oder ohne Haustiern1 = mit n2 = ohne");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch (userInput) {
            case "1":
                System.out.println("sie nehmen ein Haustier mit");
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() + hotel(roomNr).getHaustier());//3 € Aufpreis für ein Haustier
                hotel(roomNr).pet = true;
                break;
            case "2":
                System.out.println("sie nehmen kein Haustier mit");
                hotel(roomNr).pet = false;
                break;
            default:
                WrongInput();
                Pet(hotel, roomNr);
                break;
        }
    }

    private static void BookingPeriode(Room() hotel, int roomNr) {
        if (roomNr < 7){
            System.out.println("Wie lange bleiben Sie? ");
            Scanner input = new Scanner(System.in);
            String userInput;
            userInput = input.next();
            switch (userInput) {
                case "1":
                case "2":
                case "3":
                case "4":
                case "5":
                case "6":
                case "7":
                case "8":
                case "9":
                case "10":
                case "11":
                case "12":
                case "13":
                case "14":
                    System.out.println("sie haben" + " " + userInput + " " + "Tage gewählt");
                    hotel(roomNr).setBookinperiode(Integer.valueOf(userInput));
                    hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() * Integer.valueOf(userInput));

                    break;
                default:
                    WrongInput();
                    BookingPeriode(hotel, roomNr);}

        } else{
            System.out.println("Wie lange bleiben Sie? (Die Mindestbuchungsdauer beträgt 3 TagenDie maximale Buchungsdauer beträt 14 Tage)");
            Scanner input = new Scanner(System.in);
            String userInput;
            userInput = input.next();


            switch (userInput) {
                case "1":
                case "2":
                    MinBooking(hotel, roomNr);
                    break;
                case "3":
                case "4":
                case "5":
                case "6":
                case "7":
                case "8":
                case "9":
                case "10":
                case "11":
                case "12":
                case "13":
                case "14":
                    System.out.println("sie haben" + " " + userInput + " " + "Tage gewählt");
                    hotel(roomNr).setBookinperiode(Integer.valueOf(userInput));
                    hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() * Integer.valueOf(userInput));
                    break;
                default:
                    WrongInput();
                    BookingPeriode(hotel, roomNr);
            }
        }
    }

    private static void MinBooking(Room() hotel, int roomNr) {
        System.out.println("Sie unterschreiten die Mindestbuchungsdauer! nMöchten Sie erneut wählen? 1 = neuwahl 2= Programm beenden");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        if (userInput.equals("1")) {
            BookingPeriode(hotel, roomNr);
        } else if (userInput.equals("2")) {
            ShutDown();
        } else {
            WrongInput();
            MinBooking(hotel, roomNr);
        }
    }

    private static void CountGuests(Room() hotel, int roomNr) {
        System.out.println("Mit wie vielen Personen möchten sie buchen?nDie maximale Anzahl beträt 6 Personen.)");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch (userInput) {
            case "1":
            case "2":
            case "3":
            case "4":
            case "5":
            case "6":
                System.out.println("sie haben" + " " + userInput + " Personen gewählt");
                hotel(roomNr).setCountGuests(Integer.valueOf(userInput));
                break;
            default:
                WrongInput();
                CountGuests(hotel, roomNr);
        }
    }

    private static void SecondToilet(Room() hotel, int roomNr) {
        System.out.println("Möchten sie ein Zimmer mit Gäste Toilette? 1 = ohne Gäste Toilette 2 = 2 mit Gäste Toilette");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch (userInput) {
            case "1":
                System.out.println("sie haben ein Zimmer ohne Gäste Toilette gewählt");
                hotel(roomNr).gästetoilette = false;


                break;
            case "2":
                System.out.println("sie haben ein Zimmer mit Gäste Toilette gewählt");
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() + Room.getSecondToilet());//10 € Aufpreis für eine extra Toilette
                hotel(roomNr).gästetoilette = true;

                break;
            default:
                WrongInput();
                SecondToilet(hotel, roomNr);
        }
    }

    private static void SinglePerson(Room() hotel, int roomNr) {
        System.out.println("Bitte geben sie an um wie viele Personen es sich bei ihrer Buchung handeltn1 = Einzelperson 2= Paar");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch (userInput) {
            case "1":
                System.out.println("sie haben Einzelperson gewählt");
                System.out.println("Sie bekommen einen Sondertarif (10 Euro weniger)");

                hotel(roomNr).singlePerson = true;
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() - hotel(roomNr).getEinzelPerson());
                System.out.println(hotel(roomNr).getPricePerNight());
                break;
            case "2":
                System.out.println("sie haben die Paaroption gewählt");
                hotel(roomNr).singlePerson = false;
                //System.out.println(hotel(roomNr).getPricePerNight());
                break;
            default:
                WrongInput();
                SinglePerson(hotel, roomNr);
        }
    }

    private static void Balcony(Room() hotel, int roomNr) {
        System.out.println("Möchten sie ein Zimmer mit Balkon buchen? 1 = mit Balkon 2= ohne Balkon");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch (userInput) {
            case "1":
                System.out.println("sie haben ein Zimmer mit Balkon gewählt");
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() + Room.getBalcony());//5 € Aufpreis für einen Balkon
                hotel(roomNr).balkon = true;

                break;
            case "2":
                System.out.println("sie haben ein Zimmer ohne Balkon gewählt");
                hotel(roomNr).balkon = false;
                break;
            default:
                WrongInput();
                Balcony(hotel, roomNr);
        }
    }

    private static void Breakfast(Room @NotNull () hotel, int roomNr) {
        System.out.println("Möchten sie Frühstück dazu buchen? 1 = mit Frühstück 2= ohne Frühstück");
        Scanner input = new Scanner(System.in);
        String userInput;
        userInput = input.next();
        switch (userInput) {
            case "1":
                System.out.println("sie haben ein Zimmer mit Frühstück gewählt");
                hotel(roomNr).setPricePerNight(hotel(roomNr).getPricePerNight() + Room.getBreaky());//3 € Aufprreis für Frühstück
                hotel(roomNr).frühstück = true;
                //System.out.println(hotel(roomNr).getPricePerNight());
                break;
            case "2":
                System.out.println("sie haben ein Zimmer ohne Frühstück gewählt");
                hotel(roomNr).frühstück = false;
                break;
            default:
                WrongInput();
                Breakfast(hotel, roomNr);
                break;
        }
    }

    private static void ShowEmpty(Room @NotNull () hotel) {
        for (int i = 0; i < hotel.length; i++) {
            if (hotel(i).getAvailable(hotel(i).available)) {
                System.out.println("Zimmer " + (i + 1) + " steht zur Verfügung");
            }else {
                System.out.println("Zimmer " + (i + 1) + " ist belegt");
            }
        }
    }

    private static void ShowAll(Room @NotNull () hotel) {
        for (int i = 0; i < hotel.length; i++) {
            System.out.println("Wir bieten Zimmer " + (i + 1) + " an. ");
        }
    }

    private static void DeleteCustomer(Room @NotNull () hotel) {
        Scanner input = new Scanner(System.in);
        int roomNr;
        System.out.println("Bitte geben sie die Zimmernummer ein");
        roomNr = input.nextInt() - 1;
        hotel(roomNr).setName("Name");
        hotel(roomNr).setAvailable(true);
        System.out.println("Eintrag gelöscht");
    }

    private static void Gastdaten(Room @NotNull () hotel) {
        for (int i = 0; i < hotel.length; i++) {
            if (hotel(i).getAvailable(!(hotel(i).available))) {

                System.out.println("Es befinden sich zur Zeit Gäste in Zimmer: " + hotel(i).roomNr +
                        "nName: " + hotel(i).getName() + "nGesamtpreis ohne MwST: "
                        + hotel(i).getPricePerNight());
                switch (hotel(i).getRoomNr()) {
                    case 1:
                    case 2:
                        System.out.println("Frühstück: " + hotel(i).getFrühstück() + "nBalkon: " + hotel(i).getBalkon() +
                                "nDauer des Aufenthalts:" + hotel(i).getBookingPeriode() + "n");
                        break;
                    case 3:
                    case 4:
                        System.out.println("Frühstück: " + hotel(i).getFrühstück() + "nBalkon: " + hotel(i).getBalkon() + "n"
                                + "Einzelpersonenrabatt:" + hotel(i).getSinglePerson() + "nDauer des Aufenthalts:" + hotel(i).getBookingPeriode() + "n");
                        break;
                    case 5:
                    case 6:
                        System.out.println("Frühstück: " + hotel(i).getFrühstück() + "nBalkon: " + hotel(i).getBalkon() + "n"
                                + "Gäste Toilette:" + hotel(i).getGästetoilette() + "nDauer des Aufenthalts:" + hotel(i).getBookingPeriode() + "n");
                        break;
                    case 7:
                    case 8:
                        System.out.println("Anzahl der Gäste: " + hotel(i).getCountGuests() + "nHaustier: " + hotel(i).getPet() + "n"
                                + "Zimmerservice: " + hotel(i).getRoomService() + "nDauer des Aufenthalts:" + hotel(i).getBookingPeriode() + "n");
                        break;
                }
            } else {
                System.out.println("Es befinden sich zur Zeit keine Gäste in Zimmer: " + " " + hotel(i).getRoomNr() + "n");
            }
        }
    }
}
package Hotel;

public class Room {



    //String CustomerName;
    private String Name;
    int roomNr;
    double pricePerNight;
    boolean available; //= true;//Zimmer frei oder belegt?
    static double breaky = 3;
    static double balcony = 5;
    boolean frühstück;
    boolean balkon;
    boolean singlePerson;
    boolean gästetoilette;
    static double secondToilet = 10;
    int countGuests;
    boolean pet;
    int bookinperiode;
    boolean roomservice;
    static double zimmerservice = 10;
    static double einzelPerson = 10;
    double haustier = 3;
    static double priceLevel;



    //Constructor
    public Room(double pricePerNight, boolean available,int roomNr) {
        this.pricePerNight = pricePerNight;
        this.available = available;
        this.roomNr = roomNr;
    }

    public boolean getPet() {
        return pet;
    }
    public double getHaustier() {
        return haustier;
    }

    public boolean getRoomService() {
        return roomservice;
    }
    public void setRoomService(boolean roomservice) {
        this.roomservice = roomservice;
    }
    public static double getZimmerservice() {
        return zimmerservice;
    }

    public boolean getGästetoilette() {
        return gästetoilette;
    }
    public static double getSecondToilet() {
        return secondToilet;
    }

    public void setCountGuests(int countGuests) {
        this.countGuests = countGuests;
    }
    public int getCountGuests() {
        return countGuests;
    }

    public boolean getSinglePerson() {
        return singlePerson;
    }
    public double getEinzelPerson() {
        return einzelPerson;
    }

    public boolean getBalkon() {
        return balkon;
    }
    public static double getBalcony() {
        return balcony;
    }

    public boolean getFrühstück() {
        return frühstück;
    }
    public static double getBreaky() {
        return breaky;
    }

    public void setPricePerNight(double pricePerNight) {
        this.pricePerNight = pricePerNight;
    }
    public double getPricePerNight() {
        return pricePerNight;
    }

    public void setBookinperiode(int bookinperiode) {
        this.bookinperiode = bookinperiode;
    }
    public int getBookingPeriode() {
        return bookinperiode;
    }

    public void setAvailable(boolean available) {
        this.available = available;
    }
    public boolean getAvailable(boolean available) {
        return available;
    }

    public String getName() {
        return Name;
    }
    public void setName(String Name) {
        this.Name = Name;
    }

    public double getPriceLevel() {
        return priceLevel;
    }
    public void setPriceLevel(double priceLevel) {
        this.priceLevel = priceLevel;
    }

    public int getRoomNr() {
        return roomNr;
    }
}```

woocommerce – Is it possible to checkout with 2 different shipping options on a single order?

This is regarding a marketplace in WooCommerce that has different vendors. Let’s say you are buying item A from Vendor 1 and item B from Vendor 2. And you would like to get the first item shipped to your home, but you want to pick up Item B, since it’s close to your home. Is it possible to checkout on a single order choosing a shipping method for item A and a different one for item B?

Thanks!

options – Upload file on pre_update_option_{option_name}

is there a way to upload a file while saving options in WP ?
I have this option setting (save is binded to options.php) and need to upload and store a file on server

enter image description here

and cannot find the file in update_option_{option_name}:

add_action('init', array($this,'upload_credentials'), 10);
function upload_credentials( ) {
  //CRM_adv_settings is the option name
  add_filter( 'pre_update_option_CRM_adv_settings', array($this,'system_save_file'), 10, 2 );
}

function system_save_file($new_value, $old_value){
  //$rawData = file_get_contents("php://input");
  $f=$_FILES;
  $p=$_POST;
}

Cannot find $_FILES, in $_POST there’s the filename; tried several variation about update_option and pre_update_option but no success, any idea?

How to force custom default Sort By options for all folder types in Windows Explorer

Quick note to eager mods: this is not a duplicate 🙂

My question has 3 parts:

  • I wish to understand how Windows Explorer works in the sense of why this happens. I know folders can be of different types (general, music library, photo gallery etc) and that windows automatically decides which is which continuously based on what’s in a folder. There’s also different (types of) drives in a system, external drives, music player drives, phone drives whatever. All of these in addition to it being a folder by folder setting, contribute to the problem but I can’t piece together how come the Sort By items lists get reset.

    • For instance: I go to D:Downloads in Explorer and go to Sort By and go to More and scroll all the way down to Date Modified, and click okay, then go to Sort By again and select Date Modified. Cool. Now, I go in my browser and save a file, browser asks where to save, I browse to D:Downloads GUESS WHAT? DATE MODIFIED ISN’T THERE. Ok, I set it again there as well. I open another program with another windows shell browse menu, date modified isn’t there either. I set all of them, reboot and/or install a totally useful windows update, it gets reset again.
    • ^ Why is it not even actually per folder but per shell, and why does the Sort By list get reset? Where is this setting stored?
  • I normally would have asked what most seemingly related questions on this topic on SU ask:

    • How to change my Sort By options and then apply them to all folders. – Bad question to ask and answer, because it will get reset, or will not really be applied to all types of folders and all future drives and connected devices.
    • How to force all the folders on my system to be a “general items” folder so that then I can change the Sort By options for all my general items folders. – Also a bad question because a. I want to have different types of folders not just general items folders, and b. it as sure as anything in the universe, will eventually get reset by MS whether on purpose, or design stupidity.
  • If you’ve made it this far and with this knowledge think you have an elegant answer please help us. Otherwise, I’m gonna ask a different question:

    • Is there any sort of shell extension hack or background process or something, that we can use, that continuously overwrites the Windows Explorer Sort By list with the Sort By criteria of –OUR– choosing? Thank you very much.

In the last years, Windows As A Service releases have brought huge overhauls and investments, questionable at best (e.g. making windows drivers hostage to the invasive app store nobody wants), and yet everyday-things like this problem have remained broken and unanswered for decades. Makes you question whether anyone working at MS uses their own product non-superficially. No, but I’m sure they care, I guess they gosh just still don’t have enough telemetry to know that this totally-in-your-face basic QA problem is a problem…

Leaving WIX: Narrowing Down My Options

Hi, Everyone.

I have an ecommerce store. I’ve been with WIX for five years now, and overall I’ve been very happy with them. I’m somewhat of a computer novice, and I like the ease of navigating the site. However, they are lacking in a few features that I find I really need.

One thing I find annoying about WIX is the company’s #1 priority seems to promoting their brand endlessly and driving up the price of their stock, at the expense of adding essential features and additional features.

My #1 Need: I need an web-builder that can create the best possible DROP-DOWN menus, as the products I market often have two, or even three, different options. I’ve spoken to WIX several times about this, and you have to write code to do this. That’s a deal-breaker for me right there. Done. It’s over.

Other desired features:
a) Accepts both Paypal and Credit Cards
b) 24/7 phone support (USA-based), plus chat support. WIX doesn’t offer weekends.
c) Fast, easy interface.
d) NO WRITING OF CODE! (no can do)
SEMrush

Right now my first choice is Shopify, but I’m open to other companies. This is not urgent, and I tend to look around a lot before making a decision.

Thank You,
HIMBG

 

posix compliant – In bash `$-` yields `himBHs` but `i` and `s` are invalid options — what’s going on?

$ echo $-
himBHs
$ set -h
$ set -i
bash: set: -i: invalid option
set: usage: set (-abefhkmnptuvxBCHP) (-o option-name) (--) (arg ...)
$ set -m
$ set -B
$ set -H
$ set -s
bash: set: -s: invalid option
set: usage: set (-abefhkmnptuvxBCHP) (-o option-name) (--) (arg ...)

As a result I can’t use this method to restore bash state using

oldstate="$(set +o); set -$-"                # POSIXly store all set options.
.
.
set -vx; eval "$oldstate"         # restore all options stored.

as described in this Unix & Linux answer

options – How to save custom settings api fields with custom section fuction

I am creating wordpress theme on a single options page. I have customized the default do_setting_fields and do_setting_sections functions. my fields are displaying fine but when i am trying to save it, It won’t save.

function amna_theme_options_page () {
wp_enqueue_style( 'theme-options-css', get_template_directory_uri() . '/inc/admin/assets/css/theme-options-css.css' );
settings_errors(); 
?>
<div class="wrap flex-tab">
    <form action='' method='post' class="amna-fields">
        <?php 
        amna_do_settings_fields('amna-fields-group', 'theme_amna');
        amna_do_settings_sections('theme_amna'); 
        
        submit_button();
        ?>
    </form>
</div>
<?php }

And these are the functions i have override to display fields

function amna_do_settings_sections($page) {
global $wp_settings_sections, $wp_settings_fields;

if ( !isset($wp_settings_sections) || !isset($wp_settings_sections($page)) )
    return;

foreach( (array) $wp_settings_sections($page) as $section ) {
    echo "<h3>{$section('title')}</h3>n";
    call_user_func($section('callback'), $section);
    if ( !isset($wp_settings_fields) ||
         !isset($wp_settings_fields($page)) ||
         !isset($wp_settings_fields($page)($section('id'))) )
            continue;
    echo '<div class="settings-form-wrapper">';
    amna_do_settings_fields($page, $section('id'));
    echo '</div>';
}
}

function amna_do_settings_fields($page, $section) {
global $wp_settings_fields;

if ( ! isset( $wp_settings_fields( $page )( $section ) ) ) {
    return;
}

foreach ( (array) $wp_settings_fields($page)($section) as $field ) { ?>
    <div class="settings-form-row flex-tab">
        
        <?php if ( !empty($field('args')('label_for')) )
            echo '<p><label for="' . $field('args')('label_for') . '">' .
                $field('title') . '</label><br />';
        else
        call_user_func($field('callback'), $field('args'));
        echo '</p>';
    echo '</div>';
}
}