id

Generate unique ID for python object based on its attributes

Is there a way to generate a hash-like ID in for objects in python that is solely based on the objects' attribute values? For example, class test: def __init__(self, name): self.name = name obj1 = test('a') obj2 = test('a') hash1 = magicHash(obj1) hash2 = magicHash(obj2) What I'm looking for is something where hash1 ==...

(Fluent) NHibernate - problem mapping Id

Hello, I have a problem mapping an Id. The structures of the entities are as follows: public abstract class Entity<TEntity, TId> where TEntity : Entity<TEntity, TId> { public virtual TId Id { get; protected set; } public override bool Equals(object obj)... ... } public class EntityA<EntityA, long> : Entity<EntityA, long...

Can I create a Rails model where the ID auto-increments from 0, not 1?

Can I create a Rails model where the ID auto-increments from 0, not 1? How? Are there any gotchas? I checked here, and it seems I can't: http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#M001911 If, as it seems, I cannot, is there reason why I can't or shouldn't just manually assign an ID of 0 to ...

Cancel and Renew using Paypal PRO & Reference ID

Situation: Selling $9.99 subscription service billed monthly. User will be able to pay through the site via credit card or paypal (Paypal Pro). Will use reference ID to automatically charge account every month. Question regarding Paypal process: I want to offer users ability to cancels their account through the website's "my accoun...

linux id no_squash_root

The linux 'id' command reports on groups= that process belongs to. When and how does this get filled in? I'm writing an suid/sgid program and it seems that the groups never get filled in for my process and perhaps just coincidentially, but the permissions inregards to an nfs mounted file system don't work correctly for it either (by th...

how to get jsf clientid of a component in datatable ?

hi there, i am trying to get the client id of a component in a datatable. the problem is that jsf puts row index before the component id automatically, i.e. <a id="mappedidentifier_table:1:mappedidentifier_Update" href="#">Update</a> for a link in the second row (index=1). i am using the following methods to get the clientId ...

Social Login class in Php mysql using Social Api (facebook connect,yahoo, etc)

hello frnds I want to create a login class which will allow user to login with my site login details or any 3rd party Social Networking sites like Facebook connect ,google friend,twitter oauth,open id,yahoo. how to start with it i dont want to use rpx. ...

Categorizing non-ID categories PHP loop

On my project there're various search results of different content-types. For unimportant reasons, not all content-types carry a unique ID. However, I tried to write this loop that will detect IDless content-types, and will give them a unique ID. Basically, the results look like this: Category ID 3 Category ID 3 Category ID 4 NON-ID C...

popluating multiple id tags

How can i populate multiple id tags simultaneously. On my page i have id tags starting with "total_" phrase, like total_1, total_2 etc., is there a way by which i can populate each of them on a single click in javascript. Should i use regex or parser. Any help will be highly appreciated. Thank you. ...

How to add user id in Excel header / footer?

Does anyone know how to add user id to the Excel header or footer? I know I can set it in a macro but I'm trying to avoid it. Is there any shortcut like &D or &t for user id? ...

Accessing function from multiple forms on same page.

Hi, I have the following function: <script type="text/javascript"> $(function(){ // start a counter for new row IDs // by setting it to the number // of existing rows var newRowNum = 2; // bind a click event to the "Add" link $('#addnew').click(function() { // increment the counter ...

Duplicated Zend_Form Element ID in a page with various forms

How do I tell the Zend_Form that I want an element (and it's ID-label, etc) to use another ID value instead of the element's name? I have several forms in a page. Some of them have repeated names. So as Zend_Form creates elements' IDs using names I end up with multiple elements with the same ID, which makes my (X)HTML document invalid. ...

How to get last inserted row ID from wordpress database?

My wordpress plugin has a table with a AUTO_INCREMENT primary key field called ID. When a new row is inserted into the table, I'd like to get the ID value of the insertion. The feature is to using AJAX to post data to server to insert into DB. The new row ID is returned in the AJAX response to update client status. It is possible that ...

Advantage of data type id vs NSString in Objective C?

This code... NSString * s = [[NSString alloc] initWithString:@"Hello, World"]; s = s.lowercaseString; NSLog(@"%@", s); ...allows the use of dot notation but is strongly typed. This code... id s = [[NSString alloc] initWithString:@"Hello, World"]; s = [s lowercaseString]; NSLog(@"%@", s); ... is weakly typed and requires use of sq...

How to determine if a Windows Process is running?

This is concerning Windows XP processes. I have a process running, let's call it Process1. Process1 creates a new process, Process2 and saves its id. Now, at some point Process1 wants Process2 to do something, so it first needs to make sure that process2 is still alive and that the user has not not killed it. How can I check that this...

n-values UUID generator, reusable IDs

I need a simple UUID generator. The ID is required to be unique for this single instance. Another requirement is, that it has n hashes coexisting at a time, and being releasable. I don't know wether this fits the UUID concept or not. I allrdy thought about a Stack with n-values using pop and push, but this practice seems bad memory wise....

How do i grab value from url like http://.....com/value

Hi I am developing an web application using php. One of the requirement is the want member id looks like folder name such as http......com//joe The id is "joe" Normally i will use http......com/?id=joe but my client don't what this idea... How do i grab that id??? Thanks ...

set body id to current file name in .net

I am not a .Net guy but trying to get update an existing .net site. Trying to set up a unique id for the body tag even though I am using a master page. <body id="<% page_name %>"> Obviously the above example doesn't work but not quite sure if there is a function that returns the file name that can be easily added to the masterpage so ...

Getting the ID(Autonumber) after the session saved in nhibernate?

Hi i am inserting a row of data into a table through nhibernate, how to get the Id(auto number)of the last inserted row? please help me... ...

PHP Check Process ID

This is something i have wondered for a while and decided to ask about it. We have the function getmypid() which will return the current scripts process id. Is there some kind of function such as checkifpidexists() in php? I mean a inbuilt one and not some batch script solution. And is there a way to change a scripts pid? Some clarif...