Questions tagged [membership]

Queries regarding The fact of being a member of a group. OR The number or body of members in a group.

A member is a person who belongs to a social group or an entity such as a company or nation. By extension it can refer to any part of a whole.

969 questions
1231
votes
12 answers

Fastest way to check if a value exists in a list

What is the fastest way to check if a value exists in a very large list (with millions of values) and what its index is?
Jean-Francois Gallant
  • 13,583
  • 6
  • 20
  • 24
456
votes
4 answers

Check if something is (not) in a list in Python

I have a list of tuples in Python, and I have a conditional where I want to take the branch ONLY if the tuple is not in the list (if it is in the list, then I don't want to take the if branch) if curr_x -1 > 0 and (curr_x-1 , curr_y) not in myList:…
Zack
  • 13,454
  • 24
  • 75
  • 113
152
votes
3 answers

Check if list of objects contain an object with a certain attribute value

I want to check if my list of objects contain an object with a certain attribute value. class Test: def __init__(self, name): self.name = name # in main() l = [] l.append(Test("t1")) l.append(Test("t2")) l.append(Test("t2")) I want a…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
74
votes
11 answers

How do you get the UserID of a User object in ASP.Net MVC?

I have some tables that have a uniqueidentifier UserID that relates to aspnet_Users.UserID. When the user submits some data for those tables, since the controller method has an [Authorize] I get a User object. I can get the username with…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
63
votes
7 answers

What is default hash algorithm that ASP.NET membership uses?

What is default hash algorithm that ASP.NET membership uses? And how can I change it?
iburlakov
  • 4,164
  • 7
  • 38
  • 40
60
votes
6 answers

How to check if element exists in array with jq

I have an array and I need to check if elements exists in that array or to get that element from the array using jq, fruit.json: { "fruit": [ "apple", "orange", "pomegranate", "apricot", "mango" …
idmitriev
  • 4,619
  • 4
  • 28
  • 44
40
votes
8 answers

Membership Generate Password alphanumeric only password?

How can I use Membership.GeneratePassword to return a password that ONLY contains alpha or numeric characters? The default method will only guarantee a minimum and not a maximum number of non alphanumeric passwords.
Curtis White
  • 6,213
  • 12
  • 59
  • 83
38
votes
8 answers

SemaphoreFullException when checking user role via ASP.NET membership

I have a page that checks that a user is in a particular role before performing some task, and have had no problem with functionality and have made no obvious related changes to the code in question. The site is on my development machine (Windows…
Stark Raving
  • 400
  • 1
  • 3
  • 7
36
votes
1 answer

How to leave a team on itunes connect?

I'm in multiple teams in iTunes Connect and want to leave one of these teams. I can't connect with the administrator of that team. How to do that? P.S. This answer is for Developer site only.
Nike Kov
  • 12,630
  • 8
  • 75
  • 122
34
votes
2 answers

Check if a pandas Series has at least one item greater than a value

The following code will print True because the Series contains at least one element that is greater than 1. However, it seems a bit un-Pythonic. Is there a more Pythonic way to return True if a Series contains a number that is greater than a…
ChaimG
  • 7,024
  • 4
  • 38
  • 46
33
votes
1 answer

Python's in (__contains__) operator returns a bool whose value is neither True nor False

As expected, 1 is not contained by the empty tuple >>> 1 in () False but the False value returned is not equal to False >>> 1 in () == False False Looking at it another way, the in operator returns a bool which is neither True nor False: >>>…
user2949478
  • 433
  • 3
  • 5
32
votes
3 answers

ASP.NET Membership: how to set the user as logged in

I am trying to get the Membership Provider to work. So far I have: calling : protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { …
marcgg
  • 65,020
  • 52
  • 178
  • 231
32
votes
7 answers

Is it possible to change the username with the Membership API

I am using the default sql membership provider with ASP.NET and I would like to provide a page to change the user's username. I believe I am sure I could do this with a custom provider, but can this be done with the default provider? Second part of…
31
votes
10 answers

"The system cannot find the file specified"

I saw many questions on SO with this error. But none were related to forms. I just hosted my application server after testing locally. I think it worked for a few mins but I'm not sure as I may have looked at the localhost tab for a moment. Then it…
strider
  • 2,157
  • 5
  • 30
  • 38
28
votes
1 answer

Disabling account lockout with the SqlMembershipProvider

How do I disable the account lockout feature of the SqlMembershipProvider? The MSDN documentation for the MaxInvalidPasswordAttempts property does not specify how to disable it. If I can't find the correct way to do it I will set the…
1
2 3
64 65