Returning random integer from interval based on last result and a seed

Suppose we have an interval of integers [a, b]. I would like to have a function that returns random members from within the interval, without repetitions. Once that all members within the interval are explored, the function would start to return the same first random sequence again, in the same order.

Example: a=1, b=5

3, 1, 4, 5, 2, 3, 1, 4, 5, 2, 3, 1, 4, 5, 2, ... 

This would be easy to achieve by shuffling an array of all elements between a and b, and repeating it once the array is finished. However, this would take too much memory space, and this is not suitable for my case (I might have millions of elements).

Instead, the function I’d like to have would be more or less like this:

f(a, b, n, seed) -> n+1 

Where:

a - start of interval b - end of interval n - last element returned from list seed - self-explanatory n+1 - next random element from list, calculated by using the seed and the last element returned (n) 

The trick is knowing some way to get a non-repeated number from the interval based only on the element returned before and the seed. In the end, it would behave like a circular list randomized at its initialization, but without using memory space.

Create dynamic sql query to select all related data in DB based on entry table and ID

Hope all is well. I am hoping you can help me.

Problem Statement – I’m tasked to create a dynamic SQL statement which will select all related data from a given table where the Identifier is passed. For each table where the relevant data is found i would like the data to be exported onto a separate tab of within excel

If i was doing this manually done this i would perform the following queries and export the data onto each tab;

Select * from  Mason where id = 12345 Select * from  MasonContacts where Companyid= 12345  Select * from  MasonOpportunities  where Comid = 12345  

However given the sheer volume of tables this isn’t viable.

Step 1 : Type in my identifier (in this case my identifier is a field called "Id" in the Table "Mason") The query will always start from this table.

Table Name : Mason Field : Id = "12345"

Step 2 : Search against table "MasonContacts", search against the field "Companyid". Return all columns & records where the field "Companyid = 12345"

Table Name : MasonContacts Field : Companyid

Step 3 : Search against table "Mason Opportunities ", search against the field "Comid". Return all columns & records where the field "Company = 12345"

Table Name : MasonOpportunities Field : Comid

Looking forward to your help

Time to FCP changes based on order of and tags

I was troubleshooting why one particular page took a full second longer to reach FCP compared to similar pages for mobile according to Google’s Page Insights. The difference ended up being the order of two tags at the beginning of the page.

3.4 seconds to FCP

<h2>heading</h2> <p>some paragraph</p> 

versus 2.5 seconds to FCP

<p>opening paragraph</p> <h2>heading</h2> 

In the first scenario, Google Page Insights gave a logo from the header as the FCP content. But with the second scenario, Google would display either text from the <p> or <h2> tag for the FCP content.

Why would the order of these two simple tags change the FCP content from text to an image header?

how to create user profile pages and display them based on users roles

Example: I have a website with 3 different user roles (amongst others): *developers *designers *contributors

I would like to have profile pages for users and would like to be able to display users on pages based (filtered) by their role. Hope this is clear. I have researched quite a few membership plugins and found that they are just bloated with features and ended up with TMI and no answers/solutions, so if you can help I would appreciate it. Do you know of any plugins suitable of doing that?

Thanx in advance

Hostpoco.com – Linux SSD cPanel based Plans $1 for 2 GB | $2.5 for 6 GB!

Hostpoco.com provides fast, simple, and secure web hosting services. All plans are Cpanel based and come with the best possible features. You can boost the loading speed of your website by 300% faster than those hosted on hard drive servers.
All shared hosting accounts are set up within 15 minutes of payment!*

Our Linux SSD Plan:

★Startup SSD:$1 /Monthly
~ 1 Domain Hosting
~ 2 GB Web Space
~ Unlimited Bandwidth
~ 1 GB RAM
~ 0 Addon Domains
~ Unlimited Email Accounts
~ Unlimited MySql Databases
★★★★

★Pro SSD:$2.5 /Monthly
~ 3 Domain Hosting
~ 6 GB Web Space
~ Unlimited Bandwidth
~ 1 GB RAM
~ 2 Addon Domains
~ Unlimited Email Accounts
~ Unlimited MySql Databases
★★★★

Website: https://hostpoco.com/
If you need any further information or help please feel free to mail us at Sales@hostpoco.com

Check Our Reviews:
https://hostadvice.com/hosting-company/h…o-reviews/

Thank You.