Compare entered password to stored password

I have created a form signup which you create a password. I then compare the entered password & email to the stored password & email for a successful login. I am having an issue of getting an email address of undefined for the stored email. I’m sure it is something simple. Below is my code –

const memberSignUp = (event) => {
  let formData = {
    firstName: document.getElementById("firstName").value,
    lastName: document.getElementById("lastName").value,
    email: document.getElementById("userEmail").value,
    password: document.getElementById("userPassword").value,
  localStorage.setItem("formData", JSON.stringify(formData));
  alert("Account successfully created");
  window.location = "landing.html";

function clearForm() {
  document.getElementById("firstName").value = "";
  document.getElementById("lastName").value = "";
  document.getElementById("userEmail").value = "";
  document.getElementById("userPassword").value = "";

function memberSignIn() {
  let storedEmail = $("#storedEmail").val();
  let storedPassword = $("#storedPassword").val();
  let enteredEmail = $("#memberEmail").val();
  let enteredPassword = $("#memberPassword").val();
  console.log(storedEmail, enteredEmail);
  if (enteredEmail == storedEmail && enteredPassword == storedPassword) {
    alert("Login successful.");
    window.location = "index.html";
    return false;
  } else {
    alert("Incorrect username or password.");
    window.location = "landing.html?#";

core language – Create list of functions, domains, and iterate over (compare to Python code)

In Mathematica, I want to do a mass export of many different animated plots of specific functions with different domains. Because I don’t necessarily want the plots to always have exactly the same range for each graph, (for example, -1 to 1 on X and -1 to 1 on Y), I want to manually specify this value for each function I create.

For example, in Python, I could do something like this:

def g1(x):
  return x*x + 1
x_range1 = (-2, 2)
y_range1 = (0, 4)

def g2(x):
  return math.log(x)
x_range2 = (0, 8)
y_range2 = (-4, 4)

def g3(x):
  return 2*math.cos(x)
x_range3 = (-4, 4)
y_range3 = (-4, 4)

func_list = ((eval(f'g{ii}'), eval(f'x_range{ii}'), eval(f'y_range{ii}')) for ii in range(1, 3 + 1))

for function, x_range, y_range in func_list:
  print(function, x_range, y_range)

And I would get the output:

<function g1 at 0x000002063F0EF670> (-2, 2) (0, 4)
<function g2 at 0x000002063F0EF700> (0, 8) (-4, 4)
<function g3 at 0x000002063F0EF790> (-4, 4) (-4, 4)

Basically, I’m able to easily create an arbitrarily long list of functions and domains and then access them however I need to in the for loop. I’m sure that something similar is possible in Mathematica, I just don’t know the syntax.

I could just create a list of single plot objects, I suppose, but there might be other aspects that I want to be the same between all of the graphs (such as the line color, axis font, etc.). So really it would be ideal if I could do it very similar to the way I did in Python where I only specify the aspects specific to each function $g_i$ and then force those into a plot object within the for loop so that only the function and range changes, but not the other arguments.

I don’t know if Mathematica can do what I’m looking for, ideally in a way similar to what I presented in the Python code above. If so, does anybody have an example?

graphs – How do Kruskal’s and Prim’s algorithms compare to each other?

A tree in a graph is a connected acyclic subgraph. A spanning tree in a graph of order $n$ is a connected acyclic subgraph of order $n$ or equivalently a connected acyclic subgraph with $n-1$ edges.

Prim’s algorithm consists of building a spanning tree by adding edges (and corresponding vertices), always keeping the connected property, until the tree contains all vertices. The complexity of the algorithm is detailled here: it is $O(|E|log |V|)$ with binary heaps, and $O(|E| + |V|log |V|)$ (which is slightly better in general case) with Fibonacci heaps, a complicated data structure.

Kruskal’s algorithm consists of building the spanning tree by adding edges always keeping the acyclic property, until there are $|V|-1$ edges. Its complexity is detailled there. You can reach $O(|E|alpha(|V|))$ with improved union-find data structure ($alpha(x)$ is in practice very small, that is $leq 4$ even if $x$ is the number of particles in the universe).

Both of them are greedy algorithms, but the property you keep invariant is not the same.

sharepoint foundation – Compare items in 2 lists using Powershell

sharepoint foundation – Compare items in 2 lists using Powershell – SharePoint Stack Exchange

server – Ubuntu installation is awful beyond compare

Having used Linux since kernel 0.99b i’ve witnessed the quality of Linux distributions plummet in favour of throwing in a bunch of commercial interests and focus on business.

Today i found the Debian installer not even to boot so i decided to go ahead with the Ubuntu 20.x LTS server installation. This was a truely terrible experience. Like many distro the quality of installers has plummeted in recent years. To the point it appears made for idiots to work with who destroy entire disks as a default. In the real world we often do not have such choice and a mature installation proces is desirable.

There is even concern for Microsoft OS hibernating, i could not care less. Give me options at boot.

After all this oversimplification there is suddenly the partitioning manager which is resulting predictably in an unbootable system. There are truely simple checks to perfor to prevent installing an os so it cannot boot, why not care for this ?

At this point i wonder if Ubuntu is here to force people to move to Microsoft or what ?

I download Ubuntu Linux because i require to work with Linux and one of the dreadful distro’s who have become exclusively developer oriented and don’t have any attention for engineers anymore.

security – How to compare passwords which is stored in DB in encrypted form in secure way?

Recently In an interview I was asked this question –
Question- If are storing passwords in encrypted format in DB and in future when user login into our website how will we perform authentication?

Me:-we will first first encrypt the password using same hash function then compare it with already stored password.

Interviewer:- But if someone breaks into our system and find out our hash function which is same for all then he can easily access customer’s password.

Me-: We can create a hash function based on User-id. So everytime we are not using same hash function.

Interviewer- But this means app knows the user original password which is against User Privacy , even the app should not be know user’s password.

Me- I don’t know 🙁

Interviewer- Rejected!!!

Anyone here knows the solution of this question?

python – What is the best way to compare three lists in pandas using merge:

I am running into some issues and wasn’t sure what is the best way to do this in the panda.

Assuming I have

df1 = ('One', 'Two', 'Three')

df2 = ('Two', 'Three', 'Four')

df3 = ('Three', 'Four', 'Five')

How do I get a comparison of the three columns (using merge because those numbers are associate with another column) and fill nan in a location without numbers:


Index Column1 Column2 Column3
1 One Nan Nan
2 Two Two Nan
3 Three Three Three
4 Nan Four Four
5 Nan Nan Five

Index Column1

I used two outer joins to remove duplicate but wasn’t able to get it to work

C# Compare strings with umlaut strange results

I use string.Compare(strA, strB, true, CultureInfo.CurrentCulture); and dont unterstand the result.
CurrentCulture is “de-DE”.

string.Compare( "o", "ö", true, CultureInfo.CurrentCulture) // result: -1 
string.Compare( "d", "f", true, CultureInfo.CurrentCulture) // result: -1 
string.Compare( "dx", "fa", true, CultureInfo.CurrentCulture) // result: -1 
string.Compare( "ox", "öa", true, CultureInfo.CurrentCulture) // result: 1 
string.Compare( "oa", "öx", true, CultureInfo.CurrentCulture) // result: -1

Why the result depends on the second letter to get different results at last 2 lines?
If o ist first and ö is next should line 4 not also return -1?
Can someone explain this?

sharepoint enterprise – compare text from text field with lookup field

I would like to extract keywords from a document title in a SP List. I have three columns. The first is a text column containing the document Title. The second is a lookup column containing some keywords. The third is a multiline column which will hold the keywords found in the Title column.

For example:
(Lookup) column keywords: apples, oranges, strawberry, banana

Title: 20210312_we have apples and oranges for sale today.doc

The code I am looking for would have to extract the words “apples” and “oranges” found in the document title and place them in the column keywords, seperated by a semi-column

google sheets – How do I compare a Range to a NamedRange?

I’ve defined a named range called Ticker that references ‘Sheet 1!A1’.

I’d like to know when this cell changes value, so that I can run trigger some functions to run. I know that onEdit seems to be the way to do this:

function onEdit(e) {
  var range = e.range;

  if(range == NamedRange('Ticker')) {
    // do something...

I’d like to know the correct syntax for making the named range comparison:

  if(range == NamedRange('Ticker')) {
    // do something...

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive New Proxy Lists Every Day Proxies123