identity

Python: Why "is" keyword has different behavior when there is dot in the string?

>>> x = "google" >>> x is "google" True >>> x = "google.com" >>> x is "google.com" False >>> Can someone give me some hints why its like that? Edit: to make sure above, I have just tested on python 2.5.4, 2.6.5, 2.7b2, python 3.1 on windows and python 2.7b1 on linux Looks its consistence across all, so its by design and Am I missing ...

Can DataObjects.NET support SQL identity columns?

While there's lots to like about DataObjects.NET, I've found help resources to be a lean, and can't find a solit example of using DataObjects.NET with RDBMS generated primary keys. It would seem as though D4O won't do inserts against SQL Server unless it's in controll of the key. Has anyone solved this in the wild? ...

What is the difference between "a is b" and "id(a) == id(b)" in Python?

The id() inbuilt function gives... an integer (or long integer) which is guaranteed to be unique and constant for this object during its lifetime. The is operator, instead, gives... object identity So why is it possible to have two objects that have the same id but return False to an is check? Here is an example: >>> class ...

iPhone developer cert not associating with Provisioning Profiles

I'm seeing the dreaded "Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain" error. Strange, as it used to work. Not sure what changed. A few of the symptoms I've noticed beyond this: In the project info, for Code Signing Identity, instead of saying "iPhone De...

How to automatically reseed after using identity_insert?

Hello, I recently migrated from a PostgreSQL database to a SQL Server database. To switch the data over I had to enable IDENTITY_INSERT. Well come to find out that I get all sorts of strange errors due to duplicate identity values(which are set as primary keys) upon doing an insert in any of the tables. I have quite a few tables. What ...

How does IIS persist a user's identity from page to page in an ASP.net application?

Web pages are, by nature, state-less objects. When you click from page to page in an ASP.net application, each request for a page is treated as a brand-new request. We use things like cookies, session-variables, and query strings to maintain state from page to page. When you log in to an ASP.net web application using Windows Authentic...

Impersonating a user in wrong domain doesn't throw exception

I used the common impersonation code and it worked just fine, until I inserted random 'dggdgsdg' in domain - and it worked nonetheless... if (LogonUser(Username, Domain, Password, Logon32LogonInteractive, Logon32ProviderDefault, ref existingTokenHandle) && DuplicateToken(existingTokenHandle, (int)SecurityImpersonationLevel.SecurityD...

How to preserve object identity across different VMs

To be specific let me illustrate the question with Spring http-remoting example. Suppose we have such implementation of a simple interface: public SearchServiceImpl implements SearchService { public SearchJdo processSearch(SearchJdo search) { search.name = "a funky name"; return search; } } SearchJdo is itself...

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 Files(x86)\Windows Identity Foundation* and it's not in there (or the 64 bit program files folder). Help!...

How can i get the seed value of an identity column in MySql

To get the seed and step values of an identity column in sql server i can use this syntax SELECT ColumnName = name, Seed = seed_value, Step = increment_value FROM sys.identity_columns So far in MySql i have found that if i use this syntax SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE auto_increment IS NOT NULL I can at least fi...

How to force SQL Server 2008 to not change AUTOINC_NEXT value when IDENTITY_INSERT is ON ?

Hello, I got question about IDENTITY_INSERT. When you change it to ON, SQL Server automatically changes AUTOINC_NEXT value to the last inserted value as identity. So if you got only one row with ID = 1 and insert row with ID = 100 while IDENTITY_INSERT is ON then next inserting row will have ID = 101. I'd like it to be 2 without need ...

How to properly reserve identity values for usage in a database?

We have some code in which we need to maintain our own identity (PK) column in SQL. We have a table in which we bulk insert data, but we add data to related tables before the bulk insert is done, thus we can not use an IDENTITY column and find out the value up front. The current code is selecting the MAX value of the field and increment...

Entity Framework SaveChanges - how to ignore ID / Identity fields on INSERT

VB .NET 4 WinForms application. I have a (DevExpress) grid bound to an IEnumerable(Of MyClass). Whenever a new row is added, the ID defaults to zero (0). On trying to SaveChanges, EntityFramework doesn't realise that being an identity field means it should ignore any contents on insert and just insert the other values. I can't specify n...

click once Error: The deployment identity does not match the subscription

Hi all, I'm using Visual Studio 2008 sp1. I have an application WinForms deployed internally using ClickONce in shared folder in local network. The Test Certificate pfx expired in 2035. I h ave published the update to the internal shared folder severals times. Note that the project is only set to 'Sign the ClickOnce manifests' an...

Auto increment over multiple identity columns in MS SQL 2005 or 2008

Hi, I want to have two different tables in MS SQL, for example users and groups, both with identity column. It is possible to create auto increment over two identity columns? I want to have third table with common informations to these two tables and I want to identify unique record. In Oracle is SEQUENCE. It is possible to do it? Tha...

Is To Manually Assign An Entity's IDs A Good Idea?

We're developing a system to replace an old application from our clients. Actually there are many entities (like merchants, salesmen, products, etc) that must have a manual assigned ID -so they can be integrated with other existing systems. i.e. accounting. We think the best solution is simply allow the user to assign the entities IDs ...

How to update guid ID references when converting to identity IDs

I am trying to convert tables from using guid primary keys / clustered indexes to using int identities. This is for SQL Server 2005. There are two tables MainTable and RelatedTable, and the current table structure is as follows: MainTable [40 million rows] IDGuid - uniqueidentifier - PK -- [data columns] RelatedTable [400 million row...

How to generate id for easily sorting purpose in SQL Server?

Hi everyone, I'm making an website and I have problem generate the parent/child tree like: Page 1 ---Sub page 1 ------Sub page 1 - 1 Page 2 Page 3 ---Sub page 3 ------Sub page 3 - 1 ------Sub page 3 - 2 If I use UID, it's impossible to write the "ORDER BY" t-sql to make the tree. I'm thinking of a function that can generate the ID (v...

How should passwords be securely stored for web hosting?

Possible Duplicate: Encrypting/Hashing plain text passwords in database Recently, I discovered that major web hosting companies store their users' passwords in plaintext and even ask for the last 4 digits of the user' password when trying to verify their identity. This seems vitally wrong and full of security problems. I belie...

How can I retrieve a Windows Computer's SID using WMI?

I'm not looking for User SIDs. I'm looking for the computer SID, which active directory would use to uniquely identify the computer. I also don't want to query the active directory server, i want to query the computer itself. ...