How can I find which table belongs to which two users in a MySQL database that stores user messages?

I’m building a chat application in which I want to store user messages in a MySQL database. I have came up with the solution of creating a seperate database for messages and creating tables for each conversation between users. One example table would look like this:

+-----------------+-----------------+------+-----+---------+----------------+
| Field           | Type            | Null | Key | Default | Extra          |
+-----------------+-----------------+------+-----+---------+----------------+
| message_count   | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| message_content | varchar(2000)   | YES  |     | NULL    |                |
| sent_by         | varchar(32)     | YES  |     | NULL    |                |
| sent_at         | datetime        | YES  |     | NULL    |                |
+-----------------+-----------------+------+-----+---------+----------------+

But how would I be able to figure out which table should I load for a given two users? I could store the usernames of both participants of the chat room in a column named “participants” seperated by a whitespace and use a query that looks like SELECT FROM chats WHERE participants LIKE username, but that does not sound like a healthy solution at all.

algorithms – How to prove that one problem belongs to class P?

Is there any typical proving method when proving that one problem belongs to class P?

For example, when proving that

The problem of finding n to the kth power is the P problem. (Each multiplication can be done in unit time)

If you present an algorithm that can solve this problem with $O (log n)$, can it be a proof?

architecture – Deep Object Graph Hierarchy: access an object which belongs to that hierarchy

Consider we have something like this:

A person, which has a physical body with arms, each arm has a hand, each hand fingers, and each finger a fingernail.

Another example: we have a car and a car-wheel in it.

So now I want to tune the fingernail a little bit, or the car-wheel, in both cases I want to change the color.

I go to a Person-Tuning-Garage, in which case I have to dive through the object-graph to get to the object (“fingernail”) i’m interested in:

person.getBody().getArm("left").getHand().getFinger(4).getFingernail()

I don’t want to let the person itself decide which fingernail I am going to tune.

In the car scene, I would allow the user to rotate the car-wheel, so the user has to ask the car object for the car-wheel to rotate it; here we have another problem.

If the user wants to rotate the wheel, before letting the user rotate it, the wheel must ask the car if there are no stones at the care-tire and only then the car wheel is allowed to rotate. Bumps in the street also forbid rotating the wheel from the car-side. So we have a cyclic dependency.

My questions are:

{x belongs to {a, b} : |x| is a perfect cube }

{x belongs to {a, b} : |x| is a perfect cube }

What is the smallest class of this language between decidable or recognizable?

Consider a set A={x:x belongs to (1,2)U[2,3)}

My question is
Is the given set connected?
If so then how?
I know x belongs to (1,2) implies that 1<x<2 and x belongs to (2,3) implies that 2<=x<3
So these two are "not" disjoint sets since they have atleast one element in common i.e. 2

Finding the ≡A equivalence classes of L={0^n1^n|n belongs to N}

I am told to find the equivalence classes of 0^n1^n as asked above. For one, I know it has an infinite number of equivalence classes given it’s a non-regular language. Im not sure how to find all the equivalence classes and show how I got those equivalence classes.

can not access bitcoin in an address that belongs to a discontinued wallet, although i have the 12 word phrase?

I am still a Rookie regarding bitcoins and therefore apologize beforehand if I might use some words wrong.

I started a bitcoin wallet through a provider some years ago and bought some bitcoin. The wallets they provided were in the cloud and the didn’t want to continue with that solution after some time so they discontinued their wallets. At that time I transferred my bitcoin to a new wallet.
This week I transferred the bitcoins back from the new wallet to the old wallet as I still had the old address written down and I thought that I could sell the bitcoin through my old provider (had forgotten about that they discontinued their wallets). I can see the public key or address which contains the bitcoin.
I have the 12 word recovery phrases for both wallets. I tried to recover my wallet with the 12 word phrase but the balance is 0. When I log on to the blockchain app i can see the old address under “imported addresses” but it says “not payable”.

Is there any way to access these bitcoin on the old address or are they burnt?

I tried the steps in I have my 12 word seed from @Abdussamad, even with different import methods but unfortunately it can’t see the balance.

Really appreciate your help.
br

Find the average of $F(x) = int_{x^2}^{1} sin(u)^2 ,du where x belongs to [0,1]$

I tried solving this question by the same method as following:

enter image description here

But what to do with x belongs to [0,1] part? I’m confused

7 – How to allow access to page variant (Page Manager) if user belongs to list

The Situation

I have an ECK entity called “Event” in my Drupal 7 site.
I have an entity reference field on Event that collects users who flag the Event with a non-global flag called “Sign up” via a rule.
I use Page Manager to control how an Event entity is shown to the users.

My context:
Edit relationship “User from Event (on Event: List of attendees (field_attendees)”
Event: Entity being viewed
Identifier: User from Event Attendees (field_attendees))
Keyword: event_attendees
Delta: 0

Here is the Selection Rule:
User: compare logged_in_user is User from Event Attendees (field_attendees)

The Problem

As you can see, one of my Page Variants has a selection rule that checks if the logged_in_user is on the list of attendees but it doesn’t work because the selection rule takes a “delta” and that means that it takes a hard coded integer to select one of the list. And if I leave this empty, it automatically takes “0” i.e. the first one in the list. There seems to be no option to set the delta to include all or any.

The Question

How can I create this selection rule to check if this user is ‘on the list’?

registration – How to tell the user email already exists and if that email address belongs to you then reset the password

I need to show a message to the user if the user tries to create an account and that email address already is taken and if that email address belongs to the user then reset the password for the account associated with that email address.

There might be some case this could happen.

  • User creates an account before and forgot that
  • Someone has uses there an email address to create an account