mobile web – Showing a full screen dialog to view a full list of radio button selection

I’m designing a sort of step by step process for mobile web using a stepper to get a bunch of information from a user. One of the steps requires a user to select from a list of (about 20) pre-defined locations or enter their own address (entering their own is not high priority). Since the stepper and the list of locations can get really long, I am having the user launch a modal to view all the choices in a full screen dialog so that they don’t have to scroll the stepper to select a location. The problem however is that after selecting a location (with a radio button) on the modal and closing it, how to show in the wizard what they have selected in the modal after the modal is closed. Does anybody have an idea? Is launching the modal even a good idea?
Before launching the modal
Modal with all options

co.combinatorics – Average number of edges of an induced graph by using the edge-based node selection technique on a graph with arbitrary degree distribution

Let $G(U,V,E)$ be a simple, undirected, bipartite graph and $U={u_1,u_2,{cdots},u_n}$ and $V={ v_{1},v_{2},cdots,v_{n}}$. Let $d_k^l$ be the number of vertex with degree $k$ in $l$, where $l in L={U,V}$ and $k in X={1,2,cdots,n}$. Note that $ M = |E|= frac{1}{2}sum_{i in X }sum_{j in L}d_i^j$ is the total number of edges of $G$.

Now, randomly select $m$ edges from $E$ without replacement and call a vertex “covered” if it is one of the ends of the randomly selected edges. Then, induce a graph with the covered vertex subset ($S$), i.e, a graph $G_{S}$ with vertex set $S$ and all the edges connecting pairs of vertices in that subset in $G$.

The question is: is there any way to derive the expected value of the number of edges of $G_{S}$ ($E{(E_{s})}$) based on the probability of edge selection $p_{e} = frac{m}{M}$ and the degree distribution of $G$?

For the case of the uniform degree distribution, the results in 1 or 2 can be applied, but I would like to see if there is a way to calculate it for an arbitrary degree distribution.

javascript – React filtering array of object by input text and category selection by button click

Example of code:

In the above StackBlitz example, I am attempting to filter a list of items from a search input as well as by filtering out by categories through buttons. I already have this working with the search input and one button toggle, but I am struggling to make this conditional to work with multiple category selections. I’m stuck on coming up with the expression that filters by searchText as well as all the combinations of category selections. as seen in the logic below:

React.useEffect(() => {
    const searchRegex = searchText && new RegExp(`${searchText}`, "i");
    const filteredData = items.filter(
      (item) =>

        (!searchRegex ||
          searchRegex.test(item.title) ||
          !searchRegex ||
          searchRegex.test(item.source)) &&

        (!productsFilter || item.type === "product")
    );
    setFilteredItems(filteredData);
  }, (searchText, productsFilter, resourceFilter, extraFilter));

textbox – Why can’t you reduce a selection from the beginning after selecting everything in a text input field?

The reason is consistency.

I do not have official reference literature on this, however, I believe it is possible for us to come to a comfortable reasoning, regardless.

Let’s walk through what we know from other user text-selection interactions in the same environment:

  • Any other selection you perform on a quantity of text places the cursor somewhere. The cursor is not ever placed ambiguously—it’s always in a predictable location after every user interaction.

  • There is only ever one “caret” or “insertion point”.

Thus, following the aforementioned established pattern, CTRL+A has to make a decision as to where the cursor shall be placed upon selection. Should the cursor be placed at the beginning of the selection, the end, or somewhere in the middle?

Let’s just go ahead and agree that “somewhere in the middle” is not going to yield predictable results, and nix that option.

We’re left with two options: the beginning or end.

Since the text being selected reads left to right, an assumption that most people select text with a cursor from left to right, and most active text editing happens at the end of a block of text, it seems like placing it at the end might be the best option.

textbox – Why can’t you reducing a selection from the beginning after selecting everything in a text input field?

The reason is consistency.

I do not have official reference literature on this, however, I believe it is possible for us to come to a comfortable reasoning, regardless.

Let’s walk through what we know from other user text-selection interactions in the same environment:

  • Any other selection you perform on a quantity of text places the cursor somewhere. The cursor is not ever placed ambiguously—it’s always in a predictable location after every user interaction.

  • There is only ever one “caret” or “insertion point”.

Thus, following the aforementioned established pattern, CTRL+A has to make a decision as to where the cursor shall be placed upon selection. Should the cursor be placed at the beginning of the selection, the end, or somewhere in the middle?

Let’s just go ahead and agree that “somewhere in the middle” is not going to yield predictable results, and nix that option.

We’re left with two options: the beginning or end.

Since the text being selected reads left to right, an assumption that most people select text with a cursor from left to right, and most active text editing happens at the end of a block of text, it seems like placing it at the end might be the best option.

google sheets – Calculating hours based on data validation selection

Sheet Link

Hello all!

I was wondering if someone could tell me the best way to have the hours calculated in the “May” tab translate into the Employee View Tab under the respective employee? I’m trying to get it so when I select an employees name in a cell under the “Shift View” tab it calculates the hours for that employee on that day. So ostensibly I could have an employee work two shifts in a day, and it would automatically sum that up.

I have been googling all night and I can’t seem to find anything I can wrap my head around.

postgresql – Unable to use a selection join with this data when it was previously working

I'm trying to debug a really weird problem.

One of the parts of my database that was working properly suddenly stopped working. I limited the problem to this:

First of all: these are my databases

users: id(int), email(var).....
calendar : id(int) , user_id(int)(fk->users(id))
calendar_field : id(int), text(text), rating(int), calendar_id(int)(fk-> calendar(id)), week_number(int)

Here is their creation script:

USERS:

    -- Table: public.users

