Subset of Unordered Pairs of Distinct Primary Keys With Normalization

I am currently in the process of designing a database. I have one table as follows:

CREATE TABLE Set (     id INT PRIMARY KEY AUTO_INCREMENT,     -- other values ); 

Now I wish to create another table that will store unordered pairs of distinct primary keys from the Set table, without sacrificing normalization. My first idea was:

CREATE TABLE Pairs (     id INT PRIMARY KEY AUTO_INCREMENT,     valueone INT NOT NULL,     valuetwo INT NOT NULL,     -- Appropriate foreign key constraints for valueone and valuetwo ); 

But this has the problem that I could store, for example the pair valueone=1, valuetwo=1 which I do not want as they are not distinct, or I could store either both or just one of valueone=1, valuetwo=2 and valuetwo=2,valueone=1 which (depending on how I interpret the data) would clearly be de-normalized. What is a natural, normalized way to store this fairly simple piece of information?

R a commutative ring and A an ideal in R with $A=m_1···m_r=n_1···n_s$ with $m_i$ distinct maximal ideals and all the $n_j$ distinct maximal ideals.

Let R be a commutative ring and A be an ideal in R satisfying $ A=m_1···m_r =n_1···n_s$ with all the $ m_i$ distinct maximal ideals and all the $ n_j$ distinct maximal ideals. Show that $ r = s$ and there exists a $ σ ∈ Sr$ satisfying $ m_i = n_σ(i)$ for all i.

I know that maximal ideal implies it being prime, and the product is contained in $ m_i$ and $ n_j$ for all $ i$ and $ j$ , but I’m not sure how to proceed further.

Two distinct users on Windows at the same time [duplicate]

This question already has an answer here:

  • Is it possible to run two windows sessions from the same computer at the same time? 5 answers

Can two distinct users legally and ToS-compliantly use the same Windows 10 machine simultaneously (i.e. both being logged in)? If it helps, allow for remote connections.

An ideal answer would be supported by documentation in case the answer is “No”.

Entity query for distinct field

I have an entity line_item with the following fields:

  • id
  • uid (entity reference)
  • product (entity reference)

I would like to get all distinct products (product ids) for a specific user.

I tried with entity query:

$  query = $  this->entity_query->get('line_item'); $  query->condition('uid.entity.name', $  username); $  entity_ids = $  query->execute(); 

Unfortunately this results in all line_items from the given user, with multiple times the same product. But what I am interested in is just getting all different products for the given user.

How can I use Fuzzy logic to switch between two distinct states?

So I have a nice problem and I’ve been contemplating the use of fuzzy logic for this. I have attached a little diagram I have made to explain the problem–>Fuzzy logic problem image

So I have a power demand signal that varies between 0 & 1 on the x-axis (input). If the signal starts off at say 0.3 and continues to grow- I want the output to be say ‘state 1 active’ until it hits 0.7. After it crosses that limit it should switch to ‘state 2 active’. Now, say if the signal drops back to 0.45- I want the output to still be ‘state 2 active’ until it crosses the 0.4 limit where it will have to revert back to ‘state 1’. Basically I want to use the little triangle (transition phase) as a sort of buffer wherein nothing changes and the output corresponds to the last state the system was in.

Do you think it can be done using fuzzy logic? Or alternative methods- I’m trying to do this on Matlab/Simulink. Any advice/solution would be greatly appreciated!

[Email Scraper Plugin – URL Generator] 2 distinct PAGENUM

Hi everyone,

I’m using the URL Generator in the Email Scraper to scrape a directory. The URLs look like this

Code:
https://domaine.fr/page?keyword&from=1&to=20
https://domaine.fr/page?keyword&from=21&to=40
https://domaine.fr/page?keyword&from=41&to=60
...
https://domaine.fr/page?keyword&from=1781&to=1800

So I tried 
https://domaine.fr/page?keyword&from=1&to={pagenum}
but the website crashes when the pagenum is too high.

I want to do something like
https://domaine.fr/page?keyword&from={pa…o={pagenum}

I tried with
https://domaine.fr/page?keyword&from={ke…o={pagenum}
with  1, 21, 41, 61, etc… as , (from an Excel) but I have thousand of useless URLs…

Can someone help me?

Thanks!

[Email Scraper Plugin – Custom Crawler] How to websites with no distinct markers

Hello,

I purchased the Email Scraper Plugin and I’m trying to scrape a directory. I want to scrape companies’ name and email.

However, the website I scrape isn’t using unique markers. For example the company name is juste a <span>, so SB catches all the other <span> on the page.
Do you know any solution to this?
I’ve tried writing the marker with the code above the <span> to make it unique but ScrapeBox doesn’t allow line breaks.

Ex:

Code:
<h2>Company</h2>
 <span>ScrapeBox</span>

Also, there is no email for some companies, so the marker detected is the one for the next company’s email in the directory and it mixes up all the  names and emails.
I’m trying to figure out how to solve this and I would love some help…

[Email Scraper Plugin – URL Generator] 2 distinct PAGENUM

Hi everyone,

I’m using the URL Generator in the Email Scraper to scrape a directory. The URLs look like this

Code:
https://domaine.fr/page?keyword&from=1&to=20
https://domaine.fr/page?keyword&from=21&to=40
https://domaine.fr/page?keyword&from=41&to=60
...
https://domaine.fr/page?keyword&from=1781&to=1800

So I tried 
https://domaine.fr/page?keyword&from=1&to={pagenum}
but the website crashes when the pagenum is too high.

I want to do something like
https://domaine.fr/page?keyword&from={pagenum-20+1}&to={pagenum}

I tried with
https://domaine.fr/page?keyword&from=&to={pagenum}
with  1, 21, 41, 61, etc… as , (from an Excel) but I have thousand of useless URLs…

Can someone help me?

Thanks!