usability – Is it good practice to place tabs at the same level when search is the main feature? How to deal with spacing?

There are two potential approaches, but you have to have a consistent design approach/philosophy if you want to achieve the best user experience.

The search feature, if applied globally to the application, should sit at a level above the tabs so that the user isn’t confused about whether the search results relate to the contents in the tabs or not.

However, if the search feature only retrieves results relating to what is in the tabs, then it can also make sense for it to sit in the same level, provided that you can manage the spacing. This can be done by common strategies used in browsers to manage tabs (when you have too many to fit on the screen, especially in devices with narrow widths) or create a more compact search call-to-action (e.g. icon that expands when clicked and collapses when not in use).

How to change the number of cells within each main grid area in draw.io?


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




c++ – Allegro opening multiple windows before main window opens

When I run my program a bunch of windows render before the actual main game window itself renders

I’m using Allegro and Visual Studio 2019

#include <stdio.h>
#include <stdlib.h>
#include <allegro5/allegro5.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_primitives.h>

enum BOUNCER_TYPE {
    BT_HELLO = 0,
    BT_MYSHA,
    BT_TRIANGLE,
    BT_RECTANGLE_1,
    BT_RECTANGLE_2,
    BT_CIRCLE,
    BT_LINE1,
    BT_LINE2,
    BT_N
};

typedef struct BOUNCER
{
    float x, y;
    float dx, dy;
    int type;
} BOUNCER;

