Questions tagged [identity]

An inherent property of an entity that distinguishes that entity from all others. Frequently used to refer to user identity and authentication.

Identity typically refers to user identity in authentication scenarios.

2969 questions
74
votes
5 answers

Why is range(0) == range(2, 2, 2) True in Python 3?

Why do ranges which are initialized with different values compare equal to one another in Python 3? When I execute the following commands in my interpreter: >>> r1 = range(0) >>> r2 = range(2, 2, 2) >>> r1 == r2 True The result is True. Why is…
root
  • 1,066
  • 1
  • 8
  • 16
74
votes
6 answers

Programmatically get a Storyboard ID?

Trying to see if a UIViewController or UIView can identify its Storyboard ID. So was hoping for: UIViewController *aViewController; NSString *storyboardID = aViewController.storyboard.id; //not an actual property or: NSString *storyboardID =…
Jalakoo
  • 3,523
  • 2
  • 21
  • 20
70
votes
5 answers

Firebase: how to generate a unique numeric ID for key?

I need numeric IDs for human readability. How do I get it in Firebase? I want numeric ID for keys, e.g. "000000001", "000000002","00000003","00000004". The reason I need it is because these IDs will become the permanent object ID both online and…
Ivan Wang
  • 8,306
  • 14
  • 44
  • 56
66
votes
3 answers

How do I reset an increment identity's starting value in SQL Server

I would like to have a nice template for doing this in development. How do I reset an increment identity's starting value in SQL Server?
Joel Meador
  • 2,586
  • 2
  • 19
  • 24
65
votes
8 answers

@@IDENTITY, SCOPE_IDENTITY(), OUTPUT and other methods of retrieving last identity

I have seen various methods used when retrieving the value of a primary key identity field after insert. declare @t table ( id int identity primary key, somecol datetime default getdate() ) insert into @t default values select…
Seibar
  • 68,705
  • 38
  • 88
  • 99
65
votes
6 answers

How to test for (ActiveRecord) object equality

In Ruby 1.9.2 on Rails 3.0.3, I'm attempting to test for object equality between two Friend (class inherits from ActiveRecord::Base) objects. The objects are equal, but the test fails: Failure/Error: Friend.new(name: 'Bob').should…
ryonlife
  • 6,563
  • 14
  • 51
  • 64
63
votes
7 answers

Python: Why does ("hello" is "hello") evaluate as True?

Why does "hello" is "hello" produce True in Python? I read the following here: If two string literals are equal, they have been put to same memory location. A string is an immutable entity. No harm can be done. So there is one and only one…
Deniz Dogan
  • 25,711
  • 35
  • 110
  • 162
62
votes
5 answers

Using Asp.Net Identity DataBase first approach

I need to integrate Asp.Net latest MVC version with an existing database which has an additional column String Address to table dbo.AspNetUsers I need to create an instance ApplicationUser which has property Address. Any idea how to do it?
GibboK
  • 71,848
  • 143
  • 435
  • 658
59
votes
1 answer

AD vs ADFS vs LDAP: Explain it like I'm 5

I don't work with Microsoft but I'm struggling understanding conceptually how AD, ADFS and LDAP work together. Let's say I have an application that needs an Identity Provider. How does AD and LDAP come into play? My googling hasn't come up with a…
brezotom
  • 715
  • 1
  • 8
  • 12
59
votes
5 answers

Two variables in Python have same id, but not lists or tuples

Two variables in Python have the same id: a = 10 b = 10 a is b >>> True If I take two lists: a = [1, 2, 3] b = [1, 2, 3] a is b >>> False according to this link Senderle answered that immutable object references have the same id and mutable…
Ram Vallury
  • 617
  • 1
  • 6
  • 7
57
votes
2 answers

Why does the "is" keyword have a different behavior when there is a dot in the string?

Consider this code: >>> x = "google" >>> x is "google" True >>> x = "google.com" >>> x is "google.com" False >>> Why is it like that? To make sure the above is correct, I have just tested on Python 2.5.4, 2.6.5, 2.7b2, Python 3.1 on windows and…
YOU
  • 120,166
  • 34
  • 186
  • 219
55
votes
10 answers

Where is the Microsoft.IdentityModel dll

I have installed the Windows Identity Foundation but can't find the Microsoft.IdentityModel dll. According to the Azure Hands-on-Labs it should just be in Add Reference in VS2010. However it's not there. I also looked in c:\Program…
Moory
  • 573
  • 1
  • 4
  • 5
50
votes
7 answers

SQL server identity column values start at 0 instead of 1

I've got a strange situation with some tables in my database starting its IDs from 0, even though TABLE CREATE has IDENTITY(1,1). This is so for some tables, but not for others. It has worked until today. I've tried resetting identity column: DBCC…
Muxa
  • 5,563
  • 6
  • 46
  • 56
50
votes
7 answers

SQL Server, How to set auto increment after creating a table without data loss?

I have a table table1 in SQL server 2008 and it has records in it. I want the primary key table1_Sno column to be an auto-incrementing column. Can this be done without any data transfer or cloning of table? I know that I can use ALTER TABLE to add…
arun
  • 781
  • 2
  • 6
  • 14
49
votes
10 answers

ADO.NET Entity Framework and identity columns

Is the Entity Framework aware of identity columns? I am using SQL Server 2005 Express Edition and have several tables where the primary key is an identity column. when I use these tables to create an entity model and use the model in conjunction…
matthew thomas