## reference request – A group acts on a groupoid

Let $$G$$ be a group. Let $$(Pi,circ)$$ be a groupoid. Suppose I have a $$G$$-action on every morphism space $$Pi(p,q)$$, denoted by $$Gtimes Pi(p,q)to Pi(p,q)$$, $$(g, sigma)mapsto gcdot sigma$$. (For simplicity, we may assume $$G$$ is abelian.)
Suppse these $$G$$-actions further satisfy the natural properties (1) $$gcdot (sigma_1circ sigma_2)=(gcdot sigma_1)circ sigma_2=sigma_1circ (gcdot sigma_2)$$; (2) $$g_1g_2cdot sigma=g_1cdot(g_2cdot sigma)$$; (3) $$(gcdot sigma)^{-1}=g^{-1}cdot sigma^{-1}$$ (I might miss some.)

Is there a nice conceptual way to describe the above situation? I think what I ask is standard, but I fail to find a reference.

## python – How to remove a sprite from a group?

I am trying to make a chess game with Pygame, but am unable to remove the chess piece when it is captured. Stack Overflow already has a question on this here. But this code doesn’t seem to work. When I iterate through the list, it ends up deleting many pieces.

``````for piece in piece_group_black:
if piece.location.all() == selects.location.all():
piece.kill()
``````

Say I move white piece to capture black , this code ends up deleting a lot of pieces.

``````for piece in piece_group_black:
if piece.location.all() == selects.location.all():
pieceremove = piece

pieceremove.kill()
``````

This removes a random piece. Same happens for when I use the code given in the answers. They just don’t work.

## database – Scalable and Optimised group chat system

I have a simple chat system. I have built this to scale so I would appreciate optimisation tips or alternative table structures too. This does not include the pub/ sub queue system.

Users

``````| id | name | createdAt
``````

Conversations – 1 Conversation has many messages & many participants

``````| id | lastMessage | updatedAt
``````

Participants – A user in a conversation.

``````| id | conversation | user |
``````

Messages

``````| id | conversation | user | text | createdAt
``````

A big concern of mine is the query needed to get a list of conversations, similar to Whatsapp. I decided to create a trigger, so when a new message is inserted, It will run an UPDATE query on the lastMessage field with the new id.

This way makes it efficient to query the conversations, like this

``````select * from conversations
join participants on participants.conversation = conversations.id
join messages on messages.id = conversations."lastMessage"
where participants.user = 1
order by conversations."updatedAt" desc
offset 0
limit 10
``````

Although every message is now an additional query, this is saving me a lot potentially with the amount of sub queries/ joins i would need otherwise.

I have also added a unique constraint on participants, on the fields (conversation, user) Enforcing the 1 to 1 relationship between a user and conversation

``````schema.unique(( 'conversation', 'user' ))
``````

I added a FK to the messages table to reference this restricting any messages from being inserted, if the user is not part of the conversation, through the participants table.

``````schema.foreign(( 'conversation', 'user' )).references(( 'conversation', 'user' )).inTable( 'participants' ).onUpdate( 'CASCADE' ).onDelete( 'RESTRICT' )
``````

Note, this is knex but not relevant, its just to visualise

Here is my auto update function

``````CREATE OR REPLACE FUNCTION update_last_message()
RETURNS TRIGGER
LANGUAGE PLPGSQL
AS
BEGIN
UPDATE conversations
SET "lastMessage" = NEW.id,
"updatedAt" = NOW()
WHERE conversations.id = NEW.conversation;
RETURN new;
END;
``````

And my trigger