int main()
{
    must_init(al_init(), "allegro");
    must_init(al_install_keyboard(), "keyboard");

    ALLEGRO_TIMER* timer = al_create_timer(1.0 / 30.0);
    must_init(timer, "timer");

    ALLEGRO_EVENT_QUEUE* queue = al_create_event_queue();
    must_init(queue, "queue");

    al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_SUGGEST);
    al_set_new_display_option(ALLEGRO_SAMPLES, 8, ALLEGRO_SUGGEST);
    al_set_new_bitmap_flags(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);

    ALLEGRO_DISPLAY* disp = al_create_display(640, 480);
    must_init(disp, "display");

    ALLEGRO_FONT* font = al_create_builtin_font();
    must_init(font, "font");

    must_init(al_init_image_addon(), "image addon");
    ALLEGRO_BITMAP* mysha = al_load_bitmap("test.png");
    must_init(mysha, "mysha");

    must_init(al_init_primitives_addon(), "primitives");

    al_register_event_source(queue, al_get_keyboard_event_source());
    al_register_event_source(queue, al_get_display_event_source(disp));
    al_register_event_source(queue, al_get_timer_event_source(timer));

    bool done = false;
    bool redraw = true;
    ALLEGRO_EVENT event;

    BOUNCER obj(BT_N);
    for (int i = 0; i < BT_N; i++)
    {
        BOUNCER* b = &obj(i);
        b->x = rand() % 640;
        b->y = rand() % 480;
        b->dx = ((((float)rand()) / RAND_MAX) - 0.5) * 2 * 4;
        b->dy = ((((float)rand()) / RAND_MAX) - 0.5) * 2 * 4;
        b->type = i;
    }

    al_start_timer(timer);
    while (1)
    {
        al_wait_for_event(queue, &event);

        switch (event.type)
        {
        case ALLEGRO_EVENT_TIMER:
            for (int i = 0; i < BT_N; i++)
            {
                BOUNCER* b = &obj(i);
                b->x += b->dx;
                b->y += b->dy;

                if (b->x < 0)
                {
                    b->x *= -1;
                    b->dx *= -1;
                }
                if (b->x > 640)
                {
                    b->x -= (b->x - 640);
                    b->dx *= -1;
                }
                if (b->y < 0)
                {
                    b->y *= -1;
                    b->dy *= -1;
                }
                if (b->y > 480)
                {
                    b->x -= (b->y - 480);
                    b->dy *= -1;
                }
            }

            redraw = true;
            break;

        case ALLEGRO_EVENT_KEY_DOWN:
        case ALLEGRO_EVENT_DISPLAY_CLOSE:
            done = true;
            break;
        }

        if (done)
            break;

        if (redraw && al_is_event_queue_empty(queue))
        {
            ALLEGRO_VERTEX v(4);
            al_clear_to_color(al_map_rgb(0, 0, 0));

            for (int i = 0; i < BT_N; i++)
            {
                BOUNCER* b = &obj(i);
                switch (b->type)
                {
                case BT_HELLO:
                    al_draw_text(font, al_map_rgb(255, 255, 255), b->x, b->y, 0, "Hello world!");
                    break;

                case BT_MYSHA:
                    al_draw_bitmap(mysha, b->x, b->y, 0);
                    break;

                case BT_TRIANGLE:
                    al_draw_filled_triangle(b->x, b->y, b->x + 50, b->y + 25, b->x, b->y + 50, al_map_rgb_f(0, 1, 0));
                    break;

                case BT_RECTANGLE_1:
                    al_draw_filled_rectangle(b->x, b->y, b->x + 100, b->y + 80, al_map_rgba_f(0, 0, 0.5, 0.5));
                    break;

                case BT_RECTANGLE_2:
                    v(0).x = b->x;       v(0).y = b->y;       v(0).z = 0; v(0).color = al_map_rgb_f(1, 0, 0);
                    v(1).x = b->x + 120; v(1).y = b->y;       v(1).z = 0; v(1).color = al_map_rgb_f(0, 1, 0);
                    v(2).x = b->x;       v(2).y = b->y + 100; v(2).z = 0; v(2).color = al_map_rgb_f(0, 0, 1);
                    v(3).x = b->x + 120; v(3).y = b->y + 100; v(3).z = 0; v(3).color = al_map_rgb_f(1, 1, 0);

                    al_draw_prim(v, NULL, NULL, 0, 4, ALLEGRO_PRIM_TRIANGLE_STRIP);
                    break;

                case BT_CIRCLE:
                    al_draw_circle(b->x, b->y, 30, al_map_rgb_f(1, 0, 1), 2);
                    break;

                case BT_LINE1:
                    al_draw_line(b->x, b->y, b->x + 20, b->y + 100, al_map_rgb_f(1, 0, 0), 1);
                    break;

                case BT_LINE2:
                    al_draw_line(b->x, b->y, b->x + 70, b->y - 20, al_map_rgb_f(1, 1, 0), 1);
                    break;
                }
            }

            al_flip_display();
            redraw = false;
        }
    }```

How to Restore a virtualbox ubuntu 20.04 backup on Main Hard Disk

I’ve searched a lot, but I didn’t find the solution to this type of question!
I have an installed windows 10 on my Laptop and an installed ubuntu 20.04.01 on my Virtualbox. I want to know is it possible that I get a full backup from my ubuntu inside the Virtualbox and then delete my windows and after installing ubuntu 20.04 as my main OS, restore that back up over it and use ubuntu forever after that?

I would like to know if it is possible; how can I do that? And if it isn’t, what is the reason?

I really appreciate any help you can provide.

postgresql – Main postgres database is not tracked by pg_ctl. Can I fix this?

I created a directory in postgres user’s home dir called mydb: /var/lib/postgresql/mydb

I did this using initdb -D mydb.

Now, I want to start postgres and use mydb as the location where all this db’s data is stored; so I run:

pg_ctl -D /var/lib/postgresql/mydb start

It starts successfully, but if I try:

psql (12.6 (Ubuntu 12.6-0ubuntu0.20.04.1))
Type "help" for help.

postgres=# show data_directory;
       data_directory        
-----------------------------
 /var/lib/postgresql/12/main
(1 row)

i.e. it’s using the “main” or default data directory, completely ignoring the -D argument.

So now it occurs to me that I might be connecting to a different db… even though running pg_ctl status before pg_ctl start gives me:

pg_ctl: no server running

However, this has to be the case because… with “no server running”, I am able to psql and query the main database.

So then, how do I get the main database “tracked” by pg_ctl? Also, how do I use psql to connect to the right database?

Thank you

Edit: was able to connect to the postgres started with pg_ctl using:

psql -h /var/run/postgresql

(even though I don’t see any changes to that directory’s contents before / after I pg_ctl start i.e. it remains: 12-main.pg_stat_tmp 12-main.pid).

plugins – I want visitors of subdomain to land on main domain’s homepage

The main domain naishtika.com has the theme called FtagEmentor which stopped supporting the plugin called sprouteinvoices
it started creating conflicts with the theme so I created a new subdomain accounts.naishtika.com and installed sproutinvoices in that subdomain
in subdomain i didn;t add anything else not even theme and any website content only this invoice plugin
it started working again, now when I generate any invoice it shows accounts.naishtika.com at the bottom of the invoice (in the footer section). And if user clicks there they reaches to the site which doesn’t have any content.
So, I just wanted visitors to land up on some meaningful content like homepage of naishtika.com after clicking accounts.naishtika.com in the footer.
when I copied all the files and database of naishtika.com to subdomain, i cannot use the plugin because again if I install that plugin here it creates conflict and stop working
and if I redirect accounts.naishtika.com to naishtika.com , link of the estimate page doesnt work as it also get redirected to naishtika.com and shows page not found. also i cannot login to accounts.naishtika.com wp admin because it takes me to naishtika.com’s wp admin login page .
please suggest what to do
i just want visitor who opens the invoice or estimate and click on the bottom URL accounts.naishtika.com to be landed somewhere meaningful and not on the unformated homepage as it is now.

shadowrun sr5 – When transitioning from sr5 to sr6, what are the main changes we have to consider?

My group played multiple sr5 runs spread out sporadically over the years, and we are all not experts of the system, so we thought that we might as well transition to sr6 for the next run.

When transitioning from sr5 to sr6, what are the main changes we have to consider?

power series – What is The Main Motive of Choosing the Seo Company?

Choosing a Seo Company by seeing its reviews, price & trustability is much better than choosing it with analyzing it entirely. As there are fraud firms, who are expert in making money without giving any services. I have better understanding in this because I have gone through this situation when I need of Google ads management packages & one of the firms, I relied on had done fraudulent activity with me. Afterwards before choosing any company Local Seo Services or any of the service. Firstly, the thing I Do is lookover the whole Company & I met one of the firms, i.e., SEOCOMPANY.ME. I completely satisfied with the company & it offered services. Checklist – On-time delivery, 24/7 customer support, affordable prices.

Assume that we have a computer with a 1Mx16 bit main memory

Assume that we have a computer with a 1Mx16 bit main memory – Computer Science Stack Exchange

Why is the Turing machine rather than the finite automaton the main model for computation if computers have finite memory?

Any physical computational device clearly has finite memory. On the other hand the input can be external and could therefore potentially be infinite. This idea is perfectly captured by the deterministic finite automata (DFA), so why do we use the Turing machines instead?

Let’s consider a popular example. The language
$$L = {a^nb^n, nin mathbb{N} } $$
is recognizable by a Turing machine, but not by a DFA. Suppose that you are getting a string from a server, and you need to determine whether it belongs to $L$ or not. I’d say you can’t do it, because you might, in fact, run out of memory.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123