-- DROP TABLE public.users;

CREATE TABLE public.users
(
    id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
    email character varying(254) COLLATE pg_catalog."default" NOT NULL,
    password character varying(60) COLLATE pg_catalog."default" NOT NULL,
    refreshtoken character varying COLLATE pg_catalog."default",
    birth_date date,
    first_name character varying COLLATE pg_catalog."default",
    second_name character varying COLLATE pg_catalog."default",
    years_to_live integer,
    register_date date,
    death_date date,
    weeks_to_live integer,
    CONSTRAINT users_pkey PRIMARY KEY (id),
    CONSTRAINT users_email_unique UNIQUE (email)
)

TABLESPACE pg_default;

ALTER TABLE public.users
    OWNER to postgres;

CALENDAR:

        -- Table: public.calendar

-- DROP TABLE public.calendar;

CREATE TABLE public.calendar
(
    id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
    user_id integer,
    CONSTRAINT calendar_pkey PRIMARY KEY (id),
    CONSTRAINT "userId" FOREIGN KEY (user_id)
        REFERENCES public.users (id) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE CASCADE
)

TABLESPACE pg_default;

ALTER TABLE public.calendar
    OWNER to postgres;

CALENDAR_FIELD

 -- Table: public.calendar_field

-- DROP TABLE public.calendar_field;

    CREATE TABLE public.calendar_field
    (
        id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
        text text COLLATE pg_catalog."default",
        rating integer,
        calendar_id integer NOT NULL,
        week_number integer,
        CONSTRAINT "CalendarField_pkey" PRIMARY KEY (id),
        CONSTRAINT "calendarField_calendar_id_fk_calendar_id" FOREIGN KEY (calendar_id)
            REFERENCES public.calendar (id) MATCH SIMPLE
            ON UPDATE CASCADE
            ON DELETE CASCADE
    )

    TABLESPACE pg_default;

    ALTER TABLE public.calendar_field
        OWNER to postgres;

Well, what's the problem over there? My program generates the following data in the database:

users:

- id: 58
- email: email1@email.com
- password: password
- refreshtoken: hash....
- birth_date: 2008-08-08
- first_name: first
- second_name: second
- years_to_live: 100
- register_date: 2020-05-12
- death_date: 2097-12-08
- weeks_to_live 5218

calendar:

- id: 64
- user_id: 58

calendar_field

-id: 462640
-text: notext
-rating: 0
-calendar_id: 64
-week_number: 1

And when I try to do it, select

SELECT * from calendar_field cf join calendar c on (c.user_id = cf.calendar_id) where week_number='1' and user_id='58';

It does not return any lines, when I remember perfectly how it returned certain lines

It's not funny, it's only when I insert the data manually, filling 1 by 1 each field with pgadmin, for example with this:

users:

- id: 58
- email: email2@email.com
- password: password
- refreshtoken: token
- birth_date: null
- first_name: null
- second_name: null
- years_to_live: null
- register_date: null
- death_date: null
- weeks_to_live null

calendar:

- id: 65
- user_id: 77

calendar_field

-id: 3000
-text: sd
-rating: 0
-calendar_id: 65
-week_number: 1

And then I run it also returns 0 lines

SELECT * from calendar_field cf join calendar c on (c.user_id = cf.calendar_id) where week_number='1' and user_id='77';

(At the time of writing, the above selection does not work, but sometimes after manually inserting the data, it worked)

And with the two data inserted during the launch

SELECT * from calendar_field cf join calendar c on (c.user_id = cf.calendar_id) ; will also return 0 lines. What's going on?

Make sure that ALL iPhone burst shooting images are shared via download for selection and editing? How? 'Or' What?

Make sure that ALL iPhone burst shooting images are shared via download for selection and editing? How? 'Or' What?

  • We did a relaxed photo shoot, a lot of photos exploded a few months ago.

    • We have never had the opportunity to work together on the photos or retrieve them from our iPhone.
  • I know it is possible for him to upload the photos to a cloud drive / folder such as Dropbox / google drive / onedrive / pcloud. I use them a lot for non-photographic files.

  • The problem now is that there is something in the Burst mode that not all of the images in that burst sequence are being downloaded or shared. How do we get there?

I wonder if there is a better way for him to download and share with me while we can work on it online himself?

  • Without having to download them all to work on them on my iPhone or Windows Surface Pro.

We may have to repeat this in the future and work at a distance from each other.

Is there a better selection and photo editing flow here?

Ps: I am a technophile but not used to such filming and workflows.

Tab selection vs drop-down selection

I'm trying to figure out which is the best UX that I could possibly implement for a mobile phone application. Either data selection via the tab header or a drop-down list.

Solution 1 – Tab header

It is easy for the user to see the sections / data available using this solution.

The only problem I can see is that there are cases where the user has not seen the available tabs on the right as it is hidden and the user has to scroll horizontally to see the other available tabs, one of my target users is 40-60 year olds with low tech knowledge.

enter description of image here

Solution 2 – drop-down list

An advantage of implementing the drop down list that I anticipate is that users see all of the available actions / information / data with which the user can interact.

enter description of image here

I just want to have your opinion on these 2 solutions. Feel free to correct or recommend other approaches.

Is there a way to change the print dialog in Google sheets either by default at last selection OR to "selected cells"

I almost never want to print an entire spreadsheet. I usually want to print a block of 15 rows by 8 columns.

Each #$ & ^ $ time I have to go from "print whole sheet" to "print selected cells". Is there a way to make this change permanent, so the default is to print the selected cells.

Oddly enough, the print dialog remembers the centering of the previous print.

(To anticipate comments: Yes, I mentioned this in the comment sheets. Several times.)