Preview App will not open on my MacBook Pro 2011, macOS High Sierra (10.13.6)

When I double click on the preview app, nothing happens. I'm trying to drag files to the preview and the message "The application preview is not open" appears.

I can not remove the shortcut from the dock. I tried to open it in the application folder, and it does not work. I've checked the activity monitor and when I look in the "CPU" tab in "Preview", nothing is displayed. I tried to force me to quit the preview from the Apple menu and right-click on the app.

Please help!

Germany – Frankfurt airport drop off luggage in the early morning (long before the airline's counters open)?

I will take the train to Frankfurt Airport very early in the morning (2 o'clock in the morning) and have a large piece of luggage. The check-in desk of Vietnam Airlines (I will fly to Hanoi, Vietnam) will be open before departure at 13:00 (around 11:00). It is so long until the counter is opened, as I just want to go through the passport control to the airport early and rest on a sofa.

Does Frankfurt Airport have a service (eg self-service kiosk for all Arlines) that allows you to drop off your luggage on the same day of departure and automatically send it to the cabin of your flight?

object-oriented – How to comply with the Open Closed principle in a procedural language such as C.

To do the work in C, you would probably want to create a structure that contains a pointer to a function. In other words, you explicitly define a vtable / manually and paste it as the first item in a union containing all forms:

void drawCircle(union Shape *);
void drawSquare(union Shape *);

struct Square { 
    void (*draw)();

    Position center;
    Size size;
};

struct Circle { 
    void (*draw)();

    Position center;
    Size size;
};

union Shape {
    Circle circle;
    Square square;
};


void drawShapes(Shape *shapes, int count) { 
    for (int i=0; idraw(&shapes(i));
}

So we have a bunch of shape objects. The first element in each of these elements is a pointer to a function that can draw that particular type of shape. So when we add a new kind of shape, we have to define a function to draw that kind of shape, and when we create a shape "object" for that shape, we have to initialize it draw Actor referring to the drawing function for this form.

When we call this function, something happens in the order of:

void drawSquare(void *data) { 
     struct Square *real_data = (struct Square *)data;

     // draw a square with the specified location/size
}

void drawCircle(void *data) {
    struct Circle *real_data = (struct circle *)data;

    // draw a circle with the specified location/size
}

This brings us halfway to the open / closed principle. Of course, to add a new shape we need to add a new function to draw that kind of shape. We also need to add a structure to store the kind of data needed to define this shape. This structure must contain a pointer to a function to create the drawing that gets a pointer to a Shape, And of course we have to add that new kind of shape to the one Shape Association, so we can pass the correct data to the drawing function.

Our drawShapes and all the code to draw a circle or square can be left closed – adding a new shape does not affect it. Of course adding more pointers to functions (and not just the one draw) does not really change that much – we can still write functions generally on the order of drawShapes which work with forms of any type provided that each defines the same interface in terms of pointers to functions (with matching types and the like).

In the other direction, this still has a lot of manual work, leaving a lot of room for error. It's especially easy to initialize some of the pointers to point to the wrong functions. So when we use them, we do not get what we expect. We also have to manually initialize the pointer to work in each one Shape The object we create to point to the correct drawing function (and as we add more simulated virtual functions, this problem gets worse and worse).

Applications – How do I open an offline website on Android?

I have a directory with some .html Files, some .jpgbe index.html File and some other stuff. If I pull that index.html In Chrome (or other browsers) on my desktop PC, this static / offline website is displayed in the browser and I can navigate the site without any problems.

If I go to the same directory in Android Pie and open the same index.html File in Android Chrome I get the error message "Can not find file". I tried other Android browsers with the same result.

How can I open a simple offline static HTML web site on Android? Do I have to use a specific app or browser?