``````CREATE TRIGGER last_message
AFTER INSERT ON messages
FOR EACH ROW
EXECUTE PROCEDURE update_last_message();`
``````

It works fine. I would really like to know if this can be improved. In terms of speed, number of queries, efficiency, data integrity, dollar cost overall and best practises. Taking into account the ratio of how many messages are inserted vs how many times someone views a list of their conversations to weigh up if the extra query from the trigger warrants how much is saved by having the lastMessage field when querying

Thankyou very much

## Get Group Details from Person or Group field using REST API?

Try using this:

``````_api/web/lists/getbytitle('listname')/items(100)?\$select=Initiator/EMail,RAReviewers/EMail&\$expand=Initiator,RAReviewers
``````

Above is working fine for me in case of person or group.

Example:

``````/_api/web/lists/getbytitle('TestList')/items(1)?\$select=TestPersonField/Title,TestPersonField/EMail&\$expand=TestPersonField
``````

Output: Below is part of response returned from above API call

``````<entry>
<content type="application/xml">
<m:properties>
<d:Title>Ganesh Sanap</d:Title>
<d:EMail>gsanap@tenant.onmicrosoft.com</d:EMail>
</m:properties>
</content>
</entry>
<entry>
<content type="application/xml">
<m:properties>
<d:Title>SPConnect Members</d:Title>
<d:EMail>SPConnect@tenant.onmicrosoft.com</d:EMail>
</m:properties>
</content>
</entry>
``````

Where `SPConnect Members` is a Microsoft 365 group name.

Note: This will not work for SharePoint groups as they don’t have Email property.

## automorphism group – What is the list of all the regular planar graphs with equivalent vertices?

Platonic solids, Archimedean solids, prisms and anti prism all have planar graphs where all the vertices are equivalent, or in other words, for any 2 vertices v1 and v2 there is an automorphism that maps v1 into v2.

What about the reverse problem: are the planar graphs for which all the vertices are equivalent only the ones corresponding to the Platonic solids, Archimedean solids, prisms and anti prism? If so, can it be proved easily or where can we find such a proof?

## Send email to a group of users after creating a new content

In Drupal 9, i need to notify all users belonging to a role ROLE1 by their email about new content being created. Everything’s fine, but i don’t know how to put together email addresses of these users in the SEND TO data selector of the RULES module

## Computation of the fundamental group for S2 after removing points

I want to show, that
$$pi_1(S^2 setminus {a_1,a_2,a_3},p) = langle gamma_{a_i} | prod_{i=1}^3 gamma_{a_i} = 1 rangle$$
My idea was to use the thrm. of Seifert-van-Kampen. Since $$S^2$$ minus $$3$$ points is homeomorphic to $$mathbb{R}^2$$ minus $$2$$ points. Lets denote $$S:= S^2 setminus {a_1,a_2,a_3}$$,
$$R:=mathbb{R}^2setminus {a_1,a_2}$$, $$A:=mathbb{R}^2setminus {a_1}$$, $$B:=mathbb{R}^2setminus {a_2}$$ and so, that $$p in A cap B$$. But applying Seifert-van-Kampen gives me now

$$pi_1(S,p) simeq pi_1(R,p) simeq mathbb{Z}*mathbb{Z}$$
so there are only 2 generators. Can someone explain me, what im doing wrong or another way, how to prove this?

## sharepoint online – Team Site Permission Not Showing New Group

I have a Modern Team Site and have default permission groups (Owner, Member, Visitor). For the new requirement I have created a new group with new permission level (New Group Test).

But when I add users from home page this new group is not showing. There’s only Owner and Member.

I need to assign some users to this new group.

I know I can directly add the users in the group in the first screenshot.

But is it possible to make that group available in the home page as in the second screenshot?

Or by default it only shows Member and Owner option?

## ag.algebraic geometry – Maximal closed subscheme stable under the action of a finite connected group scheme

Let $$k$$ be a field of characteristic $$p>0$$, $$X$$ a smooth projective $$k$$-variety and $$Ysubseteq X$$ a closed irreducible subvariety. Let $$G$$ be a connected finite $$k$$-group scheme acting on $$X$$.

Does there exist a maximal closed subscheme $$T$$ of $$Y$$ stable under the action of $$G$$?

If $$G$$ is étale, then I think one can define $$T:=bigcap_{gin G}g(Y)$$. In case $$T$$ exists, is there a similar description for it?